summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-09-19 08:48:47 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-09-24 08:54:04 +0200
commitbf77e17a1c3ba4b920dab281da00abffd67bac57 (patch)
tree2c701b403fb861899dff21cf31651021b7da02f6 /arch
parentf9fa41641acd5a1659e968f6a8884e74d91edc56 (diff)
downloadbarebox-bf77e17a1c3ba4b920dab281da00abffd67bac57.tar.gz
barebox-bf77e17a1c3ba4b920dab281da00abffd67bac57.tar.xz
ARM: i.MX: boot: Detect boot instance on i.MX51
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/boot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/boot.c b/arch/arm/mach-imx/boot.c
index 830ea08f30..0c51767c42 100644
--- a/arch/arm/mach-imx/boot.c
+++ b/arch/arm/mach-imx/boot.c
@@ -170,6 +170,7 @@ void imx27_boot_save_loc(void)
#define IMX51_SRC_SBMR 0x4
#define IMX51_SBMR_BT_MEM_TYPE GENMASK(8, 7)
#define IMX51_SBMR_BT_MEM_CTL GENMASK(1, 0)
+#define IMX51_SBMR_BT_SRC GENMASK(20, 19)
#define IMX51_SBMR_BMOD GENMASK(15, 14)
void imx51_get_boot_source(enum bootsource *src, int *instance)
@@ -188,6 +189,7 @@ void imx51_get_boot_source(enum bootsource *src, int *instance)
type = FIELD_GET(IMX51_SBMR_BT_MEM_TYPE, reg);
*src = locations[ctrl][type];
+ *instance = FIELD_GET(IMX51_SBMR_BT_SRC, reg);
break;
case 1:
/* reserved */