Re: [BUG] (PalmLD) PCMCIA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 23 of March 2009 02:41:34 Eric Miao wrote:> On Mon, Mar 23, 2009 at 8:50 AM, Marek Vasut <marek.vasut@xxxxxxxxx> wrote:> > Hi,> >> > looks like there is a bug in the pcmcia subsystem. I tested palmld> > recently and the pcmcia driver doesn't work. (pxa2xx_pcmcia probe failed> > with -16), I traced this to the point, where it indicates> >> >  23 static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)> >> > is called twice. The gpios are already requested by the time this is> > called once more which results in the failure. This is probably related> > to> >> > 103 static struct pcmcia_low_level palmld_pcmcia_ops = {> > 107         .nr                     = 2,> >> > the number of sockets being set to two (if I set it to 1 on palmld, it> > works). Also on palmtx where it's 1 it works fine. Also if I use static> > variable to just return 0 when the function is called again, it works> > even with nr=2. I haven't done any deeper investigation into this yet.> > Should I start with it?>> Sure, please go on and help with a fixing patch.
Here you go.This ignores the first socket which contains a harddrive. The rest of code in hw_init is for wifi which is in second socket. So this makes the initialization work properly. Please consider applying (probably through arm-devel).
Signed-off-by: Marek Vasut <marek.vasut@xxxxxxxxx>
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.cindex 1736c67..cccefb0 100644--- a/drivers/pcmcia/pxa2xx_palmld.c+++ b/drivers/pcmcia/pxa2xx_palmld.c@@ -23,6 +23,10 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt) {        int ret;++       /* Ignore socket 0 */+       if (skt->nr == 0)+               return 0;
        ret = gpio_request(GPIO_NR_PALMLD_PCMCIA_POWER, "PCMCIA PWR");        if (ret)
-------------------------------------------------------------------List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernelFAQ:        http://www.arm.linux.org.uk/mailinglists/faq.phpEtiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [CentOS ARM]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]     [Photos]