summaryrefslogtreecommitdiffstats
path: root/arch/mips/sni/pcimt_scache.c
blob: 8c19fb623e99f0586c7a56d08474a7bf722a521e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * arch/mips/sni/pcimt_scache.c
 *
 * 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) 1997 by Ralf Baechle
 *
 * $Id: pcimt_scache.c,v 1.1 1997/12/20 13:13:40 ralf Exp $
 */
#include <linux/init.h>
#include <asm/bcache.h>
#include <asm/sni.h>

__initfunc(void sni_pcimt_sc_init(void))
{
	unsigned int cacheconf, sc_size;

	cacheconf = *(volatile unsigned int *)PCIMT_CACHECONF;
	if ((cacheconf & 7) == 0) {
		printk("No second level cache detected\n");
		printk("WARNING: not activating second level cache, "
		       "tell ralf@gnu.org\n");
		return;
	}
	if ((cacheconf & 7) >= 6) {
		printk("Invalid second level cache size detected\n");
		return;
	}
	
	sc_size = 128 << (cacheconf & 7);
	printk("%dkb second level cache detected.\n", sc_size);
}