aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh64/mach-sim/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh64/mach-sim/setup.c')
-rw-r--r--arch/sh64/mach-sim/setup.c53
1 files changed, 8 insertions, 45 deletions
diff --git a/arch/sh64/mach-sim/setup.c b/arch/sh64/mach-sim/setup.c
index f09400c1ad1b..e3386ec1ce1f 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