Questions about ioport-assignments

Komuro komurojun-mbn at nifty.com
Sun May 9 08:11:15 EDT 2010


Hi,

> >>- Is it just a buggy card if it works at 0x300 but not 0xc300
> >>  (or is it maybe a problem with Linux assigning the io area)?
> >>- Why is IOAddrLines forced to 16 (and thus alignment to 0x10000), but onl
y
> >>  if BasePort1 is 0?
> 
>
>In this case, 
>start = 0xc000, 
>align_data->mask = 0x3ff, 
>align_data->offset = 0x300
>then ret becomes 0xc300;
>
>but ret should be 0x300.


"pci_find_parent_resource" only finds the io-window of cardbus bridge.

I think the claim_region should find the io-area added by pcmcia-socket-startu
p.


claim_region(struct pcmcia_socket *s, resource_size_t base,
                resource_size_t size, int type, char *name)
{
        struct resource *res, *parent;

        parent = type & IORESOURCE_MEM ? &iomem_resource : &ioport_resource;
        res = make_resource(base, size, type | IORESOURCE_BUSY, name);

        if (res) {
#ifdef CONFIG_PCI
                if (s && s->cb_dev)
                        parent = pci_find_parent_resource(s->cb_dev, res);
#endif


Komuro




More information about the linux-pcmcia mailing list