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
diff --git a/src/devices/chip.c b/src/devices/chip.c
index 33f3976..5066ef2 100644
--- a/src/devices/chip.c
+++ b/src/devices/chip.c
@@ -115,7 +115,7 @@
 			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 @@
  * 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 @@
 /**
  * @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 @@
  */
 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 d2b7e24f..60e79c5 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -85,7 +85,7 @@
 	}
 
 	/* 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 @@
 				   dev_path(curdev));
 			continue;
 		}
-		if (!curdev->enable) {
+		if (!curdev->enabled) {
 			continue;
 		}
 
@@ -431,10 +431,10 @@
 	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 @@
 		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 @@
  * @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 @@
 	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 e50ebf6..db74267 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -264,10 +264,10 @@
 			*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 @@
 		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 4bc4e1f..4a24822 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -470,7 +470,7 @@
 		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 @@
 			 * 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 @@
 		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 5a2e857..207e3db 100644
--- a/src/devices/pnp_device.c
+++ b/src/devices/pnp_device.c
@@ -131,7 +131,7 @@
 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 0bf5ea6..c2173d3 100644
--- a/src/devices/root_device.c
+++ b/src/devices/root_device.c
@@ -78,7 +78,7 @@
 				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 @@
 	.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,
+		 },
+	 },
 };
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 708fa14..52fb723 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -46,8 +46,7 @@
 	unsigned short	device;
 	unsigned int	class;		/* 3 bytes: (base,sub,prog-if) */
 	unsigned int	hdr_type;	/* PCI header type */
-	/* @todo rename this to 'enabled' */
-	unsigned int    enable : 1;	/* set if we should enable the device */
+	unsigned int    enabled : 1;	/* set if we should enable the device */
 
 	uint8_t command;
 
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index d6b99a6..867654c 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -97,7 +97,7 @@
 			     i, mem[i].basek, i, mem[i].sizek);
 	}
 #endif
