spi-topcliff-pch: Fix issue for transmitting over 4KByte
[zen-stable.git] / arch / arm / mach-mmp / include / mach / gpio-pxa.h
blob0e135a599f3e190fa04f94a7b5044431cf52bbb7
1 #ifndef __ASM_MACH_GPIO_PXA_H
2 #define __ASM_MACH_GPIO_PXA_H
4 #include <mach/addr-map.h>
5 #include <mach/cputype.h>
6 #include <mach/irqs.h>
8 #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000)
10 #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2))
11 #define GPIO_REG(x) (*(volatile u32 *)(GPIO_REGS_VIRT + (x)))
13 #define gpio_to_bank(gpio) ((gpio) >> 5)
15 /* NOTE: these macros are defined here to make optimization of
16 * gpio_{get,set}_value() to work when 'gpio' is a constant.
17 * Usage of these macros otherwise is no longer recommended,
18 * use generic GPIO API whenever possible.
20 #define GPIO_bit(gpio) (1 << ((gpio) & 0x1f))
22 #define GPLR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x00)
23 #define GPDR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x0c)
24 #define GPSR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x18)
25 #define GPCR(x) GPIO_REG(BANK_OFF(gpio_to_bank(x)) + 0x24)
27 #include <plat/gpio-pxa.h>
29 #endif /* __ASM_MACH_GPIO_PXA_H */