386c63c1aee75dfbfefadba51c85e8d708444915
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.9 / 104-MIPS-bmips-merge-CPU-options-into-one-option.patch
1 From 1ecac776e6c652e3059d4f4d9dd8369e89ebef81 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 05/10] 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 BMISP5000.
12
13 Signed-off-by: Jonas Gorski <jogo@openwrt.org>
14 ---
15 arch/mips/Kconfig | 77 +++++++++++++++++++++++++----------------------------
16 1 file changed, 36 insertions(+), 41 deletions(-)
17
18 --- a/arch/mips/Kconfig
19 +++ b/arch/mips/Kconfig
20 @@ -130,6 +130,7 @@ config BCM63XX
21 select DMA_NONCOHERENT
22 select IRQ_CPU
23 select SYS_HAS_CPU_MIPS32_R1
24 + select SYS_HAS_CPU_BMIPS
25 select SYS_HAS_CPU_BMIPS4350 if !BCM63XX_CPU_6338 && !BCM63XX_CPU_6345 && !BCM63XX_CPU_6348
26 select NR_CPUS_DEFAULT_2
27 select SYS_SUPPORTS_32BIT_KERNEL
28 @@ -1454,41 +1455,21 @@ config CPU_CAVIUM_OCTEON
29 can have up to 16 Mips64v2 cores and 8 integrated gigabit ethernets.
30 Full details can be found at http://www.caviumnetworks.com.
31
32 -config CPU_BMIPS3300
33 - bool "BMIPS3300"
34 - depends on SYS_HAS_CPU_BMIPS3300
35 - select CPU_BMIPS
36 - help
37 - Broadcom BMIPS3300 processors.
38 -
39 -config CPU_BMIPS4350
40 - bool "BMIPS4350"
41 - depends on SYS_HAS_CPU_BMIPS4350
42 - select CPU_BMIPS
43 - select SYS_SUPPORTS_SMP
44 - select SYS_SUPPORTS_HOTPLUG_CPU
45 - help
46 - Broadcom BMIPS4350 ("VIPER") processors.
47 -
48 -config CPU_BMIPS4380
49 - bool "BMIPS4380"
50 - depends on SYS_HAS_CPU_BMIPS4380
51 - select CPU_BMIPS
52 - select SYS_SUPPORTS_SMP
53 - select SYS_SUPPORTS_HOTPLUG_CPU
54 - help
55 - Broadcom BMIPS4380 processors.
56 -
57 -config CPU_BMIPS5000
58 - bool "BMIPS5000"
59 - depends on SYS_HAS_CPU_BMIPS5000
60 - select CPU_BMIPS
61 - select CPU_SUPPORTS_HIGHMEM
62 - select MIPS_CPU_SCACHE
63 - select SYS_SUPPORTS_SMP
64 - select SYS_SUPPORTS_HOTPLUG_CPU
65 +config CPU_BMIPS
66 + bool "Broadcom BMIPS"
67 + depends on SYS_HAS_CPU_BMIPS
68 + select CPU_MIPS32
69 + select CPU_BMIPS3300 if SYS_HAS_CPU_BMIPS3300
70 + select CPU_BMIPS4350 if SYS_HAS_CPU_BMIPS4350
71 + select CPU_BMIPS4350 if SYS_HAS_CPU_BMIPS4380
72 + select CPU_BMIPS5000 if SYS_HAS_CPU_BMIPS5000
73 + select CPU_SUPPORTS_32BIT_KERNEL
74 + select DMA_NONCOHERENT
75 + select IRQ_CPU
76 + select SWAP_IO_SPACE
77 + select WEAK_ORDERING
78 help
79 - Broadcom BMIPS5000 processors.
80 + Support for BMIPS3300/4350/4380 and BMIPS5000 processors.
81
82 config CPU_XLR
83 bool "Netlogic XLR SoC"
84 @@ -1569,14 +1550,25 @@ config CPU_LOONGSON1
85 select CPU_SUPPORTS_32BIT_KERNEL
86 select CPU_SUPPORTS_HIGHMEM
87
88 -config CPU_BMIPS
89 +config CPU_BMIPS3300
90 bool
91 - select CPU_MIPS32
92 - select CPU_SUPPORTS_32BIT_KERNEL
93 - select DMA_NONCOHERENT
94 - select IRQ_CPU
95 - select SWAP_IO_SPACE
96 - select WEAK_ORDERING
97 +
98 +config CPU_BMIPS4350
99 + bool
100 + select SYS_SUPPORTS_SMP
101 + select SYS_SUPPORTS_HOTPLUG_CPU
102 +
103 +config CPU_BMIPS4380
104 + bool
105 + select SYS_SUPPORTS_SMP
106 + select SYS_SUPPORTS_HOTPLUG_CPU
107 +
108 +config CPU_BMIPS5000
109 + bool
110 + select CPU_SUPPORTS_HIGHMEM
111 + select MIPS_CPU_SCACHE
112 + select SYS_SUPPORTS_SMP
113 + select SYS_SUPPORTS_HOTPLUG_CPU
114
115 config SYS_HAS_CPU_LOONGSON2E
116 bool
117 @@ -1650,6 +1642,9 @@ config SYS_HAS_CPU_SB1
118 config SYS_HAS_CPU_CAVIUM_OCTEON
119 bool
120
121 +config SYS_HAS_CPU_BMIPS
122 + bool
123 +
124 config SYS_HAS_CPU_BMIPS3300
125 bool
126