diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-01-04 10:03:58 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-04 14:02:59 +0100 |
commit | ac10367f902c5f97755abf2ba76458670ce466fb (patch) | |
tree | db40622ed6f8fe1437e5fee0d9105b32372efa9b /arch/arm/boards/usb-a926x | |
parent | 98e09f58f7986b82c3e172aa907315dc64abc847 (diff) | |
download | barebox-ac10367f902c5f97755abf2ba76458670ce466fb.tar.gz barebox-ac10367f902c5f97755abf2ba76458670ce466fb.tar.xz |
calao/usb-926x: update usb gadget support
enable serial and dfu at the same time
senario if the usb device is plugged and the BP is not pressed at boot time
during 5s the usbserial will be enable
disable zlib support to fit in the 256K
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/usb-a926x')
-rw-r--r-- | arch/arm/boards/usb-a926x/env/bin/init_board | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/arch/arm/boards/usb-a926x/env/bin/init_board b/arch/arm/boards/usb-a926x/env/bin/init_board index 77e5c1a187..0a6baf722b 100644 --- a/arch/arm/boards/usb-a926x/env/bin/init_board +++ b/arch/arm/boards/usb-a926x/env/bin/init_board @@ -8,31 +8,37 @@ vendor_id=0x4321 dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" -gpio_get_value ${dfu_button} -if [ $? != 0 ] +if [ $at91_udc0.vbus != 1 ] then + echo "No USB Device cable plugged, normal boot" exit fi -if [ $at91_udc0.vbus != 1 ] +gpio_get_value ${dfu_button} +if [ $? != 0 ] then - echo "No USB Device cable plugged, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial exit fi echo "${button_name} pressed detected wait ${button_wait}s" timeout -s -a ${button_wait} -gpio_get_value ${dfu_button} -if [ $? != 0 ] +if [ $at91_udc0.vbus != 1 ] then - echo "${button_name} released, normal boot" + echo "No USB Device cable plugged, normal boot" exit fi -if [ $at91_udc0.vbus != 1 ] +gpio_get_value ${dfu_button} +if [ $? != 0 ] then - echo "No USB Device cable plugged, normal boot" + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial exit fi |