Import 2.3.9pre5
[davej-history.git] / arch / mips / sni / pcimt_scache.c
blobebbe3011f03a95ccfec41e1f1cd024ea0be631b3
1 /* $Id: pcimt_scache.c,v 1.4 1999/01/04 16:03:59 ralf Exp $
3 * arch/mips/sni/pcimt_scache.c
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License. See the file "COPYING" in the main directory of this archive
7 * for more details.
9 * Copyright (c) 1997, 1998 by Ralf Baechle
11 #include <linux/init.h>
12 #include <linux/kernel.h>
13 #include <asm/bcache.h>
14 #include <asm/sni.h>
16 #define cacheconf (*(volatile unsigned int *)PCIMT_CACHECONF)
17 #define invspace (*(volatile unsigned int *)PCIMT_INVSPACE)
19 __initfunc(void sni_pcimt_sc_init(void))
21 unsigned int scsiz, sc_size;
23 scsiz = cacheconf & 7;
24 if (scsiz == 0) {
25 printk("Second level cache is deactived.\n");
26 return;
28 if (scsiz >= 6) {
29 printk("Invalid second level cache size configured, "
30 "deactivating second level cache.\n");
31 cacheconf = 0;
32 return;
35 sc_size = 128 << scsiz;
36 printk("%dkb second level cache detected, deactivating.\n", sc_size);
37 cacheconf = 0;