aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/common/setup.c
diff options
context:
space:
mode:
authorManuel Lauss <mano@roarinelk.homelinux.net>2008-12-21 03:26:21 -0500
committerRalf Baechle <ralf@linux-mips.org>2009-01-11 04:57:26 -0500
commit074cf656700ddd1d2bd7f815f78e785418beb898 (patch)
treeaf55e5f9d36775df851924303e44fdde7cff8654 /arch/mips/alchemy/common/setup.c
parent1820ec1d2b993f3ec00169e881504aa4541a9bf7 (diff)
MIPS: Alchemy: remove cpu_table.
Remove the cpu_table: - move detection of whether c0_config[OD] is read-only and should be set to fix various chip errata to au1000 headers. - move detection of write-only sys_cpupll to au1000 headers. - remove the BCLK switching code: Activation of this features should be left to the boards using the chips since it also affects external devices tied to BCLK, and only the board designers know whether it is safe to enable. Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> delete mode 100644 arch/mips/alchemy/common/cputable.c
Diffstat (limited to 'arch/mips/alchemy/common/setup.c')
-rw-r--r--arch/mips/alchemy/common/setup.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c
index 9889ec3ba4c4..4d42be811e7f 100644
--- a/arch/mips/alchemy/common/setup.c
+++ b/arch/mips/alchemy/common/setup.c
@@ -44,37 +44,13 @@ extern void set_cpuspec(void);
44 44
45void __init plat_mem_setup(void) 45void __init plat_mem_setup(void)
46{ 46{
47 struct cpu_spec *sp;
48 unsigned long prid, cpufreq, bclk;
49
50 set_cpuspec();
51 sp = cur_cpu_spec[0];
52
53 _machine_restart = au1000_restart; 47 _machine_restart = au1000_restart;
54 _machine_halt = au1000_halt; 48 _machine_halt = au1000_halt;
55 pm_power_off = au1000_power_off; 49 pm_power_off = au1000_power_off;
56 50
57 board_setup(); /* board specific setup */ 51 board_setup(); /* board specific setup */
58 52
59 prid = read_c0_prid(); 53 if (au1xxx_cpu_needs_config_od())
60 if (sp->cpu_pll_wo)
61#ifdef CONFIG_SOC_AU1000_FREQUENCY
62 cpufreq = CONFIG_SOC_AU1000_FREQUENCY / 1000000;
63#else
64 cpufreq = 396;
65#endif
66 else
67 cpufreq = (au_readl(SYS_CPUPLL) & 0x3F) * 12;
68 printk(KERN_INFO "(PRID %08lx) @ %ld MHz\n", prid, cpufreq);
69
70 if (sp->cpu_bclk) {
71 /* Enable BCLK switching */
72 bclk = au_readl(SYS_POWERCTRL);
73 au_writel(bclk | 0x60, SYS_POWERCTRL);
74 printk(KERN_INFO "BCLK switching enabled!\n");
75 }
76
77 if (sp->cpu_od)
78 /* Various early Au1xx0 errata corrected by this */ 54 /* Various early Au1xx0 errata corrected by this */
79 set_c0_config(1 << 19); /* Set Config[OD] */ 55 set_c0_config(1 << 19); /* Set Config[OD] */
80 else 56 else