diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-13 20:49:09 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-04 09:05:44 -0500 |
commit | 1c865d58974cf3a45f87e65c3f348b5b9e398990 (patch) | |
tree | 6edfdff0e220bc732ced20a611edd2568f427d0e /arch/avr32 | |
parent | 035cbe99cd2fd4adf9d7fd95aeebb5f814e37eb9 (diff) | |
download | u-boot-imx-1c865d58974cf3a45f87e65c3f348b5b9e398990.zip u-boot-imx-1c865d58974cf3a45f87e65c3f348b5b9e398990.tar.gz u-boot-imx-1c865d58974cf3a45f87e65c3f348b5b9e398990.tar.bz2 |
avr32: Move stack_end to arch_global_data
Move this field into arch_global_data and tidy up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/cpu/exception.c | 6 | ||||
-rw-r--r-- | arch/avr32/include/asm/global_data.h | 2 | ||||
-rw-r--r-- | arch/avr32/lib/board.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/avr32/cpu/exception.c b/arch/avr32/cpu/exception.c index b21ef1f..828fc00 100644 --- a/arch/avr32/cpu/exception.c +++ b/arch/avr32/cpu/exception.c @@ -112,11 +112,11 @@ void do_unknown_exception(unsigned int ecr, struct pt_regs *regs) printf("CPU Mode: %s\n", cpu_modes[mode]); /* Avoid exception loops */ - if (regs->sp < (gd->stack_end - CONFIG_STACKSIZE) - || regs->sp >= gd->stack_end) + if (regs->sp < (gd->arch.stack_end - CONFIG_STACKSIZE) + || regs->sp >= gd->arch.stack_end) printf("\nStack pointer seems bogus, won't do stack dump\n"); else - dump_mem("\nStack: ", regs->sp, gd->stack_end); + dump_mem("\nStack: ", regs->sp, gd->arch.stack_end); panic("Unhandled exception\n"); } diff --git a/arch/avr32/include/asm/global_data.h b/arch/avr32/include/asm/global_data.h index 236a9da..3be8628 100644 --- a/arch/avr32/include/asm/global_data.h +++ b/arch/avr32/include/asm/global_data.h @@ -24,6 +24,7 @@ /* Architecture-specific global data */ struct arch_global_data { + unsigned long stack_end; /* highest stack address */ }; /* @@ -38,7 +39,6 @@ typedef struct global_data { bd_t *bd; unsigned long flags; unsigned int baudrate; - unsigned long stack_end; /* highest stack address */ unsigned long have_console; /* serial_init() was called */ #ifdef CONFIG_PRE_CONSOLE_BUFFER unsigned long precon_buf_idx; /* Pre-Console buffer index */ diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index e3287c4..d3c8cb7 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -231,7 +231,7 @@ void board_init_f(ulong board_type) /* And finally, a new, bigger stack. */ new_sp = (unsigned long *)addr; - gd->stack_end = addr; + gd->arch.stack_end = addr; *(--new_sp) = 0; *(--new_sp) = 0; |