]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - arch/arm/mach-tegra/board-roth.c
arm: tegra: bootloader fb free in late_initcall
[linux-2.6.git] / arch / arm / mach-tegra / board-roth.c
index dd6ad723d3590d99657d695e8241592e771164c2..4fe7b330d4ddf9279f0e0c5bab44b84390a0b36c 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/i2c/at24.h>
 #include <linux/of_platform.h>
 #include <asm/hardware/gic.h>
+#include <mach/hardware.h>
 
 #include <mach/clk.h>
 #include <mach/iomap.h>
@@ -63,6 +64,7 @@
 #include <mach/gpio-tegra.h>
 #include <mach/tegra_fiq_debugger.h>
 #include <mach/edp.h>
+#include <mach/hardware.h>
 
 #include "board.h"
 #include "board-common.h"
@@ -613,7 +615,6 @@ struct spi_clk_parent spi_parent_clk_roth[] = {
 };
 
 static struct tegra_spi_platform_data roth_spi_pdata = {
-       .is_dma_based           = false,
        .max_dma_buffer         = 16 * 1024,
        .is_clkon_always        = false,
        .max_rate               = 25000000,
@@ -636,15 +637,63 @@ static void __init roth_spi_init(void)
        }
        roth_spi_pdata.parent_clk_list = spi_parent_clk_roth;
        roth_spi_pdata.parent_clk_count = ARRAY_SIZE(spi_parent_clk_roth);
+       roth_spi_pdata.is_dma_based = (tegra_revision == TEGRA_REVISION_A01) ?
+                                       false : true;
        tegra11_spi_device4.dev.platform_data = &roth_spi_pdata;
        platform_add_devices(roth_spi_devices,
                ARRAY_SIZE(roth_spi_devices));
 }
 
+static __initdata struct tegra_clk_init_table touch_clk_init_table[] = {
+       /* name         parent          rate            enabled */
+       { "extern2",    "pll_p",        41000000,       false},
+       { "clk_out_2",  "extern2",      40800000,       false},
+       { NULL,         NULL,           0,              0},
+};
+
+struct rm_spi_ts_platform_data rm31080ts_roth_data = {
+       .gpio_reset = TOUCH_GPIO_RST_RAYDIUM_SPI,
+       .config = 0,
+       .platform_id = RM_PLATFORM_D010,
+       .name_of_clock = "clk_out_2",
+       .name_of_clock_con = "extern2",
+};
+
+static struct tegra_spi_device_controller_data dev_cdata = {
+       .rx_clk_tap_delay = 0,
+       .tx_clk_tap_delay = 16,
+};
+
+struct spi_board_info rm31080a_roth_spi_board[1] = {
+       {
+        .modalias = "rm_ts_spidev",
+        .bus_num = 3,
+        .chip_select = 2,
+        .max_speed_hz = 12 * 1000 * 1000,
+        .mode = SPI_MODE_0,
+        .controller_data = &dev_cdata,
+        .platform_data = &rm31080ts_roth_data,
+        },
+};
+
+static int __init roth_touch_init(void)
+{
+       tegra_clk_init_from_table(touch_clk_init_table);
+       rm31080ts_roth_data.platform_id = RM_PLATFORM_R005;
+       rm31080a_roth_spi_board[0].irq =
+               gpio_to_irq(TOUCH_GPIO_IRQ_RAYDIUM_SPI);
+       touch_init_raydium(TOUCH_GPIO_IRQ_RAYDIUM_SPI,
+                               TOUCH_GPIO_RST_RAYDIUM_SPI,
+                               &rm31080ts_roth_data,
+                               &rm31080a_roth_spi_board[0],
+                               ARRAY_SIZE(rm31080a_roth_spi_board));
+       return 0;
+}
+
 static void __init tegra_roth_init(void)
 {
        tegra_clk_init_from_table(roth_clk_init_table);
-       tegra_clk_vefify_parents();
+       tegra_clk_verify_parents();
        tegra_soc_device_init("roth");
        tegra_enable_pinmux();
        roth_pinmux_init();
@@ -661,7 +710,9 @@ static void __init tegra_roth_init(void)
        roth_suspend_init();
        roth_emc_init();
        roth_edp_init();
-       roth_panel_init();
+       roth_touch_init();
+       /* roth will pass a null board id to panel_init */
+       roth_panel_init(0);
        roth_kbc_init();
        roth_pmon_init();
 #ifdef CONFIG_BT_BLUESLEEP
@@ -670,7 +721,6 @@ static void __init tegra_roth_init(void)
 #elif defined CONFIG_BLUEDROID_PM
        roth_setup_bluedroid_pm();
 #endif
-       tegra_release_bootloader_fb();
 #ifdef CONFIG_TEGRA_WDT_RECOVERY
        tegra_wdt_recovery_init();
 #endif
@@ -678,6 +728,7 @@ static void __init tegra_roth_init(void)
        roth_sensors_init();
        roth_soctherm_init();
        roth_fan_init();
+       tegra_register_fuse();
 }
 
 static void __init roth_ramconsole_reserve(unsigned long size)
@@ -687,12 +738,12 @@ static void __init roth_ramconsole_reserve(unsigned long size)
 
 static void __init tegra_roth_dt_init(void)
 {
-       tegra_roth_init();
-
 #ifdef CONFIG_USE_OF
        of_platform_populate(NULL,
                of_default_bus_match_table, NULL, NULL);
 #endif
+
+       tegra_roth_init();
 }
 
 static void __init tegra_roth_reserve(void)