----- Original Message -----
From: "ashok mp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 05, 2002 4:17 PM
Subject: Reg : PCMCIA


> Hi,
>
> Iam using assabet like board.
> The glue logic for the pcmcia socket has been added.
> Iam using lucents Orinoco wireless lan card.(silver)
>
>  From the SA1110 developer manuel i can get the
> Physical base address for the attribute space.
>
> How can i do a basic test (at hardware level, with out
> the kernel booted.) , like to Read the
> manufacture id from the attribute space of the card.
>
> How can i get the offset for the manufacture id in the
> card, is it located at a standard offset or it varies
>  from card to card.
>
> If So how can i do a basic testing of the card at the
> hardware level.
>
> Thanks in Advance
>
> Ashok

The attribute space of a PCMCIA (or similar) card contains a Card
Information Structure (CIS) which contains *lots* of data. This is organized
as a tagged list of tuples and has to be parsed until you find the
information required. See the PCMCIA specification.

Each tuple has first a tuple type byte and then a tuple length byte which
counts all following bytes excluding the type and count. You probably want
to locate first the CISTPL_MANFID (Manufacturer's ID Tuple) with a value of
0x20 and a length of 4. This is followed by the low and high bytes of the
PCMCIA Manufacturer ID and then by the low and high bytes of the Product
Code. Note that only the even bytes in the attribute space contain data so
the type of first tuple is at offset 0, length at offset 2 and so on.

If the kernel boots use the utilities from the pcmcia-cs package, mainly
dump_cis and dump_cisreg. You can use portions of the source code to write a
program to run without the kernel but it's more difficult. You should
*really* get the kernel running over a serial line (it's not very difficult
but also not trivial) and use the proper utilities. If you want to do more
than read a few registers this is the way to go else you'll spend lots of
valuable time reimplementing the wheel.

BTW, I do use a CF Card to bootload my board but fortunately the
configuration register is typically at a fixed address so I didn't need to
parse the CIS to find its address.

--
 Paul Chitescu
 [EMAIL PROTECTED]   http://pchitescu.myip.org/   ICQ:22641673
 Any spammers will be painfully squeezed into /dev/null



_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
http://www.arm.linux.org.uk/armlinux/mailinglists.php
Please visit the above addresses for information on this list.

Reply via email to