PCI Bus Card Problems
Itzhak Ben-Akiva
itzhak.benakiva at guardit-tech.com
Tue Sep 6 07:01:26 EDT 2005
Hi Russel,
Thanks for the patched. It solved the problem with yenta. pcmcia is
working properly now. Now, I have to do some work to get Bluetooth
working.
many thanks,
Itzhak
On Thu, 2005-09-01 at 10:02 +0100, Russell King wrote:
> On Thu, Sep 01, 2005 at 11:19:33AM +0300, Itzhak Ben-Akiva wrote:
> > I'm writing again because I have been working on a problem with
> > cardbus/pcmcia, which is used to connect a Bluetooth pcmcia card (Anycom
> > Blue CF - 300), on ARM Integrator/AP for quite some time without any
> > success so far. I have searched the web up and down and I tried anything
> > I could found on the subject of PCI interrupt probing failure, but still
> > no success. I couldn't find any information on incompatibility of my pci
> > bus card and ARM platform. Because of that, I tried two different pci
> > bus cards that work properly on linux-x86, but they did not work on ARM.
> > Therefore, either I'm missing something in the kernel's configuration
> > for ARM or there is a problem with pcmcia on ARM Integrator. However, I
> > haven't found any information on this in the web.
>
> I never finished my fixing of yenta to be architecture independent
> since I took on the role of PCMCIA maintainer (which I've subsequently
> dropped and virtually completely stopped working on PCMCIA.) Hence,
> the fixes never got completed and merged.
>
> The problem is that yenta itself does resource allocation for the
> bridge, and makes assumptions that there's a 1:1 mapping between
> resources and PCI BARs. This is not true on some platforms such
> as the one you're using.
>
> Since ARM uses the generic PCI subsystem setup code, I was able to
> just #if 0...#endif out all the x86 specific code in yenta and have
> it work... IOW something like this:
>
> diff -u linux-2.5-pcmcia/drivers/pcmcia/yenta_socket.c linux/drivers/pcmcia/yenta_socket.c
> --- linux-2.5-pcmcia/drivers/pcmcia/yenta_socket.c Sun Mar 23 11:57:21 2003
> +++ linux/drivers/pcmcia/yenta_socket.c Fri Mar 28 23:17:12 2003
> @@ -524,6 +524,7 @@
> return 0;
> }
>
> +#if 0
> /*
> * Use an adaptive allocation for the memory resource,
> * sometimes the memory behind pci bridges is limited:
> @@ -698,6 +699,7 @@
> res->start = res->end = 0;
> }
> }
> +#endif
>
>
> /*
> @@ -721,8 +723,9 @@
>
> if (sock->base)
> iounmap(sock->base);
> +#if 0
> yenta_free_resources(sock);
> -
> +#endif
> pci_release_regions(dev);
> pci_disable_device(dev);
> pci_set_drvdata(dev, NULL);
> @@ -940,6 +943,7 @@qt-devel-3.3.4-15.1
> pci_set_power_state(socket->dev, 0);
>
> config_writel(socket, CB_LEGACY_MODE_BASE, 0);
> +#if 0
> config_writel(socket, PCI_BASE_ADDRESS_0, dev->resource[0].start);
> config_writew(socket, PCI_COMMAND,
> PCI_COMMAND_IO |
> @@ -955,6 +959,7 @@
> (dev->subordinate->subordinate << 16) | /* subordinate bus */
> (dev->subordinate->secondary << 8) | /* secondary bus */
> dev->subordinate->primary); /* primary bus */
> +#endif
>
> /*
> * Set up the bridging state:
> @@ -1037,9 +1042,14 @@
> /* Disable all events */
> cb_writel(socket, CB_SOCKET_MASK, 0x0);
>
> +#if 0
> /* Set up the bridge regions.. */
> yenta_allocate_resources(socket);
> +#endif
>
> + pci_set_master(dev);
> + /* FIXME: should we also pci_set_mwi(dev); ? */
> +
> socket->cb_irq = dev->irq;
>
> /* Do we have special options for the device? */
>
>
More information about the linux-pcmcia
mailing list