[U-Boot] [PATCH v5 8/8] add software usbboot

Xiangfu Liu xiangfu at openmobilefree.net
Sun Jan 9 17:18:45 CET 2011


Signed-off-by: Xiangfu Liu <xiangfu at openmobilefree.net>
Acked-by: Daniel <zpxu at ingenic.cn>
Acked-by: ChangWei Jia <cwjia at ingenic.cn>
---
 drivers/mtd/nand/jz4740_nand.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
index 32b41ef..b15c4ea 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/jz4740_nand.c
@@ -285,6 +285,18 @@ extern int serial_init(void);
 	pll_init();
 	serial_init();
 	sdram_init();
+
+#if defined(CONFIG_NANONOTE)
+#define KEY_U_OUT       (32 * 2 + 16)
+#define KEY_U_IN        (32 * 3 + 19)
+	__gpio_as_input(KEY_U_IN);
+	__gpio_enable_pull(KEY_U_IN);
+	__gpio_as_output(KEY_U_OUT);
+	__gpio_clear_pin(KEY_U_OUT);
+
+	if (__gpio_get_pin(KEY_U_IN) == 0)
+		usb_boot();
+#endif
 #endif
 	uint32_t reg;
 
-- 
1.7.0.4



More information about the U-Boot mailing list