]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/lge/sniper/sniper.c
sniper: Power button reset support
[karo-tx-uboot.git] / board / lge / sniper / sniper.c
index b211528e2b550f4878d693743f2130c5d539edc3..97c2ed05548b86431886fa782e848e670cd3d04d 100644 (file)
@@ -10,6 +10,8 @@
 #include <common.h>
 #include <dm.h>
 #include <linux/ctype.h>
+#include <linux/usb/musb.h>
+#include <asm/omap_musb.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mem.h>
@@ -37,6 +39,25 @@ U_BOOT_DEVICE(sniper_serial) = {
        .platdata = &serial_omap_platdata
 };
 
+static struct musb_hdrc_config musb_config = {
+       .multipoint = 1,
+       .dyn_fifo = 1,
+       .num_eps = 16,
+       .ram_bits = 12
+};
+
+static struct omap_musb_board_data musb_board_data = {
+       .interface_type = MUSB_INTERFACE_ULPI,
+};
+
+static struct musb_hdrc_platform_data musb_platform_data = {
+       .mode = MUSB_PERIPHERAL,
+       .config = &musb_config,
+       .power = 100,
+       .platform_ops = &omap2430_ops,
+       .board_data = &musb_board_data,
+};
+
 #ifdef CONFIG_SPL_BUILD
 void get_board_mem_timings(struct board_sdrc_timings *timings)
 {
@@ -74,6 +95,10 @@ int misc_init_r(void)
        char reboot_mode[2] = { 0 };
        u32 dieid[4] = { 0 };
 
+       /* Power button reset init */
+
+       twl4030_power_reset_init();
+
        /* Reboot mode */
 
        reboot_mode[0] = omap_reboot_mode();
@@ -95,6 +120,10 @@ int misc_init_r(void)
                setenv("serial#", serial_string);
        }
 
+       /* MUSB */
+
+       musb_register(&musb_platform_data, &musb_board_data, (void *)MUSB_BASE);
+
        return 0;
 }
 
@@ -116,6 +145,11 @@ void get_board_serial(struct tag_serialnr *serialnr)
        }
 }
 
+int fb_set_reboot_flag(void)
+{
+       return omap_reboot_mode_store('b');
+}
+
 void set_muxconf_regs(void)
 {
        MUX_SNIPER();