diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-10-06 21:22:25 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-10 21:51:12 +0900 |
commit | 1f69b6af9171f50135cce8023c84d82fbf42a8f5 (patch) | |
tree | 8d664d2d24f6f199e0b3af0afe18c85969a902fd /arch/sh/mm/init.c | |
parent | 8bd642b17bea31f8361b61c16c8d154638414df4 (diff) | |
download | op-kernel-dev-1f69b6af9171f50135cce8023c84d82fbf42a8f5.zip op-kernel-dev-1f69b6af9171f50135cce8023c84d82fbf42a8f5.tar.gz |
sh: Prepare for dynamic PMB support
To allow the MMU to be switched between 29bit and 32bit mode at runtime
some constants need to swapped for functions that return a runtime
value.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r-- | arch/sh/mm/init.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 8173e38..c8af6c5 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -323,4 +323,12 @@ int memory_add_physaddr_to_nid(u64 addr) } EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); #endif + #endif /* CONFIG_MEMORY_HOTPLUG */ + +#ifdef CONFIG_PMB +int __in_29bit_mode(void) +{ + return !(ctrl_inl(PMB_PASCR) & PASCR_SE); +} +#endif /* CONFIG_PMB */ |