mx6sabresd: Convert PCI to driver model
authorAlifer Moraes <alifer.wsdm@gmail.com>
Mon, 20 Jan 2020 16:31:02 +0000 (13:31 -0300)
committerStefano Babic <sbabic@denx.de>
Sun, 9 Feb 2020 14:05:10 +0000 (15:05 +0100)
Convert imx6sabresd PCI to driver model to fix the following warning:

===================== WARNING ======================
This board does not use CONFIG_DM_PCI Please update
the board to use CONFIG_DM_PCI before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

After the conversion the following commands were used for testing:

=> pci enum
PCI: Failed autoconfig bar 10
PCI: Failed autoconfig bar 10
=> pci 1
Scanning PCI devices on bus 1
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
Reviewed-by: Fabio Estevam <festevam@gmail.com>
board/freescale/mx6sabresd/mx6sabresd.c
configs/mx6sabresd_defconfig

index b346ca4ced9c84eb2869d77f2889361b33de7658..4a208277ac5f38b63bfc5683a7064c624fac3a0b 100644 (file)
@@ -231,16 +231,6 @@ static void setup_spi(void)
        SETUP_IOMUX_PADS(ecspi1_pads);
 }
 
-iomux_v3_cfg_t const pcie_pads[] = {
-       IOMUX_PADS(PAD_EIM_D19__GPIO3_IO19 | MUX_PAD_CTRL(NO_PAD_CTRL)),        /* POWER */
-       IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | MUX_PAD_CTRL(NO_PAD_CTRL)),        /* RESET */
-};
-
-static void setup_pcie(void)
-{
-       SETUP_IOMUX_PADS(pcie_pads);
-}
-
 iomux_v3_cfg_t const di0_pads[] = {
        IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK),        /* DISP0_CLK */
        IOMUX_PADS(PAD_DI0_PIN2__IPU1_DI0_PIN02),               /* DISP0_HSYNC */
@@ -508,7 +498,6 @@ int overwrite_console(void)
 int board_eth_init(bd_t *bis)
 {
        setup_iomux_enet();
-       setup_pcie();
 
        return cpu_eth_init(bis);
 }
index c6cd1e3cb195855f2e44eed2bb23040b77aa2e5d..8629554fba85434acf9c09eede62586e5afe8a62 100644 (file)
@@ -83,6 +83,7 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PHYLIB=y
 CONFIG_MII=y
 CONFIG_PCI=y
+CONFIG_DM_PCI=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y