OMAP3 Port kernel omap gpio interface.
PATCH 3/6 OMAP3 Port kernel omap gpio interface.
Port version 2.6.27 of the linux kernel's omap gpio interface to u-boot. The orignal source is in linux/arch/arm/plat-omap/gpio.c
See doc/README.omap3 for instructions on use.
Signed-off-by Tom Rix <[email protected]>
--- cpu/arm_cortexa8/omap3/Makefile | 1 + cpu/arm_cortexa8/omap3/gpio.c | 185 +++++++++++++++++++++++++++++++++++++ doc/README.omap3 | 32 +++++++ include/asm-arm/arch-omap3/gpio.h | 86 +++++++++++++++++ 4 files changed, 304 insertions(+), 0 deletions(-) create mode 100644 cpu/arm_cortexa8/omap3/gpio.c create mode 100644 include/asm-arm/arch-omap3/gpio.h
cpu/arm_cortexa8/omap3/Makefile +1 -0
@@ -29,6 +29,7 @@ SOBJS := lowlevel_init.o COBJS += board.o COBJS += clock.o +COBJS += gpio.o COBJS += mem.o COBJS += syslib.o COBJS += sys_info.o
cpu/arm_cortexa8/omap3/gpio.c new file +185 -0
185 lines not on this page · raw message
doc/README.omap3 +32 -0
@@ -84,6 +84,38 @@ For all other commands see help +Interfaces +========== + +gpio + +To set a bit : + + if (!omap_request_gpio(N)) { + omap_set_gpio_direction(N, 0); + omap_set_gpio_dataout(N, 1); + } + +To clear a bit : + + if (!omap_request_gpio(N)) { + omap_set_gpio_direction(N, 0); + omap_set_gpio_dataout(N, 0); + } + +To read a bit : + + if (!omap_request_gpio(N)) { + omap_set_gpio_direction(NULL, 1); + val = omap_get_gpio_datain(N); + omap_free_gpio(N); + } + if (val) + printf("GPIO N is set\n"); + else + printf("GPIO N is clear\n"); + + Acknowledgements ================
include/asm-arm/arch-omap3/gpio.h new file +86 -0
86 lines not on this page · raw message
Signature · 1 line
1.6.0.5
Jean-Christophe PLAGNIOL-VILLARD
AppliedPATCH 3/6 OMAP3 Port kernel omap gpio interface.
Quoted 7 lines · Tom Rix
Port version 2.6.27 of the linux kernel's omap gpio interface to u-boot. The orignal source is in
linux/arch/arm/plat-omap/gpio.cSee doc/README.omap3 for instructions on use.
Signed-off-by Tom Rix <[email protected]>---
Applied to arm/next
Best Regards,
J.