public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ladislav Michl <oss-lists@triops.cz>
To: Tom Rini <trini@konsulko.com>
Cc: Enric Balletbo i Serra <eballetbo@gmail.com>, u-boot@lists.denx.de
Subject: Re: [PATCH 15/21] igep00x0: Disable networking
Date: Wed, 28 Sep 2022 19:53:39 +0200	[thread overview]
Message-ID: <YzSKI23VKeYmkbh8@lenoch> (raw)
In-Reply-To: <20220802113424.2988464-16-trini@konsulko.com>

On Tue, Aug 02, 2022 at 07:33:41AM -0400, Tom Rini wrote:
> This platform needs to be converted to use DM_ETH as the deadline is 2
> years passed due.  Disable networking support for now.

Oh well, my bad. There are too many patches accumulated.
Please see bellow for original version for reference (applied
after this one is reverted) Alternatively I can rebase on current
master, just let me know whichever way you prefer.

	ladis

> Cc: Enric Balletbo i Serra <eballetbo at gmail.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
>  board/isee/igep00x0/igep00x0.c | 58 ----------------------------------
>  configs/igep00x0_defconfig     |  5 +--
>  2 files changed, 1 insertion(+), 62 deletions(-)
> 
> diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
> index 0932f62b9beb..6c5e6fbbcb0d 100644
> --- a/board/isee/igep00x0/igep00x0.c
> +++ b/board/isee/igep00x0/igep00x0.c
> @@ -88,62 +88,6 @@ int onenand_board_init(struct mtd_info *mtd)
>  	return 1;
>  }
>  
> -#if defined(CONFIG_CMD_NET)
> -static void reset_net_chip(int gpio)
> -{
> -	if (!gpio_request(gpio, "eth nrst")) {
> -		gpio_direction_output(gpio, 1);
> -		udelay(1);
> -		gpio_set_value(gpio, 0);
> -		udelay(40);
> -		gpio_set_value(gpio, 1);
> -		mdelay(10);
> -	}
> -}
> -
> -/*
> - * Routine: setup_net_chip
> - * Description: Setting up the configuration GPMC registers specific to the
> - *		Ethernet hardware.
> - */
> -static void setup_net_chip(void)
> -{
> -	struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
> -	static const u32 gpmc_lan_config[] = {
> -		NET_LAN9221_GPMC_CONFIG1,
> -		NET_LAN9221_GPMC_CONFIG2,
> -		NET_LAN9221_GPMC_CONFIG3,
> -		NET_LAN9221_GPMC_CONFIG4,
> -		NET_LAN9221_GPMC_CONFIG5,
> -		NET_LAN9221_GPMC_CONFIG6,
> -	};
> -
> -	enable_gpmc_cs_config(gpmc_lan_config, &gpmc_cfg->cs[5],
> -			CONFIG_SMC911X_BASE, GPMC_SIZE_16M);
> -
> -	/* Enable off mode for NWE in PADCONF_GPMC_NWE register */
> -	writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
> -	/* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
> -	writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
> -	/* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
> -	writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
> -		&ctrl_base->gpmc_nadv_ale);
> -
> -	reset_net_chip(64);
> -}
> -
> -int board_eth_init(struct bd_info *bis)
> -{
> -#ifdef CONFIG_SMC911X
> -	return smc911x_initialize(0, CONFIG_SMC911X_BASE);
> -#else
> -	return 0;
> -#endif
> -}
> -#else
> -static inline void setup_net_chip(void) {}
> -#endif
> -
>  #ifdef CONFIG_OF_BOARD_SETUP
>  static int ft_enable_by_compatible(void *blob, char *compat, int enable)
>  {
> @@ -234,8 +178,6 @@ int misc_init_r(void)
>  					 OMAP34XX_CTRL_WKUP_CTRL_GPIO_IO_PWRDNZ,
>  					 OMAP34XX_CTRL_WKUP_CTRL);
>  
> -	setup_net_chip();
> -
>  	omap_die_id_display();
>  
>  	set_led();
> diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig
> index 17c97ac27f79..25eda11dd45e 100644
> --- a/configs/igep00x0_defconfig
> +++ b/configs/igep00x0_defconfig
> @@ -67,7 +67,7 @@ CONFIG_ENV_UBI_VOLUME="config"
>  CONFIG_ENV_UBI_VOLUME_REDUND="config_r"
>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>  CONFIG_VERSION_VARIABLE=y
> -CONFIG_NET_RANDOM_ETHADDR=y
> +# CONFIG_NET is not set
>  CONFIG_SYS_I2C_LEGACY=y
>  CONFIG_SPL_SYS_I2C_LEGACY=y
>  CONFIG_MMC_OMAP_HS=y
> @@ -81,9 +81,6 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x800
>  CONFIG_SYS_NAND_OOBSIZE=0x40
>  CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
>  CONFIG_MTD_UBI_FASTMAP=y
> -CONFIG_SMC911X=y
> -CONFIG_SMC911X_BASE=0x2C000000
> -CONFIG_SMC911X_32_BIT=y
>  CONFIG_CONS_INDEX=3
>  CONFIG_SPI=y
>  CONFIG_DM_SPI=y
> -- 
> 2.25.1

From: Ladislav Michl <ladis@linux-mips.org>
Date: Tue, 5 Apr 2022 15:47:45 +0200
Subject: [PATCH] ARM: igep00x0: convert to DM_ETH

The GPMC bus hasn't been converted, so omap3-igep0020-u-boot.dtsi needs
to provide the address of the ethernet controller.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 arch/arm/dts/omap3-igep0020-u-boot.dtsi | 12 ++++++++++++
 board/isee/igep00x0/igep00x0.c          | 12 +-----------
 configs/igep00x0_defconfig              |  2 +-
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/arch/arm/dts/omap3-igep0020-u-boot.dtsi b/arch/arm/dts/omap3-igep0020-u-boot.dtsi
index 41beaf0900..d418b6a79f 100644
--- a/arch/arm/dts/omap3-igep0020-u-boot.dtsi
+++ b/arch/arm/dts/omap3-igep0020-u-boot.dtsi
@@ -9,6 +9,18 @@
 	chosen {
 		stdout-path = &uart3;
 	};
+
+	ethernet@2c000000 {
+		compatible = "smsc,lan9221","smsc,lan9115";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0x2c000000 0xff>;
+		bank-width = <2>;
+		vddvario-supply = <&vddvario>;
+		vdd33a-supply = <&vdd33a>;
+		reg-io-width = <4>;
+		smsc,save-mac-address;
+	};
 };
 
 &uart1 {
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 0932f62b9b..b48acf9d9b 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -12,7 +12,6 @@
 #include <dm.h>
 #include <ns16550.h>
 #include <twl4030.h>
-#include <netdev.h>
 #include <spl.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
@@ -119,7 +118,7 @@ static void setup_net_chip(void)
 	};
 
 	enable_gpmc_cs_config(gpmc_lan_config, &gpmc_cfg->cs[5],
-			CONFIG_SMC911X_BASE, GPMC_SIZE_16M);
+			0x2C000000, GPMC_SIZE_16M);
 
 	/* Enable off mode for NWE in PADCONF_GPMC_NWE register */
 	writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
@@ -131,15 +130,6 @@ static void setup_net_chip(void)
 
 	reset_net_chip(64);
 }
