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.
Regards
Harsha


Nicolas Pitre wrote:

> On Fri, 5 May 2000, Chien-Min Lee wrote:
>
> >
> > >> However, if we use the physical address 0x91xxxxxx, after the
> > >> transform of io_p2v(0x91xxxxxx), it can not get the original physical
> > >> address by io_v2p.
> >
> > >Yes.  All the virtual->physical and physical->virtual macros are only valid
> > >for RAM areas, not general IO.
> >
> >    Does this mean that these two macros are useless!??
> >    What address type(physical or virtual) do we use to access the registers of
> >    peripheral control modules??
>
> You really don't have to bother about virtual or physical location of
> registers.  If you want to clear some GPIOs, simply use
>
>         GEDR |= (1<<x);         /* set GPIO x direction for output */
>         GPCR = (1<<x);          /* set GPIO x low */
>         val = (GPLR & (1<<y));  /* read GPIO y level (zero or not) */
>
> where x and y are your GPIO numbers.  If you want to play with the memory
> control register, simply use MECR like:
>
>         MECR = (MECR & (some_bits)) | some_other_bits;
>
> All those peripheral registers are defined in include/asm/arch/SA-1100.h.
> You should use them and not care about where and how they are mapped.
>
> Nicolas
>
> unsubscribe: body of `unsubscribe linux-arm-kernel' to 
>[EMAIL PROTECTED]



Reply via email to