diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 11:15:02 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-01-29 11:15:02 +0100 |
commit | 302922e5f6901eb6f29c58539631f71b3d9746b8 (patch) | |
tree | b7e41f0da3bc8710363ab6cd020ace21d35a9ac6 /arch/mips/qemu | |
parent | [MIPS] pnx8xxx: clocksource cleanups (diff) | |
download | linux-302922e5f6901eb6f29c58539631f71b3d9746b8.tar.xz linux-302922e5f6901eb6f29c58539631f71b3d9746b8.zip |
[MIPS] Qemu: Remove platform.
The Qemu platform was originally implemented to have an easily supportable
platform until Qemu reaches a state where it emulates a real world system.
Since the latest release Qemu is capable of emulating the MIPSsim and
Malta platforms, so this goal has been reached. The Qemu plaform is also
rather underfeatured so less useful than a Malta emulation.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/qemu')
-rw-r--r-- | arch/mips/qemu/Makefile | 10 | ||||
-rw-r--r-- | arch/mips/qemu/q-console.c | 26 | ||||
-rw-r--r-- | arch/mips/qemu/q-firmware.c | 24 | ||||
-rw-r--r-- | arch/mips/qemu/q-irq.c | 37 | ||||
-rw-r--r-- | arch/mips/qemu/q-mem.c | 5 | ||||
-rw-r--r-- | arch/mips/qemu/q-reset.c | 33 | ||||
-rw-r--r-- | arch/mips/qemu/q-setup.c | 37 | ||||
-rw-r--r-- | arch/mips/qemu/q-smp.c | 67 |
8 files changed, 0 insertions, 239 deletions
diff --git a/arch/mips/qemu/Makefile b/arch/mips/qemu/Makefile deleted file mode 100644 index 2ba4ef34b4a7..000000000000 --- a/arch/mips/qemu/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# -# Makefile for Qemu specific kernel interface routines under Linux. -# - -obj-y = q-firmware.o q-irq.o q-mem.o q-setup.o q-reset.o - -obj-$(CONFIG_EARLY_PRINTK) += q-console.o -obj-$(CONFIG_SMP) += q-smp.o - -EXTRA_CFLAGS += -Werror diff --git a/arch/mips/qemu/q-console.c b/arch/mips/qemu/q-console.c deleted file mode 100644 index 81101ae5017a..000000000000 --- a/arch/mips/qemu/q-console.c +++ /dev/null @@ -1,26 +0,0 @@ -#include <linux/console.h> -#include <linux/init.h> -#include <linux/serial_reg.h> -#include <asm/io.h> - -#define PORT(offset) (0x3f8 + (offset)) - -static inline unsigned int serial_in(int offset) -{ - return inb(PORT(offset)); -} - -static inline void serial_out(int offset, int value) -{ - outb(value, PORT(offset)); -} - -int prom_putchar(char c) -{ - while ((serial_in(UART_LSR) & UART_LSR_THRE) == 0) - ; - - serial_out(UART_TX, c); - - return 1; -} diff --git a/arch/mips/qemu/q-firmware.c b/arch/mips/qemu/q-firmware.c deleted file mode 100644 index 3ed43f416cd1..000000000000 --- a/arch/mips/qemu/q-firmware.c +++ /dev/null @@ -1,24 +0,0 @@ -#include <linux/init.h> -#include <linux/string.h> -#include <asm/addrspace.h> -#include <asm/bootinfo.h> -#include <asm/io.h> - -#define QEMU_PORT_BASE 0xb4000000 - -void __init prom_init(void) -{ - int *cmdline; - - cmdline = (int *) (CKSEG0 + (0x10 << 20) - 260); - if (*cmdline == 0x12345678) { - if (*(char *)(cmdline + 1)) - strcpy(arcs_cmdline, (char *)(cmdline + 1)); - add_memory_region(0x0<<20, cmdline[-1], BOOT_MEM_RAM); - } else { - add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM); - } - - - set_io_port_base(QEMU_PORT_BASE); -} diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c deleted file mode 100644 index 7df36dbe65c7..000000000000 --- a/arch/mips/qemu/q-irq.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <linux/init.h> -#include <linux/interrupt.h> -#include <linux/linkage.h> - -#include <asm/i8259.h> -#include <asm/irq_cpu.h> -#include <asm/mipsregs.h> -#include <asm/qemu.h> -#include <asm/system.h> -#include <asm/time.h> - -asmlinkage void plat_irq_dispatch(void) -{ - unsigned int pending = read_c0_status() & read_c0_cause(); - - if (pending & 0x8000) { - do_IRQ(Q_COUNT_COMPARE_IRQ); - return; - } - if (pending & 0x0400) { - int irq = i8259_irq(); - - if (likely(irq >= 0)) - do_IRQ(irq); - - return; - } -} - -void __init arch_init_irq(void) -{ - mips_hpt_frequency = QEMU_C0_COUNTER_CLOCK; /* 100MHz */ - - mips_cpu_irq_init(); - init_i8259_irqs(); - set_c0_status(0x400); -} diff --git a/arch/mips/qemu/q-mem.c b/arch/mips/qemu/q-mem.c deleted file mode 100644 index dae39b59de15..000000000000 --- a/arch/mips/qemu/q-mem.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <linux/init.h> - -void __init prom_free_prom_memory(void) -{ -} diff --git a/arch/mips/qemu/q-reset.c b/arch/mips/qemu/q-reset.c deleted file mode 100644 index dbbe44ad7e89..000000000000 --- a/arch/mips/qemu/q-reset.c +++ /dev/null @@ -1,33 +0,0 @@ - -#include <asm/io.h> -#include <asm/reboot.h> -#include <asm/cacheflush.h> -#include <asm/qemu.h> - -static void qemu_machine_restart(char *command) -{ - volatile unsigned int *reg = (unsigned int *)QEMU_RESTART_REG; - - set_c0_status(ST0_BEV | ST0_ERL); - change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); - flush_cache_all(); - write_c0_wired(0); - *reg = 42; - while (1) - cpu_wait(); -} - -static void qemu_machine_halt(void) -{ - volatile unsigned int *reg = (unsigned int *)QEMU_HALT_REG; - - *reg = 42; - while (1) - cpu_wait(); -} - -void qemu_reboot_setup(void) -{ - _machine_restart = qemu_machine_restart; - _machine_halt = qemu_machine_halt; -} diff --git a/arch/mips/qemu/q-setup.c b/arch/mips/qemu/q-setup.c deleted file mode 100644 index 9f0c2d3c67ea..000000000000 --- a/arch/mips/qemu/q-setup.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <linux/init.h> -#include <linux/platform_device.h> - -#include <asm/i8253.h> -#include <asm/io.h> -#include <asm/time.h> - -extern void qemu_reboot_setup(void); - -const char *get_system_type(void) -{ - return "Qemu"; -} - -void __init plat_time_init(void) -{ - setup_pit_timer(); -} - -void __init plat_mem_setup(void) -{ - qemu_reboot_setup(); -} - -static struct platform_device pcspeaker_pdev = { - .name = "pcspkr", - .id = -1, -}; - -static int __init qemu_platform_devinit(void) -{ - platform_device_register(&pcspeaker_pdev); - - return 0; -} - -device_initcall(qemu_platform_devinit); diff --git a/arch/mips/qemu/q-smp.c b/arch/mips/qemu/q-smp.c deleted file mode 100644 index ead6c30eeb14..000000000000 --- a/arch/mips/qemu/q-smp.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org) - * - * Symmetric Uniprocessor (TM) Support - */ -#include <linux/kernel.h> -#include <linux/sched.h> - -/* - * Send inter-processor interrupt - */ -void up_send_ipi_single(int cpu, unsigned int action) -{ - panic(KERN_ERR "%s called", __func__); -} - -static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action) -{ - panic(KERN_ERR "%s called", __func__); -} - -/* - * After we've done initial boot, this function is called to allow the - * board code to clean up state, if needed - */ -void __cpuinit up_init_secondary(void) -{ -} - -void __cpuinit up_smp_finish(void) -{ -} - -/* Hook for after all CPUs are online */ -void up_cpus_done(void) -{ -} - -/* - * Firmware CPU startup hook - */ -void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle) -{ -} - -void __init up_smp_setup(void) -{ -} - -void __init up_prepare_cpus(unsigned int max_cpus) -{ -} - -struct plat_smp_ops up_smp_ops = { - .send_ipi_single = up_send_ipi_single, - .send_ipi_mask = up_send_ipi_mask, - .init_secondary = up_init_secondary, - .smp_finish = up_smp_finish, - .cpus_done = up_cpus_done, - .boot_secondary = up_boot_secondary, - .smp_setup = up_smp_setup, - .prepare_cpus = up_prepare_cpus, -}; |