aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-h4.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/mach-omap2/board-h4.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/mach-omap2/board-h4.c')
-rw-r--r--arch/arm/mach-omap2/board-h4.c89
1 files changed, 47 insertions, 42 deletions
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index e09bd686389f..bac7933b8cbb 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -31,7 +31,6 @@
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 32#include <asm/mach/map.h>
33 33
34#include <plat/control.h>
35#include <mach/gpio.h> 34#include <mach/gpio.h>
36#include <plat/usb.h> 35#include <plat/usb.h>
37#include <plat/board.h> 36#include <plat/board.h>
@@ -42,6 +41,7 @@
42#include <plat/gpmc.h> 41#include <plat/gpmc.h>
43 42
44#include "mux.h" 43#include "mux.h"
44#include "control.h"
45 45
46#define H4_FLASH_CS 0 46#define H4_FLASH_CS 0
47#define H4_SMC91X_CS 1 47#define H4_SMC91X_CS 1
@@ -51,38 +51,37 @@
51static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 }; 51static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };
52static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 }; 52static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };
53 53
54static int h4_keymap[] = { 54static const unsigned int h4_keymap[] = {
55 KEY(0, 0, KEY_LEFT), 55 KEY(0, 0, KEY_LEFT),
56 KEY(0, 1, KEY_RIGHT), 56 KEY(1, 0, KEY_RIGHT),
57 KEY(0, 2, KEY_A), 57 KEY(2, 0, KEY_A),
58 KEY(0, 3, KEY_B), 58 KEY(3, 0, KEY_B),
59 KEY(0, 4, KEY_C), 59 KEY(4, 0, KEY_C),
60 KEY(1, 0, KEY_DOWN), 60 KEY(0, 1, KEY_DOWN),
61 KEY(1, 1, KEY_UP), 61 KEY(1, 1, KEY_UP),
62 KEY(1, 2, KEY_E), 62 KEY(2, 1, KEY_E),
63 KEY(1, 3, KEY_F), 63 KEY(3, 1, KEY_F),
64 KEY(1, 4, KEY_G), 64 KEY(4, 1, KEY_G),
65 KEY(2, 0, KEY_ENTER), 65 KEY(0, 2, KEY_ENTER),
66 KEY(2, 1, KEY_I), 66 KEY(1, 2, KEY_I),
67 KEY(2, 2, KEY_J), 67 KEY(2, 2, KEY_J),
68 KEY(2, 3, KEY_K), 68 KEY(3, 2, KEY_K),
69 KEY(2, 4, KEY_3), 69 KEY(4, 2, KEY_3),
70 KEY(3, 0, KEY_M), 70 KEY(0, 3, KEY_M),
71 KEY(3, 1, KEY_N), 71 KEY(1, 3, KEY_N),
72 KEY(3, 2, KEY_O), 72 KEY(2, 3, KEY_O),
73 KEY(3, 3, KEY_P), 73 KEY(3, 3, KEY_P),
74 KEY(3, 4, KEY_Q), 74 KEY(4, 3, KEY_Q),
75 KEY(4, 0, KEY_R), 75 KEY(0, 4, KEY_R),
76 KEY(4, 1, KEY_4), 76 KEY(1, 4, KEY_4),
77 KEY(4, 2, KEY_T), 77 KEY(2, 4, KEY_T),
78 KEY(4, 3, KEY_U), 78 KEY(3, 4, KEY_U),
79 KEY(4, 4, KEY_ENTER), 79 KEY(4, 4, KEY_ENTER),
80 KEY(5, 0, KEY_V), 80 KEY(0, 5, KEY_V),
81 KEY(5, 1, KEY_W), 81 KEY(1, 5, KEY_W),
82 KEY(5, 2, KEY_L), 82 KEY(2, 5, KEY_L),
83 KEY(5, 3, KEY_S), 83 KEY(3, 5, KEY_S),
84 KEY(5, 4, KEY_ENTER), 84 KEY(4, 5, KEY_ENTER),
85 0
86}; 85};
87 86
88static struct mtd_partition h4_partitions[] = { 87static struct mtd_partition h4_partitions[] = {
@@ -136,12 +135,16 @@ static struct platform_device h4_flash_device = {
136 .resource = &h4_flash_resource, 135 .resource = &h4_flash_resource,
137}; 136};
138 137
138static const struct matrix_keymap_data h4_keymap_data = {
139 .keymap = h4_keymap,
140 .keymap_size = ARRAY_SIZE(h4_keymap),
141};
142
139static struct omap_kp_platform_data h4_kp_data = { 143static struct omap_kp_platform_data h4_kp_data = {
140 .rows = 6, 144 .rows = 6,
141 .cols = 7, 145 .cols = 7,
142 .keymap = h4_keymap, 146 .keymap_data = &h4_keymap_data,
143 .keymapsize = ARRAY_SIZE(h4_keymap), 147 .rep = true,
144 .rep = 1,
145 .row_gpios = row_gpios, 148 .row_gpios = row_gpios,
146 .col_gpios = col_gpios, 149 .col_gpios = col_gpios,
147}; 150};
@@ -283,18 +286,19 @@ static struct omap_usb_config h4_usb_config __initdata = {
283 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */ 286 .hmc_mode = 0x00, /* 0:dev|otg 1:disable 2:disable */
284}; 287};
285 288
286static struct omap_board_config_kernel h4_config[] = { 289static struct omap_board_config_kernel h4_config[] __initdata = {
287 { OMAP_TAG_LCD, &h4_lcd_config }, 290 { OMAP_TAG_LCD, &h4_lcd_config },
288}; 291};
289 292
293static void __init omap_h4_init_early(void)
294{
295 omap2_init_common_infrastructure();
296 omap2_init_common_devices(NULL, NULL);
297}
298
290static void __init omap_h4_init_irq(void) 299static void __init omap_h4_init_irq(void)
291{ 300{
292 omap_board_config = h4_config;
293 omap_board_config_size = ARRAY_SIZE(h4_config);
294 omap2_init_common_hw(NULL, NULL);
295 omap_init_irq(); 301 omap_init_irq();
296 omap_gpio_init();
297 h4_init_flash();
298} 302}
299 303
300static struct at24_platform_data m24c01 = { 304static struct at24_platform_data m24c01 = {
@@ -321,14 +325,15 @@ static struct i2c_board_info __initdata h4_i2c_board_info[] = {
321static struct omap_board_mux board_mux[] __initdata = { 325static struct omap_board_mux board_mux[] __initdata = {
322 { .reg_offset = OMAP_MUX_TERMINATOR }, 326 { .reg_offset = OMAP_MUX_TERMINATOR },
323}; 327};
324#else
325#define board_mux NULL
326#endif 328#endif
327 329
328static void __init omap_h4_init(void) 330static void __init omap_h4_init(void)
329{ 331{
330 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF); 332 omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAF);
331 333
334 omap_board_config = h4_config;
335 omap_board_config_size = ARRAY_SIZE(h4_config);
336
332 /* 337 /*
333 * Make sure the serial ports are muxed on at this point. 338 * Make sure the serial ports are muxed on at this point.
334 * You have to mux them off in device drivers later on 339 * You have to mux them off in device drivers later on
@@ -366,6 +371,7 @@ static void __init omap_h4_init(void)
366 platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices)); 371 platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
367 omap2_usbfs_init(&h4_usb_config); 372 omap2_usbfs_init(&h4_usb_config);
368 omap_serial_init(); 373 omap_serial_init();
374 h4_init_flash();
369} 375}
370 376
371static void __init omap_h4_map_io(void) 377static void __init omap_h4_map_io(void)
@@ -376,11 +382,10 @@ static void __init omap_h4_map_io(void)
376 382
377MACHINE_START(OMAP_H4, "OMAP2420 H4 board") 383MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
378 /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ 384 /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
379 .phys_io = 0x48000000,
380 .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc,
381 .boot_params = 0x80000100, 385 .boot_params = 0x80000100,
382 .map_io = omap_h4_map_io,
383 .reserve = omap_reserve, 386 .reserve = omap_reserve,
387 .map_io = omap_h4_map_io,
388 .init_early = omap_h4_init_early,
384 .init_irq = omap_h4_init_irq, 389 .init_irq = omap_h4_init_irq,
385 .init_machine = omap_h4_init, 390 .init_machine = omap_h4_init,
386 .timer = &omap_timer, 391 .timer = &omap_timer,