diff options
author | Jiandong Zheng <jdzheng@broadcom.com> | 2015-07-09 14:26:40 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2015-07-22 08:57:54 +0200 |
commit | d00bf7812181f53d6027610f35c1aa2018ce9fd3 (patch) | |
tree | 48ab997440dc2afb8246df45bc4725d8b974d409 /board/broadcom | |
parent | 854cbd2977561f8572c7ab07b95ee90226451185 (diff) | |
download | u-boot-imx-d00bf7812181f53d6027610f35c1aa2018ce9fd3.zip u-boot-imx-d00bf7812181f53d6027610f35c1aa2018ce9fd3.tar.gz u-boot-imx-d00bf7812181f53d6027610f35c1aa2018ce9fd3.tar.bz2 |
implement Fastboot via USB OTG on bcm28155_ap boards
Signed-off-by: Jiandong Zheng <jdzheng@broadcom.com>
Signed-off-by: Steve Rae <srae@broadcom.com>
Diffstat (limited to 'board/broadcom')
-rw-r--r-- | board/broadcom/bcm28155_ap/bcm28155_ap.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/board/broadcom/bcm28155_ap/bcm28155_ap.c b/board/broadcom/bcm28155_ap/bcm28155_ap.c index 940a1c2..20eb191 100644 --- a/board/broadcom/bcm28155_ap/bcm28155_ap.c +++ b/board/broadcom/bcm28155_ap/bcm28155_ap.c @@ -12,12 +12,20 @@ #include <asm/kona-common/clk.h> #include <asm/arch/sysmap.h> +#include <usb.h> +#include <usb/s3c_udc.h> +#include <g_dnl.h> + #define SECWATCHDOG_SDOGCR_OFFSET 0x00000000 #define SECWATCHDOG_SDOGCR_EN_SHIFT 27 #define SECWATCHDOG_SDOGCR_SRSTEN_SHIFT 26 #define SECWATCHDOG_SDOGCR_CLKS_SHIFT 20 #define SECWATCHDOG_SDOGCR_LD_SHIFT 0 +#ifndef CONFIG_USB_SERIALNO +#define CONFIG_USB_SERIALNO "1234567890" +#endif + DECLARE_GLOBAL_DATA_PTR; /* @@ -85,3 +93,35 @@ int board_mmc_init(bd_t *bis) return ret; } #endif + +#ifdef CONFIG_USB_GADGET +static struct s3c_plat_otg_data bcm_otg_data = { + .regs_otg = HSOTG_BASE_ADDR +}; + +int board_usb_init(int index, enum usb_init_type init) +{ + debug("%s: performing s3c_udc_probe\n", __func__); + return s3c_udc_probe(&bcm_otg_data); +} + +int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) +{ + debug("%s\n", __func__); + if (!getenv("serial#")) + g_dnl_set_serialnumber(CONFIG_USB_SERIALNO); + return 0; +} + +int g_dnl_get_board_bcd_device_number(int gcnum) +{ + debug("%s\n", __func__); + return 1; +} + +int board_usb_cleanup(int index, enum usb_init_type init) +{ + debug("%s\n", __func__); + return 0; +} +#endif |