blob: c995a715e7ae4a8313d9d451623e0bb4f43213cf [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
Ben Cheng654325d2012-03-07 21:13:49 -080010 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef __ASM_ARCH_OMAP_GPIO_H
20#define __ASM_ARCH_OMAP_GPIO_H
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#include <asm/hardware.h>
22#include <asm/arch/irqs.h>
Ben Cheng654325d2012-03-07 21:13:49 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024#include <asm/io.h>
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025#define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080026#define OMAP_MPUIO_INPUT_LATCH 0x00
27#define OMAP_MPUIO_OUTPUT 0x04
Ben Cheng654325d2012-03-07 21:13:49 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029#define OMAP_MPUIO_IO_CNTL 0x08
30#define OMAP_MPUIO_KBR_LATCH 0x10
31#define OMAP_MPUIO_KBC 0x14
32#define OMAP_MPUIO_GPIO_EVENT_MODE 0x18
Ben Cheng654325d2012-03-07 21:13:49 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034#define OMAP_MPUIO_GPIO_INT_EDGE 0x1c
35#define OMAP_MPUIO_KBD_INT 0x20
36#define OMAP_MPUIO_GPIO_INT 0x24
37#define OMAP_MPUIO_KBD_MASKIT 0x28
Ben Cheng654325d2012-03-07 21:13:49 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039#define OMAP_MPUIO_GPIO_MASKIT 0x2c
40#define OMAP_MPUIO_GPIO_DEBOUNCING 0x30
41#define OMAP_MPUIO_LATCH 0x34
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
Ben Cheng654325d2012-03-07 21:13:49 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080045#define OMAP_GPIO_IRQ(nr) (OMAP_GPIO_IS_MPUIO(nr) ? IH_MPUIO_BASE + ((nr) & 0x0f) : IH_GPIO_BASE + (nr))
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080046struct omap_machine_gpio_bank {
47 int start;
Ben Cheng654325d2012-03-07 21:13:49 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049 int end;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080050 void (*set_gpio_direction)(int gpio, int is_input);
51 void (*set_gpio_dataout)(int gpio, int enable);
52 int (*get_gpio_datain)(int gpio);
Ben Cheng654325d2012-03-07 21:13:49 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054};
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080055#endif