diff options
author | Ian Molton <spyro@f2s.com> | 2008-09-26 08:38:59 -0400 |
---|---|---|
committer | Ian Molton <spyro@f2s.com> | 2008-12-14 22:29:34 -0500 |
commit | b1ae1b7b274f67c149bee4731e38a7516c723de4 (patch) | |
tree | 9f31ef6e8fb28359f6dbc8bb7ecac2c75bce2fa1 /arch/arm/mach-pxa/e740.c | |
parent | f4ad9a9624fafec4647e7e45469e0446586f81fb (diff) |
[ARM] pxa: Add multi-io support for e-series
This patchset provides support for the TMIO based IO controller used in the
Toshiba e-series PDAs.
Signed-off-by: Ian Molton <spyro@f2s.com>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/e740.c')
-rw-r--r-- | arch/arm/mach-pxa/e740.c | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c index a9f070b1b80f..b00d670b2ea6 100644 --- a/arch/arm/mach-pxa/e740.c +++ b/arch/arm/mach-pxa/e740.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/clk.h> | ||
19 | #include <linux/mfd/t7l66xb.h> | ||
18 | 20 | ||
19 | #include <video/w100fb.h> | 21 | #include <video/w100fb.h> |
20 | 22 | ||
@@ -23,13 +25,16 @@ | |||
23 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
24 | 26 | ||
25 | #include <mach/mfp-pxa25x.h> | 27 | #include <mach/mfp-pxa25x.h> |
28 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/eseries-gpio.h> | ||
27 | #include <mach/udc.h> | 31 | #include <mach/udc.h> |
28 | #include <mach/irda.h> | 32 | #include <mach/irda.h> |
29 | 33 | ||
30 | #include "generic.h" | 34 | #include "generic.h" |
31 | #include "eseries.h" | 35 | #include "eseries.h" |
32 | 36 | #include "clock.h" | |
37 | #include "devices.h" | ||
33 | 38 | ||
34 | /* ------------------------ e740 video support --------------------------- */ | 39 | /* ------------------------ e740 video support --------------------------- */ |
35 | 40 | ||
@@ -117,7 +122,10 @@ static unsigned long e740_pin_config[] __initdata = { | |||
117 | GPIO42_BTUART_RXD, | 122 | GPIO42_BTUART_RXD, |
118 | GPIO43_BTUART_TXD, | 123 | GPIO43_BTUART_TXD, |
119 | GPIO44_BTUART_CTS, | 124 | GPIO44_BTUART_CTS, |
120 | GPIO45_GPIO, /* Used by TMIO for #SUSPEND */ | 125 | |
126 | /* TMIO controller */ | ||
127 | GPIO19_GPIO, /* t7l66xb #PCLR */ | ||
128 | GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */ | ||
121 | 129 | ||
122 | /* UDC */ | 130 | /* UDC */ |
123 | GPIO13_GPIO, | 131 | GPIO13_GPIO, |
@@ -150,15 +158,39 @@ static unsigned long e740_pin_config[] __initdata = { | |||
150 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, | 158 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, |
151 | }; | 159 | }; |
152 | 160 | ||
161 | /* -------------------- e740 t7l66xb parameters -------------------- */ | ||
162 | |||
163 | static struct t7l66xb_platform_data e740_t7l66xb_info = { | ||
164 | .irq_base = IRQ_BOARD_START, | ||
165 | .enable = &eseries_tmio_enable, | ||
166 | .suspend = &eseries_tmio_suspend, | ||
167 | .resume = &eseries_tmio_resume, | ||
168 | }; | ||
169 | |||
170 | static struct platform_device e740_t7l66xb_device = { | ||
171 | .name = "t7l66xb", | ||
172 | .id = -1, | ||
173 | .dev = { | ||
174 | .platform_data = &e740_t7l66xb_info, | ||
175 | }, | ||
176 | .num_resources = 2, | ||
177 | .resource = eseries_tmio_resources, | ||
178 | }; | ||
179 | |||
153 | /* ----------------------------------------------------------------------- */ | 180 | /* ----------------------------------------------------------------------- */ |
154 | 181 | ||
155 | static struct platform_device *devices[] __initdata = { | 182 | static struct platform_device *devices[] __initdata = { |
156 | &e740_fb_device, | 183 | &e740_fb_device, |
184 | &e740_t7l66xb_device, | ||
157 | }; | 185 | }; |
158 | 186 | ||
159 | static void __init e740_init(void) | 187 | static void __init e740_init(void) |
160 | { | 188 | { |
161 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); | 189 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); |
190 | eseries_register_clks(); | ||
191 | clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev, | ||
192 | "UDCCLK", &pxa25x_device_udc.dev), | ||
193 | eseries_get_tmio_gpios(); | ||
162 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 194 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
163 | pxa_set_udc_info(&e7xx_udc_mach_info); | 195 | pxa_set_udc_info(&e7xx_udc_mach_info); |
164 | e7xx_irda_init(); | 196 | e7xx_irda_init(); |