mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
in dts. This gets rid of the ugly pcipath etc. properties. So, instead of somedevice {pcipath="1,0";}; We say pci@1,0{ etc. etc. }; As per my agreement I agree to document this in the design doc. The alix1c compiles but is untested, and will probably need some work. I will do these additional tasks on friday. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> M include/device/path.h Add LPC path type, replacing SUPERIO path type, since SUPERIO is only one type of LPC. Clean up tabbing in parts of the file (cosmetic). M mainboard/emulation/qemu-x86/dts Modify this dts for the new path naming scheme. M device/pci_device.c Change what used to be a BIOS_ERR (but is no longer) to a BIOS_NOTICE. The change is that the device tree includes more than just PCI devices, so finding a non-PCI device is no longer fatal; a notice is useful. M device/device_util.c Add string creation for PCI_BUS nad LPC. M northbridge/intel/i440bxemulation/dts Add ID info for the chip. M northbridge/intel/i440bxemulation/i440bx.c Change initialization so it is explicitly for the .ops struct member. M util/dtc/flattree.c Add support for the new path naming scheme. I'm in the middle of this commit so I'll fix the hard-coded lengths next commit. Also delete dead code between #if 0 and /* and // M util/x86emu/vm86.c comment out unused variables. these may someday be use, not ready to delete them yet. M Makefile Change -O2 to -g. We need debugging on LAR far more than we need performance. git-svn-id: svn://coreboot.org/repository/coreboot-v3@593 f3766cd6-281f-0410-b1cd-43a5c92072e9
112 lines
2 KiB
C
112 lines
2 KiB
C
/*
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
#ifndef DEVICE_PATH_H
|
|
#define DEVICE_PATH_H
|
|
|
|
enum device_path_type {
|
|
DEVICE_PATH_NONE = 0,
|
|
DEVICE_PATH_ROOT,
|
|
DEVICE_PATH_PCI_DOMAIN,
|
|
DEVICE_PATH_PCI_BUS,
|
|
DEVICE_PATH_PCI,
|
|
DEVICE_PATH_PNP,
|
|
DEVICE_PATH_I2C,
|
|
DEVICE_PATH_APIC,
|
|
DEVICE_PATH_APIC_CLUSTER,
|
|
DEVICE_PATH_CPU,
|
|
DEVICE_PATH_CPU_BUS,
|
|
DEVICE_PATH_LPC,
|
|
};
|
|
|
|
struct pci_domain_path
|
|
{
|
|
unsigned domain;
|
|
};
|
|
|
|
struct pci_bus_path
|
|
{
|
|
unsigned bus;
|
|
};
|
|
|
|
struct pci_path
|
|
{
|
|
unsigned devfn;
|
|
};
|
|
|
|
struct pnp_path
|
|
{
|
|
unsigned port;
|
|
unsigned device;
|
|
};
|
|
|
|
struct i2c_path
|
|
{
|
|
unsigned device;
|
|
};
|
|
|
|
struct apic_path
|
|
{
|
|
unsigned apic_id;
|
|
unsigned node_id;
|
|
unsigned core_id;
|
|
};
|
|
|
|
struct apic_cluster_path
|
|
{
|
|
unsigned cluster;
|
|
};
|
|
|
|
struct cpu_path
|
|
{
|
|
unsigned id;
|
|
};
|
|
|
|
struct cpu_bus_path
|
|
{
|
|
unsigned id;
|
|
};
|
|
|
|
struct lpc_path
|
|
{
|
|
unsigned iobase;
|
|
};
|
|
|
|
|
|
struct device_path {
|
|
enum device_path_type type;
|
|
union {
|
|
struct pci_path pci;
|
|
struct pnp_path pnp;
|
|
struct i2c_path i2c;
|
|
struct apic_path apic;
|
|
struct pci_domain_path pci_domain;
|
|
struct pci_bus_path pci_bus;
|
|
struct apic_cluster_path apic_cluster;
|
|
struct cpu_path cpu;
|
|
struct cpu_bus_path cpu_bus;
|
|
struct lpc_path lpc;
|
|
} u;
|
|
};
|
|
|
|
|
|
#define DEVICE_PATH_MAX 30
|
|
#define BUS_PATH_MAX (DEVICE_PATH_MAX+10)
|
|
|
|
extern int path_eq(struct device_path *path1, struct device_path *path2);
|
|
|
|
#endif /* DEVICE_PATH_H */
|