9
0
Fork 0

ARM: i.MX53: Detect booting from USB

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>
This commit is contained in:
Sascha Hauer 2016-07-01 14:06:42 +02:00
parent 0b47f95340
commit ff986b16ad
1 changed files with 6 additions and 0 deletions

View File

@ -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;