coreboot/include/device
Myles Watson 0fb2a8f081 This patch simplifies the resource allocator by splitting it into distinct
phases.  One benefit of this is that it makes the call chain easier to follow.

device/device.c:
	Remove references to have_resources.
	Remove read_resources from compute allocate resources.
	Split compute_allocate_resources into two
	1. compute_resource_needs
		A. Traverse the tree depth first
		B. Sum resources
		C. Adjust limits and bases
		D. Update bridge resources sizes
	2. assign_resource_values
		A. Traverse the tree breadth first
		B. Assign resource values

device/device_util.c:
	Remove references to have_resources.

device/pci_device.c:
	Remove saved values stubs (they're not needed now.)
		1. Sizing function restores values
	Fix 64-bit flag masking.
	Add an error message for an invalid value.
	Update pci_record_bridge_resource:
		1. remove compute_allocate_resource call
		2. remove pci_set_resource call
	Update pci_bus_read_resources to read children's too.
	Update pci_set_resource:
		1. change logic for setting zero-size resources
			A. Set range to [limit->limit-2^gran]
				(Could have been any range with base > limit)
		2. remove compute_allocate_resource calls
		3. Change phase4_assign_resources ->phase4_set_resources

device/pci_ops.c:
	Change an error message to be more helpful.

device/root_device.c:
	Remove code for read_resources and set resources.
	Add a .id to the ops.

include/device/device.h:
	Remove have_resources.
	Comment out assign_resources.  I think we could comment out more here.
	Add debugging function prototypes.
	Change phase4_assign_resources to phase4_set_resources.

include/device/resource.h
	Add a IORESOURCE_BRIDGE flag.

device/cardbus_device.c
	Remove compute_allocate_resource call.
	Use probe_resource (doesn't die) instead of find_resource.

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://coreboot.org/repository/coreboot-v3@1089 f3766cd6-281f-0410-b1cd-43a5c92072e9
2008-12-31 19:43:34 +00:00
..
agp.h A lot of the v3 header files require other header files to be #included 2008-02-19 00:34:32 +00:00
cardbus.h This patch continues the device code cleanup. 2008-11-05 22:27:36 +00:00
device.h This patch simplifies the resource allocator by splitting it into distinct 2008-12-31 19:43:34 +00:00
hypertransport.h This now compiles (with many warnings but ...) and tries to build a rom 2008-08-24 02:59:05 +00:00
hypertransport_def.h Use the same naming convention and placement for "include guards" in 2007-05-21 06:48:47 +00:00
path.h This patch adds some debug functions, cleans up whitespace (per indent), and adds const in a few places. 2008-11-14 16:15:33 +00:00
pci.h This patch changes unsigned [int] to u16 for subsystem IDs. They're in the 2008-12-10 19:07:16 +00:00
pci_def.h Console: 2008-08-09 21:03:57 +00:00
pci_ids.h Stage 1 mostly works. Stage 2 needs lots of twiddling. 2008-11-12 04:10:45 +00:00
pci_ops.h Unshared pci functions, since these can not be used when broken PCI 2008-10-20 23:48:30 +00:00
pci_rom.h A lot of the v3 header files require other header files to be #included 2008-02-19 00:34:32 +00:00
pcie.h This patch continues the device code cleanup. 2008-11-05 22:27:36 +00:00
pcix.h A lot of the v3 header files require other header files to be #included 2008-02-19 00:34:32 +00:00
pnp.h This patch makes all the SuperIOs build again, and reverts some breakage that 2008-12-08 20:40:02 +00:00
resource.h This patch simplifies the resource allocator by splitting it into distinct 2008-12-31 19:43:34 +00:00
smbus.h A lot of the v3 header files require other header files to be #included 2008-02-19 00:34:32 +00:00
smbus_def.h Use the same naming convention and placement for "include guards" in 2007-05-21 06:48:47 +00:00