summaryrefslogtreecommitdiff
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-03-16 11:32:43 +0000
committerStefano Babic <sbabic@denx.de>2012-03-27 09:41:16 +0200
commit494931a67465a95b66da346ec7bd002fdf40adee (patch)
treebb653e9aa41932ca9d93ce74d4197d5b6471befc /arch/arm/cpu
parentd9fb6a4c7e61d735eec2936a8dc3877f83e61d24 (diff)
downloadu-boot-imx-494931a67465a95b66da346ec7bd002fdf40adee.zip
u-boot-imx-494931a67465a95b66da346ec7bd002fdf40adee.tar.gz
u-boot-imx-494931a67465a95b66da346ec7bd002fdf40adee.tar.bz2
i.MX28: Drop __naked function from spl_mem_init
Instead of compiling the function and using the result as a constant, simply use the constant. NOTE: This patch works around bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52546 Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
index 43a90ff..911bbef 100644
--- a/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
@@ -173,22 +173,18 @@ void mx28_mem_setup_vddd(void)
&power_regs->hw_power_vdddctrl);
}
-void data_abort_memdetect_handler(void) __attribute__((naked));
-void data_abort_memdetect_handler(void)
-{
- asm volatile("subs pc, r14, #4");
-}
-
void mx28_mem_get_size(void)
{
struct mx28_digctl_regs *digctl_regs =
(struct mx28_digctl_regs *)MXS_DIGCTL_BASE;
uint32_t sz, da;
uint32_t *vt = (uint32_t *)0x20;
+ /* The following is "subs pc, r14, #4", used as return from DABT. */
+ const uint32_t data_abort_memdetect_handler = 0xe25ef004;
/* Replace the DABT handler. */
da = vt[4];
- vt[4] = (uint32_t)&data_abort_memdetect_handler;
+ vt[4] = data_abort_memdetect_handler;
sz = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
writel(sz, &digctl_regs->hw_digctl_scratch0);