[U-Boot] [PATCH 0/2] imx: ventana: allow pci to be disabled via env

This series adds the ability for PCI to be disabled via an env var then disables it by default for the Gateworks Ventana boards because of an adverse affect enabling PCI in the bootloader has on the kernel. The user may want to remove the env var that disables it if they require features that need PCI enabled in the bootloader.
Tim Harvey (2): pci: allow disabling of pci init/enum via env imx: ventana: default pci to disabled
drivers/pci/pci.c | 4 ++++ include/configs/gw_ventana.h | 1 + 2 files changed, 5 insertions(+)

Signed-off-by: Tim Harvey tharvey@gateworks.com --- drivers/pci/pci.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 4b73a0f..6b36c18 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -458,6 +458,10 @@ void pci_init(void) { hose_head = NULL;
+ /* allow env to disable pci init/enum */ + if (getenv("pcidisable") != NULL) + return; + /* now call board specific pci_init()... */ pci_init_board(); }

On 17/06/2016 15:20, Tim Harvey wrote:
Signed-off-by: Tim Harvey tharvey@gateworks.com
drivers/pci/pci.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 4b73a0f..6b36c18 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -458,6 +458,10 @@ void pci_init(void) { hose_head = NULL;
- /* allow env to disable pci init/enum */
- if (getenv("pcidisable") != NULL)
return;
- /* now call board specific pci_init()... */ pci_init_board();
}
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

The IMX6 PCIe host controller does not have a proper reset and as such there are several issues that can arise if PCI is enabled in the bootloader follwed by Linux trying to re-configure LTSSM and/or toggling PERST# to the devices.
For now, the best approach seems to default to disabling PCI by defaulting pciedisable=1. This can be overridden by the user if they need PCI in the bootloader, for example: - GW552x needing ethernet access in bootloader - GW16082 expansion board needing a device-tree fixup for irq mapping
Signed-off-by: Tim Harvey tharvey@gateworks.com --- include/configs/gw_ventana.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 982ddba..4acfca6 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -274,6 +274,7 @@ "dio0:mode=gpio;dio1:mode=gpio;dio2:mode=gpio;dio3:mode=gpio\0" \
#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \ + "pcidisable=1\0" \ "usb_pgood_delay=2000\0" \ "console=ttymxc1\0" \ "bootdevs=usb mmc sata flash\0" \

On 17/06/2016 15:20, Tim Harvey wrote:
The IMX6 PCIe host controller does not have a proper reset and as such there are several issues that can arise if PCI is enabled in the bootloader follwed by Linux trying to re-configure LTSSM and/or toggling PERST# to the devices.
For now, the best approach seems to default to disabling PCI by defaulting pciedisable=1. This can be overridden by the user if they need PCI in the bootloader, for example:
- GW552x needing ethernet access in bootloader
- GW16082 expansion board needing a device-tree fixup for irq mapping
Signed-off-by: Tim Harvey tharvey@gateworks.com
include/configs/gw_ventana.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 982ddba..4acfca6 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -274,6 +274,7 @@ "dio0:mode=gpio;dio1:mode=gpio;dio2:mode=gpio;dio3:mode=gpio\0" \
#define CONFIG_EXTRA_ENV_SETTINGS_COMMON \
- "pcidisable=1\0" \ "usb_pgood_delay=2000\0" \ "console=ttymxc1\0" \ "bootdevs=usb mmc sata flash\0" \
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic
participants (2)
-
Stefano Babic
-
Tim Harvey