diff options
author | Li-Ta Lo <ollie@lanl.gov> | 2004-04-29 20:08:54 +0000 |
---|---|---|
committer | Li-Ta Lo <ollie@lanl.gov> | 2004-04-29 20:08:54 +0000 |
commit | 69c5a905ede8053fd2993ed2e4ff14e9970f2dce (patch) | |
tree | 0790c872f03deea3d70ad433d58289b123e55aa6 /src/devices | |
parent | fcdd571aee7592bd3f67283e70fba7608091ba04 (diff) |
changed dev->enable to dev->enabled. Sorry, I am the only one who can't speak
English in the project.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1543 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/chip.c | 13 | ||||
-rw-r--r-- | src/devices/device.c | 14 | ||||
-rw-r--r-- | src/devices/hypertransport.c | 8 | ||||
-rw-r--r-- | src/devices/pci_device.c | 10 | ||||
-rw-r--r-- | src/devices/pnp_device.c | 2 | ||||
-rw-r--r-- | src/devices/root_device.c | 18 |
6 files changed, 35 insertions, 30 deletions
diff --git a/src/devices/chip.c b/src/devices/chip.c index 33f3976eb8..5066ef2abc 100644 --- a/src/devices/chip.c +++ b/src/devices/chip.c @@ -115,7 +115,7 @@ void chip_enumerate(struct chip *chip) printk_spew(" parent: (%p) %s\n", dev->bus->dev, dev_path(dev->bus->dev)); dev->chip = chip; - dev->enable = chip->path[i].enable; + dev->enabled = chip->path[i].enable; dev->links = link + 1; for (child = chip->children; child; child = child->next) { if (!child->bus && child->link == i) { @@ -152,7 +152,7 @@ void chip_enumerate(struct chip *chip) * A static device chain is a linked list of static device structures which are * on the same branch of the static device tree. This function does not only * enumerate the devices on a single chain, as its name suggest, it also walks - * into the subordinary chains. It calls the device specific + * into the subordinary chains by recursion. It calls the device specific * chip_control::enumerate() of the device if one exists or calls the generic * chip_enumerate(). * @@ -187,8 +187,12 @@ static void enumerate_static_device_chain(struct chip *root) /** * @brief Enumerate static devices in the system. * - * \note The definition of 'enumerate' is not clear in this context. Does it mean - * probe ? + * Static device is . Static devices are actually enumerated or "listed" in + * the Config.lb config file and the corresponding data structures are + * generated by config tool in the static.c. + * + * \note The definition of 'enumerate' is not clear in this context. Does it + * mean probe ? * * \note How do we determine the existence of the static devices ? Static * devices are listed in the config file and generated at compile time by config @@ -203,5 +207,6 @@ static void enumerate_static_device_chain(struct chip *root) */ void enumerate_static_devices(void) { + printk_info("Enumerating static devices...\n"); enumerate_static_device_chain(&static_root); } diff --git a/src/devices/device.c b/src/devices/device.c index d2b7e24f74..60e79c5a58 100644 --- a/src/devices/device.c +++ b/src/devices/device.c @@ -85,7 +85,7 @@ device_t alloc_dev(struct bus *parent, struct device_path *path) } /* If we don't have any other information about a device enable it */ - dev->enable = 1; + dev->enabled = 1; return dev; } @@ -135,7 +135,7 @@ static void read_resources(struct bus *bus) dev_path(curdev)); continue; } - if (!curdev->enable) { + if (!curdev->enabled) { continue; } @@ -431,10 +431,10 @@ void assign_resources(struct bus *bus) for (curdev = bus->children; curdev; curdev = curdev->sibling) { if (!curdev->ops || !curdev->ops->set_resources) { printk_err("%s missing set_resources\n", - dev_path(curdev)); + dev_path(curdev)); continue; } - if (!curdev->enable) { + if (!curdev->enabled) { continue; } curdev->ops->set_resources(curdev); @@ -461,7 +461,7 @@ void enable_resources(struct device *dev) printk_err("%s missing enable_resources\n", dev_path(dev)); return; } - if (!dev->enable) { + if (!dev->enabled) { return; } dev->ops->enable_resources(dev); @@ -471,7 +471,7 @@ void enable_resources(struct device *dev) * @brief Determine the existence of dynamic devices and construct dynamic * device tree. * - * Start for the root device 'dev_root', scan the buses in the system + * Start form the root device 'dev_root', scan the buses in the system * recursively, build the dynamic device tree according to the result * of the probe. * @@ -565,7 +565,7 @@ void dev_initialize(void) printk_info("Initializing devices...\n"); for (dev = all_devices; dev; dev = dev->next) { - if (dev->enable && dev->ops && dev->ops->init) { + if (dev->enabled && dev->ops && dev->ops->init) { printk_debug("%s init\n", dev_path(dev)); dev->ops->init(dev); } diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c index e50ebf6f20..db7426767d 100644 --- a/src/devices/hypertransport.c +++ b/src/devices/hypertransport.c @@ -264,10 +264,10 @@ unsigned int hypertransport_scan_chain(struct bus *bus, unsigned int max) *chain_last = dev; /* Run the magice enable sequence for the device */ if (dev->chip && dev->chip->control && dev->chip->control->enable_dev) { - int enable = dev->enable; - dev->enable = 1; + int enable = dev->enabled; + dev->enabled = 1; dev->chip->control->enable_dev(dev); - dev->enable = enable; + dev->enabled = enable; } /* Now read the vendor and device id */ id = pci_read_config32(dev, PCI_VENDOR_ID); @@ -335,7 +335,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus, unsigned int max) printk_debug("%s [%04x/%04x] %s next_unitid: %04x\n", dev_path(dev), dev->vendor, dev->device, - (dev->enable? "enabled": "disabled"), next_unitid); + (dev->enabled? "enabled": "disabled"), next_unitid); } while((last_unitid != next_unitid) && (next_unitid <= 0x1f)); #if HAVE_HARD_RESET == 1 diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c index 4bc4e1f9f0..4a248224cb 100644 --- a/src/devices/pci_device.c +++ b/src/devices/pci_device.c @@ -470,7 +470,7 @@ static void set_pci_ops(struct device *dev) break; default: bad: - if (dev->enable) { + if (dev->enabled) { printk_err("%s [%04x/%04x/%06x] has unknown header " "type %02x, ignoring.\n", dev_path(dev), @@ -605,10 +605,10 @@ unsigned int pci_scan_bus(struct bus *bus, unsigned min_devfn, * some arbitray code without any justification */ if (dev->chip && dev->chip->control && dev->chip->control->enable_dev) { - int enable = dev->enable; - dev->enable = 1; + int enable = dev->enabled; + dev->enabled = 1; dev->chip->control->enable_dev(dev); - dev->enable = enable; + dev->enabled = enable; } /* Now read the vendor and device id */ id = pci_read_config32(dev, PCI_VENDOR_ID); @@ -648,7 +648,7 @@ unsigned int pci_scan_bus(struct bus *bus, unsigned min_devfn, printk_debug("%s [%04x/%04x] %s\n", dev_path(dev), dev->vendor, dev->device, - dev->enable?"enabled": "disabled"); + dev->enabled?"enabled": "disabled"); if (PCI_FUNC(devfn) == 0x00 && (hdr_type & 0x80) != 0x80) { /* if this is not a multi function device, don't diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c index 5a2e85795d..207e3db23f 100644 --- a/src/devices/pnp_device.c +++ b/src/devices/pnp_device.c @@ -131,7 +131,7 @@ void pnp_enable_resources(device_t dev) void pnp_enable(device_t dev) { - if (!dev->enable) { + if (!dev->enabled) { pnp_set_logical_device(dev); pnp_set_enable(dev, 0); } diff --git a/src/devices/root_device.c b/src/devices/root_device.c index 0bf5ea60a8..c2173d3947 100644 --- a/src/devices/root_device.c +++ b/src/devices/root_device.c @@ -78,7 +78,7 @@ unsigned int walk_static_devices(device_t bus, unsigned int max) child->ops->enable(child); } printk_debug("%s %s\n", dev_path(child), - child->enable?"enabled": "disabled"); + child->enabled?"enabled": "disabled"); } } for (link = 0; link < bus->links; link++) { @@ -124,12 +124,12 @@ struct device dev_root = { .ops = &default_dev_ops_root, .bus = &dev_root.link[0], .path = { .type = DEVICE_PATH_ROOT }, - .enable = 1, - .links = 1, - .link = { - [0] = { - .dev = &dev_root, - .link = 0, - }, - }, + .enabled = 1, + .links = 1, + .link = { + [0] = { + .dev = &dev_root, + .link = 0, + }, + }, }; |