Commit a78bfbfcfaca64e6198f164c43a60afc8a50e2c6
Committed by
Paul Mackerras
1 parent
b163a256da
Exists in
master
and in
4 other branches
[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>
Showing 2 changed files with 14 additions and 0 deletions Side-by-side Diff
Documentation/kernel-parameters.txt
arch/powerpc/kernel/setup_32.c
... | ... | @@ -172,6 +172,18 @@ |
172 | 172 | } |
173 | 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 | 187 | #ifdef CONFIG_GENERIC_NVRAM |
176 | 188 | |
177 | 189 | /* Generic nvram hooks used by drivers/char/gen_nvram.c */ |