diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-03-07 09:25:56 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-03-07 09:25:56 +0100 |
commit | 7dd3401d034079dd04b41c36299e617290d0bcd6 (patch) | |
tree | 9cdca646504029e1ec49f578bacdfe69041b8bcd /arch/ppc/mach-mpc85xx | |
parent | 74213ed9a70f26a141ca3797e34c64f88a5cf090 (diff) | |
parent | 6a9481b28e460d2f5ebfecf8b368145e6803b67e (diff) | |
download | barebox-7dd3401d034079dd04b41c36299e617290d0bcd6.tar.gz barebox-7dd3401d034079dd04b41c36299e617290d0bcd6.tar.xz |
Merge branch 'for-next/ppc'
Diffstat (limited to 'arch/ppc/mach-mpc85xx')
-rw-r--r-- | arch/ppc/mach-mpc85xx/Kconfig | 3 | ||||
-rw-r--r-- | arch/ppc/mach-mpc85xx/barebox.lds.S | 8 | ||||
-rw-r--r-- | arch/ppc/mach-mpc85xx/cpu.c | 11 | ||||
-rw-r--r-- | arch/ppc/mach-mpc85xx/include/mach/mmu.h | 5 |
4 files changed, 24 insertions, 3 deletions
diff --git a/arch/ppc/mach-mpc85xx/Kconfig b/arch/ppc/mach-mpc85xx/Kconfig index dc2d2b7b7e..74bad76667 100644 --- a/arch/ppc/mach-mpc85xx/Kconfig +++ b/arch/ppc/mach-mpc85xx/Kconfig @@ -1,5 +1,8 @@ if ARCH_MPC85XX +config MMU + default y if CMD_MEMTEST + config TEXT_BASE hex default 0xeff80000 if P2020RDB diff --git a/arch/ppc/mach-mpc85xx/barebox.lds.S b/arch/ppc/mach-mpc85xx/barebox.lds.S index 980359e3a1..87ab7acfe2 100644 --- a/arch/ppc/mach-mpc85xx/barebox.lds.S +++ b/arch/ppc/mach-mpc85xx/barebox.lds.S @@ -32,6 +32,8 @@ PHDRS SECTIONS { . = TEXT_BASE; + _stext = .; + PROVIDE (stext = .); .interp : { *(.interp) } .hash : { *(.hash) } @@ -96,8 +98,6 @@ SECTIONS *(.dynamic*) CONSTRUCTORS } - _edata = .; - PROVIDE (edata = .); . = .; __barebox_cmd_start = .; @@ -118,6 +118,9 @@ SECTIONS __ex_table : { *(__ex_table) } __stop___ex_table = .; + _edata = .; + PROVIDE (edata = .); + . = ALIGN(256); __init_begin = .; .text.init : { *(.text.init) } @@ -130,7 +133,6 @@ SECTIONS .bootpg RESET_VECTOR_ADDRESS - 0xffc : { _text = .; - _stext = .; arch/ppc/cpu-85xx/start.o (.bootpg) } :text = 0xffff diff --git a/arch/ppc/mach-mpc85xx/cpu.c b/arch/ppc/mach-mpc85xx/cpu.c index e5c01fc8f6..7c183c1b5e 100644 --- a/arch/ppc/mach-mpc85xx/cpu.c +++ b/arch/ppc/mach-mpc85xx/cpu.c @@ -24,7 +24,10 @@ #include <config.h> #include <common.h> +#include <memory.h> +#include <init.h> #include <asm/fsl_ddr_sdram.h> +#include <asm-generic/memory_layout.h> #include <mach/mmu.h> #include <mach/immap_85xx.h> @@ -81,3 +84,11 @@ phys_size_t fsl_get_effective_memsize(void) return sdram_size; } + +static int fsl_reserve_region(void) +{ + request_sdram_region("stack", _text_base - STACK_SIZE, + STACK_SIZE); + return 0; +} +coredevice_initcall(fsl_reserve_region); diff --git a/arch/ppc/mach-mpc85xx/include/mach/mmu.h b/arch/ppc/mach-mpc85xx/include/mach/mmu.h index 00459e2d29..e2ecc62ef0 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/mmu.h +++ b/arch/ppc/mach-mpc85xx/include/mach/mmu.h @@ -13,6 +13,11 @@ #include <asm/mmu.h> #ifndef __ASSEMBLY__ +extern int e500_find_free_tlbcam(void); +extern void e500_read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, + unsigned long *epn, phys_addr_t *rpn); +extern void e500_read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, + unsigned long *epn, phys_addr_t *rpn); extern void e500_set_tlb(u8 tlb, u32 epn, u64 rpn, u8 perms, u8 wimge, u8 ts, u8 esel, u8 tsize, u8 iprot); extern void e500_disable_tlb(u8 esel); |