]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
efikamx: refine USB support
authorMatt Sealey <matt@genesi-usa.com>
Thu, 23 Aug 2012 04:52:33 +0000 (04:52 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 4 Sep 2012 10:06:44 +0000 (12:06 +0200)
Because of the way USB pad settings are handled it doesn't make sense to
be able to build the Efika MX board support without CONFIG_CMD_USB turned
on. So, we change the build to always compile in USB support.

We do not need to check for CONFIG_CMD_USB like we do with CONFIG_MXC_SPI
since the USB subsystem will error out of the compile for us.

Additionally, the following behaviors have changed;

* Smartbook "preboot" should not set input and output to USB keyboard as
  there is no display support
* board_eth_init is implemented such that it does not cause U-Boot to
  report an explicit failure ("CPU Net Initialization Failed").

Since Ethernet is implemented via USB (fixed on Smarttop, pluggable on
Smartbook, and handled by "usb start") - the warning that is left
("No ethernet found") is perfectly reasonable at the point it is printed
since the USB system hasn't been started and nothing has been probed yet.

Signed-off-by: Matt Sealey <matt@genesi-usa.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Marek Vasut <marex@denx.de>
board/genesi/mx51_efikamx/Makefile
board/genesi/mx51_efikamx/efikamx-usb.c
board/genesi/mx51_efikamx/efikamx.c

index bd2174fec32c0d8166890f68a54cdfe33c987c3b..f95356f16d25382c192313b7967a9df14f63727f 100644 (file)
@@ -27,11 +27,7 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(BOARD).o
 
-COBJS  := efikamx.o
-
-ifdef  CONFIG_CMD_USB
-COBJS  += efikamx-usb.o
-endif
+COBJS  := efikamx.o efikamx-usb.o
 
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index e9273d027a05b328dccf0a7eeb7a25257a15a116..cf020c35cb6341ee7dea68b4d65a3c8f37df6f4c 100644 (file)
@@ -214,3 +214,15 @@ void board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
        if (port)
                mdelay(10);
 }
+
+/*
+ * Ethernet on the Smarttop is on the USB bus. Rather than give an error about
+ * "CPU Net Initialization Failed", just pass this test since no other settings
+ * are required. Smartbook doesn't have built-in Ethernet but we will let it
+ * pass anyway considering someone may have plugged in a USB stick and all
+ * they need to do is run "usb start".
+ */
+int board_eth_init(bd_t *bis)
+{
+       return 0;
+}
index 6d98c94db9144e772b2fa8fe6212bd52b80a79d9..cfd2e938b94c46e841e3ce4413f6c2e8ff16575f 100644 (file)
@@ -492,9 +492,6 @@ int board_late_init(void)
                                        ARRAY_SIZE(efikamx_pata_pads));
        setup_iomux_usb();
 
-       if (machine_is_efikasb())
-               setenv("preboot", "usb reset ; setenv stdin usbkbd\0");
-
        return 0;
 }