aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-spear3xx/include/mach/generic.h
diff options
context:
space:
mode:
authorviresh kumar <viresh.kumar@st.com>2010-04-01 07:31:29 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-04-14 06:34:38 -0400
commit70f4c0bf9e4d067744ee453bc37c0c4adcea6e53 (patch)
tree0918b10d980c503c258687a0c65b8d0428d3a455 /arch/arm/mach-spear3xx/include/mach/generic.h
parentb77932a4d265586748f05a8c8fad7ef4174c0296 (diff)
ARM: 6020/1: ST SPEAr: Adding gpio pad multiplexing support
GPIO Pads in spear platform are are multiplexed in various machines. This patch adds support for this pad multiplexing. Reviewed-by: Linus Walleij <linux.walleij@stericsson.com> Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-spear3xx/include/mach/generic.h')
-rw-r--r--arch/arm/mach-spear3xx/include/mach/generic.h161
1 files changed, 154 insertions, 7 deletions
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
index aeea8453a9e2..af7e02c909a3 100644
--- a/arch/arm/mach-spear3xx/include/mach/generic.h
+++ b/arch/arm/mach-spear3xx/include/mach/generic.h
@@ -19,7 +19,9 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/amba/bus.h> 21#include <linux/amba/bus.h>
22#include <plat/padmux.h>
22 23
24/* spear3xx declarations */
23/* 25/*
24 * Each GPT has 2 timer channels 26 * Each GPT has 2 timer channels
25 * Following GPT channels will be used as clock source and clockevent 27 * Following GPT channels will be used as clock source and clockevent
@@ -34,25 +36,170 @@ extern struct amba_device uart_device;
34extern struct sys_timer spear_sys_timer; 36extern struct sys_timer spear_sys_timer;
35 37
36/* Add spear3xx family function declarations here */ 38/* Add spear3xx family function declarations here */
39void __init clk_init(void);
37void __init spear3xx_map_io(void); 40void __init spear3xx_map_io(void);
38void __init spear3xx_init_irq(void); 41void __init spear3xx_init_irq(void);
39void __init spear3xx_init(void); 42void __init spear3xx_init(void);
40void __init spear300_init(void); 43void spear_pmx_init(struct pmx_driver *pmx_driver, uint base, uint size);
41void __init spear310_init(void);
42void __init spear320_init(void);
43void __init clk_init(void);
44 44
45/* Add spear300 machine device structure declarations here */ 45/* pad mux declarations */
46#define PMX_FIRDA_MASK (1 << 14)
47#define PMX_I2C_MASK (1 << 13)
48#define PMX_SSP_CS_MASK (1 << 12)
49#define PMX_SSP_MASK (1 << 11)
50#define PMX_MII_MASK (1 << 10)
51#define PMX_GPIO_PIN0_MASK (1 << 9)
52#define PMX_GPIO_PIN1_MASK (1 << 8)
53#define PMX_GPIO_PIN2_MASK (1 << 7)
54#define PMX_GPIO_PIN3_MASK (1 << 6)
55#define PMX_GPIO_PIN4_MASK (1 << 5)
56#define PMX_GPIO_PIN5_MASK (1 << 4)
57#define PMX_UART0_MODEM_MASK (1 << 3)
58#define PMX_UART0_MASK (1 << 2)
59#define PMX_TIMER_3_4_MASK (1 << 1)
60#define PMX_TIMER_1_2_MASK (1 << 0)
61
62/* pad mux devices */
63extern struct pmx_dev pmx_firda;
64extern struct pmx_dev pmx_i2c;
65extern struct pmx_dev pmx_ssp_cs;
66extern struct pmx_dev pmx_ssp;
67extern struct pmx_dev pmx_mii;
68extern struct pmx_dev pmx_gpio_pin0;
69extern struct pmx_dev pmx_gpio_pin1;
70extern struct pmx_dev pmx_gpio_pin2;
71extern struct pmx_dev pmx_gpio_pin3;
72extern struct pmx_dev pmx_gpio_pin4;
73extern struct pmx_dev pmx_gpio_pin5;
74extern struct pmx_dev pmx_uart0_modem;
75extern struct pmx_dev pmx_uart0;
76extern struct pmx_dev pmx_timer_3_4;
77extern struct pmx_dev pmx_timer_1_2;
78
79#if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320)
80/* padmux plgpio devices */
81extern struct pmx_dev pmx_plgpio_0_1;
82extern struct pmx_dev pmx_plgpio_2_3;
83extern struct pmx_dev pmx_plgpio_4_5;
84extern struct pmx_dev pmx_plgpio_6_9;
85extern struct pmx_dev pmx_plgpio_10_27;
86extern struct pmx_dev pmx_plgpio_28;
87extern struct pmx_dev pmx_plgpio_29;
88extern struct pmx_dev pmx_plgpio_30;
89extern struct pmx_dev pmx_plgpio_31;
90extern struct pmx_dev pmx_plgpio_32;
91extern struct pmx_dev pmx_plgpio_33;
92extern struct pmx_dev pmx_plgpio_34_36;
93extern struct pmx_dev pmx_plgpio_37_42;
94extern struct pmx_dev pmx_plgpio_43_44_47_48;
95extern struct pmx_dev pmx_plgpio_45_46_49_50;
96#endif
97
98extern struct pmx_driver pmx_driver;
99
100/* spear300 declarations */
46#ifdef CONFIG_MACH_SPEAR300 101#ifdef CONFIG_MACH_SPEAR300
102/* Add spear300 machine device structure declarations here */
47extern struct amba_device gpio1_device; 103extern struct amba_device gpio1_device;
104
105/* pad mux modes */
106extern struct pmx_mode nand_mode;
107extern struct pmx_mode nor_mode;
108extern struct pmx_mode photo_frame_mode;
109extern struct pmx_mode lend_ip_phone_mode;
110extern struct pmx_mode hend_ip_phone_mode;
111extern struct pmx_mode lend_wifi_phone_mode;
112extern struct pmx_mode hend_wifi_phone_mode;
113extern struct pmx_mode ata_pabx_wi2s_mode;
114extern struct pmx_mode ata_pabx_i2s_mode;
115extern struct pmx_mode caml_lcdw_mode;
116extern struct pmx_mode camu_lcd_mode;
117extern struct pmx_mode camu_wlcd_mode;
118extern struct pmx_mode caml_lcd_mode;
119
120/* pad mux devices */
121extern struct pmx_dev pmx_fsmc_2_chips;
122extern struct pmx_dev pmx_fsmc_4_chips;
123extern struct pmx_dev pmx_keyboard;
124extern struct pmx_dev pmx_clcd;
125extern struct pmx_dev pmx_telecom_gpio;
126extern struct pmx_dev pmx_telecom_tdm;
127extern struct pmx_dev pmx_telecom_spi_cs_i2c_clk;
128extern struct pmx_dev pmx_telecom_camera;
129extern struct pmx_dev pmx_telecom_dac;
130extern struct pmx_dev pmx_telecom_i2s;
131extern struct pmx_dev pmx_telecom_boot_pins;
132extern struct pmx_dev pmx_telecom_sdio_4bit;
133extern struct pmx_dev pmx_telecom_sdio_8bit;
134extern struct pmx_dev pmx_gpio1;
135
136void spear300_pmx_init(void);
137
138/* Add spear300 machine function declarations here */
139void __init spear300_init(void);
140
48#endif /* CONFIG_MACH_SPEAR300 */ 141#endif /* CONFIG_MACH_SPEAR300 */
49 142
50/* Add spear310 machine device structure declarations here */ 143/* spear310 declarations */
51#ifdef CONFIG_MACH_SPEAR310 144#ifdef CONFIG_MACH_SPEAR310
145/* Add spear310 machine device structure declarations here */
146
147/* pad mux devices */
148extern struct pmx_dev pmx_emi_cs_0_1_4_5;
149extern struct pmx_dev pmx_emi_cs_2_3;
150extern struct pmx_dev pmx_uart1;
151extern struct pmx_dev pmx_uart2;
152extern struct pmx_dev pmx_uart3_4_5;
153extern struct pmx_dev pmx_fsmc;
154extern struct pmx_dev pmx_rs485_0_1;
155extern struct pmx_dev pmx_tdm0;
156
157void spear310_pmx_init(void);
158
159/* Add spear310 machine function declarations here */
160void __init spear310_init(void);
161
52#endif /* CONFIG_MACH_SPEAR310 */ 162#endif /* CONFIG_MACH_SPEAR310 */
53 163
54/* Add spear320 machine device structure declarations here */ 164/* spear320 declarations */
55#ifdef CONFIG_MACH_SPEAR320 165#ifdef CONFIG_MACH_SPEAR320
166/* Add spear320 machine device structure declarations here */
167
168/* pad mux modes */
169extern struct pmx_mode auto_net_smii_mode;
170extern struct pmx_mode auto_net_mii_mode;
171extern struct pmx_mode auto_exp_mode;
172extern struct pmx_mode small_printers_mode;
173
174/* pad mux devices */
175extern struct pmx_dev pmx_clcd;
176extern struct pmx_dev pmx_emi;
177extern struct pmx_dev pmx_fsmc;
178extern struct pmx_dev pmx_spp;
179extern struct pmx_dev pmx_sdio;
180extern struct pmx_dev pmx_i2s;
181extern struct pmx_dev pmx_uart1;
182extern struct pmx_dev pmx_uart1_modem;
183extern struct pmx_dev pmx_uart2;
184extern struct pmx_dev pmx_touchscreen;
185extern struct pmx_dev pmx_can;
186extern struct pmx_dev pmx_sdio_led;
187extern struct pmx_dev pmx_pwm0;
188extern struct pmx_dev pmx_pwm1;
189extern struct pmx_dev pmx_pwm2;
190extern struct pmx_dev pmx_pwm3;
191extern struct pmx_dev pmx_ssp1;
192extern struct pmx_dev pmx_ssp2;
193extern struct pmx_dev pmx_mii1;
194extern struct pmx_dev pmx_smii0;
195extern struct pmx_dev pmx_smii1;
196extern struct pmx_dev pmx_i2c1;
197
198void spear320_pmx_init(void);
199
200/* Add spear320 machine function declarations here */
201void __init spear320_init(void);
202
56#endif /* CONFIG_MACH_SPEAR320 */ 203#endif /* CONFIG_MACH_SPEAR320 */
57 204
58#endif /* __MACH_GENERIC_H */ 205#endif /* __MACH_GENERIC_H */