From 9782f7538c3a7c0623d2177d10cc7785336da47c Mon Sep 17 00:00:00 2001 From: Li-Ta Lo Date: Wed, 5 May 2004 21:15:42 +0000 Subject: code refromat, doxidization git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1547 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/root_device.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/devices/root_device.c') diff --git a/src/devices/root_device.c b/src/devices/root_device.c index c2173d3947..78a81608ad 100644 --- a/src/devices/root_device.c +++ b/src/devices/root_device.c @@ -4,7 +4,7 @@ /** * Read the resources for the root device, - * that encompase the resources for the entire system. + * that encompass the resources for the entire system. * @param root Pointer to the device structure for the system root device */ void root_dev_read_resources(device_t root) @@ -92,6 +92,13 @@ unsigned int walk_static_devices(device_t bus, unsigned int max) return max; } +/** + * @brief Enable resources for children devices + * + * @param dev the device whos childrens resources are to be enabled + * + * This function is call by the enable_resource + */ void enable_childrens_resources(device_t dev) { unsigned link; @@ -103,11 +110,28 @@ void enable_childrens_resources(device_t dev) } } +/** + * @brief Scan root bus for generic PCI systems + * + * @param root the root device structure + * @param max the current bus number scanned so fat, usually 0x00 + * + */ unsigned int root_dev_scan_pci_bus(device_t root, unsigned int max) { return pci_scan_bus(&root->link[0], 0, 0xff, max); } +/** + * @brief Default device operation for root device + * + * This is the default device operation for root devices in PCI based systems. + * The static enumeration code chip_control::enumerate() of mainboards usually + * override this operation with their own device operations. An notable example + * is mainboard operations for AMD K8 mainboards. They replace the scan_bus() + * method with amdk8_scan_root_bus() due to the special device layout of AMD K8 + * systems. + */ struct device_operations default_dev_ops_root = { .read_resources = root_dev_read_resources, .set_resources = root_dev_set_resources, -- cgit v1.2.3