From patchwork Mon Dec 31 16:32:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,1/5] spl: support for booting via usbeth Date: Mon, 31 Dec 2012 06:32:39 -0000 From: Ilya Yanok X-Patchwork-Id: 208883 Message-Id: <1356971563-23478-2-git-send-email-ilya.yanok@cogentembedded.com> To: u-boot@lists.denx.de, Tom Rini Cc: Ilya Yanok In case of usbeth booting just call net_load_image("usb_ether"). This patch also adds CONFIG_SPL_USBETH_SUPPORT and CONFIG_SPL_MUSB_NEW_SUPPORT config options to enable linking of SPL against USB gagdet support and new MUSB driver resp. Signed-off-by: Ilya Yanok --- common/spl/spl.c | 5 +++++ spl/Makefile | 2 ++ 2 files changed, 7 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index ff9ba7b..6a5a136 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -221,6 +221,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2) #endif break; #endif +#ifdef CONFIG_SPL_USBETH_SUPPORT + case BOOT_DEVICE_USBETH: + spl_net_load_image("usb_ether"); + break; +#endif default: debug("SPL: Un-supported Boot Device\n"); hang(); diff --git a/spl/Makefile b/spl/Makefile index 6dbb105..3333cde 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -81,6 +81,8 @@ LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/memory.o LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/libnet.o LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/libnet.o LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/libphy.o +LIBS-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += drivers/usb/musb-new/libusb_musb-new.o +LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/usb/gadget/libusb_gadget.o ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS-y += $(CPUDIR)/omap-common/libomap-common.o