aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-h2.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2007-12-18 23:58:32 -0500
committerTony Lindgren <tony@atomide.com>2008-02-08 13:38:02 -0500
commite27a93a944a5ba6a0112750c8243abba86d56e94 (patch)
tree2b7e895acd757783501c8689aac34a2b13ac0269 /arch/arm/mach-omap1/board-h2.c
parent80dbfde54bfc40c1e39ace7dbb371f095e74665f (diff)
ARM: OMAP1: Misc clean-up
This patch cleans up omap1 files to sync up with linux-omap tree: - Remove omap-generic MMC config as it should be defined in board-*.c files instead of using board-generic.c - New style I2C board_info from David Brownell <dbrownell@users.sourceforge.net> - Init section fixes from Dirk Behme <dirk.behme@googlemail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r--arch/arm/mach-omap1/board-h2.c48
1 files changed, 9 insertions, 39 deletions
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 00b7623b9b0c..070345ee39a5 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -37,6 +37,7 @@
37#include <asm/mach/flash.h> 37#include <asm/mach/flash.h>
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
39 39
40#include <asm/arch/gpio-switch.h>
40#include <asm/arch/mux.h> 41#include <asm/arch/mux.h>
41#include <asm/arch/tc.h> 42#include <asm/arch/tc.h>
42#include <asm/arch/nand.h> 43#include <asm/arch/nand.h>
@@ -47,8 +48,6 @@
47#include <asm/arch/mcbsp.h> 48#include <asm/arch/mcbsp.h>
48#include <asm/arch/omap-alsa.h> 49#include <asm/arch/omap-alsa.h>
49 50
50extern int omap_gpio_init(void);
51
52static int h2_keymap[] = { 51static int h2_keymap[] = {
53 KEY(0, 0, KEY_LEFT), 52 KEY(0, 0, KEY_LEFT),
54 KEY(0, 1, KEY_RIGHT), 53 KEY(0, 1, KEY_RIGHT),
@@ -341,22 +340,6 @@ static struct platform_device *h2_devices[] __initdata = {
341 &h2_mcbsp1_device, 340 &h2_mcbsp1_device,
342}; 341};
343 342
344#ifdef CONFIG_I2C_BOARDINFO
345static struct i2c_board_info __initdata h2_i2c_board_info[] = {
346 {
347 I2C_BOARD_INFO("tps65010", 0x48),
348 .type = "tps65010",
349 .irq = OMAP_GPIO_IRQ(58),
350 },
351 /* TODO when driver support is ready:
352 * - isp1301 OTG transceiver
353 * - optional ov9640 camera sensor at 0x30
354 * - pcf9754 for aGPS control
355 * - ... etc
356 */
357};
358#endif
359
360static void __init h2_init_smc91x(void) 343static void __init h2_init_smc91x(void)
361{ 344{
362 if ((omap_request_gpio(0)) < 0) { 345 if ((omap_request_gpio(0)) < 0) {
@@ -365,6 +348,14 @@ static void __init h2_init_smc91x(void)
365 } 348 }
366} 349}
367 350
351static struct i2c_board_info __initdata h2_i2c_board_info[] = {
352 {
353 I2C_BOARD_INFO("isp1301_omap", 0x2d),
354 .type = "isp1301_omap",
355 .irq = OMAP_GPIO_IRQ(2),
356 },
357};
358
368static void __init h2_init_irq(void) 359static void __init h2_init_irq(void)
369{ 360{
370 omap1_init_common_hw(); 361 omap1_init_common_hw();
@@ -461,11 +452,6 @@ static void __init h2_init(void)
461 omap_register_i2c_bus(1, 100, h2_i2c_board_info, 452 omap_register_i2c_bus(1, 100, h2_i2c_board_info,
462 ARRAY_SIZE(h2_i2c_board_info)); 453 ARRAY_SIZE(h2_i2c_board_info));
463 h2_mmc_init(); 454 h2_mmc_init();
464
465 /* irq for tps65010 chip */
466 omap_cfg_reg(W4_GPIO58);
467 if (gpio_request(58, "tps65010") == 0)
468 gpio_direction_input(58);
469} 455}
470 456
471static void __init h2_map_io(void) 457static void __init h2_map_io(void)
@@ -473,22 +459,6 @@ static void __init h2_map_io(void)
473 omap1_map_common_io(); 459 omap1_map_common_io();
474} 460}
475 461
476#ifdef CONFIG_TPS65010
477static int __init h2_tps_init(void)
478{
479 if (!machine_is_omap_h2())
480 return 0;
481
482 /* gpio3 for SD, gpio4 for VDD_DSP */
483 /* FIXME send power to DSP iff it's configured */
484
485 /* Enable LOW_PWR */
486 tps65010_set_low_pwr(ON);
487 return 0;
488}
489fs_initcall(h2_tps_init);
490#endif
491
492MACHINE_START(OMAP_H2, "TI-H2") 462MACHINE_START(OMAP_H2, "TI-H2")
493 /* Maintainer: Imre Deak <imre.deak@nokia.com> */ 463 /* Maintainer: Imre Deak <imre.deak@nokia.com> */
494 .phys_io = 0xfff00000, 464 .phys_io = 0xfff00000,