diff options
author | Tony Lindgren <tony@atomide.com> | 2006-04-02 12:46:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-04-02 12:46:30 -0400 |
commit | 9b6553cd01ce3ea7a6a532f7b7e62e3535d6b102 (patch) | |
tree | 8b8bf4682ecf602fc35cd98e4ea2e888519b20cb /arch/arm/mach-omap1/board-osk.c | |
parent | 120db2cba8e40c562e5a4aea44ede2f360a5de75 (diff) |
[ARM] 3433/1: ARM: OMAP: 8/8 Update board files
Patch from Tony Lindgren
This patch syncs OMAP board support with linux-omap tree.
The highlights of the patch are:
- Add support for Nokia 770 by Juha Yrjola
- Add support for Samsung Apollon by Kyungmin Park
- Add support for Amstrad E3 videophone by Jonathan McDowell
- Remove board-netstar.c board support as requested by Ladislav Michl
- Do platform_device registration in board files by Komal Shah et al.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap1/board-osk.c')
-rw-r--r-- | arch/arm/mach-omap1/board-osk.c | 95 |
1 files changed, 92 insertions, 3 deletions
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 543fa136106d..1160093e8ef6 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/mtd/mtd.h> | 34 | #include <linux/mtd/mtd.h> |
35 | #include <linux/mtd/partitions.h> | 35 | #include <linux/mtd/partitions.h> |
36 | #include <linux/input.h> | ||
36 | 37 | ||
37 | #include <asm/hardware.h> | 38 | #include <asm/hardware.h> |
38 | #include <asm/mach-types.h> | 39 | #include <asm/mach-types.h> |
@@ -44,7 +45,24 @@ | |||
44 | #include <asm/arch/usb.h> | 45 | #include <asm/arch/usb.h> |
45 | #include <asm/arch/mux.h> | 46 | #include <asm/arch/mux.h> |
46 | #include <asm/arch/tc.h> | 47 | #include <asm/arch/tc.h> |
48 | #include <asm/arch/keypad.h> | ||
47 | #include <asm/arch/common.h> | 49 | #include <asm/arch/common.h> |
50 | #include <asm/arch/mcbsp.h> | ||
51 | #include <asm/arch/omap-alsa.h> | ||
52 | |||
53 | static int osk_keymap[] = { | ||
54 | KEY(0, 0, KEY_F1), | ||
55 | KEY(0, 3, KEY_UP), | ||
56 | KEY(1, 1, KEY_LEFTCTRL), | ||
57 | KEY(1, 2, KEY_LEFT), | ||
58 | KEY(2, 0, KEY_SPACE), | ||
59 | KEY(2, 1, KEY_ESC), | ||
60 | KEY(2, 2, KEY_DOWN), | ||
61 | KEY(3, 2, KEY_ENTER), | ||
62 | KEY(3, 3, KEY_RIGHT), | ||
63 | 0 | ||
64 | }; | ||
65 | |||
48 | 66 | ||
49 | static struct mtd_partition osk_partitions[] = { | 67 | static struct mtd_partition osk_partitions[] = { |
50 | /* bootloader (U-Boot, etc) in first sector */ | 68 | /* bootloader (U-Boot, etc) in first sector */ |
@@ -133,9 +151,69 @@ static struct platform_device osk5912_cf_device = { | |||
133 | .resource = osk5912_cf_resources, | 151 | .resource = osk5912_cf_resources, |
134 | }; | 152 | }; |
135 | 153 | ||
154 | #define DEFAULT_BITPERSAMPLE 16 | ||
155 | |||
156 | static struct omap_mcbsp_reg_cfg mcbsp_regs = { | ||
157 | .spcr2 = FREE | FRST | GRST | XRST | XINTM(3), | ||
158 | .spcr1 = RINTM(3) | RRST, | ||
159 | .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) | | ||
160 | RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0), | ||
161 | .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16), | ||
162 | .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) | | ||
163 | XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG, | ||
164 | .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16), | ||
165 | .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1), | ||
166 | .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1), | ||
167 | /*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */ | ||
168 | .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */ | ||
169 | }; | ||
170 | |||
171 | static struct omap_alsa_codec_config alsa_config = { | ||
172 | .name = "OSK AIC23", | ||
173 | .mcbsp_regs_alsa = &mcbsp_regs, | ||
174 | .codec_configure_dev = NULL, // aic23_configure, | ||
175 | .codec_set_samplerate = NULL, // aic23_set_samplerate, | ||
176 | .codec_clock_setup = NULL, // aic23_clock_setup, | ||
177 | .codec_clock_on = NULL, // aic23_clock_on, | ||
178 | .codec_clock_off = NULL, // aic23_clock_off, | ||
179 | .get_default_samplerate = NULL, // aic23_get_default_samplerate, | ||
180 | }; | ||
181 | |||
136 | static struct platform_device osk5912_mcbsp1_device = { | 182 | static struct platform_device osk5912_mcbsp1_device = { |
137 | .name = "omap_mcbsp", | 183 | .name = "omap_alsa_mcbsp", |
138 | .id = 1, | 184 | .id = 1, |
185 | .dev = { | ||
186 | .platform_data = &alsa_config, | ||
187 | }, | ||
188 | }; | ||
189 | |||
190 | static struct resource osk5912_kp_resources[] = { | ||
191 | [0] = { | ||
192 | .start = INT_KEYBOARD, | ||
193 | .end = INT_KEYBOARD, | ||
194 | .flags = IORESOURCE_IRQ, | ||
195 | }, | ||
196 | }; | ||
197 | |||
198 | static struct omap_kp_platform_data osk_kp_data = { | ||
199 | .rows = 8, | ||
200 | .cols = 8, | ||
201 | .keymap = osk_keymap, | ||
202 | }; | ||
203 | |||
204 | static struct platform_device osk5912_kp_device = { | ||
205 | .name = "omap-keypad", | ||
206 | .id = -1, | ||
207 | .dev = { | ||
208 | .platform_data = &osk_kp_data, | ||
209 | }, | ||
210 | .num_resources = ARRAY_SIZE(osk5912_kp_resources), | ||
211 | .resource = osk5912_kp_resources, | ||
212 | }; | ||
213 | |||
214 | static struct platform_device osk5912_lcd_device = { | ||
215 | .name = "lcd_osk", | ||
216 | .id = -1, | ||
139 | }; | 217 | }; |
140 | 218 | ||
141 | static struct platform_device *osk5912_devices[] __initdata = { | 219 | static struct platform_device *osk5912_devices[] __initdata = { |
@@ -143,6 +221,8 @@ static struct platform_device *osk5912_devices[] __initdata = { | |||
143 | &osk5912_smc91x_device, | 221 | &osk5912_smc91x_device, |
144 | &osk5912_cf_device, | 222 | &osk5912_cf_device, |
145 | &osk5912_mcbsp1_device, | 223 | &osk5912_mcbsp1_device, |
224 | &osk5912_kp_device, | ||
225 | &osk5912_lcd_device, | ||
146 | }; | 226 | }; |
147 | 227 | ||
148 | static void __init osk_init_smc91x(void) | 228 | static void __init osk_init_smc91x(void) |
@@ -197,7 +277,6 @@ static struct omap_uart_config osk_uart_config __initdata = { | |||
197 | }; | 277 | }; |
198 | 278 | ||
199 | static struct omap_lcd_config osk_lcd_config __initdata = { | 279 | static struct omap_lcd_config osk_lcd_config __initdata = { |
200 | .panel_name = "osk", | ||
201 | .ctrl_name = "internal", | 280 | .ctrl_name = "internal", |
202 | }; | 281 | }; |
203 | 282 | ||
@@ -255,8 +334,18 @@ static void __init osk_mistral_init(void) | |||
255 | static void __init osk_mistral_init(void) { } | 334 | static void __init osk_mistral_init(void) { } |
256 | #endif | 335 | #endif |
257 | 336 | ||
337 | #define EMIFS_CS3_VAL (0x88013141) | ||
338 | |||
258 | static void __init osk_init(void) | 339 | static void __init osk_init(void) |
259 | { | 340 | { |
341 | /* Workaround for wrong CS3 (NOR flash) timing | ||
342 | * There are some U-Boot versions out there which configure | ||
343 | * wrong CS3 memory timings. This mainly leads to CRC | ||
344 | * or similiar errors if you use NOR flash (e.g. with JFFS2) | ||
345 | */ | ||
346 | if (EMIFS_CCS(3) != EMIFS_CS3_VAL) | ||
347 | EMIFS_CCS(3) = EMIFS_CS3_VAL; | ||
348 | |||
260 | osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys(); | 349 | osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys(); |
261 | osk_flash_resource.end += SZ_32M - 1; | 350 | osk_flash_resource.end += SZ_32M - 1; |
262 | platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); | 351 | platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices)); |