aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-sdk7786
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-01-15 02:31:04 -0500
committerPaul Mundt <lethal@linux-sh.org>2010-01-15 02:31:04 -0500
commit6f832e8aab8c4c6d28629e970e4a85e74a8d0be6 (patch)
treef62382c323f2724b36d13b26b34052651e9d59a6 /arch/sh/boards/mach-sdk7786
parentf0cb77372c3cf8c0cb17bbfb30a62506ea119286 (diff)
sh: mach-sdk7786: mode pins support.
This wires up the mode pins support on the SDK7786. The pins are standard SH7786 pins, and all are fixed in software. Needed for the clock framework, PCIe, and so forth. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-sdk7786')
-rw-r--r--arch/sh/boards/mach-sdk7786/setup.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-sdk7786/setup.c b/arch/sh/boards/mach-sdk7786/setup.c
index f2d4b75bf31c..c38c6cc293b5 100644
--- a/arch/sh/boards/mach-sdk7786/setup.c
+++ b/arch/sh/boards/mach-sdk7786/setup.c
@@ -218,6 +218,23 @@ static void __init init_sdk7786_IRQ(void)
218 plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK); 218 plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK);
219} 219}
220 220
221#define MODSWR_REGS 0x07fff830
222
223static int sdk7786_mode_pins(void)
224{
225 void __iomem *modswr;
226 int pin_states;
227
228 modswr = ioremap_nocache(MODSWR_REGS, SZ_16);
229 if (!modswr)
230 return -ENXIO;
231
232 pin_states = ioread16(modswr);
233 iounmap(modswr);
234
235 return pin_states;
236}
237
221/* Initialize the board */ 238/* Initialize the board */
222static void __init sdk7786_setup(char **cmdline_p) 239static void __init sdk7786_setup(char **cmdline_p)
223{ 240{
@@ -230,5 +247,6 @@ static void __init sdk7786_setup(char **cmdline_p)
230static struct sh_machine_vector mv_sdk7786 __initmv = { 247static struct sh_machine_vector mv_sdk7786 __initmv = {
231 .mv_name = "SDK7786", 248 .mv_name = "SDK7786",
232 .mv_setup = sdk7786_setup, 249 .mv_setup = sdk7786_setup,
250 .mv_mode_pins = sdk7786_mode_pins,
233 .mv_init_irq = init_sdk7786_IRQ, 251 .mv_init_irq = init_sdk7786_IRQ,
234}; 252};