[coreboot] [PATCH] Convert Intel 82371AB/EB/MB boards to TINY_BOOTBLOCK
stefan.reinauer at coresystems.de
Thu Oct 7 18:20:58 CEST 2010
On 10/7/10 8:52 AM, Uwe Hermann wrote:
> Convert all Intel 82371AB/EB/MB based boards to TINY_BOOTBLOCK.
> Unfortunately Intel 440BX + 82371AB/EB/MB boards can have their ISA device
> on various PCI bus:device.function locations.
> Examples we encountered: 00:07.0, 00:04.0, or 00:14.0.
> Thus, instead of hardcoding PCI bus:device.function numbers such as
> PCI_DEV(0, 7, 0), we now simply find the ISA device via PCI IDs, which
> works the same on all boards.
> As an additional benefit this patch also gets rid of one .c file include
> in romstage.c.
> Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
with one comment:
> Index: src/southbridge/intel/i82371eb/i82371eb_enable_rom.c
> --- src/southbridge/intel/i82371eb/i82371eb_enable_rom.c (Revision 5917)
> +++ src/southbridge/intel/i82371eb/i82371eb_enable_rom.c (Arbeitskopie)
> -static void i82371eb_enable_rom(device_t dev)
> +static void i82371eb_enable_rom(void)
> u16 reg16;
> + device_t dev;
> + /*
> + * Note: The Intel 82371AB/EB/MB ISA device can be on different
> + * PCI bus:device.function locations on different boards.
> + * Examples we encountered: 00:07.0, 00:04.0, or 00:14.0.
> + * But scanning for the PCI IDs (instead of hardcoding
> + * bus/device/function numbers) works on all boards.
> + */
> + dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_INTEL,
> + PCI_DEVICE_ID_INTEL_82371AB_ISA), 0);
Does it make sense to use pci_locate_device_on_bus() here instead? Well,
maybe not because we start on bus 0 and the device is always there.
Maybe it's kind of too philosophical to distinguish.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the coreboot