aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mips-boards
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2008-07-15 13:44:33 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-15 13:44:33 -0400
commit1398ddb2ebdb41e8efe6ba42505fd452704c8405 (patch)
tree1b11aa578c4f94840bfbac96e2e1ffd52c3f62f6 /arch/mips/mips-boards
parent2157bc68711bf0e69f9aca4d310bd863298fbb3f (diff)
[MIPS] SEAD: Remove support code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mips-boards')
-rw-r--r--arch/mips/mips-boards/generic/console.c12
-rw-r--r--arch/mips/mips-boards/generic/init.c4
-rw-r--r--arch/mips/mips-boards/generic/reset.c2
-rw-r--r--arch/mips/mips-boards/generic/time.c5
-rw-r--r--arch/mips/mips-boards/sead/Makefile28
-rw-r--r--arch/mips/mips-boards/sead/sead_int.c117
-rw-r--r--arch/mips/mips-boards/sead/sead_setup.c77
7 files changed, 2 insertions, 243 deletions
diff --git a/arch/mips/mips-boards/generic/console.c b/arch/mips/mips-boards/generic/console.c
index 4a2aecc6da1b..43bcfb4f8167 100644
--- a/arch/mips/mips-boards/generic/console.c
+++ b/arch/mips/mips-boards/generic/console.c
@@ -22,21 +22,9 @@
22#include <linux/serial_reg.h> 22#include <linux/serial_reg.h>
23#include <asm/io.h> 23#include <asm/io.h>
24 24
25#if defined(CONFIG_MIPS_SEAD)
26
27#include <asm/mips-boards/sead.h>
28
29#ifdef CONFIG_CPU_LITTLE_ENDIAN
30#define PORT(offset) (SEAD_UART0_REGS_BASE + ((offset)<<3))
31#else
32#define PORT(offset) (SEAD_UART0_REGS_BASE + 3 + ((offset)<<3))
33#endif
34
35#else
36 25
37#define PORT(offset) (0x3f8 + (offset)) 26#define PORT(offset) (0x3f8 + (offset))
38 27
39#endif
40 28
41static inline unsigned int serial_in(int offset) 29static inline unsigned int serial_in(int offset)
42{ 30{
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c
index bac23b5fbf3f..c0653021a171 100644
--- a/arch/mips/mips-boards/generic/init.c
+++ b/arch/mips/mips-boards/generic/init.c
@@ -252,9 +252,6 @@ void __init prom_init(void)
252 252
253 mips_display_message("LINUX"); 253 mips_display_message("LINUX");
254 254
255#ifdef CONFIG_MIPS_SEAD
256 set_io_port_base(KSEG1);
257#else
258 /* 255 /*
259 * early setup of _pcictrl_bonito so that we can determine 256 * early setup of _pcictrl_bonito so that we can determine
260 * the system controller on a CORE_EMUL board 257 * the system controller on a CORE_EMUL board
@@ -406,7 +403,6 @@ void __init prom_init(void)
406 mips_display_message("SC Error"); 403 mips_display_message("SC Error");
407 while (1); /* We die here... */ 404 while (1); /* We die here... */
408 } 405 }
409#endif
410 board_nmi_handler_setup = mips_nmi_setup; 406 board_nmi_handler_setup = mips_nmi_setup;
411 board_ejtag_handler_setup = mips_ejtag_setup; 407 board_ejtag_handler_setup = mips_ejtag_setup;
412 408
diff --git a/arch/mips/mips-boards/generic/reset.c b/arch/mips/mips-boards/generic/reset.c
index 5f73ff6180eb..ea932b843962 100644
--- a/arch/mips/mips-boards/generic/reset.c
+++ b/arch/mips/mips-boards/generic/reset.c
@@ -52,7 +52,7 @@ void mips_reboot_setup(void)
52{ 52{
53 _machine_restart = mips_machine_restart; 53 _machine_restart = mips_machine_restart;
54 _machine_halt = mips_machine_halt; 54 _machine_halt = mips_machine_halt;
55#if defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MIPS_SEAD) 55#ifdef CONFIG_MIPS_MALTA
56 pm_power_off = mips_machine_halt; 56 pm_power_off = mips_machine_halt;
57#endif 57#endif
58} 58}
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index d224267846b0..637897e8e4fb 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -45,9 +45,6 @@
45#ifdef CONFIG_MIPS_MALTA 45#ifdef CONFIG_MIPS_MALTA
46#include <asm/mips-boards/maltaint.h> 46#include <asm/mips-boards/maltaint.h>
47#endif 47#endif
48#ifdef CONFIG_MIPS_SEAD
49#include <asm/mips-boards/seadint.h>
50#endif
51 48
52unsigned long cpu_khz; 49unsigned long cpu_khz;
53 50
@@ -73,7 +70,7 @@ static unsigned int __init estimate_cpu_frequency(void)
73 unsigned int prid = read_c0_prid() & 0xffff00; 70 unsigned int prid = read_c0_prid() & 0xffff00;
74 unsigned int count; 71 unsigned int count;
75 72
76#if defined(CONFIG_MIPS_SEAD) || defined(CONFIG_MIPS_SIM) 73#ifdef CONFIG_MIPS_SIM
77 /* 74 /*
78 * The SEAD board doesn't have a real time clock, so we can't 75 * The SEAD board doesn't have a real time clock, so we can't
79 * really calculate the timer frequency 76 * really calculate the timer frequency
diff --git a/arch/mips/mips-boards/sead/Makefile b/arch/mips/mips-boards/sead/Makefile
deleted file mode 100644
index 3682fe217bd5..000000000000
--- a/arch/mips/mips-boards/sead/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
1#
2# Carsten Langgaard, carstenl@mips.com
3# Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
4#
5# ########################################################################
6#
7# This program is free software; you can distribute it and/or modify it
8# under the terms of the GNU General Public License (Version 2) as
9# published by the Free Software Foundation.
10#
11# This program is distributed in the hope it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program; if not, write to the Free Software Foundation, Inc.,
18# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
19#
20# #######################################################################
21#
22# Makefile for the MIPS SEAD specific kernel interface routines
23# under Linux.
24#
25
26obj-y := sead_int.o sead_setup.o
27
28EXTRA_CFLAGS += -Werror
diff --git a/arch/mips/mips-boards/sead/sead_int.c b/arch/mips/mips-boards/sead/sead_int.c
deleted file mode 100644
index ec6dd194c14a..000000000000
--- a/arch/mips/mips-boards/sead/sead_int.c
+++ /dev/null
@@ -1,117 +0,0 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
4 * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org)
5 * Copyright (C) 2004 Maciej W. Rozycki
6 *
7 * This program is free software; you can distribute it and/or modify it
8 * under the terms of the GNU General Public License (Version 2) as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
19 *
20 * Routines for generic manipulation of the interrupts found on the MIPS
21 * Sead board.
22 */
23#include <linux/init.h>
24#include <linux/interrupt.h>
25
26#include <asm/irq_cpu.h>
27#include <asm/mipsregs.h>
28#include <asm/system.h>
29
30#include <asm/mips-boards/seadint.h>
31
32static inline int clz(unsigned long x)
33{
34 __asm__(
35 " .set push \n"
36 " .set mips32 \n"
37 " clz %0, %1 \n"
38 " .set pop \n"
39 : "=r" (x)
40 : "r" (x));
41
42 return x;
43}
44
45/*
46 * Version of ffs that only looks at bits 12..15.
47 */
48static inline unsigned int irq_ffs(unsigned int pending)
49{
50#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64)
51 return -clz(pending) + 31 - CAUSEB_IP;
52#else
53 unsigned int a0 = 7;
54 unsigned int t0;
55
56 t0 = s0 & 0xf000;
57 t0 = t0 < 1;
58 t0 = t0 << 2;
59 a0 = a0 - t0;
60 s0 = s0 << t0;
61
62 t0 = s0 & 0xc000;
63 t0 = t0 < 1;
64 t0 = t0 << 1;
65 a0 = a0 - t0;
66 s0 = s0 << t0;
67
68 t0 = s0 & 0x8000;
69 t0 = t0 < 1;
70 //t0 = t0 << 2;
71 a0 = a0 - t0;
72 //s0 = s0 << t0;
73
74 return a0;
75#endif
76}
77
78/*
79 * IRQs on the SEAD board look basically are combined together on hardware
80 * interrupt 0 (MIPS IRQ 2)) like:
81 *
82 * MIPS IRQ Source
83 * -------- ------
84 * 0 Software (ignored)
85 * 1 Software (ignored)
86 * 2 UART0 (hw0)
87 * 3 UART1 (hw1)
88 * 4 Hardware (ignored)
89 * 5 Hardware (ignored)
90 * 6 Hardware (ignored)
91 * 7 R4k timer (what we use)
92 *
93 * We handle the IRQ according to _our_ priority which is:
94 *
95 * Highest ---- R4k Timer
96 * Lowest ---- Combined hardware interrupt
97 *
98 * then we just return, if multiple IRQs are pending then we will just take
99 * another exception, big deal.
100 */
101asmlinkage void plat_irq_dispatch(void)
102{
103 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
104 int irq;
105
106 irq = irq_ffs(pending);
107
108 if (irq >= 0)
109 do_IRQ(MIPS_CPU_IRQ_BASE + irq);
110 else
111 spurious_interrupt();
112}
113
114void __init arch_init_irq(void)
115{
116 mips_cpu_irq_init();
117}
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c
deleted file mode 100644
index 8aa8e5b7b074..000000000000
--- a/arch/mips/mips-boards/sead/sead_setup.c
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * Carsten Langgaard, carstenl@mips.com
3 * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
4 *
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 *
18 * SEAD specific setup.
19 */
20#include <linux/init.h>
21#include <linux/sched.h>
22#include <linux/ioport.h>
23#include <linux/tty.h>
24#include <linux/serial.h>
25#include <linux/serial_core.h>
26#include <linux/serial_8250.h>
27
28#include <asm/cpu.h>
29#include <asm/bootinfo.h>
30#include <asm/irq.h>
31#include <asm/mips-boards/generic.h>
32#include <asm/mips-boards/prom.h>
33#include <asm/mips-boards/sead.h>
34#include <asm/mips-boards/seadint.h>
35#include <asm/time.h>
36
37static void __init serial_init(void);
38
39const char *get_system_type(void)
40{
41 return "MIPS SEAD";
42}
43
44const char display_string[] = " LINUX ON SEAD ";
45
46void __init plat_mem_setup(void)
47{
48 ioport_resource.end = 0x7fffffff;
49
50 serial_init();
51
52 mips_reboot_setup();
53}
54
55static void __init serial_init(void)
56{
57#ifdef CONFIG_SERIAL_8250
58 struct uart_port s;
59
60 memset(&s, 0, sizeof(s));
61
62#ifdef CONFIG_CPU_LITTLE_ENDIAN
63 s.iobase = SEAD_UART0_REGS_BASE;
64#else
65 s.iobase = SEAD_UART0_REGS_BASE+3;
66#endif
67 s.irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_UART0;
68 s.uartclk = SEAD_BASE_BAUD * 16;
69 s.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ;
70 s.iotype = UPIO_PORT;
71 s.regshift = 3;
72
73 if (early_serial_setup(&s) != 0) {
74 printk(KERN_ERR "Serial setup failed!\n");
75 }
76#endif
77}