diff options
Diffstat (limited to 'arch/mips64/sgi-ip22')
-rw-r--r-- | arch/mips64/sgi-ip22/Makefile | 2 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-hpc.c | 5 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-int.c | 6 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-irq.S | 2 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-mc.c | 6 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-reset.c | 27 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-rtc.c | 2 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-sc.c | 85 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-setup.c | 3 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/ip22-timer.c | 18 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/system.c | 8 | ||||
-rw-r--r-- | arch/mips64/sgi-ip22/time.c | 2 |
12 files changed, 49 insertions, 117 deletions
diff --git a/arch/mips64/sgi-ip22/Makefile b/arch/mips64/sgi-ip22/Makefile index 476432a99..8e03f3d9a 100644 --- a/arch/mips64/sgi-ip22/Makefile +++ b/arch/mips64/sgi-ip22/Makefile @@ -1,4 +1,4 @@ -# $Id$ +# $Id: Makefile,v 1.1 1999/08/20 21:13:33 ralf Exp $ # # Makefile for the SGI specific kernel interface routines # under Linux. diff --git a/arch/mips64/sgi-ip22/ip22-hpc.c b/arch/mips64/sgi-ip22/ip22-hpc.c index c3019e8bf..5e42803c1 100644 --- a/arch/mips64/sgi-ip22/ip22-hpc.c +++ b/arch/mips64/sgi-ip22/ip22-hpc.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-hpc.c,v 1.2 1999/10/19 20:51:52 ralf Exp $ * * ip22-hpc.c: Routines for generic manipulation of the HPC controllers. * @@ -6,6 +6,7 @@ * Copyright (C) 1998, 1999 Ralf Baechle */ #include <linux/init.h> +#include <linux/types.h> #include <asm/addrspace.h> #include <asm/sgi/sgihpc.h> @@ -18,7 +19,7 @@ struct hpc3_regs *hpc3c0, *hpc3c1; struct hpc3_miscregs *hpc3mregs; /* We need software copies of these because they are write only. */ -unsigned long sgi_hpc_write1, sgi_hpc_write2; +unsigned int sgi_hpc_write1, sgi_hpc_write2; /* Machine specific identifier knobs. */ int sgi_has_ioc2 = 0; diff --git a/arch/mips64/sgi-ip22/ip22-int.c b/arch/mips64/sgi-ip22/ip22-int.c index e6fe49354..765c90da1 100644 --- a/arch/mips64/sgi-ip22/ip22-int.c +++ b/arch/mips64/sgi-ip22/ip22-int.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-int.c,v 1.4 1999/11/19 20:35:23 ralf Exp $ * * indy_int.c: Routines for generic manipulation of the INT[23] ASIC * found on INDY workstations.. @@ -259,8 +259,6 @@ int get_irq_list(char *buf) return len; } -atomic_t __mips_bh_counter; - /* * do_IRQ handles IRQ's that have been installed without the * SA_INTERRUPT flag: it uses the full signal-handling return @@ -279,7 +277,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) printk("Got irq %d, press a key.", irq); prom_getchar(); - romvec->imode(); + ArcEnterInteractiveMode(); /* * mask and ack quickly, we don't want the irq controller diff --git a/arch/mips64/sgi-ip22/ip22-irq.S b/arch/mips64/sgi-ip22/ip22-irq.S index 9f4234598..e943d3e30 100644 --- a/arch/mips64/sgi-ip22/ip22-irq.S +++ b/arch/mips64/sgi-ip22/ip22-irq.S @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-irq.S,v 1.1 1999/08/20 21:13:33 ralf Exp $ * * 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 diff --git a/arch/mips64/sgi-ip22/ip22-mc.c b/arch/mips64/sgi-ip22/ip22-mc.c index aa43afe28..be8a91a0a 100644 --- a/arch/mips64/sgi-ip22/ip22-mc.c +++ b/arch/mips64/sgi-ip22/ip22-mc.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-mc.c,v 1.2 1999/10/19 20:51:52 ralf Exp $ * * 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 @@ -20,7 +20,7 @@ /* #define DEBUG_SGIMC */ struct sgimc_misc_ctrl *mcmisc_regs; -unsigned long *rpsscounter; +u32 *rpsscounter; struct sgimc_dma_ctrl *dmactrlregs; static inline char *mconfig_string(unsigned long val) @@ -54,7 +54,7 @@ void __init sgimc_init(void) unsigned long tmpreg; mcmisc_regs = (struct sgimc_misc_ctrl *)(KSEG1+0x1fa00000); - rpsscounter = (unsigned long *) (KSEG1 + 0x1fa01004); + rpsscounter = (u32 *) (KSEG1 + 0x1fa01004); dmactrlregs = (struct sgimc_dma_ctrl *) (KSEG1+0x1fa02000); printk("MC: SGI memory controller Revision %d\n", diff --git a/arch/mips64/sgi-ip22/ip22-reset.c b/arch/mips64/sgi-ip22/ip22-reset.c index cd521291f..7146076d1 100644 --- a/arch/mips64/sgi-ip22/ip22-reset.c +++ b/arch/mips64/sgi-ip22/ip22-reset.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-reset.c,v 1.3 1999/10/08 21:07:51 ralf Exp $ * * 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 @@ -15,7 +15,6 @@ #include <asm/io.h> #include <asm/irq.h> #include <asm/system.h> -#include <asm/reboot.h> #include <asm/sgialib.h> #include <asm/sgi/sgihpc.h> #include <asm/sgi/sgint23.h> @@ -38,26 +37,26 @@ static unsigned char sgi_volume; static struct timer_list power_timer, blink_timer, debounce_timer, volume_timer; static int shuting_down, has_paniced; -static void ip22_machine_restart(char *command) __attribute__((noreturn)); -static void ip22_machine_halt(void) __attribute__((noreturn)); -static void ip22_machine_power_off(void) __attribute__((noreturn)); +void machine_restart(char *command) __attribute__((noreturn)); +void machine_halt(void) __attribute__((noreturn)); +void machine_power_off(void) __attribute__((noreturn)); /* XXX How to pass the reboot command to the firmware??? */ -static void ip22_machine_restart(char *command) +void machine_restart(char *command) { if (shuting_down) - ip22_machine_power_off(); + machine_power_off(); ArcReboot(); } -static void ip22_machine_halt(void) +void machine_halt(void) { if (shuting_down) - ip22_machine_power_off(); + machine_power_off(); ArcEnterInteractiveMode(); } -static void ip22_machine_power_off(void) +void machine_power_off(void) { struct indy_clock *clock = (struct indy_clock *)INDY_CLOCK_REGS; @@ -79,7 +78,7 @@ static void ip22_machine_power_off(void) static void power_timeout(unsigned long data) { - ip22_machine_power_off(); + machine_power_off(); } static void blink_timeout(unsigned long data) @@ -118,7 +117,7 @@ static inline void power_button(void) if (shuting_down || kill_proc(1, SIGINT, 1)) { /* No init process or button pressed twice. */ - ip22_machine_power_off(); + machine_power_off(); } shuting_down = 1; @@ -235,10 +234,6 @@ void ip22_reboot_setup(void) return; setup_done = 1; - _machine_restart = ip22_machine_restart; - _machine_halt = ip22_machine_halt; - _machine_power_off = ip22_machine_power_off; - request_irq(9, panel_int, 0, "Front Panel", NULL); init_timer(&blink_timer); blink_timer.function = blink_timeout; diff --git a/arch/mips64/sgi-ip22/ip22-rtc.c b/arch/mips64/sgi-ip22/ip22-rtc.c index f138ff27f..eca3bcaab 100644 --- a/arch/mips64/sgi-ip22/ip22-rtc.c +++ b/arch/mips64/sgi-ip22/ip22-rtc.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-rtc.c,v 1.1 1999/08/20 21:13:34 ralf Exp $ * * 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 diff --git a/arch/mips64/sgi-ip22/ip22-sc.c b/arch/mips64/sgi-ip22/ip22-sc.c index 6c48e5611..92e6bf4d3 100644 --- a/arch/mips64/sgi-ip22/ip22-sc.c +++ b/arch/mips64/sgi-ip22/ip22-sc.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-sc.c,v 1.3 1999/10/20 18:10:24 ralf Exp $ * * indy_sc.c: Indy cache managment functions. * @@ -33,31 +33,16 @@ static unsigned long scache_size; static inline void indy_sc_wipe(unsigned long first, unsigned long last) { - unsigned long tmp; - __asm__ __volatile__(" .set noreorder - .set mips3 - .set noat - mfc0 %2, $12 - li $1, 0x80 # Go 64 bit - mtc0 $1, $12 - - dli $1, 0x9000000080000000 - or %0, $1 # first line to flush - or %1, $1 # last line to flush - .set at - + or %0, %4 # first line to flush + or %1, %4 # last line to flush 1: sw $0, 0(%0) bne %0, %1, 1b daddu %0, 32 - - mtc0 %2, $12 # Back to 32 bit - nop; nop; nop; nop; - .set mips0 .set reorder" - : "=r" (first), "=r" (last), "=&r" (tmp) - : "0" (first), "1" (last) + : "=r" (first), "=r" (last) + : "0" (first), "1" (last), "r" (0x9000000080000000) : "$1"); } @@ -88,78 +73,33 @@ out: __restore_flags(flags); } -static void indy_sc_enable(void) +static void inline indy_sc_enable(void) { - unsigned long tmp1, tmp2, tmp3; - - /* This is really cool... */ #ifdef DEBUG_CACHE printk("Enabling R4600 SCACHE\n"); #endif - __asm__ __volatile__(" - .set push - .set noreorder - .set mips3 - mfc0 %2, $12 - nop; nop; nop; nop; - li %1, 0x80 - mtc0 %1, $12 - nop; nop; nop; nop; - li %0, 0x1 - dsll %0, 31 - lui %1, 0x9000 - dsll32 %1, 0 - or %0, %1, %0 - sb $0, 0(%0) - mtc0 $0, $12 - nop; nop; nop; nop; - mtc0 %2, $12 - nop; nop; nop; nop; - .set pop" - : "=r" (tmp1), "=r" (tmp2), "=r" (tmp3)); + *(volatile unsigned char *) 0x9000000080000000 = 0; } static void indy_sc_disable(void) { - unsigned long tmp1, tmp2, tmp3; - #ifdef DEBUG_CACHE printk("Disabling R4600 SCACHE\n"); #endif - __asm__ __volatile__(" - .set push - .set noreorder - .set mips3 - li %0, 0x1 - dsll %0, 31 - lui %1, 0x9000 - dsll32 %1, 0 - or %0, %1, %0 - mfc0 %2, $12 - nop; nop; nop; nop; - li %1, 0x80 - mtc0 %1, $12 - nop; nop; nop; nop; - sh $0, 0(%0) - mtc0 $0, $12 - nop; nop; nop; nop; - mtc0 %2, $12 - nop; nop; nop; nop; - .set pop" - : "=r" (tmp1), "=r" (tmp2), "=r" (tmp3)); + *(volatile unsigned short *) 0x9000000080000000 = 0; } static inline __init int indy_sc_probe(void) { - volatile unsigned int *cpu_control; + volatile u32 *cpu_control; unsigned short cmd = 0xc220; unsigned long data = 0; int i, n; #ifdef __MIPSEB__ - cpu_control = (volatile unsigned int *) KSEG1ADDR(0x1fa00034); + cpu_control = (volatile u32 *) KSEG1ADDR(0x1fa00034); #else - cpu_control = (volatile unsigned int *) KSEG1ADDR(0x1fa00030); + cpu_control = (volatile u32 *) KSEG1ADDR(0x1fa00030); #endif #define DEASSERT(bit) (*(cpu_control) &= (~(bit))) #define ASSERT(bit) (*(cpu_control) |= (bit)) @@ -211,7 +151,7 @@ static inline __init int indy_sc_probe(void) /* XXX Check with wje if the Indy caches can differenciate between writeback + invalidate and just invalidate. */ -struct bcache_ops indy_sc_ops = { +static struct bcache_ops indy_sc_ops = { indy_sc_enable, indy_sc_disable, indy_sc_wback_invalidate, @@ -220,6 +160,7 @@ struct bcache_ops indy_sc_ops = { void __init indy_sc_init(void) { +return; /* Not for now, debugging ... */ if (indy_sc_probe()) { indy_sc_enable(); bcops = &indy_sc_ops; diff --git a/arch/mips64/sgi-ip22/ip22-setup.c b/arch/mips64/sgi-ip22/ip22-setup.c index c3c41c387..a1ae065d8 100644 --- a/arch/mips64/sgi-ip22/ip22-setup.c +++ b/arch/mips64/sgi-ip22/ip22-setup.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-setup.c,v 1.4 1999/10/08 21:07:51 ralf Exp $ * * 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 @@ -26,7 +26,6 @@ #include <asm/bcache.h> #include <asm/keyboard.h> #include <asm/irq.h> -#include <asm/reboot.h> #include <asm/sgialib.h> #include <asm/sgi/sgi.h> #include <asm/sgi/sgimc.h> diff --git a/arch/mips64/sgi-ip22/ip22-timer.c b/arch/mips64/sgi-ip22/ip22-timer.c index 3302ba1a7..633bf0ef8 100644 --- a/arch/mips64/sgi-ip22/ip22-timer.c +++ b/arch/mips64/sgi-ip22/ip22-timer.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: ip22-timer.c,v 1.3 1999/10/19 20:51:52 ralf Exp $ * * indy_timer.c: Setting up the clock on the INDY 8254 controller. * @@ -228,15 +228,13 @@ void __init indy_timer_init(void) struct sgi_ioc_timers *p; volatile unsigned char *tcwp, *tc2p; - /* Figure out the r4k offset, the algorithm is very simple - * and works in _all_ cases as long as the 8254 counter - * register itself works ok (as an interrupt driving timer - * it does not because of bug, this is why we are using - * the onchip r4k counter/compare register to serve this - * purpose, but for r4k_offset calculation it will work - * ok for us). There are other very complicated ways - * of performing this calculation but this one works just - * fine so I am not going to futz around. ;-) + /* Figure out the r4k offset, the algorithm is very simple and works + * in _all_ cases as long as the 8254 counter register itself works ok + * (as an interrupt driving timer it does not because of bug, this is + * why we are using the onchip r4k counter/compare register to serve + * this purpose, but for r4k_offset calculation it will work ok for us). + * There are other very complicated ways of performing this calculation + * but this one works just fine so I am not going to futz around. ;-) */ p = ioc_timers; tcwp = &p->tcword; diff --git a/arch/mips64/sgi-ip22/system.c b/arch/mips64/sgi-ip22/system.c index bd2a313f0..ce8b81085 100644 --- a/arch/mips64/sgi-ip22/system.c +++ b/arch/mips64/sgi-ip22/system.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: system.c,v 1.3 1999/10/19 20:51:52 ralf Exp $ * * 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 @@ -49,7 +49,7 @@ static int __init string_to_cpu(char *s) prom_printf("\nYeee, could not determine MIPS cpu type <%s>\n", s); prom_printf("press a key to reboot\n"); prom_getchar(); - romvec->imode(); + ArcEnterInteractiveMode(); return 0; } @@ -78,7 +78,7 @@ void __init sgi_sysinit(void) prom_printf("\nYeee, SGI MP not ready yet\n"); prom_printf("press a key to reboot\n"); prom_getchar(); - romvec->imode(); + ArcEnterInteractiveMode(); } printk("CPU: %s ", p->iname); cpup = p; @@ -90,7 +90,7 @@ void __init sgi_sysinit(void) prom_printf("\nYeee, could not find cpu ARCS component\n"); prom_printf("press a key to reboot\n"); prom_getchar(); - romvec->imode(); + ArcEnterInteractiveMode(); } p = ArcGetChild(cpup); while(p) { diff --git a/arch/mips64/sgi-ip22/time.c b/arch/mips64/sgi-ip22/time.c index 5d1d907de..27a104d00 100644 --- a/arch/mips64/sgi-ip22/time.c +++ b/arch/mips64/sgi-ip22/time.c @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: time.c,v 1.1 1999/08/20 21:13:34 ralf Exp $ * * 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 |