diff options
Diffstat (limited to 'arch/arm/mach-sa1100/include/mach')
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/collie.h | 77 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/gpio.h | 19 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/mcp.h | 1 |
3 files changed, 49 insertions, 48 deletions
diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h index 9efb569cdb60..71a0b3fdcc8c 100644 --- a/arch/arm/mach-sa1100/include/mach/collie.h +++ b/arch/arm/mach-sa1100/include/mach/collie.h | |||
@@ -25,29 +25,39 @@ | |||
25 | #define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7) | 25 | #define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7) |
26 | #define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19 | 26 | #define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19 |
27 | 27 | ||
28 | #define COLLIE_SCOOP_IO_DIR ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ | 28 | #define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \ |
29 | COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \ | 29 | COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \ |
30 | COLLIE_SCP_LB_VOL_CHG ) | 30 | COLLIE_SCP_LB_VOL_CHG) |
31 | #define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R ) | 31 | #define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R) |
32 | 32 | ||
33 | /* GPIOs for which the generic definition doesn't say much */ | 33 | /* GPIOs for gpiolib */ |
34 | 34 | ||
35 | #define COLLIE_GPIO_ON_KEY GPIO_GPIO (0) | 35 | #define COLLIE_GPIO_ON_KEY (0) |
36 | #define COLLIE_GPIO_AC_IN GPIO_GPIO (1) | 36 | #define COLLIE_GPIO_AC_IN (1) |
37 | #define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11) | 37 | #define COLLIE_GPIO_SDIO_INT (11) |
38 | #define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14) | 38 | #define COLLIE_GPIO_CF_IRQ (14) |
39 | #define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15) | 39 | #define COLLIE_GPIO_nREMOCON_INT (15) |
40 | #define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16) | 40 | #define COLLIE_GPIO_UCB1x00_RESET (16) |
41 | #define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17) | 41 | #define COLLIE_GPIO_nMIC_ON (17) |
42 | #define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18) | 42 | #define COLLIE_GPIO_nREMOCON_ON (18) |
43 | #define COLLIE_GPIO_CO GPIO_GPIO (20) | 43 | #define COLLIE_GPIO_CO (20) |
44 | #define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21) | 44 | #define COLLIE_GPIO_MCP_CLK (21) |
45 | #define COLLIE_GPIO_CF_CD GPIO_GPIO (22) | 45 | #define COLLIE_GPIO_CF_CD (22) |
46 | #define COLLIE_GPIO_UCB1x00_IRQ GPIO_GPIO (23) | 46 | #define COLLIE_GPIO_UCB1x00_IRQ (23) |
47 | #define COLLIE_GPIO_WAKEUP GPIO_GPIO (24) | 47 | #define COLLIE_GPIO_WAKEUP (24) |
48 | #define COLLIE_GPIO_GA_INT GPIO_GPIO (25) | 48 | #define COLLIE_GPIO_GA_INT (25) |
49 | #define COLLIE_GPIO_MAIN_BAT_LOW GPIO_GPIO (26) | 49 | #define COLLIE_GPIO_MAIN_BAT_LOW (26) |
50 | 50 | ||
51 | /* GPIO definitions for direct register access */ | ||
52 | |||
53 | #define _COLLIE_GPIO_ON_KEY GPIO_GPIO(0) | ||
54 | #define _COLLIE_GPIO_AC_IN GPIO_GPIO(1) | ||
55 | #define _COLLIE_GPIO_nREMOCON_INT GPIO_GPIO(15) | ||
56 | #define _COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO(16) | ||
57 | #define _COLLIE_GPIO_nMIC_ON GPIO_GPIO(17) | ||
58 | #define _COLLIE_GPIO_nREMOCON_ON GPIO_GPIO(18) | ||
59 | #define _COLLIE_GPIO_CO GPIO_GPIO(20) | ||
60 | #define _COLLIE_GPIO_WAKEUP GPIO_GPIO(24) | ||
51 | /* Interrupts */ | 61 | /* Interrupts */ |
52 | 62 | ||
53 | #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 | 63 | #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0 |
@@ -70,19 +80,20 @@ | |||
70 | #define COLLIE_LCM_IRQ_GPIO_nSD_WP IRQ_LOCOMO_GPIO14 | 80 | #define COLLIE_LCM_IRQ_GPIO_nSD_WP IRQ_LOCOMO_GPIO14 |
71 | 81 | ||
72 | /* GPIO's on the TC35143AF (Toshiba Analog Frontend) */ | 82 | /* GPIO's on the TC35143AF (Toshiba Analog Frontend) */ |
73 | #define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 /* GPIO0=Version */ | 83 | #define COLLIE_TC35143_GPIO_BASE (GPIO_MAX + 13) |
74 | #define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 /* GPIO1=TBL_CHK */ | 84 | #define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 |
75 | #define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 /* GPIO2=VPNE_ON */ | 85 | #define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 |
76 | #define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 /* GPIO3=IR_ON */ | 86 | #define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 |
77 | #define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 /* GPIO4=AMP_ON */ | 87 | #define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 |
78 | #define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 /* GPIO5=Version */ | 88 | #define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 |
79 | #define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 /* GPIO5=fs 8k LPF */ | 89 | #define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 |
80 | #define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 /* GPIO6=BUZZER BIAS */ | 90 | #define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 |
81 | #define COLLIE_TC35143_GPIO_MBAT_ON UCB_IO_7 /* GPIO7=MBAT_ON */ | 91 | #define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 |
82 | #define COLLIE_TC35143_GPIO_BBAT_ON UCB_IO_8 /* GPIO8=BBAT_ON */ | 92 | #define COLLIE_GPIO_MBAT_ON (COLLIE_TC35143_GPIO_BASE + 7) |
83 | #define COLLIE_TC35143_GPIO_TMP_ON UCB_IO_9 /* GPIO9=TMP_ON */ | 93 | #define COLLIE_GPIO_BBAT_ON (COLLIE_TC35143_GPIO_BASE + 8) |
84 | #define COLLIE_TC35143_GPIO_IN ( UCB_IO_0 | UCB_IO_2 | UCB_IO_5 ) | 94 | #define COLLIE_GPIO_TMP_ON (COLLIE_TC35143_GPIO_BASE + 9) |
85 | #define COLLIE_TC35143_GPIO_OUT ( UCB_IO_1 | UCB_IO_3 | UCB_IO_4 | UCB_IO_6 | \ | 95 | #define COLLIE_TC35143_GPIO_IN (UCB_IO_0 | UCB_IO_2 | UCB_IO_5) |
86 | UCB_IO_7 | UCB_IO_8 | UCB_IO_9 ) | 96 | #define COLLIE_TC35143_GPIO_OUT (UCB_IO_1 | UCB_IO_3 | UCB_IO_4 \ |
97 | | UCB_IO_6) | ||
87 | 98 | ||
88 | #endif | 99 | #endif |
diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h index 582a0c92da53..7befc104e9a9 100644 --- a/arch/arm/mach-sa1100/include/mach/gpio.h +++ b/arch/arm/mach-sa1100/include/mach/gpio.h | |||
@@ -49,20 +49,9 @@ static inline void gpio_set_value(unsigned gpio, int value) | |||
49 | 49 | ||
50 | #define gpio_cansleep __gpio_cansleep | 50 | #define gpio_cansleep __gpio_cansleep |
51 | 51 | ||
52 | static inline unsigned gpio_to_irq(unsigned gpio) | 52 | #define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \ |
53 | { | 53 | (IRQ_GPIO11 - 11 + gpio)) |
54 | if (gpio < 11) | 54 | #define irq_to_gpio(irq) ((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \ |
55 | return IRQ_GPIO0 + gpio; | 55 | (irq - IRQ_GPIO11 + 11)) |
56 | else | ||
57 | return IRQ_GPIO11 - 11 + gpio; | ||
58 | } | ||
59 | |||
60 | static inline unsigned irq_to_gpio(unsigned irq) | ||
61 | { | ||
62 | if (irq < IRQ_GPIO11_27) | ||
63 | return irq - IRQ_GPIO0; | ||
64 | else | ||
65 | return irq - IRQ_GPIO11 + 11; | ||
66 | } | ||
67 | 56 | ||
68 | #endif | 57 | #endif |
diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h index fb8b09a57ad7..ed1a331508a7 100644 --- a/arch/arm/mach-sa1100/include/mach/mcp.h +++ b/arch/arm/mach-sa1100/include/mach/mcp.h | |||
@@ -16,6 +16,7 @@ struct mcp_plat_data { | |||
16 | u32 mccr0; | 16 | u32 mccr0; |
17 | u32 mccr1; | 17 | u32 mccr1; |
18 | unsigned int sclk_rate; | 18 | unsigned int sclk_rate; |
19 | int gpio_base; | ||
19 | }; | 20 | }; |
20 | 21 | ||
21 | #endif | 22 | #endif |