From eb9b9b56eed280e65a9e194aaeb50a5a75111859 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Thu, 28 May 2009 11:51:51 +0000 Subject: 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 Signed-off-by: Paul Mundt --- arch/sh/kernel/setup.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/sh/kernel/setup.c') 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) #endif } +/* processor boot mode configuration */ +int generic_mode_pins(void) +{ + pr_warning("generic_mode_pins(): missing mode pin configuration\n"); + return 0; +} + +int test_mode_pin(int pin) +{ + return sh_mv.mv_mode_pins() & (1 << pin); +} + static const char *cpu_name[] = { [CPU_SH7201] = "SH7201", [CPU_SH7203] = "SH7203", [CPU_SH7263] = "SH7263", -- cgit v1.2.2