arm: tegra: cardhu: Support for E1257
Laxman Dewangan [Fri, 9 Sep 2011 05:38:01 +0000 (10:38 +0530)]
Adding support for E1257 platform.

bug 864294

Reviewed-on: http://git-master/r/50662
(cherry picked from commit 8217615021a6ffeb992327f6b010ea9deebc34e7)

Change-Id: I3429da1bca38e1ddc5b3c2156a0db6b23aeb5555
Reviewed-on: http://git-master/r/57806
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R7fadbdc30bdca30e41e0b7fdb88628dbc8c32e82

arch/arm/mach-tegra/board-cardhu-kbc.c
arch/arm/mach-tegra/board-cardhu-memory.c
arch/arm/mach-tegra/board-cardhu-panel.c
arch/arm/mach-tegra/board-cardhu-pinmux.c
arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu-sdhci.c
arch/arm/mach-tegra/board-cardhu-sensors.c
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-cardhu.h

index 1408e59..bbdc013 100644 (file)
@@ -114,6 +114,7 @@ int __init cardhu_kbc_init(void)
                return 0;
 
        if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311)) {
                cardhu_kbc_platform_data.plain_keycode = plain_kbd_keycode_pm269;
@@ -244,6 +245,7 @@ int __init cardhu_keys_init(void)
        tegra_get_board_info(&board_info);
        if (!((board_info.board_id == BOARD_E1198) ||
                (board_info.board_id == BOARD_E1291) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311) ||
                (board_info.board_id == BOARD_PM269)))
@@ -267,6 +269,7 @@ int __init cardhu_keys_init(void)
 
        /* Register on-key through pmu interrupt */
        if ((board_info.board_id == BOARD_E1291) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311) ||
                (board_info.board_id == BOARD_PM269))
index 905c6f0..bf73e0b 100644 (file)
@@ -2534,6 +2534,7 @@ int cardhu_emc_init(void)
 
        switch (board.board_id) {
        case BOARD_PM269:
+       case BOARD_E1257:
                if (MEMORY_TYPE(board.sku) == SKU_MEMORY_ELPIDA)
                        tegra_init_emc(cardhu_emc_tables_edb8132b2ma,
                                        ARRAY_SIZE(cardhu_emc_tables_edb8132b2ma));
index 7597962..57076cb 100644 (file)
@@ -266,6 +266,7 @@ static int cardhu_panel_enable(void)
                        regulator_enable(cardhu_lvds_vdd_panel);
        }
        if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311))
                gpio_set_value(pm269_lvds_shutdown, 1);
@@ -289,6 +290,7 @@ static int cardhu_panel_disable(void)
        regulator_put(cardhu_lvds_vdd_panel);
        cardhu_lvds_vdd_panel= NULL;
        if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311))
                gpio_set_value(pm269_lvds_shutdown, 0);
@@ -978,6 +980,7 @@ int __init cardhu_panel_init(void)
        }
 
        if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311)) {
                gpio_request(pm269_lvds_shutdown, "lvds_shutdown");
index 59e2e97..9e39f2a 100644 (file)
@@ -553,6 +553,7 @@ int __init cardhu_pinmux_init(void)
        case BOARD_PM269:
        case BOARD_PM305:
        case BOARD_PM311:
+       case BOARD_E1257:
                tegra_pinmux_config_table(cardhu_pinmux_e118x,
                                        ARRAY_SIZE(cardhu_pinmux_e118x));
                tegra_pinmux_config_table(unused_pins_lowpower,
@@ -659,6 +660,7 @@ int __init cardhu_pins_state_init(void)
                                        ARRAY_SIZE(pin_lpm_cardhu_common));
 
        if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311))
                set_unused_pin_gpio(&vddio_gmi_pins_pm269[0],
index aaab618..75180a3 100644 (file)
@@ -934,6 +934,7 @@ int __init cardhu_gpio_switch_regulator_init(void)
        case BOARD_PM269:
        case BOARD_PM305:
        case BOARD_PM311:
+       case BOARD_E1257:
                gswitch_pdata.num_subdevs = ARRAY_SIZE(gswitch_subdevs_pm269);
                gswitch_pdata.subdevs = gswitch_subdevs_pm269;
                break;
@@ -1008,6 +1009,7 @@ int __init cardhu_suspend_init(void)
        case BOARD_E1187:
        case BOARD_E1186:
        case BOARD_E1256:
+       case BOARD_E1257:
                cardhu_suspend_data.cpu_timer = 5000;
                cardhu_suspend_data.cpu_off_timer = 5000;
                break;
index 5ed56d9..10441c9 100644 (file)
@@ -218,6 +218,7 @@ int __init cardhu_sdhci_init(void)
        struct board_info board_info;
        tegra_get_board_info(&board_info);
        if ((board_info.board_id == BOARD_PM269) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311)) {
                tegra_sdhci_platform_data2.max_clk = 12000000;
index aea03b5..b453430 100644 (file)
@@ -587,6 +587,7 @@ static int cardhu_nct1008_init(void)
 
        if ((board_info.board_id == BOARD_E1198) ||
                (board_info.board_id == BOARD_E1291) ||
+               (board_info.board_id == BOARD_E1257) ||
                (board_info.board_id == BOARD_PM269) ||
                (board_info.board_id == BOARD_PM305) ||
                (board_info.board_id == BOARD_PM311)) {
index a6fb9e0..5c95b8a 100644 (file)
@@ -311,13 +311,14 @@ static void __init uart_debug_init(void)
        tegra_get_board_info(&board_info);
        /* UARTB is debug port
         *       for SLT - E1186/E1187/PM269
-        *       for E1256
+        *       for E1256/E1257
         */
        if (((board_info.sku & SKU_SLT_ULPI_SUPPORT) &&
                ((board_info.board_id == BOARD_E1186) ||
                (board_info.board_id == BOARD_E1187) ||
                (board_info.board_id == BOARD_PM269))) ||
-               (board_info.board_id == BOARD_E1256)) {
+               (board_info.board_id == BOARD_E1256) ||
+               (board_info.board_id == BOARD_E1257)) {
                        /* UARTB is the debug port. */
                        pr_info("Selecting UARTB as the debug console\n");
                        cardhu_uart_devices[1] = &debug_uartb_device;
index c414f9d..e4b4d29 100644 (file)
@@ -30,6 +30,7 @@
 #define BOARD_E1186   0x0B56
 #define BOARD_E1198   0x0B62
 #define BOARD_E1256   0x0C38
+#define BOARD_E1257   0x0C39
 #define BOARD_E1291   0x0C5B
 #define BOARD_PM267   0x0243
 #define BOARD_PM269   0x0245