add XScale support to -ng
[openwrt.git] / target / linux / brcm63xx-2.6 / patches / 000-arch_mips.patch
1 --- linux-2.6.17/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200
2 +++ linux-2.6.17-brcm63xx/arch/mips/Kconfig 2006-07-13 19:08:11.000000000 +0200
3 @@ -12,6 +12,15 @@
4 prompt "System type"
5 default SGI_IP22
6
7 +config MIPS_BRCM
8 + bool "Support for the Broadcom boards"
9 + select SYS_SUPPORTS_32BIT_KERNEL
10 + select SYS_SUPPORTS_BIG_ENDIAN
11 + select SYS_HAS_CPU_MIPS32_R1
12 + select IRQ_CPU
13 + help
14 + This is a fmaily of boards based on the Broadcom MIPS32
15 +
16 config MIPS_MTX1
17 bool "4G Systems MTX-1 board"
18 select DMA_NONCOHERENT
19 @@ -780,6 +789,7 @@
20
21 endchoice
22
23 +source "arch/mips/brcm-boards/bcm963xx/Kconfig"
24 source "arch/mips/ddb5xxx/Kconfig"
25 source "arch/mips/gt64120/ev64120/Kconfig"
26 source "arch/mips/jazz/Kconfig"
27 --- linux-2.6.17/arch/mips/Makefile 2006-06-18 03:49:35.000000000 +0200
28 +++ linux-2.6.17-brcm63xx/arch/mips/Makefile 2006-07-13 18:55:59.000000000 +0200
29 @@ -145,6 +145,20 @@
30 #
31
32 #
33 +# Broadcom board
34 +#
35 +core-$(CONFIG_MIPS_BRCM) += arch/mips/brcm-boards/generic/ arch/mips/brcm-boards/bcm963xx/
36 +core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/serial/impl1/
37 +#core-$(CONFIG_MIPS_BRCM) += bcmdrivers/opensource/char/board/bcm963xx/impl1/
38 +#core-$(CONFIG_MIPS_BRCM) += boardparms/bcm963xx/
39 +cflags-$(CONFIG_MIPS_BRCM) += -Iinclude/asm-mips/mach-bcm963xx
40 +cflags-$(CONFIG_MIPS_BRCM) += -Iarch/mips/brcm-boards/generic/include
41 +cflags-$(CONFIG_MIPS_BRCM) += -Ibcmdrivers/opensource/include/bcm963xx
42 +cflags-$(CONFIG_MIPS_BRCM) += -Iboardparms/bcm963xx
43 +load-$(CONFIG_MIPS_BRCM) += 0xffffffff80010000
44 +
45 +
46 +#
47 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
48 #
49 core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/
50 diff -urN linux-2.6.17/arch/mips/kernel/cpu-probe.c linux-2.6.17-brcm63xx/arch/mips/kernel/cpu-probe.c
51 --- linux-2.6.17/arch/mips/kernel/cpu-probe.c 2006-06-18 03:49:35.000000000 +0200
52 +++ linux-2.6.17-brcm63xx/arch/mips/kernel/cpu-probe.c 2006-07-13 18:59:04.000000000 +0200
53 @@ -568,6 +568,25 @@
54 return;
55 }
56
57 +static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
58 +{
59 + decode_configs(c);
60 + switch (c->processor_id & 0xff00) {
61 + case PRID_IMP_BCM6338:
62 + c->cputype = CPU_BCM6338;
63 + break;
64 + case PRID_IMP_BCM6345:
65 + c->cputype = CPU_BCM6345;
66 + break;
67 + case PRID_IMP_BCM6348:
68 + c->cputype = CPU_BCM6348;
69 + break;
70 + default:
71 + c->cputype = CPU_UNKNOWN;
72 + break;
73 + }
74 +}
75 +
76 static inline void cpu_probe_mips(struct cpuinfo_mips *c)
77 {
78 decode_configs(c);
79 @@ -704,6 +723,9 @@
80 case PRID_COMP_LEGACY:
81 cpu_probe_legacy(c);
82 break;
83 + case PRID_COMP_BROADCOM:
84 + cpu_probe_broadcom(c);
85 + break;
86 case PRID_COMP_MIPS:
87 cpu_probe_mips(c);
88 break;
89 diff -urN linux-2.6.17/arch/mips/kernel/proc.c linux-2.6.17-brcm63xx/arch/mips/kernel/proc.c
90 --- linux-2.6.17/arch/mips/kernel/proc.c 2006-06-18 03:49:35.000000000 +0200
91 +++ linux-2.6.17-brcm63xx/arch/mips/kernel/proc.c 2006-07-13 19:00:53.000000000 +0200
92 @@ -85,6 +85,9 @@
93 [CPU_VR4181A] = "NEC VR4181A",
94 [CPU_SR71000] = "Sandcraft SR71000",
95 [CPU_PR4450] = "Philips PR4450",
96 + [CPU_BCM6338] = "BCM6338",
97 + [CPU_BCM6345] = "BCM6345",
98 + [CPU_BCM6348] = "BCM6348",
99 };
100
101
102 diff -urN linux-2.6.17/arch/mips/mm/c-r4k.c linux-2.6.17-brcm63xx/arch/mips/mm/c-r4k.c
103 --- linux-2.6.17/arch/mips/mm/c-r4k.c 2006-06-18 03:49:35.000000000 +0200
104 +++ linux-2.6.17-brcm63xx/arch/mips/mm/c-r4k.c 2006-07-13 19:03:23.000000000 +0200
105 @@ -914,6 +914,13 @@
106 if (!(config & MIPS_CONF_M))
107 panic("Don't know how to probe P-caches on this cpu.");
108
109 + if (c->cputype == CPU_BCM6338 || c->cputype == CPU_BCM6345 || c->cputype == CPU_BCM6348)
110 + {
111 + printk("brcm mips: enabling icache and dcache...\n");
112 + /* Enable caches */
113 + write_c0_diag(read_c0_diag() | 0xC0000000);
114 + }
115 +
116 /*
117 * So we seem to be a MIPS32 or MIPS64 CPU
118 * So let's probe the I-cache ...
119 diff -urN linux-2.6.17/arch/mips/mm/tlbex.c linux-2.6.17-brcm63xx/arch/mips/mm/tlbex.c
120 --- linux-2.6.17/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200
121 +++ linux-2.6.17-brcm63xx/arch/mips/mm/tlbex.c 2006-07-13 19:03:57.000000000 +0200
122 @@ -882,6 +882,9 @@
123 case CPU_4KSC:
124 case CPU_20KC:
125 case CPU_25KF:
126 + case CPU_BCM6338:
127 + case CPU_BCM6345:
128 + case CPU_BCM6348:
129 tlbw(p);
130 break;
131
This page took 0.053762 seconds and 5 git commands to generate.