4c7ad01abd3bbb0bc29451f2bea4e4075bb83c9e
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-tiger / gpio.h
1 /*
2  *  linux/arch/arm/mach-sprd/gpio.h
3  *
4  *  Generic SPRD GPIO handling
5  *
6  *  Author:     Yingchun Li(yingchun.li@spreadtrum.com)
7  *  Created:    March 10, 2010
8  *  Copyright:  Spreadtrum Inc.
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License version 2 as
12  *  published by the Free Software Foundation.
13  */
14 #ifndef __ARCH_ARM_MACH_GPIO_H_
15 #define  __ARCH_ARM_MACH_GPIO_H_
16
17 //#include <linux/init.h>
18
19  
20 #define WARN(num, fmt...) printf(fmt)
21 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
22 #define GPIO_MAX_PIN_NUM        176
23
24 #define ARCH_NR_GPIOS   GPIO_MAX_PIN_NUM
25
26 //#define gpio_get_value __gpio_get_value
27 //#define gpio_set_value __gpio_set_value
28 //#define gpio_to_irq  __gpio_to_irq
29
30 //extern __must_check int sprd_alloc_gpio_irq(unsigned gpio);
31 extern int sprd_alloc_gpio_irq(unsigned gpio);
32 extern int irq_to_gpio(unsigned long irq);
33 extern void sprd_free_gpio_irq(int irq);
34 #include <asm/arch/asm_generic_gpio.h>
35 #include <asm/arch/gpio_phy.h>
36
37 //extern void __init sprd_gpio_init(void);
38 #endif