summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/setup_32.c
diff options
context:
space:
mode:
authorRobert Brose <linuxppcdev@lists.qbjnet.com>2008-03-28 20:20:23 (GMT)
committerPaul Mackerras <paulus@samba.org>2008-04-01 09:43:09 (GMT)
commita78bfbfcfaca64e6198f164c43a60afc8a50e2c6 (patch)
treef388cf6887eadc96dfdd8c398096f8a91371bb20 /arch/powerpc/kernel/setup_32.c
parentb163a256dac8ceb01d40bebe25c315768cf1877b (diff)
downloadlinux-a78bfbfcfaca64e6198f164c43a60afc8a50e2c6.tar.xz
[POWERPC] Add kernel parameter to set l3cr for MPC745x
Old-world powermacs don't set L2CR or L3CR on processor upgrade cards. This simple patch allows the setting of L3CR via a kernel parameter (like the existing kernel parameter to set L2CR). Signed-off-by: Robert Brose <bob@qbjnet.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r--arch/powerpc/kernel/setup_32.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index cd870a8..eac936e 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -172,6 +172,18 @@ int __init ppc_setup_l2cr(char *str)
}
__setup("l2cr=", ppc_setup_l2cr);
+/* Checks "l3cr=xxxx" command-line option */
+int __init ppc_setup_l3cr(char *str)
+{
+ if (cpu_has_feature(CPU_FTR_L3CR)) {
+ unsigned long val = simple_strtoul(str, NULL, 0);
+ printk(KERN_INFO "l3cr set to %lx\n", val);
+ _set_L3CR(val); /* and enable it */
+ }
+ return 1;
+}
+__setup("l3cr=", ppc_setup_l3cr);
+
#ifdef CONFIG_GENERIC_NVRAM
/* Generic nvram hooks used by drivers/char/gen_nvram.c */