Questions about ioport-assignments
Komuro
komurojun-mbn at nifty.com
Fri Apr 16 09:21:35 EDT 2010
Hi,
> Wolfram wrote:
>
> >>- 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 only
> >> 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.
static resource_size_t pcmcia_common_align(struct pcmcia_align_data *align_data,
resource_size_t start)
{
resource_size_t ret;
/*
* Ensure that we have the correct start address
*/
ret = (start & ~align_data->mask) + align_data->offset;
if (ret < start)
ret += align_data->mask + 1;
return ret;
}
Best Regards
Komuro
More information about the linux-pcmcia
mailing list