Update of /cvsroot/linux-mips/linux/arch/mips/cobalt
In directory usw-pr-cvs1:/tmp/cvs-serv23204/arch/mips/cobalt
Modified Files:
reset.c
Log Message:
Most of it was a collection of fixes and cleanups for mips64 and SMP stuff
Index: reset.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/cobalt/reset.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- reset.c 9 Jul 2001 21:50:55 -0000 1.2
+++ reset.c 26 Feb 2002 17:34:14 -0000 1.3
@@ -1,5 +1,13 @@
/*
- * Reset a Cobalt Qube.
+ * Cobalt Reset operations
+ *
+ * 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) 1995, 1996, 1997 by Ralf Baechle
+ * Copyright (C) 2001 by Liam Davies (ld...@ag...)
+ *
*/
#include <linux/config.h>
#include <linux/sched.h>
@@ -15,41 +23,41 @@
{
*(volatile char *)0xbc000000 = 0x0f;
- /*
- * Ouch, we're still alive ... This time we take the silver bullet ...
- * ... and find that we leave the hardware in a state in which the
- * kernel in the flush locks up somewhen during of after the PCI
- * detection stuff.
- */
- set_cp0_status(ST0_BEV | ST0_ERL);
- set_cp0_config(CONF_CM_UNCACHED);
- flush_cache_all();
- write_32bit_cp0_register(CP0_WIRED, 0);
- __asm__ __volatile__(
- "jr\t%0"
- :
- : "r" (0xbfc00000));
+ /*
+ * Ouch, we're still alive ... This time we take the silver bullet ...
+ * ... and find that we leave the hardware in a state in which the
+ * kernel in the flush locks up somewhen during of after the PCI
+ * detection stuff.
+ */
+ set_cp0_status(ST0_BEV | ST0_ERL);
+ change_cp0_config(CONF_CM_CMASK, CONF_CM_UNCACHED);
+ flush_cache_all();
+ write_32bit_cp0_register(CP0_WIRED, 0);
+ __asm__ __volatile__(
+ "jr\t%0"
+ :
+ : "r" (0xbfc00000));
}
extern int led_state;
#define kLED 0xBC000000
-#define LEDSet(x) (*(volatile unsigned char *) kLED) = ((unsigned char)x)
+#define LEDSet(x) (*(volatile unsigned char *) kLED) = (( unsigned char)x)
void cobalt_machine_halt(void)
{
- int mark;
+ int mark;
- // Blink our cute little LED (number 3)...
- while (1) {
- led_state = led_state | ( 1 << 3 );
- LEDSet(led_state);
- mark = jiffies;
- while (jiffies<(mark+HZ));
- led_state = led_state & ~( 1 << 3 );
- LEDSet(led_state);
- mark = jiffies;
- while (jiffies<(mark+HZ));
- }
+ /* Blink our cute? little LED (number 3)... */
+ while (1) {
+ led_state = led_state | ( 1 << 3 );
+ LEDSet(led_state);
+ mark = jiffies;
+ while (jiffies<(mark+HZ));
+ led_state = led_state & ~( 1 << 3 );
+ LEDSet(led_state);
+ mark = jiffies;
+ while (jiffies<(mark+HZ));
+ }
}
/*
@@ -57,6 +65,6 @@
*/
void cobalt_machine_power_off(void)
{
- printk("You can switch the machine off now.\n");
- cobalt_machine_halt();
+ printk("You can switch the machine off now.\n");
+ cobalt_machine_halt();
}
|