2 * arch/sh/boards/shmin/setup.c
4 * Copyright (C) 2006 Takashi YOSHII
8 #include <linux/init.h>
10 #include <asm/machvec.h>
11 #include <asm/shmin.h>
12 #include <asm/clock.h>
15 #define PFC_PHCR 0xa400010eUL
16 #define INTC_ICR1 0xa4000010UL
17 #define INTC_IPRC 0xa4000016UL
19 static struct ipr_data ipr_irq_table[] = {
26 static unsigned long ipr_offsets[] = {
30 static struct ipr_desc ipr_irq_desc = {
31 .ipr_offsets = ipr_offsets,
32 .nr_offsets = ARRAY_SIZE(ipr_offsets),
34 .ipr_data = ipr_irq_table,
35 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
42 static void __init init_shmin_irq(void)
44 ctrl_outw(0x2a00, PFC_PHCR); // IRQ0-3=IRQ
45 ctrl_outw(0x0aaa, INTC_ICR1); // IRQ0-3=IRQ-mode,Low-active.
46 register_ipr_controller(&ipr_irq_desc);
49 static void __iomem *shmin_ioport_map(unsigned long port, unsigned int size)
53 if ((port & ~0x1f) == SHMIN_NE_BASE)
54 return (void __iomem *)(SHMIN_IO_BASE + port);
62 static struct sh_machine_vector mv_shmin __initmv = {
64 .mv_init_irq = init_shmin_irq,
65 .mv_ioport_map = shmin_ioport_map,