Message ID | CAAwP0s2DsJAWuXWvPAkzCT0T0AG_OvMEw2sADW6LqSi1Ofd_Zw@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04/17/2013 08:42 AM, Javier Martinez Canillas wrote: > On Wed, Apr 17, 2013 at 3:25 PM, Jon Hunter <jon-hunter@ti.com> wrote: >> >> On 04/17/2013 02:55 AM, Javier Martinez Canillas wrote: >> >> ... >> >>> There are so many patches flying around in this thread that I missed it :-) >>> >>> Sorry about that... >> >> No problem. >> >>>> I was trying to see if we could find a common solution that everyone >>>> could use as it seems that ideally we should all be requesting the gpio. >>>> >>>> Cheers >>>> Jon >>>> >>>> [1] http://marc.info/?l=linux-arm-kernel&m=136606204823845&w=1 >>> >>> btw, I shared the latest patch with only build testing it, but today I >>> gave a try and I found a problem with this approach. The .xlate >>> function is being called twice for each GPIO-IRQ so the first time >>> gpio_request_one() succeeds but the second time it fails returning >>> -EBUSY. >> >> I tried it and I did not see that. I don't see the below warning either. >> > > weird, I wonder what's different here. I am testing on an omap4-sdp which uses a spi based ethernet device. However, I could try with the omap3430-sdp which uses gpmc. Cheers Jon
On Wed, Apr 17, 2013 at 3:52 PM, Jon Hunter <jon-hunter@ti.com> wrote: > > On 04/17/2013 08:42 AM, Javier Martinez Canillas wrote: >> On Wed, Apr 17, 2013 at 3:25 PM, Jon Hunter <jon-hunter@ti.com> wrote: >>> >>> On 04/17/2013 02:55 AM, Javier Martinez Canillas wrote: >>> >>> ... >>> >>>> There are so many patches flying around in this thread that I missed it :-) >>>> >>>> Sorry about that... >>> >>> No problem. >>> >>>>> I was trying to see if we could find a common solution that everyone >>>>> could use as it seems that ideally we should all be requesting the gpio. >>>>> >>>>> Cheers >>>>> Jon >>>>> >>>>> [1] http://marc.info/?l=linux-arm-kernel&m=136606204823845&w=1 >>>> >>>> btw, I shared the latest patch with only build testing it, but today I >>>> gave a try and I found a problem with this approach. The .xlate >>>> function is being called twice for each GPIO-IRQ so the first time >>>> gpio_request_one() succeeds but the second time it fails returning >>>> -EBUSY. >>> >>> I tried it and I did not see that. I don't see the below warning either. >>> >> >> weird, I wonder what's different here. > > I am testing on an omap4-sdp which uses a spi based ethernet device. > However, I could try with the omap3430-sdp which uses gpmc. > Thanks, that would be great and it could be a difference. But don't worry I'll to test it more extensively when I have some free time. I just shared here in case you had the same issue. > Cheers > Jon Thanks a lot for your help, Jaiver
On Wed, Apr 17, 2013 at 3:52 PM, Jon Hunter <jon-hunter@ti.com> wrote: > > On 04/17/2013 08:42 AM, Javier Martinez Canillas wrote: >> On Wed, Apr 17, 2013 at 3:25 PM, Jon Hunter <jon-hunter@ti.com> wrote: >>> >>> On 04/17/2013 02:55 AM, Javier Martinez Canillas wrote: >>> >>> ... >>> >>>> There are so many patches flying around in this thread that I missed it :-) >>>> >>>> Sorry about that... >>> >>> No problem. >>> >>>>> I was trying to see if we could find a common solution that everyone >>>>> could use as it seems that ideally we should all be requesting the gpio. >>>>> >>>>> Cheers >>>>> Jon >>>>> >>>>> [1] http://marc.info/?l=linux-arm-kernel&m=136606204823845&w=1 >>>> >>>> btw, I shared the latest patch with only build testing it, but today I >>>> gave a try and I found a problem with this approach. The .xlate >>>> function is being called twice for each GPIO-IRQ so the first time >>>> gpio_request_one() succeeds but the second time it fails returning >>>> -EBUSY. >>> >>> I tried it and I did not see that. I don't see the below warning either. >>> >> >> weird, I wonder what's different here. > > I am testing on an omap4-sdp which uses a spi based ethernet device. > However, I could try with the omap3430-sdp which uses gpmc. > > Cheers > Jon Hi Jon, I just created a new branch using your omap-daily-testing as a base and cherry-picked all the required patches and the .xlate function is working correctly. I don't see the WARN anymore neither is called twice. Sorry for the noise.. Best regards, Javier
diff --git a/arch/arm/boot/dts/omap3-igep.dtsi b/arch/arm/boot/dts/omap3-igep.dtsi index f8fe3b7..d5cd504 100644 --- a/arch/arm/boot/dts/omap3-igep.dtsi +++ b/arch/arm/boot/dts/omap3-igep.dtsi @@ -62,6 +62,12 @@ 0x126 0x0100 /* sdmmc1_dat7.sdmmc1_dat7 INPUT | MODE 0 */ >; }; + + smsc911x_pins: pinmux_smsc911x_pins { + pinctrl-single,pins = < + 0x1a2 0x0104 /* mcspi1_cs2.gpio_176 INPUT | MODE4 */ + >; + }; }; &i2c1 { diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index e2b9849..32a59df 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts @@ -40,6 +40,18 @@ gpios = <&twl_gpio 19 1>; }; }; + + vddvario: regulator-vddvario { + compatible = "regulator-fixed"; + regulator-name = "vddvario"; + regulator-always-on; + }; + + vdd33a: regulator-vdd33a { + compatible = "regulator-fixed"; + regulator-name = "vdd33a"; + regulator-always-on; + }; }; &i2c3 { @@ -54,3 +66,43 @@ reg = <0x50>; }; }; + +&gpmc { + ethernet@5,0 { + pinctrl-names = "default"; + pinctrl-0 = <&smsc911x_pins>; + compatible = "smsc,lan9221", "smsc,lan9115"; + reg = <5 0 0xff>; + bank-width = <2>; + + gpmc,mux-add-data; + gpmc,cs-on-ns = <0>; + gpmc,cs-rd-off-ns = <186>; + gpmc,cs-wr-off-ns = <186>; + gpmc,adv-on-ns = <12>; + gpmc,adv-rd-off-ns = <48>; + gpmc,adv-wr-off-ns = <48>; + gpmc,oe-on-ns = <54>; + gpmc,oe-off-ns = <168>; + gpmc,we-on-ns = <54>; + gpmc,we-off-ns = <168>; + gpmc,rd-cycle-ns = <186>; + gpmc,wr-cycle-ns = <186>; + gpmc,access-ns = <114>; + gpmc,page-burst-access-ns = <6>; + gpmc,bus-turnaround-ns = <12>; + gpmc,cycle2cycle-delay-ns = <18>; + gpmc,wr-data-mux-bus-ns = <90>; + gpmc,wr-access-ns = <186>; + gpmc,cycle2cycle-samecsen; + gpmc,cycle2cycle-diffcsen; + + interrupt-parent = <&gpio6>; + interrupts = <16 8>; + vmmc-supply = <&vddvario>; + vmmc_aux-supply = <&vdd33a>; + reg-io-width = <4>; + + smsc,save-mac-address; + }; +};