From: Vicente <vicencb@gmail.com>
To: barebox@lists.infradead.org
Cc: Vicente <vicencb@gmail.com>
Subject: [PATCH 12/13] omap4: add support for loading second stage from usb
Date: Mon, 8 Oct 2012 00:01:26 +0200 [thread overview]
Message-ID: <1349647287-28224-13-git-send-email-vicencb@gmail.com> (raw)
In-Reply-To: <1349647287-28224-1-git-send-email-vicencb@gmail.com>
Signed-off-by: Vicente <vicencb@gmail.com>
---
arch/arm/mach-omap/xload.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index 9fa8221..240d3ff 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -139,6 +139,24 @@ static void *omap_xload_boot_spi(int offset)
return to;
}
+static void *omap4_xload_boot_usb(void){
+ int ret;
+ void *buf;
+ int len;
+
+ ret = mount("omap4_usbboot", "omap4_usbbootfs", "/");
+ if (ret) {
+ printf("Unable to mount omap4_usbbootfs (%d)\n", ret);
+ return NULL;
+ }
+
+ buf = read_file("/barebox.bin", &len);
+ if (!buf)
+ printf("could not read barebox.bin from omap4_usbbootfs\n");
+
+ return buf;
+}
+
enum omap_boot_src omap_bootsrc(void)
{
#if defined(CONFIG_ARCH_OMAP3)
@@ -161,6 +179,14 @@ int run_shell(void)
printf("booting from MMC1\n");
func = omap_xload_boot_mmc();
break;
+ case OMAP_BOOTSRC_USB1:
+ if (IS_ENABLED(CONFIG_FS_OMAP4_USBBOOT)) {
+ printf("booting from USB1\n");
+ func = omap4_xload_boot_usb();
+ break;
+ } else {
+ printf("booting from usb1 not enabled\n");
+ }
case OMAP_BOOTSRC_UNKNOWN:
printf("unknown boot source. Fall back to nand\n");
case OMAP_BOOTSRC_NAND:
--
1.7.12.2
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-10-07 22:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-07 22:01 [PATCH 00/13] archosg9: add support for tablet, fourth round Vicente
2012-10-07 22:01 ` [PATCH 01/13] twl6030: add debug info Vicente
2012-10-07 22:01 ` [PATCH 02/13] omap4: add rename definitions to match datasheet Vicente
2012-10-07 22:01 ` [PATCH 03/13] ARM: ensure irqs are disabled Vicente
2012-10-08 20:21 ` Sascha Hauer
2012-10-07 22:01 ` [PATCH 04/13] omap: revert gpiolib Vicente
2012-10-07 22:01 ` [PATCH 05/13] omap4: add usb boot source Vicente
2012-10-07 22:01 ` [PATCH 06/13] bootm: close open files Vicente
2012-10-08 20:18 ` Sascha Hauer
2012-10-08 21:02 ` vj
2012-10-07 22:01 ` [PATCH 07/13] uimage: improve transfer speed Vicente
2012-10-08 20:01 ` Sascha Hauer
2012-10-08 20:48 ` vj
2012-10-07 22:01 ` [PATCH 08/13] fs: improve robustness Vicente
2012-10-07 22:01 ` [PATCH 09/13] omap4: add support for booting cpu from usb Vicente
2012-10-07 22:01 ` [PATCH 10/13] omap4: add serial communications over usb boot Vicente
2012-10-07 22:01 ` [PATCH 11/13] omap4: add filesystem support " Vicente
2012-10-07 22:01 ` Vicente [this message]
2012-10-07 22:01 ` [PATCH 13/13] Add support for Archos G9 tablet Vicente
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349647287-28224-13-git-send-email-vicencb@gmail.com \
--to=vicencb@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox