summaryrefslogtreecommitdiff
path: root/board/delta
diff options
context:
space:
mode:
authorMarkus Klotzbuecher <mk@denx.de>2006-05-22 16:33:54 +0200
committerMarkus Klotzbuecher <mk@pollux.denx.de>2006-05-22 16:33:54 +0200
commit3e326ece9eba8184f5d48aa4fb87760a8f6f0f10 (patch)
tree5ffbaa50f1627682082592c148faa34d59e29e0c /board/delta
parent5770a1e488621a9e7e344afed7c921ff4e715a63 (diff)
downloadu-boot-imx-3e326ece9eba8184f5d48aa4fb87760a8f6f0f10.zip
u-boot-imx-3e326ece9eba8184f5d48aa4fb87760a8f6f0f10.tar.gz
u-boot-imx-3e326ece9eba8184f5d48aa4fb87760a8f6f0f10.tar.bz2
This patch adds USB storage support for the delta board. This is the first
board to make use of a generic OHCI driver, that calls hooks for board dependant initialization.
Diffstat (limited to 'board/delta')
-rw-r--r--board/delta/delta.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/board/delta/delta.c b/board/delta/delta.c
index b127ac8..d9fe8cb 100644
--- a/board/delta/delta.c
+++ b/board/delta/delta.c
@@ -99,6 +99,52 @@ int board_late_init(void)
}
+/* board dependant usb stuff */
+int usb_board_init()
+{
+ /*
+ * Enable USB host clock.
+ */
+ CKENA |= (CKENA_2_USBHOST | CKENA_20_UDC);
+ udelay(100);
+
+ /* Configure Port 2 for Host (USB Client Registers) */
+ UP2OCR = 0x3000c;
+
+#if 0
+ GPIO2_2 = 0x801; /* USBHPEN - Alt. Fkt. 1 */
+ GPIO3_2 = 0x801; /* USBHPWR - Alt. Fkt. 1 */
+#endif
+
+ UHCHR |= UHCHR_FHR;
+ wait_ms(11); /* udelay(11); */
+ UHCHR &= ~UHCHR_FHR;
+
+ UHCHR |= UHCHR_FSBIR;
+ while (UHCHR & UHCHR_FSBIR)
+ udelay(1);
+
+#if 0
+ UHCHR |= UHCHR_PCPL; /* USBHPEN is active low */
+ UHCHR |= UHCHR_PSPL; /* USBHPWR is active low */
+#endif
+
+ UHCHR &= ~UHCHR_SSEP0;
+ UHCHR &= ~UHCHR_SSEP1;
+ UHCHR &= ~UHCHR_SSE;
+
+ return 0;
+}
+
+int usb_board_stop()
+{
+ /* may not want to do this */
+ /* CKENA &= ~(CKENA_2_USBHOST | CKENA_20_UDC); */
+
+ return 0;
+}
+
+
/*
* Magic Key Handling, mainly copied from board/lwmon/lwmon.c
*/
@@ -324,6 +370,12 @@ static void init_DA9030()
return;
}
+ val = 0x80;
+ if(i2c_write(addr, IRQ_MASK_B, 1, &val, 1)) {
+ printf("Error accessing DA9030 via i2c.\n");
+ return;
+ }
+
i2c_reg_write(addr, REG_CONTROL_1_97, 0xfd); /* disable LDO1, enable LDO6 */
i2c_reg_write(addr, LDO2_3, 0xd1); /* LDO2 =1,9V, LDO3=3,1V */
i2c_reg_write(addr, LDO4_5, 0xcc); /* LDO2 =1,9V, LDO3=3,1V */