diff options
author | Robert Brose <linuxppcdev@lists.qbjnet.com> | 2008-03-28 16:20:23 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-01 05:43:09 -0400 |
commit | a78bfbfcfaca64e6198f164c43a60afc8a50e2c6 (patch) | |
tree | f388cf6887eadc96dfdd8c398096f8a91371bb20 | |
parent | b163a256dac8ceb01d40bebe25c315768cf1877b (diff) |
[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>
-rw-r--r-- | Documentation/kernel-parameters.txt | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup_32.c | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 508e2a2c9864..a1ff28e0872b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -931,6 +931,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
931 | 931 | ||
932 | l2cr= [PPC] | 932 | l2cr= [PPC] |
933 | 933 | ||
934 | l3cr= [PPC] | ||
935 | |||
934 | lapic [X86-32,APIC] Enable the local APIC even if BIOS | 936 | lapic [X86-32,APIC] Enable the local APIC even if BIOS |
935 | disabled it. | 937 | disabled it. |
936 | 938 | ||
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index cd870a823d18..eac936eb3190 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) | |||
172 | } | 172 | } |
173 | __setup("l2cr=", ppc_setup_l2cr); | 173 | __setup("l2cr=", ppc_setup_l2cr); |
174 | 174 | ||
175 | /* Checks "l3cr=xxxx" command-line option */ | ||
176 | int __init ppc_setup_l3cr(char *str) | ||
177 | { | ||
178 | if (cpu_has_feature(CPU_FTR_L3CR)) { | ||
179 | unsigned long val = simple_strtoul(str, NULL, 0); | ||
180 | printk(KERN_INFO "l3cr set to %lx\n", val); | ||
181 | _set_L3CR(val); /* and enable it */ | ||
182 | } | ||
183 | return 1; | ||
184 | } | ||
185 | __setup("l3cr=", ppc_setup_l3cr); | ||
186 | |||
175 | #ifdef CONFIG_GENERIC_NVRAM | 187 | #ifdef CONFIG_GENERIC_NVRAM |
176 | 188 | ||
177 | /* Generic nvram hooks used by drivers/char/gen_nvram.c */ | 189 | /* Generic nvram hooks used by drivers/char/gen_nvram.c */ |