Explorar o código

zipitz2: enable USB host support

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Vasily Khoruzhick %!s(int64=9) %!d(string=hai) anos
pai
achega
afed7ebe85
Modificáronse 2 ficheiros con 22 adicións e 0 borrados
  1. 21 0
      board/zipitz2/zipitz2.c
  2. 1 0
      include/configs/zipitz2.h

+ 21 - 0
board/zipitz2/zipitz2.c

@@ -15,6 +15,7 @@
 #include <asm/arch/regs-mmc.h>
 #include <asm/arch/regs-mmc.h>
 #include <spi.h>
 #include <spi.h>
 #include <asm/io.h>
 #include <asm/io.h>
+#include <usb.h>
 
 
 DECLARE_GLOBAL_DATA_PTR;
 DECLARE_GLOBAL_DATA_PTR;
 
 
@@ -52,6 +53,26 @@ int dram_init(void)
 	return 0;
 	return 0;
 }
 }
 
 
+#ifdef	CONFIG_CMD_USB
+int board_usb_init(int index, enum usb_init_type init)
+{
+	/* enable port 2 */
+	writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS |
+		UP2OCR_DMPDE | UP2OCR_DPPDE, UP2OCR);
+
+	return 0;
+}
+
+int board_usb_cleanup(int index, enum usb_init_type init)
+{
+	return 0;
+}
+
+void usb_board_stop(void)
+{
+}
+#endif
+
 void dram_init_banksize(void)
 void dram_init_banksize(void)
 {
 {
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
 	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;

+ 1 - 0
include/configs/zipitz2.h

@@ -64,6 +64,7 @@
 #define	CONFIG_CMD_ENV
 #define	CONFIG_CMD_ENV
 #define	CONFIG_CMD_MMC
 #define	CONFIG_CMD_MMC
 #define	CONFIG_CMD_SPI
 #define	CONFIG_CMD_SPI
+#define	CONFIG_CMD_USB
 
 
 /*
 /*
  * MMC Card Configuration
  * MMC Card Configuration