-
-int board_eth_init(struct bd_info *bis)
-{
-#ifdef CONFIG_SMC911X
-	return smc911x_initialize(0, CONFIG_SMC911X_BASE);
-#else
-	return 0;
-#endif
-}
 #else
 static inline void setup_net_chip(void) {}
 #endif
diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig
index f0d6ac56b6..9f895113d9 100644
--- a/configs/igep00x0_defconfig
+++ b/configs/igep00x0_defconfig
@@ -70,8 +70,8 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x800
 CONFIG_SYS_NAND_OOBSIZE=0x40
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_DM_ETH=y
 CONFIG_SMC911X=y
-CONFIG_SMC911X_BASE=0x2C000000
 CONFIG_SMC911X_32_BIT=y
 CONFIG_CONS_INDEX=3
 CONFIG_SPI=y
-- 
2.32.0


  parent reply	other threads:[~2022-09-28 18:50 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 11:33 [PATCH 00/21] Finish migration to DM_ETH Tom Rini
2022-08-02 11:33 ` [PATCH 01/21] Convert CONFIG_SYS_FDT_PAD to Kconfig Tom Rini
2022-08-02 12:41   ` Simon Glass
2022-08-13  1:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 02/21] ppc: Remove ids8313 board Tom Rini
2022-08-02 11:45   ` Heiko Schocher
2022-08-13  1:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 03/21] arm: Remove snapper9260 board Tom Rini
2022-08-08 19:26   ` Simon Glass
2022-08-13  1:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 04/21] arm: Remove mx28evk board Tom Rini
2022-08-02 23:08   ` Fabio Estevam
2022-08-02 23:11     ` Fabio Estevam
2022-08-03  1:57       ` Tom Rini
2022-08-02 11:33 ` [PATCH 05/21] arm: Remove edminiv2 board Tom Rini
2022-08-05 16:48   ` Simon Glass
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 06/21] arm: Remove cm_t335 board Tom Rini
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 07/21] arm: Remove armadillo-800eva board Tom Rini
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 08/21] arm: Remove kzm9g board Tom Rini
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 09/21] net: Remove smc91111 ethernet driver Tom Rini
2022-08-06 17:47   ` Ramon Fried
2022-08-13  1:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 10/21] net: lpc32xx_eth.c " Tom Rini
2022-08-06 17:47   ` Ramon Fried
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 11/21] fsl-mc: Update dependencies for DM_ETH Tom Rini
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 12/21] layerscape: Disable CONFIG_FMAN_ENET on some platforms Tom Rini
2022-08-09 14:16   ` [PATCHv2 12a/21] ppc: Remove corenet_ds boards Tom Rini
2022-08-09 14:16     ` [PATCHv2 12b/21] layerscape: Disable CONFIG_FMAN_ENET on *aqds* platforms Tom Rini
2022-08-21  2:43       ` Tom Rini
2022-08-21  2:43     ` [PATCHv2 12a/21] ppc: Remove corenet_ds boards Tom Rini
2022-08-02 11:33 ` [PATCH 13/21] mpc8548cds: Guard old ethernet code with !DM_ETH Tom Rini
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 14/21] net: ks8851_mll: Remove legacy non-DM_ETH code and callers Tom Rini
2022-08-06 17:47   ` Ramon Fried
2022-08-21  2:42   ` Tom Rini
2022-08-02 11:33 ` [PATCH 15/21] igep00x0: Disable networking Tom Rini
2022-08-21  2:43   ` Tom Rini
2022-09-28 17:53   ` Ladislav Michl [this message]
2022-08-02 11:33 ` [PATCH 16/21] am335x_sl50: Disable SPL_NET Tom Rini
2022-08-21  2:43   ` Tom Rini
2022-08-21  2:43   ` Tom Rini
2022-08-02 11:33 ` [PATCH 17/21] ls1021aqds/ls1021aiot: Remove legacy non-DM_ETH code Tom Rini
2022-08-21  2:43   ` Tom Rini
2022-08-02 11:33 ` [PATCH 18/21] vinco: " Tom Rini
2022-08-21  2:43   ` Tom Rini
2022-08-02 11:33 ` [PATCH 19/21] warp7: " Tom Rini
2022-08-21  2:43   ` Tom Rini
2022-08-02 11:33 ` [PATCH 20/21] smdkc100: " Tom Rini
2022-08-03 14:23   ` Minkyu Kang
2022-08-21  2:43   ` Tom Rini
2022-08-02 11:33 ` [PATCH 21/21] net: Make DM_ETH be selected by NETDEVICE Tom Rini
2022-08-06 17:46   ` Ramon Fried
2022-08-06 18:21   ` Simon Glass
2022-08-06 20:01     ` Tom Rini
2022-08-07 15:47       ` Simon Glass
2022-08-07 16:39         ` Tom Rini
2022-08-07 18:49           ` Simon Glass
2022-08-21  2:43   ` Tom Rini
2022-08-02 11:51 ` [PATCH 00/21] Finish migration to DM_ETH Tom Rini
2022-08-08 19:09   ` Tom Rini

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=YzSKI23VKeYmkbh8@lenoch \
    --to=oss-lists@triops.cz \
    --cc=eballetbo@gmail.com \
    --cc=trini@konsulko.com \
    --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