diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7722.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 85 |
1 files changed, 83 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 62ebccf18b3..de1ede92176 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/serial.h> | 12 | #include <linux/serial.h> |
13 | #include <linux/serial_sci.h> | 13 | #include <linux/serial_sci.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/uio_driver.h> | ||
16 | #include <asm/clock.h> | ||
15 | #include <asm/mmzone.h> | 17 | #include <asm/mmzone.h> |
16 | 18 | ||
17 | static struct resource usbf_resources[] = { | 19 | static struct resource usbf_resources[] = { |
@@ -59,6 +61,62 @@ static struct platform_device iic_device = { | |||
59 | .resource = iic_resources, | 61 | .resource = iic_resources, |
60 | }; | 62 | }; |
61 | 63 | ||
64 | static struct uio_info vpu_platform_data = { | ||
65 | .name = "VPU4", | ||
66 | .version = "0", | ||
67 | .irq = 60, | ||
68 | }; | ||
69 | |||
70 | static struct resource vpu_resources[] = { | ||
71 | [0] = { | ||
72 | .name = "VPU", | ||
73 | .start = 0xfe900000, | ||
74 | .end = 0xfe9022eb, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, | ||
77 | [1] = { | ||
78 | /* place holder for contiguous memory */ | ||
79 | }, | ||
80 | }; | ||
81 | |||
82 | static struct platform_device vpu_device = { | ||
83 | .name = "uio_pdrv_genirq", | ||
84 | .id = 0, | ||
85 | .dev = { | ||
86 | .platform_data = &vpu_platform_data, | ||
87 | }, | ||
88 | .resource = vpu_resources, | ||
89 | .num_resources = ARRAY_SIZE(vpu_resources), | ||
90 | }; | ||
91 | |||
92 | static struct uio_info veu_platform_data = { | ||
93 | .name = "VEU", | ||
94 | .version = "0", | ||
95 | .irq = 54, | ||
96 | }; | ||
97 | |||
98 | static struct resource veu_resources[] = { | ||
99 | [0] = { | ||
100 | .name = "VEU", | ||
101 | .start = 0xfe920000, | ||
102 | .end = 0xfe9200b7, | ||
103 | .flags = IORESOURCE_MEM, | ||
104 | }, | ||
105 | [1] = { | ||
106 | /* place holder for contiguous memory */ | ||
107 | }, | ||
108 | }; | ||
109 | |||
110 | static struct platform_device veu_device = { | ||
111 | .name = "uio_pdrv_genirq", | ||
112 | .id = 1, | ||
113 | .dev = { | ||
114 | .platform_data = &veu_platform_data, | ||
115 | }, | ||
116 | .resource = veu_resources, | ||
117 | .num_resources = ARRAY_SIZE(veu_resources), | ||
118 | }; | ||
119 | |||
62 | static struct plat_sci_port sci_platform_data[] = { | 120 | static struct plat_sci_port sci_platform_data[] = { |
63 | { | 121 | { |
64 | .mapbase = 0xffe00000, | 122 | .mapbase = 0xffe00000, |
@@ -95,10 +153,27 @@ static struct platform_device *sh7722_devices[] __initdata = { | |||
95 | &usbf_device, | 153 | &usbf_device, |
96 | &iic_device, | 154 | &iic_device, |
97 | &sci_device, | 155 | &sci_device, |
156 | &vpu_device, | ||
157 | &veu_device, | ||
98 | }; | 158 | }; |
99 | 159 | ||
100 | static int __init sh7722_devices_setup(void) | 160 | static int __init sh7722_devices_setup(void) |
101 | { | 161 | { |
162 | clk_always_enable("mstp031"); /* TLB */ | ||
163 | clk_always_enable("mstp030"); /* IC */ | ||
164 | clk_always_enable("mstp029"); /* OC */ | ||
165 | clk_always_enable("mstp028"); /* URAM */ | ||
166 | clk_always_enable("mstp026"); /* XYMEM */ | ||
167 | clk_always_enable("mstp022"); /* INTC */ | ||
168 | clk_always_enable("mstp020"); /* SuperHyway */ | ||
169 | clk_always_enable("mstp109"); /* I2C */ | ||
170 | clk_always_enable("mstp211"); /* USB */ | ||
171 | clk_always_enable("mstp202"); /* VEU */ | ||
172 | clk_always_enable("mstp201"); /* VPU */ | ||
173 | |||
174 | platform_resource_setup_memory(&vpu_device, "vpu", 1 << 20); | ||
175 | platform_resource_setup_memory(&veu_device, "veu", 2 << 20); | ||
176 | |||
102 | return platform_add_devices(sh7722_devices, | 177 | return platform_add_devices(sh7722_devices, |
103 | ARRAY_SIZE(sh7722_devices)); | 178 | ARRAY_SIZE(sh7722_devices)); |
104 | } | 179 | } |
@@ -229,8 +304,14 @@ static struct intc_sense_reg sense_registers[] __initdata = { | |||
229 | { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } }, | 304 | { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } }, |
230 | }; | 305 | }; |
231 | 306 | ||
232 | static DECLARE_INTC_DESC(intc_desc, "sh7722", vectors, groups, | 307 | static struct intc_mask_reg ack_registers[] __initdata = { |
233 | mask_registers, prio_registers, sense_registers); | 308 | { 0xa4140024, 0, 8, /* INTREQ00 */ |
309 | { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } }, | ||
310 | }; | ||
311 | |||
312 | static DECLARE_INTC_DESC_ACK(intc_desc, "sh7722", vectors, groups, | ||
313 | mask_registers, prio_registers, sense_registers, | ||
314 | ack_registers); | ||
234 | 315 | ||
235 | void __init plat_irq_setup(void) | 316 | void __init plat_irq_setup(void) |
236 | { | 317 | { |