]> git.sur5r.net Git - u-boot/blobdiff - board/broadcom/bcm28155_ap/bcm28155_ap.c
watchdog: Migrate OMAP_WATCHDOG to Kconfig
[u-boot] / board / broadcom / bcm28155_ap / bcm28155_ap.c
index 940a1c2c5066578571700243368ccbf604e090b7..f5b94f6430fe80f049aa8228a171a2bff9c6ca27 100644 (file)
 #include <asm/kona-common/clk.h>
 #include <asm/arch/sysmap.h>
 
+#include <usb.h>
+#include <usb/dwc2_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;
 
 /*
@@ -61,13 +69,15 @@ int dram_init(void)
 }
 
 /* This is called after dram_init() so use get_ram_size result */
-void dram_init_banksize(void)
+int dram_init_banksize(void)
 {
        gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
        gd->bd->bi_dram[0].size = gd->ram_size;
+
+       return 0;
 }
 
-#ifdef CONFIG_KONA_SDHCI
+#ifdef CONFIG_MMC_SDHCI_KONA
 /*
  * mmc_init - Initializes mmc
  */
@@ -85,3 +95,35 @@ int board_mmc_init(bd_t *bis)
        return ret;
 }
 #endif
+
+#ifdef CONFIG_USB_GADGET
+static struct dwc2_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 dwc2_udc_probe\n", __func__);
+       return dwc2_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