Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-05-09 Thread Thomas Klute
Am 03.05.2012 13:09, schrieb Javier Martinez Canillas:
 On Wed, May 2, 2012 at 1:42 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Am 01.04.2012 21:20, schrieb Javier Martinez Canillas:
 On Fri, Mar 30, 2012 at 5:28 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Hi,

 I finally had some time to do more tests on this problem. Findings below.


 Great, I guess we are close to find the issue :)

 Am 20.03.2012 20:47, schrieb Javier Martinez Canillas:
 On Tue, Mar 20, 2012 at 3:27 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git 
 (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, 
 using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing 
 the
 right regulator in my kernel config or is this a bug? I can test 
 patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x 
 instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I 
 had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

 Hmm but this patch should not change the behaviour for the first 
 smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

 You're right, during further tests I found that the problem lies
 elsewhere: If the Ethernet cable is attached on modprobe, the device
 works as expected, if not, it's not found (with or without the patch).
 This means if I boot with the cable disconnected, the device won't show
 up, but after

 # modprobe -r smsc911x
 [attach cable]
 # modprobe smsc911x

 it will work. I'd still consider this a bug, but it doesn't seem to be a
 regulator problem.


 Hi Thomas,

 I had the same behavior with the smsc911x chip but on an IGEPv2 board.
 The problem was when CONFIG_SMSC_PHY=y since the driver for the chip
 internal PHY enables an energy detect power-down mode.

 The smsc911x driver probe function tries to software reset the chip
 but if the cable is unplugged the energy detect puts the chip in a low
 power mode. Since the chip is not in an operational state the reset
 fails and hence the driver probe function. If the cable is plugged
 then then energy is detected, the chip is in an operational state and
 the reset is successful.

 I sent a patch a few months ago to fix this issue. The patch disables
 the energy detect power-down mode before reseting the chip and then it
 enables again after reset.

 The commit is:

 commit 6386994e03ebbe60338ded3d586308a41e81c0dc
 Author: Javier Martinez Canillas jav...@dowhile0.org
 Date:   Tue Jan 3 13:36:19 2012 +

 net/smsc911x: Check if PHY is in operational mode before software 
 reset

 When I fix the issue I only guarded against generation 4 chips (i.e:
 pdata-generation == 4), but maybe this problem also exists in other
 SMSC chips (I didn't know since I only had access to specific
 data-sheets).

 Also you can try enabling debug in the driver by setting USE_DEBUG to
 1 in drivers/net/ethernet/smsc/smsc911x.h and also trying disabling
 CONFIG_SMSC_PHY, this will use a generic PHY driver that doesn't put
 the chip in auto power mode.

 After looking at the code I set USE_DEBUG to 3 to get as much
 information as possible and tested with and without the SMSC PHY driver.
 Results:

 With the Ethernet cable attached, the device is properly initialized
 with and without the PHY driver (as before).

 Without the cable, the smsc911x driver can initialize the card only if
 the smsc PHY driver had not been loaded previously. Unloading the PHY
 driver is not enough, even a reboot doesn't help. I have to do a cold
 boot (or attach the cable).


 This makes sense 

Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-05-03 Thread Javier Martinez Canillas
On Wed, May 2, 2012 at 1:42 PM, Thomas Klute
thomas2.kl...@uni-dortmund.de wrote:
 Am 01.04.2012 21:20, schrieb Javier Martinez Canillas:
 On Fri, Mar 30, 2012 at 5:28 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Hi,

 I finally had some time to do more tests on this problem. Findings below.


 Great, I guess we are close to find the issue :)

 Am 20.03.2012 20:47, schrieb Javier Martinez Canillas:
 On Tue, Mar 20, 2012 at 3:27 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, 
 using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing 
 the
 right regulator in my kernel config or is this a bug? I can test 
 patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x 
 instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

 Hmm but this patch should not change the behaviour for the first smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

 You're right, during further tests I found that the problem lies
 elsewhere: If the Ethernet cable is attached on modprobe, the device
 works as expected, if not, it's not found (with or without the patch).
 This means if I boot with the cable disconnected, the device won't show
 up, but after

 # modprobe -r smsc911x
 [attach cable]
 # modprobe smsc911x

 it will work. I'd still consider this a bug, but it doesn't seem to be a
 regulator problem.


 Hi Thomas,

 I had the same behavior with the smsc911x chip but on an IGEPv2 board.
 The problem was when CONFIG_SMSC_PHY=y since the driver for the chip
 internal PHY enables an energy detect power-down mode.

 The smsc911x driver probe function tries to software reset the chip
 but if the cable is unplugged the energy detect puts the chip in a low
 power mode. Since the chip is not in an operational state the reset
 fails and hence the driver probe function. If the cable is plugged
 then then energy is detected, the chip is in an operational state and
 the reset is successful.

 I sent a patch a few months ago to fix this issue. The patch disables
 the energy detect power-down mode before reseting the chip and then it
 enables again after reset.

 The commit is:

 commit 6386994e03ebbe60338ded3d586308a41e81c0dc
 Author: Javier Martinez Canillas jav...@dowhile0.org
 Date:   Tue Jan 3 13:36:19 2012 +

     net/smsc911x: Check if PHY is in operational mode before software reset

 When I fix the issue I only guarded against generation 4 chips (i.e:
 pdata-generation == 4), but maybe this problem also exists in other
 SMSC chips (I didn't know since I only had access to specific
 data-sheets).

 Also you can try enabling debug in the driver by setting USE_DEBUG to
 1 in drivers/net/ethernet/smsc/smsc911x.h and also trying disabling
 CONFIG_SMSC_PHY, this will use a generic PHY driver that doesn't put
 the chip in auto power mode.

 After looking at the code I set USE_DEBUG to 3 to get as much
 information as possible and tested with and without the SMSC PHY driver.
 Results:

 With the Ethernet cable attached, the device is properly initialized
 with and without the PHY driver (as before).

 Without the cable, the smsc911x driver can initialize the card only if
 the smsc PHY driver had not been loaded previously. Unloading the PHY
 driver is not enough, even a reboot doesn't help. I have to do a cold
 boot (or attach the cable).


 This makes sense since is the PHY driver who enables the auto energy
 detect 

Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-05-02 Thread Thomas Klute
Am 01.04.2012 21:20, schrieb Javier Martinez Canillas:
 On Fri, Mar 30, 2012 at 5:28 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Hi,

 I finally had some time to do more tests on this problem. Findings below.

 
 Great, I guess we are close to find the issue :)
 
 Am 20.03.2012 20:47, schrieb Javier Martinez Canillas:
 On Tue, Mar 20, 2012 at 3:27 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, 
 using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing 
 the
 right regulator in my kernel config or is this a bug? I can test 
 patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x 
 instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

 Hmm but this patch should not change the behaviour for the first smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

 You're right, during further tests I found that the problem lies
 elsewhere: If the Ethernet cable is attached on modprobe, the device
 works as expected, if not, it's not found (with or without the patch).
 This means if I boot with the cable disconnected, the device won't show
 up, but after

 # modprobe -r smsc911x
 [attach cable]
 # modprobe smsc911x

 it will work. I'd still consider this a bug, but it doesn't seem to be a
 regulator problem.


 Hi Thomas,

 I had the same behavior with the smsc911x chip but on an IGEPv2 board.
 The problem was when CONFIG_SMSC_PHY=y since the driver for the chip
 internal PHY enables an energy detect power-down mode.

 The smsc911x driver probe function tries to software reset the chip
 but if the cable is unplugged the energy detect puts the chip in a low
 power mode. Since the chip is not in an operational state the reset
 fails and hence the driver probe function. If the cable is plugged
 then then energy is detected, the chip is in an operational state and
 the reset is successful.

 I sent a patch a few months ago to fix this issue. The patch disables
 the energy detect power-down mode before reseting the chip and then it
 enables again after reset.

 The commit is:

 commit 6386994e03ebbe60338ded3d586308a41e81c0dc
 Author: Javier Martinez Canillas jav...@dowhile0.org
 Date:   Tue Jan 3 13:36:19 2012 +

 net/smsc911x: Check if PHY is in operational mode before software reset

 When I fix the issue I only guarded against generation 4 chips (i.e:
 pdata-generation == 4), but maybe this problem also exists in other
 SMSC chips (I didn't know since I only had access to specific
 data-sheets).

 Also you can try enabling debug in the driver by setting USE_DEBUG to
 1 in drivers/net/ethernet/smsc/smsc911x.h and also trying disabling
 CONFIG_SMSC_PHY, this will use a generic PHY driver that doesn't put
 the chip in auto power mode.

 After looking at the code I set USE_DEBUG to 3 to get as much
 information as possible and tested with and without the SMSC PHY driver.
 Results:

 With the Ethernet cable attached, the device is properly initialized
 with and without the PHY driver (as before).

 Without the cable, the smsc911x driver can initialize the card only if
 the smsc PHY driver had not been loaded previously. Unloading the PHY
 driver is not enough, even a reboot doesn't help. I have to do a cold
 boot (or attach the cable).

 
 This makes sense since is the PHY driver who enables the auto energy
 detect mode.
 
 I guess this confirms Javier's guess, but there's one catch: If you take
 a 

Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-04-01 Thread Javier Martinez Canillas
On Fri, Mar 30, 2012 at 5:28 PM, Thomas Klute
thomas2.kl...@uni-dortmund.de wrote:
 Hi,

 I finally had some time to do more tests on this problem. Findings below.


