diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:08:33 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:08:33 -0400 |
commit | 91b91d01416afba8d3f230a62b5d2784bd7af94a (patch) | |
tree | 09812a19d82f697d3dd0cc8ab9c26a526f513970 /arch/sh/boards | |
parent | 49c3f807f5734605c10cdfb462a8fd5c3075eb76 (diff) |
sh: SH7710VoIPGW board support.
This adds support for the SH7710 VoIP Gateway board.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/renesas/sh7710voipgw/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/renesas/sh7710voipgw/setup.c | 109 |
2 files changed, 110 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/sh7710voipgw/Makefile b/arch/sh/boards/renesas/sh7710voipgw/Makefile new file mode 100644 index 000000000000..77037567633b --- /dev/null +++ b/arch/sh/boards/renesas/sh7710voipgw/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-y := setup.o | |||
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c new file mode 100644 index 000000000000..e57e7afab8c6 --- /dev/null +++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c | |||
@@ -0,0 +1,109 @@ | |||
1 | /* | ||
2 | * Renesas Technology SH7710 VoIP Gateway | ||
3 | * | ||
4 | * Copyright (C) 2006 Ranjit Deshpande | ||
5 | * Kenati Technologies Inc. | ||
6 | * | ||
7 | * May be copied or modified under the terms of the GNU General Public | ||
8 | * License. See linux/COPYING for more information. | ||
9 | */ | ||
10 | #include <linux/init.h> | ||
11 | #include <asm/machvec.h> | ||
12 | #include <asm/irq.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <asm/irq.h> | ||
15 | |||
16 | /* | ||
17 | * Initialize IRQ setting | ||
18 | */ | ||
19 | static void __init sh7710voipgw_init_irq(void) | ||
20 | { | ||
21 | /* Disable all interrupts in IPR registers */ | ||
22 | ctrl_outw(0x0, INTC_IPRA); | ||
23 | ctrl_outw(0x0, INTC_IPRB); | ||
24 | ctrl_outw(0x0, INTC_IPRC); | ||
25 | ctrl_outw(0x0, INTC_IPRD); | ||
26 | ctrl_outw(0x0, INTC_IPRE); | ||
27 | ctrl_outw(0x0, INTC_IPRF); | ||
28 | ctrl_outw(0x0, INTC_IPRG); | ||
29 | ctrl_outw(0x0, INTC_IPRH); | ||
30 | ctrl_outw(0x0, INTC_IPRI); | ||
31 | |||
32 | /* Ack all interrupt sources in the IRR0 register */ | ||
33 | ctrl_outb(0x3f, INTC_IRR0); | ||
34 | |||
35 | /* Use IRQ0 - IRQ3 as active low interrupt lines i.e. disable | ||
36 | * IRL mode. | ||
37 | */ | ||
38 | ctrl_outw(0x2aa, INTC_ICR1); | ||
39 | |||
40 | /* Now make IPR interrupts */ | ||
41 | make_ipr_irq(TIMER2_IRQ, TIMER2_IPR_ADDR, | ||
42 | TIMER2_IPR_POS, TIMER2_PRIORITY); | ||
43 | make_ipr_irq(WDT_IRQ, WDT_IPR_ADDR, WDT_IPR_POS, WDT_PRIORITY); | ||
44 | |||
45 | /* SCIF0 */ | ||
46 | make_ipr_irq(SCIF0_ERI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
47 | SCIF0_PRIORITY); | ||
48 | make_ipr_irq(SCIF0_RXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
49 | SCIF0_PRIORITY); | ||
50 | make_ipr_irq(SCIF0_BRI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
51 | SCIF0_PRIORITY); | ||
52 | make_ipr_irq(SCIF0_TXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
53 | SCIF0_PRIORITY); | ||
54 | |||
55 | /* DMAC-1 */ | ||
56 | make_ipr_irq(DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
57 | make_ipr_irq(DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
58 | make_ipr_irq(DMTE2_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
59 | make_ipr_irq(DMTE3_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
60 | |||
61 | /* DMAC-2 */ | ||
62 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
63 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
64 | |||
65 | /* IPSEC */ | ||
66 | make_ipr_irq(IPSEC_IRQ, IPSEC_IPR_ADDR, IPSEC_IPR_POS, IPSEC_PRIORITY); | ||
67 | |||
68 | /* EDMAC */ | ||
69 | make_ipr_irq(EDMAC0_IRQ, EDMAC0_IPR_ADDR, EDMAC0_IPR_POS, | ||
70 | EDMAC0_PRIORITY); | ||
71 | make_ipr_irq(EDMAC1_IRQ, EDMAC1_IPR_ADDR, EDMAC1_IPR_POS, | ||
72 | EDMAC1_PRIORITY); | ||
73 | make_ipr_irq(EDMAC2_IRQ, EDMAC2_IPR_ADDR, EDMAC2_IPR_POS, | ||
74 | EDMAC2_PRIORITY); | ||
75 | |||
76 | /* SIOF0 */ | ||
77 | make_ipr_irq(SIOF0_ERI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
78 | SIOF0_PRIORITY); | ||
79 | make_ipr_irq(SIOF0_TXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
80 | SIOF0_PRIORITY); | ||
81 | make_ipr_irq(SIOF0_RXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
82 | SIOF0_PRIORITY); | ||
83 | make_ipr_irq(SIOF0_CCI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
84 | SIOF0_PRIORITY); | ||
85 | |||
86 | /* SIOF1 */ | ||
87 | make_ipr_irq(SIOF1_ERI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
88 | SIOF1_PRIORITY); | ||
89 | make_ipr_irq(SIOF1_TXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
90 | SIOF1_PRIORITY); | ||
91 | make_ipr_irq(SIOF1_RXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
92 | SIOF1_PRIORITY); | ||
93 | make_ipr_irq(SIOF1_CCI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
94 | SIOF1_PRIORITY); | ||
95 | |||
96 | /* SLIC IRQ's */ | ||
97 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY); | ||
98 | make_ipr_irq(IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY); | ||
99 | } | ||
100 | |||
101 | /* | ||
102 | * The Machine Vector | ||
103 | */ | ||
104 | struct sh_machine_vector mv_sh7710voipgw __initmv = { | ||
105 | .mv_name = "SH7710 VoIP Gateway", | ||
106 | .mv_nr_irqs = 104, | ||
107 | .mv_init_irq = sh7710voipgw_init_irq, | ||
108 | }; | ||
109 | ALIAS_MV(sh7710voipgw) | ||