summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/imx35.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-10-01 22:35:54 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-15 19:44:36 +0200
commita029e32d7fd9dd323abfb0d11356a4468bcbce71 (patch)
treeeeaf88aea31d638a9324f460b4b7dee885122b22 /arch/arm/mach-imx/imx35.c
parentcff397271278257991705e5c4ecf15c47bd61208 (diff)
downloadbarebox-a029e32d7fd9dd323abfb0d11356a4468bcbce71.tar.gz
barebox-a029e32d7fd9dd323abfb0d11356a4468bcbce71.tar.xz
ARM i.MX: rework bootsource setting
This moves the known i.MX bootsource settings to a single file so that the code can be shared. Also we add a enum for the different boot sources so that it can be used in C Code and not only on the shell. The pcm038 board is changed to use it instead of digging in the registers manually. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/imx35.c')
-rw-r--r--arch/arm/mach-imx/imx35.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/imx35.c b/arch/arm/mach-imx/imx35.c
index bb93c37ce9..f89bd1085c 100644
--- a/arch/arm/mach-imx/imx35.c
+++ b/arch/arm/mach-imx/imx35.c
@@ -59,8 +59,14 @@ core_initcall(imx35_l2_fix);
static int imx35_init(void)
{
+ uint32_t val;
+
imx35_silicon_revision();
+ val = readl(MX35_CCM_BASE_ADDR + CCM_RCSR);
+ imx_25_35_boot_save_loc((val >> CCM_RCSR_MEM_CTRL_SHIFT) & 0x3,
+ (val >> CCM_RCSR_MEM_TYPE_SHIFT) & 0x3);
+
add_generic_device("imx_iim", 0, NULL, MX35_IIM_BASE_ADDR, SZ_4K,
IORESOURCE_MEM, NULL);