summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-07-24 16:39:56 -0400
committerTom Rini <trini@konsulko.com>2015-07-24 16:39:56 -0400
commit6f4e050639241218987541f4729172e4e0e2ff31 (patch)
tree0b7555fa699540dc975d179551211dd95c650a46 /board
parent5a9749ee12bed44ca4dc7f2412b5a340db666954 (diff)
parent58d6d139c3e7bb923029e7ba18bfec7f420ead0f (diff)
downloadtalos-obmc-uboot-6f4e050639241218987541f4729172e4e0e2ff31.tar.gz
talos-obmc-uboot-6f4e050639241218987541f4729172e4e0e2ff31.zip
Merge git://git.denx.de/u-boot-usb
Diffstat (limited to 'board')
-rw-r--r--board/broadcom/bcm28155_ap/bcm28155_ap.c40
-rw-r--r--board/samsung/common/Makefile2
-rw-r--r--board/siemens/common/factoryset.c4
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 940a1c2c50..20eb19142a 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 93347ef000..5fb01ce783 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 d81f5481a7..6c869ed2b0 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,
OpenPOWER on IntegriCloud