aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh64
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-10-01 04:31:27 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-10-01 04:31:27 -0400
commit6b3d7f02a180af0d711d259adb4eccde1c3f10cd (patch)
treefbbc62dc9aefe16de04f61f48d455ebba8ae9ea8 /arch/sh64
parent7786962beed5161717a299933dd08240e20b6e26 (diff)
sh64: mach-sim: Build fixes.
Follow the mach-harp changes to get the simulator support building. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh64')
-rw-r--r--arch/sh64/mach-sim/Makefile13
-rw-r--r--arch/sh64/mach-sim/setup.c53
2 files changed, 8 insertions, 58 deletions
diff --git a/arch/sh64/mach-sim/Makefile b/arch/sh64/mach-sim/Makefile
index 819c4078fdc..2f2963fa213 100644
--- a/arch/sh64/mach-sim/Makefile
+++ b/arch/sh64/mach-sim/Makefile
@@ -1,14 +1 @@
1#
2# Makefile for the SH-5 Simulator specific parts of the kernel
3#
4# Note! Dependencies are done automagically by 'make dep', which also
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7#
8
9O_TARGET := sim.o
10
11obj-y := setup.o obj-y := setup.o
12
13include $(TOPDIR)/Rules.make
14
diff --git a/arch/sh64/mach-sim/setup.c b/arch/sh64/mach-sim/setup.c
index f09400c1ad1..e3386ec1ce1 100644
--- a/arch/sh64/mach-sim/setup.c
+++ b/arch/sh64/mach-sim/setup.c
@@ -14,46 +14,10 @@
14 * lethal@linux-sh.org: 15th May 2003 14 * lethal@linux-sh.org: 15th May 2003
15 * Use the generic procfs cpuinfo interface, just return a valid board name. 15 * Use the generic procfs cpuinfo interface, just return a valid board name.
16 */ 16 */
17
18#include <linux/stddef.h>
19#include <linux/init.h> 17#include <linux/init.h>
20#include <linux/mm.h>
21#include <linux/bootmem.h>
22#include <linux/delay.h>
23#include <linux/kernel.h> 18#include <linux/kernel.h>
24#include <asm/addrspace.h>
25#include <asm/processor.h>
26#include <asm/platform.h> 19#include <asm/platform.h>
27#include <asm/io.h>
28#include <asm/irq.h> 20#include <asm/irq.h>
29#include <asm/page.h>
30
31#ifdef CONFIG_BLK_DEV_INITRD
32#include "../rootfs/rootfs.h"
33#endif
34
35static __init void platform_monitor(void);
36static __init void platform_setup(void);
37static __init void platform_reserve(void);
38
39
40#define PHYS_MEMORY CONFIG_MEMORY_SIZE_IN_MB*1024*1024
41
42#if (PHYS_MEMORY < P1SEG_FOOTPRINT_RAM)
43#error "Invalid kernel configuration. Physical memory below footprint requirements."
44#endif
45
46#define RAM_DISK_START CONFIG_MEMORY_START+P1SEG_INITRD_BLOCK /* Top of 4MB */
47#ifdef PLATFORM_ROMFS_SIZE
48#define RAM_DISK_SIZE (PAGE_ALIGN(PLATFORM_ROMFS_SIZE)) /* Variable Top */
49#if ((RAM_DISK_START + RAM_DISK_SIZE) > (CONFIG_MEMORY_START + PHYS_MEMORY))
50#error "Invalid kernel configuration. ROM RootFS exceeding physical memory."
51#endif
52#else
53#define RAM_DISK_SIZE P1SEG_INITRD_BLOCK_SIZE /* Top of 4MB */
54#endif
55
56#define RES_COUNT(res) ((sizeof((res))/sizeof(struct resource)))
57 21
58/* 22/*
59 * Platform Dependent Interrupt Priorities. 23 * Platform Dependent Interrupt Priorities.
@@ -101,8 +65,10 @@ struct resource io_resources[] = {
101}; 65};
102 66
103struct resource kram_resources[] = { 67struct resource kram_resources[] = {
104 { "Kernel code", 0, 0 }, /* These must be last in the array */ 68 /* These must be last in the array */
105 { "Kernel data", 0, 0 } /* These must be last in the array */ 69 { .name = "Kernel code", .start = 0, .end = 0 },
70 /* These must be last in the array */
71 { .name = "Kernel data", .start = 0, .end = 0 }
106}; 72};
107 73
108struct resource xram_resources[] = { 74struct resource xram_resources[] = {
@@ -117,16 +83,14 @@ struct sh64_platform platform_parms = {
117 .readonly_rootfs = 1, 83 .readonly_rootfs = 1,
118 .initial_root_dev = 0x0100, 84 .initial_root_dev = 0x0100,
119 .loader_type = 1, 85 .loader_type = 1,
120 .initrd_start = RAM_DISK_START,
121 .initrd_size = RAM_DISK_SIZE,
122 .io_res_p = io_resources, 86 .io_res_p = io_resources,
123 .io_res_count = RES_COUNT(io_resources), 87 .io_res_count = ARRAY_SIZE(io_resources),
124 .kram_res_p = kram_resources, 88 .kram_res_p = kram_resources,
125 .kram_res_count = RES_COUNT(kram_resources), 89 .kram_res_count = ARRAY_SIZE(kram_resources),
126 .xram_res_p = xram_resources, 90 .xram_res_p = xram_resources,
127 .xram_res_count = RES_COUNT(xram_resources), 91 .xram_res_count = ARRAY_SIZE(xram_resources),
128 .rom_res_p = rom_resources, 92 .rom_res_p = rom_resources,
129 .rom_res_count = RES_COUNT(rom_resources), 93 .rom_res_count = ARRAY_SIZE(rom_resources),
130}; 94};
131 95
132int platform_int_priority[NR_IRQS] = { 96int platform_int_priority[NR_IRQS] = {
@@ -160,4 +124,3 @@ const char *get_system_type(void)
160{ 124{
161 return "SH-5 Simulator"; 125 return "SH-5 Simulator";
162} 126}
163