diff options
author | Eric Biederman <ebiederm@xmission.com> | 2004-10-22 02:33:51 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2004-10-22 02:33:51 +0000 |
commit | 4f9265fdc6c6609dd801a13415bc7a5378076e78 (patch) | |
tree | 30b286a218d9188153cbcef654c2d42c4c340495 /src/southbridge/intel/i82801dbm/i82801dbm_lpc.c | |
parent | 23c3d9321f4fdead52080e9a1a261807d0a3cbc8 (diff) |
- kill typo so resources are not mixed up in amdk8/northbridge.c
- Enable resources on the lpc bus. PCI now longer do this by
default for their children unless they are bridges.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1703 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/southbridge/intel/i82801dbm/i82801dbm_lpc.c')
-rw-r--r-- | src/southbridge/intel/i82801dbm/i82801dbm_lpc.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/southbridge/intel/i82801dbm/i82801dbm_lpc.c b/src/southbridge/intel/i82801dbm/i82801dbm_lpc.c index 2d272db6d8..3325a743c8 100644 --- a/src/southbridge/intel/i82801dbm/i82801dbm_lpc.c +++ b/src/southbridge/intel/i82801dbm/i82801dbm_lpc.c @@ -172,40 +172,29 @@ static void lpc_init(struct device *dev) static void i82801dbm_lpc_read_resources(device_t dev) { - unsigned int reg; + struct resource *res; /* Get the normal pci resources of this device */ pci_dev_read_resources(dev); - /* Find my place in the resource list */ - reg = dev->resources; - /* Add an extra subtractive resource for both memory and I/O */ - dev->resource[reg].base = 0; - dev->resource[reg].size = 0; - dev->resource[reg].align = 0; - dev->resource[reg].gran = 0; - dev->resource[reg].limit = 0; - dev->resource[reg].flags = IORESOURCE_IO | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED; - dev->resource[reg].index = 0; - reg++; - - dev->resource[reg].base = 0; - dev->resource[reg].size = 0; - dev->resource[reg].align = 0; - dev->resource[reg].gran = 0; - dev->resource[reg].limit = 0; - dev->resource[reg].flags = IORESOURCE_MEM | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED; - dev->resource[reg].index = 0; - reg++; - - dev->resources = reg; + res = new_resource(dev, IOINDEX_SUBTRACTIVE(0, 0)); + res->flags = IORESOURCE_IO | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED; + + res = new_resource(dev, IOINDEX_SUBTRACTIVE(1, 0)); + res->flags = IORESOURCE_MEM | IORESOURCE_SUBTRACTIVE | IORESOURCE_ASSIGNED; +} + +static void i82801dbm_lpc_enable_resources(device_t dev) +{ + pci_dev_enable_resources(dev); + enable_childrens_resources(dev); } static struct device_operations lpc_ops = { .read_resources = i82801dbm_lpc_read_resources, .set_resources = pci_dev_set_resources, - .enable_resources = pci_dev_enable_resources, + .enable_resources = i82801dbm_lpc_enable_resources, .init = lpc_init, .scan_bus = scan_static_bus, .enable = i82801dbm_enable, |