All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
@ 2011-01-24 14:41 hvaibhav
  2011-01-24 15:01 ` Varadarajan, Charulatha
  2011-01-24 19:44 ` Kevin Hilman
  0 siblings, 2 replies; 11+ messages in thread
From: hvaibhav @ 2011-01-24 14:41 UTC (permalink / raw)
  To: linux-omap; +Cc: charu, khilman, tony, Vaibhav Hiremath

From: Vaibhav Hiremath <hvaibhav@ti.com>

With addition of HWMOD support to GPIO, the Ethernet controller
goes undetected for OMAP35xEVM. So explicitely assert the reset signal to
Ethernet controller smsc911x -

	- GPIO7 (>=RevG version of EVM's)
	- GPIO64 (<=RevD version of EVM's)

I have tested this patch on RevG version of EVM with ES3.1 Si.
This patch is based on intial version from Charulatha V.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
NOTE: I have not been able to test it on older version of EVM's.

 arch/arm/mach-omap2/board-omap3evm.c |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 212d88c..336c012 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -124,10 +124,15 @@ static struct platform_device omap3evm_smsc911x_device = {

 static inline void __init omap3evm_init_smsc911x(void)
 {
-	int eth_cs;
+	int eth_cs, eth_rst;
 	struct clk *l3ck;
 	unsigned int rate;

+	if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
+		eth_rst = 64;
+	else
+		eth_rst = 7;
+
 	eth_cs = OMAP3EVM_SMSC911X_CS;

 	l3ck = clk_get(NULL, "l3_ck");
@@ -136,6 +141,22 @@ static inline void __init omap3evm_init_smsc911x(void)
 	else
 		rate = clk_get_rate(l3ck);

+	/* Configure ethernet controller reset gpio */
+	if (cpu_is_omap3430()) {
+		if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
+			pr_err(KERN_ERR "Failed to request GPIO7 for smsc911x\n");
+			return;
+		}
+
+		gpio_direction_output(eth_rst, 1);
+		/* reset pulse to ethernet controller*/
+		usleep_range(150, 220);
+		gpio_set_value(eth_rst, 0);
+		usleep_range(150, 220);
+		gpio_set_value(eth_rst, 1);
+		usleep_range(1, 2);
+	}
+
 	if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
 		printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
 			OMAP3EVM_ETHR_GPIO_IRQ);
@@ -703,6 +724,10 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
 	OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
 				OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
 				OMAP_PIN_OFF_WAKEUPENABLE),
+	OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
+				OMAP_PIN_OFF_NONE),
+	OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
+				OMAP_PIN_OFF_NONE),
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };

