Subject: Re: [Re: Question aboug hardware.h]

From: Murphy Chen <[email-masked]>
Date: Mon, 8 May 2000 18:09:32 +0000 (Local time zone must be set--see zic manual page)

On Mon, 8 May 2000, Nandana wrote:
> Hi,
> Have someone got any idea about the method to access PCMCIA attribute space
> .
> We tried it using io_p2v but we had segmentation faults.

	Do you access attribute space in kernel space or in user space?

	If you access it in kernel space, you can use their virtual addresses
	directly.

	For example, if you want to access PCMCIA0 attribute space, you can
	use:

	inb(0x08000000+offset);

unsigned char inb(unsigned int addr)
{ 
        return (*((unsigned char*)(PCIO_BASE+(addr))));
}

-------------------------------------------------------
Murphy Chen (陳正哲) [email-masked]
Design Engineer, Internet Embedded System Department
Computer & Communications Research Laboratories
Industrial Technology Research Institute, Taiwan

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]
++        Please use [email-masked] for           ++
++                        kernel-related discussions.                      ++