aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/treeboot-iss4xx.c
diff options
context:
space:
mode:
authorTorez Smith <lnxtorez@linux.vnet.ibm.com>2010-03-05 05:45:54 -0500
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2010-05-05 11:11:56 -0400
commitb4e8c8dd8456c1d3685fb5b715c9795d250f500e (patch)
tree4042cebcab41b58e12a013022a4b595bcd4c9377 /arch/powerpc/boot/treeboot-iss4xx.c
parent221c185d4e11b4061409da5d592779ced484614c (diff)
powerpc/4xx: Simple platform for the ISS 4xx simulator
This is a trivial 4xx plaform that uses the new simple bsp from Josh and is handy to use in simulators such as ISS or even Mambo who don't properly implement most of the actual devices in the SoC but really only the core. Signed-off-by: Torez Smith <lnxtorez@linux.vnet.ibm.com> Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/boot/treeboot-iss4xx.c')
-rw-r--r--arch/powerpc/boot/treeboot-iss4xx.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/arch/powerpc/boot/treeboot-iss4xx.c b/arch/powerpc/boot/treeboot-iss4xx.c
new file mode 100644
index 000000000000..fcc44952874e
--- /dev/null
+++ b/arch/powerpc/boot/treeboot-iss4xx.c
@@ -0,0 +1,56 @@
1/*
2 * Copyright 2010 Ben. Herrenschmidt, IBM Corporation.
3 *
4 * Based on earlier code:
5 * Copyright (C) Paul Mackerras 1997.
6 *
7 * Matt Porter <mporter@kernel.crashing.org>
8 * Copyright 2002-2005 MontaVista Software Inc.
9 *
10 * Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
11 * Copyright (c) 2003, 2004 Zultys Technologies
12 *
13 * Copyright 2007 David Gibson, IBM Corporation.
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version
18 * 2 of the License, or (at your option) any later version.
19 */
20#include <stdarg.h>
21#include <stddef.h>
22#include "types.h"
23#include "elf.h"
24#include "string.h"
25#include "stdio.h"
26#include "page.h"
27#include "ops.h"
28#include "reg.h"
29#include "io.h"
30#include "dcr.h"
31#include "4xx.h"
32#include "44x.h"
33#include "libfdt.h"
34
35BSS_STACK(4096);
36
37static void iss_4xx_fixups(void)
38{
39 ibm4xx_sdram_fixup_memsize();
40}
41
42#define SPRN_PIR 0x11E /* Processor Indentification Register */
43void platform_init(void)
44{
45 unsigned long end_of_ram = 0x08000000;
46 unsigned long avail_ram = end_of_ram - (unsigned long)_end;
47 u32 pir_reg;
48
49 simple_alloc_init(_end, avail_ram, 128, 64);
50 platform_ops.fixups = iss_4xx_fixups;
51 platform_ops.exit = ibm44x_dbcr_reset;
52 pir_reg = mfspr(SPRN_PIR);
53 fdt_set_boot_cpuid_phys(_dtb_start, pir_reg);
54 fdt_init(_dtb_start);
55 serial_console_init();
56}