This source file includes following definitions.
- prom_init
- prom_free_prom_memory
1
2
3
4
5
6
7
8
9 #include <linux/init.h>
10 #include <linux/memblock.h>
11 #include <linux/smp.h>
12 #include <asm/bootinfo.h>
13 #include <asm/bmips.h>
14 #include <asm/smp-ops.h>
15 #include <asm/mipsregs.h>
16 #include <bcm63xx_board.h>
17 #include <bcm63xx_cpu.h>
18 #include <bcm63xx_io.h>
19 #include <bcm63xx_regs.h>
20
21 void __init prom_init(void)
22 {
23 u32 reg, mask;
24
25 bcm63xx_cpu_init();
26
27
28 bcm_wdt_writel(WDT_STOP_1, WDT_CTL_REG);
29 bcm_wdt_writel(WDT_STOP_2, WDT_CTL_REG);
30
31
32 if (BCMCPU_IS_3368())
33 mask = CKCTL_3368_ALL_SAFE_EN;
34 else if (BCMCPU_IS_6328())
35 mask = CKCTL_6328_ALL_SAFE_EN;
36 else if (BCMCPU_IS_6338())
37 mask = CKCTL_6338_ALL_SAFE_EN;
38 else if (BCMCPU_IS_6345())
39 mask = CKCTL_6345_ALL_SAFE_EN;
40 else if (BCMCPU_IS_6348())
41 mask = CKCTL_6348_ALL_SAFE_EN;
42 else if (BCMCPU_IS_6358())
43 mask = CKCTL_6358_ALL_SAFE_EN;
44 else if (BCMCPU_IS_6362())
45 mask = CKCTL_6362_ALL_SAFE_EN;
46 else if (BCMCPU_IS_6368())
47 mask = CKCTL_6368_ALL_SAFE_EN;
48 else
49 mask = 0;
50
51 reg = bcm_perf_readl(PERF_CKCTL_REG);
52 reg &= ~mask;
53 bcm_perf_writel(reg, PERF_CKCTL_REG);
54
55
56 board_prom_init();
57
58
59 if (!register_bmips_smp_ops()) {
60
61
62
63
64
65 if (BCMCPU_IS_6328()) {
66 reg = bcm_readl(BCM_6328_OTP_BASE +
67 OTP_USER_BITS_6328_REG(3));
68
69 if (reg & OTP_6328_REG3_TP1_DISABLED)
70 bmips_smp_enabled = 0;
71 } else if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) {
72 bmips_smp_enabled = 0;
73 }
74
75 if (!bmips_smp_enabled)
76 return;
77
78
79
80
81
82
83
84
85
86
87 memcpy((void *)0xa0000200, bmips_smp_movevec, 0x20);
88 __sync();
89 set_c0_cause(C_SW0);
90 cpumask_set_cpu(1, &bmips_booted_mask);
91
92
93
94
95 }
96 }
97
98 void __init prom_free_prom_memory(void)
99 {
100 }