* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
@ 2009-09-11 20:47 Olof Johansson
2009-09-12 5:25 ` Dirk Behme
` (3 more replies)
0 siblings, 4 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-11 20:47 UTC (permalink / raw)
To: u-boot
Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
over tftp.
Based on the omap3 evm code. I added a new highlevel define for Tobi
to avoid having it dependent on CMD_NET (which would seem backward in
this case).
Signed-off-by: Olof Johansson <olof@lixom.net>
diff --git a/board/overo/overo.c b/board/overo/overo.c
index dd6d286..4a67360 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -32,6 +32,7 @@
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
+#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
#include <asm/mach-types.h>
#include "overo.h"
@@ -62,6 +63,10 @@ int misc_init_r(void)
twl4030_power_init();
twl4030_led_init();
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+ setup_net_chip();
+#endif
+
dieid_num_r();
return 0;
@@ -76,4 +81,59 @@ int misc_init_r(void)
void set_muxconf_regs(void)
{
MUX_OVERO();
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+ MUX_OVERO_TOBI();
+#endif
+}
+
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+/*
+ * Routine: setup_net_chip
+ * Description: Setting up the configuration GPMC registers specific to the
+ * Ethernet hardware.
+ */
+static void setup_net_chip(void)
+{
+ struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
+ struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
+
+ /* Configure GPMC registers */
+ writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
+ writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
+ writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
+ writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
+ writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
+ writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
+ writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
+
+ /* 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);
+
+ /* Make GPIO 64 as output pin */
+ writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
+
+ /* Now send a pulse on the GPIO pin */
+ writel(GPIO0, &gpio3_base->setdataout);
+ udelay(1);
+ writel(GPIO0, &gpio3_base->cleardataout);
+ udelay(1);
+ writel(GPIO0, &gpio3_base->setdataout);
+}
+#endif
+
+
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_SMC911X
+ rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+#endif
+ return rc;
}
+
diff --git a/board/overo/overo.h b/board/overo/overo.h
index 0b59120..f0ec18a 100644
--- a/board/overo/overo.h
+++ b/board/overo/overo.h
@@ -33,6 +33,8 @@ const omap3_sysinfo sysinfo = {
#endif
};
+static void setup_net_chip(void);
+
/*
* IEN - Input Enable
* IDIS - Input Disable
@@ -378,4 +380,42 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+#define MUX_OVERO_TOBI() \
+ MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)) /*GPMC_A1*/\
+ MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)) /*GPMC_A2*/\
+ MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)) /*GPMC_A3*/\
+ MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)) /*GPMC_A4*/\
+ MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)) /*GPMC_A5*/\
+ MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)) /*GPMC_A6*/\
+ MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)) /*GPMC_A7*/\
+ MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)) /*GPMC_A8*/\
+ MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)) /*GPMC_A9*/\
+ MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)) /*GPMC_A10*/\
+ MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)) /*GPMC_D0*/\
+ MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)) /*GPMC_D1*/\
+ MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)) /*GPMC_D2*/\
+ MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)) /*GPMC_D3*/\
+ MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)) /*GPMC_D4*/\
+ MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)) /*GPMC_D5*/\
+ MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)) /*GPMC_D6*/\
+ MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)) /*GPMC_D7*/\
+ MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)) /*GPMC_D8*/\
+ MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)) /*GPMC_D9*/\
+ MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)) /*GPMC_D10*/\
+ MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)) /*GPMC_D11*/\
+ MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)) /*GPMC_D12*/\
+ MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)) /*GPMC_D13*/\
+ MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)) /*GPMC_D14*/\
+ MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) /*GPMC_D15*/\
+ MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) /*GPMC_nCS5*/\
+ MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
+ MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
+ /* - SMSC911X_NRES*/\
+ MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
+ /* - LAN_INTR */\
+
+
+#endif
+
#endif
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 07a031b..6616b55 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -28,7 +28,8 @@
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
-#define CONFIG_OMAP3_OVERO 1 /* working with overo */
+#define CONFIG_OMAP3_OVERO 1 /* working with overo */
+//#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
#include <asm/arch/cpu.h> /* get chip and board defs */
#include <asm/arch/omap3.h>
@@ -105,9 +106,13 @@
#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
+#if !defined(CONFIG_OMAP3_OVERO_TOBI)
+#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
+#endif
+
+
#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_I2C_SPEED 100000
#define CONFIG_SYS_I2C_SLAVE 1
@@ -293,4 +298,18 @@ extern unsigned int boot_flash_sec;
extern unsigned int boot_flash_type;
#endif
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+/*----------------------------------------------------------------------------
+ * SMSC9115 Ethernet from SMSC9118 family
+ *----------------------------------------------------------------------------
+ */
+
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC911X 1
+#define CONFIG_SMC911X_32_BIT
+#define CONFIG_SMC911X_BASE 0x2C000000
+
+#endif /* (CONFIG_CMD_NET) */
+
+
#endif /* __CONFIG_H */
^ permalink raw reply related [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-11 20:47 [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
@ 2009-09-12 5:25 ` Dirk Behme
2009-09-12 15:16 ` Paulraj, Sandeep
2009-09-13 19:41 ` Steve Sakoman
` (2 subsequent siblings)
3 siblings, 1 reply; 74+ messages in thread
From: Dirk Behme @ 2009-09-12 5:25 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> Based on the omap3 evm code. I added a new highlevel define for Tobi
> to avoid having it dependent on CMD_NET (which would seem backward in
> this case).
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index dd6d286..4a67360 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -32,6 +32,7 @@
> #include <twl4030.h>
> #include <asm/io.h>
> #include <asm/arch/mux.h>
> +#include <asm/arch/mem.h>
> #include <asm/arch/sys_proto.h>
> #include <asm/mach-types.h>
> #include "overo.h"
> @@ -62,6 +63,10 @@ int misc_init_r(void)
> twl4030_power_init();
> twl4030_led_init();
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + setup_net_chip();
> +#endif
> +
> dieid_num_r();
>
> return 0;
> @@ -76,4 +81,59 @@ int misc_init_r(void)
> void set_muxconf_regs(void)
> {
> MUX_OVERO();
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + MUX_OVERO_TOBI();
> +#endif
> +}
> +
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +/*
> + * Routine: setup_net_chip
> + * Description: Setting up the configuration GPMC registers specific to the
> + * Ethernet hardware.
> + */
> +static void setup_net_chip(void)
> +{
> + struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
> + struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
> +
> + /* Configure GPMC registers */
> + writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
> + writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
> + writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
> + writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
> + writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
> + writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
> + writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
> +
> + /* 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);
> +
> + /* Make GPIO 64 as output pin */
> + writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
> +
> + /* Now send a pulse on the GPIO pin */
> + writel(GPIO0, &gpio3_base->setdataout);
> + udelay(1);
> + writel(GPIO0, &gpio3_base->cleardataout);
> + udelay(1);
> + writel(GPIO0, &gpio3_base->setdataout);
> +}
> +#endif
> +
> +
> +
> +int board_eth_init(bd_t *bis)
> +{
> + int rc = 0;
> +#ifdef CONFIG_SMC911X
> + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
> +#endif
> + return rc;
> }
> +
> diff --git a/board/overo/overo.h b/board/overo/overo.h
> index 0b59120..f0ec18a 100644
> --- a/board/overo/overo.h
> +++ b/board/overo/overo.h
> @@ -33,6 +33,8 @@ const omap3_sysinfo sysinfo = {
> #endif
> };
>
> +static void setup_net_chip(void);
> +
> /*
> * IEN - Input Enable
> * IDIS - Input Disable
> @@ -378,4 +380,42 @@ const omap3_sysinfo sysinfo = {
> MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
> MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +#define MUX_OVERO_TOBI() \
> + MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)) /*GPMC_A1*/\
> + MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)) /*GPMC_A2*/\
> + MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)) /*GPMC_A3*/\
> + MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)) /*GPMC_A4*/\
> + MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)) /*GPMC_A5*/\
> + MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)) /*GPMC_A6*/\
> + MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)) /*GPMC_A7*/\
> + MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)) /*GPMC_A8*/\
> + MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)) /*GPMC_A9*/\
> + MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)) /*GPMC_A10*/\
> + MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)) /*GPMC_D0*/\
> + MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)) /*GPMC_D1*/\
> + MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)) /*GPMC_D2*/\
> + MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)) /*GPMC_D3*/\
> + MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)) /*GPMC_D4*/\
> + MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)) /*GPMC_D5*/\
> + MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)) /*GPMC_D6*/\
> + MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)) /*GPMC_D7*/\
> + MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)) /*GPMC_D8*/\
> + MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)) /*GPMC_D9*/\
> + MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)) /*GPMC_D10*/\
> + MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)) /*GPMC_D11*/\
> + MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)) /*GPMC_D12*/\
> + MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)) /*GPMC_D13*/\
> + MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)) /*GPMC_D14*/\
> + MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) /*GPMC_D15*/\
> + MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) /*GPMC_nCS5*/\
> + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
> + MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
> + /* - SMSC911X_NRES*/\
> + MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
> + /* - LAN_INTR */\
> +
> +
> +#endif
> +
> #endif
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 07a031b..6616b55 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -28,7 +28,8 @@
> #define CONFIG_OMAP 1 /* in a TI OMAP core */
> #define CONFIG_OMAP34XX 1 /* which is a 34XX */
> #define CONFIG_OMAP3430 1 /* which is in a 3430 */
> -#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> +#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> +//#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
>
> #include <asm/arch/cpu.h> /* get chip and board defs */
> #include <asm/arch/omap3.h>
> @@ -105,9 +106,13 @@
> #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
> #undef CONFIG_CMD_IMI /* iminfo */
> #undef CONFIG_CMD_IMLS /* List all found images */
> -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
> #undef CONFIG_CMD_NFS /* NFS support */
>
> +#if !defined(CONFIG_OMAP3_OVERO_TOBI)
> +#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
> +#endif
> +
> +
> #define CONFIG_SYS_NO_FLASH
> #define CONFIG_SYS_I2C_SPEED 100000
> #define CONFIG_SYS_I2C_SLAVE 1
> @@ -293,4 +298,18 @@ extern unsigned int boot_flash_sec;
> extern unsigned int boot_flash_type;
> #endif
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +/*----------------------------------------------------------------------------
> + * SMSC9115 Ethernet from SMSC9118 family
> + *----------------------------------------------------------------------------
> + */
> +
> +#define CONFIG_NET_MULTI
> +#define CONFIG_SMC911X 1
> +#define CONFIG_SMC911X_32_BIT
> +#define CONFIG_SMC911X_BASE 0x2C000000
> +
> +#endif /* (CONFIG_CMD_NET) */
> +
> +
> #endif /* __CONFIG_H */
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-12 5:25 ` Dirk Behme
@ 2009-09-12 15:16 ` Paulraj, Sandeep
2009-09-12 17:18 ` Olof Johansson
2009-09-22 19:44 ` Wolfgang Denk
0 siblings, 2 replies; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-12 15:16 UTC (permalink / raw)
To: u-boot
> Olof Johansson wrote:
> > Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > over tftp.
> >
> > Based on the omap3 evm code. I added a new highlevel define for Tobi
> > to avoid having it dependent on CMD_NET (which would seem backward in
> > this case).
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
>
> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Pushed to u-boot-ti
-Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-12 15:16 ` Paulraj, Sandeep
@ 2009-09-12 17:18 ` Olof Johansson
2009-09-12 17:33 ` Paulraj, Sandeep
2009-09-22 19:48 ` Wolfgang Denk
2009-09-22 19:44 ` Wolfgang Denk
1 sibling, 2 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-12 17:18 UTC (permalink / raw)
To: u-boot
On Sep 12, 2009, at 10:16 AM, Paulraj, Sandeep wrote:
>> Olof Johansson wrote:
>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>> over tftp.
>>>
>>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>>> to avoid having it dependent on CMD_NET (which would seem backward
>>> in
>>> this case).
>>>
>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>
>> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
>
> Pushed to u-boot-ti
Thanks!
Random question on u-boot development process: I see you didn't add
your signed-off on the commit. People don't do that when they check in
patches to the u-boot trees?
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-12 17:18 ` Olof Johansson
@ 2009-09-12 17:33 ` Paulraj, Sandeep
2009-09-13 17:22 ` Ben Warren
2009-09-22 19:48 ` Wolfgang Denk
1 sibling, 1 reply; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-12 17:33 UTC (permalink / raw)
To: u-boot
>
> >> Olof Johansson wrote:
> >>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> >>> over tftp.
> >>>
> >>> Based on the omap3 evm code. I added a new highlevel define for Tobi
> >>> to avoid having it dependent on CMD_NET (which would seem backward
> >>> in
> >>> this case).
> >>>
> >>> Signed-off-by: Olof Johansson <olof@lixom.net>
> >>
> >> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
> >
> > Pushed to u-boot-ti
>
> Thanks!
>
> Random question on u-boot development process: I see you didn't add
> your signed-off on the commit. People don't do that when they check in
> patches to the u-boot trees?
>
>
> -Olof
Well look at these 2 examples. Both are my patches, one of them applied by Ben Warren and one by Jean-Christophe
http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=b3af1d698b031e721bacaee8715d79daaf823de6
The above has a signed-off by Ben
But the below committed by Jean-Christophe does not have his signed-off-by
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=fcaac589a68115819ddadcf5c18ded9a5f9e2c75
Thanks,
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-12 17:33 ` Paulraj, Sandeep
@ 2009-09-13 17:22 ` Ben Warren
2009-09-13 19:11 ` Paulraj, Sandeep
2009-09-22 19:50 ` Wolfgang Denk
0 siblings, 2 replies; 74+ messages in thread
From: Ben Warren @ 2009-09-13 17:22 UTC (permalink / raw)
To: u-boot
On Sat, Sep 12, 2009 at 10:33 AM, Paulraj, Sandeep <s-paulraj@ti.com> wrote:
>
> >
> > >> Olof Johansson wrote:
> > >>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > >>> over tftp.
> > >>>
> > >>> Based on the omap3 evm code. I added a new highlevel define for Tobi
> > >>> to avoid having it dependent on CMD_NET (which would seem backward
> > >>> in
> > >>> this case).
> > >>>
> > >>> Signed-off-by: Olof Johansson <olof@lixom.net>
> > >>
> > >> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
> > >
> > > Pushed to u-boot-ti
> >
> > Thanks!
> >
> > Random question on u-boot development process: I see you didn't add
> > your signed-off on the commit. People don't do that when they check in
> > patches to the u-boot trees?
> >
> >
> > -Olof
> Well look at these 2 examples. Both are my patches, one of them applied by
> Ben Warren and one by Jean-Christophe
>
>
> http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=b3af1d698b031e721bacaee8715d79daaf823de6
>
> The above has a signed-off by Ben
>
> But the below committed by Jean-Christophe does not have his signed-off-by
>
>
> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=fcaac589a68115819ddadcf5c18ded9a5f9e2c75
>
> I always use 'git am -s', which adds the SOB. My understanding is that
maintainers should do this as an indication of approval and help in
traceability.
regards,
Ben
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-13 17:22 ` Ben Warren
@ 2009-09-13 19:11 ` Paulraj, Sandeep
2009-09-22 19:51 ` Wolfgang Denk
2009-09-22 19:50 ` Wolfgang Denk
1 sibling, 1 reply; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-13 19:11 UTC (permalink / raw)
To: u-boot
> I always use 'git am -s', which adds the SOB. My understanding is that maintainers should do this as an indication of approval and help in traceability.
> regards,
> Ben
OK Thanks. Shall do so henceforth.
Regards,
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-11 20:47 [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
2009-09-12 5:25 ` Dirk Behme
@ 2009-09-13 19:41 ` Steve Sakoman
2009-09-22 19:41 ` Wolfgang Denk
2009-09-23 14:55 ` [U-Boot] [PATCH v2] " Olof Johansson
3 siblings, 0 replies; 74+ messages in thread
From: Steve Sakoman @ 2009-09-13 19:41 UTC (permalink / raw)
To: u-boot
On Fri, Sep 11, 2009 at 1:47 PM, Olof Johansson <olof@lixom.net> wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> Based on the omap3 evm code. I added a new highlevel define for Tobi
> to avoid having it dependent on CMD_NET (which would seem backward in
> this case).
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
Acked-by: Steve Sakoman <steve@sakoman.com>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index dd6d286..4a67360 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -32,6 +32,7 @@
> ?#include <twl4030.h>
> ?#include <asm/io.h>
> ?#include <asm/arch/mux.h>
> +#include <asm/arch/mem.h>
> ?#include <asm/arch/sys_proto.h>
> ?#include <asm/mach-types.h>
> ?#include "overo.h"
> @@ -62,6 +63,10 @@ int misc_init_r(void)
> ? ? ? ?twl4030_power_init();
> ? ? ? ?twl4030_led_init();
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + ? ? ? setup_net_chip();
> +#endif
> +
> ? ? ? ?dieid_num_r();
>
> ? ? ? ?return 0;
> @@ -76,4 +81,59 @@ int misc_init_r(void)
> ?void set_muxconf_regs(void)
> ?{
> ? ? ? ?MUX_OVERO();
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + ? ? ? MUX_OVERO_TOBI();
> +#endif
> +}
> +
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +/*
> + * Routine: setup_net_chip
> + * Description: Setting up the configuration GPMC registers specific to the
> + * ? ? ? ? ? Ethernet hardware.
> + */
> +static void setup_net_chip(void)
> +{
> + ? ? ? struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
> + ? ? ? struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
> +
> + ? ? ? /* Configure GPMC registers */
> + ? ? ? writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
> + ? ? ? writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
> + ? ? ? writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
> + ? ? ? writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
> + ? ? ? writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
> + ? ? ? writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
> + ? ? ? writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
> +
> + ? ? ? /* 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);
> +
> + ? ? ? /* Make GPIO 64 as output pin */
> + ? ? ? writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
> +
> + ? ? ? /* Now send a pulse on the GPIO pin */
> + ? ? ? writel(GPIO0, &gpio3_base->setdataout);
> + ? ? ? udelay(1);
> + ? ? ? writel(GPIO0, &gpio3_base->cleardataout);
> + ? ? ? udelay(1);
> + ? ? ? writel(GPIO0, &gpio3_base->setdataout);
> +}
> +#endif
> +
> +
> +
> +int board_eth_init(bd_t *bis)
> +{
> + ? ? ? int rc = 0;
> +#ifdef CONFIG_SMC911X
> + ? ? ? rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
> +#endif
> + ? ? ? return rc;
> ?}
> +
> diff --git a/board/overo/overo.h b/board/overo/overo.h
> index 0b59120..f0ec18a 100644
> --- a/board/overo/overo.h
> +++ b/board/overo/overo.h
> @@ -33,6 +33,8 @@ const omap3_sysinfo sysinfo = {
> ?#endif
> ?};
>
> +static void setup_net_chip(void);
> +
> ?/*
> ?* IEN ?- Input Enable
> ?* IDIS - Input Disable
> @@ -378,4 +380,42 @@ const omap3_sysinfo sysinfo = {
> ?MUX_VAL(CP(SDRC_CKE0), ? ? ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*sdrc_cke0*/\
> ?MUX_VAL(CP(SDRC_CKE1), ? ? ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*sdrc_cke1*/
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +#define MUX_OVERO_TOBI() \
> + MUX_VAL(CP(GPMC_A1), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A1*/\
> + MUX_VAL(CP(GPMC_A2), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A2*/\
> + MUX_VAL(CP(GPMC_A3), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A3*/\
> + MUX_VAL(CP(GPMC_A4), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A4*/\
> + MUX_VAL(CP(GPMC_A5), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A5*/\
> + MUX_VAL(CP(GPMC_A6), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A6*/\
> + MUX_VAL(CP(GPMC_A7), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A7*/\
> + MUX_VAL(CP(GPMC_A8), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A8*/\
> + MUX_VAL(CP(GPMC_A9), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A9*/\
> + MUX_VAL(CP(GPMC_A10), ? ? ? ? (IDIS | PTU | EN ?| M0)) /*GPMC_A10*/\
> + MUX_VAL(CP(GPMC_D0), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D0*/\
> + MUX_VAL(CP(GPMC_D1), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D1*/\
> + MUX_VAL(CP(GPMC_D2), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D2*/\
> + MUX_VAL(CP(GPMC_D3), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D3*/\
> + MUX_VAL(CP(GPMC_D4), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D4*/\
> + MUX_VAL(CP(GPMC_D5), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D5*/\
> + MUX_VAL(CP(GPMC_D6), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D6*/\
> + MUX_VAL(CP(GPMC_D7), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D7*/\
> + MUX_VAL(CP(GPMC_D8), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D8*/\
> + MUX_VAL(CP(GPMC_D9), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D9*/\
> + MUX_VAL(CP(GPMC_D10), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D10*/\
> + MUX_VAL(CP(GPMC_D11), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D11*/\
> + MUX_VAL(CP(GPMC_D12), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D12*/\
> + MUX_VAL(CP(GPMC_D13), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D13*/\
> + MUX_VAL(CP(GPMC_D14), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D14*/\
> + MUX_VAL(CP(GPMC_D15), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D15*/\
> + MUX_VAL(CP(GPMC_NCS5), ? ? ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_nCS5*/\
> + MUX_VAL(CP(GPMC_CLK), ? ? ? ? (IDIS | PTU | EN ?| M0)) /*GPMC_CLK*/\
> + MUX_VAL(CP(GPMC_WAIT2), ? ? ? (IEN ?| PTU | EN ?| M4)) /*GPIO_64*/\
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* - SMSC911X_NRES*/\
> + MUX_VAL(CP(MCSPI1_CS2), ? ? ? (IEN ?| PTU | DIS | M4)) /*GPIO_176 */\
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* - LAN_INTR */\
> +
> +
> +#endif
> +
> ?#endif
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 07a031b..6616b55 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -28,7 +28,8 @@
> ?#define CONFIG_OMAP ? ? ? ? ? ?1 ? ? ? /* in a TI OMAP core */
> ?#define CONFIG_OMAP34XX ? ? ? ? ? ? ? ?1 ? ? ? /* which is a 34XX */
> ?#define CONFIG_OMAP3430 ? ? ? ? ? ? ? ?1 ? ? ? /* which is in a 3430 */
> -#define CONFIG_OMAP3_OVERO ? ? ? ? ? ? 1 ? ? ? /* working with overo */
> +#define CONFIG_OMAP3_OVERO ? ? 1 ? ? ? /* working with overo */
> +//#define CONFIG_OMAP3_OVERO_TOBI ? ? ?1 ? ? ? /* overo mounted on tobi */
>
> ?#include <asm/arch/cpu.h> ? ? ?/* get chip and board defs */
> ?#include <asm/arch/omap3.h>
> @@ -105,9 +106,13 @@
> ?#undef CONFIG_CMD_FPGA ? ? ? ? /* FPGA configuration Support ? */
> ?#undef CONFIG_CMD_IMI ? ? ? ? ?/* iminfo ? ? ? ? ? ? ? ? ? ? ? */
> ?#undef CONFIG_CMD_IMLS ? ? ? ? /* List all found images ? ? ? ?*/
> -#undef CONFIG_CMD_NET ? ? ? ? ?/* bootp, tftpboot, rarpboot ? ?*/
> ?#undef CONFIG_CMD_NFS ? ? ? ? ?/* NFS support ? ? ? ? ? ? ? ? ?*/
>
> +#if !defined(CONFIG_OMAP3_OVERO_TOBI)
> +#undef CONFIG_CMD_NET ? ? ? ? ?/* bootp, tftpboot, rarpboot ? ?*/
> +#endif
> +
> +
> ?#define CONFIG_SYS_NO_FLASH
> ?#define CONFIG_SYS_I2C_SPEED ? ? ? ? ? 100000
> ?#define CONFIG_SYS_I2C_SLAVE ? ? ? ? ? 1
> @@ -293,4 +298,18 @@ extern unsigned int boot_flash_sec;
> ?extern unsigned int boot_flash_type;
> ?#endif
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +/*----------------------------------------------------------------------------
> + * SMSC9115 Ethernet from SMSC9118 family
> + *----------------------------------------------------------------------------
> + */
> +
> +#define CONFIG_NET_MULTI
> +#define CONFIG_SMC911X ? ? ? ? 1
> +#define CONFIG_SMC911X_32_BIT
> +#define CONFIG_SMC911X_BASE ? ? 0x2C000000
> +
> +#endif /* (CONFIG_CMD_NET) */
> +
> +
> ?#endif ? ? ? ? ? ? ? ? ? ? ? ? /* __CONFIG_H */
>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-11 20:47 [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
2009-09-12 5:25 ` Dirk Behme
2009-09-13 19:41 ` Steve Sakoman
@ 2009-09-22 19:41 ` Wolfgang Denk
2009-09-22 20:34 ` Olof Johansson
2009-09-23 14:55 ` [U-Boot] [PATCH v2] " Olof Johansson
3 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 19:41 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <20090911204750.GA22246@lixom.net> you wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> Based on the omap3 evm code. I added a new highlevel define for Tobi
> to avoid having it dependent on CMD_NET (which would seem backward in
> this case).
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index dd6d286..4a67360 100644
Please use "git format-patch" / "git send-email" to create and submit
patches. For example, it is always nice to see a file statistics in
the patch.
> --- a/board/overo/overo.h
> +++ b/board/overo/overo.h
> @@ -33,6 +33,8 @@ const omap3_sysinfo sysinfo = {
> #endif
> };
>
> +static void setup_net_chip(void);
> +
> /*
> * IEN - Input Enable
> * IDIS - Input Disable
> @@ -378,4 +380,42 @@ const omap3_sysinfo sysinfo = {
> MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
> MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +#define MUX_OVERO_TOBI() \
> + MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)) /*GPMC_A1*/\
> + MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)) /*GPMC_A2*/\
> + MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)) /*GPMC_A3*/\
> + MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)) /*GPMC_A4*/\
> + MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)) /*GPMC_A5*/\
> + MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)) /*GPMC_A6*/\
> + MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)) /*GPMC_A7*/\
> + MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)) /*GPMC_A8*/\
> + MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)) /*GPMC_A9*/\
> + MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)) /*GPMC_A10*/\
> + MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)) /*GPMC_D0*/\
> + MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)) /*GPMC_D1*/\
> + MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)) /*GPMC_D2*/\
> + MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)) /*GPMC_D3*/\
> + MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)) /*GPMC_D4*/\
> + MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)) /*GPMC_D5*/\
> + MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)) /*GPMC_D6*/\
> + MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)) /*GPMC_D7*/\
> + MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)) /*GPMC_D8*/\
> + MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)) /*GPMC_D9*/\
> + MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)) /*GPMC_D10*/\
> + MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)) /*GPMC_D11*/\
> + MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)) /*GPMC_D12*/\
> + MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)) /*GPMC_D13*/\
> + MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)) /*GPMC_D14*/\
> + MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) /*GPMC_D15*/\
> + MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) /*GPMC_nCS5*/\
> + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
> + MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
> + /* - SMSC911X_NRES*/\
> + MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
> + /* - LAN_INTR */\
Please use either no indentatioin at all, or indent by a multiple of
TAB characters.
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 07a031b..6616b55 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -28,7 +28,8 @@
> #define CONFIG_OMAP 1 /* in a TI OMAP core */
> #define CONFIG_OMAP34XX 1 /* which is a 34XX */
> #define CONFIG_OMAP3430 1 /* which is in a 3430 */
> -#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> +#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> +//#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
Please do not use an C++ comments, and do not add dead code.
> +#if !defined(CONFIG_OMAP3_OVERO_TOBI)
> +#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
> +#endif
> +
> +
Only one blank line, please.
> +#endif /* (CONFIG_CMD_NET) */
> +
> +
Ditto.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When some people discover the truth, they just can't understand why
everybody isn't eager to hear it.
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-12 15:16 ` Paulraj, Sandeep
2009-09-12 17:18 ` Olof Johansson
@ 2009-09-22 19:44 ` Wolfgang Denk
1 sibling, 0 replies; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 19:44 UTC (permalink / raw)
To: u-boot
Dear "Paulraj, Sandeep",
In message <0554BEF07D437848AF01B9C9B5F0BC5D92708B0A@dlee01.ent.ti.com> you wrote:
>
> > Olof Johansson wrote:
> > > Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > > over tftp.
> > >
> > > Based on the omap3 evm code. I added a new highlevel define for Tobi
> > > to avoid having it dependent on CMD_NET (which would seem backward in
> > > this case).
> > >
> > > Signed-off-by: Olof Johansson <olof@lixom.net>
> >
> > Acked-by: Dirk Behme <dirk.behme@googlemail.com>
>
> Pushed to u-boot-ti
Sorry, please see my previous review comments. I apologize for the
late review.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Diplomacy is the art of saying "nice doggy" until you can find a rock.
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-12 17:18 ` Olof Johansson
2009-09-12 17:33 ` Paulraj, Sandeep
@ 2009-09-22 19:48 ` Wolfgang Denk
2009-09-22 20:13 ` Olof Johansson
2009-09-22 21:47 ` Tom
1 sibling, 2 replies; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 19:48 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <CAE3D950-824B-47DD-A9E3-D090AC081BBD@lixom.net> you wrote:
>
> Random question on u-boot development process: I see you didn't add
> your signed-off on the commit. People don't do that when they check in
> patches to the u-boot trees?
No, we don't do this if we check in an unchanged patch.
Linus does not S-o-b all patches that go into the Linux kernel, or
does he?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"What the scientists have in their briefcases is terrifying."
- Nikita Khrushchev
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-13 17:22 ` Ben Warren
2009-09-13 19:11 ` Paulraj, Sandeep
@ 2009-09-22 19:50 ` Wolfgang Denk
2009-09-22 20:12 ` Olof Johansson
1 sibling, 1 reply; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 19:50 UTC (permalink / raw)
To: u-boot
Dear Ben Warren,
In message <f8328f7c0909131022t700abe65p5083bdc3c4630e0f@mail.gmail.com> you wrote:
>
> > I always use 'git am -s', which adds the SOB. My understanding is that
> maintainers should do this as an indication of approval and help in
> traceability.
Please feel free to do that, but I consider this just adding
line-noise, unless you _really_ express special approval.
Which sense would it make if I added a s-o-b to each and every commit
I'm pulling in from anywhere?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Man is the best computer we can put aboard a spacecraft ... and the
only one that can be mass produced with unskilled labor.
- Wernher von Braun
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-13 19:11 ` Paulraj, Sandeep
@ 2009-09-22 19:51 ` Wolfgang Denk
0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 19:51 UTC (permalink / raw)
To: u-boot
Dear "Paulraj, Sandeep",
In message <0554BEF07D437848AF01B9C9B5F0BC5D91E07BE1@dlee01.ent.ti.com> you wrote:
>
> > I always use 'git am -s', which adds the SOB. My understanding is that maintainers should do this as an indication of approval and help in traceability.
>
> OK Thanks. Shall do so henceforth.
Hm. I have to amit that I don't consider this a change to the better.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No man knows what true happiness is until he gets married. By then,
of course, its too late.
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 19:50 ` Wolfgang Denk
@ 2009-09-22 20:12 ` Olof Johansson
2009-09-22 21:28 ` Wolfgang Denk
0 siblings, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-22 20:12 UTC (permalink / raw)
To: u-boot
On Sep 22, 2009, at 2:50 PM, Wolfgang Denk wrote:
> Dear Ben Warren,
>
> In message <f8328f7c0909131022t700abe65p5083bdc3c4630e0f@mail.gmail.com
> > you wrote:
>>
>>> I always use 'git am -s', which adds the SOB. My understanding
>>> is that
>> maintainers should do this as an indication of approval and help in
>> traceability.
>
> Please feel free to do that, but I consider this just adding
> line-noise, unless you _really_ express special approval.
>
> Which sense would it make if I added a s-o-b to each and every commit
> I'm pulling in from anywhere?
You're not pulling it, you are applying it. And the s-o-b is used to
show the paper trail of who has touched it. So all you should need to
backtrack the source of the code change is the list of the s-o-bs.
S-o-b is not an approval of the technical merits of the change. It's a
pure bookkeeping measure to tell where a piece of code came from and
who handled it on the way.
BUT in addition to this it's really useful for a newbie like me to see
who to send a patch to, since it shows the list of maintainership (up
to the first person that submits his work through git pulls, but that
seems nonexistent for non-maintainers in u-boot anyway :)
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 19:48 ` Wolfgang Denk
@ 2009-09-22 20:13 ` Olof Johansson
2009-09-22 21:32 ` Wolfgang Denk
2009-09-22 21:47 ` Tom
1 sibling, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-22 20:13 UTC (permalink / raw)
To: u-boot
On Sep 22, 2009, at 2:48 PM, Wolfgang Denk wrote:
> Dear Olof Johansson,
>
> In message <CAE3D950-824B-47DD-A9E3-D090AC081BBD@lixom.net> you wrote:
>>
>> Random question on u-boot development process: I see you didn't add
>> your signed-off on the commit. People don't do that when they check
>> in
>> patches to the u-boot trees?
>
> No, we don't do this if we check in an unchanged patch.
>
> Linus does not S-o-b all patches that go into the Linux kernel, or
> does he?
He does.
For example, see http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e258b80e691f1f3ae83a60aa80eaf7322bd55ec4
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 19:41 ` Wolfgang Denk
@ 2009-09-22 20:34 ` Olof Johansson
2009-09-22 21:34 ` Wolfgang Denk
0 siblings, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-22 20:34 UTC (permalink / raw)
To: u-boot
On Tue, Sep 22, 2009 at 09:41:42PM +0200, Wolfgang Denk wrote:
> Please use "git format-patch" / "git send-email" to create and submit
> patches. For example, it is always nice to see a file statistics in
> the patch.
k.
> > + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
> > + MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
> > + /* - SMSC911X_NRES*/\
> > + MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
> > + /* - LAN_INTR */\
>
> Please use either no indentatioin at all, or indent by a multiple of
> TAB characters.
So no aligning with spaces at the end of a run of tabs to make them line
up? Ok, if you prefer so.
> > diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> > index 07a031b..6616b55 100644
> > --- a/include/configs/omap3_overo.h
> > +++ b/include/configs/omap3_overo.h
> > @@ -28,7 +28,8 @@
> > #define CONFIG_OMAP 1 /* in a TI OMAP core */
> > #define CONFIG_OMAP34XX 1 /* which is a 34XX */
> > #define CONFIG_OMAP3430 1 /* which is in a 3430 */
> > -#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> > +#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> > +//#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
>
> Please do not use an C++ comments, and do not add dead code.
What is the preferred way to show that the option is available but not enabled
by default?
> > +#if !defined(CONFIG_OMAP3_OVERO_TOBI)
> > +#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
> > +#endif
> > +
> > +
>
> Only one blank line, please.
>
> > +#endif /* (CONFIG_CMD_NET) */
> > +
> > +
>
> Ditto.
Sure (on both).
This patch has been applied and pulled though. I'll submit an incremental patch to address the above.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 20:12 ` Olof Johansson
@ 2009-09-22 21:28 ` Wolfgang Denk
2009-09-22 21:33 ` Olof Johansson
0 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:28 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <C6505381-97AC-4E05-9CCA-6089F69964D6@gmail.com> you wrote:
>
> > Please feel free to do that, but I consider this just adding
> > line-noise, unless you _really_ express special approval.
> >
> > Which sense would it make if I added a s-o-b to each and every commit
> > I'm pulling in from anywhere?
>
> You're not pulling it, you are applying it. And the s-o-b is used to
> show the paper trail of who has touched it. So all you should need to
> backtrack the source of the code change is the list of the s-o-bs.
What is the difference between a "git pull" from some remote repo
and the "git am" of a patch posted on the mailing list? In both cases
I do _not_ touch the patch, and the result looks the same, too.
> S-o-b is not an approval of the technical merits of the change. It's a
> pure bookkeeping measure to tell where a piece of code came from and
> who handled it on the way.
If the "handling" is just a technical operation which does not modify
a single bit of the content I see no reason to add lines of s-o-b.
Hey, I use several stages of repositories, and a number or branches
here and there. Should I every time I pull from here or cherry-pick
from there or format-patch + am somewhere else add a s-o-b? This makes
zero sense to me.
> BUT in addition to this it's really useful for a newbie like me to see
> who to send a patch to, since it shows the list of maintainership (up
> to the first person that submits his work through git pulls, but that
> seems nonexistent for non-maintainers in u-boot anyway :)
Did you try looking at the list of custodians?
http://www.denx.de/wiki/U-Boot/Custodians
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It usually takes more than three weeks to prepare a good impromptu
speech. - Mark Twain
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 20:13 ` Olof Johansson
@ 2009-09-22 21:32 ` Wolfgang Denk
2009-09-22 21:34 ` Olof Johansson
2009-09-22 21:37 ` Jean-Christian de Rivaz
0 siblings, 2 replies; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:32 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <3C828E04-9CB1-4CCF-AD61-904F8956F575@gmail.com> you wrote:
>
> > Linus does not S-o-b all patches that go into the Linux kernel, or
> > does he?
>
> He does.
No, he does not.
> For example, see http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e258b80e691f1f3ae83a60aa80eaf7322bd55ec4
See for example
5ac7687860dbfd3dd90e09d2c10dd31de91f20c2
a0f320f48799f67329fcb1b26ff0451c304e1dde
83ba7c34d2b82dc608647f629616df393ab883f9
97572751d78133cf9a5f7165b252bf975f9dd17d
067006a5f5b956fbdd183f9b799e7b8059b53f6c
b21495a03e20514eacd788a6b5d160667177cd94
56327c2a58b76291616f15c9c84a180cf7049645
6d6c971778c5257fc815e1ebe01779fefda6293c
98840f2ce5339d46e1830b0455360ad03a840d9d
39558c8f8e4c48805e702340e1610961d922268a
fcf989216138858003f0c354698260f29e6e10b0
144374dcc3ad0436f0a1bb3095836cf0ec32eebe
edf382bc6d4429d796fc3b26f7a33eaeca9db8ec
4765d681a4dccdc6ded7dd20329f5498aa53b0d0
5d3f33318a6c1f79f89e3dd2c7ddc11e0da14895
b0999cc55bd49e315ec82d2fb770a0d9ef7cbed8
7bd032dc2793afcbaf4a350056768da84cdbd89b
320348c8d5c9b591282633ddb8959b42f7fc7a1c
ff8324df1187b7280e507c976777df76c73a1ef1
74556123e034c8337b69a3ebac2f3a5fc0a97032
...
Let me know if you need more :-)
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The price of curiosity is a terminal experience.
- Terry Pratchett, _The Dark Side of the Sun_
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:28 ` Wolfgang Denk
@ 2009-09-22 21:33 ` Olof Johansson
2009-09-22 21:42 ` Wolfgang Denk
0 siblings, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-22 21:33 UTC (permalink / raw)
To: u-boot
On Sep 22, 2009, at 4:28 PM, Wolfgang Denk wrote:
> Dear Olof Johansson,
>
> In message <C6505381-97AC-4E05-9CCA-6089F69964D6@gmail.com> you wrote:
>>
>>> Please feel free to do that, but I consider this just adding
>>> line-noise, unless you _really_ express special approval.
>>>
>>> Which sense would it make if I added a s-o-b to each and every
>>> commit
>>> I'm pulling in from anywhere?
>>
>> You're not pulling it, you are applying it. And the s-o-b is used to
>> show the paper trail of who has touched it. So all you should need to
>> backtrack the source of the code change is the list of the s-o-bs.
>
> What is the difference between a "git pull" from some remote repo
> and the "git am" of a patch posted on the mailing list? In both cases
> I do _not_ touch the patch, and the result looks the same, too.
>
>> S-o-b is not an approval of the technical merits of the change.
>> It's a
>> pure bookkeeping measure to tell where a piece of code came from and
>> who handled it on the way.
>
> If the "handling" is just a technical operation which does not modify
> a single bit of the content I see no reason to add lines of s-o-b.
> Hey, I use several stages of repositories, and a number or branches
> here and there. Should I every time I pull from here or cherry-pick
> from there or format-patch + am somewhere else add a s-o-b? This makes
> zero sense to me.
I guess you don't see what the difference between applying a patch and
pulling a tree is.
Anyway, it really doesn't matter much to me, it just confused me. It's
your project and you can do with it as you please, there's no use in
arguing over it. It just happens to be opposite to the principle of
another large project using similar signed-off methods.
>> BUT in addition to this it's really useful for a newbie like me to
>> see
>> who to send a patch to, since it shows the list of maintainership (up
>> to the first person that submits his work through git pulls, but that
>> seems nonexistent for non-maintainers in u-boot anyway :)
>
> Did you try looking at the list of custodians?
> http://www.denx.de/wiki/U-Boot/Custodians
I'm not saying there aren't other ways to do it, just that it's the
one that made sense for me: Look at other files near where you are
changing, and see the merge path.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:32 ` Wolfgang Denk
@ 2009-09-22 21:34 ` Olof Johansson
2009-09-22 21:45 ` Wolfgang Denk
2009-09-22 21:37 ` Jean-Christian de Rivaz
1 sibling, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-22 21:34 UTC (permalink / raw)
To: u-boot
On Sep 22, 2009, at 4:32 PM, Wolfgang Denk wrote:
> 56327c2a58b76291616f15c9c84a180cf7049645
committer Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Sun, 20 Sep 2009 10:32:20 +0000 (15:32 +0530)
He didn't commit it.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 20:34 ` Olof Johansson
@ 2009-09-22 21:34 ` Wolfgang Denk
2009-09-22 21:36 ` Olof Johansson
0 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:34 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <20090922203431.GA14113@lixom.net> you wrote:
>
> > > + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
> > > + MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
> > > + /* - SMSC911X_NRES*/\
> > > + MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
> > > + /* - LAN_INTR */\
> >
> > Please use either no indentatioin at all, or indent by a multiple of
> > TAB characters.
>
> So no aligning with spaces at the end of a run of tabs to make them line
> up? Ok, if you prefer so.
I was referring to the initial blank at the very beginning of the
line.
> > Please do not use an C++ comments, and do not add dead code.
>
> What is the preferred way to show that the option is available but not enabled
> by default?
Use a C comment, if you must.
> This patch has been applied and pulled though. I'll submit an incremental patch to address the above.
No, please submit a new version which also incorporates the cleanup
patches by Dirk.
I will not pull the current version.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
That's their goal, remember, a goal that's really contrary to that of
the programmer or administrator. We just want to get our jobs done.
$Bill just wants to become $$Bill. These aren't even marginallly
congruent.
-- Tom Christiansen in <6jhtqk$qls$1@csnews.cs.colorado.edu>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:34 ` Wolfgang Denk
@ 2009-09-22 21:36 ` Olof Johansson
2009-09-22 21:49 ` Wolfgang Denk
0 siblings, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-22 21:36 UTC (permalink / raw)
To: u-boot
On Sep 22, 2009, at 4:34 PM, Wolfgang Denk wrote:
> Dear Olof Johansson,
>
> In message <20090922203431.GA14113@lixom.net> you wrote:
>>
>>>> + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
>>>> + MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
>>>> + /* - SMSC911X_NRES*/\
>>>> + MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
>>>> + /* - LAN_INTR */\
>>>
>>> Please use either no indentatioin at all, or indent by a multiple of
>>> TAB characters.
>>
>> So no aligning with spaces at the end of a run of tabs to make them
>> line
>> up? Ok, if you prefer so.
>
> I was referring to the initial blank at the very beginning of the
> line.
Ah, crap. Thanks.
>
>>> Please do not use an C++ comments, and do not add dead code.
>>
>> What is the preferred way to show that the option is available but
>> not enabled
>> by default?
>
> Use a C comment, if you must.
>
>> This patch has been applied and pulled though. I'll submit an
>> incremental patch to address the above.
>
> No, please submit a new version which also incorporates the cleanup
> patches by Dirk.
I didn't see those, since I wasn't cc:d.
> I will not pull the current version.
So much for delegating maintainership. :)
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:32 ` Wolfgang Denk
2009-09-22 21:34 ` Olof Johansson
@ 2009-09-22 21:37 ` Jean-Christian de Rivaz
1 sibling, 0 replies; 74+ messages in thread
From: Jean-Christian de Rivaz @ 2009-09-22 21:37 UTC (permalink / raw)
To: u-boot
Wolfgang Denk a ?crit :
> Dear Olof Johansson,
>
> In message <3C828E04-9CB1-4CCF-AD61-904F8956F575@gmail.com> you wrote:
>>> Linus does not S-o-b all patches that go into the Linux kernel, or
>>> does he?
>> He does.
>
> No, he does not.
Maybe not so off-tropic, Linus have talked precisely about that today:
http://www.tuxradar.com/content/linuxcon-rountable-torvalds-quotes
On documentation:
?In the kernel we have this sign-off process, where patches as they flow
through people are supposed to be signed off. And we had legal reasons
for doing it initially, and the legal reasons have kind of gone away
because nobody worries about SCO very much anymore. But it turns out
it?s a really nice flow process, where people actually see how code came
in, so it?s nice, and I?m seeing that in a number of non-kernel projects
too. So I think there may not be a lot of documentation about how the
kernel does it, but I think a lot of open source people do see the
kernel model and it actually ends up being, the same way there?s this
Unix mindset of how things are supposed to work, I think the kernel
model has actually become this mindset of how open source projects are
supposed to work, at least for a subset of projects out there.?
Best regards,
Jean-Christian de Rivaz
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:33 ` Olof Johansson
@ 2009-09-22 21:42 ` Wolfgang Denk
0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:42 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <FBC6ADC7-D76B-4186-9E13-889041453B5F@gmail.com> you wrote:
>
> I guess you don't see what the difference between applying a patch and
> pulling a tree is.
Indeed I don't. Isn't pulling a tree the same as applying a number of
patches using soem highly efficient command?
> Anyway, it really doesn't matter much to me, it just confused me. It's
> your project and you can do with it as you please, there's no use in
> arguing over it. It just happens to be opposite to the principle of
> another large project using similar signed-off methods.
Well, I'm willing to learn, but I'm an old man and a pighead at that.
I need good reason to change my mind, and so far I really see none.
If you could help this will be appreciated.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Leave bigotry in your quarters; there's no room for it on the bridge.
-- Kirk, "Balance of Terror", stardate 1709.2
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:34 ` Olof Johansson
@ 2009-09-22 21:45 ` Wolfgang Denk
0 siblings, 0 replies; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:45 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <00AA7A76-7FE3-440E-ACBB-0D7FDCD4C8DA@gmail.com> you wrote:
>
> On Sep 22, 2009, at 4:32 PM, Wolfgang Denk wrote:
>
> > 56327c2a58b76291616f15c9c84a180cf7049645
>
> committer Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> Sun, 20 Sep 2009 10:32:20 +0000 (15:32 +0530)
>
> He didn't commit it.
So?
What is the difference between a "cd here ; git pull there" and a
"git format-patch" there followed by a "git am" here?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The computer programmer is a creator of universes for which he alone
is responsible. Universes of virtually unlimited complexity can be
created in the form of computer programs." - Joseph Weizenbaum,
_Computer Power and Human Reason_
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 19:48 ` Wolfgang Denk
2009-09-22 20:13 ` Olof Johansson
@ 2009-09-22 21:47 ` Tom
1 sibling, 0 replies; 74+ messages in thread
From: Tom @ 2009-09-22 21:47 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
> Dear Olof Johansson,
>
> In message <CAE3D950-824B-47DD-A9E3-D090AC081BBD@lixom.net> you wrote:
>> Random question on u-boot development process: I see you didn't add
>> your signed-off on the commit. People don't do that when they check in
>> patches to the u-boot trees?
>
> No, we don't do this if we check in an unchanged patch.
>
> Linus does not S-o-b all patches that go into the Linux kernel, or
> does he?
>
This cracks me up.
When is being a SOB ever good? :P
Tom
>
>
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:36 ` Olof Johansson
@ 2009-09-22 21:49 ` Wolfgang Denk
2009-09-22 21:52 ` Olof Johansson
0 siblings, 1 reply; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-22 21:49 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <CC2DD232-01B8-4587-AD41-E6F2D9B2C9DF@lixom.net> you wrote:
>
> > No, please submit a new version which also incorporates the cleanup
> > patches by Dirk.
>
> I didn't see those, since I wasn't cc:d.
See the ML archive, then.
> > I will not pull the current version.
>
> So much for delegating maintainership. :)
Heh. We just introduced these new custodians, _and_ I didn't find time
for reviewing soon enough. That's just an unlucky coincidence.
[Hm... not to mention that sometimes I do enjoy being able to have the
last word.]
[[Please don't tell my wife, though. :-) ]]
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When all is said and done, more is said than done.
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support
2009-09-22 21:49 ` Wolfgang Denk
@ 2009-09-22 21:52 ` Olof Johansson
0 siblings, 0 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-22 21:52 UTC (permalink / raw)
To: u-boot
On Sep 22, 2009, at 4:49 PM, Wolfgang Denk wrote:
> Dear Olof Johansson,
>
> In message <CC2DD232-01B8-4587-AD41-E6F2D9B2C9DF@lixom.net> you wrote:
>>
>>> No, please submit a new version which also incorporates the cleanup
>>> patches by Dirk.
>>
>> I didn't see those, since I wasn't cc:d.
>
> See the ML archive, then.
Yep, no problem.
>>> I will not pull the current version.
>>
>> So much for delegating maintainership. :)
>
> Heh. We just introduced these new custodians, _and_ I didn't find time
> for reviewing soon enough. That's just an unlucky coincidence.
>
> [Hm... not to mention that sometimes I do enjoy being able to have the
> last word.]
>
> [[Please don't tell my wife, though. :-) ]]
:-) No worries.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-11 20:47 [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
` (2 preceding siblings ...)
2009-09-22 19:41 ` Wolfgang Denk
@ 2009-09-23 14:55 ` Olof Johansson
2009-09-23 18:39 ` Tom
` (3 more replies)
3 siblings, 4 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-23 14:55 UTC (permalink / raw)
To: u-boot
Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
over tftp.
Based on the omap3 evm code. I added a new highlevel define for Tobi
to avoid having it dependent on CMD_NET (which would seem backward in
this case).
Signed-off-by: Olof Johansson <olof@lixom.net>
---
This version of the patch fixes whitespace comments from WD, and includes
fixes for the build warnings that Dirk's patch also silenced.
board/overo/overo.c | 62 +++++++++++++++++++++++++++++++++++++++++
board/overo/overo.h | 37 ++++++++++++++++++++++++
include/configs/omap3_overo.h | 23 ++++++++++++++-
3 files changed, 120 insertions(+), 2 deletions(-)
diff --git a/board/overo/overo.c b/board/overo/overo.c
index dd6d286..7d87e52 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -29,13 +29,19 @@
* MA 02111-1307 USA
*/
#include <common.h>
+#include <netdev.h>
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
+#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
#include <asm/mach-types.h>
#include "overo.h"
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+static void setup_net_chip(void);
+#endif
+
/*
* Routine: board_init
* Description: Early hardware init.
@@ -62,6 +68,10 @@ int misc_init_r(void)
twl4030_power_init();
twl4030_led_init();
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+ setup_net_chip();
+#endif
+
dieid_num_r();
return 0;
@@ -76,4 +86,56 @@ int misc_init_r(void)
void set_muxconf_regs(void)
{
MUX_OVERO();
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+ MUX_OVERO_TOBI();
+#endif
+}
+
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+/*
+ * Routine: setup_net_chip
+ * Description: Setting up the configuration GPMC registers specific to the
+ * Ethernet hardware.
+ */
+static void setup_net_chip(void)
+{
+ struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
+ struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
+
+ /* Configure GPMC registers */
+ writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
+ writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
+ writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
+ writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
+ writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
+ writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
+ writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
+
+ /* 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);
+
+ /* Make GPIO 64 as output pin */
+ writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
+
+ /* Now send a pulse on the GPIO pin */
+ writel(GPIO0, &gpio3_base->setdataout);
+ udelay(1);
+ writel(GPIO0, &gpio3_base->cleardataout);
+ udelay(1);
+ writel(GPIO0, &gpio3_base->setdataout);
+}
+#endif
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_SMC911X
+ rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+#endif
+ return rc;
}
diff --git a/board/overo/overo.h b/board/overo/overo.h
index d9fe74e..48d58f2 100644
--- a/board/overo/overo.h
+++ b/board/overo/overo.h
@@ -378,4 +378,41 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+#define MUX_OVERO_TOBI() \
+ MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)) /*GPMC_A1*/\
+ MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)) /*GPMC_A2*/\
+ MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)) /*GPMC_A3*/\
+ MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)) /*GPMC_A4*/\
+ MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)) /*GPMC_A5*/\
+ MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)) /*GPMC_A6*/\
+ MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)) /*GPMC_A7*/\
+ MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)) /*GPMC_A8*/\
+ MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)) /*GPMC_A9*/\
+ MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)) /*GPMC_A10*/\
+ MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)) /*GPMC_D0*/\
+ MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)) /*GPMC_D1*/\
+ MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)) /*GPMC_D2*/\
+ MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)) /*GPMC_D3*/\
+ MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)) /*GPMC_D4*/\
+ MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)) /*GPMC_D5*/\
+ MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)) /*GPMC_D6*/\
+ MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)) /*GPMC_D7*/\
+ MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)) /*GPMC_D8*/\
+ MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)) /*GPMC_D9*/\
+ MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)) /*GPMC_D10*/\
+ MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)) /*GPMC_D11*/\
+ MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)) /*GPMC_D12*/\
+ MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)) /*GPMC_D13*/\
+ MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)) /*GPMC_D14*/\
+ MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) /*GPMC_D15*/\
+ MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) /*GPMC_nCS5*/\
+ MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
+ MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
+ /* - SMSC911X_NRES*/\
+ MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
+ /* - LAN_INTR */
+
+#endif
+
#endif
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 07a031b..3faf756 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -28,7 +28,10 @@
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
-#define CONFIG_OMAP3_OVERO 1 /* working with overo */
+#define CONFIG_OMAP3_OVERO 1 /* working with overo */
+
+/* Change the below line to define 1 if you want ethernet on Tobi */
+#undef CONFIG_OMAP3_OVERO_TOBI /* overo mounted on tobi */
#include <asm/arch/cpu.h> /* get chip and board defs */
#include <asm/arch/omap3.h>
@@ -105,9 +108,12 @@
#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
+#if !defined(CONFIG_OMAP3_OVERO_TOBI)
+#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
+#endif
+
#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_I2C_SPEED 100000
#define CONFIG_SYS_I2C_SLAVE 1
@@ -293,4 +299,17 @@ extern unsigned int boot_flash_sec;
extern unsigned int boot_flash_type;
#endif
+#if defined(CONFIG_OMAP3_OVERO_TOBI)
+/*----------------------------------------------------------------------------
+ * SMSC9115 Ethernet from SMSC9118 family
+ *----------------------------------------------------------------------------
+ */
+
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC911X 1
+#define CONFIG_SMC911X_32_BIT
+#define CONFIG_SMC911X_BASE 0x2C000000
+
+#endif /* (CONFIG_CMD_NET) */
+
#endif /* __CONFIG_H */
--
1.6.0.4
^ permalink raw reply related [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 14:55 ` [U-Boot] [PATCH v2] " Olof Johansson
@ 2009-09-23 18:39 ` Tom
2009-09-23 18:43 ` Olof Johansson
2009-09-24 17:32 ` Tom
` (2 subsequent siblings)
3 siblings, 1 reply; 74+ messages in thread
From: Tom @ 2009-09-23 18:39 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> Based on the omap3 evm code. I added a new highlevel define for Tobi
> to avoid having it dependent on CMD_NET (which would seem backward in
> this case).
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> ---
>
> This version of the patch fixes whitespace comments from WD, and includes
> fixes for the build warnings that Dirk's patch also silenced.
>
>
> board/overo/overo.c | 62 +++++++++++++++++++++++++++++++++++++++++
> board/overo/overo.h | 37 ++++++++++++++++++++++++
> include/configs/omap3_overo.h | 23 ++++++++++++++-
> 3 files changed, 120 insertions(+), 2 deletions(-)
>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index dd6d286..7d87e52 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -29,13 +29,19 @@
> * MA 02111-1307 USA
> */
> #include <common.h>
> +#include <netdev.h>
> #include <twl4030.h>
> #include <asm/io.h>
> #include <asm/arch/mux.h>
> +#include <asm/arch/mem.h>
> #include <asm/arch/sys_proto.h>
> #include <asm/mach-types.h>
> #include "overo.h"
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +static void setup_net_chip(void);
> +#endif
> +
> /*
> * Routine: board_init
> * Description: Early hardware init.
> @@ -62,6 +68,10 @@ int misc_init_r(void)
> twl4030_power_init();
> twl4030_led_init();
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + setup_net_chip();
> +#endif
> +
> dieid_num_r();
>
> return 0;
> @@ -76,4 +86,56 @@ int misc_init_r(void)
> void set_muxconf_regs(void)
> {
> MUX_OVERO();
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + MUX_OVERO_TOBI();
> +#endif
> +}
> +
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +/*
> + * Routine: setup_net_chip
> + * Description: Setting up the configuration GPMC registers specific to the
> + * Ethernet hardware.
> + */
> +static void setup_net_chip(void)
> +{
> + struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
> + struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
> +
> + /* Configure GPMC registers */
> + writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
> + writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
> + writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
> + writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
> + writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
> + writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
> + writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
> +
> + /* 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);
> +
> + /* Make GPIO 64 as output pin */
> + writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
> +
> + /* Now send a pulse on the GPIO pin */
> + writel(GPIO0, &gpio3_base->setdataout);
> + udelay(1);
> + writel(GPIO0, &gpio3_base->cleardataout);
> + udelay(1);
> + writel(GPIO0, &gpio3_base->setdataout);
Use the omap gpio interface described in README.omap3
Tom
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 18:39 ` Tom
@ 2009-09-23 18:43 ` Olof Johansson
2009-09-23 19:16 ` Wolfgang Denk
2009-09-24 0:34 ` Nishanth Menon
0 siblings, 2 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-23 18:43 UTC (permalink / raw)
To: u-boot
On Sep 23, 2009, at 1:39 PM, Tom wrote:
> Olof Johansson wrote:
>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>> over tftp.
>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>> to avoid having it dependent on CMD_NET (which would seem backward in
>> this case).
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>> ---
>> This version of the patch fixes whitespace comments from WD, and
>> includes
>> fixes for the build warnings that Dirk's patch also silenced.
>> board/overo/overo.c | 62 +++++++++++++++++++++++++++++++
>> ++++++++++
>> board/overo/overo.h | 37 ++++++++++++++++++++++++
>> include/configs/omap3_overo.h | 23 ++++++++++++++-
>> 3 files changed, 120 insertions(+), 2 deletions(-)
>> diff --git a/board/overo/overo.c b/board/overo/overo.c
>> index dd6d286..7d87e52 100644
>> --- a/board/overo/overo.c
>> +++ b/board/overo/overo.c
>> @@ -29,13 +29,19 @@
>> * MA 02111-1307 USA
>> */
>> #include <common.h>
>> +#include <netdev.h>
>> #include <twl4030.h>
>> #include <asm/io.h>
>> #include <asm/arch/mux.h>
>> +#include <asm/arch/mem.h>
>> #include <asm/arch/sys_proto.h>
>> #include <asm/mach-types.h>
>> #include "overo.h"
>> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
>> +static void setup_net_chip(void);
>> +#endif
>> +
>> /*
>> * Routine: board_init
>> * Description: Early hardware init.
>> @@ -62,6 +68,10 @@ int misc_init_r(void)
>> twl4030_power_init();
>> twl4030_led_init();
>> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
>> + setup_net_chip();
>> +#endif
>> +
>> dieid_num_r();
>> return 0;
>> @@ -76,4 +86,56 @@ int misc_init_r(void)
>> void set_muxconf_regs(void)
>> {
>> MUX_OVERO();
>> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
>> + MUX_OVERO_TOBI();
>> +#endif
>> +}
>> +
>> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
>> +/*
>> + * Routine: setup_net_chip
>> + * Description: Setting up the configuration GPMC registers
>> specific to the
>> + * Ethernet hardware.
>> + */
>> +static void setup_net_chip(void)
>> +{
>> + struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
>> + struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
>> +
>> + /* Configure GPMC registers */
>> + writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
>> + writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
>> + writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
>> + writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
>> + writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
>> + writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
>> + writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
>> +
>> + /* 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);
>> +
>> + /* Make GPIO 64 as output pin */
>> + writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
>> +
>> + /* Now send a pulse on the GPIO pin */
>> + writel(GPIO0, &gpio3_base->setdataout);
>> + udelay(1);
>> + writel(GPIO0, &gpio3_base->cleardataout);
>> + udelay(1);
>> + writel(GPIO0, &gpio3_base->setdataout);
>
> Use the omap gpio interface described in README.omap3
>
Seriously, this code is a 1:1 replica from the evm code. Obviously
that code was good enough to merge.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 18:43 ` Olof Johansson
@ 2009-09-23 19:16 ` Wolfgang Denk
2009-09-23 20:29 ` Olof Johansson
2009-09-24 0:34 ` Nishanth Menon
1 sibling, 1 reply; 74+ messages in thread
From: Wolfgang Denk @ 2009-09-23 19:16 UTC (permalink / raw)
To: u-boot
Dear Olof Johansson,
In message <1D0F4997-6AF4-4BC3-94C3-0817551DBA84@lixom.net> you wrote:
...
> > Use the omap gpio interface described in README.omap3
>
> Seriously, this code is a 1:1 replica from the evm code. Obviously
> that code was good enough to merge.
Isn't this godd? It means that we learn from previous mistakes, and
strive not to repeat them.
Patches to cleanup the evm code are welcome, too.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q: What's a light-year?
A: One-third less calories than a regular year.
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 19:16 ` Wolfgang Denk
@ 2009-09-23 20:29 ` Olof Johansson
2009-09-23 21:00 ` Tom
0 siblings, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-23 20:29 UTC (permalink / raw)
To: u-boot
Hi,
On Sep 23, 2009, at 2:16 PM, Wolfgang Denk wrote:
> Dear Olof Johansson,
>
> In message <1D0F4997-6AF4-4BC3-94C3-0817551DBA84@lixom.net> you wrote:
> ...
>>> Use the omap gpio interface described in README.omap3
>>
>> Seriously, this code is a 1:1 replica from the evm code. Obviously
>> that code was good enough to merge.
>
> Isn't this godd? It means that we learn from previous mistakes, and
> strive not to repeat them.
It's also a bit of "we're holding new contributors to higher standards
than we hold ourselves", alternatively "we can merge crap, and when
others use it as examples we'll make them clean it all up".
So, some of this is OK, I agree. That's why I did the whitespace
cleanup yesterday. But I've reached my limit in this case.
Bottom line: I don't have more time to sink into this fairly trivial
patch, I don't need to get it merged. I'll just carry it myself out of
tree until I get bored enough to revisit it.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 20:29 ` Olof Johansson
@ 2009-09-23 21:00 ` Tom
2009-09-23 23:35 ` Olof Johansson
0 siblings, 1 reply; 74+ messages in thread
From: Tom @ 2009-09-23 21:00 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> Hi,
>
> On Sep 23, 2009, at 2:16 PM, Wolfgang Denk wrote:
>
>> Dear Olof Johansson,
>>
>> In message <1D0F4997-6AF4-4BC3-94C3-0817551DBA84@lixom.net> you wrote:
>> ...
>>>> Use the omap gpio interface described in README.omap3
>>>
>>> Seriously, this code is a 1:1 replica from the evm code. Obviously
>>> that code was good enough to merge.
>>
>> Isn't this godd? It means that we learn from previous mistakes, and
>> strive not to repeat them.
>
> It's also a bit of "we're holding new contributors to higher standards
> than we hold ourselves", alternatively "we can merge crap, and when
> others use it as examples we'll make them clean it all up".
>
> So, some of this is OK, I agree. That's why I did the whitespace cleanup
> yesterday. But I've reached my limit in this case.
>
> Bottom line: I don't have more time to sink into this fairly trivial
> patch, I don't need to get it merged. I'll just carry it myself out of
> tree until I get bored enough to revisit it.
>
Ugh. Sorry.
I was just pointing out that there is a new gpio interface.
I did not clean up all the omap3's when the interface was created
and I do not expect you to do the same. The problem is making big
changes you can not test.
I will make the gpio change as a followup after this is merged if you
can test it for me.
I do not have any other issues.
This ok ?
Tom
>
> -Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 21:00 ` Tom
@ 2009-09-23 23:35 ` Olof Johansson
0 siblings, 0 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-23 23:35 UTC (permalink / raw)
To: u-boot
On Sep 23, 2009, at 4:00 PM, Tom wrote:
> Olof Johansson wrote:
>> Hi,
>> On Sep 23, 2009, at 2:16 PM, Wolfgang Denk wrote:
>>> Dear Olof Johansson,
>>>
>>> In message <1D0F4997-6AF4-4BC3-94C3-0817551DBA84@lixom.net> you
>>> wrote:
>>> ...
>>>>> Use the omap gpio interface described in README.omap3
>>>>
>>>> Seriously, this code is a 1:1 replica from the evm code. Obviously
>>>> that code was good enough to merge.
>>>
>>> Isn't this godd? It means that we learn from previous mistakes, and
>>> strive not to repeat them.
>> It's also a bit of "we're holding new contributors to higher
>> standards than we hold ourselves", alternatively "we can merge
>> crap, and when others use it as examples we'll make them clean it
>> all up".
>> So, some of this is OK, I agree. That's why I did the whitespace
>> cleanup yesterday. But I've reached my limit in this case.
>> Bottom line: I don't have more time to sink into this fairly
>> trivial patch, I don't need to get it merged. I'll just carry it
>> myself out of tree until I get bored enough to revisit it.
>
> Ugh. Sorry.
No worries. Either yours or Wolfgangs cleanup requests alone would
have been fine with me, they just piled up :)
> I was just pointing out that there is a new gpio interface.
> I did not clean up all the omap3's when the interface was created
> and I do not expect you to do the same. The problem is making big
> changes you can not test.
>
> I will make the gpio change as a followup after this is merged if you
> can test it for me.
>
> I do not have any other issues.
>
> This ok ?
>
Quite reasonable. I'm happy to help clean it up too, as I have time
later if you haven't already done it by then.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 18:43 ` Olof Johansson
2009-09-23 19:16 ` Wolfgang Denk
@ 2009-09-24 0:34 ` Nishanth Menon
2009-09-24 0:38 ` Olof Johansson
1 sibling, 1 reply; 74+ messages in thread
From: Nishanth Menon @ 2009-09-24 0:34 UTC (permalink / raw)
To: u-boot
Olof Johansson said the following on 09/23/2009 09:43 PM:
> On Sep 23, 2009, at 1:39 PM, Tom wrote:
>
>
>> Olof Johansson wrote:
>>
>>> diff --git a/board/overo/overo.c b/board/overo/overo.c
>>> index dd6d286..7d87e52 100644
>>> --- a/board/overo/overo.c
>>> +++ b/board/overo/overo.c
>>>
>>> + writel(GPIO0, &gpio3_base->cleardataout);
>>> + udelay(1);
>>> + writel(GPIO0, &gpio3_base->setdataout);
>>>
>> Use the omap gpio interface described in README.omap3
>>
>>
>
> Seriously, this code is a 1:1 replica from the evm code. Obviously
> that code was good enough to merge.
>
should'nt we be fixing evm code instead of moving similar code in for
another platform?
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-24 0:34 ` Nishanth Menon
@ 2009-09-24 0:38 ` Olof Johansson
2009-09-24 1:03 ` Tom
2009-09-24 1:05 ` Nishanth Menon
0 siblings, 2 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-24 0:38 UTC (permalink / raw)
To: u-boot
On Sep 23, 2009, at 7:34 PM, Nishanth Menon wrote:
> Olof Johansson said the following on 09/23/2009 09:43 PM:
>> On Sep 23, 2009, at 1:39 PM, Tom wrote:
>>
>>
>>> Olof Johansson wrote:
>>>
>>>> diff --git a/board/overo/overo.c b/board/overo/overo.c
>>>> index dd6d286..7d87e52 100644
>>>> --- a/board/overo/overo.c
>>>> +++ b/board/overo/overo.c
>>>>
>>>> + writel(GPIO0, &gpio3_base->cleardataout);
>>>> + udelay(1);
>>>> + writel(GPIO0, &gpio3_base->setdataout);
>>>>
>>> Use the omap gpio interface described in README.omap3
>>>
>>>
>>
>> Seriously, this code is a 1:1 replica from the evm code. Obviously
>> that code was good enough to merge.
>>
>
> should'nt we be fixing evm code instead of moving similar code in for
> another platform?
Sure, but you forgot to attach the patch.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-24 0:38 ` Olof Johansson
@ 2009-09-24 1:03 ` Tom
2009-09-24 1:05 ` Nishanth Menon
1 sibling, 0 replies; 74+ messages in thread
From: Tom @ 2009-09-24 1:03 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> On Sep 23, 2009, at 7:34 PM, Nishanth Menon wrote:
>
>> Olof Johansson said the following on 09/23/2009 09:43 PM:
>>> On Sep 23, 2009, at 1:39 PM, Tom wrote:
>>>
>>>
>>>> Olof Johansson wrote:
>>>>
>>>>> diff --git a/board/overo/overo.c b/board/overo/overo.c
>>>>> index dd6d286..7d87e52 100644
>>>>> --- a/board/overo/overo.c
>>>>> +++ b/board/overo/overo.c
>>>>>
>>>>> + writel(GPIO0, &gpio3_base->cleardataout);
>>>>> + udelay(1);
>>>>> + writel(GPIO0, &gpio3_base->setdataout);
>>>>>
>>>> Use the omap gpio interface described in README.omap3
>>>>
>>>>
>>>
>>> Seriously, this code is a 1:1 replica from the evm code. Obviously
>>> that code was good enough to merge.
>>>
>>
>> should'nt we be fixing evm code instead of moving similar code in for
>> another platform?
>
> Sure, but you forgot to attach the patch.
>
;)
Yes the evm should be fixed but...
I think Olof has had enough 'just one mores' ..
The point is to get patch in.
I will add the evm changes to my follow-on if there is someone to
test the changes.
Tom
>
> -Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-24 0:38 ` Olof Johansson
2009-09-24 1:03 ` Tom
@ 2009-09-24 1:05 ` Nishanth Menon
1 sibling, 0 replies; 74+ messages in thread
From: Nishanth Menon @ 2009-09-24 1:05 UTC (permalink / raw)
To: u-boot
Olof Johansson said the following on 09/24/2009 03:38 AM:
> On Sep 23, 2009, at 7:34 PM, Nishanth Menon wrote:
>
>> Olof Johansson said the following on 09/23/2009 09:43 PM:
>>> On Sep 23, 2009, at 1:39 PM, Tom wrote:
>>>
>>>
>>>> Olof Johansson wrote:
>>>>
>>>>> diff --git a/board/overo/overo.c b/board/overo/overo.c
>>>>> index dd6d286..7d87e52 100644
>>>>> --- a/board/overo/overo.c
>>>>> +++ b/board/overo/overo.c
>>>>>
>>>>> + writel(GPIO0, &gpio3_base->cleardataout);
>>>>> + udelay(1);
>>>>> + writel(GPIO0, &gpio3_base->setdataout);
>>>>>
>>>> Use the omap gpio interface described in README.omap3
>>>>
>>>>
>>>
>>> Seriously, this code is a 1:1 replica from the evm code. Obviously
>>> that code was good enough to merge.
>>>
>>
>> should'nt we be fixing evm code instead of moving similar code in for
>> another platform?
>
> Sure, but you forgot to attach the patch.
>
Silly me.. sorry about that.. as you pointed out, I did indeed forget..
need to catch my flight now, and as i dont own an evm, here is the patch
in attachment if someone would care to try it out..
Regards,
Nishanth Menon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001--RFC-OMAP3-EVM-remove-direct-gpio-hits.patch
Type: text/x-diff
Size: 0 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090924/555ff8b1/attachment.patch
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 14:55 ` [U-Boot] [PATCH v2] " Olof Johansson
2009-09-23 18:39 ` Tom
@ 2009-09-24 17:32 ` Tom
2009-09-24 17:42 ` Paulraj, Sandeep
2009-09-24 17:48 ` [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support Paulraj, Sandeep
2009-09-26 6:13 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
2009-09-26 21:14 ` [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
3 siblings, 2 replies; 74+ messages in thread
From: Tom @ 2009-09-24 17:32 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> Based on the omap3 evm code. I added a new highlevel define for Tobi
> to avoid having it dependent on CMD_NET (which would seem backward in
> this case).
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
Ack-ed
Sandeep,
Can you push this to the ti branch?
Tom
> ---
>
> This version of the patch fixes whitespace comments from WD, and includes
> fixes for the build warnings that Dirk's patch also silenced.
>
>
> board/overo/overo.c | 62 +++++++++++++++++++++++++++++++++++++++++
> board/overo/overo.h | 37 ++++++++++++++++++++++++
> include/configs/omap3_overo.h | 23 ++++++++++++++-
> 3 files changed, 120 insertions(+), 2 deletions(-)
>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index dd6d286..7d87e52 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -29,13 +29,19 @@
> * MA 02111-1307 USA
> */
> #include <common.h>
> +#include <netdev.h>
> #include <twl4030.h>
> #include <asm/io.h>
> #include <asm/arch/mux.h>
> +#include <asm/arch/mem.h>
> #include <asm/arch/sys_proto.h>
> #include <asm/mach-types.h>
> #include "overo.h"
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +static void setup_net_chip(void);
> +#endif
> +
> /*
> * Routine: board_init
> * Description: Early hardware init.
> @@ -62,6 +68,10 @@ int misc_init_r(void)
> twl4030_power_init();
> twl4030_led_init();
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + setup_net_chip();
> +#endif
> +
> dieid_num_r();
>
> return 0;
> @@ -76,4 +86,56 @@ int misc_init_r(void)
> void set_muxconf_regs(void)
> {
> MUX_OVERO();
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> + MUX_OVERO_TOBI();
> +#endif
> +}
> +
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +/*
> + * Routine: setup_net_chip
> + * Description: Setting up the configuration GPMC registers specific to the
> + * Ethernet hardware.
> + */
> +static void setup_net_chip(void)
> +{
> + struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
> + struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
> +
> + /* Configure GPMC registers */
> + writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
> + writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
> + writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
> + writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
> + writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
> + writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
> + writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
> +
> + /* 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);
> +
> + /* Make GPIO 64 as output pin */
> + writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
> +
> + /* Now send a pulse on the GPIO pin */
> + writel(GPIO0, &gpio3_base->setdataout);
> + udelay(1);
> + writel(GPIO0, &gpio3_base->cleardataout);
> + udelay(1);
> + writel(GPIO0, &gpio3_base->setdataout);
> +}
> +#endif
> +
> +int board_eth_init(bd_t *bis)
> +{
> + int rc = 0;
> +#ifdef CONFIG_SMC911X
> + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
> +#endif
> + return rc;
> }
> diff --git a/board/overo/overo.h b/board/overo/overo.h
> index d9fe74e..48d58f2 100644
> --- a/board/overo/overo.h
> +++ b/board/overo/overo.h
> @@ -378,4 +378,41 @@ const omap3_sysinfo sysinfo = {
> MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
> MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +#define MUX_OVERO_TOBI() \
> + MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)) /*GPMC_A1*/\
> + MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)) /*GPMC_A2*/\
> + MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)) /*GPMC_A3*/\
> + MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)) /*GPMC_A4*/\
> + MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)) /*GPMC_A5*/\
> + MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)) /*GPMC_A6*/\
> + MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)) /*GPMC_A7*/\
> + MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)) /*GPMC_A8*/\
> + MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)) /*GPMC_A9*/\
> + MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)) /*GPMC_A10*/\
> + MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)) /*GPMC_D0*/\
> + MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)) /*GPMC_D1*/\
> + MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)) /*GPMC_D2*/\
> + MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)) /*GPMC_D3*/\
> + MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)) /*GPMC_D4*/\
> + MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)) /*GPMC_D5*/\
> + MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)) /*GPMC_D6*/\
> + MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)) /*GPMC_D7*/\
> + MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)) /*GPMC_D8*/\
> + MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)) /*GPMC_D9*/\
> + MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)) /*GPMC_D10*/\
> + MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)) /*GPMC_D11*/\
> + MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)) /*GPMC_D12*/\
> + MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)) /*GPMC_D13*/\
> + MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)) /*GPMC_D14*/\
> + MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) /*GPMC_D15*/\
> + MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) /*GPMC_nCS5*/\
> + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
> + MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
> + /* - SMSC911X_NRES*/\
> + MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
> + /* - LAN_INTR */
> +
> +#endif
> +
> #endif
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 07a031b..3faf756 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -28,7 +28,10 @@
> #define CONFIG_OMAP 1 /* in a TI OMAP core */
> #define CONFIG_OMAP34XX 1 /* which is a 34XX */
> #define CONFIG_OMAP3430 1 /* which is in a 3430 */
> -#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> +#define CONFIG_OMAP3_OVERO 1 /* working with overo */
> +
> +/* Change the below line to define 1 if you want ethernet on Tobi */
> +#undef CONFIG_OMAP3_OVERO_TOBI /* overo mounted on tobi */
>
> #include <asm/arch/cpu.h> /* get chip and board defs */
> #include <asm/arch/omap3.h>
> @@ -105,9 +108,12 @@
> #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
> #undef CONFIG_CMD_IMI /* iminfo */
> #undef CONFIG_CMD_IMLS /* List all found images */
> -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
> #undef CONFIG_CMD_NFS /* NFS support */
>
> +#if !defined(CONFIG_OMAP3_OVERO_TOBI)
> +#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
> +#endif
> +
> #define CONFIG_SYS_NO_FLASH
> #define CONFIG_SYS_I2C_SPEED 100000
> #define CONFIG_SYS_I2C_SLAVE 1
> @@ -293,4 +299,17 @@ extern unsigned int boot_flash_sec;
> extern unsigned int boot_flash_type;
> #endif
>
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +/*----------------------------------------------------------------------------
> + * SMSC9115 Ethernet from SMSC9118 family
> + *----------------------------------------------------------------------------
> + */
> +
> +#define CONFIG_NET_MULTI
> +#define CONFIG_SMC911X 1
> +#define CONFIG_SMC911X_32_BIT
> +#define CONFIG_SMC911X_BASE 0x2C000000
> +
> +#endif /* (CONFIG_CMD_NET) */
> +
> #endif /* __CONFIG_H */
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-24 17:32 ` Tom
@ 2009-09-24 17:42 ` Paulraj, Sandeep
2009-09-28 6:02 ` [U-Boot] Applying u-boot-ti patches (was: [PATCH v2] TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
2009-09-24 17:48 ` [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support Paulraj, Sandeep
1 sibling, 1 reply; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-24 17:42 UTC (permalink / raw)
To: u-boot
>
> Olof Johansson wrote:
> > Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > over tftp.
> >
> > Based on the omap3 evm code. I added a new highlevel define for Tobi
> > to avoid having it dependent on CMD_NET (which would seem backward in
> > this case).
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
>
> Ack-ed
>
> Sandeep,
> Can you push this to the ti branch?
>
> Tom
>
Yes after I rebase the branch.
I have to get rid of some commits NAK'ed by Wolfgang. I believe even you will have to do that.
Thanks,
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-24 17:32 ` Tom
2009-09-24 17:42 ` Paulraj, Sandeep
@ 2009-09-24 17:48 ` Paulraj, Sandeep
2009-09-24 17:51 ` Dirk Behme
2009-09-24 17:55 ` Olof Johansson
1 sibling, 2 replies; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-24 17:48 UTC (permalink / raw)
To: u-boot
>
> Olof Johansson wrote:
> > Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > over tftp.
> >
> > Based on the omap3 evm code. I added a new highlevel define for Tobi
> > to avoid having it dependent on CMD_NET (which would seem backward in
> > this case).
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
>
> Ack-ed
>
> Sandeep,
> Can you push this to the ti branch?
>
> Tom
BTW does this patch need an ACK from Dirk?
I ask because when we commit this patch we will have to remove one of his patches.
> > ---
> >
> > This version of the patch fixes whitespace comments from WD, and
> includes
> > fixes for the build warnings that Dirk's patch also silenced.
> >
This patch I believe incorporates Dirk's patch.
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-24 17:48 ` [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support Paulraj, Sandeep
@ 2009-09-24 17:51 ` Dirk Behme
2009-09-24 17:55 ` Olof Johansson
1 sibling, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2009-09-24 17:51 UTC (permalink / raw)
To: u-boot
Paulraj, Sandeep wrote:
>
>> Olof Johansson wrote:
>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>> over tftp.
>>>
>>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>>> to avoid having it dependent on CMD_NET (which would seem backward in
>>> this case).
>>>
>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>> Ack-ed
>>
>> Sandeep,
>> Can you push this to the ti branch?
>>
>> Tom
>
> BTW does this patch need an ACK from Dirk?
> I ask because when we commit this patch we will have to remove one of his patches.
>
>>> ---
>>>
>>> This version of the patch fixes whitespace comments from WD, and
>> includes
>>> fixes for the build warnings that Dirk's patch also silenced.
>>>
> This patch I believe incorporates Dirk's patch.
You have my ack to do what you think is the best way to go. I wasn't
able to track this discussion, but will look at the result then ;)
Best regards
Dirk
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support
2009-09-24 17:48 ` [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support Paulraj, Sandeep
2009-09-24 17:51 ` Dirk Behme
@ 2009-09-24 17:55 ` Olof Johansson
1 sibling, 0 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-24 17:55 UTC (permalink / raw)
To: u-boot
Hi,
On Sep 24, 2009, at 12:48 PM, Paulraj, Sandeep wrote:
>
>
>>
>> Olof Johansson wrote:
>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>> over tftp.
>>>
>>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>>> to avoid having it dependent on CMD_NET (which would seem backward
>>> in
>>> this case).
>>>
>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>
>> Ack-ed
>>
>> Sandeep,
>> Can you push this to the ti branch?
>>
>> Tom
>
> BTW does this patch need an ACK from Dirk?
> I ask because when we commit this patch we will have to remove one
> of his patches.
Yeah, I suppose so. :-)
>
>>> ---
>>>
>>> This version of the patch fixes whitespace comments from WD, and
>> includes
>>> fixes for the build warnings that Dirk's patch also silenced.
>>>
> This patch I believe incorporates Dirk's patch.
Yes, but not identical (I moved the prototype to the C file, a static
function prototype shouldn't have been in the header file to start
with).
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support)
2009-09-23 14:55 ` [U-Boot] [PATCH v2] " Olof Johansson
2009-09-23 18:39 ` Tom
2009-09-24 17:32 ` Tom
@ 2009-09-26 6:13 ` Dirk Behme
2009-09-26 11:21 ` Mike Frysinger
` (2 more replies)
2009-09-26 21:14 ` [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
3 siblings, 3 replies; 74+ messages in thread
From: Dirk Behme @ 2009-09-26 6:13 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> Based on the omap3 evm code. I added a new highlevel define for Tobi
> to avoid having it dependent on CMD_NET (which would seem backward in
> this case).
First: This is only a request for comment for possible future
improvement. It doesn't ask for any changes in this patch or is any
nack. Now to the content ;)
It seems that Steve found a way for runtime detection of smc911x
making CONFIG_OMAP3_OVERO_TOBI more or less obsolete (from [1]) :
-- cut --
--- git/include/configs/omap3_overo.h-orig 2009-09-17
13:06:08.000000000 -0700
+++ git/include/configs/omap3_overo.h 2009-09-17 13:06:49.000000000 -0700
@@ -29,7 +29,7 @@
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
#define CONFIG_OMAP3_OVERO 1 /* working with overo */
-//#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
+#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
#include <asm/arch/cpu.h> /* get chip and board defs */
#include <asm/arch/omap3.h>
--- git/drivers/net/smc911x.c-orig 2009-09-21 13:28:25.000000000 -0700
+++ git/drivers/net/smc911x.c 2009-09-21 13:29:53.000000000 -0700
@@ -253,6 +253,12 @@ int smc911x_initialize(u8 dev_num, int b
dev->iobase = base_addr;
+ /* test to see if chip is present (-1 if not) */
+ if (smc911x_reg_read(dev, MAC_CSR_CMD) == -1) {
+ free(dev);
+ return 0;
+ }
+
addrh = smc911x_get_mac_csr(dev, ADDRH);
addrl = smc911x_get_mac_csr(dev, ADDRL);
dev->enetaddr[0] = addrl;
-- cut --
But this needs some change in smc911x.c driver. Maybe someone likes to
comment (Ben?).
Best regards
Dirk
[1]
http://www.sakoman.net/cgi-bin/gitweb.cgi?p=openembedded.git;a=blob;f=recipes/u-boot/u-boot-omap3-git/smsc911x.patch;h=0d71b75727904cb59c88d523794c1d2699127cb2;hb=5965063dcfc396b3ef2f0891b54f05cf8f1ea08e
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support)
2009-09-26 6:13 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
@ 2009-09-26 11:21 ` Mike Frysinger
2009-09-26 12:36 ` [U-Boot] smc911x runtime detection Tom
2009-09-26 15:53 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Olof Johansson
2 siblings, 0 replies; 74+ messages in thread
From: Mike Frysinger @ 2009-09-26 11:21 UTC (permalink / raw)
To: u-boot
On Saturday 26 September 2009 02:13:52 Dirk Behme wrote:
> Olof Johansson wrote:
> > Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > over tftp.
> >
> > Based on the omap3 evm code. I added a new highlevel define for Tobi
> > to avoid having it dependent on CMD_NET (which would seem backward in
> > this case).
>
> First: This is only a request for comment for possible future
> improvement. It doesn't ask for any changes in this patch or is any
> nack. Now to the content ;)
>
> It seems that Steve found a way for runtime detection of smc911x
> making CONFIG_OMAP3_OVERO_TOBI more or less obsolete (from [1]) :
>
> -- cut --
> --- git/include/configs/omap3_overo.h-orig 2009-09-17
> 13:06:08.000000000 -0700
> +++ git/include/configs/omap3_overo.h 2009-09-17 13:06:49.000000000 -0700
> @@ -29,7 +29,7 @@
> #define CONFIG_OMAP34XX 1 /* which is a 34XX */
> #define CONFIG_OMAP3430 1 /* which is in a 3430 */
> #define CONFIG_OMAP3_OVERO 1 /* working with overo */
> -//#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
> +#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
>
> #include <asm/arch/cpu.h> /* get chip and board defs */
> #include <asm/arch/omap3.h>
> --- git/drivers/net/smc911x.c-orig 2009-09-21 13:28:25.000000000 -0700
> +++ git/drivers/net/smc911x.c 2009-09-21 13:29:53.000000000 -0700
> @@ -253,6 +253,12 @@ int smc911x_initialize(u8 dev_num, int b
>
> dev->iobase = base_addr;
>
> + /* test to see if chip is present (-1 if not) */
> + if (smc911x_reg_read(dev, MAC_CSR_CMD) == -1) {
> + free(dev);
> + return 0;
> + }
i dont think returning 0 is correct. let the higher layers (i.e. your board)
handle the error dynamically.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090926/f619c500/attachment.pgp
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection
2009-09-26 6:13 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
2009-09-26 11:21 ` Mike Frysinger
@ 2009-09-26 12:36 ` Tom
2009-09-26 15:53 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Olof Johansson
2 siblings, 0 replies; 74+ messages in thread
From: Tom @ 2009-09-26 12:36 UTC (permalink / raw)
To: u-boot
Dirk Behme wrote:
> Olof Johansson wrote:
>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>> over tftp.
>>
>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>> to avoid having it dependent on CMD_NET (which would seem backward in
>> this case).
>
> First: This is only a request for comment for possible future
> improvement. It doesn't ask for any changes in this patch or is any
> nack. Now to the content ;)
>
> It seems that Steve found a way for runtime detection of smc911x
> making CONFIG_OMAP3_OVERO_TOBI more or less obsolete (from [1]) :
>
> -- cut --
> --- git/include/configs/omap3_overo.h-orig 2009-09-17
> 13:06:08.000000000 -0700
> +++ git/include/configs/omap3_overo.h 2009-09-17 13:06:49.000000000 -0700
> @@ -29,7 +29,7 @@
> #define CONFIG_OMAP34XX 1 /* which is a 34XX */
> #define CONFIG_OMAP3430 1 /* which is in a 3430 */
> #define CONFIG_OMAP3_OVERO 1 /* working with overo */
> -//#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
> +#define CONFIG_OMAP3_OVERO_TOBI 1 /* overo mounted on tobi */
>
> #include <asm/arch/cpu.h> /* get chip and board defs */
> #include <asm/arch/omap3.h>
> --- git/drivers/net/smc911x.c-orig 2009-09-21 13:28:25.000000000 -0700
> +++ git/drivers/net/smc911x.c 2009-09-21 13:29:53.000000000 -0700
> @@ -253,6 +253,12 @@ int smc911x_initialize(u8 dev_num, int b
>
> dev->iobase = base_addr;
>
> + /* test to see if chip is present (-1 if not) */
> + if (smc911x_reg_read(dev, MAC_CSR_CMD) == -1) {
> + free(dev);
> + return 0;
> + }
> +
How are the mux and f/i clock setup handled?
Or will this change only help if the mux setup happens as a default?
Tom
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support)
2009-09-26 6:13 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
2009-09-26 11:21 ` Mike Frysinger
2009-09-26 12:36 ` [U-Boot] smc911x runtime detection Tom
@ 2009-09-26 15:53 ` Olof Johansson
2009-09-26 16:02 ` Ben Warren
2 siblings, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-26 15:53 UTC (permalink / raw)
To: u-boot
On Sep 26, 2009, at 1:13 AM, Dirk Behme wrote:
> Olof Johansson wrote:
>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>> over tftp.
>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>> to avoid having it dependent on CMD_NET (which would seem backward in
>> this case).
>
> First: This is only a request for comment for possible future
> improvement. It doesn't ask for any changes in this patch or is any
> nack. Now to the content ;)
>
> It seems that Steve found a way for runtime detection of smc911x
> making CONFIG_OMAP3_OVERO_TOBI more or less obsolete (from [1]) :
Looks like a good idea. I guess the risk is if there's ever another
carrier board with something on the same chip select that happens to
return something at that address, thus causing false detection. Is
that a valid concern?
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support)
2009-09-26 15:53 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Olof Johansson
@ 2009-09-26 16:02 ` Ben Warren
[not found] ` <5e088bd90909261213j1512c83erb9665bccc102fc42@mail.gmail.com>
2009-09-26 21:09 ` Olof Johansson
0 siblings, 2 replies; 74+ messages in thread
From: Ben Warren @ 2009-09-26 16:02 UTC (permalink / raw)
To: u-boot
Hi Olof,
On Sat, Sep 26, 2009 at 8:53 AM, Olof Johansson <olof@lixom.net> wrote:
>
> On Sep 26, 2009, at 1:13 AM, Dirk Behme wrote:
>
> Olof Johansson wrote:
>>
>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>> over tftp.
>>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>>> to avoid having it dependent on CMD_NET (which would seem backward in
>>> this case).
>>>
>>
>> First: This is only a request for comment for possible future improvement.
>> It doesn't ask for any changes in this patch or is any nack. Now to the
>> content ;)
>>
>> It seems that Steve found a way for runtime detection of smc911x making
>> CONFIG_OMAP3_OVERO_TOBI more or less obsolete (from [1]) :
>>
>
> Looks like a good idea. I guess the risk is if there's ever another carrier
> board with something on the same chip select that happens to return
> something at that address, thus causing false detection. Is that a valid
> concern?
>
> It is a good idea in principle, but just reading and expecting *something*
is a fatal flaw. I don't know about these ones in particular, but
memory-mapped chips often have ID registers that are RO and have
well-documented contents. If somebody can find something like that here,
let's do it.
>
> -Olof
>
> regards,
Ben
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support)
[not found] ` <5e088bd90909261213j1512c83erb9665bccc102fc42@mail.gmail.com>
@ 2009-09-26 19:19 ` Ben Warren
2009-09-26 19:23 ` Mike Frysinger
0 siblings, 1 reply; 74+ messages in thread
From: Ben Warren @ 2009-09-26 19:19 UTC (permalink / raw)
To: u-boot
Steve,
Please keep list C-C'd,
On Sat, Sep 26, 2009 at 12:13 PM, Steve Sakoman <sakoman@gmail.com> wrote:
> On Sat, Sep 26, 2009 at 9:02 AM, Ben Warren <biggerbadderben@gmail.com>
> wrote:
> > Hi Olof,
> > On Sat, Sep 26, 2009 at 8:53 AM, Olof Johansson <olof@lixom.net> wrote:
> >>
> >> On Sep 26, 2009, at 1:13 AM, Dirk Behme wrote:
> >>
> >>> Olof Johansson wrote:
> >>>>
> >>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> >>>> over tftp.
> >>>> Based on the omap3 evm code. I added a new highlevel define for Tobi
> >>>> to avoid having it dependent on CMD_NET (which would seem backward in
> >>>> this case).
> >>>
> >>> First: This is only a request for comment for possible future
> >>> improvement. It doesn't ask for any changes in this patch or is any
> nack.
> >>> Now to the content ;)
> >>>
> >>> It seems that Steve found a way for runtime detection of smc911x making
> >>> CONFIG_OMAP3_OVERO_TOBI more or less obsolete (from [1]) :
> >>
> >> Looks like a good idea. I guess the risk is if there's ever another
> >> carrier board with something on the same chip select that happens to
> return
> >> something at that address, thus causing false detection. Is that a valid
> >> concern?
> >>
> > It is a good idea in principle, but just reading and expecting
> *something*
> > is a fatal flaw. I don't know about these ones in particular, but
> > memory-mapped chips often have ID registers that are RO and have
> > well-documented contents. If somebody can find something like that here,
> > let's do it.
>
> Agreed, I didn't have a spec at hand to investigate this, so that's
> why I didn't think that this was a good patch for all systems with
> smc911x. I know it to work on Overo because reads to non-existent
> GPMC locations give all ones (hence the test for -1).
>
> I would definitely prefer a register with known contents.
>
> There was a question as to whether the code returned the proper value.
> Returning a 0 from this routine when no chip is found results in a
> reasonable error message:
>
> Net: No ethernet found.
>
> Yes, returning 0 is the correct value. The undocumented API is that
Ethernet initialize() functions return the number of interfaces added, or -1
on error. I wouldn't consider this an error condition.
regards,
Ben
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support)
2009-09-26 19:19 ` Ben Warren
@ 2009-09-26 19:23 ` Mike Frysinger
0 siblings, 0 replies; 74+ messages in thread
From: Mike Frysinger @ 2009-09-26 19:23 UTC (permalink / raw)
To: u-boot
On Saturday 26 September 2009 15:19:01 Ben Warren wrote:
> Ethernet initialize() functions return the number of interfaces added, or
> -1 on error. I wouldn't consider this an error condition.
should be added to the README.drivers.eth. have you merged that yet ? if
not, i'll send an updated version.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090926/78728778/attachment.pgp
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support)
2009-09-26 16:02 ` Ben Warren
[not found] ` <5e088bd90909261213j1512c83erb9665bccc102fc42@mail.gmail.com>
@ 2009-09-26 21:09 ` Olof Johansson
2009-09-27 8:38 ` [U-Boot] smc911x runtime detection Dirk Behme
1 sibling, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-09-26 21:09 UTC (permalink / raw)
To: u-boot
On Sat, Sep 26, 2009 at 09:02:33AM -0700, Ben Warren wrote:
> It is a good idea in principle, but just reading and expecting *something*
> is a fatal flaw. I don't know about these ones in particular, but
> memory-mapped chips often have ID registers that are RO and have
> well-documented contents. If somebody can find something like that here,
> let's do it.
Register at offset 0x50 should contain the Chip ID and revision (0x9211 <<
16 | <rev>). It should be a better base for auto-probe.
Actually, the driver already does check it (and verifies it against a
table of known chip revs). By moving that call sooner we can essentially
accomplish the same thing. It also makes sense to move some of the
printouts around to not mess up he probing printouts. I will post a v3
patch for this separately (it also contains the GPIO changes).
I do find the whole "one firmware config for all overo carriers" to be a
little hard to accomplish, since the OMAP gumstix + carrier really is what
is normally considered the "board". On the other hand, having one firmware
that boots on all possible versions is probably preferrably on some level.
For future carrier boards, having an I2C ID EEPROM or similar on there
might not be a bad idea. However, I can't figure out how to contact anyone at
Gumstix without posting on their web forum.
See patch separately.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-09-23 14:55 ` [U-Boot] [PATCH v2] " Olof Johansson
` (2 preceding siblings ...)
2009-09-26 6:13 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
@ 2009-09-26 21:14 ` Olof Johansson
2009-09-28 18:51 ` Ben Warren
2009-10-05 13:56 ` Steve Sakoman
3 siblings, 2 replies; 74+ messages in thread
From: Olof Johansson @ 2009-09-26 21:14 UTC (permalink / raw)
To: u-boot
Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
over tftp.
This also refactors the smc911x driver to allow for detecting when the
chip is missing. I.e. the detect_chip() function is called earlier and
will abort gracefully when the Chip ID read returns all 1's.
Signed-off-by: Olof Johansson <olof@lixom.net>
---
Changes since last version:
* Incorporated auto-detect based on email discussion
* Refactored some smc911x probe to deal with the above
* Incorporated the GPIO library changes
* Removed the TOBI-specific config option due to the new auto-probe
Testing on non-Tobi carrier boards would be appreciated, since I don't
have any.
board/overo/overo.c | 59 ++++++++++++++++++++++++++++++++++++++
board/overo/overo.h | 63 +++++++++++++++++++++--------------------
drivers/net/smc911x.c | 14 +++++----
drivers/net/smc911x.h | 7 +++-
include/configs/omap3_overo.h | 17 ++++++++++-
5 files changed, 119 insertions(+), 41 deletions(-)
diff --git a/board/overo/overo.c b/board/overo/overo.c
index dd6d286..d42dc13 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -29,13 +29,20 @@
* MA 02111-1307 USA
*/
#include <common.h>
+#include <netdev.h>
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
+#include <asm/arch/mem.h>
#include <asm/arch/sys_proto.h>
+#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include "overo.h"
+#if defined(CONFIG_CMD_NET)
+static void setup_net_chip(void);
+#endif
+
/*
* Routine: board_init
* Description: Early hardware init.
@@ -62,6 +69,10 @@ int misc_init_r(void)
twl4030_power_init();
twl4030_led_init();
+#if defined(CONFIG_CMD_NET)
+ setup_net_chip();
+#endif
+
dieid_num_r();
return 0;
@@ -77,3 +88,51 @@ void set_muxconf_regs(void)
{
MUX_OVERO();
}
+
+#if defined(CONFIG_CMD_NET)
+/*
+ * 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;
+
+ /* Configure GPMC registers */
+ writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
+ writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
+ writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
+ writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
+ writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
+ writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
+ writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
+
+ /* 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);
+
+ /* Make GPIO 64 as output pin and send a magic pulse through it */
+ if (!omap_request_gpio(64)) {
+ omap_set_gpio_direction(64, 0);
+ omap_set_gpio_dataout(64, 1);
+ udelay(1);
+ omap_set_gpio_dataout(64, 0);
+ udelay(1);
+ omap_set_gpio_dataout(64, 1);
+ }
+}
+#endif
+
+int board_eth_init(bd_t *bis)
+{
+ int rc = 0;
+#ifdef CONFIG_SMC911X
+ rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
+#endif
+ return rc;
+}
diff --git a/board/overo/overo.h b/board/overo/overo.h
index d9fe74e..4c7ac27 100644
--- a/board/overo/overo.h
+++ b/board/overo/overo.h
@@ -83,43 +83,43 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(SDRC_DQS2), (IEN | PTD | DIS | M0)) /*SDRC_DQS2*/\
MUX_VAL(CP(SDRC_DQS3), (IEN | PTD | DIS | M0)) /*SDRC_DQS3*/\
/*GPMC*/\
- MUX_VAL(CP(GPMC_A1), (IDIS | PTD | DIS | M0)) /*GPMC_A1*/\
- MUX_VAL(CP(GPMC_A2), (IDIS | PTD | DIS | M0)) /*GPMC_A2*/\
- MUX_VAL(CP(GPMC_A3), (IDIS | PTD | DIS | M0)) /*GPMC_A3*/\
- MUX_VAL(CP(GPMC_A4), (IDIS | PTD | DIS | M0)) /*GPMC_A4*/\
- MUX_VAL(CP(GPMC_A5), (IDIS | PTD | DIS | M0)) /*GPMC_A5*/\
- MUX_VAL(CP(GPMC_A6), (IDIS | PTD | DIS | M0)) /*GPMC_A6*/\
- MUX_VAL(CP(GPMC_A7), (IDIS | PTD | DIS | M0)) /*GPMC_A7*/\
- MUX_VAL(CP(GPMC_A8), (IDIS | PTD | DIS | M0)) /*GPMC_A8*/\
- MUX_VAL(CP(GPMC_A9), (IDIS | PTD | DIS | M0)) /*GPMC_A9*/\
- MUX_VAL(CP(GPMC_A10), (IDIS | PTD | DIS | M0)) /*GPMC_A10*/\
- MUX_VAL(CP(GPMC_D0), (IEN | PTD | DIS | M0)) /*GPMC_D0*/\
- MUX_VAL(CP(GPMC_D1), (IEN | PTD | DIS | M0)) /*GPMC_D1*/\
- MUX_VAL(CP(GPMC_D2), (IEN | PTD | DIS | M0)) /*GPMC_D2*/\
- MUX_VAL(CP(GPMC_D3), (IEN | PTD | DIS | M0)) /*GPMC_D3*/\
- MUX_VAL(CP(GPMC_D4), (IEN | PTD | DIS | M0)) /*GPMC_D4*/\
- MUX_VAL(CP(GPMC_D5), (IEN | PTD | DIS | M0)) /*GPMC_D5*/\
- MUX_VAL(CP(GPMC_D6), (IEN | PTD | DIS | M0)) /*GPMC_D6*/\
- MUX_VAL(CP(GPMC_D7), (IEN | PTD | DIS | M0)) /*GPMC_D7*/\
- MUX_VAL(CP(GPMC_D8), (IEN | PTD | DIS | M0)) /*GPMC_D8*/\
- MUX_VAL(CP(GPMC_D9), (IEN | PTD | DIS | M0)) /*GPMC_D9*/\
- MUX_VAL(CP(GPMC_D10), (IEN | PTD | DIS | M0)) /*GPMC_D10*/\
- MUX_VAL(CP(GPMC_D11), (IEN | PTD | DIS | M0)) /*GPMC_D11*/\
- MUX_VAL(CP(GPMC_D12), (IEN | PTD | DIS | M0)) /*GPMC_D12*/\
- MUX_VAL(CP(GPMC_D13), (IEN | PTD | DIS | M0)) /*GPMC_D13*/\
- MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS | M0)) /*GPMC_D14*/\
- MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS | M0)) /*GPMC_D15*/\
+ MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)) /*GPMC_A1*/\
+ MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)) /*GPMC_A2*/\
+ MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)) /*GPMC_A3*/\
+ MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)) /*GPMC_A4*/\
+ MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)) /*GPMC_A5*/\
+ MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)) /*GPMC_A6*/\
+ MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)) /*GPMC_A7*/\
+ MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)) /*GPMC_A8*/\
+ MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)) /*GPMC_A9*/\
+ MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)) /*GPMC_A10*/\
+ MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)) /*GPMC_D0*/\
+ MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)) /*GPMC_D1*/\
+ MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)) /*GPMC_D2*/\
+ MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)) /*GPMC_D3*/\
+ MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)) /*GPMC_D4*/\
+ MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)) /*GPMC_D5*/\
+ MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)) /*GPMC_D6*/\
+ MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)) /*GPMC_D7*/\
+ MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)) /*GPMC_D8*/\
+ MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)) /*GPMC_D9*/\
+ MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)) /*GPMC_D10*/\
+ MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)) /*GPMC_D11*/\
+ MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)) /*GPMC_D12*/\
+ MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)) /*GPMC_D13*/\
+ MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)) /*GPMC_D14*/\
+ MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) /*GPMC_D15*/\
MUX_VAL(CP(GPMC_NCS0), (IDIS | PTU | EN | M0)) /*GPMC_nCS0*/\
MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN | M0)) /*GPMC_nCS1*/\
MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | EN | M0)) /*GPMC_nCS2*/\
MUX_VAL(CP(GPMC_NCS3), (IEN | PTU | EN | M4)) /*GPIO_54*/\
/* - MMC1_WP*/\
MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | EN | M0)) /*GPMC_nCS4*/\
- MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS | M0)) /*GPMC_nCS5*/\
+ MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) /*GPMC_nCS5*/\
MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M0)) /*GPMC_nCS6*/\
MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M0)) /*GPMC_nCS7*/\
MUX_VAL(CP(GPMC_NBE1), (IEN | PTD | DIS | M0)) /*GPMC_nCS3*/\
- MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS | M0)) /*GPMC_CLK*/\
+ MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /*GPMC_CLK*/\
MUX_VAL(CP(GPMC_NADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\
MUX_VAL(CP(GPMC_NOE), (IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\
MUX_VAL(CP(GPMC_NWE), (IDIS | PTD | DIS | M0)) /*GPMC_nWE*/\
@@ -127,7 +127,7 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(GPMC_NWP), (IEN | PTD | DIS | M0)) /*GPMC_nWP*/\
MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN | M0)) /*GPMC_WAIT0*/\
MUX_VAL(CP(GPMC_WAIT1), (IEN | PTU | EN | M0)) /*GPMC_WAIT1*/\
- MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | DIS | M4)) /*GPIO_64*/\
+ MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /*GPIO_64*/\
/* - SMSC911X_NRES*/\
MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN | M0)) /*GPMC_nCS3*/\
/*DSS*/\
@@ -270,8 +270,8 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI */\
MUX_VAL(CP(MCSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\
MUX_VAL(CP(MCSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\
- MUX_VAL(CP(MCSPI1_CS2), (IEN | PTD | DIS | M4)) /*GPIO_176*/\
- /* - SMSC911X_IRQ*/\
+ MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /*GPIO_176 */\
+ /* - LAN_INTR */\
MUX_VAL(CP(MCSPI1_CS3), (IEN | PTD | DIS | M3)) /*HSUSB2_DATA2*/\
MUX_VAL(CP(MCSPI2_CLK), (IEN | PTD | DIS | M3)) /*HSUSB2_DATA7*/\
MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTD | DIS | M3)) /*HSUSB2_DATA4*/\
@@ -378,4 +378,5 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
+
#endif
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 18a729c..b106ec9 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -146,10 +146,9 @@ static void smc911x_enable(struct eth_device *dev)
static int smc911x_init(struct eth_device *dev, bd_t * bd)
{
- printf(DRIVERNAME ": initializing\n");
+ struct chip_id *id = dev->priv;
- if (smc911x_detect_chip(dev))
- goto err_out;
+ printf(DRIVERNAME ": detected %s controller\n", id->name);
smc911x_reset(dev);
@@ -162,9 +161,6 @@ static int smc911x_init(struct eth_device *dev, bd_t * bd)
smc911x_enable(dev);
return 0;
-
-err_out:
- return -1;
}
static int smc911x_send(struct eth_device *dev,
@@ -268,6 +264,12 @@ int smc911x_initialize(u8 dev_num, int base_addr)
dev->recv = smc911x_rx;
sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
+ /* Try to detect chip. Will fail if not present. */
+ if (smc911x_detect_chip(dev)) {
+ free(dev);
+ return 0;
+ }
+
eth_register(dev);
return 0;
}
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 053e330..d5bca63 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -441,7 +441,10 @@ static int smc911x_detect_chip(struct eth_device *dev)
unsigned long val, i;
val = smc911x_reg_read(dev, BYTE_TEST);
- if (val != 0x87654321) {
+ if (val == 0xffffffff) {
+ /* Special case -- no chip present */
+ return -1;
+ } else if (val != 0x87654321) {
printf(DRIVERNAME ": Invalid chip endian 0x%08lx\n", val);
return -1;
}
@@ -455,7 +458,7 @@ static int smc911x_detect_chip(struct eth_device *dev)
return -1;
}
- printf(DRIVERNAME ": detected %s controller\n", chip_ids[i].name);
+ dev->priv = (void *)&chip_ids[i];
return 0;
}
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 07a031b..1836233 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -28,7 +28,7 @@
#define CONFIG_OMAP 1 /* in a TI OMAP core */
#define CONFIG_OMAP34XX 1 /* which is a 34XX */
#define CONFIG_OMAP3430 1 /* which is in a 3430 */
-#define CONFIG_OMAP3_OVERO 1 /* working with overo */
+#define CONFIG_OMAP3_OVERO 1 /* working with overo */
#include <asm/arch/cpu.h> /* get chip and board defs */
#include <asm/arch/omap3.h>
@@ -105,8 +105,8 @@
#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
#undef CONFIG_CMD_IMI /* iminfo */
#undef CONFIG_CMD_IMLS /* List all found images */
-#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#undef CONFIG_CMD_NFS /* NFS support */
+#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_I2C_SPEED 100000
@@ -293,4 +293,17 @@ extern unsigned int boot_flash_sec;
extern unsigned int boot_flash_type;
#endif
+#if defined(CONFIG_CMD_NET)
+/*----------------------------------------------------------------------------
+ * SMSC9211 Ethernet from SMSC9118 family
+ *----------------------------------------------------------------------------
+ */
+
+#define CONFIG_NET_MULTI
+#define CONFIG_SMC911X 1
+#define CONFIG_SMC911X_32_BIT
+#define CONFIG_SMC911X_BASE 0x2C000000
+
+#endif /* (CONFIG_CMD_NET) */
+
#endif /* __CONFIG_H */
--
1.6.0.4
^ permalink raw reply related [flat|nested] 74+ messages in thread
* [U-Boot] smc911x runtime detection
2009-09-26 21:09 ` Olof Johansson
@ 2009-09-27 8:38 ` Dirk Behme
0 siblings, 0 replies; 74+ messages in thread
From: Dirk Behme @ 2009-09-27 8:38 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> For future carrier boards, having an I2C ID EEPROM or similar on there
> might not be a bad idea.
Totally off-topic here, but just fyi: TinCanTools started with I2C ID
EEPROM already
http://elinux.org/BeagleBoardPinMux#Expansion_boards
and I think this is agreed with Steve (Gumstix?), too. At least Steve
was heavily involved in discussion about this ;)
Best regards
Dirk
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] Applying u-boot-ti patches (was: [PATCH v2] TI: OMAP3: Overo Tobi ethernet support)
2009-09-24 17:42 ` Paulraj, Sandeep
@ 2009-09-28 6:02 ` Dirk Behme
2009-09-28 11:29 ` Paulraj, Sandeep
0 siblings, 1 reply; 74+ messages in thread
From: Dirk Behme @ 2009-09-28 6:02 UTC (permalink / raw)
To: u-boot
Paulraj, Sandeep wrote:
>
>> Olof Johansson wrote:
>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>> over tftp.
>>>
>>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>>> to avoid having it dependent on CMD_NET (which would seem backward in
>>> this case).
>>>
>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>> Ack-ed
>>
>> Sandeep,
>> Can you push this to the ti branch?
>>
>> Tom
>>
> Yes after I rebase the branch.
> I have to get rid of some commits NAK'ed by Wolfgang.
Seems this is done :)
Just in case it might help: After looking through the OMAP3 patches,
my list of patches to be applied:
1. [PATCH v3] OMAP3 MMC: Fix warning dereferencing type-punned pointer
http://lists.denx.de/pipermail/u-boot/2009-September/061621.html
2. [PATCH] OMAP3: Update Overo and Beagle environment
http://lists.denx.de/pipermail/u-boot/2009-September/061564.html
3. [PATCH 1/1] TI OMAP3 Use arm init sequence to initialize i2c
http://lists.denx.de/pipermail/u-boot/2009-September/061515.html
(if it's fine to move it into u-boot-ti instead of u-boot-i2c)
4. [PATCH] OMAP3: Clean up whitespace in mux configs
http://lists.denx.de/pipermail/u-boot/2009-September/061300.html
5. [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
http://lists.denx.de/pipermail/u-boot/2009-September/061604.html
(needs an ack from Ben?)
Note: 5 depends on 4.
Best regards
Dirk
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] Applying u-boot-ti patches (was: [PATCH v2] TI: OMAP3: Overo Tobi ethernet support)
2009-09-28 6:02 ` [U-Boot] Applying u-boot-ti patches (was: [PATCH v2] TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
@ 2009-09-28 11:29 ` Paulraj, Sandeep
2009-09-28 17:37 ` [U-Boot] Applying u-boot-ti patches Dirk Behme
0 siblings, 1 reply; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-28 11:29 UTC (permalink / raw)
To: u-boot
>
> Paulraj, Sandeep wrote:
> >
> >> Olof Johansson wrote:
> >>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> >>> over tftp.
> >>>
> >>> Based on the omap3 evm code. I added a new highlevel define for Tobi
> >>> to avoid having it dependent on CMD_NET (which would seem backward in
> >>> this case).
> >>>
> >>> Signed-off-by: Olof Johansson <olof@lixom.net>
> >> Ack-ed
> >>
> >> Sandeep,
> >> Can you push this to the ti branch?
> >>
> >> Tom
> >>
> > Yes after I rebase the branch.
> > I have to get rid of some commits NAK'ed by Wolfgang.
>
> Seems this is done :)
>
> Just in case it might help: After looking through the OMAP3 patches,
> my list of patches to be applied:
>
> 1. [PATCH v3] OMAP3 MMC: Fix warning dereferencing type-punned pointer
> http://lists.denx.de/pipermail/u-boot/2009-September/061621.html
>
> 2. [PATCH] OMAP3: Update Overo and Beagle environment
> http://lists.denx.de/pipermail/u-boot/2009-September/061564.html
>
> 3. [PATCH 1/1] TI OMAP3 Use arm init sequence to initialize i2c
> http://lists.denx.de/pipermail/u-boot/2009-September/061515.html
>
> (if it's fine to move it into u-boot-ti instead of u-boot-i2c)
Looks like you have an ACK for this to happen :-)
>
> 4. [PATCH] OMAP3: Clean up whitespace in mux configs
> http://lists.denx.de/pipermail/u-boot/2009-September/061300.html
>
> 5. [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
> http://lists.denx.de/pipermail/u-boot/2009-September/061604.html
>
> (needs an ack from Ben?)
>
> Note: 5 depends on 4.
>
> Best regards
>
> Dirk
I'll apply them in the evening.
Ben, can I apply the following patch to u-boot-ti?
[PATCH v3] TI: OMAP3: Overo Tobi ethernet support
Thanks,
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] Applying u-boot-ti patches
2009-09-28 11:29 ` Paulraj, Sandeep
@ 2009-09-28 17:37 ` Dirk Behme
2009-09-28 17:45 ` Paulraj, Sandeep
0 siblings, 1 reply; 74+ messages in thread
From: Dirk Behme @ 2009-09-28 17:37 UTC (permalink / raw)
To: u-boot
Paulraj, Sandeep wrote:
>> Paulraj, Sandeep wrote:
>>>> Olof Johansson wrote:
>>>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>>>> over tftp.
>>>>>
>>>>> Based on the omap3 evm code. I added a new highlevel define for Tobi
>>>>> to avoid having it dependent on CMD_NET (which would seem backward in
>>>>> this case).
>>>>>
>>>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>>> Ack-ed
>>>>
>>>> Sandeep,
>>>> Can you push this to the ti branch?
>>>>
>>>> Tom
>>>>
>>> Yes after I rebase the branch.
>>> I have to get rid of some commits NAK'ed by Wolfgang.
>> Seems this is done :)
>>
>> Just in case it might help: After looking through the OMAP3 patches,
>> my list of patches to be applied:
>>
>> 1. [PATCH v3] OMAP3 MMC: Fix warning dereferencing type-punned pointer
>> http://lists.denx.de/pipermail/u-boot/2009-September/061621.html
>>
>> 2. [PATCH] OMAP3: Update Overo and Beagle environment
>> http://lists.denx.de/pipermail/u-boot/2009-September/061564.html
>>
>> 3. [PATCH 1/1] TI OMAP3 Use arm init sequence to initialize i2c
>> http://lists.denx.de/pipermail/u-boot/2009-September/061515.html
>>
>> (if it's fine to move it into u-boot-ti instead of u-boot-i2c)
> Looks like you have an ACK for this to happen :-)
>> 4. [PATCH] OMAP3: Clean up whitespace in mux configs
>> http://lists.denx.de/pipermail/u-boot/2009-September/061300.html
>>
>> 5. [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
>> http://lists.denx.de/pipermail/u-boot/2009-September/061604.html
>>
>> (needs an ack from Ben?)
>>
>> Note: 5 depends on 4.
>>
>> Best regards
>>
>> Dirk
> I'll apply them in the evening.
Thanks for applying patches 1, 2 & 4 :)
Just fyi, I got
u-boot-ti > git pull
remote: error: refs/remotes/origin/HEAD points nowhere!
remote: error: refs/remotes/origin/mkimage does not point to a valid
object!
...
Not sure what this is about, though.
Best regards
Dirk
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] Applying u-boot-ti patches
2009-09-28 17:37 ` [U-Boot] Applying u-boot-ti patches Dirk Behme
@ 2009-09-28 17:45 ` Paulraj, Sandeep
0 siblings, 0 replies; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-28 17:45 UTC (permalink / raw)
To: u-boot
> in
> >>>>> this case).
> >>>>>
> >>>>> Signed-off-by: Olof Johansson <olof@lixom.net>
> >>>> Ack-ed
> >>>>
> >>>> Sandeep,
> >>>> Can you push this to the ti branch?
> >>>>
> >>>> Tom
> >>>>
> >>> Yes after I rebase the branch.
> >>> I have to get rid of some commits NAK'ed by Wolfgang.
> >> Seems this is done :)
> >>
> >> Just in case it might help: After looking through the OMAP3 patches,
> >> my list of patches to be applied:
> >>
> >> 1. [PATCH v3] OMAP3 MMC: Fix warning dereferencing type-punned pointer
> >> http://lists.denx.de/pipermail/u-boot/2009-September/061621.html
> >>
> >> 2. [PATCH] OMAP3: Update Overo and Beagle environment
> >> http://lists.denx.de/pipermail/u-boot/2009-September/061564.html
> >>
> >> 3. [PATCH 1/1] TI OMAP3 Use arm init sequence to initialize i2c
> >> http://lists.denx.de/pipermail/u-boot/2009-September/061515.html
> >>
> >> (if it's fine to move it into u-boot-ti instead of u-boot-i2c)
> > Looks like you have an ACK for this to happen :-)
> >> 4. [PATCH] OMAP3: Clean up whitespace in mux configs
> >> http://lists.denx.de/pipermail/u-boot/2009-September/061300.html
> >>
> >> 5. [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
> >> http://lists.denx.de/pipermail/u-boot/2009-September/061604.html
> >>
> >> (needs an ack from Ben?)
> >>
> >> Note: 5 depends on 4.
> >>
> >> Best regards
> >>
> >> Dirk
> > I'll apply them in the evening.
>
> Thanks for applying patches 1, 2 & 4 :)
#3 does not apply clean :-)
#5 I'm waiting for a reply from Ben
>
> Just fyi, I got
>
> u-boot-ti > git pull
> remote: error: refs/remotes/origin/HEAD points nowhere!
> remote: error: refs/remotes/origin/mkimage does not point to a valid
> object!
> ...
I am able to pull without any issues. Things seem fine. You should be able to see all you updates in the repo you just updated
>
> Not sure what this is about, though.
Is there anything I can do to get rid of this?
>
> Best regards
>
> Dirk
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-09-26 21:14 ` [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
@ 2009-09-28 18:51 ` Ben Warren
2009-09-28 19:32 ` Paulraj, Sandeep
2009-10-05 13:56 ` Steve Sakoman
1 sibling, 1 reply; 74+ messages in thread
From: Ben Warren @ 2009-09-28 18:51 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> This also refactors the smc911x driver to allow for detecting when the
> chip is missing. I.e. the detect_chip() function is called earlier and
> will abort gracefully when the Chip ID read returns all 1's.
>
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
(although it should have been broken into functionally-orthogonal patches).
Go ahead and apply to the TI branch.
regards,
Ben
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-09-28 18:51 ` Ben Warren
@ 2009-09-28 19:32 ` Paulraj, Sandeep
0 siblings, 0 replies; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-09-28 19:32 UTC (permalink / raw)
To: u-boot
>
> Olof Johansson wrote:
> > Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > over tftp.
> >
> > This also refactors the smc911x driver to allow for detecting when the
> > chip is missing. I.e. the detect_chip() function is called earlier and
> > will abort gracefully when the Chip ID read returns all 1's.
> >
> >
> > Signed-off-by: Olof Johansson <olof@lixom.net>
> >
> Acked-by: Ben Warren <biggerbadderben@gmail.com>
>
> (although it should have been broken into functionally-orthogonal
> patches).
>
> Go ahead and apply to the TI branch.
Yes you are right
board/overo/overo.c | 59 ++++++++++++++++++++++++++++++++++++++
board/overo/overo.h | 63 +++++++++++++++++++++-----------------
drivers/net/smc911x.c | 14 +++++----
drivers/net/smc911x.h | 7 +++-
the above 2 should have been in a diff patch
include/configs/omap3_overo.h | 17 ++++++++++-
5 files changed, 119 insertions(+), 41 deletions(-)
>
> regards,
> Ben
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-09-26 21:14 ` [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
2009-09-28 18:51 ` Ben Warren
@ 2009-10-05 13:56 ` Steve Sakoman
2009-10-05 14:07 ` Olof Johansson
1 sibling, 1 reply; 74+ messages in thread
From: Steve Sakoman @ 2009-10-05 13:56 UTC (permalink / raw)
To: u-boot
On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof@lixom.net> wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
>
> This also refactors the smc911x driver to allow for detecting when the
> chip is missing. I.e. the detect_chip() function is called earlier and
> will abort gracefully when the Chip ID read returns all 1's.
>
Hmm . . . I just tried this on a board without smc911x chip and it
seems to hang after printing "Net".
Did it work for you in this case? Haven't had time to debug yet, but
will try to look later today.
Steve
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> ---
>
> Changes since last version:
> * Incorporated auto-detect based on email discussion
> * Refactored some smc911x probe to deal with the above
> * Incorporated the GPIO library changes
> * Removed the TOBI-specific config option due to the new auto-probe
>
>
> Testing on non-Tobi carrier boards would be appreciated, since I don't
> have any.
>
> ?board/overo/overo.c ? ? ? ? ? | ? 59 ++++++++++++++++++++++++++++++++++++++
> ?board/overo/overo.h ? ? ? ? ? | ? 63 +++++++++++++++++++++--------------------
> ?drivers/net/smc911x.c ? ? ? ? | ? 14 +++++----
> ?drivers/net/smc911x.h ? ? ? ? | ? ?7 +++-
> ?include/configs/omap3_overo.h | ? 17 ++++++++++-
> ?5 files changed, 119 insertions(+), 41 deletions(-)
>
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index dd6d286..d42dc13 100644
> --- a/board/overo/overo.c
> +++ b/board/overo/overo.c
> @@ -29,13 +29,20 @@
> ?* MA 02111-1307 USA
> ?*/
> ?#include <common.h>
> +#include <netdev.h>
> ?#include <twl4030.h>
> ?#include <asm/io.h>
> ?#include <asm/arch/mux.h>
> +#include <asm/arch/mem.h>
> ?#include <asm/arch/sys_proto.h>
> +#include <asm/arch/gpio.h>
> ?#include <asm/mach-types.h>
> ?#include "overo.h"
>
> +#if defined(CONFIG_CMD_NET)
> +static void setup_net_chip(void);
> +#endif
> +
> ?/*
> ?* Routine: board_init
> ?* Description: Early hardware init.
> @@ -62,6 +69,10 @@ int misc_init_r(void)
> ? ? ? ?twl4030_power_init();
> ? ? ? ?twl4030_led_init();
>
> +#if defined(CONFIG_CMD_NET)
> + ? ? ? setup_net_chip();
> +#endif
> +
> ? ? ? ?dieid_num_r();
>
> ? ? ? ?return 0;
> @@ -77,3 +88,51 @@ void set_muxconf_regs(void)
> ?{
> ? ? ? ?MUX_OVERO();
> ?}
> +
> +#if defined(CONFIG_CMD_NET)
> +/*
> + * 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;
> +
> + ? ? ? /* Configure GPMC registers */
> + ? ? ? writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
> + ? ? ? writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
> + ? ? ? writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
> + ? ? ? writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
> + ? ? ? writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
> + ? ? ? writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
> + ? ? ? writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
> +
> + ? ? ? /* 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);
> +
> + ? ? ? /* Make GPIO 64 as output pin and send a magic pulse through it */
> + ? ? ? if (!omap_request_gpio(64)) {
> + ? ? ? ? ? ? ? omap_set_gpio_direction(64, 0);
> + ? ? ? ? ? ? ? omap_set_gpio_dataout(64, 1);
> + ? ? ? ? ? ? ? udelay(1);
> + ? ? ? ? ? ? ? omap_set_gpio_dataout(64, 0);
> + ? ? ? ? ? ? ? udelay(1);
> + ? ? ? ? ? ? ? omap_set_gpio_dataout(64, 1);
> + ? ? ? }
> +}
> +#endif
> +
> +int board_eth_init(bd_t *bis)
> +{
> + ? ? ? int rc = 0;
> +#ifdef CONFIG_SMC911X
> + ? ? ? rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
> +#endif
> + ? ? ? return rc;
> +}
> diff --git a/board/overo/overo.h b/board/overo/overo.h
> index d9fe74e..4c7ac27 100644
> --- a/board/overo/overo.h
> +++ b/board/overo/overo.h
> @@ -83,43 +83,43 @@ const omap3_sysinfo sysinfo = {
> ? ? ? ?MUX_VAL(CP(SDRC_DQS2), ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*SDRC_DQS2*/\
> ? ? ? ?MUX_VAL(CP(SDRC_DQS3), ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*SDRC_DQS3*/\
> ?/*GPMC*/\
> - ? ? ? MUX_VAL(CP(GPMC_A1), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A1*/\
> - ? ? ? MUX_VAL(CP(GPMC_A2), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A2*/\
> - ? ? ? MUX_VAL(CP(GPMC_A3), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A3*/\
> - ? ? ? MUX_VAL(CP(GPMC_A4), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A4*/\
> - ? ? ? MUX_VAL(CP(GPMC_A5), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A5*/\
> - ? ? ? MUX_VAL(CP(GPMC_A6), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A6*/\
> - ? ? ? MUX_VAL(CP(GPMC_A7), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A7*/\
> - ? ? ? MUX_VAL(CP(GPMC_A8), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A8*/\
> - ? ? ? MUX_VAL(CP(GPMC_A9), ? ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_A9*/\
> - ? ? ? MUX_VAL(CP(GPMC_A10), ? ? ? ? ? (IDIS | PTD | DIS | M0)) /*GPMC_A10*/\
> - ? ? ? MUX_VAL(CP(GPMC_D0), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D0*/\
> - ? ? ? MUX_VAL(CP(GPMC_D1), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D1*/\
> - ? ? ? MUX_VAL(CP(GPMC_D2), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D2*/\
> - ? ? ? MUX_VAL(CP(GPMC_D3), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D3*/\
> - ? ? ? MUX_VAL(CP(GPMC_D4), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D4*/\
> - ? ? ? MUX_VAL(CP(GPMC_D5), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D5*/\
> - ? ? ? MUX_VAL(CP(GPMC_D6), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D6*/\
> - ? ? ? MUX_VAL(CP(GPMC_D7), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D7*/\
> - ? ? ? MUX_VAL(CP(GPMC_D8), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D8*/\
> - ? ? ? MUX_VAL(CP(GPMC_D9), ? ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_D9*/\
> - ? ? ? MUX_VAL(CP(GPMC_D10), ? ? ? ? ? (IEN ?| PTD | DIS | M0)) /*GPMC_D10*/\
> - ? ? ? MUX_VAL(CP(GPMC_D11), ? ? ? ? ? (IEN ?| PTD | DIS | M0)) /*GPMC_D11*/\
> - ? ? ? MUX_VAL(CP(GPMC_D12), ? ? ? ? ? (IEN ?| PTD | DIS | M0)) /*GPMC_D12*/\
> - ? ? ? MUX_VAL(CP(GPMC_D13), ? ? ? ? ? (IEN ?| PTD | DIS | M0)) /*GPMC_D13*/\
> - ? ? ? MUX_VAL(CP(GPMC_D14), ? ? ? ? ? (IEN ?| PTD | DIS | M0)) /*GPMC_D14*/\
> - ? ? ? MUX_VAL(CP(GPMC_D15), ? ? ? ? ? (IEN ?| PTD | DIS | M0)) /*GPMC_D15*/\
> + ? ? ? MUX_VAL(CP(GPMC_A1), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A1*/\
> + ? ? ? MUX_VAL(CP(GPMC_A2), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A2*/\
> + ? ? ? MUX_VAL(CP(GPMC_A3), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A3*/\
> + ? ? ? MUX_VAL(CP(GPMC_A4), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A4*/\
> + ? ? ? MUX_VAL(CP(GPMC_A5), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A5*/\
> + ? ? ? MUX_VAL(CP(GPMC_A6), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A6*/\
> + ? ? ? MUX_VAL(CP(GPMC_A7), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A7*/\
> + ? ? ? MUX_VAL(CP(GPMC_A8), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A8*/\
> + ? ? ? MUX_VAL(CP(GPMC_A9), ? ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_A9*/\
> + ? ? ? MUX_VAL(CP(GPMC_A10), ? ? ? ? ? (IDIS | PTU | EN ?| M0)) /*GPMC_A10*/\
> + ? ? ? MUX_VAL(CP(GPMC_D0), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D0*/\
> + ? ? ? MUX_VAL(CP(GPMC_D1), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D1*/\
> + ? ? ? MUX_VAL(CP(GPMC_D2), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D2*/\
> + ? ? ? MUX_VAL(CP(GPMC_D3), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D3*/\
> + ? ? ? MUX_VAL(CP(GPMC_D4), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D4*/\
> + ? ? ? MUX_VAL(CP(GPMC_D5), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D5*/\
> + ? ? ? MUX_VAL(CP(GPMC_D6), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D6*/\
> + ? ? ? MUX_VAL(CP(GPMC_D7), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D7*/\
> + ? ? ? MUX_VAL(CP(GPMC_D8), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D8*/\
> + ? ? ? MUX_VAL(CP(GPMC_D9), ? ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_D9*/\
> + ? ? ? MUX_VAL(CP(GPMC_D10), ? ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D10*/\
> + ? ? ? MUX_VAL(CP(GPMC_D11), ? ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D11*/\
> + ? ? ? MUX_VAL(CP(GPMC_D12), ? ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D12*/\
> + ? ? ? MUX_VAL(CP(GPMC_D13), ? ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D13*/\
> + ? ? ? MUX_VAL(CP(GPMC_D14), ? ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D14*/\
> + ? ? ? MUX_VAL(CP(GPMC_D15), ? ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_D15*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NCS0), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_nCS0*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NCS1), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_nCS1*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NCS2), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_nCS2*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NCS3), ? ? ? ? ?(IEN ?| PTU | EN ?| M4)) /*GPIO_54*/\
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* - MMC1_WP*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NCS4), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_nCS4*/\
> - ? ? ? MUX_VAL(CP(GPMC_NCS5), ? ? ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_nCS5*/\
> + ? ? ? MUX_VAL(CP(GPMC_NCS5), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*GPMC_nCS5*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NCS6), ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_nCS6*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NCS7), ? ? ? ? ?(IEN ?| PTU | EN ?| M0)) /*GPMC_nCS7*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NBE1), ? ? ? ? ?(IEN ?| PTD | DIS | M0)) /*GPMC_nCS3*/\
> - ? ? ? MUX_VAL(CP(GPMC_CLK), ? ? ? ? ? (IDIS | PTD | DIS | M0)) /*GPMC_CLK*/\
> + ? ? ? MUX_VAL(CP(GPMC_CLK), ? ? ? ? ? (IDIS | PTU | EN ?| M0)) /*GPMC_CLK*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NADV_ALE), ? ? ?(IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NOE), ? ? ? ? ? (IDIS | PTD | DIS | M0)) /*GPMC_nOE*/\
> ? ? ? ?MUX_VAL(CP(GPMC_NWE), ? ? ? ? ? (IDIS | PTD | DIS | M0)) /*GPMC_nWE*/\
> @@ -127,7 +127,7 @@ const omap3_sysinfo sysinfo = {
> ? ? ? ?MUX_VAL(CP(GPMC_NWP), ? ? ? ? ? (IEN ?| PTD | DIS | M0)) /*GPMC_nWP*/\
> ? ? ? ?MUX_VAL(CP(GPMC_WAIT0), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_WAIT0*/\
> ? ? ? ?MUX_VAL(CP(GPMC_WAIT1), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_WAIT1*/\
> - ? ? ? MUX_VAL(CP(GPMC_WAIT2), ? ? ? ? (IEN ?| PTU | DIS | M4)) /*GPIO_64*/\
> + ? ? ? MUX_VAL(CP(GPMC_WAIT2), ? ? ? ? (IEN ?| PTU | EN ?| M4)) /*GPIO_64*/\
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* - SMSC911X_NRES*/\
> ? ? ? ?MUX_VAL(CP(GPMC_WAIT3), ? ? ? ? (IEN ?| PTU | EN ?| M0)) /*GPMC_nCS3*/\
> ?/*DSS*/\
> @@ -270,8 +270,8 @@ const omap3_sysinfo sysinfo = {
> ? ? ? ?MUX_VAL(CP(MCSPI1_SOMI), ? ? ? ?(IEN ?| PTD | DIS | M0)) /*McSPI1_SOMI */\
> ? ? ? ?MUX_VAL(CP(MCSPI1_CS0), ? ? ? ? (IEN ?| PTD | EN ?| M0)) /*McSPI1_CS0*/\
> ? ? ? ?MUX_VAL(CP(MCSPI1_CS1), ? ? ? ? (IDIS | PTD | EN ?| M0)) /*McSPI1_CS1*/\
> - ? ? ? MUX_VAL(CP(MCSPI1_CS2), ? ? ? ? (IEN ?| PTD | DIS | M4)) /*GPIO_176*/\
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* - SMSC911X_IRQ*/\
> + ? ? ? MUX_VAL(CP(MCSPI1_CS2), ? ? ? ? (IEN ?| PTU | DIS | M4)) /*GPIO_176 */\
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* - LAN_INTR */\
> ? ? ? ?MUX_VAL(CP(MCSPI1_CS3), ? ? ? ? (IEN ?| PTD | DIS | M3)) /*HSUSB2_DATA2*/\
> ? ? ? ?MUX_VAL(CP(MCSPI2_CLK), ? ? ? ? (IEN ?| PTD | DIS | M3)) /*HSUSB2_DATA7*/\
> ? ? ? ?MUX_VAL(CP(MCSPI2_SIMO), ? ? ? ?(IEN ?| PTD | DIS | M3)) /*HSUSB2_DATA4*/\
> @@ -378,4 +378,5 @@ const omap3_sysinfo sysinfo = {
> ? ? ? ?MUX_VAL(CP(SDRC_CKE0), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*sdrc_cke0*/\
> ? ? ? ?MUX_VAL(CP(SDRC_CKE1), ? ? ? ? ?(IDIS | PTU | EN ?| M0)) /*sdrc_cke1*/
>
> +
> ?#endif
> diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
> index 18a729c..b106ec9 100644
> --- a/drivers/net/smc911x.c
> +++ b/drivers/net/smc911x.c
> @@ -146,10 +146,9 @@ static void smc911x_enable(struct eth_device *dev)
>
> ?static int smc911x_init(struct eth_device *dev, bd_t * bd)
> ?{
> - ? ? ? printf(DRIVERNAME ": initializing\n");
> + ? ? ? struct chip_id *id = dev->priv;
>
> - ? ? ? if (smc911x_detect_chip(dev))
> - ? ? ? ? ? ? ? goto err_out;
> + ? ? ? ?printf(DRIVERNAME ": detected %s controller\n", id->name);
>
> ? ? ? ?smc911x_reset(dev);
>
> @@ -162,9 +161,6 @@ static int smc911x_init(struct eth_device *dev, bd_t * bd)
> ? ? ? ?smc911x_enable(dev);
>
> ? ? ? ?return 0;
> -
> -err_out:
> - ? ? ? return -1;
> ?}
>
> ?static int smc911x_send(struct eth_device *dev,
> @@ -268,6 +264,12 @@ int smc911x_initialize(u8 dev_num, int base_addr)
> ? ? ? ?dev->recv = smc911x_rx;
> ? ? ? ?sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
>
> + ? ? ? /* Try to detect chip. Will fail if not present. */
> + ? ? ? if (smc911x_detect_chip(dev)) {
> + ? ? ? ? ? ? ? free(dev);
> + ? ? ? ? ? ? ? return 0;
> + ? ? ? }
> +
> ? ? ? ?eth_register(dev);
> ? ? ? ?return 0;
> ?}
> diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
> index 053e330..d5bca63 100644
> --- a/drivers/net/smc911x.h
> +++ b/drivers/net/smc911x.h
> @@ -441,7 +441,10 @@ static int smc911x_detect_chip(struct eth_device *dev)
> ? ? ? ?unsigned long val, i;
>
> ? ? ? ?val = smc911x_reg_read(dev, BYTE_TEST);
> - ? ? ? if (val != 0x87654321) {
> + ? ? ? if (val == 0xffffffff) {
> + ? ? ? ? ? ? ? /* Special case -- no chip present */
> + ? ? ? ? ? ? ? return -1;
> + ? ? ? } else if (val != 0x87654321) {
> ? ? ? ? ? ? ? ?printf(DRIVERNAME ": Invalid chip endian 0x%08lx\n", val);
> ? ? ? ? ? ? ? ?return -1;
> ? ? ? ?}
> @@ -455,7 +458,7 @@ static int smc911x_detect_chip(struct eth_device *dev)
> ? ? ? ? ? ? ? ?return -1;
> ? ? ? ?}
>
> - ? ? ? printf(DRIVERNAME ": detected %s controller\n", chip_ids[i].name);
> + ? ? ? dev->priv = (void *)&chip_ids[i];
>
> ? ? ? ?return 0;
> ?}
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 07a031b..1836233 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -28,7 +28,7 @@
> ?#define CONFIG_OMAP ? ? ? ? ? ?1 ? ? ? /* in a TI OMAP core */
> ?#define CONFIG_OMAP34XX ? ? ? ? ? ? ? ?1 ? ? ? /* which is a 34XX */
> ?#define CONFIG_OMAP3430 ? ? ? ? ? ? ? ?1 ? ? ? /* which is in a 3430 */
> -#define CONFIG_OMAP3_OVERO ? ? ? ? ? ? 1 ? ? ? /* working with overo */
> +#define CONFIG_OMAP3_OVERO ? ? 1 ? ? ? /* working with overo */
>
> ?#include <asm/arch/cpu.h> ? ? ?/* get chip and board defs */
> ?#include <asm/arch/omap3.h>
> @@ -105,8 +105,8 @@
> ?#undef CONFIG_CMD_FPGA ? ? ? ? /* FPGA configuration Support ? */
> ?#undef CONFIG_CMD_IMI ? ? ? ? ?/* iminfo ? ? ? ? ? ? ? ? ? ? ? */
> ?#undef CONFIG_CMD_IMLS ? ? ? ? /* List all found images ? ? ? ?*/
> -#undef CONFIG_CMD_NET ? ? ? ? ?/* bootp, tftpboot, rarpboot ? ?*/
> ?#undef CONFIG_CMD_NFS ? ? ? ? ?/* NFS support ? ? ? ? ? ? ? ? ?*/
> +#define CONFIG_CMD_NET ? ? ? ? /* bootp, tftpboot, rarpboot ? ?*/
>
> ?#define CONFIG_SYS_NO_FLASH
> ?#define CONFIG_SYS_I2C_SPEED ? ? ? ? ? 100000
> @@ -293,4 +293,17 @@ extern unsigned int boot_flash_sec;
> ?extern unsigned int boot_flash_type;
> ?#endif
>
> +#if defined(CONFIG_CMD_NET)
> +/*----------------------------------------------------------------------------
> + * SMSC9211 Ethernet from SMSC9118 family
> + *----------------------------------------------------------------------------
> + */
> +
> +#define CONFIG_NET_MULTI
> +#define CONFIG_SMC911X ? ? ? ? 1
> +#define CONFIG_SMC911X_32_BIT
> +#define CONFIG_SMC911X_BASE ? ? 0x2C000000
> +
> +#endif /* (CONFIG_CMD_NET) */
> +
> ?#endif ? ? ? ? ? ? ? ? ? ? ? ? /* __CONFIG_H */
> --
> 1.6.0.4
>
>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-05 13:56 ` Steve Sakoman
@ 2009-10-05 14:07 ` Olof Johansson
2009-10-06 0:52 ` Paulraj, Sandeep
2009-10-08 4:50 ` Dirk Behme
0 siblings, 2 replies; 74+ messages in thread
From: Olof Johansson @ 2009-10-05 14:07 UTC (permalink / raw)
To: u-boot
On Oct 5, 2009, at 8:56 AM, Steve Sakoman <sakoman@gmail.com> wrote:
> On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof@lixom.net>
> wrote:
>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>> over tftp.
>>
>> This also refactors the smc911x driver to allow for detecting when
>> the
>> chip is missing. I.e. the detect_chip() function is called earlier
>> and
>> will abort gracefully when the Chip ID read returns all 1's.
>>
>
> Hmm . . . I just tried this on a board without smc911x chip and it
> seems to hang after printing "Net".
>
> Did it work for you in this case? Haven't had time to debug yet, but
> will try to look later today.
The only hardware I have is tobi, which is why I thought I cc:d you as
well as asked others to test with other carriers if they had them.
I guess first thing to find out is if it's the first read that hangs
or what.
-Olof
>
> Steve
>
>>
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>
>> ---
>>
>> Changes since last version:
>> * Incorporated auto-detect based on email discussion
>> * Refactored some smc911x probe to deal with the above
>> * Incorporated the GPIO library changes
>> * Removed the TOBI-specific config option due to the new auto-probe
>>
>>
>> Testing on non-Tobi carrier boards would be appreciated, since I
>> don't
>> have any.
>>
>> board/overo/overo.c | 59 ++++++++++++++++++++++++++++++
>> ++++++++
>> board/overo/overo.h | 63 ++++++++++++++++++++
>> +--------------------
>> drivers/net/smc911x.c | 14 +++++----
>> drivers/net/smc911x.h | 7 +++-
>> include/configs/omap3_overo.h | 17 ++++++++++-
>> 5 files changed, 119 insertions(+), 41 deletions(-)
>>
>> diff --git a/board/overo/overo.c b/board/overo/overo.c
>> index dd6d286..d42dc13 100644
>> --- a/board/overo/overo.c
>> +++ b/board/overo/overo.c
>> @@ -29,13 +29,20 @@
>> * MA 02111-1307 USA
>> */
>> #include <common.h>
>> +#include <netdev.h>
>> #include <twl4030.h>
>> #include <asm/io.h>
>> #include <asm/arch/mux.h>
>> +#include <asm/arch/mem.h>
>> #include <asm/arch/sys_proto.h>
>> +#include <asm/arch/gpio.h>
>> #include <asm/mach-types.h>
>> #include "overo.h"
>>
>> +#if defined(CONFIG_CMD_NET)
>> +static void setup_net_chip(void);
>> +#endif
>> +
>> /*
>> * Routine: board_init
>> * Description: Early hardware init.
>> @@ -62,6 +69,10 @@ int misc_init_r(void)
>> twl4030_power_init();
>> twl4030_led_init();
>>
>> +#if defined(CONFIG_CMD_NET)
>> + setup_net_chip();
>> +#endif
>> +
>> dieid_num_r();
>>
>> return 0;
>> @@ -77,3 +88,51 @@ void set_muxconf_regs(void)
>> {
>> MUX_OVERO();
>> }
>> +
>> +#if defined(CONFIG_CMD_NET)
>> +/*
>> + * 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;
>> +
>> + /* Configure GPMC registers */
>> + writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
>> + writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
>> + writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
>> + writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
>> + writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
>> + writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
>> + writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
>> +
>> + /* 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);
>> +
>> + /* Make GPIO 64 as output pin and send a magic pulse
>> through it */
>> + if (!omap_request_gpio(64)) {
>> + omap_set_gpio_direction(64, 0);
>> + omap_set_gpio_dataout(64, 1);
>> + udelay(1);
>> + omap_set_gpio_dataout(64, 0);
>> + udelay(1);
>> + omap_set_gpio_dataout(64, 1);
>> + }
>> +}
>> +#endif
>> +
>> +int board_eth_init(bd_t *bis)
>> +{
>> + int rc = 0;
>> +#ifdef CONFIG_SMC911X
>> + rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);
>> +#endif
>> + return rc;
>> +}
>> diff --git a/board/overo/overo.h b/board/overo/overo.h
>> index d9fe74e..4c7ac27 100644
>> --- a/board/overo/overo.h
>> +++ b/board/overo/overo.h
>> @@ -83,43 +83,43 @@ const omap3_sysinfo sysinfo = {
>> MUX_VAL(CP(SDRC_DQS2), (IEN | PTD | DIS | M0)) /
>> *SDRC_DQS2*/\
>> MUX_VAL(CP(SDRC_DQS3), (IEN | PTD | DIS | M0)) /
>> *SDRC_DQS3*/\
>> /*GPMC*/\
>> - MUX_VAL(CP(GPMC_A1), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A1*/\
>> - MUX_VAL(CP(GPMC_A2), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A2*/\
>> - MUX_VAL(CP(GPMC_A3), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A3*/\
>> - MUX_VAL(CP(GPMC_A4), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A4*/\
>> - MUX_VAL(CP(GPMC_A5), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A5*/\
>> - MUX_VAL(CP(GPMC_A6), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A6*/\
>> - MUX_VAL(CP(GPMC_A7), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A7*/\
>> - MUX_VAL(CP(GPMC_A8), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A8*/\
>> - MUX_VAL(CP(GPMC_A9), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A9*/\
>> - MUX_VAL(CP(GPMC_A10), (IDIS | PTD | DIS | M0)) /
>> *GPMC_A10*/\
>> - MUX_VAL(CP(GPMC_D0), (IEN | PTD | DIS | M0)) /
>> *GPMC_D0*/\
>> - MUX_VAL(CP(GPMC_D1), (IEN | PTD | DIS | M0)) /
>> *GPMC_D1*/\
>> - MUX_VAL(CP(GPMC_D2), (IEN | PTD | DIS | M0)) /
>> *GPMC_D2*/\
>> - MUX_VAL(CP(GPMC_D3), (IEN | PTD | DIS | M0)) /
>> *GPMC_D3*/\
>> - MUX_VAL(CP(GPMC_D4), (IEN | PTD | DIS | M0)) /
>> *GPMC_D4*/\
>> - MUX_VAL(CP(GPMC_D5), (IEN | PTD | DIS | M0)) /
>> *GPMC_D5*/\
>> - MUX_VAL(CP(GPMC_D6), (IEN | PTD | DIS | M0)) /
>> *GPMC_D6*/\
>> - MUX_VAL(CP(GPMC_D7), (IEN | PTD | DIS | M0)) /
>> *GPMC_D7*/\
>> - MUX_VAL(CP(GPMC_D8), (IEN | PTD | DIS | M0)) /
>> *GPMC_D8*/\
>> - MUX_VAL(CP(GPMC_D9), (IEN | PTD | DIS | M0)) /
>> *GPMC_D9*/\
>> - MUX_VAL(CP(GPMC_D10), (IEN | PTD | DIS | M0)) /
>> *GPMC_D10*/\
>> - MUX_VAL(CP(GPMC_D11), (IEN | PTD | DIS | M0)) /
>> *GPMC_D11*/\
>> - MUX_VAL(CP(GPMC_D12), (IEN | PTD | DIS | M0)) /
>> *GPMC_D12*/\
>> - MUX_VAL(CP(GPMC_D13), (IEN | PTD | DIS | M0)) /
>> *GPMC_D13*/\
>> - MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS | M0)) /
>> *GPMC_D14*/\
>> - MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS | M0)) /
>> *GPMC_D15*/\
>> + MUX_VAL(CP(GPMC_A1), (IDIS | PTU | EN | M0)) /
>> *GPMC_A1*/\
>> + MUX_VAL(CP(GPMC_A2), (IDIS | PTU | EN | M0)) /
>> *GPMC_A2*/\
>> + MUX_VAL(CP(GPMC_A3), (IDIS | PTU | EN | M0)) /
>> *GPMC_A3*/\
>> + MUX_VAL(CP(GPMC_A4), (IDIS | PTU | EN | M0)) /
>> *GPMC_A4*/\
>> + MUX_VAL(CP(GPMC_A5), (IDIS | PTU | EN | M0)) /
>> *GPMC_A5*/\
>> + MUX_VAL(CP(GPMC_A6), (IDIS | PTU | EN | M0)) /
>> *GPMC_A6*/\
>> + MUX_VAL(CP(GPMC_A7), (IDIS | PTU | EN | M0)) /
>> *GPMC_A7*/\
>> + MUX_VAL(CP(GPMC_A8), (IDIS | PTU | EN | M0)) /
>> *GPMC_A8*/\
>> + MUX_VAL(CP(GPMC_A9), (IDIS | PTU | EN | M0)) /
>> *GPMC_A9*/\
>> + MUX_VAL(CP(GPMC_A10), (IDIS | PTU | EN | M0)) /
>> *GPMC_A10*/\
>> + MUX_VAL(CP(GPMC_D0), (IEN | PTU | EN | M0)) /
>> *GPMC_D0*/\
>> + MUX_VAL(CP(GPMC_D1), (IEN | PTU | EN | M0)) /
>> *GPMC_D1*/\
>> + MUX_VAL(CP(GPMC_D2), (IEN | PTU | EN | M0)) /
>> *GPMC_D2*/\
>> + MUX_VAL(CP(GPMC_D3), (IEN | PTU | EN | M0)) /
>> *GPMC_D3*/\
>> + MUX_VAL(CP(GPMC_D4), (IEN | PTU | EN | M0)) /
>> *GPMC_D4*/\
>> + MUX_VAL(CP(GPMC_D5), (IEN | PTU | EN | M0)) /
>> *GPMC_D5*/\
>> + MUX_VAL(CP(GPMC_D6), (IEN | PTU | EN | M0)) /
>> *GPMC_D6*/\
>> + MUX_VAL(CP(GPMC_D7), (IEN | PTU | EN | M0)) /
>> *GPMC_D7*/\
>> + MUX_VAL(CP(GPMC_D8), (IEN | PTU | EN | M0)) /
>> *GPMC_D8*/\
>> + MUX_VAL(CP(GPMC_D9), (IEN | PTU | EN | M0)) /
>> *GPMC_D9*/\
>> + MUX_VAL(CP(GPMC_D10), (IEN | PTU | EN | M0)) /
>> *GPMC_D10*/\
>> + MUX_VAL(CP(GPMC_D11), (IEN | PTU | EN | M0)) /
>> *GPMC_D11*/\
>> + MUX_VAL(CP(GPMC_D12), (IEN | PTU | EN | M0)) /
>> *GPMC_D12*/\
>> + MUX_VAL(CP(GPMC_D13), (IEN | PTU | EN | M0)) /
>> *GPMC_D13*/\
>> + MUX_VAL(CP(GPMC_D14), (IEN | PTU | EN | M0)) /
>> *GPMC_D14*/\
>> + MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) /
>> *GPMC_D15*/\
>> MUX_VAL(CP(GPMC_NCS0), (IDIS | PTU | EN | M0)) /
>> *GPMC_nCS0*/\
>> MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN | M0)) /
>> *GPMC_nCS1*/\
>> MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | EN | M0)) /
>> *GPMC_nCS2*/\
>> MUX_VAL(CP(GPMC_NCS3), (IEN | PTU | EN | M4)) /
>> *GPIO_54*/\
>> /*
>> - MMC1_WP*/\
>> MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | EN | M0)) /
>> *GPMC_nCS4*/\
>> - MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS | M0)) /
>> *GPMC_nCS5*/\
>> + MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) /
>> *GPMC_nCS5*/\
>> MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M0)) /
>> *GPMC_nCS6*/\
>> MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M0)) /
>> *GPMC_nCS7*/\
>> MUX_VAL(CP(GPMC_NBE1), (IEN | PTD | DIS | M0)) /
>> *GPMC_nCS3*/\
>> - MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS | M0)) /
>> *GPMC_CLK*/\
>> + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN | M0)) /
>> *GPMC_CLK*/\
>> MUX_VAL(CP(GPMC_NADV_ALE), (IDIS | PTD | DIS | M0)) /
>> *GPMC_nADV_ALE*/\
>> MUX_VAL(CP(GPMC_NOE), (IDIS | PTD | DIS | M0)) /
>> *GPMC_nOE*/\
>> MUX_VAL(CP(GPMC_NWE), (IDIS | PTD | DIS | M0)) /
>> *GPMC_nWE*/\
>> @@ -127,7 +127,7 @@ const omap3_sysinfo sysinfo = {
>> MUX_VAL(CP(GPMC_NWP), (IEN | PTD | DIS | M0)) /
>> *GPMC_nWP*/\
>> MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN | M0)) /
>> *GPMC_WAIT0*/\
>> MUX_VAL(CP(GPMC_WAIT1), (IEN | PTU | EN | M0)) /
>> *GPMC_WAIT1*/\
>> - MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | DIS | M4)) /
>> *GPIO_64*/\
>> + MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN | M4)) /
>> *GPIO_64*/\
>> /*
>> - SMSC911X_NRES*/\
>> MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN | M0)) /
>> *GPMC_nCS3*/\
>> /*DSS*/\
>> @@ -270,8 +270,8 @@ const omap3_sysinfo sysinfo = {
>> MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTD | DIS | M0)) /
>> *McSPI1_SOMI */\
>> MUX_VAL(CP(MCSPI1_CS0), (IEN | PTD | EN | M0)) /
>> *McSPI1_CS0*/\
>> MUX_VAL(CP(MCSPI1_CS1), (IDIS | PTD | EN | M0)) /
>> *McSPI1_CS1*/\
>> - MUX_VAL(CP(MCSPI1_CS2), (IEN | PTD | DIS | M4)) /
>> *GPIO_176*/\
>> - /*
>> - SMSC911X_IRQ*/\
>> + MUX_VAL(CP(MCSPI1_CS2), (IEN | PTU | DIS | M4)) /
>> *GPIO_176 */\
>> + /*
>> - LAN_INTR */\
>> MUX_VAL(CP(MCSPI1_CS3), (IEN | PTD | DIS | M3)) /
>> *HSUSB2_DATA2*/\
>> MUX_VAL(CP(MCSPI2_CLK), (IEN | PTD | DIS | M3)) /
>> *HSUSB2_DATA7*/\
>> MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTD | DIS | M3)) /
>> *HSUSB2_DATA4*/\
>> @@ -378,4 +378,5 @@ const omap3_sysinfo sysinfo = {
>> MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /
>> *sdrc_cke0*/\
>> MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /
>> *sdrc_cke1*/
>>
>> +
>> #endif
>> diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
>> index 18a729c..b106ec9 100644
>> --- a/drivers/net/smc911x.c
>> +++ b/drivers/net/smc911x.c
>> @@ -146,10 +146,9 @@ static void smc911x_enable(struct eth_device
>> *dev)
>>
>> static int smc911x_init(struct eth_device *dev, bd_t * bd)
>> {
>> - printf(DRIVERNAME ": initializing\n");
>> + struct chip_id *id = dev->priv;
>>
>> - if (smc911x_detect_chip(dev))
>> - goto err_out;
>> + printf(DRIVERNAME ": detected %s controller\n", id->name);
>>
>> smc911x_reset(dev);
>>
>> @@ -162,9 +161,6 @@ static int smc911x_init(struct eth_device *dev,
>> bd_t * bd)
>> smc911x_enable(dev);
>>
>> return 0;
>> -
>> -err_out:
>> - return -1;
>> }
>>
>> static int smc911x_send(struct eth_device *dev,
>> @@ -268,6 +264,12 @@ int smc911x_initialize(u8 dev_num, int
>> base_addr)
>> dev->recv = smc911x_rx;
>> sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
>>
>> + /* Try to detect chip. Will fail if not present. */
>> + if (smc911x_detect_chip(dev)) {
>> + free(dev);
>> + return 0;
>> + }
>> +
>> eth_register(dev);
>> return 0;
>> }
>> diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
>> index 053e330..d5bca63 100644
>> --- a/drivers/net/smc911x.h
>> +++ b/drivers/net/smc911x.h
>> @@ -441,7 +441,10 @@ static int smc911x_detect_chip(struct
>> eth_device *dev)
>> unsigned long val, i;
>>
>> val = smc911x_reg_read(dev, BYTE_TEST);
>> - if (val != 0x87654321) {
>> + if (val == 0xffffffff) {
>> + /* Special case -- no chip present */
>> + return -1;
>> + } else if (val != 0x87654321) {
>> printf(DRIVERNAME ": Invalid chip endian 0x%08lx\n",
>> val);
>> return -1;
>> }
>> @@ -455,7 +458,7 @@ static int smc911x_detect_chip(struct
>> eth_device *dev)
>> return -1;
>> }
>>
>> - printf(DRIVERNAME ": detected %s controller\n", chip_ids
>> [i].name);
>> + dev->priv = (void *)&chip_ids[i];
>>
>> return 0;
>> }
>> diff --git a/include/configs/omap3_overo.h b/include/configs/
>> omap3_overo.h
>> index 07a031b..1836233 100644
>> --- a/include/configs/omap3_overo.h
>> +++ b/include/configs/omap3_overo.h
>> @@ -28,7 +28,7 @@
>> #define CONFIG_OMAP 1 /* in a TI OMAP core */
>> #define CONFIG_OMAP34XX 1 /* which is a 34XX */
>> #define CONFIG_OMAP3430 1 /* which is in a
>> 3430 */
>> -#define CONFIG_OMAP3_OVERO 1 /* working with
>> overo */
>> +#define CONFIG_OMAP3_OVERO 1 /* working with overo */
>>
>> #include <asm/arch/cpu.h> /* get chip and board defs */
>> #include <asm/arch/omap3.h>
>> @@ -105,8 +105,8 @@
>> #undef CONFIG_CMD_FPGA /* FPGA configuration Support */
>> #undef CONFIG_CMD_IMI /* iminfo */
>> #undef CONFIG_CMD_IMLS /* List all found images */
>> -#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
>> #undef CONFIG_CMD_NFS /* NFS support */
>> +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
>>
>> #define CONFIG_SYS_NO_FLASH
>> #define CONFIG_SYS_I2C_SPEED 100000
>> @@ -293,4 +293,17 @@ extern unsigned int boot_flash_sec;
>> extern unsigned int boot_flash_type;
>> #endif
>>
>> +#if defined(CONFIG_CMD_NET)
>> +/
>> *--
>> ---
>> ---
>> --------------------------------------------------------------------
>> + * SMSC9211 Ethernet from SMSC9118 family
>> +
>> *--
>> ---
>> ---
>> --------------------------------------------------------------------
>> + */
>> +
>> +#define CONFIG_NET_MULTI
>> +#define CONFIG_SMC911X 1
>> +#define CONFIG_SMC911X_32_BIT
>> +#define CONFIG_SMC911X_BASE 0x2C000000
>> +
>> +#endif /* (CONFIG_CMD_NET) */
>> +
>> #endif /* __CONFIG_H */
>> --
>> 1.6.0.4
>>
>>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-05 14:07 ` Olof Johansson
@ 2009-10-06 0:52 ` Paulraj, Sandeep
2009-10-08 4:50 ` Dirk Behme
1 sibling, 0 replies; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-10-06 0:52 UTC (permalink / raw)
To: u-boot
> Subject: Re: [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
>
> On Oct 5, 2009, at 8:56 AM, Steve Sakoman <sakoman@gmail.com> wrote:
>
> > On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof@lixom.net>
> > wrote:
> >> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> >> over tftp.
> >>
> >> This also refactors the smc911x driver to allow for detecting when
> >> the
> >> chip is missing. I.e. the detect_chip() function is called earlier
> >> and
> >> will abort gracefully when the Chip ID read returns all 1's.
> >>
> >
> > Hmm . . . I just tried this on a board without smc911x chip and it
> > seems to hang after printing "Net".
> >
> > Did it work for you in this case? Haven't had time to debug yet, but
> > will try to look later today.
>
> The only hardware I have is tobi, which is why I thought I cc:d you as
> well as asked others to test with other carriers if they had them.
>
> I guess first thing to find out is if it's the first read that hangs
> or what.
>
>
> -Olof
>
> >
> > Steve
I thought that I'd let everybody know that I have rebased and the ti tree is in sync with Tom's u-boot-arm.
Thanks,
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-05 14:07 ` Olof Johansson
2009-10-06 0:52 ` Paulraj, Sandeep
@ 2009-10-08 4:50 ` Dirk Behme
2009-10-08 4:56 ` Steve Sakoman
1 sibling, 1 reply; 74+ messages in thread
From: Dirk Behme @ 2009-10-08 4:50 UTC (permalink / raw)
To: u-boot
Olof Johansson wrote:
> On Oct 5, 2009, at 8:56 AM, Steve Sakoman <sakoman@gmail.com> wrote:
>
>> On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof@lixom.net> wrote:
>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>> over tftp.
>>>
>>> This also refactors the smc911x driver to allow for detecting when the
>>> chip is missing. I.e. the detect_chip() function is called earlier and
>>> will abort gracefully when the Chip ID read returns all 1's.
>>>
>>
>> Hmm . . . I just tried this on a board without smc911x chip and it
>> seems to hang after printing "Net".
>>
>> Did it work for you in this case? Haven't had time to debug yet, but
>> will try to look later today.
>
> The only hardware I have is tobi, which is why I thought I cc:d you as
> well as asked others to test with other carriers if they had them.
>
> I guess first thing to find out is if it's the first read that hangs or
> what.
Any idea how to go on with this? I have no Tobi, so unfortunately I
can't help here.
Best regards
Dirk
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 4:50 ` Dirk Behme
@ 2009-10-08 4:56 ` Steve Sakoman
2009-10-08 5:05 ` Dirk Behme
0 siblings, 1 reply; 74+ messages in thread
From: Steve Sakoman @ 2009-10-08 4:56 UTC (permalink / raw)
To: u-boot
On Wed, Oct 7, 2009 at 9:50 PM, Dirk Behme <dirk.behme@googlemail.com> wrote:
> Olof Johansson wrote:
>>
>> On Oct 5, 2009, at 8:56 AM, Steve Sakoman <sakoman@gmail.com> wrote:
>>
>>> On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof@lixom.net> wrote:
>>>>
>>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>>> over tftp.
>>>>
>>>> This also refactors the smc911x driver to allow for detecting when the
>>>> chip is missing. I.e. the detect_chip() function is called earlier and
>>>> will abort gracefully when the Chip ID read returns all 1's.
>>>>
>>>
>>> Hmm . . . I just tried this on a board without smc911x chip and it
>>> seems to hang after printing "Net".
>>>
>>> Did it work for you in this case? ?Haven't had time to debug yet, but
>>> will try to look later today.
>>
>> The only hardware I have is tobi, which is why I thought I cc:d you as
>> well as asked others to test with other carriers if they had them.
>>
>> I guess first thing to find out is if it's the first read that hangs or
>> what.
>
> Any idea how to go on with this? I have no Tobi, so unfortunately I can't
> help here.
I've been testing the patch below, which seems to work with all boards
I've tried. It simply moves the test a bit earlier.
Steve
--- git/drivers/net/smc911x.c-orig 2009-09-29 16:24:48.000000000 -0700
+++ git/drivers/net/smc911x.c 2009-10-05 20:41:55.000000000 -0700
@@ -249,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int b
dev->iobase = base_addr;
+ /* Try to detect chip. Will fail if not present. */
+ if (smc911x_detect_chip(dev)) {
+ free(dev);
+ return 0;
+ }
+
addrh = smc911x_get_mac_csr(dev, ADDRH);
addrl = smc911x_get_mac_csr(dev, ADDRL);
dev->enetaddr[0] = addrl;
@@ -264,12 +270,6 @@ int smc911x_initialize(u8 dev_num, int b
dev->recv = smc911x_rx;
sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
- /* Try to detect chip. Will fail if not present. */
- if (smc911x_detect_chip(dev)) {
- free(dev);
- return 0;
- }
-
eth_register(dev);
return 0;
}
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 4:56 ` Steve Sakoman
@ 2009-10-08 5:05 ` Dirk Behme
2009-10-08 6:59 ` Olof Johansson
0 siblings, 1 reply; 74+ messages in thread
From: Dirk Behme @ 2009-10-08 5:05 UTC (permalink / raw)
To: u-boot
Steve Sakoman wrote:
> On Wed, Oct 7, 2009 at 9:50 PM, Dirk Behme <dirk.behme@googlemail.com> wrote:
>> Olof Johansson wrote:
>>> On Oct 5, 2009, at 8:56 AM, Steve Sakoman <sakoman@gmail.com> wrote:
>>>
>>>> On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof@lixom.net> wrote:
>>>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>>>> over tftp.
>>>>>
>>>>> This also refactors the smc911x driver to allow for detecting when the
>>>>> chip is missing. I.e. the detect_chip() function is called earlier and
>>>>> will abort gracefully when the Chip ID read returns all 1's.
>>>>>
>>>> Hmm . . . I just tried this on a board without smc911x chip and it
>>>> seems to hang after printing "Net".
>>>>
>>>> Did it work for you in this case? Haven't had time to debug yet, but
>>>> will try to look later today.
>>> The only hardware I have is tobi, which is why I thought I cc:d you as
>>> well as asked others to test with other carriers if they had them.
>>>
>>> I guess first thing to find out is if it's the first read that hangs or
>>> what.
>> Any idea how to go on with this? I have no Tobi, so unfortunately I can't
>> help here.
>
> I've been testing the patch below, which seems to work with all boards
> I've tried. It simply moves the test a bit earlier.
Great, thanks!
Olof: Could you test this? If it works for you, too, we should apply
it on top of u-boot-ti (and u-boot-arm/next) then (or modify initial
[1] ?).
Most probably we need a Signed-off-by then ;)
Thanks
Dirk
[1]
http://git.denx.de/?p=u-boot/u-boot-arm.git;a=commit;h=4eb3af078267e103fb957cb831497cf7670fb3f4
> Steve
>
> --- git/drivers/net/smc911x.c-orig 2009-09-29 16:24:48.000000000 -0700
> +++ git/drivers/net/smc911x.c 2009-10-05 20:41:55.000000000 -0700
> @@ -249,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int b
>
> dev->iobase = base_addr;
>
> + /* Try to detect chip. Will fail if not present. */
> + if (smc911x_detect_chip(dev)) {
> + free(dev);
> + return 0;
> + }
> +
> addrh = smc911x_get_mac_csr(dev, ADDRH);
> addrl = smc911x_get_mac_csr(dev, ADDRL);
> dev->enetaddr[0] = addrl;
> @@ -264,12 +270,6 @@ int smc911x_initialize(u8 dev_num, int b
> dev->recv = smc911x_rx;
> sprintf(dev->name, "%s-%hu", DRIVERNAME, dev_num);
>
> - /* Try to detect chip. Will fail if not present. */
> - if (smc911x_detect_chip(dev)) {
> - free(dev);
> - return 0;
> - }
> -
> eth_register(dev);
> return 0;
> }
>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 5:05 ` Dirk Behme
@ 2009-10-08 6:59 ` Olof Johansson
2009-10-08 14:42 ` Paulraj, Sandeep
0 siblings, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-10-08 6:59 UTC (permalink / raw)
To: u-boot
On Thu, Oct 08, 2009 at 07:05:18AM +0200, Dirk Behme wrote:
> Steve Sakoman wrote:
>> On Wed, Oct 7, 2009 at 9:50 PM, Dirk Behme <dirk.behme@googlemail.com> wrote:
>>> Olof Johansson wrote:
>>>> On Oct 5, 2009, at 8:56 AM, Steve Sakoman <sakoman@gmail.com> wrote:
>>>>
>>>>> On Sat, Sep 26, 2009 at 2:14 PM, Olof Johansson <olof@lixom.net> wrote:
>>>>>> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
>>>>>> over tftp.
>>>>>>
>>>>>> This also refactors the smc911x driver to allow for detecting when the
>>>>>> chip is missing. I.e. the detect_chip() function is called earlier and
>>>>>> will abort gracefully when the Chip ID read returns all 1's.
>>>>>>
>>>>> Hmm . . . I just tried this on a board without smc911x chip and it
>>>>> seems to hang after printing "Net".
>>>>>
>>>>> Did it work for you in this case? Haven't had time to debug yet, but
>>>>> will try to look later today.
>>>> The only hardware I have is tobi, which is why I thought I cc:d you as
>>>> well as asked others to test with other carriers if they had them.
>>>>
>>>> I guess first thing to find out is if it's the first read that hangs or
>>>> what.
>>> Any idea how to go on with this? I have no Tobi, so unfortunately I can't
>>> help here.
>>
>> I've been testing the patch below, which seems to work with all boards
>> I've tried. It simply moves the test a bit earlier.
>
> Great, thanks!
>
> Olof: Could you test this? If it works for you, too, we should apply it
> on top of u-boot-ti (and u-boot-arm/next) then (or modify initial [1] ?).
>
> Most probably we need a Signed-off-by then ;)
Take your pick. Either a:
Acked-by: Olof Johansson <olof@lixom.net>
Or apply the below revised patch instead.
SMC911X: Add chip auto detection
Refactor the smc911x driver to allow for detecting when the chip is missing.
I.e. the detect_chip() function is called earlier and will abort gracefully
when the Chip ID read returns all 1's.
Based on testing from Steve Sakoman, the test has been moved up in the
function to not hang on systems without ethernet.
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
---
drivers/net/smc911x.c | 14 ++++++++------
drivers/net/smc911x.h | 7 +++++--
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 18a729c..df73478 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -146,10 +146,9 @@ static void smc911x_enable(struct eth_device *dev)
static int smc911x_init(struct eth_device *dev, bd_t * bd)
{
- printf(DRIVERNAME ": initializing\n");
+ struct chip_id *id = dev->priv;
- if (smc911x_detect_chip(dev))
- goto err_out;
+ printf(DRIVERNAME ": detected %s controller\n", id->name);
smc911x_reset(dev);
@@ -162,9 +161,6 @@ static int smc911x_init(struct eth_device *dev, bd_t * bd)
smc911x_enable(dev);
return 0;
-
-err_out:
- return -1;
}
static int smc911x_send(struct eth_device *dev,
@@ -253,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int base_addr)
dev->iobase = base_addr;
+ /* Try to detect chip. Will fail if not present. */
+ if (smc911x_detect_chip(dev)) {
+ free(dev);
+ return 0;
+ }
+
addrh = smc911x_get_mac_csr(dev, ADDRH);
addrl = smc911x_get_mac_csr(dev, ADDRL);
dev->enetaddr[0] = addrl;
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index 053e330..d5bca63 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -441,7 +441,10 @@ static int smc911x_detect_chip(struct eth_device *dev)
unsigned long val, i;
val = smc911x_reg_read(dev, BYTE_TEST);
- if (val != 0x87654321) {
+ if (val == 0xffffffff) {
+ /* Special case -- no chip present */
+ return -1;
+ } else if (val != 0x87654321) {
printf(DRIVERNAME ": Invalid chip endian 0x%08lx\n", val);
return -1;
}
@@ -455,7 +458,7 @@ static int smc911x_detect_chip(struct eth_device *dev)
return -1;
}
- printf(DRIVERNAME ": detected %s controller\n", chip_ids[i].name);
+ dev->priv = (void *)&chip_ids[i];
return 0;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 6:59 ` Olof Johansson
@ 2009-10-08 14:42 ` Paulraj, Sandeep
2009-10-08 17:08 ` Ben Warren
0 siblings, 1 reply; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-10-08 14:42 UTC (permalink / raw)
To: u-boot
> > Most probably we need a Signed-off-by then ;)
>
> Take your pick. Either a:
>
> Acked-by: Olof Johansson <olof@lixom.net>
>
> Or apply the below revised patch instead.
>
>
> SMC911X: Add chip auto detection
>
> Refactor the smc911x driver to allow for detecting when the chip is
> missing.
> I.e. the detect_chip() function is called earlier and will abort
> gracefully
> when the Chip ID read returns all 1's.
>
> Based on testing from Steve Sakoman, the test has been moved up in the
> function to not hang on systems without ethernet.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
> Acked-by: Ben Warren <biggerbadderben@gmail.com>
Are we sure we have Ben's ACK.
I can't see an e-mail from him today.
Or am I missing something?
> ---
> drivers/net/smc911x.c | 14 ++++++++------
> drivers/net/smc911x.h | 7 +++++--
> 2 files changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
> index 18a729c..df73478 100644
> --- a/drivers/net/smc911x.c
> +++ b/drivers/net/smc911x.c
> @@ -146,10 +146,9 @@ static void smc911x_enable(struct eth_device *dev)
>
> static int smc911x_init(struct eth_device *dev, bd_t * bd)
> {
> - printf(DRIVERNAME ": initializing\n");
> + struct chip_id *id = dev->priv;
>
> - if (smc911x_detect_chip(dev))
> - goto err_out;
> + printf(DRIVERNAME ": detected %s controller\n", id->name);
>
> smc911x_reset(dev);
>
> @@ -162,9 +161,6 @@ static int smc911x_init(struct eth_device *dev, bd_t *
> bd)
> smc911x_enable(dev);
>
> return 0;
> -
> -err_out:
> - return -1;
> }
>
> static int smc911x_send(struct eth_device *dev,
> @@ -253,6 +249,12 @@ int smc911x_initialize(u8 dev_num, int base_addr)
>
> dev->iobase = base_addr;
>
> + /* Try to detect chip. Will fail if not present. */
> + if (smc911x_detect_chip(dev)) {
> + free(dev);
> + return 0;
> + }
> +
> addrh = smc911x_get_mac_csr(dev, ADDRH);
> addrl = smc911x_get_mac_csr(dev, ADDRL);
> dev->enetaddr[0] = addrl;
> diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
> index 053e330..d5bca63 100644
> --- a/drivers/net/smc911x.h
> +++ b/drivers/net/smc911x.h
> @@ -441,7 +441,10 @@ static int smc911x_detect_chip(struct eth_device
> *dev)
> unsigned long val, i;
>
> val = smc911x_reg_read(dev, BYTE_TEST);
> - if (val != 0x87654321) {
> + if (val == 0xffffffff) {
> + /* Special case -- no chip present */
> + return -1;
> + } else if (val != 0x87654321) {
> printf(DRIVERNAME ": Invalid chip endian 0x%08lx\n", val);
> return -1;
> }
> @@ -455,7 +458,7 @@ static int smc911x_detect_chip(struct eth_device *dev)
> return -1;
> }
>
> - printf(DRIVERNAME ": detected %s controller\n", chip_ids[i].name);
> + dev->priv = (void *)&chip_ids[i];
>
> return 0;
> }
> --
> 1.6.3.3
>
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 14:42 ` Paulraj, Sandeep
@ 2009-10-08 17:08 ` Ben Warren
2009-10-08 17:19 ` Paulraj, Sandeep
2009-10-08 19:21 ` Olof Johansson
0 siblings, 2 replies; 74+ messages in thread
From: Ben Warren @ 2009-10-08 17:08 UTC (permalink / raw)
To: u-boot
Paulraj, Sandeep wrote:
>>> Most probably we need a Signed-off-by then ;)
>>>
>> Take your pick. Either a:
>>
>> Acked-by: Olof Johansson <olof@lixom.net>
>>
>> Or apply the below revised patch instead.
>>
>>
>> SMC911X: Add chip auto detection
>>
>> Refactor the smc911x driver to allow for detecting when the chip is
>> missing.
>> I.e. the detect_chip() function is called earlier and will abort
>> gracefully
>> when the Chip ID read returns all 1's.
>>
>> Based on testing from Steve Sakoman, the test has been moved up in the
>> function to not hang on systems without ethernet.
>>
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
>> Acked-by: Ben Warren <biggerbadderben@gmail.com>
>>
>
> Are we sure we have Ben's ACK.
>
>
Yeah. I can't find it in my 'Sent' folder, but seem to remember ACK'ing
this already. If not, consider this an ACK.
regards,
Ben
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 17:08 ` Ben Warren
@ 2009-10-08 17:19 ` Paulraj, Sandeep
2009-10-08 19:21 ` Olof Johansson
1 sibling, 0 replies; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-10-08 17:19 UTC (permalink / raw)
To: u-boot
> Paulraj, Sandeep wrote:
> >>> Most probably we need a Signed-off-by then ;)
> >>>
> >> Take your pick. Either a:
> >>
> >> Acked-by: Olof Johansson <olof@lixom.net>
> >>
> >> Or apply the below revised patch instead.
> >>
> >>
> >> SMC911X: Add chip auto detection
> >>
> >> Refactor the smc911x driver to allow for detecting when the chip is
> >> missing.
> >> I.e. the detect_chip() function is called earlier and will abort
> >> gracefully
> >> when the Chip ID read returns all 1's.
> >>
> >> Based on testing from Steve Sakoman, the test has been moved up in the
> >> function to not hang on systems without ethernet.
> >>
> >> Signed-off-by: Olof Johansson <olof@lixom.net>
> >> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
> >> Acked-by: Ben Warren <biggerbadderben@gmail.com>
> >>
> >
> > Are we sure we have Ben's ACK.
> >
> >
> Yeah. I can't find it in my 'Sent' folder, but seem to remember ACK'ing
> this already. If not, consider this an ACK.
Ok Thanks.
This is a bug fix. You had ACKed the original version.
I'll apply this to u-boot-ti
>
> regards,
> Ben
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 17:08 ` Ben Warren
2009-10-08 17:19 ` Paulraj, Sandeep
@ 2009-10-08 19:21 ` Olof Johansson
2009-10-10 16:42 ` Paulraj, Sandeep
1 sibling, 1 reply; 74+ messages in thread
From: Olof Johansson @ 2009-10-08 19:21 UTC (permalink / raw)
To: u-boot
On Thu, Oct 08, 2009 at 10:08:08AM -0700, Ben Warren wrote:
> Paulraj, Sandeep wrote:
>>>> Most probably we need a Signed-off-by then ;)
>>>>
>>> Take your pick. Either a:
>>>
>>> Acked-by: Olof Johansson <olof@lixom.net>
>>>
>>> Or apply the below revised patch instead.
>>>
>>>
>>> SMC911X: Add chip auto detection
>>>
>>> Refactor the smc911x driver to allow for detecting when the chip is
>>> missing.
>>> I.e. the detect_chip() function is called earlier and will abort
>>> gracefully
>>> when the Chip ID read returns all 1's.
>>>
>>> Based on testing from Steve Sakoman, the test has been moved up in the
>>> function to not hang on systems without ethernet.
>>>
>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
>>> Acked-by: Ben Warren <biggerbadderben@gmail.com>
>>>
>>
>> Are we sure we have Ben's ACK.
>>
>>
> Yeah. I can't find it in my 'Sent' folder, but seem to remember ACK'ing
> this already. If not, consider this an ACK.
I just brought it forward from the previous patch, and I wasn't the one
who added it back then. My bad, I should have dropped all acks based on
the new contents.
-Olof
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-08 19:21 ` Olof Johansson
@ 2009-10-10 16:42 ` Paulraj, Sandeep
2009-10-10 17:58 ` Dirk Behme
0 siblings, 1 reply; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-10-10 16:42 UTC (permalink / raw)
To: u-boot
>
> On Thu, Oct 08, 2009 at 10:08:08AM -0700, Ben Warren wrote:
> > Paulraj, Sandeep wrote:
> >>>> Most probably we need a Signed-off-by then ;)
> >>>>
> >>> Take your pick. Either a:
> >>>
> >>> Acked-by: Olof Johansson <olof@lixom.net>
> >>>
> >>> Or apply the below revised patch instead.
> >>>
> >>>
> >>> SMC911X: Add chip auto detection
> >>>
> >>> Refactor the smc911x driver to allow for detecting when the chip is
> >>> missing.
> >>> I.e. the detect_chip() function is called earlier and will abort
> >>> gracefully
> >>> when the Chip ID read returns all 1's.
> >>>
> >>> Based on testing from Steve Sakoman, the test has been moved up in the
> >>> function to not hang on systems without ethernet.
> >>>
> >>> Signed-off-by: Olof Johansson <olof@lixom.net>
> >>> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
> >>> Acked-by: Ben Warren <biggerbadderben@gmail.com>
> >>>
> >>
> >> Are we sure we have Ben's ACK.
> >>
> >>
> > Yeah. I can't find it in my 'Sent' folder, but seem to remember ACK'ing
> > this already. If not, consider this an ACK.
>
> I just brought it forward from the previous patch, and I wasn't the one
> who added it back then. My bad, I should have dropped all acks based on
> the new contents.
>
>
> -Olof
I'm a little confused :-)
I realized when I was trying to apply this patch that this is already part of the u-boot-ti and u-boot-arm trees.
I am referring to
http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=4eb3af078267e103fb957cb831497cf7670fb3f4
The patch in this e-mail chain was supposed to fix a bug discovered after Tom updated his tree.
Since this patch was already part of u-boot-ti and u-boot-arm trees, I don't see how this fixes a bug.
Can the u-boot-ti tree be checked to see if it works with / without TOBI?
I don't have a single OMAP3 EVM(I work only on DaVinci's) and hence can't test myself.
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-10 16:42 ` Paulraj, Sandeep
@ 2009-10-10 17:58 ` Dirk Behme
2009-10-10 18:24 ` Paulraj, Sandeep
0 siblings, 1 reply; 74+ messages in thread
From: Dirk Behme @ 2009-10-10 17:58 UTC (permalink / raw)
To: u-boot
Paulraj, Sandeep wrote:
>> On Thu, Oct 08, 2009 at 10:08:08AM -0700, Ben Warren wrote:
>>> Paulraj, Sandeep wrote:
>>>>>> Most probably we need a Signed-off-by then ;)
>>>>>>
>>>>> Take your pick. Either a:
>>>>>
>>>>> Acked-by: Olof Johansson <olof@lixom.net>
>>>>>
>>>>> Or apply the below revised patch instead.
>>>>>
>>>>>
>>>>> SMC911X: Add chip auto detection
>>>>>
>>>>> Refactor the smc911x driver to allow for detecting when the chip is
>>>>> missing.
>>>>> I.e. the detect_chip() function is called earlier and will abort
>>>>> gracefully
>>>>> when the Chip ID read returns all 1's.
>>>>>
>>>>> Based on testing from Steve Sakoman, the test has been moved up in the
>>>>> function to not hang on systems without ethernet.
>>>>>
>>>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>>>> Acked-by: Dirk Behme <dirk.behme@googlemail.com>
>>>>> Acked-by: Ben Warren <biggerbadderben@gmail.com>
>>>>>
>>>> Are we sure we have Ben's ACK.
>>>>
>>>>
>>> Yeah. I can't find it in my 'Sent' folder, but seem to remember ACK'ing
>>> this already. If not, consider this an ACK.
>> I just brought it forward from the previous patch, and I wasn't the one
>> who added it back then. My bad, I should have dropped all acks based on
>> the new contents.
>>
>>
>> -Olof
> I'm a little confused :-)
> I realized when I was trying to apply this patch that this is already part of the u-boot-ti and u-boot-arm trees.
>
> I am referring to
> http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=4eb3af078267e103fb957cb831497cf7670fb3f4
>
> The patch in this e-mail chain was supposed to fix a bug discovered after Tom updated his tree.
>
> Since this patch was already part of u-boot-ti and u-boot-arm trees, I don't see how this fixes a bug.
It's easy ;)
The applied patch has a bug that the chip detection is done too late.
It has to be done some lines earlier:
http://lists.denx.de/pipermail/u-boot/2009-October/062150.html
(which is against the patch already applied).
So there are two options to deal with this:
a) Apply
http://lists.denx.de/pipermail/u-boot/2009-October/062150.html
on top of the patch already in u-boot-ti (and u-boot-arm)
or
b) Revert
http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=4eb3af078267e103fb957cb831497cf7670fb3f4
and apply
http://lists.denx.de/pipermail/u-boot/2009-October/062153.html
instead which has the "make the chip detection earlier" fix from (a)
above incorporated.
Best regards
Dirk
^ permalink raw reply [flat|nested] 74+ messages in thread
* [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support
2009-10-10 17:58 ` Dirk Behme
@ 2009-10-10 18:24 ` Paulraj, Sandeep
0 siblings, 0 replies; 74+ messages in thread
From: Paulraj, Sandeep @ 2009-10-10 18:24 UTC (permalink / raw)
To: u-boot
> > I'm a little confused :-)
> > I realized when I was trying to apply this patch that this is already
> part of the u-boot-ti and u-boot-arm trees.
> >
> > I am referring to
> > http://git.denx.de/?p=u-boot/u-boot-
> ti.git;a=commitdiff;h=4eb3af078267e103fb957cb831497cf7670fb3f4
> >
> > The patch in this e-mail chain was supposed to fix a bug discovered
> after Tom updated his tree.
> >
> > Since this patch was already part of u-boot-ti and u-boot-arm trees, I
> don't see how this fixes a bug.
>
> It's easy ;)
>
> The applied patch has a bug that the chip detection is done too late.
> It has to be done some lines earlier:
>
> http://lists.denx.de/pipermail/u-boot/2009-October/062150.html
>
> (which is against the patch already applied).
>
> So there are two options to deal with this:
>
> a) Apply
>
> http://lists.denx.de/pipermail/u-boot/2009-October/062150.html
>
> on top of the patch already in u-boot-ti (and u-boot-arm)
>
> or
>
> b) Revert
>
> http://git.denx.de/?p=u-boot/u-boot-
> ti.git;a=commitdiff;h=4eb3af078267e103fb957cb831497cf7670fb3f4
>
> and apply
>
> http://lists.denx.de/pipermail/u-boot/2009-October/062153.html
>
> instead which has the "make the chip detection earlier" fix from (a)
> above incorporated.
>
> Best regards
>
> Dirk
I have been enlightened :-)
I have pushed this to u-boot-ti next
http://git.denx.de/?p=u-boot/u-boot-ti.git;a=shortlog;h=refs/heads/next
Thanks,
Sandeep
^ permalink raw reply [flat|nested] 74+ messages in thread
end of thread, other threads:[~2009-10-10 18:24 UTC | newest]
Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 20:47 [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
2009-09-12 5:25 ` Dirk Behme
2009-09-12 15:16 ` Paulraj, Sandeep
2009-09-12 17:18 ` Olof Johansson
2009-09-12 17:33 ` Paulraj, Sandeep
2009-09-13 17:22 ` Ben Warren
2009-09-13 19:11 ` Paulraj, Sandeep
2009-09-22 19:51 ` Wolfgang Denk
2009-09-22 19:50 ` Wolfgang Denk
2009-09-22 20:12 ` Olof Johansson
2009-09-22 21:28 ` Wolfgang Denk
2009-09-22 21:33 ` Olof Johansson
2009-09-22 21:42 ` Wolfgang Denk
2009-09-22 19:48 ` Wolfgang Denk
2009-09-22 20:13 ` Olof Johansson
2009-09-22 21:32 ` Wolfgang Denk
2009-09-22 21:34 ` Olof Johansson
2009-09-22 21:45 ` Wolfgang Denk
2009-09-22 21:37 ` Jean-Christian de Rivaz
2009-09-22 21:47 ` Tom
2009-09-22 19:44 ` Wolfgang Denk
2009-09-13 19:41 ` Steve Sakoman
2009-09-22 19:41 ` Wolfgang Denk
2009-09-22 20:34 ` Olof Johansson
2009-09-22 21:34 ` Wolfgang Denk
2009-09-22 21:36 ` Olof Johansson
2009-09-22 21:49 ` Wolfgang Denk
2009-09-22 21:52 ` Olof Johansson
2009-09-23 14:55 ` [U-Boot] [PATCH v2] " Olof Johansson
2009-09-23 18:39 ` Tom
2009-09-23 18:43 ` Olof Johansson
2009-09-23 19:16 ` Wolfgang Denk
2009-09-23 20:29 ` Olof Johansson
2009-09-23 21:00 ` Tom
2009-09-23 23:35 ` Olof Johansson
2009-09-24 0:34 ` Nishanth Menon
2009-09-24 0:38 ` Olof Johansson
2009-09-24 1:03 ` Tom
2009-09-24 1:05 ` Nishanth Menon
2009-09-24 17:32 ` Tom
2009-09-24 17:42 ` Paulraj, Sandeep
2009-09-28 6:02 ` [U-Boot] Applying u-boot-ti patches (was: [PATCH v2] TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
2009-09-28 11:29 ` Paulraj, Sandeep
2009-09-28 17:37 ` [U-Boot] Applying u-boot-ti patches Dirk Behme
2009-09-28 17:45 ` Paulraj, Sandeep
2009-09-24 17:48 ` [U-Boot] [PATCH v2] TI: OMAP3: Overo Tobi ethernet support Paulraj, Sandeep
2009-09-24 17:51 ` Dirk Behme
2009-09-24 17:55 ` Olof Johansson
2009-09-26 6:13 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Dirk Behme
2009-09-26 11:21 ` Mike Frysinger
2009-09-26 12:36 ` [U-Boot] smc911x runtime detection Tom
2009-09-26 15:53 ` [U-Boot] smc911x runtime detection (was: TI: OMAP3: Overo Tobi ethernet support) Olof Johansson
2009-09-26 16:02 ` Ben Warren
[not found] ` <5e088bd90909261213j1512c83erb9665bccc102fc42@mail.gmail.com>
2009-09-26 19:19 ` Ben Warren
2009-09-26 19:23 ` Mike Frysinger
2009-09-26 21:09 ` Olof Johansson
2009-09-27 8:38 ` [U-Boot] smc911x runtime detection Dirk Behme
2009-09-26 21:14 ` [U-Boot] [PATCH v3] TI: OMAP3: Overo Tobi ethernet support Olof Johansson
2009-09-28 18:51 ` Ben Warren
2009-09-28 19:32 ` Paulraj, Sandeep
2009-10-05 13:56 ` Steve Sakoman
2009-10-05 14:07 ` Olof Johansson
2009-10-06 0:52 ` Paulraj, Sandeep
2009-10-08 4:50 ` Dirk Behme
2009-10-08 4:56 ` Steve Sakoman
2009-10-08 5:05 ` Dirk Behme
2009-10-08 6:59 ` Olof Johansson
2009-10-08 14:42 ` Paulraj, Sandeep
2009-10-08 17:08 ` Ben Warren
2009-10-08 17:19 ` Paulraj, Sandeep
2009-10-08 19:21 ` Olof Johansson
2009-10-10 16:42 ` Paulraj, Sandeep
2009-10-10 17:58 ` Dirk Behme
2009-10-10 18:24 ` Paulraj, Sandeep
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.