File tree Expand file tree Collapse file tree 8 files changed +24
-4
lines changed
Expand file tree Collapse file tree 8 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 3232#include <linux/ssb/ssb_driver_chipcommon.h>
3333#include <linux/ssb/ssb_regs.h>
3434#include <linux/smp.h>
35+ #include <asm/bmips.h>
3536#include <asm/bootinfo.h>
3637#include <bcm47xx.h>
3738#include <bcm47xx_board.h>
@@ -110,6 +111,8 @@ static __init void prom_init_mem(void)
110111
111112void __init prom_init (void )
112113{
114+ /* Cache CBR addr before CPU/DMA setup */
115+ bmips_cbr_addr = BMIPS_GET_CBR ();
113116 prom_init_mem ();
114117 setup_8250_early_printk_port (CKSEG1ADDR (BCM47XX_SERIAL_ADDR ), 0 , 0 );
115118}
Original file line number Diff line number Diff line change 3737#include <linux/ssb/ssb.h>
3838#include <linux/ssb/ssb_embedded.h>
3939#include <linux/bcma/bcma_soc.h>
40+ #include <asm/bmips.h>
4041#include <asm/bootinfo.h>
4142#include <asm/idle.h>
4243#include <asm/prom.h>
4546#include <bcm47xx.h>
4647#include <bcm47xx_board.h>
4748
49+ /* CBR addr doesn't change and we can cache it */
50+ void __iomem * bmips_cbr_addr __read_mostly ;
51+
4852union bcm47xx_bus bcm47xx_bus ;
4953EXPORT_SYMBOL (bcm47xx_bus );
5054
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ void __init prom_init(void)
2222{
2323 u32 reg , mask ;
2424
25+ /* Cache CBR addr before CPU/DMA setup */
26+ bmips_cbr_addr = BMIPS_GET_CBR ();
27+
2528 bcm63xx_cpu_init ();
2629
2730 /* stop any running watchdog */
Original file line number Diff line number Diff line change 1212#include <linux/memblock.h>
1313#include <linux/ioport.h>
1414#include <linux/pm.h>
15+ #include <asm/bmips.h>
1516#include <asm/bootinfo.h>
1617#include <asm/time.h>
1718#include <asm/reboot.h>
2223#include <bcm63xx_io.h>
2324#include <bcm63xx_gpio.h>
2425
26+ /* CBR addr doesn't change and we can cache it */
27+ void __iomem * bmips_cbr_addr __read_mostly ;
28+
2529void bcm63xx_machine_halt (void )
2630{
2731 pr_info ("System halted\n" );
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ bool bmips_rac_flush_disable;
99
1010void arch_sync_dma_for_cpu_all (void )
1111{
12- void __iomem * cbr = BMIPS_GET_CBR () ;
12+ void __iomem * cbr = bmips_cbr_addr ;
1313 u32 cfg ;
1414
1515 if (boot_cpu_type () != CPU_BMIPS3300 &&
Original file line number Diff line number Diff line change 3434#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))
3535#define BCM6328_TP1_DISABLED BIT(9)
3636
37+ /* CBR addr doesn't change and we can cache it */
38+ void __iomem * bmips_cbr_addr __read_mostly ;
39+
3740extern bool bmips_rac_flush_disable ;
3841
3942static const unsigned long kbase = VMLINUX_LOAD_ADDRESS & 0xfff00000 ;
@@ -111,7 +114,7 @@ static void bcm6358_quirks(void)
111114 * because the bootloader is not initializing it properly.
112115 */
113116 bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local () & (1 << 31 )) ||
114- !!BMIPS_GET_CBR () ;
117+ !!bmips_cbr_addr ;
115118}
116119
117120static void bcm6368_quirks (void )
@@ -144,6 +147,8 @@ static void __init bmips_init_cfe(void)
144147
145148void __init prom_init (void )
146149{
150+ /* Cache CBR addr before CPU/DMA setup */
151+ bmips_cbr_addr = BMIPS_GET_CBR ();
147152 bmips_init_cfe ();
148153 bmips_cpu_setup ();
149154 register_bmips_smp_ops ();
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ extern char bmips_smp_movevec[];
8181extern char bmips_smp_int_vec [];
8282extern char bmips_smp_int_vec_end [];
8383
84+ extern void __iomem * bmips_cbr_addr ;
8485extern int bmips_smp_enabled ;
8586extern int bmips_cpu_offset ;
8687extern cpumask_t bmips_booted_mask ;
Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ static void bmips_set_reset_vec(int cpu, u32 val)
518518 info .val = val ;
519519 bmips_set_reset_vec_remote (& info );
520520 } else {
521- void __iomem * cbr = BMIPS_GET_CBR () ;
521+ void __iomem * cbr = bmips_cbr_addr ;
522522
523523 if (cpu == 0 )
524524 __raw_writel (val , cbr + BMIPS_RELO_VECTOR_CONTROL_0 );
@@ -591,7 +591,7 @@ asmlinkage void __weak plat_wired_tlb_setup(void)
591591
592592void bmips_cpu_setup (void )
593593{
594- void __iomem __maybe_unused * cbr = BMIPS_GET_CBR () ;
594+ void __iomem __maybe_unused * cbr = bmips_cbr_addr ;
595595 u32 __maybe_unused cfg ;
596596
597597 switch (current_cpu_type ()) {
You can’t perform that action at this time.
0 commit comments