--
1.6.2.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 14:41 [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init hvaibhav
@ 2011-01-24 15:01 ` Varadarajan, Charulatha
  2011-01-24 15:12   ` Hiremath, Vaibhav
  2011-01-24 19:44 ` Kevin Hilman
  1 sibling, 1 reply; 11+ messages in thread
From: Varadarajan, Charulatha @ 2011-01-24 15:01 UTC (permalink / raw)
  To: hvaibhav; +Cc: linux-omap, khilman, tony

On Mon, Jan 24, 2011 at 20:11,  <hvaibhav@ti.com> wrote:
> From: Vaibhav Hiremath <hvaibhav@ti.com>
>

Thanks for the patch.  I guess this problem was initially reported by Kevin.
So you may consider adding his Reported-by.

> With addition of HWMOD support to GPIO, the Ethernet controller

%s/HWMOD/hwmod

> goes undetected for OMAP35xEVM. So explicitely assert the reset signal to

%s/explicitely/explicitly

> Ethernet controller smsc911x -
>
>        - GPIO7 (>=RevG version of EVM's)
>        - GPIO64 (<=RevD version of EVM's)
>
> I have tested this patch on RevG version of EVM with ES3.1 Si.
> This patch is based on intial version from Charulatha V.

Please add the link for reference. Also please add my SOB if you find
it relevant.

>
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> ---
> NOTE: I have not been able to test it on older version of EVM's.
>
>  arch/arm/mach-omap2/board-omap3evm.c |   27 ++++++++++++++++++++++++++-
>  1 files changed, 26 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
> index 212d88c..336c012 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -124,10 +124,15 @@ static struct platform_device omap3evm_smsc911x_device = {
>
>  static inline void __init omap3evm_init_smsc911x(void)
>  {
> -       int eth_cs;
> +       int eth_cs, eth_rst;
>        struct clk *l3ck;
>        unsigned int rate;
>
> +       if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
> +               eth_rst = 64;

Please define macros and use them.

> +       else
> +               eth_rst = 7;

Ditto

> +
>        eth_cs = OMAP3EVM_SMSC911X_CS;
>
>        l3ck = clk_get(NULL, "l3_ck");
> @@ -136,6 +141,22 @@ static inline void __init omap3evm_init_smsc911x(void)
>        else
>                rate = clk_get_rate(l3ck);
>
> +       /* Configure ethernet controller reset gpio */
> +       if (cpu_is_omap3430()) {

cpu_is_omap3430() is not required, as this board init would not be
called otherwise.

> +               if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
> +                       pr_err(KERN_ERR "Failed to request GPIO7 for smsc911x\n");
> +                       return;
> +               }
> +
> +               gpio_direction_output(eth_rst, 1);

Check for the return value

> +               /* reset pulse to ethernet controller*/
> +               usleep_range(150, 220);
> +               gpio_set_value(eth_rst, 0);
> +               usleep_range(150, 220);
> +               gpio_set_value(eth_rst, 1);
> +               usleep_range(1, 2);
> +       }
> +
>        if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
>                printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n",
>                        OMAP3EVM_ETHR_GPIO_IRQ);
> @@ -703,6 +724,10 @@ static struct omap_board_mux omap35x_board_mux[] __initdata = {
>        OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
>                                OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW |
>                                OMAP_PIN_OFF_WAKEUPENABLE),
> +       OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> +                               OMAP_PIN_OFF_NONE),
> +       OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> +                               OMAP_PIN_OFF_NONE),
>        { .reg_offset = OMAP_MUX_TERMINATOR },
>  };
>
> --
> 1.6.2.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 15:01 ` Varadarajan, Charulatha
@ 2011-01-24 15:12   ` Hiremath, Vaibhav
  2011-01-25  6:50     ` Varadarajan, Charulatha
  0 siblings, 1 reply; 11+ messages in thread
From: Hiremath, Vaibhav @ 2011-01-24 15:12 UTC (permalink / raw)
  To: Varadarajan, Charulatha; +Cc: linux-omap, Hilman, Kevin, tony


> -----Original Message-----
> From: Varadarajan, Charulatha [mailto:charu@ti.com]
> Sent: Monday, January 24, 2011 8:32 PM
> To: Hiremath, Vaibhav
> Cc: linux-omap@vger.kernel.org; Hilman, Kevin; tony@atomide.com
> Subject: Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller
> in board_init
> 
> On Mon, Jan 24, 2011 at 20:11,  <hvaibhav@ti.com> wrote:
> > From: Vaibhav Hiremath <hvaibhav@ti.com>
> >
> 
> Thanks for the patch.  I guess this problem was initially reported by
> Kevin.
> So you may consider adding his Reported-by.
> 
> > With addition of HWMOD support to GPIO, the Ethernet controller
> 
> %s/HWMOD/hwmod
> 
[Hiremath, Vaibhav] Ok.

> > goes undetected for OMAP35xEVM. So explicitely assert the reset signal
> to
> 
> %s/explicitely/explicitly
> 
[Hiremath, Vaibhav] Oops. Perhaps I will have to run spell check before sending it.

> > Ethernet controller smsc911x -
> >
> >        - GPIO7 (>=RevG version of EVM's)
> >        - GPIO64 (<=RevD version of EVM's)
> >
> > I have tested this patch on RevG version of EVM with ES3.1 Si.
> > This patch is based on intial version from Charulatha V.
> 
> Please add the link for reference. Also please add my SOB if you find
> it relevant.
> 
[Hiremath, Vaibhav] Good point, will add it.

> >
> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> > ---
> > NOTE: I have not been able to test it on older version of EVM's.
> >
> >  arch/arm/mach-omap2/board-omap3evm.c |   27 ++++++++++++++++++++++++++-
> >  1 files changed, 26 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-
> omap2/board-omap3evm.c
> > index 212d88c..336c012 100644
> > --- a/arch/arm/mach-omap2/board-omap3evm.c
> > +++ b/arch/arm/mach-omap2/board-omap3evm.c
> > @@ -124,10 +124,15 @@ static struct platform_device
> omap3evm_smsc911x_device = {
> >
> >  static inline void __init omap3evm_init_smsc911x(void)
> >  {
> > -       int eth_cs;
> > +       int eth_cs, eth_rst;
> >        struct clk *l3ck;
> >        unsigned int rate;
> >
> > +       if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1)
> > +               eth_rst = 64;
> 
> Please define macros and use them.
> 
> > +       else
> > +               eth_rst = 7;
> 
> Ditto
> 
[Hiremath, Vaibhav] My original code is using macros but I changed it before submitting to get rid of 2 #defines. But I think it makes sense to have macros, I will add it and submit it again.


> > +
> >        eth_cs = OMAP3EVM_SMSC911X_CS;
> >
> >        l3ck = clk_get(NULL, "l3_ck");
> > @@ -136,6 +141,22 @@ static inline void __init
> omap3evm_init_smsc911x(void)
> >        else
> >                rate = clk_get_rate(l3ck);
> >
> > +       /* Configure ethernet controller reset gpio */
> > +       if (cpu_is_omap3430()) {
> 
> cpu_is_omap3430() is not required, as this board init would not be
> called otherwise.
[Hiremath, Vaibhav] That is not quite true, why do you say this?

> 
> > +               if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
> > +                       pr_err(KERN_ERR "Failed to request GPIO7 for
> smsc911x\n");
> > +                       return;
> > +               }
> > +
> > +               gpio_direction_output(eth_rst, 1);
> 
> Check for the return value
[Hiremath, Vaibhav] Will do in following version.

Thanks,
Vaibhav
> 
> > +               /* reset pulse to ethernet controller*/
> > +               usleep_range(150, 220);
> > +               gpio_set_value(eth_rst, 0);
> > +               usleep_range(150, 220);
> > +               gpio_set_value(eth_rst, 1);
> > +               usleep_range(1, 2);
> > +       }
> > +
> >        if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) {
> >                printk(KERN_ERR "Failed to request GPIO%d for smsc911x
> IRQ\n",
> >                        OMAP3EVM_ETHR_GPIO_IRQ);
> > @@ -703,6 +724,10 @@ static struct omap_board_mux omap35x_board_mux[]
> __initdata = {
> >        OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> >                                OMAP_PIN_OFF_INPUT_PULLUP |
> OMAP_PIN_OFF_OUTPUT_LOW |
> >                                OMAP_PIN_OFF_WAKEUPENABLE),
> > +       OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> > +                               OMAP_PIN_OFF_NONE),
> > +       OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
> > +                               OMAP_PIN_OFF_NONE),
> >        { .reg_offset = OMAP_MUX_TERMINATOR },
> >  };
> >
> > --
> > 1.6.2.4
> >
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 14:41 [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init hvaibhav
  2011-01-24 15:01 ` Varadarajan, Charulatha
@ 2011-01-24 19:44 ` Kevin Hilman
  2011-01-24 19:58   ` Hiremath, Vaibhav
  1 sibling, 1 reply; 11+ messages in thread
From: Kevin Hilman @ 2011-01-24 19:44 UTC (permalink / raw)
  To: hvaibhav; +Cc: linux-omap, charu, tony

Hi Vaibhav,

hvaibhav@ti.com writes:

> From: Vaibhav Hiremath <hvaibhav@ti.com>
>
> With addition of HWMOD support to GPIO, the Ethernet controller
> goes undetected for OMAP35xEVM. So explicitely assert the reset signal to
> Ethernet controller smsc911x -
>
> 	- GPIO7 (>=RevG version of EVM's)
> 	- GPIO64 (<=RevD version of EVM's)
>
> I have tested this patch on RevG version of EVM with ES3.1 Si.
> This patch is based on intial version from Charulatha V.
>
> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>

This didn't apply cleanly to l-o master, with or without your previous
patches which touch the EVM board file.  

> ---
> NOTE: I have not been able to test it on older version of EVM's.

After manually applying,

Tested-by: Kevin Hilman <khilman@ti.com>

I tested on my rev D board with DHCP + nfs rootfs and it's working well.

While testing though, I also noticed that the smsc driver is dumping
some warnings (below) while trying to get the MAC address, resulting in
not using the actual MAC but generating a random one.

This isn't related to your patch, since it also happens with l-o master,
but was wondering if you saw the same thing?

A first glance looks like there are problems with the locking in the
driver, but I didn't look very deep.

Kevin


[    2.221832] smsc911x: Driver version 2008-10-21.
[    2.227447] ------------[ cut here ]------------
[    2.232574] WARNING: at /work/kernel/omap/dev/drivers/net/smsc911x.c:261 smsc911x_mac_read+0x24/0x220()
[    2.242645] Modules linked in:
[    2.246124] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>] (warn_slowpath_common+0x4c/0x64)
[    2.256256] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
[    2.266632] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from [<c02daeec>] (smsc911x_mac_read+0x24/0x220)
[    2.276855] [<c02daeec>] (smsc911x_mac_read+0x24/0x220) from [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c)
[    2.287750] [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c) from [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
[    2.298858] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from [<c028b53c>] (platform_drv_probe+0x14/0x18)
[    2.309356] [<c028b53c>] (platform_drv_probe+0x14/0x18) from [<c028a764>] (driver_probe_device+0xc8/0x184)
[    2.319793] [<c028a764>] (driver_probe_device+0xc8/0x184) from [<c028a888>] (__driver_attach+0x68/0x8c)
[    2.329895] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>] (bus_for_each_dev+0x48/0x74)
[    2.339660] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>] (bus_add_driver+0x9c/0x228)
[    2.349426] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>] (driver_register+0xa0/0x124)
[    2.359191] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>] (do_one_initcall+0xb4/0x18c)
[    2.369018] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>] (kernel_init+0x150/0x218)
[    2.378631] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>] (kernel_thread_exit+0x0/0x8)
[    2.388427] ---[ end trace 5ae2d34b582d5786 ]---
[    2.393493] ------------[ cut here ]------------
[    2.398406] WARNING: at /work/kernel/omap/dev/drivers/net/smsc911x.c:244 smsc911x_mac_complete+0x20/0xac()
[    2.408813] Modules linked in:
[    2.412139] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>] (warn_slowpath_common+0x4c/0x64)
[    2.422241] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
[    2.432647] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac)
[    2.443176] [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac) from [<c02db068>] (smsc911x_mac_read+0x1a0/0x220)
[    2.453735] [<c02db068>] (smsc911x_mac_read+0x1a0/0x220) from [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c)
[    2.464691] [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c) from [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
[    2.475860] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from [<c028b53c>] (platform_drv_probe+0x14/0x18)
[    2.486328] [<c028b53c>] (platform_drv_probe+0x14/0x18) from [<c028a764>] (driver_probe_device+0xc8/0x184)
[    2.496734] [<c028a764>] (driver_probe_device+0xc8/0x184) from [<c028a888>] (__driver_attach+0x68/0x8c)
[    2.506866] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>] (bus_for_each_dev+0x48/0x74)
[    2.516601] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>] (bus_add_driver+0x9c/0x228)
[    2.526367] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>] (driver_register+0xa0/0x124)
[    2.536132] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>] (do_one_initcall+0xb4/0x18c)
[    2.545989] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>] (kernel_init+0x150/0x218)
[    2.555572] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>] (kernel_thread_exit+0x0/0x8)
[    2.565124] ---[ end trace 5ae2d34b582d5787 ]---
[    2.570037] ------------[ cut here ]------------
[    2.575103] WARNING: at /work/kernel/omap/dev/drivers/net/smsc911x.c:261 smsc911x_mac_read+0x24/0x220()
[    2.585144] Modules linked in:
[    2.588470] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>] (warn_slowpath_common+0x4c/0x64)
[    2.598602] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
[    2.609008] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from [<c02daeec>] (smsc911x_mac_read+0x24/0x220)
[    2.619201] [<c02daeec>] (smsc911x_mac_read+0x24/0x220) from [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c)
[    2.630065] [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c) from [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
[    2.641204] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from [<c028b53c>] (platform_drv_probe+0x14/0x18)
[    2.651702] [<c028b53c>] (platform_drv_probe+0x14/0x18) from [<c028a764>] (driver_probe_device+0xc8/0x184)
[    2.662109] [<c028a764>] (driver_probe_device+0xc8/0x184) from [<c028a888>] (__driver_attach+0x68/0x8c)
[    2.672210] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>] (bus_for_each_dev+0x48/0x74)
[    2.681976] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>] (bus_add_driver+0x9c/0x228)
[    2.691741] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>] (driver_register+0xa0/0x124)
[    2.701507] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>] (do_one_initcall+0xb4/0x18c)
[    2.711334] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>] (kernel_init+0x150/0x218)
[    2.720916] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>] (kernel_thread_exit+0x0/0x8)
[    2.730499] ---[ end trace 5ae2d34b582d5788 ]---
[    2.735382] ------------[ cut here ]------------
[    2.740447] WARNING: at /work/kernel/omap/dev/drivers/net/smsc911x.c:244 smsc911x_mac_complete+0x20/0xac()
[    2.750793] Modules linked in:
[    2.754272] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>] (warn_slowpath_common+0x4c/0x64)
[    2.764404] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
[    2.774810] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac)
[    2.785308] [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac) from [<c02db068>] (smsc911x_mac_read+0x1a0/0x220)
[    2.795898] [<c02db068>] (smsc911x_mac_read+0x1a0/0x220) from [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c)
[    2.806823] [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c) from [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
[    2.817962] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from [<c028b53c>] (platform_drv_probe+0x14/0x18)
[    2.828460] [<c028b53c>] (platform_drv_probe+0x14/0x18) from [<c028a764>] (driver_probe_device+0xc8/0x184)
[    2.838867] [<c028a764>] (driver_probe_device+0xc8/0x184) from [<c028a888>] (__driver_attach+0x68/0x8c)
[    2.848968] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>] (bus_for_each_dev+0x48/0x74)
[    2.858734] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>] (bus_add_driver+0x9c/0x228)
[    2.868499] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>] (driver_register+0xa0/0x124)
[    2.878265] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>] (do_one_initcall+0xb4/0x18c)
[    2.888122] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>] (kernel_init+0x150/0x218)
[    2.897705] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>] (kernel_thread_exit+0x0/0x8)
[    2.907257] ---[ end trace 5ae2d34b582d5789 ]---
[    2.929656] smsc911x-mdio: probed
[    2.934234] eth0: attached PHY driver [SMSC LAN911x Internal PHY] (mii_bus:phy_addr=ffffffff:01, irq=-1)
[    2.945068] net eth0: MAC Address: ea:a9:2b:c2:01:14

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 19:44 ` Kevin Hilman
@ 2011-01-24 19:58   ` Hiremath, Vaibhav
  2011-01-24 21:22     ` Kevin Hilman
  0 siblings, 1 reply; 11+ messages in thread
From: Hiremath, Vaibhav @ 2011-01-24 19:58 UTC (permalink / raw)
  To: Hilman, Kevin; +Cc: linux-omap, Varadarajan, Charulatha, tony


> -----Original Message-----
> From: Hilman, Kevin
> Sent: Tuesday, January 25, 2011 1:14 AM
> To: Hiremath, Vaibhav
> Cc: linux-omap@vger.kernel.org; Varadarajan, Charulatha; tony@atomide.com
> Subject: Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller
> in board_init
> 
> Hi Vaibhav,
> 
> hvaibhav@ti.com writes:
> 
> > From: Vaibhav Hiremath <hvaibhav@ti.com>
> >
> > With addition of HWMOD support to GPIO, the Ethernet controller
> > goes undetected for OMAP35xEVM. So explicitely assert the reset signal
> to
> > Ethernet controller smsc911x -
> >
> > 	- GPIO7 (>=RevG version of EVM's)
> > 	- GPIO64 (<=RevD version of EVM's)
> >
> > I have tested this patch on RevG version of EVM with ES3.1 Si.
> > This patch is based on intial version from Charulatha V.
> >
> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> 
> This didn't apply cleanly to l-o master, with or without your previous
> patches which touch the EVM board file.
> 
[Hiremath, Vaibhav] may be order in which you apply the patches is different, but should have been trivial to fix, right? 
I would suggest you to use newer version.

> > ---
> > NOTE: I have not been able to test it on older version of EVM's.
> 
> After manually applying,
> 
> Tested-by: Kevin Hilman <khilman@ti.com>
> 
> I tested on my rev D board with DHCP + nfs rootfs and it's working well.
> 
[Hiremath, Vaibhav] Thanks a lot for validating it.

> While testing though, I also noticed that the smsc driver is dumping
> some warnings (below) while trying to get the MAC address, resulting in
> not using the actual MAC but generating a random one.
> 
> This isn't related to your patch, since it also happens with l-o master,
> but was wondering if you saw the same thing?
> 
[Hiremath, Vaibhav] Yes I did see this message, and this is coming from 

#ifdef CONFIG_DEBUG_SPINLOCK
#define SMSC_ASSERT_MAC_LOCK(pdata) \
                WARN_ON(!spin_is_locked(&pdata->mac_lock))

And the root-cause is, in __init function we are calling smsc911x_read_mac_address->smsc911x_mac_read without holding mac_lock.

I will submit the patch to net mailing list for this.

Thanks,
Vaibhav

> A first glance looks like there are problems with the locking in the
> driver, but I didn't look very deep.
> 
> Kevin
> 
> 
> [    2.221832] smsc911x: Driver version 2008-10-21.
> [    2.227447] ------------[ cut here ]------------
> [    2.232574] WARNING: at
> /work/kernel/omap/dev/drivers/net/smsc911x.c:261
> smsc911x_mac_read+0x24/0x220()
> [    2.242645] Modules linked in:
> [    2.246124] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>]
> (warn_slowpath_common+0x4c/0x64)
> [    2.256256] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from
> [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
> [    2.266632] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from
> [<c02daeec>] (smsc911x_mac_read+0x24/0x220)
> [    2.276855] [<c02daeec>] (smsc911x_mac_read+0x24/0x220) from
> [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c)
> [    2.287750] [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c) from
> [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
> [    2.298858] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from
> [<c028b53c>] (platform_drv_probe+0x14/0x18)
> [    2.309356] [<c028b53c>] (platform_drv_probe+0x14/0x18) from
> [<c028a764>] (driver_probe_device+0xc8/0x184)
> [    2.319793] [<c028a764>] (driver_probe_device+0xc8/0x184) from
> [<c028a888>] (__driver_attach+0x68/0x8c)
> [    2.329895] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>]
> (bus_for_each_dev+0x48/0x74)
> [    2.339660] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>]
> (bus_add_driver+0x9c/0x228)
> [    2.349426] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>]
> (driver_register+0xa0/0x124)
> [    2.359191] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>]
> (do_one_initcall+0xb4/0x18c)
> [    2.369018] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>]
> (kernel_init+0x150/0x218)
> [    2.378631] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>]
> (kernel_thread_exit+0x0/0x8)
> [    2.388427] ---[ end trace 5ae2d34b582d5786 ]---
> [    2.393493] ------------[ cut here ]------------
> [    2.398406] WARNING: at
> /work/kernel/omap/dev/drivers/net/smsc911x.c:244
> smsc911x_mac_complete+0x20/0xac()
> [    2.408813] Modules linked in:
> [    2.412139] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>]
> (warn_slowpath_common+0x4c/0x64)
> [    2.422241] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from
> [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
> [    2.432647] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from
> [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac)
> [    2.443176] [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac) from
> [<c02db068>] (smsc911x_mac_read+0x1a0/0x220)
> [    2.453735] [<c02db068>] (smsc911x_mac_read+0x1a0/0x220) from
> [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c)
> [    2.464691] [<c03e6e38>] (smsc911x_read_mac_address+0x18/0x6c) from
> [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
> [    2.475860] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from
> [<c028b53c>] (platform_drv_probe+0x14/0x18)
> [    2.486328] [<c028b53c>] (platform_drv_probe+0x14/0x18) from
> [<c028a764>] (driver_probe_device+0xc8/0x184)
> [    2.496734] [<c028a764>] (driver_probe_device+0xc8/0x184) from
> [<c028a888>] (__driver_attach+0x68/0x8c)
> [    2.506866] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>]
> (bus_for_each_dev+0x48/0x74)
> [    2.516601] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>]
> (bus_add_driver+0x9c/0x228)
> [    2.526367] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>]
> (driver_register+0xa0/0x124)
> [    2.536132] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>]
> (do_one_initcall+0xb4/0x18c)
> [    2.545989] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>]
> (kernel_init+0x150/0x218)
> [    2.555572] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>]
> (kernel_thread_exit+0x0/0x8)
> [    2.565124] ---[ end trace 5ae2d34b582d5787 ]---
> [    2.570037] ------------[ cut here ]------------
> [    2.575103] WARNING: at
> /work/kernel/omap/dev/drivers/net/smsc911x.c:261
> smsc911x_mac_read+0x24/0x220()
> [    2.585144] Modules linked in:
> [    2.588470] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>]
> (warn_slowpath_common+0x4c/0x64)
> [    2.598602] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from
> [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
> [    2.609008] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from
> [<c02daeec>] (smsc911x_mac_read+0x24/0x220)
> [    2.619201] [<c02daeec>] (smsc911x_mac_read+0x24/0x220) from
> [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c)
> [    2.630065] [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c) from
> [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
> [    2.641204] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from
> [<c028b53c>] (platform_drv_probe+0x14/0x18)
> [    2.651702] [<c028b53c>] (platform_drv_probe+0x14/0x18) from
> [<c028a764>] (driver_probe_device+0xc8/0x184)
> [    2.662109] [<c028a764>] (driver_probe_device+0xc8/0x184) from
> [<c028a888>] (__driver_attach+0x68/0x8c)
> [    2.672210] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>]
> (bus_for_each_dev+0x48/0x74)
> [    2.681976] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>]
> (bus_add_driver+0x9c/0x228)
> [    2.691741] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>]
> (driver_register+0xa0/0x124)
> [    2.701507] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>]
> (do_one_initcall+0xb4/0x18c)
> [    2.711334] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>]
> (kernel_init+0x150/0x218)
> [    2.720916] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>]
> (kernel_thread_exit+0x0/0x8)
> [    2.730499] ---[ end trace 5ae2d34b582d5788 ]---
> [    2.735382] ------------[ cut here ]------------
> [    2.740447] WARNING: at
> /work/kernel/omap/dev/drivers/net/smsc911x.c:244
> smsc911x_mac_complete+0x20/0xac()
> [    2.750793] Modules linked in:
> [    2.754272] [<c0060d40>] (unwind_backtrace+0x0/0xe0) from [<c0091dcc>]
> (warn_slowpath_common+0x4c/0x64)
> [    2.764404] [<c0091dcc>] (warn_slowpath_common+0x4c/0x64) from
> [<c0091dfc>] (warn_slowpath_null+0x18/0x1c)
> [    2.774810] [<c0091dfc>] (warn_slowpath_null+0x18/0x1c) from
> [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac)
> [    2.785308] [<c02dae3c>] (smsc911x_mac_complete+0x20/0xac) from
> [<c02db068>] (smsc911x_mac_read+0x1a0/0x220)
> [    2.795898] [<c02db068>] (smsc911x_mac_read+0x1a0/0x220) from
> [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c)
> [    2.806823] [<c03e6e48>] (smsc911x_read_mac_address+0x28/0x6c) from
> [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788)
> [    2.817962] [<c03e7324>] (smsc911x_drv_probe+0x498/0x1788) from
> [<c028b53c>] (platform_drv_probe+0x14/0x18)
> [    2.828460] [<c028b53c>] (platform_drv_probe+0x14/0x18) from
> [<c028a764>] (driver_probe_device+0xc8/0x184)
> [    2.838867] [<c028a764>] (driver_probe_device+0xc8/0x184) from
> [<c028a888>] (__driver_attach+0x68/0x8c)
> [    2.848968] [<c028a888>] (__driver_attach+0x68/0x8c) from [<c02899cc>]
> (bus_for_each_dev+0x48/0x74)
> [    2.858734] [<c02899cc>] (bus_for_each_dev+0x48/0x74) from [<c028a064>]
> (bus_add_driver+0x9c/0x228)
> [    2.868499] [<c028a064>] (bus_add_driver+0x9c/0x228) from [<c028ac80>]
> (driver_register+0xa0/0x124)
> [    2.878265] [<c028ac80>] (driver_register+0xa0/0x124) from [<c0050618>]
> (do_one_initcall+0xb4/0x18c)
> [    2.888122] [<c0050618>] (do_one_initcall+0xb4/0x18c) from [<c0008abc>]
> (kernel_init+0x150/0x218)
> [    2.897705] [<c0008abc>] (kernel_init+0x150/0x218) from [<c005b14c>]
> (kernel_thread_exit+0x0/0x8)
> [    2.907257] ---[ end trace 5ae2d34b582d5789 ]---
> [    2.929656] smsc911x-mdio: probed
> [    2.934234] eth0: attached PHY driver [SMSC LAN911x Internal PHY]
> (mii_bus:phy_addr=ffffffff:01, irq=-1)
> [    2.945068] net eth0: MAC Address: ea:a9:2b:c2:01:14

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 19:58   ` Hiremath, Vaibhav
@ 2011-01-24 21:22     ` Kevin Hilman
  2011-01-25  4:44       ` Hiremath, Vaibhav
  2011-01-25 14:58       ` Hiremath, Vaibhav
  0 siblings, 2 replies; 11+ messages in thread
