Commit 3bc50a7e authored by Eric Brower's avatar Eric Brower Committed by David S. Miller

[SPARC]: Make APC idle a boot time cmdline option.

parent 6ea22620
......@@ -22,7 +22,6 @@
/* Debugging
*
* #define APC_DEBUG_LED
* #define APC_NO_IDLE
*/
#define APC_MINOR MISC_DYNAMIC_MINOR
......@@ -31,10 +30,27 @@
volatile static u8 *regs;
static int apc_regsize;
static int apc_no_idle __initdata = 0;
#define apc_readb(offs) (sbus_readb(regs+offs))
#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs))
/* Specify "apc=noidle" on the kernel command line to
* disable APC CPU standby support. Certain prototype
* systems (SPARCstation-Fox) do not play well with APC
* CPU idle, so disable this if your system has APC and
* crashes randomly.
*/
static int __init apc_setup(char *str)
{
if(!strncmp(str, "noidle", strlen("noidle"))) {
apc_no_idle = 1;
return 1;
}
return 0;
}
__setup("apc=", apc_setup);
/*
* CPU idle callback function
* See .../arch/sparc/kernel/process.c
......@@ -127,6 +143,7 @@ static int __init apc_probe(void)
struct sbus_bus *sbus = NULL;
struct sbus_dev *sdev = NULL;
int iTmp = 0;
for_each_sbus(sbus) {
for_each_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, APC_OBPNAME)) {
......@@ -155,12 +172,12 @@ static int __init apc_probe(void)
return -ENODEV;
}
#ifndef APC_NO_IDLE
/* Assign power management IDLE handler */
pm_idle = apc_swift_idle;
#endif
if(!apc_no_idle)
pm_idle = apc_swift_idle;
printk(KERN_INFO "%s: power management initialized\n", APC_DEVNAME);
printk(KERN_INFO "%s: power management initialized%s\n",
APC_DEVNAME, apc_no_idle ? " (CPU idle disabled)" : "");
return 0;
}
......@@ -169,3 +186,4 @@ static int __init apc_probe(void)
* initialized, so we install ourselves thusly:
*/
__initcall(apc_probe);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment