i.MX28: Drop __naked function from spl_mem_init
PATCH 1/1 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.
Signed-off-by Marek Vasut <[email protected]>
Cc Stefano Babic <[email protected]>
Cc Tom Rini <[email protected]>
--- arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-)
arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c +3 -7
@@ -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 ) -{ - asmvolatile ("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);
Signature · 1 line
1.7.9
PATCH 1/1 i.MX28: Drop __naked function from spl_mem_init
Quoted 2 lines · Marek Vasut
Instead of compiling the function and using the result as a constant, simply use the constant.
Include a link to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52546 so we know why we're doing this?
Signature · 1 line
Tom