summaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi/prom
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-04 08:47:27 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-04 08:47:27 +0000
commit2bcf5c9ad01156ed4973c0d16cccf9d84062622d (patch)
treebc31972c7465054b4e82778a6e37d6fcf80884a1 /arch/mips/sgi/prom
parent664937a3d90d3e11b486b2c019041dc901d2893f (diff)
More Second level cache changes. Guess now you understand why I said
it's not sooo trivial ...
Diffstat (limited to 'arch/mips/sgi/prom')
-rw-r--r--arch/mips/sgi/prom/misc.c53
1 files changed, 11 insertions, 42 deletions
diff --git a/arch/mips/sgi/prom/misc.c b/arch/mips/sgi/prom/misc.c
index 53ee61cfe..b6ccd60c1 100644
--- a/arch/mips/sgi/prom/misc.c
+++ b/arch/mips/sgi/prom/misc.c
@@ -6,6 +6,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
+#include <asm/bcache.h>
#include <asm/sgialib.h>
#include <asm/bootinfo.h>
#include <asm/system.h>
@@ -15,91 +16,59 @@ extern int initialize_kbd(void);
extern void *sgiwd93_host;
extern void reset_wd33c93(void *instance);
-static inline void shutoff_r4600_cache(void)
-{
- unsigned long tmp1, tmp2, tmp3;
-
- if(mips_cputype != CPU_R4600 &&
- mips_cputype != CPU_R4640 &&
- mips_cputype != CPU_R4700)
- return;
- printk("Disabling R4600 SCACHE\n");
- __asm__ __volatile__("
- .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 mips2
- .set reorder
- " : "=r" (tmp1), "=r" (tmp2), "=r" (tmp3));
-}
-
void prom_halt(void)
{
- shutoff_r4600_cache();
+ bcops->bc_disable();
initialize_kbd();
+ cli();
#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- cli();
romvec->halt();
}
void prom_powerdown(void)
{
- shutoff_r4600_cache();
+ bcops->bc_disable();
initialize_kbd();
+ cli();
#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- cli();
romvec->pdown();
}
/* XXX is this a soft reset basically? XXX */
void prom_restart(void)
{
- shutoff_r4600_cache();
+ bcops->bc_disable();
initialize_kbd();
+ cli();
#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- cli();
romvec->restart();
}
void prom_reboot(void)
{
- shutoff_r4600_cache();
+ bcops->bc_disable();
initialize_kbd();
+ cli();
#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- cli();
romvec->reboot();
}
void prom_imode(void)
{
- shutoff_r4600_cache();
+ bcops->bc_disable();
initialize_kbd();
+ cli();
#if CONFIG_SCSI_SGIWD93
reset_wd33c93(sgiwd93_host);
#endif
- cli();
romvec->imode();
}