aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2009-06-02 08:22:06 -0400
committerRalf Baechle <ralf@linux-mips.org>2009-06-17 06:06:27 -0400
commit05f94eebd55ef69a354d3ea70179e40ea4c34de6 (patch)
treee97c73c3b3eeabcc888f8b5f21d97a2976eabc5c
parent435f81f4a24206f82ce10d430fa6f312cee80669 (diff)
MIPS: Sibyte: Remove standalone kernel support
CFE is the only supported and used bootloader on the SiByte boards, the standalone kernel support has been never used outside Broadcom. Remove it and make the kernel use CFE by default. Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/Makefile1
-rw-r--r--arch/mips/sibyte/Kconfig24
-rw-r--r--arch/mips/sibyte/cfe/Makefile2
-rw-r--r--arch/mips/sibyte/common/Makefile4
-rw-r--r--arch/mips/sibyte/common/cfe.c (renamed from arch/mips/sibyte/cfe/setup.c)0
-rw-r--r--arch/mips/sibyte/common/cfe_console.c (renamed from arch/mips/sibyte/cfe/console.c)0
-rw-r--r--arch/mips/sibyte/sb1250/Makefile1
-rw-r--r--arch/mips/sibyte/sb1250/prom.c96
-rw-r--r--arch/mips/sibyte/swarm/setup.c10
9 files changed, 5 insertions, 133 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index c4cae9e6b802..52a350974496 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -167,7 +167,6 @@ libs-$(CONFIG_ARC) += arch/mips/fw/arc/
167libs-$(CONFIG_CFE) += arch/mips/fw/cfe/ 167libs-$(CONFIG_CFE) += arch/mips/fw/cfe/
168libs-$(CONFIG_SNIPROM) += arch/mips/fw/sni/ 168libs-$(CONFIG_SNIPROM) += arch/mips/fw/sni/
169libs-y += arch/mips/fw/lib/ 169libs-y += arch/mips/fw/lib/
170libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/
171 170
172# 171#
173# Board-dependent options and extra files 172# Board-dependent options and extra files
diff --git a/arch/mips/sibyte/Kconfig b/arch/mips/sibyte/Kconfig
index 989d1a90a8e3..3e639bda43f7 100644
--- a/arch/mips/sibyte/Kconfig
+++ b/arch/mips/sibyte/Kconfig
@@ -75,6 +75,8 @@ config SIBYTE_SB1xxx_SOC
75 select SWAP_IO_SPACE 75 select SWAP_IO_SPACE
76 select SYS_SUPPORTS_32BIT_KERNEL 76 select SYS_SUPPORTS_32BIT_KERNEL
77 select SYS_SUPPORTS_64BIT_KERNEL 77 select SYS_SUPPORTS_64BIT_KERNEL
78 select CFE
79 select SYS_HAS_EARLY_PRINTK
78 80
79choice 81choice
80 prompt "SiByte SOC Stepping" 82 prompt "SiByte SOC Stepping"
@@ -136,34 +138,14 @@ config SB1_CERR_STALL
136 bool "Stall (rather than panic) on fatal cache error" 138 bool "Stall (rather than panic) on fatal cache error"
137 depends on SIBYTE_SB1xxx_SOC 139 depends on SIBYTE_SB1xxx_SOC
138 140
139config SIBYTE_CFE
140 bool "Booting from CFE"
141 depends on SIBYTE_SB1xxx_SOC
142 select CFE
143 select SYS_HAS_EARLY_PRINTK
144 help
145 Make use of the CFE API for enumerating available memory,
146 controlling secondary CPUs, and possibly console output.
147
148config SIBYTE_CFE_CONSOLE 141config SIBYTE_CFE_CONSOLE
149 bool "Use firmware console" 142 bool "Use firmware console"
150 depends on SIBYTE_CFE 143 depends on SIBYTE_SB1xxx_SOC
151 help 144 help
152 Use the CFE API's console write routines during boot. Other console 145 Use the CFE API's console write routines during boot. Other console
153 options (VT console, sb1250 duart console, etc.) should not be 146 options (VT console, sb1250 duart console, etc.) should not be
154 configured. 147 configured.
155 148
156config SIBYTE_STANDALONE
157 bool
158 depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
159 select SYS_HAS_EARLY_PRINTK
160 default y
161
162config SIBYTE_STANDALONE_RAM_SIZE
163 int "Memory size (in megabytes)"
164 depends on SIBYTE_STANDALONE
165 default "32"
166
167config SIBYTE_BUS_WATCHER 149config SIBYTE_BUS_WATCHER
168 bool "Support for Bus Watcher statistics" 150 bool "Support for Bus Watcher statistics"
169 depends on SIBYTE_SB1xxx_SOC 151 depends on SIBYTE_SB1xxx_SOC
diff --git a/arch/mips/sibyte/cfe/Makefile b/arch/mips/sibyte/cfe/Makefile
deleted file mode 100644
index 02b32e142adf..000000000000
--- a/arch/mips/sibyte/cfe/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
1lib-y = setup.o
2lib-$(CONFIG_SIBYTE_CFE_CONSOLE) += console.o
diff --git a/arch/mips/sibyte/common/Makefile b/arch/mips/sibyte/common/Makefile
index 48a91b9e5870..4f659837c7c6 100644
--- a/arch/mips/sibyte/common/Makefile
+++ b/arch/mips/sibyte/common/Makefile
@@ -1,5 +1,5 @@
1obj-y := 1obj-y := cfe.o
2 2obj-$(CONFIG_SIBYTE_CFE_CONSOLE) += cfe_console.o
3obj-$(CONFIG_SIBYTE_TBPROF) += sb_tbprof.o 3obj-$(CONFIG_SIBYTE_TBPROF) += sb_tbprof.o
4 4
5EXTRA_CFLAGS += -Werror 5EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/common/cfe.c
index eb5396cf81bb..eb5396cf81bb 100644
--- a/arch/mips/sibyte/cfe/setup.c
+++ b/arch/mips/sibyte/common/cfe.c
diff --git a/arch/mips/sibyte/cfe/console.c b/arch/mips/sibyte/common/cfe_console.c
index 81e3d54376e9..81e3d54376e9 100644
--- a/arch/mips/sibyte/cfe/console.c
+++ b/arch/mips/sibyte/common/cfe_console.c
diff --git a/arch/mips/sibyte/sb1250/Makefile b/arch/mips/sibyte/sb1250/Makefile
index 697793783a25..1896f4e77a30 100644
--- a/arch/mips/sibyte/sb1250/Makefile
+++ b/arch/mips/sibyte/sb1250/Makefile
@@ -1,7 +1,6 @@
1obj-y := setup.o irq.o time.o 1obj-y := setup.o irq.o time.o
2 2
3obj-$(CONFIG_SMP) += smp.o 3obj-$(CONFIG_SMP) += smp.o
4obj-$(CONFIG_SIBYTE_STANDALONE) += prom.o
5obj-$(CONFIG_SIBYTE_BUS_WATCHER) += bus_watcher.o 4obj-$(CONFIG_SIBYTE_BUS_WATCHER) += bus_watcher.o
6 5
7EXTRA_CFLAGS += -Werror 6EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/sibyte/sb1250/prom.c b/arch/mips/sibyte/sb1250/prom.c
deleted file mode 100644
index 65b1af66b674..000000000000
--- a/arch/mips/sibyte/sb1250/prom.c
+++ /dev/null
@@ -1,96 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#include <linux/init.h>
20#include <linux/kernel.h>
21#include <linux/mm.h>
22#include <linux/blkdev.h>
23#include <linux/bootmem.h>
24#include <linux/smp.h>
25#include <linux/initrd.h>
26#include <linux/pm.h>
27
28#include <asm/bootinfo.h>
29#include <asm/reboot.h>
30
31#define MAX_RAM_SIZE ((CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024) - 1)
32
33static __init void prom_meminit(void)
34{
35#ifdef CONFIG_BLK_DEV_INITRD
36 unsigned long initrd_pstart;
37 unsigned long initrd_pend;
38
39 initrd_pstart = __pa(initrd_start);
40 initrd_pend = __pa(initrd_end);
41 if (initrd_start &&
42 ((initrd_pstart > MAX_RAM_SIZE)
43 || (initrd_pend > MAX_RAM_SIZE))) {
44 panic("initrd out of addressable memory");
45 }
46
47 add_memory_region(0, initrd_pstart,
48 BOOT_MEM_RAM);
49 add_memory_region(initrd_pstart, initrd_pend - initrd_pstart,
50 BOOT_MEM_RESERVED);
51 add_memory_region(initrd_pend,
52 (CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024) - initrd_pend,
53 BOOT_MEM_RAM);
54#else
55 add_memory_region(0, CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024,
56 BOOT_MEM_RAM);
57#endif
58}
59
60void prom_cpu0_exit(void *unused)
61{
62 while (1) ;
63}
64
65static void prom_linux_exit(void)
66{
67#ifdef CONFIG_SMP
68 if (smp_processor_id()) {
69 smp_call_function(prom_cpu0_exit, NULL, 1);
70 }
71#endif
72 while(1);
73}
74
75/*
76 * prom_init is called just after the cpu type is determined, from setup_arch()
77 */
78void __init prom_init(void)
79{
80 _machine_restart = (void (*)(char *))prom_linux_exit;
81 _machine_halt = prom_linux_exit;
82 pm_power_off = prom_linux_exit;
83
84 strcpy(arcs_cmdline, "root=/dev/ram0 ");
85
86 prom_meminit();
87}
88
89void __init prom_free_prom_memory(void)
90{
91 /* Not sure what I'm supposed to do here. Nothing, I think */
92}
93
94void prom_putchar(char c)
95{
96}
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
index cffa30a989be..672e45d495a9 100644
--- a/arch/mips/sibyte/swarm/setup.c
+++ b/arch/mips/sibyte/swarm/setup.c
@@ -136,16 +136,6 @@ void __init plat_mem_setup(void)
136 if (m41t81_probe()) 136 if (m41t81_probe())
137 swarm_rtc_type = RTC_M4LT81; 137 swarm_rtc_type = RTC_M4LT81;
138 138
139 printk("This kernel optimized for "
140 "board"
141 " runs "
142#ifdef CONFIG_SIBYTE_CFE
143 "with"
144#else
145 "without"
146#endif
147 " CFE\n");
148
149#ifdef CONFIG_VT 139#ifdef CONFIG_VT
150 screen_info = (struct screen_info) { 140 screen_info = (struct screen_info) {
151 0, 0, /* orig-x, orig-y */ 141 0, 0, /* orig-x, orig-y */