summaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorJagan Teki <jagan@openedev.com>2017-02-24 10:15:14 (GMT)
committerStefano Babic <sbabic@denx.de>2017-03-17 08:27:08 (GMT)
commit96aac843b68dfa900ede4eec224b2f7060812b45 (patch)
tree8d8c57ef2595b52a45a4518cc0dc9c2596e0f921 /arch/arm/include
parent20f147141698b9f302c3382fcc45a1ef1a341cec (diff)
downloadu-boot-fsl-qoriq-96aac843b68dfa900ede4eec224b2f7060812b45.tar.xz
imx: Use IMX6_BMODE_* macros instead of numericals
Use meaningful macros IMX6_BMODE_*, instead of numerical number in boot mode detection code. Cc: Tim Harvey <tharvey@gateworks.com> Acked-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/imx-common/sys_proto.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/arm/include/asm/imx-common/sys_proto.h b/arch/arm/include/asm/imx-common/sys_proto.h
index 631ccc5..177bd91 100644
--- a/arch/arm/include/asm/imx-common/sys_proto.h
+++ b/arch/arm/include/asm/imx-common/sys_proto.h
@@ -44,6 +44,41 @@
#ifdef CONFIG_MX6
#define IMX6_SRC_GPR10_BMODE BIT(28)
+#define IMX6_BMODE_MASK GENMASK(7, 0)
+#define IMX6_BMODE_SHIFT 4
+#define IMX6_BMODE_EMI_MASK BIT(3)
+#define IMX6_BMODE_EMI_SHIFT 3
+#define IMX6_BMODE_SERIAL_ROM_MASK GENMASK(26, 24)
+#define IMX6_BMODE_SERIAL_ROM_SHIFT 24
+
+enum imx6_bmode_serial_rom {
+ IMX6_BMODE_ECSPI1,
+ IMX6_BMODE_ECSPI2,
+ IMX6_BMODE_ECSPI3,
+ IMX6_BMODE_ECSPI4,
+ IMX6_BMODE_ECSPI5,
+ IMX6_BMODE_I2C1,
+ IMX6_BMODE_I2C2,
+ IMX6_BMODE_I2C3,
+};
+
+enum imx6_bmode_emi {
+ IMX6_BMODE_ONENAND,
+ IMX6_BMODE_NOR,
+};
+
+enum imx6_bmode {
+ IMX6_BMODE_EMI,
+ IMX6_BMODE_UART,
+ IMX6_BMODE_SATA,
+ IMX6_BMODE_SERIAL_ROM,
+ IMX6_BMODE_SD,
+ IMX6_BMODE_ESD,
+ IMX6_BMODE_MMC,
+ IMX6_BMODE_EMMC,
+ IMX6_BMODE_NAND,
+};
+
static inline u8 imx6_is_bmode_from_gpr9(void)
{
struct src *psrc = (struct src *)SRC_BASE_ADDR;