summaryrefslogtreecommitdiff
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-04-30 07:14:05 -0400
committerTom Rini <trini@konsulko.com>2018-04-30 07:14:05 -0400
commitb25f8e2112b1582ce6386e846800a31bab688e50 (patch)
tree7fe8146a99851ce9256b8de3de2c86f1b276b92b /arch/arm/cpu
parentabeb9d7897510533ce3a0a9515cac16db5bed834 (diff)
parent07a8f79ee850b1e59371519f179d32fea171bbec (diff)
Merge git://git.denx.de/u-boot-imx
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/Makefile4
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/mxs.c8
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg5
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg6
-rw-r--r--arch/arm/cpu/arm926ejs/mxs/spl_boot.c5
-rw-r--r--arch/arm/cpu/arm926ejs/start.S4
-rw-r--r--arch/arm/cpu/u-boot-spl.lds1
7 files changed, 22 insertions, 11 deletions
diff --git a/arch/arm/cpu/arm926ejs/mxs/Makefile b/arch/arm/cpu/arm926ejs/mxs/Makefile
index 71c2c0e7b4..83b05acfa4 100644
--- a/arch/arm/cpu/arm926ejs/mxs/Makefile
+++ b/arch/arm/cpu/arm926ejs/mxs/Makefile
@@ -14,8 +14,8 @@ obj-y += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o
endif
# Specify the target for use in elftosb call
-MKIMAGE_TARGET-$(CONFIG_MX23) = mxsimage.mx23.cfg
-MKIMAGE_TARGET-$(CONFIG_MX28) = mxsimage.mx28.cfg
+MKIMAGE_TARGET-$(CONFIG_MX23) = mxsimage$(CONFIG_SPL_FRAMEWORK:%=-spl).mx23.cfg
+MKIMAGE_TARGET-$(CONFIG_MX28) = mxsimage$(CONFIG_SPL_FRAMEWORK:%=-spl).mx28.cfg
# Generate HAB-capable IVT
#
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c
index 7a68a8f3ca..09b5c04cc9 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c
@@ -24,7 +24,7 @@
DECLARE_GLOBAL_DATA_PTR;
/* Lowlevel init isn't used on i.MX28, so just have a dummy here */
-void lowlevel_init(void) {}
+__weak void lowlevel_init(void) {}
void reset_cpu(ulong ignored) __attribute__((noreturn));
@@ -178,8 +178,7 @@ const char *get_imx_type(u32 imxtype)
int print_cpuinfo(void)
{
u32 cpurev;
- struct mxs_spl_data *data = (struct mxs_spl_data *)
- ((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data)) & ~0xf);
+ struct mxs_spl_data *data = MXS_SPL_DATA;
cpurev = get_cpu_rev();
printf("CPU: Freescale i.MX%s rev%d.%d at %d MHz\n",
@@ -277,8 +276,7 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
int mxs_dram_init(void)
{
- struct mxs_spl_data *data = (struct mxs_spl_data *)
- ((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data)) & ~0xf);
+ struct mxs_spl_data *data = MXS_SPL_DATA;
if (data->mem_dram_size == 0) {
printf("MXS:\n"
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg
new file mode 100644
index 0000000000..ab2183ed37
--- /dev/null
+++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx23.cfg
@@ -0,0 +1,5 @@
+DISPLAYPROGRESS
+SECTION 0x0 BOOTABLE
+ TAG LAST
+ LOAD 0x1000 spl/u-boot-spl.bin
+ CALL 0x1000 0x0
diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg
new file mode 100644
index 0000000000..0d95064ff7
--- /dev/null
+++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage-spl.mx28.cfg
@@ -0,0 +1,6 @@
+DISPLAYPROGRESS
+SECTION 0x0 BOOTABLE
+ TAG LAST
+ LOAD 0x1000 spl/u-boot-spl.bin
+ LOAD IVT 0x8000 0x1000
+ CALL HAB 0x8000 0x0
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index d9d1d73d1a..bc39465fc4 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -120,8 +120,7 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
const iomux_cfg_t *iomux_setup,
const unsigned int iomux_size)
{
- struct mxs_spl_data *data = (struct mxs_spl_data *)
- ((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data)) & ~0xf);
+ struct mxs_spl_data *data = MXS_SPL_DATA;
uint8_t bootmode = mxs_get_bootmode_index();
gd = &gdata;
@@ -147,6 +146,7 @@ void mxs_common_spl_init(const uint32_t arg, const uint32_t *resptr,
}
}
+#ifndef CONFIG_SPL_FRAMEWORK
/* Support aparatus */
inline void board_init_f(unsigned long bootflag)
{
@@ -159,3 +159,4 @@ inline void board_init_r(gd_t *id, ulong dest_addr)
for (;;)
;
}
+#endif
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 959d1ed86d..a6f0bdb703 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -105,9 +105,9 @@ flush_dcache:
/*
* Go setup Memory and board specific bits prior to relocation.
*/
- mov ip, lr /* perserve link reg across call */
+ mov r4, lr /* perserve link reg across call */
bl lowlevel_init /* go setup pll,mux,memory */
- mov lr, ip /* restore link */
+ mov lr, r4 /* restore link */
#endif
mov pc, lr /* back to my caller */
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
diff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds
index 65f7b68861..38fc9b44c8 100644
--- a/arch/arm/cpu/u-boot-spl.lds
+++ b/arch/arm/cpu/u-boot-spl.lds
@@ -21,6 +21,7 @@ SECTIONS
*(.vectors)
CPUDIR/start.o (.text*)
*(.text*)
+ *(.glue*)
}
. = ALIGN(4);