brcm63xx: add preliminary support for 3.13
[openwrt.git] / target / linux / brcm63xx / patches-3.13 / 010-MIPS-BMIPS-merge-CPU-options-into-one-option.patch
1 From 81d6f5e024884ce904b7bd36fec60291d751df48 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jogo@openwrt.org>
3 Date: Thu, 27 Jun 2013 23:57:20 +0200
4 Subject: [PATCH V2 04/13] MIPS: BMIPS: merge CPU options into one option
5
6 Instead of treating each flavour as an exclusive CPU to select, make
7 BMIPS the only option and let SYS_HAS_CPU_BMIPS* decide for which
8 flavours to include support.
9
10 Run tested on BMIPS3300 and BMIPS4350, only build tested for BMIPS4380
11 and BMIPS5000.
12
13 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
14 ---
15 V1 -> V2:
16  * Let the SYS_HAS_CPU_BMIPS* symbols select SYS_HAS_CPU_BMIPS instead of
17    requiring users to select it
18
19  arch/mips/Kconfig | 80 +++++++++++++++++++++++++++----------------------------
20  1 file changed, 39 insertions(+), 41 deletions(-)
21
22 --- a/arch/mips/Kconfig
23 +++ b/arch/mips/Kconfig
24 @@ -1396,41 +1396,21 @@ config CPU_CAVIUM_OCTEON
25           can have up to 16 Mips64v2 cores and 8 integrated gigabit ethernets.
26           Full details can be found at http://www.caviumnetworks.com.
27  
28 -config CPU_BMIPS3300
29 -       bool "BMIPS3300"
30 -       depends on SYS_HAS_CPU_BMIPS3300
31 -       select CPU_BMIPS
32 -       help
33 -         Broadcom BMIPS3300 processors.
34 -
35 -config CPU_BMIPS4350
36 -       bool "BMIPS4350"
37 -       depends on SYS_HAS_CPU_BMIPS4350
38 -       select CPU_BMIPS
39 -       select SYS_SUPPORTS_SMP
40 -       select SYS_SUPPORTS_HOTPLUG_CPU
41 -       help
42 -         Broadcom BMIPS4350 ("VIPER") processors.
43 -
44 -config CPU_BMIPS4380
45 -       bool "BMIPS4380"
46 -       depends on SYS_HAS_CPU_BMIPS4380
47 -       select CPU_BMIPS
48 -       select SYS_SUPPORTS_SMP
49 -       select SYS_SUPPORTS_HOTPLUG_CPU
50 -       help
51 -         Broadcom BMIPS4380 processors.
52 -
53 -config CPU_BMIPS5000
54 -       bool "BMIPS5000"
55 -       depends on SYS_HAS_CPU_BMIPS5000
56 -       select CPU_BMIPS
57 -       select CPU_SUPPORTS_HIGHMEM
58 -       select MIPS_CPU_SCACHE
59 -       select SYS_SUPPORTS_SMP
60 -       select SYS_SUPPORTS_HOTPLUG_CPU
61 +config CPU_BMIPS
62 +       bool "Broadcom BMIPS"
63 +       depends on SYS_HAS_CPU_BMIPS
64 +       select CPU_MIPS32
65 +       select CPU_BMIPS3300 if SYS_HAS_CPU_BMIPS3300
66 +       select CPU_BMIPS4350 if SYS_HAS_CPU_BMIPS4350
67 +       select CPU_BMIPS4380 if SYS_HAS_CPU_BMIPS4380
68 +       select CPU_BMIPS5000 if SYS_HAS_CPU_BMIPS5000
69 +       select CPU_SUPPORTS_32BIT_KERNEL
70 +       select DMA_NONCOHERENT
71 +       select IRQ_CPU
72 +       select SWAP_IO_SPACE
73 +       select WEAK_ORDERING
74         help
75 -         Broadcom BMIPS5000 processors.
76 +         Support for BMIPS3300/4350/4380 and BMIPS5000 processors.
77  
78  config CPU_XLR
79         bool "Netlogic XLR SoC"
80 @@ -1513,14 +1493,25 @@ config CPU_LOONGSON1
81         select CPU_SUPPORTS_32BIT_KERNEL
82         select CPU_SUPPORTS_HIGHMEM
83  
84 -config CPU_BMIPS
85 +config CPU_BMIPS3300
86         bool
87 -       select CPU_MIPS32
88 -       select CPU_SUPPORTS_32BIT_KERNEL
89 -       select DMA_NONCOHERENT
90 -       select IRQ_CPU
91 -       select SWAP_IO_SPACE
92 -       select WEAK_ORDERING
93 +
94 +config CPU_BMIPS4350
95 +       bool
96 +       select SYS_SUPPORTS_SMP
97 +       select SYS_SUPPORTS_HOTPLUG_CPU
98 +
99 +config CPU_BMIPS4380
100 +       bool
101 +       select SYS_SUPPORTS_SMP
102 +       select SYS_SUPPORTS_HOTPLUG_CPU
103 +
104 +config CPU_BMIPS5000
105 +       bool
106 +       select CPU_SUPPORTS_HIGHMEM
107 +       select MIPS_CPU_SCACHE
108 +       select SYS_SUPPORTS_SMP
109 +       select SYS_SUPPORTS_HOTPLUG_CPU
110  
111  config SYS_HAS_CPU_LOONGSON2E
112         bool
113 @@ -1594,17 +1585,24 @@ config SYS_HAS_CPU_SB1
114  config SYS_HAS_CPU_CAVIUM_OCTEON
115         bool
116  
117 +config SYS_HAS_CPU_BMIPS
118 +       bool
119 +
120  config SYS_HAS_CPU_BMIPS3300
121         bool
122 +       select SYS_HAS_CPU_BMIPS
123  
124  config SYS_HAS_CPU_BMIPS4350
125         bool
126 +       select SYS_HAS_CPU_BMIPS
127  
128  config SYS_HAS_CPU_BMIPS4380
129         bool
130 +       select SYS_HAS_CPU_BMIPS
131  
132  config SYS_HAS_CPU_BMIPS5000
133         bool
134 +       select SYS_HAS_CPU_BMIPS
135  
136  config SYS_HAS_CPU_XLR
137         bool