From: Kevin Hilman @ 2011-01-24 21:22 UTC (permalink / raw)
  To: Hiremath, Vaibhav; +Cc: linux-omap, Varadarajan, Charulatha, tony

"Hiremath, Vaibhav" <hvaibhav@ti.com> writes:

>> >
>> > With addition of HWMOD support to GPIO, the Ethernet controller
>> > goes undetected for OMAP35xEVM. So explicitely assert the reset signal
>> to
>> > Ethernet controller smsc911x -
>> >
>> > 	- GPIO7 (>=RevG version of EVM's)
>> > 	- GPIO64 (<=RevD version of EVM's)
>> >
>> > I have tested this patch on RevG version of EVM with ES3.1 Si.
>> > This patch is based on intial version from Charulatha V.
>> >
>> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
>> 
>> This didn't apply cleanly to l-o master, with or without your previous
>> patches which touch the EVM board file.
>> 
> [Hiremath, Vaibhav] may be order in which you apply the patches is different, but should have been trivial to fix, right? 
> I would suggest you to use newer version.

The order of applying doesn't matter.  Applying the original patch alone
didn't apply, applying it after the other didn't apply.   V2 doesn't
apply cleanly either.

Please be sure it applies cleanly to:

commit 5b698d68c1a9ebeae76a0e4ca4dbfdb10357143d
Author: Thomas Weber <weber@corscience.de>
Date:   Thu Jan 20 14:12:11 2011 +0000

    omap: omap-mcbsp: Fix building after replacement
    
    Fix building omap-mcbsp after replacing ARCH_OMAP24x0 in
    commit 8a9c1aa6a4caa7db1c2fca4b47168af9077e0f95.
 

If your series of EVM patches are interdependent, I suggest sending them
as a series, so it's clear that they are dependent on each other.
Also, please Cc linux-arm-kernel on OMAP patches intended for upstream.

This one (network GPIO) should be separated out though, and go into
.38-rc (as well as -stable) since omap3evm is has not been bootable
since 2.6.37.

>> > ---
>> > NOTE: I have not been able to test it on older version of EVM's.
>> 
>> After manually applying,
>> 
>> Tested-by: Kevin Hilman <khilman@ti.com>
>> 
>> I tested on my rev D board with DHCP + nfs rootfs and it's working well.
>> 
> [Hiremath, Vaibhav] Thanks a lot for validating it.
>
>> While testing though, I also noticed that the smsc driver is dumping
>> some warnings (below) while trying to get the MAC address, resulting in
>> not using the actual MAC but generating a random one.
>> 
>> This isn't related to your patch, since it also happens with l-o master,
>> but was wondering if you saw the same thing?
>> 
> [Hiremath, Vaibhav] Yes I did see this message, and this is coming from 
>
> #ifdef CONFIG_DEBUG_SPINLOCK
> #define SMSC_ASSERT_MAC_LOCK(pdata) \
>                 WARN_ON(!spin_is_locked(&pdata->mac_lock))
>
> And the root-cause is, in __init function we are calling smsc911x_read_mac_address->smsc911x_mac_read without holding mac_lock.
>
> I will submit the patch to net mailing list for this.

Thanks, please Cc linux-omap as well.

Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 21:22     ` Kevin Hilman
@ 2011-01-25  4:44       ` Hiremath, Vaibhav
  2011-01-25 14:58       ` Hiremath, Vaibhav
  1 sibling, 0 replies; 11+ messages in thread
From: Hiremath, Vaibhav @ 2011-01-25  4:44 UTC (permalink / raw)
  To: Hilman, Kevin; +Cc: linux-omap, Varadarajan, Charulatha, tony

> -----Original Message-----
> From: Hilman, Kevin
> Sent: Tuesday, January 25, 2011 2:52 AM
> To: Hiremath, Vaibhav
> Cc: linux-omap@vger.kernel.org; Varadarajan, Charulatha; tony@atomide.com
> Subject: Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller
> in board_init
> 
> "Hiremath, Vaibhav" <hvaibhav@ti.com> writes:
> 
> >> >
> >> > With addition of HWMOD support to GPIO, the Ethernet controller
> >> > goes undetected for OMAP35xEVM. So explicitely assert the reset
> signal
> >> to
> >> > Ethernet controller smsc911x -
> >> >
> >> > 	- GPIO7 (>=RevG version of EVM's)
> >> > 	- GPIO64 (<=RevD version of EVM's)
> >> >
> >> > I have tested this patch on RevG version of EVM with ES3.1 Si.
> >> > This patch is based on intial version from Charulatha V.
> >> >
> >> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> >>
> >> This didn't apply cleanly to l-o master, with or without your previous
> >> patches which touch the EVM board file.
> >>
> > [Hiremath, Vaibhav] may be order in which you apply the patches is
> different, but should have been trivial to fix, right?
> > I would suggest you to use newer version.
> 
> The order of applying doesn't matter.  Applying the original patch alone
> didn't apply, applying it after the other didn't apply.   V2 doesn't
> apply cleanly either.
> 
> Please be sure it applies cleanly to:
> 
> commit 5b698d68c1a9ebeae76a0e4ca4dbfdb10357143d
> Author: Thomas Weber <weber@corscience.de>
> Date:   Thu Jan 20 14:12:11 2011 +0000
> 
>     omap: omap-mcbsp: Fix building after replacement
> 
>     Fix building omap-mcbsp after replacing ARCH_OMAP24x0 in
>     commit 8a9c1aa6a4caa7db1c2fca4b47168af9077e0f95.
> 
> 
> If your series of EVM patches are interdependent, I suggest sending them
> as a series, so it's clear that they are dependent on each other.
> Also, please Cc linux-arm-kernel on OMAP patches intended for upstream.
> 
[Hiremath, Vaibhav] My head is pointing to same commit. But I think you are right, I should have made complete series of patches. Since these patches are functionally/logically not dependent on each other so I did not make it as a series.

Let me create series and send it again.

> This one (network GPIO) should be separated out though, and go into
> .38-rc (as well as -stable) since omap3evm is has not been bootable
> since 2.6.37.
> 
[Hiremath, Vaibhav] I agree.

> >> > ---
> >> > NOTE: I have not been able to test it on older version of EVM's.
> >>
> >> After manually applying,
> >>
> >> Tested-by: Kevin Hilman <khilman@ti.com>
> >>
> >> I tested on my rev D board with DHCP + nfs rootfs and it's working well.
> >>
> > [Hiremath, Vaibhav] Thanks a lot for validating it.
> >
> >> While testing though, I also noticed that the smsc driver is dumping
> >> some warnings (below) while trying to get the MAC address, resulting in
> >> not using the actual MAC but generating a random one.
> >>
> >> This isn't related to your patch, since it also happens with l-o master,
> >> but was wondering if you saw the same thing?
> >>
> > [Hiremath, Vaibhav] Yes I did see this message, and this is coming from
> >
> > #ifdef CONFIG_DEBUG_SPINLOCK
> > #define SMSC_ASSERT_MAC_LOCK(pdata) \
> >                 WARN_ON(!spin_is_locked(&pdata->mac_lock))
> >
> > And the root-cause is, in __init function we are calling
> smsc911x_read_mac_address->smsc911x_mac_read without holding mac_lock.
> >
> > I will submit the patch to net mailing list for this.
> 
> Thanks, please Cc linux-omap as well.
> 
[Hiremath, Vaibhav] Will do.

Thanks,
Vaibhav
> Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 15:12   ` Hiremath, Vaibhav
@ 2011-01-25  6:50     ` Varadarajan, Charulatha
  2011-01-25  6:56       ` Hiremath, Vaibhav
  0 siblings, 1 reply; 11+ messages in thread
From: Varadarajan, Charulatha @ 2011-01-25  6:50 UTC (permalink / raw)
  To: Hiremath, Vaibhav; +Cc: linux-omap, Hilman, Kevin, tony

<<snip>>

Missed this one in the previous threads.

>> > +
>> >        eth_cs = OMAP3EVM_SMSC911X_CS;
>> >
>> >        l3ck = clk_get(NULL, "l3_ck");
>> > @@ -136,6 +141,22 @@ static inline void __init
>> omap3evm_init_smsc911x(void)
>> >        else
>> >                rate = clk_get_rate(l3ck);
>> >
>> > +       /* Configure ethernet controller reset gpio */
>> > +       if (cpu_is_omap3430()) {
>>
>> cpu_is_omap3430() is not required, as this board init would not be
>> called otherwise.
> [Hiremath, Vaibhav] That is not quite true, why do you say this?

The board file init means that the cpu info is already identified.
Do you think that omap3evm_init_smsc911x() would be called for
other than OMAP3430?

>
>>
>> > +               if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
>> > +                       pr_err(KERN_ERR "Failed to request GPIO7 for
>> smsc911x\n");
>> > +                       return;
>> > +               }
>> > +
>> > +               gpio_direction_output(eth_rst, 1);
>>

<<snip>>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-25  6:50     ` Varadarajan, Charulatha
@ 2011-01-25  6:56       ` Hiremath, Vaibhav
  2011-01-25  7:10         ` Varadarajan, Charulatha
  0 siblings, 1 reply; 11+ messages in thread
From: Hiremath, Vaibhav @ 2011-01-25  6:56 UTC (permalink / raw)
  To: Varadarajan, Charulatha; +Cc: linux-omap, Hilman, Kevin, tony


> -----Original Message-----
> From: Varadarajan, Charulatha
> Sent: Tuesday, January 25, 2011 12:20 PM
> To: Hiremath, Vaibhav
> Cc: linux-omap@vger.kernel.org; Hilman, Kevin; tony@atomide.com
> Subject: Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller
> in board_init
> 
> <<snip>>
> 
> Missed this one in the previous threads.
> 
> >> > +
> >> >        eth_cs = OMAP3EVM_SMSC911X_CS;
> >> >
> >> >        l3ck = clk_get(NULL, "l3_ck");
> >> > @@ -136,6 +141,22 @@ static inline void __init
> >> omap3evm_init_smsc911x(void)
> >> >        else
> >> >                rate = clk_get_rate(l3ck);
> >> >
> >> > +       /* Configure ethernet controller reset gpio */
> >> > +       if (cpu_is_omap3430()) {
> >>
> >> cpu_is_omap3430() is not required, as this board init would not be
> >> called otherwise.
> > [Hiremath, Vaibhav] That is not quite true, why do you say this?
> 
> The board file init means that the cpu info is already identified.
> Do you think that omap3evm_init_smsc911x() would be called for
> other than OMAP3430?
> 
[Hiremath, Vaibhav] Yes, for all processors version (OMAP35x, AM/DM37x) which uses this EVM file.

Thanks,
Vaibhav
> >
> >>
> >> > +               if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
> >> > +                       pr_err(KERN_ERR "Failed to request GPIO7 for
> >> smsc911x\n");
> >> > +                       return;
> >> > +               }
> >> > +
> >> > +               gpio_direction_output(eth_rst, 1);
> >>
> 
> <<snip>>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-25  6:56       ` Hiremath, Vaibhav
@ 2011-01-25  7:10         ` Varadarajan, Charulatha
  0 siblings, 0 replies; 11+ messages in thread
From: Varadarajan, Charulatha @ 2011-01-25  7:10 UTC (permalink / raw)
  To: Hiremath, Vaibhav; +Cc: linux-omap, Hilman, Kevin, tony

On Tue, Jan 25, 2011 at 12:26, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
>
>> -----Original Message-----
>> From: Varadarajan, Charulatha
>> Sent: Tuesday, January 25, 2011 12:20 PM
>> To: Hiremath, Vaibhav
>> Cc: linux-omap@vger.kernel.org; Hilman, Kevin; tony@atomide.com
>> Subject: Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller
>> in board_init
>>
>> <<snip>>
>>
>> Missed this one in the previous threads.
>>
>> >> > +
>> >> >        eth_cs = OMAP3EVM_SMSC911X_CS;
>> >> >
>> >> >        l3ck = clk_get(NULL, "l3_ck");
>> >> > @@ -136,6 +141,22 @@ static inline void __init
>> >> omap3evm_init_smsc911x(void)
>> >> >        else
>> >> >                rate = clk_get_rate(l3ck);
>> >> >
>> >> > +       /* Configure ethernet controller reset gpio */
>> >> > +       if (cpu_is_omap3430()) {
>> >>
>> >> cpu_is_omap3430() is not required, as this board init would not be
>> >> called otherwise.
>> > [Hiremath, Vaibhav] That is not quite true, why do you say this?
>>
>> The board file init means that the cpu info is already identified.
>> Do you think that omap3evm_init_smsc911x() would be called for
>> other than OMAP3430?
>>
> [Hiremath, Vaibhav] Yes, for all processors version (OMAP35x, AM/DM37x) which uses this EVM file.

Ok. Thanks for the clarification.

>
> Thanks,
> Vaibhav
>> >
>> >>
>> >> > +               if (gpio_request(eth_rst, "SMSC911x gpio") < 0) {
>> >> > +                       pr_err(KERN_ERR "Failed to request GPIO7 for
>> >> smsc911x\n");
>> >> > +                       return;
>> >> > +               }
>> >> > +
>> >> > +               gpio_direction_output(eth_rst, 1);
>> >>
>>
>> <<snip>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init
  2011-01-24 21:22     ` Kevin Hilman
  2011-01-25  4:44       ` Hiremath, Vaibhav
@ 2011-01-25 14:58       ` Hiremath, Vaibhav
  1 sibling, 0 replies; 11+ messages in thread
From: Hiremath, Vaibhav @ 2011-01-25 14:58 UTC (permalink / raw)
  To: Hilman, Kevin; +Cc: linux-omap, Varadarajan, Charulatha, tony

> -----Original Message-----
> From: Hilman, Kevin
> Sent: Tuesday, January 25, 2011 2:52 AM
> To: Hiremath, Vaibhav
> Cc: linux-omap@vger.kernel.org; Varadarajan, Charulatha; tony@atomide.com
> Subject: Re: [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller
> in board_init
> 
> "Hiremath, Vaibhav" <hvaibhav@ti.com> writes:
> 
> >> >
> >> > With addition of HWMOD support to GPIO, the Ethernet controller
> >> > goes undetected for OMAP35xEVM. So explicitely assert the reset
> signal
> >> to
> >> > Ethernet controller smsc911x -
> >> >
> >> > 	- GPIO7 (>=RevG version of EVM's)
> >> > 	- GPIO64 (<=RevD version of EVM's)
> >> >
> >> > I have tested this patch on RevG version of EVM with ES3.1 Si.
> >> > This patch is based on intial version from Charulatha V.
> >> >
> >> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
> >>
> >> This didn't apply cleanly to l-o master, with or without your previous
> >> patches which touch the EVM board file.
> >>
> > [Hiremath, Vaibhav] may be order in which you apply the patches is
> different, but should have been trivial to fix, right?
> > I would suggest you to use newer version.
> 
> The order of applying doesn't matter.  Applying the original patch alone
> didn't apply, applying it after the other didn't apply.   V2 doesn't
> apply cleanly either.
> 
[Hiremath, Vaibhav] Kevin, I just started with your note, so that this patch gets applied cleanly and I found that V2 gets applied cleanly on top of below base commit. I just did cherry-pick, and it worked for me cleanly.

Other patches I will bundle into series and post it again.

Thanks,
Vaibhav
> Please be sure it applies cleanly to:
> 
> commit 5b698d68c1a9ebeae76a0e4ca4dbfdb10357143d
> Author: Thomas Weber <weber@corscience.de>
> Date:   Thu Jan 20 14:12:11 2011 +0000
> 
>     omap: omap-mcbsp: Fix building after replacement
> 
>     Fix building omap-mcbsp after replacing ARCH_OMAP24x0 in
>     commit 8a9c1aa6a4caa7db1c2fca4b47168af9077e0f95.
> 
> 
> If your series of EVM patches are interdependent, I suggest sending them
> as a series, so it's clear that they are dependent on each other.
> Also, please Cc linux-arm-kernel on OMAP patches intended for upstream.
> 
> This one (network GPIO) should be separated out though, and go into
> .38-rc (as well as -stable) since omap3evm is has not been bootable
> since 2.6.37.
> 
> >> > ---
> >> > NOTE: I have not been able to test it on older version of EVM's.
> >>
> >> After manually applying,
> >>
> >> Tested-by: Kevin Hilman <khilman@ti.com>
> >>
> >> I tested on my rev D board with DHCP + nfs rootfs and it's working well.
> >>
> > [Hiremath, Vaibhav] Thanks a lot for validating it.
> >
> >> While testing though, I also noticed that the smsc driver is dumping
> >> some warnings (below) while trying to get the MAC address, resulting in
> >> not using the actual MAC but generating a random one.
> >>
> >> This isn't related to your patch, since it also happens with l-o master,
> >> but was wondering if you saw the same thing?
> >>
> > [Hiremath, Vaibhav] Yes I did see this message, and this is coming from
> >
> > #ifdef CONFIG_DEBUG_SPINLOCK
> > #define SMSC_ASSERT_MAC_LOCK(pdata) \
> >                 WARN_ON(!spin_is_locked(&pdata->mac_lock))
> >
> > And the root-cause is, in __init function we are calling
> smsc911x_read_mac_address->smsc911x_mac_read without holding mac_lock.
> >
> > I will submit the patch to net mailing list for this.
> 
> Thanks, please Cc linux-omap as well.
> 
> Kevin

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-01-25 14:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 14:41 [PATCH] OMAP3EVM:FIX: Reset the SMSC911x Ethernet controller in board_init hvaibhav
2011-01-24 15:01 ` Varadarajan, Charulatha
2011-01-24 15:12   ` Hiremath, Vaibhav
2011-01-25  6:50     ` Varadarajan, Charulatha
2011-01-25  6:56       ` Hiremath, Vaibhav
2011-01-25  7:10         ` Varadarajan, Charulatha
2011-01-24 19:44 ` Kevin Hilman
2011-01-24 19:58   ` Hiremath, Vaibhav
2011-01-24 21:22     ` Kevin Hilman
2011-01-25  4:44       ` Hiremath, Vaibhav
2011-01-25 14:58       ` Hiremath, Vaibhav

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.