aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm47xx/setup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-30 20:20:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-30 20:20:32 -0500
commitcdfc83075fb76369a31e6c187d0cebcab9f8b9c8 (patch)
tree33d1cdca3e2cb610451ed30943189f55652bac4c /arch/mips/bcm47xx/setup.c
parent04a24ae45d018e177db7e4ae2d03a70f79149782 (diff)
parentb26a21c1eacdb7daf22a304fa857413df2650cfe (diff)
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle: "The most notable new addition inside this pull request is the support for MIPS's latest and greatest core called "inter/proAptiv". The patch series describes this core as follows. "The interAptiv is a power-efficient multi-core microprocessor for use in system-on-chip (SoC) applications. The interAptiv combines a multi-threading pipeline with a coherence manager to deliver improved computational throughput and power efficiency. The interAptiv can contain one to four MIPS32R3 interAptiv cores, system level coherence manager with L2 cache, optional coherent I/O port, and optional floating point unit." The platform specific patches touch all 3 Broadcom families. It adds support for the new Broadcom/Netlogix XLP9xx Soc, building a common BCM63XX SMP kernel for all BCM63XX SoCs regardless of core type/count and full gpio button/led descriptions for BCM47xx. The rest of the series are cleanups and bug fixes that are MIPS generic and consist largely of changes that Imgtec/MIPS had published in their linux-mti-3.10.git stable tree. Random other cleanups and patches preparing code to be merged in 3.15" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (139 commits) mips: select ARCH_MIGHT_HAVE_PC_SERIO mips: delete non-required instances of include <linux/init.h> MIPS: KVM: remove shadow_tlb code MIPS: KVM: use common EHINV aware UNIQUE_ENTRYHI mips/ide: flush dcache also if icache does not snoop dcache MIPS: BCM47XX: fix position of cpu_wait disabling MIPS: BCM63XX: select correct MIPS_L1_CACHE_SHIFT value MIPS: update MIPS_L1_CACHE_SHIFT based on MIPS_L1_CACHE_SHIFT_<N> MIPS: introduce MIPS_L1_CACHE_SHIFT_<N> MIPS: ZBOOT: gather string functions into string.c arch/mips/pci: don't check resource with devm_ioremap_resource arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource bcma: gpio: don't cast u32 to unsigned long ssb: gpio: add own IRQ domain MIPS: BCM47XX: fix sparse warnings in board.c MIPS: BCM47XX: add board detection for Linksys WRT54GS V1 MIPS: BCM47XX: fix detection for some boards MIPS: BCM47XX: Enable buttons support on SSB MIPS: BCM47XX: Convert WNDR4500 to new syntax MIPS: BCM47XX: Use "timer" trigger for status LEDs ...
Diffstat (limited to 'arch/mips/bcm47xx/setup.c')
-rw-r--r--arch/mips/bcm47xx/setup.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/setup.c b/arch/mips/bcm47xx/setup.c
index 9057728ac56b..025be218ea15 100644
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
@@ -26,6 +26,8 @@
26 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */ 27 */
28 28
29#include "bcm47xx_private.h"
30
29#include <linux/export.h> 31#include <linux/export.h>
30#include <linux/types.h> 32#include <linux/types.h>
31#include <linux/ethtool.h> 33#include <linux/ethtool.h>
@@ -35,6 +37,8 @@
35#include <linux/ssb/ssb_embedded.h> 37#include <linux/ssb/ssb_embedded.h>
36#include <linux/bcma/bcma_soc.h> 38#include <linux/bcma/bcma_soc.h>
37#include <asm/bootinfo.h> 39#include <asm/bootinfo.h>
40#include <asm/idle.h>
41#include <asm/prom.h>
38#include <asm/reboot.h> 42#include <asm/reboot.h>
39#include <asm/time.h> 43#include <asm/time.h>
40#include <bcm47xx.h> 44#include <bcm47xx.h>
@@ -213,12 +217,14 @@ void __init plat_mem_setup(void)
213#ifdef CONFIG_BCM47XX_BCMA 217#ifdef CONFIG_BCM47XX_BCMA
214 bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA; 218 bcm47xx_bus_type = BCM47XX_BUS_TYPE_BCMA;
215 bcm47xx_register_bcma(); 219 bcm47xx_register_bcma();
220 bcm47xx_set_system_type(bcm47xx_bus.bcma.bus.chipinfo.id);
216#endif 221#endif
217 } else { 222 } else {
218 printk(KERN_INFO "bcm47xx: using ssb bus\n"); 223 printk(KERN_INFO "bcm47xx: using ssb bus\n");
219#ifdef CONFIG_BCM47XX_SSB 224#ifdef CONFIG_BCM47XX_SSB
220 bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB; 225 bcm47xx_bus_type = BCM47XX_BUS_TYPE_SSB;
221 bcm47xx_register_ssb(); 226 bcm47xx_register_ssb();
227 bcm47xx_set_system_type(bcm47xx_bus.ssb.chip_id);
222#endif 228#endif
223 } 229 }
224 230
@@ -226,8 +232,34 @@ void __init plat_mem_setup(void)
226 _machine_halt = bcm47xx_machine_halt; 232 _machine_halt = bcm47xx_machine_halt;
227 pm_power_off = bcm47xx_machine_halt; 233 pm_power_off = bcm47xx_machine_halt;
228 bcm47xx_board_detect(); 234 bcm47xx_board_detect();
235 mips_set_machine_name(bcm47xx_board_get_name());
229} 236}
230 237
238static int __init bcm47xx_cpu_fixes(void)
239{
240 switch (bcm47xx_bus_type) {
241#ifdef CONFIG_BCM47XX_SSB
242 case BCM47XX_BUS_TYPE_SSB:
243 /* Nothing to do */
244 break;
245#endif
246#ifdef CONFIG_BCM47XX_BCMA
247 case BCM47XX_BUS_TYPE_BCMA:
248 /* The BCM4706 has a problem with the CPU wait instruction.
249 * When r4k_wait or r4k_wait_irqoff is used will just hang and
250 * not return from a msleep(). Removing the cpu_wait
251 * functionality is a workaround for this problem. The BCM4716
252 * does not have this problem.
253 */
254 if (bcm47xx_bus.bcma.bus.chipinfo.id == BCMA_CHIP_ID_BCM4706)
255 cpu_wait = NULL;
256 break;
257#endif
258 }
259 return 0;
260}
261arch_initcall(bcm47xx_cpu_fixes);
262
231static struct fixed_phy_status bcm47xx_fixed_phy_status __initdata = { 263static struct fixed_phy_status bcm47xx_fixed_phy_status __initdata = {
232 .link = 1, 264 .link = 1,
233 .speed = SPEED_100, 265 .speed = SPEED_100,
@@ -248,6 +280,9 @@ static int __init bcm47xx_register_bus_complete(void)
248 break; 280 break;
249#endif 281#endif
250 } 282 }
283 bcm47xx_buttons_register();
284 bcm47xx_leds_register();
285
251 fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status); 286 fixed_phy_add(PHY_POLL, 0, &bcm47xx_fixed_phy_status);
252 return 0; 287 return 0;
253} 288}