Great, I guess we are close to find the issue :)

 Am 20.03.2012 20:47, schrieb Javier Martinez Canillas:
 On Tue, Mar 20, 2012 at 3:27 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing the
 right regulator in my kernel config or is this a bug? I can test patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x 
 instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

 Hmm but this patch should not change the behaviour for the first smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

 You're right, during further tests I found that the problem lies
 elsewhere: If the Ethernet cable is attached on modprobe, the device
 works as expected, if not, it's not found (with or without the patch).
 This means if I boot with the cable disconnected, the device won't show
 up, but after

 # modprobe -r smsc911x
 [attach cable]
 # modprobe smsc911x

 it will work. I'd still consider this a bug, but it doesn't seem to be a
 regulator problem.


 Hi Thomas,

 I had the same behavior with the smsc911x chip but on an IGEPv2 board.
 The problem was when CONFIG_SMSC_PHY=y since the driver for the chip
 internal PHY enables an energy detect power-down mode.

 The smsc911x driver probe function tries to software reset the chip
 but if the cable is unplugged the energy detect puts the chip in a low
 power mode. Since the chip is not in an operational state the reset
 fails and hence the driver probe function. If the cable is plugged
 then then energy is detected, the chip is in an operational state and
 the reset is successful.

 I sent a patch a few months ago to fix this issue. The patch disables
 the energy detect power-down mode before reseting the chip and then it
 enables again after reset.

 The commit is:

 commit 6386994e03ebbe60338ded3d586308a41e81c0dc
 Author: Javier Martinez Canillas jav...@dowhile0.org
 Date:   Tue Jan 3 13:36:19 2012 +

     net/smsc911x: Check if PHY is in operational mode before software reset

 When I fix the issue I only guarded against generation 4 chips (i.e:
 pdata-generation == 4), but maybe this problem also exists in other
 SMSC chips (I didn't know since I only had access to specific
 data-sheets).

 Also you can try enabling debug in the driver by setting USE_DEBUG to
 1 in drivers/net/ethernet/smsc/smsc911x.h and also trying disabling
 CONFIG_SMSC_PHY, this will use a generic PHY driver that doesn't put
 the chip in auto power mode.

 After looking at the code I set USE_DEBUG to 3 to get as much
 information as possible and tested with and without the SMSC PHY driver.
 Results:

 With the Ethernet cable attached, the device is properly initialized
 with and without the PHY driver (as before).

 Without the cable, the smsc911x driver can initialize the card only if
 the smsc PHY driver had not been loaded previously. Unloading the PHY
 driver is not enough, even a reboot doesn't help. I have to do a cold
 boot (or attach the cable).


