aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/lg/sniper/sniper.c43
-rw-r--r--board/lg/sniper/sniper.h2
-rw-r--r--include/configs/sniper.h4
3 files changed, 34 insertions, 15 deletions
diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c
index 72953788d9b..62d34bea329 100644
--- a/board/lg/sniper/sniper.c
+++ b/board/lg/sniper/sniper.c
@@ -122,15 +122,6 @@ int misc_init_r(void)
unsigned int i;
int rc;
- /* MUIC */
-
- i2c_set_bus_num(1);
-
- data = 0x00;
- i2c_write(0x44, 0x03, 1, &data, 1);
-
- i2c_set_bus_num(0);
-
/* Power button reset init */
twl4030_power_reset_init();
@@ -173,6 +164,36 @@ int misc_init_r(void)
omap_reboot_mode_clear();
+ /* MUIC */
+
+ if (keys[2]) {
+ gpio_request(SNIPER_GPIO_OMAP_UART_SW, "omap_uart_sw");
+ gpio_direction_output(SNIPER_GPIO_OMAP_UART_SW, 0);
+ gpio_set_value(SNIPER_GPIO_OMAP_UART_SW, 1);
+
+ gpio_request(SNIPER_GPIO_IFX_UART_SW, "ifx_uart_sw");
+ gpio_direction_output(SNIPER_GPIO_IFX_UART_SW, 0);
+ gpio_set_value(SNIPER_GPIO_IFX_UART_SW, 0);
+
+ i2c_set_bus_num(1);
+
+ data = 0x09;
+ i2c_write(0x44, 0x03, 1, &data, 1);
+
+ i2c_set_bus_num(0);
+ } else {
+ i2c_set_bus_num(1);
+
+ data = 0x00;
+ i2c_write(0x44, 0x03, 1, &data, 1);
+
+ i2c_set_bus_num(0);
+
+ /* MUSB */
+
+ musb_register(&musb_platform_data, &musb_board_data, (void *)MUSB_BASE);
+ }
+
/* Serial number */
omap_die_id_serial();
@@ -213,10 +234,6 @@ int misc_init_r(void)
i2c_set_bus_num(0);
- /* MUSB */
-
- musb_register(&musb_platform_data, &musb_board_data, (void *)MUSB_BASE);
-
return 0;
}
diff --git a/board/lg/sniper/sniper.h b/board/lg/sniper/sniper.h
index 7146bb5e584..c5140367bbd 100644
--- a/board/lg/sniper/sniper.h
+++ b/board/lg/sniper/sniper.h
@@ -15,6 +15,8 @@
#define SNIPER_GPIO_CAM_SUBPM_EN 37
#define SNIPER_GPIO_LCD_CP_EN 62
#define SNIPER_GPIO_KEY_LED_RESET 128
+#define SNIPER_GPIO_OMAP_UART_SW 161
+#define SNIPER_GPIO_IFX_UART_SW 162
#define MUX_SNIPER() \
/* SDRC */ \
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index cb25c0a6741..01ca674415d 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -225,7 +225,7 @@
#define CONFIG_FASTBOOT_BUF_SIZE 0x2000000
#define CONFIG_FASTBOOT_FLASH
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV 0
+#define CONFIG_FASTBOOT_FLASH_MMC_DEV 1
#define CONFIG_CMD_FASTBOOT
@@ -247,7 +247,7 @@
"pxefile_addr_r=0x80100000\0" \
"scriptaddr=0x80000000\0" \
"bootm_size=0x10000000\0" \
- "boot_mmc_dev=0\0" \
+ "boot_mmc_dev=1\0" \
"kernel_mmc_part=3\0" \
"recovery_mmc_part=4\0" \
"fdtfile=omap3-sniper.dtb\0" \