diff mbox series

[2/4] mx6sabresd: Convert PCI to driver model

Message ID 20200120163104.32487-2-alifer.wsdm@gmail.com
State New
Headers show
Series [1/4] mx6sabre_common: Remove FEC related settings | expand

Commit Message

Alifer Moraes Jan. 20, 2020, 4:31 p.m. UTC
Convert imx6sabresd PCI to driver model to fix the following warning:

Comments

Fabio Estevam Jan. 22, 2020, 1:48 p.m. UTC | #1
On Mon, Jan 20, 2020 at 1:31 PM Alifer Moraes <alifer.wsdm at gmail.com> wrote:
>
> 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
> _____________________________________________________________
> 01.00.00   0x8086     0x08b1     Network controller      0x80
>
> Signed-off-by: Alifer Moraes <alifer.wsdm at gmail.com>

Reviewed-by: Fabio Estevam <festevam at gmail.com>
diff mbox series

Patch

===================== 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
_____________________________________________________________
01.00.00   0x8086     0x08b1     Network controller      0x80

Signed-off-by: Alifer Moraes <alifer.wsdm at gmail.com>
---
 board/freescale/mx6sabresd/mx6sabresd.c | 11 -----------
 configs/mx6sabresd_defconfig            |  1 +
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index b346ca4ced..4a208277ac 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -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);
 }
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index 0bd686ec86..e3b8908928 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -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