Re: problem in accessing register for at91rm9200 | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
hi,
> i m using the atmel at91rm9200 board on which vender has ported linux 2.6.14
I do recommend you upgrade your kernel - 2.6.14 is 2.5 years out-of-date.
> is i m accessing the pio registers like PIOB_PDSR to know the status.i m
> accessing it by giving the absolute address (0xfffff63c) of the register and
> getting the segmentation fault.
The correct method is to use the GPIO API defined in
include/asm-arm/arch-at91/gpio.h.
So instead of reading PDSR directly to determine the state of a pin, you do:
at91_get_gpio_value(AT91_PIN_PB10);
OR
gpio_get_value(AT91_PIN_PB10); /* preferred method */
Regards,
Andrew Victor
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Site Home] [Linux ARM Kernel] [Fedora ARM] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux OMAP] [Linux MIPS] [ECOS] [Tools] [DDR & Rambus] [Monitors]