This source file includes following definitions.
- cpu_probe
1
2
3
4
5
6
7
8
9
10 #include <linux/init.h>
11 #include <linux/io.h>
12 #include <linux/string.h>
13 #include <asm/processor.h>
14 #include <asm/cache.h>
15 #include <asm/tlb.h>
16
17 void cpu_probe(void)
18 {
19 unsigned long long cir;
20
21
22
23
24
25
26
27 cir = peek_real_address_q(0x0d000008);
28 if ((cir & 0xffff) == 0x5103)
29 boot_cpu_data.type = CPU_SH5_103;
30 else if (((cir >> 32) & 0xffff) == 0x51e2)
31
32 boot_cpu_data.type = CPU_SH5_101;
33
34 boot_cpu_data.family = CPU_FAMILY_SH5;
35
36
37
38
39 boot_cpu_data.icache.ways = 4;
40 boot_cpu_data.icache.sets = 256;
41 boot_cpu_data.icache.linesz = L1_CACHE_BYTES;
42 boot_cpu_data.icache.way_incr = (1 << 13);
43 boot_cpu_data.icache.entry_shift = 5;
44 boot_cpu_data.icache.way_size = boot_cpu_data.icache.sets *
45 boot_cpu_data.icache.linesz;
46 boot_cpu_data.icache.entry_mask = 0x1fe0;
47 boot_cpu_data.icache.flags = 0;
48
49
50
51
52
53
54
55
56
57
58
59 boot_cpu_data.dcache = boot_cpu_data.icache;
60
61
62
63
64 #if defined(CONFIG_CACHE_WRITETHROUGH)
65 set_bit(SH_CACHE_MODE_WT, &(boot_cpu_data.dcache.flags));
66 #elif defined(CONFIG_CACHE_WRITEBACK)
67 set_bit(SH_CACHE_MODE_WB, &(boot_cpu_data.dcache.flags));
68 #endif
69
70
71 sh64_tlb_init();
72 }