Skip to contentSkip to conversation

PCMCIA on TQM8xxL

DISCUSSION Leonardo Pereira Santos 2 participants 2 messages Jan 23, 2003 4 messages not in the archive

lore
Share & tools
lore
#3 lore raw
In reply to a message not in the archive

1) Define _IO_BASE and _IO_BASE_SIZE in arch/ppc/platforms/tqm8xxl.h
2) just copy and paste the line of code for the RPX to TQM8xxL section in arch/ppc/kernel/m8xx_setup.c m8xx_map_io(), as you pointed. If there's no #ifdef CONFIG_TQM8XXL (or something like that), just create one near the ones already defined for FADS, RPX, MBX. For example, for my FADS board, its section looks like this:

#ifdef CONFIG_FADS
	io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
	io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO);

#endif

the first call to io_block_mapping() maps the EPLD's registers, the second the PCMCIA address space. And that's it.

Quoted 39 lines · Steven Scholz
Quoted 15 lines · Wolfgang Grandegger
Quoted 14 lines · Steven Scholz

Hi there,

this is about PCMCIA on TQM8xxL using DENX ELDK 2.0 with DENX linuxppc_2_4_devel CVS tree:

I am confused:

In order to get pcmcia working on mpc8xx one have to define a proper _IO_BASE and then ioremap it early enough so the physical address equals the virtual adress.

That fair enough, but I just can't find the place where _IO_BASE is remapped for TQM8xxL.

Quoted 7 lines
Quoted 4 lines

It should be done in arch/ppc/kernel/m8xx_setup.c:m8xx_map_io(), but there's no "#ifdef TQM8xxL" or something !?

Any ideas, why it should work at all?

Check "arch/ppc/platforms/tqm8xx.h", which is somehow include by "include/asm-ppc/io.h".

Thanks for your reply.

I know _IO_BASE is defined in arch/ppc/platforms/tqm8xx.h. But IMHO it's never ioremapped like it is done for RPC Boards in arch/ppc/kernel/m8xx_setup.c:m8xx_map_io():

#if defined(CONFIG_RPXLITE) || defined(CONFIG_RPXCLASSIC)
io_block_mapping(RPX_CSR_ADDR, RPX_CSR_ADDR, RPX_CSR_SIZE,
_PAGE_IO); #if !defined(CONFIG_PCI)

        io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO);

#endif
#endif

That's what I don't understand!

Quoted 8 lines

My HW is similar to TQM8xx and I have to add something like

#if defined(CONFIG_MYBOARD)
        io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO);

#endif
to get PCMCIA working...

Steven

- --
This is Linux country.
On a quiet night, you can hear Windows reboot.

Leonardo Pereira Santos
Engenheiro de Projetos
PD3 Tecnologia
av. Pará 330/202
(51) 3337 1237

Today Fortune tells us:
Of ______course it's the murder weapon. Who would frame someone with a fake?

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#5 lore raw
In reply to a message not in the archive
Quoted 19 lines · Steven Scholz
Quoted 9 lines · Leonardo Pereira Santos

1) Define _IO_BASE and _IO_BASE_SIZE in arch/ppc/platforms/tqm8xxl.h
2) just copy and paste the line of code for the RPX to TQM8xxL section in arch/ppc/kernel/m8xx_setup.c m8xx_map_io(), as you pointed. If there's no #ifdef CONFIG_TQM8XXL (or something like that), just create one near the ones already defined for FADS, RPX, MBX. For example, for my FADS board, its section looks like this:

Quoted 4 lines
#ifdef CONFIG_FADS
        io_block_mapping(BCSR_ADDR, BCSR_ADDR, BCSR_SIZE, _PAGE_IO);
        io_block_mapping(_IO_BASE,_IO_BASE,_IO_BASE_SIZE, _PAGE_IO);

#endif

...

I know. That's what I did.

Quoted 7 lines

The problem is:

DENX claims that PCMCIA is working on TQM8xxL using ELDK 2.0 and their linux CVS tree.
But I can't see how! Since there's no remapping of _IO_BASE for TQM8xxL.

Maybe I just have to wait until Wolfgang Denk is online again!

It's also not working on my TQM8xxL starter kit and I remember vaguely that Wolfgang mentioned that the PCMCIA support ist not yet fully implemented and tested (compared with our 2.4.4 kernel). But even with io_block_mapping(_IO_BASE, ...) I still get an Oops in do_probe():

ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx PCMCIA slot B: phys mem e0000000...ec000000 (size 0c000000) Card ID: HITACHI FLASH 5.0
Fixed Disk Card
IDE interface
[silicon] [unique] [single] [sleep] [standby] [idle] [low power]

Oops: kernel access of bad area, sig: 11
NIP: C00B69FC XER: 8000AA7F LR: C00B69D8 SP: C01F9EF0 REGS: c01f9e40

TRAP: 0300

Thanks,

Wolfgang.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/