Subject: PCMCIA support on TX4925
To: NetBSD tech-kern <tech-kern@netbsd.org>
From: Anand Lalgondar <solarflares@fastmail.fm>
List: tech-kern
Date: 02/04/2004 21:39:21
Hello,

Can any one tell me how to map memory for my PCMCIA module on TX4925
processor. Basically I have to create a new tag to support the PCMCIA
module. But I am stuck with the address that should be specified?

I had written a dummy program used to test the hot plug functionality of
the PCMCIA driver which was succesful and also programmed some registers
of the on-chip EBUS Controller to read the CIS of a 128MB CF Card
(Kingston P/N = CF/128) that was connected thru a Compact Flash Adapter
Card (PCMCIA type II - Compact Flash, Kingston P/N = CF/ADP).

The on-chip EBUS controller supports 8 channels and the 6&7 channel
supports PCMCIA mode. There are two registers EBCCR (Channel Control
Register) and EBBAR (Base Address Regsiter). The EBBAR was initialized to
0x1a000000 and displayed the first 256 attribute space by using the
following code:
-----------------------------------------------
        for(j = 0; j < 0x100; j+=2)
        {
                if (j%16 == 0)
                        printf("\n");
                printf("0x%-2x ", *((uint8_t
                *)(MIPS_PHYS_TO_KSEG1(0x1a000000 + j))));
        }
------------------------------------------------

I could not understand why MIPS_PHYS_TO_KSEG1 should be used to access
the attribute space, why can't the physical address be used? One more
thing can't I specifiy any free physical address, in this case i tried
with 0x0 - not working, 0x40000000 - not working.

One more thing a L1121 CompactFlash/PC Card Interface Chip acts as a
interface between the TX4925 and the PCMCIA socket. Well the registers
are mapped to some fixed location and was able to access the registers.
It is used to enable power to the PCMCIA socket and enable interrupts to
detect card insertion.

Could someone please provide some information by looking at TX4925
manual. If required I could send the register information thru mail.
URL:
http://www.semicon.toshiba.co.jp/eng/prd/micro/risc/49family/4925/pdf/bde0014b.pdf

Thank you.

 - Anand

-- 
http://www.fastmail.fm - Consolidate POP email and Hotmail in one place