aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/setup.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-05-28 07:51:51 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-06-01 02:44:49 -0400
commiteb9b9b56eed280e65a9e194aaeb50a5a75111859 (patch)
tree3c40c0d798b9079dfeda037f0e9680dc2808b449 /arch/sh/kernel/setup.c
parent5582b0648de6248c67c0b47fa170e5fb15ab4bf1 (diff)
sh: boot word / mode pin support V2
Add mode pin support for the SuperH architecture V2. With this patch applied the board code can add their own function to export the cpu mode pin configuration. In most cases this will be a constant bitmap, but boards that allow reading this from a register can instead read out the pin state from hardware. The code warns if a pin is tested but no board specific mode pin function has been provided. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r--arch/sh/kernel/setup.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 00086b234278..050131eec773 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -420,6 +420,18 @@ void __init setup_arch(char **cmdline_p)
420#endif 420#endif
421} 421}
422 422
423/* processor boot mode configuration */
424int generic_mode_pins(void)
425{
426 pr_warning("generic_mode_pins(): missing mode pin configuration\n");
427 return 0;
428}
429
430int test_mode_pin(int pin)
431{
432 return sh_mv.mv_mode_pins() & (1 << pin);
433}
434
423static const char *cpu_name[] = { 435static const char *cpu_name[] = {
424 [CPU_SH7201] = "SH7201", 436 [CPU_SH7201] = "SH7201",
425 [CPU_SH7203] = "SH7203", [CPU_SH7263] = "SH7263", 437 [CPU_SH7203] = "SH7203", [CPU_SH7263] = "SH7263",