diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-06-24 14:25:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-07-02 08:20:48 +0200 |
commit | 1d7c8ec1431aec1c75c79dc17ecad0ab80435311 (patch) | |
tree | f5a1363e1227fcfcfe014194e04414e639147616 /arch/arm/mach-omap/xload.c | |
parent | 302076b017f386a1cc51fcd405cdd6edcae9cd86 (diff) | |
download | barebox-1d7c8ec1431aec1c75c79dc17ecad0ab80435311.tar.gz barebox-1d7c8ec1431aec1c75c79dc17ecad0ab80435311.tar.xz |
ARM: OMAP: Add omap3 USB loader tool
The OMAP3 supports uploading the first stage bootloader via USB.
The ROM leaves the MUSB controller enabled and it can then be used
to upload a 2nd stage image. This patch adds the omap3-usb-loader tool
and the necessary barebox support to upload the 2nd stage image.
The omap usb loader tool is downloaded from https://github.com/grant-h/omap_loader
and changed to also accept CHSETTINGS images.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap/xload.c')
-rw-r--r-- | arch/arm/mach-omap/xload.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c index 85c9120ccf..4a0714ed93 100644 --- a/arch/arm/mach-omap/xload.c +++ b/arch/arm/mach-omap/xload.c @@ -14,6 +14,7 @@ #include <xymodem.h> #include <mach/generic.h> #include <mach/am33xx-generic.h> +#include <mach/omap3-generic.h> #include <net.h> #include <environment.h> #include <dhcp.h> @@ -284,13 +285,16 @@ static __noreturn int omap_xload(void) func = omap_xload_boot_mmc(); break; case BOOTSOURCE_USB: - if (IS_ENABLED(CONFIG_FS_OMAP4_USBBOOT)) { + if (IS_ENABLED(CONFIG_OMAP3_USBBOOT) && cpu_is_omap3()) { + printf("booting from USB\n"); + func = omap3_xload_boot_usb(); + } else if (IS_ENABLED(CONFIG_FS_OMAP4_USBBOOT)) { printf("booting from USB\n"); func = omap4_xload_boot_usb(); - break; } else { printf("booting from USB not enabled\n"); } + break; case BOOTSOURCE_NAND: printf("booting from NAND\n"); func = omap_xload_boot_nand(barebox_part->nand_offset, |