From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 07/12] ARM: i.MX53: Detect booting from USB
Date: Wed, 14 Sep 2016 11:12:43 +0200 [thread overview]
Message-ID: <1473844368-13030-7-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1473844368-13030-1-git-send-email-s.hauer@pengutronix.de>
The USB download mode can be detected by reading the BMOD[0|1]
bits. Add support for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/boot.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index c72ec61..b66c29d 100644
--- a/arch/arm/mach-imx/boot.c
+++ b/arch/arm/mach-imx/boot.c
@@ -217,6 +217,12 @@ void imx53_get_boot_source(enum bootsource *src, int *instance)
void __iomem *src_base = IOMEM(MX53_SRC_BASE_ADDR);
uint32_t cfg1 = readl(src_base + IMX53_SRC_SBMR);
+ if (((cfg1 >> 24) & 0x3) == 0x3) {
+ *src = BOOTSOURCE_USB;
+ *instance = 0;
+ return;
+ }
+
switch ((cfg1 & 0xff) >> 4) {
case 2:
*src = BOOTSOURCE_HD;
--
2.8.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-09-14 9:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 9:12 [PATCH 01/12] ARM: i.MX53: Add uart5 clock support Sascha Hauer
2016-09-14 9:12 ` [PATCH 02/12] ARM: i.MX53 Vincell: Reset phy consistently from device tree Sascha Hauer
2016-09-14 9:12 ` [PATCH 03/12] ARM: i.MX53 Vincell: Adjust bbu handler partition size to real partition size Sascha Hauer
2016-09-14 9:12 ` [PATCH 04/12] ARM: i.MX53 Vincell: Add PBL console support Sascha Hauer
2016-09-14 9:24 ` Michael Grzeschik
2016-09-15 8:00 ` Sascha Hauer
2016-09-14 9:12 ` [PATCH 05/12] ARM: i.MX53: do not pass base address to imx*_boot_save_loc Sascha Hauer
2016-09-14 9:12 ` [PATCH 06/12] ARM: i.MX: Provide bootsource functions for early boot code Sascha Hauer
2016-09-14 9:12 ` Sascha Hauer [this message]
2016-09-14 9:12 ` [PATCH 08/12] mtd: imx-nand: Move v3 register definitions to include file Sascha Hauer
2016-09-14 9:12 ` [PATCH 09/12] ARM: i.MX53: Implement NAND xload Sascha Hauer
2016-09-14 9:12 ` [PATCH 10/12] ARM: i.MX53 Vincell: Add NAND xload support Sascha Hauer
2016-09-14 9:12 ` [PATCH 11/12] ARM: imx_v7_defconfig: Enable Vincell support Sascha Hauer
2016-09-14 9:12 ` [PATCH 12/12] ARM: vincell_defconfig: make smaller Sascha Hauer
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=1473844368-13030-7-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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