This makes sense since is the PHY driver who enables the auto energy
detect mode.

 I guess this confirms Javier's guess, but there's one catch: If you take
 a look at the attached logs (both without cable attached), you'll see
 

Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-30 Thread Thomas Klute
Hi,

I finally had some time to do more tests on this problem. Findings below.

Am 20.03.2012 20:47, schrieb Javier Martinez Canillas:
 On Tue, Mar 20, 2012 at 3:27 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing the
 right regulator in my kernel config or is this a bug? I can test patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x 
 instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

 Hmm but this patch should not change the behaviour for the first smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

 You're right, during further tests I found that the problem lies
 elsewhere: If the Ethernet cable is attached on modprobe, the device
 works as expected, if not, it's not found (with or without the patch).
 This means if I boot with the cable disconnected, the device won't show
 up, but after

 # modprobe -r smsc911x
 [attach cable]
 # modprobe smsc911x

 it will work. I'd still consider this a bug, but it doesn't seem to be a
 regulator problem.

 
 Hi Thomas,
 
 I had the same behavior with the smsc911x chip but on an IGEPv2 board.
 The problem was when CONFIG_SMSC_PHY=y since the driver for the chip
 internal PHY enables an energy detect power-down mode.
 
 The smsc911x driver probe function tries to software reset the chip
 but if the cable is unplugged the energy detect puts the chip in a low
 power mode. Since the chip is not in an operational state the reset
 fails and hence the driver probe function. If the cable is plugged
 then then energy is detected, the chip is in an operational state and
 the reset is successful.
 
 I sent a patch a few months ago to fix this issue. The patch disables
 the energy detect power-down mode before reseting the chip and then it
 enables again after reset.
 
 The commit is:
 
 commit 6386994e03ebbe60338ded3d586308a41e81c0dc
 Author: Javier Martinez Canillas jav...@dowhile0.org
 Date:   Tue Jan 3 13:36:19 2012 +
 
 net/smsc911x: Check if PHY is in operational mode before software reset
 
 When I fix the issue I only guarded against generation 4 chips (i.e:
 pdata-generation == 4), but maybe this problem also exists in other
 SMSC chips (I didn't know since I only had access to specific
 data-sheets).
 
 Also you can try enabling debug in the driver by setting USE_DEBUG to
 1 in drivers/net/ethernet/smsc/smsc911x.h and also trying disabling
 CONFIG_SMSC_PHY, this will use a generic PHY driver that doesn't put
 the chip in auto power mode.

After looking at the code I set USE_DEBUG to 3 to get as much
information as possible and tested with and without the SMSC PHY driver.
Results:

With the Ethernet cable attached, the device is properly initialized
with and without the PHY driver (as before).

Without the cable, the smsc911x driver can initialize the card only if
the smsc PHY driver had not been loaded previously. Unloading the PHY
driver is not enough, even a reboot doesn't help. I have to do a cold
boot (or attach the cable).

I guess this confirms Javier's guess, but there's one catch: If you take
a look at the attached logs (both without cable attached), you'll see
that the device is recognized a generation 4, so the Javier's workaround
should actually be used. I added a log output in the if
(pdata-generation == 4) block to be sure, and indeed it is used.

Any hints why the reset still 

Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-21 Thread Thomas Klute


Am 20.03.2012 20:47, schrieb Javier Martinez Canillas:
 On Tue, Mar 20, 2012 at 3:27 PM, Thomas Klute
 thomas2.kl...@uni-dortmund.de wrote:
 Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing the
 right regulator in my kernel config or is this a bug? I can test patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x 
 instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

 Hmm but this patch should not change the behaviour for the first smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

 You're right, during further tests I found that the problem lies
 elsewhere: If the Ethernet cable is attached on modprobe, the device
 works as expected, if not, it's not found (with or without the patch).
 This means if I boot with the cable disconnected, the device won't show
 up, but after

 # modprobe -r smsc911x
 [attach cable]
 # modprobe smsc911x

 it will work. I'd still consider this a bug, but it doesn't seem to be a
 regulator problem.

 
 Hi Thomas,
 
 I had the same behavior with the smsc911x chip but on an IGEPv2 board.
 The problem was when CONFIG_SMSC_PHY=y since the driver for the chip
 internal PHY enables an energy detect power-down mode.
 
 The smsc911x driver probe function tries to software reset the chip
 but if the cable is unplugged the energy detect puts the chip in a low
 power mode. Since the chip is not in an operational state the reset
 fails and hence the driver probe function. If the cable is plugged
 then then energy is detected, the chip is in an operational state and
 the reset is successful.
 
 I sent a patch a few months ago to fix this issue. The patch disables
 the energy detect power-down mode before reseting the chip and then it
 enables again after reset.
 
 The commit is:
 
 commit 6386994e03ebbe60338ded3d586308a41e81c0dc
 Author: Javier Martinez Canillas jav...@dowhile0.org
 Date:   Tue Jan 3 13:36:19 2012 +
 
 net/smsc911x: Check if PHY is in operational mode before software reset
 
 When I fix the issue I only guarded against generation 4 chips (i.e:
 pdata-generation == 4), but maybe this problem also exists in other
 SMSC chips (I didn't know since I only had access to specific
 data-sheets).
 
 Also you can try enabling debug in the driver by setting USE_DEBUG to
 1 in drivers/net/ethernet/smsc/smsc911x.h and also trying disabling
 CONFIG_SMSC_PHY, this will use a generic PHY driver that doesn't put
 the chip in auto power mode.

