MIPS: c-r4k: Add CPU PM callback for coherency
Implement a CPU power management callback for the r4k cache, to set up coherency again after leaving a powered down state. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
This commit is contained in:
parent
ae4ce45419
commit
61d73044fe
1 changed files with 24 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org)
|
* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org)
|
||||||
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
* Copyright (C) 1999, 2000 Silicon Graphics, Inc.
|
||||||
*/
|
*/
|
||||||
|
#include <linux/cpu_pm.h>
|
||||||
#include <linux/hardirq.h>
|
#include <linux/hardirq.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
|
@ -1644,3 +1645,26 @@ void r4k_cache_init(void)
|
||||||
coherency_setup();
|
coherency_setup();
|
||||||
board_cache_error_setup = r4k_cache_error_setup;
|
board_cache_error_setup = r4k_cache_error_setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int r4k_cache_pm_notifier(struct notifier_block *self, unsigned long cmd,
|
||||||
|
void *v)
|
||||||
|
{
|
||||||
|
switch (cmd) {
|
||||||
|
case CPU_PM_ENTER_FAILED:
|
||||||
|
case CPU_PM_EXIT:
|
||||||
|
coherency_setup();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NOTIFY_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct notifier_block r4k_cache_pm_notifier_block = {
|
||||||
|
.notifier_call = r4k_cache_pm_notifier,
|
||||||
|
};
|
||||||
|
|
||||||
|
int __init r4k_cache_init_pm(void)
|
||||||
|
{
|
||||||
|
return cpu_pm_register_notifier(&r4k_cache_pm_notifier_block);
|
||||||
|
}
|
||||||
|
arch_initcall(r4k_cache_init_pm);
|
||||||
|
|
Loading…
Add table
Reference in a new issue