12 #include <linux/kernel.h>
13 #include <linux/ptrace.h>
14 #include <linux/stddef.h>
25 #define SPRAM_TAG0_ENABLE 0x00000080
26 #define SPRAM_TAG0_PA_MASK 0xfffff000
27 #define SPRAM_TAG1_SIZE_MASK 0xfffff000
29 #define SPRAM_TAG_STRIDE 8
31 #define ERRCTL_SPRAM (1 << 28)
34 #define read_c0_errctl(x) read_c0_ecc(x)
35 #define write_c0_errctl(x) write_c0_ecc(x)
40 static __cpuinit unsigned int bis_c0_errctl(
unsigned int set)
120 unsigned int (*
read)(
unsigned int),
121 void (*
write)(
unsigned int,
unsigned int))
123 unsigned int firstsize = 0, lastsize = 0;
124 unsigned int firstpa = 0, lastpa = 0, pa = 0;
135 for (i = 0; i < 8; i++) {
138 pr_debug(
"DBG %s%d: tag0=%08x tag1=%08x\n",
139 type, i, tag0, tag1);
148 if ((pa == firstpa && size == firstsize) ||
149 (pa == lastpa && size == lastsize))
154 base = (base + size - 1) & ~(size-1);
175 if (
strcmp(type,
"DSPRAM") == 0) {
176 unsigned int *vp = (
unsigned int *)(
CKSEG1 | pa);
178 #define TDAT 0x5a5aa5a5
194 pr_info(
"%s%d: PA=%08x,Size=%08x%s\n",
195 type, i, pa, size, enabled ?
",enabled" :
"");
202 unsigned int config0;
211 if (config0 & (1<<24)) {
212 probe_spram(
"ISPRAM", 0x1c000000,
213 &ispram_load_tag, &ispram_store_tag);
215 if (config0 & (1<<23))
216 probe_spram(
"DSPRAM", 0x1c100000,
217 &dspram_load_tag, &dspram_store_tag);