]> err.no Git - linux-2.6/blobdiff - arch/arm/mach-omap1/board-h3.c
Merge branches 'pxa' and 'orion-fixes1'
[linux-2.6] / arch / arm / mach-omap1 / board-h3.c
index 7cf6ccd4e7ffd89858c7b7633e59082f0383b630..c3ef1ee5f77bcd4a01fb9a5ecac297493c850651 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/input.h>
+#include <linux/spi/spi.h>
 #include <linux/i2c/tps65010.h>
 
 #include <asm/setup.h>
@@ -51,7 +52,7 @@
 #include <asm/arch/mcbsp.h>
 #include <asm/arch/omap-alsa.h>
 
-extern int omap_gpio_init(void);
+#define H3_TS_GPIO     48
 
 static int h3_keymap[] = {
        KEY(0, 0, KEY_LEFT),
@@ -375,6 +376,17 @@ static struct platform_device h3_lcd_device = {
        .id             = -1,
 };
 
+static struct spi_board_info h3_spi_board_info[] __initdata = {
+       [0] = {
+               .modalias       = "tsc2101",
+               .bus_num        = 2,
+               .chip_select    = 0,
+               .irq            = OMAP_GPIO_IRQ(H3_TS_GPIO),
+               .max_speed_hz   = 16000000,
+               /* .platform_data       = &tsc_platform_data, */
+       },
+};
+
 static struct omap_mcbsp_reg_cfg mcbsp_regs = {
        .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
        .spcr1 = RINTM(3) | RRST,
@@ -452,7 +464,7 @@ static struct omap_lcd_config h3_lcd_config __initdata = {
        .ctrl_name      = "internal",
 };
 
-static struct omap_board_config_kernel h3_config[] = {
+static struct omap_board_config_kernel h3_config[] __initdata = {
        { OMAP_TAG_USB,         &h3_usb_config },
        { OMAP_TAG_MMC,         &h3_mmc_config },
        { OMAP_TAG_UART,        &h3_uart_config },
@@ -460,16 +472,11 @@ static struct omap_board_config_kernel h3_config[] = {
 };
 
 static struct i2c_board_info __initdata h3_i2c_board_info[] = {
-       {
-               I2C_BOARD_INFO("tps65010", 0x48),
-               .type           = "tps65013",
-               /* .irq         = OMAP_GPIO_IRQ(??), */
-       },
-       /* TODO when driver support is ready:
-        *  - isp1301 OTG transceiver
-        *  - optional ov9640 camera sensor at 0x30
-        *  - ...
-        */
+       {
+               I2C_BOARD_INFO("tps65010", 0x48),
+               .type           = "tps65013",
+               /* .irq         = OMAP_GPIO_IRQ(??), */
+       },
 };
 
 static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
@@ -514,6 +521,8 @@ static void __init h3_init(void)
        omap_cfg_reg(V2_1710_GPIO10);
 
        platform_add_devices(devices, ARRAY_SIZE(devices));
+       spi_register_board_info(h3_spi_board_info,
+                               ARRAY_SIZE(h3_spi_board_info));
        omap_board_config = h3_config;
        omap_board_config_size = ARRAY_SIZE(h3_config);
        omap_serial_init();
@@ -544,23 +553,6 @@ static void __init h3_map_io(void)
        omap1_map_common_io();
 }
 
-#ifdef CONFIG_TPS65010
-static int __init h3_tps_init(void)
-{
-       if (!machine_is_omap_h3())
-               return 0;
-
-       /* gpio4 for SD, gpio3 for VDD_DSP */
-       /* FIXME send power to DSP iff it's configured */
-
-       /* Enable LOW_PWR */
-       tps65013_set_low_pwr(ON);
-
-       return 0;
-}
-fs_initcall(h3_tps_init);
-#endif
-
 MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
        /* Maintainer: Texas Instruments, Inc. */
        .phys_io        = 0xfff00000,