2.6.x kernels & PCI-to-PCMCIA bridges [again]
rmk+pcmcia at arm.linux.org.uk
Wed Jun 30 08:45:27 EDT 2004
On Wed, Jun 30, 2004 at 09:31:56PM +0900, Komuro wrote:
> We assume that mem->sys_start is 0x0a0000000
> and we want mem->card_start = 0.
> Note that 0x0a0000000 is 32bit number.
> ((mem->card_start - mem->sys_start) >> 12) & 0x3fff
> = ((0 - 0x0a0000000) >> 12 ) & 0x3fff
> = (0x60000000 >> 12) & 0x3fff
> = 0x60000 & 0x3fff
> = 0
> strange and wrong!
strange and correct. Work it back to the original relationship given
in the data sheet.
26-bit card address = memory address + 26-bit offset address
= 0xa0000000 + 0x00000000
And 0xa0000000 as a 26-bit address is 0x00000000. This happens to
be your card_start.
Therefore, your example _is_ correct.
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
More information about the linux-pcmcia