public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Soeren Moch <smoch@web.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model
Date: Fri, 11 Oct 2019 00:59:49 +0200	[thread overview]
Message-ID: <20191010225950.10823-2-smoch@web.de> (raw)
In-Reply-To: <20191010225950.10823-1-smoch@web.de>

So we can get rid of legacy pci config code.

PCI_PNP is not required for this board, remove it to reduce the size of the
u-boot binary.

DM_PCI does not start the host controller automatically anymore. Do so
in preboot instead.

Signed-off-by: Soeren Moch <smoch@web.de>
---
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: u-boot at lists.denx.de
---
 board/tbs/tbs2910/tbs2910.c | 17 -----------------
 configs/tbs2910_defconfig   |  4 +++-
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/board/tbs/tbs2910/tbs2910.c b/board/tbs/tbs2910/tbs2910.c
index d8db7a884f..efc6f88198 100644
--- a/board/tbs/tbs2910/tbs2910.c
+++ b/board/tbs/tbs2910/tbs2910.c
@@ -22,10 +22,6 @@
 #include <asm/arch/sys_proto.h>
 DECLARE_GLOBAL_DATA_PTR;

-#define WEAK_PULLUP	(PAD_CTL_PUS_47K_UP |			\
-	PAD_CTL_SPEED_LOW | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |	\
-	PAD_CTL_SRE_SLOW)
-
 #define UART_PAD_CTRL  (PAD_CTL_PUS_100K_UP |			\
 	PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm |			\
 	PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
@@ -63,13 +59,6 @@ static iomux_v3_cfg_t const enet_pads[] = {
 	MX6_PAD_ENET_CRS_DV__GPIO1_IO25		| MUX_PAD_CTRL(NO_PAD_CTRL),
 };

-static iomux_v3_cfg_t const pcie_pads[] = {
-	/* W_DISABLE# */
-	MX6_PAD_KEY_COL4__GPIO4_IO14 | MUX_PAD_CTRL(WEAK_PULLUP),
-	/* PERST# */
-	MX6_PAD_GPIO_17__GPIO7_IO12  | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
 int dram_init(void)
 {
 	gd->ram_size = 2048ul * 1024 * 1024;
@@ -87,11 +76,6 @@ static void setup_iomux_enet(void)
 	gpio_set_value(IMX_GPIO_NR(1, 25), 1);
 }

-static void setup_pcie(void)
-{
-	imx_iomux_v3_setup_multiple_pads(pcie_pads, ARRAY_SIZE(pcie_pads));
-}
-
 static void setup_iomux_uart(void)
 {
 	imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
@@ -236,7 +220,6 @@ int board_phy_config(struct phy_device *phydev)
 int board_eth_init(bd_t *bis)
 {
 	setup_iomux_enet();
-	setup_pcie();
 	return cpu_eth_init(bis);
 }

diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 3148a325e9..98e5ca0846 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -9,7 +9,7 @@ CONFIG_CMD_HDMIDETECT=y
 CONFIG_AHCI=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
+CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
 CONFIG_PRE_CONSOLE_BUFFER=y
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_BOUNCE_BUFFER=y
@@ -54,6 +54,8 @@ CONFIG_FSL_USDHC=y
 CONFIG_PHYLIB=y
 CONFIG_MII=y
 CONFIG_PCI=y
+CONFIG_DM_PCI=y
+# CONFIG_PCI_PNP is not set
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_RTC=y
--
2.17.1

  reply	other threads:[~2019-10-10 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 22:59 [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 Soeren Moch
2019-10-10 22:59 ` Soeren Moch [this message]
2019-10-14 12:40   ` [U-Boot] [PATCH 2/3] board: tbs2910: Convert pci to driver model sbabic at denx.de
2019-10-10 22:59 ` [U-Boot] [PATCH 3/3] board: tbs2910: Convert eth " Soeren Moch
2019-10-14 12:40   ` sbabic at denx.de
2019-10-14 12:40 ` [U-Boot] [PATCH 1/3] ARM: dts: imx6q-tbs2910: Sync devicetree with kernel 5.3 sbabic at denx.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191010225950.10823-2-smoch@web.de \
    --to=smoch@web.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox