aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/include/asm/machvec.h1
-rw-r--r--arch/sh/include/asm/processor.h4
-rw-r--r--arch/sh/kernel/machvec.c1
-rw-r--r--arch/sh/kernel/setup.c12
4 files changed, 18 insertions, 0 deletions
diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h
index 73d6d16fa06b..84dd37761f56 100644
--- a/arch/sh/include/asm/machvec.h
+++ b/arch/sh/include/asm/machvec.h
@@ -48,6 +48,7 @@ struct sh_machine_vector {
48 void (*mv_ioport_unmap)(void __iomem *); 48 void (*mv_ioport_unmap)(void __iomem *);
49 49
50 int (*mv_clk_init)(void); 50 int (*mv_clk_init)(void);
51 int (*mv_mode_pins)(void);
51}; 52};
52 53
53extern struct sh_machine_vector sh_mv; 54extern struct sh_machine_vector sh_mv;
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h
index 005c962c8b1c..fb67482e47eb 100644
--- a/arch/sh/include/asm/processor.h
+++ b/arch/sh/include/asm/processor.h
@@ -94,6 +94,10 @@ extern struct pt_regs fake_swapper_regs;
94const char *get_cpu_subtype(struct sh_cpuinfo *c); 94const char *get_cpu_subtype(struct sh_cpuinfo *c);
95extern const struct seq_operations cpuinfo_op; 95extern const struct seq_operations cpuinfo_op;
96 96
97/* processor boot mode configuration */
98int generic_mode_pins(void);
99int test_mode_pin(int pin);
100
97#ifdef CONFIG_VSYSCALL 101#ifdef CONFIG_VSYSCALL
98int vsyscall_init(void); 102int vsyscall_init(void);
99#else 103#else
diff --git a/arch/sh/kernel/machvec.c b/arch/sh/kernel/machvec.c
index c1ea41e5812a..548f6607fd0f 100644
--- a/arch/sh/kernel/machvec.c
+++ b/arch/sh/kernel/machvec.c
@@ -129,6 +129,7 @@ void __init sh_mv_setup(void)
129 mv_set(ioport_map); 129 mv_set(ioport_map);
130 mv_set(ioport_unmap); 130 mv_set(ioport_unmap);
131 mv_set(irq_demux); 131 mv_set(irq_demux);
132 mv_set(mode_pins);
132 133
133 if (!sh_mv.mv_nr_irqs) 134 if (!sh_mv.mv_nr_irqs)
134 sh_mv.mv_nr_irqs = NR_IRQS; 135 sh_mv.mv_nr_irqs = NR_IRQS;
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",