diff options
author | Tom Rini <trini@konsulko.com> | 2015-07-24 20:39:56 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-07-24 20:39:56 (GMT) |
commit | 6f4e050639241218987541f4729172e4e0e2ff31 (patch) | |
tree | 0b7555fa699540dc975d179551211dd95c650a46 /board | |
parent | 5a9749ee12bed44ca4dc7f2412b5a340db666954 (diff) | |
parent | 58d6d139c3e7bb923029e7ba18bfec7f420ead0f (diff) | |
download | u-boot-6f4e050639241218987541f4729172e4e0e2ff31.tar.xz |
Merge git://git.denx.de/u-boot-usb
Diffstat (limited to 'board')
-rw-r--r-- | board/broadcom/bcm28155_ap/bcm28155_ap.c | 40 | ||||
-rw-r--r-- | board/samsung/common/Makefile | 2 | ||||
-rw-r--r-- | board/siemens/common/factoryset.c | 4 |
3 files changed, 43 insertions, 3 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 diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile index 93347ef..5fb01ce 100644 --- a/board/samsung/common/Makefile +++ b/board/samsung/common/Makefile @@ -6,7 +6,7 @@ # obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o -obj-$(CONFIG_USBDOWNLOAD_GADGET) += gadget.o +obj-$(CONFIG_USB_GADGET_DOWNLOAD) += gadget.o obj-$(CONFIG_MISC_COMMON) += misc.o ifndef CONFIG_SPL_BUILD diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index d81f548..6c869ed 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -144,7 +144,7 @@ int factoryset_read_eeprom(int i2c_addr) unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH]; unsigned char *cp, *cp1; -#if defined(CONFIG_DFU_FUNCTION) +#if defined(CONFIG_USB_FUNCTION_DFU) factory_dat.usb_vendor_id = CONFIG_G_DNL_VENDOR_NUM; factory_dat.usb_product_id = CONFIG_G_DNL_PRODUCT_NUM; #endif @@ -202,7 +202,7 @@ int factoryset_read_eeprom(int i2c_addr) cp1 += 3; } -#if defined(CONFIG_DFU_FUNCTION) +#if defined(CONFIG_USB_FUNCTION_DFU) /* read vid and pid for dfu mode */ if (0 <= get_factory_record_val(cp, size, (uchar *)"USBD1", (uchar *)"vid", buf, |