aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mti-malta/malta-setup.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-04-14 10:44:42 -0400
committerIngo Molnar <mingo@kernel.org>2014-04-14 10:44:42 -0400
commit740c699a8d316c8bf8593f19e2ca47795e690622 (patch)
treea78886955770a477945c5d84e06b2e7678733b54 /arch/mips/mti-malta/malta-setup.c
parente69af4657e7764d03ad555f0b583d9c4217bcefa (diff)
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
Merge tag 'v3.15-rc1' into perf/urgent
Pick up the latest fixes. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/mips/mti-malta/malta-setup.c')
-rw-r--r--arch/mips/mti-malta/malta-setup.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
index c72a06936781..bf621516afff 100644
--- a/arch/mips/mti-malta/malta-setup.c
+++ b/arch/mips/mti-malta/malta-setup.c
@@ -26,12 +26,12 @@
26#include <linux/time.h> 26#include <linux/time.h>
27 27
28#include <asm/fw/fw.h> 28#include <asm/fw/fw.h>
29#include <asm/mips-cm.h>
29#include <asm/mips-boards/generic.h> 30#include <asm/mips-boards/generic.h>
30#include <asm/mips-boards/malta.h> 31#include <asm/mips-boards/malta.h>
31#include <asm/mips-boards/maltaint.h> 32#include <asm/mips-boards/maltaint.h>
32#include <asm/dma.h> 33#include <asm/dma.h>
33#include <asm/traps.h> 34#include <asm/traps.h>
34#include <asm/gcmpregs.h>
35#ifdef CONFIG_VT 35#ifdef CONFIG_VT
36#include <linux/console.h> 36#include <linux/console.h>
37#endif 37#endif
@@ -127,7 +127,7 @@ static int __init plat_enable_iocoherency(void)
127 BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); 127 BONITO_PCIMEMBASECFG_MEMBASE1_CACHED);
128 pr_info("Enabled Bonito IOBC coherency\n"); 128 pr_info("Enabled Bonito IOBC coherency\n");
129 } 129 }
130 } else if (gcmp_niocu() != 0) { 130 } else if (mips_cm_numiocu() != 0) {
131 /* Nothing special needs to be done to enable coherency */ 131 /* Nothing special needs to be done to enable coherency */
132 pr_info("CMP IOCU detected\n"); 132 pr_info("CMP IOCU detected\n");
133 if ((*(unsigned int *)0xbf403000 & 0x81) != 0x81) { 133 if ((*(unsigned int *)0xbf403000 & 0x81) != 0x81) {
@@ -165,7 +165,6 @@ static void __init plat_setup_iocoherency(void)
165#endif 165#endif
166} 166}
167 167
168#ifdef CONFIG_BLK_DEV_IDE
169static void __init pci_clock_check(void) 168static void __init pci_clock_check(void)
170{ 169{
171 unsigned int __iomem *jmpr_p = 170 unsigned int __iomem *jmpr_p =
@@ -175,18 +174,25 @@ static void __init pci_clock_check(void)
175 33, 20, 25, 30, 12, 16, 37, 10 174 33, 20, 25, 30, 12, 16, 37, 10
176 }; 175 };
177 int pciclock = pciclocks[jmpr]; 176 int pciclock = pciclocks[jmpr];
178 char *argptr = fw_getcmdline(); 177 char *optptr, *argptr = fw_getcmdline();
179 178
180 if (pciclock != 33 && !strstr(argptr, "idebus=")) { 179 /*
181 pr_warn("WARNING: PCI clock is %dMHz, setting idebus\n", 180 * If user passed a pci_clock= option, don't tack on another one
181 */
182 optptr = strstr(argptr, "pci_clock=");
183 if (optptr && (optptr == argptr || optptr[-1] == ' '))
184 return;
185
186 if (pciclock != 33) {
187 pr_warn("WARNING: PCI clock is %dMHz, setting pci_clock\n",
182 pciclock); 188 pciclock);
183 argptr += strlen(argptr); 189 argptr += strlen(argptr);
184 sprintf(argptr, " idebus=%d", pciclock); 190 sprintf(argptr, " pci_clock=%d", pciclock);
185 if (pciclock < 20 || pciclock > 66) 191 if (pciclock < 20 || pciclock > 66)
186 pr_warn("WARNING: IDE timing calculations will be incorrect\n"); 192 pr_warn("WARNING: IDE timing calculations will be "
193 "incorrect\n");
187 } 194 }
188} 195}
189#endif
190 196
191#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) 197#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
192static void __init screen_info_setup(void) 198static void __init screen_info_setup(void)
@@ -247,6 +253,10 @@ void __init plat_mem_setup(void)
247{ 253{
248 unsigned int i; 254 unsigned int i;
249 255
256 if (config_enabled(CONFIG_EVA))
257 /* EVA has already been configured in mach-malta/kernel-init.h */
258 pr_info("Enhanced Virtual Addressing (EVA) activated\n");
259
250 mips_pcibios_init(); 260 mips_pcibios_init();
251 261
252 /* Request I/O space for devices used on the Malta board. */ 262 /* Request I/O space for devices used on the Malta board. */
@@ -268,9 +278,7 @@ void __init plat_mem_setup(void)
268 278
269 plat_setup_iocoherency(); 279 plat_setup_iocoherency();
270 280
271#ifdef CONFIG_BLK_DEV_IDE
272 pci_clock_check(); 281 pci_clock_check();
273#endif
274 282
275#ifdef CONFIG_BLK_DEV_FD 283#ifdef CONFIG_BLK_DEV_FD
276 fd_activate(); 284 fd_activate();