aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-fsample.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-omap1/board-fsample.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-omap1/board-fsample.c')
-rw-r--r--arch/arm/mach-omap1/board-fsample.c95
1 files changed, 48 insertions, 47 deletions
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 180ce79e5eac..87f173d93557 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -69,36 +69,35 @@
69#define fsample_cpld_clear(bit) \ 69#define fsample_cpld_clear(bit) \
70 fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR) 70 fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR)
71 71
72static int fsample_keymap[] = { 72static const unsigned int fsample_keymap[] = {
73 KEY(0,0,KEY_UP), 73 KEY(0, 0, KEY_UP),
74 KEY(0,1,KEY_RIGHT), 74 KEY(1, 0, KEY_RIGHT),
75 KEY(0,2,KEY_LEFT), 75 KEY(2, 0, KEY_LEFT),
76 KEY(0,3,KEY_DOWN), 76 KEY(3, 0, KEY_DOWN),
77 KEY(0,4,KEY_ENTER), 77 KEY(4, 0, KEY_ENTER),
78 KEY(1,0,KEY_F10), 78 KEY(0, 1, KEY_F10),
79 KEY(1,1,KEY_SEND), 79 KEY(1, 1, KEY_SEND),
80 KEY(1,2,KEY_END), 80 KEY(2, 1, KEY_END),
81 KEY(1,3,KEY_VOLUMEDOWN), 81 KEY(3, 1, KEY_VOLUMEDOWN),
82 KEY(1,4,KEY_VOLUMEUP), 82 KEY(4, 1, KEY_VOLUMEUP),
83 KEY(1,5,KEY_RECORD), 83 KEY(5, 1, KEY_RECORD),
84 KEY(2,0,KEY_F9), 84 KEY(0, 2, KEY_F9),
85 KEY(2,1,KEY_3), 85 KEY(1, 2, KEY_3),
86 KEY(2,2,KEY_6), 86 KEY(2, 2, KEY_6),
87 KEY(2,3,KEY_9), 87 KEY(3, 2, KEY_9),
88 KEY(2,4,KEY_KPDOT), 88 KEY(4, 2, KEY_KPDOT),
89 KEY(3,0,KEY_BACK), 89 KEY(0, 3, KEY_BACK),
90 KEY(3,1,KEY_2), 90 KEY(1, 3, KEY_2),
91 KEY(3,2,KEY_5), 91 KEY(2, 3, KEY_5),
92 KEY(3,3,KEY_8), 92 KEY(3, 3, KEY_8),
93 KEY(3,4,KEY_0), 93 KEY(4, 3, KEY_0),
94 KEY(3,5,KEY_KPSLASH), 94 KEY(5, 3, KEY_KPSLASH),
95 KEY(4,0,KEY_HOME), 95 KEY(0, 4, KEY_HOME),
96 KEY(4,1,KEY_1), 96 KEY(1, 4, KEY_1),
97 KEY(4,2,KEY_4), 97 KEY(2, 4, KEY_4),
98 KEY(4,3,KEY_7), 98 KEY(3, 4, KEY_7),
99 KEY(4,4,KEY_KPASTERISK), 99 KEY(4, 4, KEY_KPASTERISK),
100 KEY(4,5,KEY_POWER), 100 KEY(5, 4, KEY_POWER),
101 0
102}; 101};
103 102
104static struct smc91x_platdata smc91x_info = { 103static struct smc91x_platdata smc91x_info = {
@@ -120,6 +119,15 @@ static struct resource smc91x_resources[] = {
120 }, 119 },
121}; 120};
122 121
122static void __init fsample_init_smc91x(void)
123{
124 fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
125 mdelay(50);
126 fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
127 H2P2_DBG_FPGA_LAN_RESET);
128 mdelay(50);
129}
130
123static struct mtd_partition nor_partitions[] = { 131static struct mtd_partition nor_partitions[] = {
124 /* bootloader (U-Boot, etc) in first sector */ 132 /* bootloader (U-Boot, etc) in first sector */
125 { 133 {
@@ -244,11 +252,15 @@ static struct resource kp_resources[] = {
244 }, 252 },
245}; 253};
246 254
255static const struct matrix_keymap_data fsample_keymap_data = {
256 .keymap = fsample_keymap,
257 .keymap_size = ARRAY_SIZE(fsample_keymap),
258};
259
247static struct omap_kp_platform_data kp_data = { 260static struct omap_kp_platform_data kp_data = {
248 .rows = 8, 261 .rows = 8,
249 .cols = 8, 262 .cols = 8,
250 .keymap = fsample_keymap, 263 .keymap_data = &fsample_keymap_data,
251 .keymapsize = ARRAY_SIZE(fsample_keymap),
252 .delay = 4, 264 .delay = 4,
253}; 265};
254 266
@@ -275,16 +287,18 @@ static struct platform_device *devices[] __initdata = {
275 &lcd_device, 287 &lcd_device,
276}; 288};
277 289
278static struct omap_lcd_config fsample_lcd_config __initdata = { 290static struct omap_lcd_config fsample_lcd_config = {
279 .ctrl_name = "internal", 291 .ctrl_name = "internal",
280}; 292};
281 293
282static struct omap_board_config_kernel fsample_config[] = { 294static struct omap_board_config_kernel fsample_config[] __initdata = {
283 { OMAP_TAG_LCD, &fsample_lcd_config }, 295 { OMAP_TAG_LCD, &fsample_lcd_config },
284}; 296};
285 297
286static void __init omap_fsample_init(void) 298static void __init omap_fsample_init(void)
287{ 299{
300 fsample_init_smc91x();
301
288 if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0) 302 if (gpio_request(FSAMPLE_NAND_RB_GPIO_PIN, "NAND ready") < 0)
289 BUG(); 303 BUG();
290 gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN); 304 gpio_direction_input(FSAMPLE_NAND_RB_GPIO_PIN);
@@ -312,21 +326,10 @@ static void __init omap_fsample_init(void)
312 omap_register_i2c_bus(1, 100, NULL, 0); 326 omap_register_i2c_bus(1, 100, NULL, 0);
313} 327}
314 328
315static void __init fsample_init_smc91x(void)
316{
317 fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
318 mdelay(50);
319 fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
320 H2P2_DBG_FPGA_LAN_RESET);
321 mdelay(50);
322}
323
324static void __init omap_fsample_init_irq(void) 329static void __init omap_fsample_init_irq(void)
325{ 330{
326 omap1_init_common_hw(); 331 omap1_init_common_hw();
327 omap_init_irq(); 332 omap_init_irq();
328 omap_gpio_init();
329 fsample_init_smc91x();
330} 333}
331 334
332/* Only FPGA needs to be mapped here. All others are done with ioremap */ 335/* Only FPGA needs to be mapped here. All others are done with ioremap */
@@ -386,8 +389,6 @@ static void __init omap_fsample_map_io(void)
386 389
387MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") 390MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
388/* Maintainer: Brian Swetland <swetland@google.com> */ 391/* Maintainer: Brian Swetland <swetland@google.com> */
389 .phys_io = 0xfff00000,
390 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
391 .boot_params = 0x10000100, 392 .boot_params = 0x10000100,
392 .map_io = omap_fsample_map_io, 393 .map_io = omap_fsample_map_io,
393 .reserve = omap_reserve, 394 .reserve = omap_reserve,