Hi Javier,

thanks for the hint. Deactivating CONFIG_SMSC_PHY didn't help, but I'll
look into activating USE_DEBUG later.

Regards,
Thomas
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-20 Thread Thomas Klute
Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing the
 right regulator in my kernel config or is this a bug? I can test patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!
 
 Hmm but this patch should not change the behaviour for the first smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

You're right, during further tests I found that the problem lies
elsewhere: If the Ethernet cable is attached on modprobe, the device
works as expected, if not, it's not found (with or without the patch).
This means if I boot with the cable disconnected, the device won't show
up, but after

# modprobe -r smsc911x
[attach cable]
# modprobe smsc911x

it will work. I'd still consider this a bug, but it doesn't seem to be a
regulator problem.

 However, I noticed another problem while testing the patch (not sure if
 it occurs with the previous version, I can check if that helps): A NULL
 pointer dereference occurs when unloading the module, see attached log.
 
 Yes please do check, that needs to be fixed.

The NULL pointer dereference occurs with the unpatched kernel as well.
I've attached the log, although I don't see a major difference to the
one from the patched kernel. Note that this only happens when the driver
works properly (that is, eth0 is usable). I can unload the driver
without problems if it is not working as described above.

Regards,
Thomas
[  286.276245] Unable to handle kernel NULL pointer dereference at virtual address 073c
[  286.285308] pgd = ce744000
[  286.288818] [073c] *pgd=
[  286.293151] Internal error: Oops: 5 [#1]
[  286.297271] Modules linked in: ipt_MASQUERADE xt_tcpudp iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables snd_soc_twl4030 ath9k_htc ath9k_common ath9k_hw carl9170 ath ohci_hcd smsc libertas_sdio libertas snd_soc_core regmap_spi regmap_i2c snd_pcm snd_timer smsc911x(-) ehci_hcd snd soundcore snd_page_alloc twl4030_usb
[  286.330047] CPU: 0Tainted: GW (3.3.0-rc7-11899-gb8fe178 #102)
[  286.337554] PC is at regulator_bulk_disable+0x18/0x90
[  286.342895] LR is at smsc911x_drv_remove+0xd4/0xf4 [smsc911x]
[  286.348907] pc : [c02395fc]lr : [bf03c9cc]psr: 8013
[  286.348907] sp : ce6c7ed8  ip : 0002  fp : becdfdb4
[  286.360961] r10: 0738  r9 : ce6c6000  r8 : 0002
[  286.366424] r7 : cec85408  r6 : 0738  r5 : cec85400  r4 : 
[  286.373260] r3 : ce628bc0  r2 :   r1 : 0738  r0 : 0002
[  286.380096] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  286.387603] Control: 10c5387d  Table: 8e744019  DAC: 0015
[  286.393615] Process modprobe (pid: 2393, stack limit = 0xce6c62f0)
[  286.400085] Stack: (0xce6c7ed8 to 0xce6c8000)
[  286.404663] 7ec0:   ce628bc0 ce615800
[  286.413238] 7ee0: cec85400  cec85408 c000d484  bf03c9cc bf03c8f8 cec85408
[  286.421813] 7f00: bf03e6dc cec8543c 0081 c02618d0 c02618bc c026041c cec85408 bf03e6dc
[  286.430389] 7f20: cec8543c c02609f0 bf03e6dc  c0664b08 c02602f8 bf03e718 
[  286.438995] 7f40: b6f581b0 c0064db0 ce484488 63736d73 78313139 c00a3b00 ce628bc0 0001
[  286.447570] 7f60:  ce628bc0 0001 c000d3d4 0081 6010 b6f58208 becdfdc0
[  286.456146] 7f80: 

Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-20 Thread Javier Martinez Canillas
On Tue, Mar 20, 2012 at 3:27 PM, Thomas Klute
thomas2.kl...@uni-dortmund.de wrote:
 Am 19.03.2012 23:51, schrieb Tony Lindgren:
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,

 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.

 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

 The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing the
 right regulator in my kernel config or is this a bug? I can test patches
 in the latter case.

 The second smsc911x now needs a regulator. For multiple smsc911x instances,
 we should change things around so no regulator is created if one
 is passed.

 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

 Hmm but this patch should not change the behaviour for the first smsc911x
 instance unless you specify a custom regulator.. Did you patch in a
 custom regulator, or do we have a bug somewhere? Or do you just need to
 do a cold reset without the patch I posted?

 You're right, during further tests I found that the problem lies
 elsewhere: If the Ethernet cable is attached on modprobe, the device
 works as expected, if not, it's not found (with or without the patch).
 This means if I boot with the cable disconnected, the device won't show
 up, but after

 # modprobe -r smsc911x
 [attach cable]
 # modprobe smsc911x

 it will work. I'd still consider this a bug, but it doesn't seem to be a
 regulator problem.


Hi Thomas,

I had the same behavior with the smsc911x chip but on an IGEPv2 board.
The problem was when CONFIG_SMSC_PHY=y since the driver for the chip
internal PHY enables an energy detect power-down mode.

The smsc911x driver probe function tries to software reset the chip
but if the cable is unplugged the energy detect puts the chip in a low
power mode. Since the chip is not in an operational state the reset
fails and hence the driver probe function. If the cable is plugged
then then energy is detected, the chip is in an operational state and
the reset is successful.

I sent a patch a few months ago to fix this issue. The patch disables
the energy detect power-down mode before reseting the chip and then it
enables again after reset.

The commit is:

commit 6386994e03ebbe60338ded3d586308a41e81c0dc
Author: Javier Martinez Canillas jav...@dowhile0.org
Date:   Tue Jan 3 13:36:19 2012 +

net/smsc911x: Check if PHY is in operational mode before software reset

When I fix the issue I only guarded against generation 4 chips (i.e:
pdata-generation == 4), but maybe this problem also exists in other
SMSC chips (I didn't know since I only had access to specific
data-sheets).

Also you can try enabling debug in the driver by setting USE_DEBUG to
1 in drivers/net/ethernet/smsc/smsc911x.h and also trying disabling
CONFIG_SMSC_PHY, this will use a generic PHY driver that doesn't put
the chip in auto power mode.

Hope it helps,
Javier
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-19 Thread Thomas Klute
Am 16.03.2012 20:33, schrieb Tony Lindgren:
 Hi,
 
 * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,

 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:

 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator

 ip link show does not show any available Ethernet port.
 
 The first instance one should work the same way as earlier using
 fixed regulator in gpmc-smsc911x.c. Is it not working for you
 somehow? At least it works for me on zoom3.

The Tobi board has only one Ethernet port.

 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing the
 right regulator in my kernel config or is this a bug? I can test patches
 in the latter case.
 
 The second smsc911x now needs a regulator. For multiple smsc911x instances,
 we should change things around so no regulator is created if one
 is passed.
 
 Care to test the following patch by passing a fixed regulator
 from board-overo.c?

After applying the patch the Ethernet port works consistently once I had
done a cold boot (reboot from the unpatched kernel did not work).
Thank you!

However, I noticed another problem while testing the patch (not sure if
it occurs with the previous version, I can check if that helps): A NULL
pointer dereference occurs when unloading the module, see attached log.

Regards,
Thomas

 You can copy the fixed regulator from gpmc-smsc911x.c, or ideally pass
 the real smsc911x controlling regulator for overo.
 
 Regards,
 
 Tony
 
 
 From: Tony Lindgren t...@atomide.com
 Date: Fri, 16 Mar 2012 12:26:25 -0700
 Subject: [PATCH] ARM: OMAP2+: Allow passing smsc911x regulator from boards
 
 Otherwise we won't be able to properly support multiple
 instances of smsc911x.
 
 Signed-off-by: Tony Lindgren t...@atomide.com
 
 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c
 +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
 @@ -97,17 +97,26 @@ void __init gpmc_smsc911x_init(struct 
 omap_smsc911x_platform_data *board_data)
  {
   struct platform_device *pdev;
   unsigned long cs_mem_base;
 + struct platform_device *regulator = NULL;
   int ret;
  
   gpmc_cfg = board_data;
  
 - if (!gpmc_cfg-id) {
 - ret = platform_device_register(gpmc_smsc911x_regulator);
 - if (ret  0) {
 - pr_err(Unable to register smsc911x regulators: %d\n,
 -ret);
 - return;
 - }
 + if (gpmc_cfg-regulator)
 + regulator = gpmc_cfg-regulator;
 + else if (!gpmc_cfg-id)
 + regulator = gpmc_smsc911x_regulator;
 +
 + if (!regulator) {
 + pr_err(Missing smsc911x regulator in board_data\n);
 + return;
 + }
 +
 + ret = platform_device_register(regulator);
 + if (ret  0) {
 + pr_err(Unable to register smsc911x regulators: %d\n,
 +ret);
 + return;
   }
  
   if (gpmc_cs_request(gpmc_cfg-cs, SZ_16M, cs_mem_base)  0) {
 --- a/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
 +++ b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
 @@ -19,6 +19,7 @@ struct omap_smsc911x_platform_data {
   int gpio_irq;
   int gpio_reset;
   u32 flags;
 + struct platform_device *regulator;
  };
  
  #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
du14:~# modprobe -r smsc911x
[  213.617767] Unable to handle kernel NULL pointer dereference at virtual address 073c
[  213.627044] pgd = d56b8000
[  213.630554] [073c] *pgd=
[  213.634948] Internal error: Oops: 5 [#1]
[  213.639068] Modules linked in: ipt_MASQUERADE xt_tcpudp iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables ath9k_htc ath9k_common ath9k_hw carl9170 ath snd_soc_twl4030 smsc ohci_hcd ehci_hcd snd_soc_core regmap_spi regmap_i2c snd_pcm snd_timer smsc911x(-) libertas_sdio snd soundcore snd_page_alloc libertas twl4030_usb
[  213.671844] CPU: 0Tainted: GW (3.3.0-rc7-11899-gb8fe178-dirty #103)
[  213.679901] PC is at regulator_bulk_disable+0x18/0x90
[  213.685211] LR is at smsc911x_drv_remove+0xd4/0xf4 [smsc911x]
[  213.691253] pc : [c02395fc]lr : [bf0599cc]psr: 8013
[  213.691253] sp : d56b7ed8  ip : 0002  fp : bea9fdb4
[  213.703277] r10: 0738  r9 : d56b6000  r8 : 0002
[  213.708770] r7 : d6c85408  r6 : 0738  r5 : d6c85400  r4 : 
[  213.715606] r3 : d6534500  r2 :   r1 : 0738  r0 : 0002
[  

Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-19 Thread Tony Lindgren
* Thomas Klute thomas2.kl...@uni-dortmund.de [120319 09:26]:
 Am 16.03.2012 20:33, schrieb Tony Lindgren:
  Hi,
  
  * Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
  Hi,
 
  I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
  expansion board to work with current kernel versions. With the latest
  commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
  the output from loading the smsc911x driver is as follows:
 
  du14:~# modprobe smsc911x
  [  254.843811] smsc911x: Driver version 2008-10-21
  [  254.854553] smsc911x: Driver version 2008-10-21
  [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
  dummy regulator
  [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
  using dummy regulator
 
  ip link show does not show any available Ethernet port.
  
  The first instance one should work the same way as earlier using
  fixed regulator in gpmc-smsc911x.c. Is it not working for you
  somehow? At least it works for me on zoom3.
 
 The Tobi board has only one Ethernet port.
 
  I know there has been some trouble with changes around smsc911x
  regulator support and Gumstix Overo in particular. Am I just missing the
  right regulator in my kernel config or is this a bug? I can test patches
  in the latter case.
  
  The second smsc911x now needs a regulator. For multiple smsc911x instances,
  we should change things around so no regulator is created if one
  is passed.
  
  Care to test the following patch by passing a fixed regulator
  from board-overo.c?
 
 After applying the patch the Ethernet port works consistently once I had
 done a cold boot (reboot from the unpatched kernel did not work).
 Thank you!

Hmm but this patch should not change the behaviour for the first smsc911x
instance unless you specify a custom regulator.. Did you patch in a
custom regulator, or do we have a bug somewhere? Or do you just need to
do a cold reset without the patch I posted?
 
 However, I noticed another problem while testing the patch (not sure if
 it occurs with the previous version, I can check if that helps): A NULL
 pointer dereference occurs when unloading the module, see attached log.

Yes please do check, that needs to be fixed.

Regards,

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


smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-16 Thread Thomas Klute
Hi,

I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
expansion board to work with current kernel versions. With the latest
commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
the output from loading the smsc911x driver is as follows:

du14:~# modprobe smsc911x
[  254.843811] smsc911x: Driver version 2008-10-21
[  254.854553] smsc911x: Driver version 2008-10-21
[  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
dummy regulator
[  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
using dummy regulator

ip link show does not show any available Ethernet port.

I know there has been some trouble with changes around smsc911x
regulator support and Gumstix Overo in particular. Am I just missing the
right regulator in my kernel config or is this a bug? I can test patches
in the latter case.

Regards,
Thomas Klute
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: smsc911x on Gumstix Overo/Tobi doesn't work

2012-03-16 Thread Tony Lindgren
Hi,

* Thomas Klute thomas2.kl...@uni-dortmund.de [120316 05:08]:
 Hi,
 
 I have trouble getting the Ethernet port on a Gumstix Overo with Tobi
 expansion board to work with current kernel versions. With the latest
 commit from linux-omap git (b8fe1781ec8bed5e086691a827a6ee11facec2aa),
 the output from loading the smsc911x driver is as follows:
 
 du14:~# modprobe smsc911x
 [  254.843811] smsc911x: Driver version 2008-10-21
 [  254.854553] smsc911x: Driver version 2008-10-21
 [  254.859588] _regulator_get: smsc911x.1 supply vdd33a not found, using
 dummy regulator
 [  254.868377] _regulator_get: smsc911x.1 supply vddvario not found,
 using dummy regulator
 
 ip link show does not show any available Ethernet port.

The first instance one should work the same way as earlier using
fixed regulator in gpmc-smsc911x.c. Is it not working for you
somehow? At least it works for me on zoom3.
 
 I know there has been some trouble with changes around smsc911x
 regulator support and Gumstix Overo in particular. Am I just missing the
 right regulator in my kernel config or is this a bug? I can test patches
 in the latter case.

The second smsc911x now needs a regulator. For multiple smsc911x instances,
we should change things around so no regulator is created if one
is passed.

Care to test the following patch by passing a fixed regulator
from board-overo.c?

You can copy the fixed regulator from gpmc-smsc911x.c, or ideally pass
the real smsc911x controlling regulator for overo.

Regards,

Tony


From: Tony Lindgren t...@atomide.com
Date: Fri, 16 Mar 2012 12:26:25 -0700
Subject: [PATCH] ARM: OMAP2+: Allow passing smsc911x regulator from boards

Otherwise we won't be able to properly support multiple
instances of smsc911x.

Signed-off-by: Tony Lindgren t...@atomide.com

--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -97,17 +97,26 @@ void __init gpmc_smsc911x_init(struct 
omap_smsc911x_platform_data *board_data)
 {
struct platform_device *pdev;
unsigned long cs_mem_base;
+   struct platform_device *regulator = NULL;
int ret;
 
gpmc_cfg = board_data;
 
-   if (!gpmc_cfg-id) {
-   ret = platform_device_register(gpmc_smsc911x_regulator);
-   if (ret  0) {
-   pr_err(Unable to register smsc911x regulators: %d\n,
-  ret);
-   return;
-   }
+   if (gpmc_cfg-regulator)
+   regulator = gpmc_cfg-regulator;
+   else if (!gpmc_cfg-id)
+   regulator = gpmc_smsc911x_regulator;
+
+   if (!regulator) {
+   pr_err(Missing smsc911x regulator in board_data\n);
+   return;
+   }
+
+   ret = platform_device_register(regulator);
+   if (ret  0) {
+   pr_err(Unable to register smsc911x regulators: %d\n,
+  ret);
+   return;
}
 
if (gpmc_cs_request(gpmc_cfg-cs, SZ_16M, cs_mem_base)  0) {
--- a/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
+++ b/arch/arm/plat-omap/include/plat/gpmc-smsc911x.h
@@ -19,6 +19,7 @@ struct omap_smsc911x_platform_data {
int gpio_irq;
int gpio_reset;
u32 flags;
+   struct platform_device *regulator;
 };
 
 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html