2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-24 21:24:00 +08:00
linux-next/arch/h8300/include/asm/gpio.h
Linus Torvalds 758db3f211 [h8300] move include/asm-h8300 to arch/h8300/include/asm
Done as a script (well, a single "git mv" actually) on request from
Yoshinori Sato as a way to avoid a huge diff.

Requested-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-13 14:26:32 -07:00

53 lines
1.3 KiB
C

#ifndef _H8300_GPIO_H
#define _H8300_GPIO_H
#define H8300_GPIO_P1 0
#define H8300_GPIO_P2 1
#define H8300_GPIO_P3 2
#define H8300_GPIO_P4 3
#define H8300_GPIO_P5 4
#define H8300_GPIO_P6 5
#define H8300_GPIO_P7 6
#define H8300_GPIO_P8 7
#define H8300_GPIO_P9 8
#define H8300_GPIO_PA 9
#define H8300_GPIO_PB 10
#define H8300_GPIO_PC 11
#define H8300_GPIO_PD 12
#define H8300_GPIO_PE 13
#define H8300_GPIO_PF 14
#define H8300_GPIO_PG 15
#define H8300_GPIO_PH 16
#define H8300_GPIO_B7 0x80
#define H8300_GPIO_B6 0x40
#define H8300_GPIO_B5 0x20
#define H8300_GPIO_B4 0x10
#define H8300_GPIO_B3 0x08
#define H8300_GPIO_B2 0x04
#define H8300_GPIO_B1 0x02
#define H8300_GPIO_B0 0x01
#define H8300_GPIO_INPUT 0
#define H8300_GPIO_OUTPUT 1
#define H8300_GPIO_RESERVE(port, bits) \
h8300_reserved_gpio(port, bits)
#define H8300_GPIO_FREE(port, bits) \
h8300_free_gpio(port, bits)
#define H8300_GPIO_DDR(port, bit, dir) \
h8300_set_gpio_dir(((port) << 8) | (bit), dir)
#define H8300_GPIO_GETDIR(port, bit) \
h8300_get_gpio_dir(((port) << 8) | (bit))
extern int h8300_reserved_gpio(int port, int bits);
extern int h8300_free_gpio(int port, int bits);
extern int h8300_set_gpio_dir(int port_bit, int dir);
extern int h8300_get_gpio_dir(int port_bit);
extern int h8300_init_gpio(void);
#endif