[PATCH 1/5] pci: Skip configuring PCI Rom Address for unsupported header types

Stefan Roese sr at denx.de
Fri Oct 8 07:52:37 CEST 2021


On 07.10.21 14:50, Pali Rohár wrote:
> PCI Rom Address is currently supported only for Normal (0x00) and
> Bridge (0x01) header types. Fix code accordingly.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   drivers/pci/pci_auto.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
> index 08082460eb86..288f7996c7c0 100644
> --- a/drivers/pci/pci_auto.c
> +++ b/drivers/pci/pci_auto.c
> @@ -131,7 +131,8 @@ static void dm_pciauto_setup_device(struct udevice *dev, int bars_num,
>   	/* Configure the expansion ROM address */
>   	dm_pci_read_config8(dev, PCI_HEADER_TYPE, &header_type);
>   	header_type &= 0x7f;
> -	if (header_type != PCI_HEADER_TYPE_CARDBUS) {
> +	if (header_type == PCI_HEADER_TYPE_NORMAL ||
> +	    header_type == PCI_HEADER_TYPE_BRIDGE) {
>   		rom_addr = (header_type == PCI_HEADER_TYPE_NORMAL) ?
>   			PCI_ROM_ADDRESS : PCI_ROM_ADDRESS1;
>   		dm_pci_write_config32(dev, rom_addr, 0xfffffffe);
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list