-	while(idx < sizeof(mem)/sizeof(mem[0])) {
+	while (idx < sizeof(mem)/sizeof(mem[0])) {
 		mem[idx].basek = 0;
 		mem[idx].sizek = 0;
 		idx++;
@@ -192,7 +192,7 @@
 		/* See if there is an available configuration space mapping register
 		 * in function 1. */
 		free_reg = 0;
-		for(config_reg = 0xe0; config_reg <= 0xec; config_reg += 4) {
+		for (config_reg = 0xe0; config_reg <= 0xec; config_reg += 4) {
 			uint32_t config;
 			config = f1_read_config32(config_reg);
 			if (!free_reg && ((config & 3) == 0)) {
@@ -200,8 +200,8 @@
 				continue;
 			}
 			if (((config & 3) == 3) && 
-				(((config >> 4) & 7) == nodeid) &&
-				(((config >> 8) & 3) == link)) {
+			    (((config >> 4) & 7) == nodeid) &&
+			    (((config >> 8) & 3) == link)) {
 				break;
 			}
 		}
@@ -492,12 +492,12 @@
 	printk_debug("amdk8_scan_root_bus\n");
 
 	/* Unmap all of the HT chains */
+	printk_debug("amdk8_scan_root_bus: clearing HT registers\n");
 	for (reg = 0xe0; reg <= 0xec; reg += 4) {
-		printk_debug("amdk8_scan_root: clearing register %x\n", reg);
 		f1_write_config32(reg, 0);
 	}
 
-	printk_debug("amdk8_scan_root_bus: start scan pci bus\n");
+	printk_debug("amdk8_scan_root_bus: start scaning pci bus\n");
 	max = pci_scan_bus(&root->link[0], PCI_DEVFN(0x18, 0), 0xff, max);
 
 	printk_debug("amdk8_scan_root_bus: done\n");
@@ -570,14 +570,12 @@
 	.enable           = 0,
 };
 
-
 static struct pci_driver mcf0_driver __pci_driver = {
 	.ops    = &northbridge_operations,
 	.vendor = PCI_VENDOR_ID_AMD,
 	.device = 0x1100,
 };
 
-
 static void enumerate(struct chip *chip)
 {
 	chip_enumerate(chip);
diff --git a/src/southbridge/amd/amd8111/amd8111.c b/src/southbridge/amd/amd8111/amd8111.c
index ccf26b6..e576ea8 100644
--- a/src/southbridge/amd/amd8111/amd8111.c
+++ b/src/southbridge/amd/amd8111/amd8111.c
@@ -40,7 +40,7 @@
 	}
 	reg = reg_old = pci_read_config16(lpc_dev, 0x48);
 	reg &= ~(1 << index);
-	if (dev->enable) {
+	if (dev->enabled) {
 		reg |= (1 << index);
 	}
 	if (reg != reg_old) {
diff --git a/src/southbridge/amd/amd8131/amd8131_bridge.c b/src/southbridge/amd/amd8131/amd8131_bridge.c
index 44b04d8..dc474fc 100644
--- a/src/southbridge/amd/amd8131/amd8131_bridge.c
+++ b/src/southbridge/amd/amd8131/amd8131_bridge.c
@@ -98,19 +98,19 @@
 static void ioapic_enable(device_t dev)
 {
 	uint32_t value;
+
 	value = pci_read_config32(dev, 0x44);
-	if (dev->enable) {
+	if (dev->enabled) {
 		value |= ((1 << 1) | (1 << 0));
 	} else {
 		value &= ~((1 << 1) | (1 << 0));
 	}
 	pci_write_config32(dev, 0x44, value);
 
-//BY LYH
+	/* We have to enable MEM and Bus Master for IOAPIC */
         value = pci_read_config32(dev, 0x4);
         value |= 6;
         pci_write_config32(dev, 0x4, value);
-//BY LYH END
 }
 
 static struct device_operations ioapic_ops = {
diff --git a/src/superio/NSC/pc87360/superio.c b/src/superio/NSC/pc87360/superio.c
index 50d71ea..a913156 100644
--- a/src/superio/NSC/pc87360/superio.c
+++ b/src/superio/NSC/pc87360/superio.c
@@ -21,7 +21,7 @@
 	/* Wishlist handle well known programming interfaces more
 	 * generically.
 	 */
-	if (!dev->enable) {
+	if (!dev->enabled) {
 		return;
 	}
 	conf = dev->chip->chip_info;
diff --git a/src/superio/NSC/pc87366/superio.c b/src/superio/NSC/pc87366/superio.c
index 11da482..7c49258 100644
--- a/src/superio/NSC/pc87366/superio.c
+++ b/src/superio/NSC/pc87366/superio.c
@@ -21,7 +21,7 @@
 	/* Wishlist handle well known programming interfaces more
 	 * generically.
 	 */
-	if (!dev->enable) {
+	if (!dev->enabled) {
 		return;
 	}
 	conf = dev->chip->chip_info;
diff --git a/src/superio/winbond/w83627hf/superio.c b/src/superio/winbond/w83627hf/superio.c
index 0096fcd..9773d47 100644
--- a/src/superio/winbond/w83627hf/superio.c
+++ b/src/superio/winbond/w83627hf/superio.c
@@ -83,7 +83,7 @@
 {
 	struct superio_winbond_w83627hf_config *conf;
 	struct resource *res0, *res1;
-	if (!dev->enable) {
+	if (!dev->enabled) {
 		return;
 	}
 	conf = dev->chip->chip_info;
@@ -140,7 +140,7 @@
 void w83627hf_pnp_enable(device_t dev)
 {
 
-        if (!dev->enable) {
+        if (!dev->enabled) {
                 pnp_enter_ext_func_mode(dev);   // BY LYH
 
                 pnp_set_logical_device(dev);