From fbdd3299d2ce67aa04b62e44038dd355af349b7e Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Mon, 20 Jul 2015 15:17:15 +0200 Subject: sniper: Fastboot support This adds support for the fastboot USB gadget, including flashing to the internal MMC and reboot to bootloader or not. Signed-off-by: Paul Kocialkowski Reviewed-by: Tom Rini [trini: Update to use Kconfig for MUSB] Signed-off-by: Tom Rini --- board/lge/sniper/sniper.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'board') diff --git a/board/lge/sniper/sniper.c b/board/lge/sniper/sniper.c index b211528e2b..2bfc9c5b4a 100644 --- a/board/lge/sniper/sniper.c +++ b/board/lge/sniper/sniper.c @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include #include #include @@ -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) { @@ -95,6 +116,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 +141,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(); -- cgit v1.2.1