Skip to contentSkip to conversation

sunxi: Use "usb start" rather then "run usb_init" for preboot with usb-kbd

PATCH New Hans de Goede 2 participants 2 messages Nov 23, 2014 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: Use "usb start" rather then "run usb_init" for preboot with usb-kbd

In an effort to avoid usb getting scanned twice when using an usb keyboard, and booting from usb, I've set preboot to "run usb_init" in the CONFIG_USB_KEYBOARD patch.

This is wrong however, as it causes usb to not be scanned (and the keyboard to not be found) if an "env save" is done, since then the env contains usb_need_init=false.

This commit fixes this by changing the preboot value to "usb start", so that usb gets scanned for a keyboard unconditionally when usb-keyboard support is enabled.

---
 include/configs/sunxi-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/sunxi-common.h +1 -1
index fcaa249..3f890b2 100644
@@ -306,7 +306,7 @@
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONSOLE_STDIN_SETTINGS \
-	"preboot=run usb_init\0" \
+	"preboot=usb start\0" \
 	"stdin=serial,usbkbd\0"
 #else
 #define CONSOLE_STDIN_SETTINGS \
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 sunxi: Use "usb start" rather then "run usb_init" for preboot with usb-kbd

Quoted 8 lines · Hans de Goede

In an effort to avoid usb getting scanned twice when using an usb keyboard, and booting from usb, I've set preboot to "run usb_init" in the CONFIG_USB_KEYBOARD patch.

This is wrong however, as it causes usb to not be scanned (and the keyboard to not be found) if an "env save" is done, since then the env contains usb_need_init=false.

Quoted 5 lines

This commit fixes this by changing the preboot value to "usb start", so that usb gets scanned for a keyboard unconditionally when usb-keyboard support is enabled.

Quoted 17 lines
---
 include/configs/sunxi-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/sunxi-common.h +1 -1
index fcaa249..3f890b2 100644
@@ -306,7 +306,7 @@
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONSOLE_STDIN_SETTINGS \
-	"preboot=run usb_init\0" \
+	"preboot=usb start\0" \
 	"stdin=serial,usbkbd\0"
 #else
 #define CONSOLE_STDIN_SETTINGS \