2 * R8A7740 processor support
4 * Copyright (C) 2011 Renesas Solutions Corp.
5 * Copyright (C) 2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <linux/delay.h>
21 #include <linux/dma-mapping.h>
22 #include <linux/kernel.h>
23 #include <linux/init.h>
25 #include <linux/irqchip.h>
26 #include <linux/irqchip/arm-gic.h>
27 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
28 #include <linux/platform_device.h>
29 #include <linux/of_platform.h>
30 #include <linux/serial_sci.h>
31 #include <linux/sh_dma.h>
32 #include <linux/sh_timer.h>
33 #include <linux/platform_data/sh_ipmmu.h>
35 #include <asm/mach-types.h>
36 #include <asm/mach/map.h>
37 #include <asm/mach/arch.h>
38 #include <asm/mach/time.h>
41 #include "dma-register.h"
43 #include "pm-rmobile.h"
46 static struct map_desc r8a7740_io_desc[] __initdata = {
49 * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
52 .virtual = 0xe6000000,
53 .pfn = __phys_to_pfn(0xe6000000),
55 .type = MT_DEVICE_NONSHARED
57 #ifdef CONFIG_CACHE_L2X0
60 * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
63 .virtual = 0xf0002000,
64 .pfn = __phys_to_pfn(0xf0100000),
66 .type = MT_DEVICE_NONSHARED
71 void __init r8a7740_map_io(void)
73 iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc));
77 static const struct resource pfc_resources[] = {
78 DEFINE_RES_MEM(0xe6050000, 0x8000),
79 DEFINE_RES_MEM(0xe605800c, 0x0020),
82 void __init r8a7740_pinmux_init(void)
84 platform_device_register_simple("pfc-r8a7740", -1, pfc_resources,
85 ARRAY_SIZE(pfc_resources));
88 static struct renesas_intc_irqpin_config irqpin0_platform_data = {
89 .irq_base = irq_pin(0), /* IRQ0 -> IRQ7 */
92 static struct resource irqpin0_resources[] = {
93 DEFINE_RES_MEM(0xe6900000, 4), /* ICR1A */
94 DEFINE_RES_MEM(0xe6900010, 4), /* INTPRI00A */
95 DEFINE_RES_MEM(0xe6900020, 1), /* INTREQ00A */
96 DEFINE_RES_MEM(0xe6900040, 1), /* INTMSK00A */
97 DEFINE_RES_MEM(0xe6900060, 1), /* INTMSKCLR00A */
98 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ0 */
99 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ1 */
100 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ2 */
101 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ3 */
102 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ4 */
103 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ5 */
104 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ6 */
105 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ7 */
108 static struct platform_device irqpin0_device = {
109 .name = "renesas_intc_irqpin",
111 .resource = irqpin0_resources,
112 .num_resources = ARRAY_SIZE(irqpin0_resources),
114 .platform_data = &irqpin0_platform_data,
118 static struct renesas_intc_irqpin_config irqpin1_platform_data = {
119 .irq_base = irq_pin(8), /* IRQ8 -> IRQ15 */
122 static struct resource irqpin1_resources[] = {
123 DEFINE_RES_MEM(0xe6900004, 4), /* ICR2A */
124 DEFINE_RES_MEM(0xe6900014, 4), /* INTPRI10A */
125 DEFINE_RES_MEM(0xe6900024, 1), /* INTREQ10A */
126 DEFINE_RES_MEM(0xe6900044, 1), /* INTMSK10A */
127 DEFINE_RES_MEM(0xe6900064, 1), /* INTMSKCLR10A */
128 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ8 */
129 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ9 */
130 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ10 */
131 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ11 */
132 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ12 */
133 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ13 */
134 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ14 */
135 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ15 */
138 static struct platform_device irqpin1_device = {
139 .name = "renesas_intc_irqpin",
141 .resource = irqpin1_resources,
142 .num_resources = ARRAY_SIZE(irqpin1_resources),
144 .platform_data = &irqpin1_platform_data,
148 static struct renesas_intc_irqpin_config irqpin2_platform_data = {
149 .irq_base = irq_pin(16), /* IRQ16 -> IRQ23 */
152 static struct resource irqpin2_resources[] = {
153 DEFINE_RES_MEM(0xe6900008, 4), /* ICR3A */
154 DEFINE_RES_MEM(0xe6900018, 4), /* INTPRI30A */
155 DEFINE_RES_MEM(0xe6900028, 1), /* INTREQ30A */
156 DEFINE_RES_MEM(0xe6900048, 1), /* INTMSK30A */
157 DEFINE_RES_MEM(0xe6900068, 1), /* INTMSKCLR30A */
158 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ16 */
159 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ17 */
160 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ18 */
161 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ19 */
162 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ20 */
163 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ21 */
164 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ22 */
165 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ23 */
168 static struct platform_device irqpin2_device = {
169 .name = "renesas_intc_irqpin",
171 .resource = irqpin2_resources,
172 .num_resources = ARRAY_SIZE(irqpin2_resources),
174 .platform_data = &irqpin2_platform_data,
178 static struct renesas_intc_irqpin_config irqpin3_platform_data = {
179 .irq_base = irq_pin(24), /* IRQ24 -> IRQ31 */
182 static struct resource irqpin3_resources[] = {
183 DEFINE_RES_MEM(0xe690000c, 4), /* ICR3A */
184 DEFINE_RES_MEM(0xe690001c, 4), /* INTPRI30A */
185 DEFINE_RES_MEM(0xe690002c, 1), /* INTREQ30A */
186 DEFINE_RES_MEM(0xe690004c, 1), /* INTMSK30A */
187 DEFINE_RES_MEM(0xe690006c, 1), /* INTMSKCLR30A */
188 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ24 */
189 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ25 */
190 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ26 */
191 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ27 */
192 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ28 */
193 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ29 */
194 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ30 */
195 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ31 */
198 static struct platform_device irqpin3_device = {
199 .name = "renesas_intc_irqpin",
201 .resource = irqpin3_resources,
202 .num_resources = ARRAY_SIZE(irqpin3_resources),
204 .platform_data = &irqpin3_platform_data,
209 #define R8A7740_SCIF(scif_type, index, baseaddr, irq) \
210 static struct plat_sci_port scif##index##_platform_data = { \
212 .flags = UPF_BOOT_AUTOCONF, \
213 .scscr = SCSCR_RE | SCSCR_TE, \
216 static struct resource scif##index##_resources[] = { \
217 DEFINE_RES_MEM(baseaddr, 0x100), \
218 DEFINE_RES_IRQ(irq), \
221 static struct platform_device scif##index##_device = { \
224 .resource = scif##index##_resources, \
225 .num_resources = ARRAY_SIZE(scif##index##_resources), \
227 .platform_data = &scif##index##_platform_data, \
231 R8A7740_SCIF(PORT_SCIFA, 0, 0xe6c40000, gic_spi(100));
232 R8A7740_SCIF(PORT_SCIFA, 1, 0xe6c50000, gic_spi(101));
233 R8A7740_SCIF(PORT_SCIFA, 2, 0xe6c60000, gic_spi(102));
234 R8A7740_SCIF(PORT_SCIFA, 3, 0xe6c70000, gic_spi(103));
235 R8A7740_SCIF(PORT_SCIFA, 4, 0xe6c80000, gic_spi(104));
236 R8A7740_SCIF(PORT_SCIFA, 5, 0xe6cb0000, gic_spi(105));
237 R8A7740_SCIF(PORT_SCIFA, 6, 0xe6cc0000, gic_spi(106));
238 R8A7740_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(107));
239 R8A7740_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(108));
242 static struct sh_timer_config cmt1_platform_data = {
243 .channels_mask = 0x3f,
246 static struct resource cmt1_resources[] = {
247 DEFINE_RES_MEM(0xe6138000, 0x170),
248 DEFINE_RES_IRQ(gic_spi(58)),
251 static struct platform_device cmt1_device = {
255 .platform_data = &cmt1_platform_data,
257 .resource = cmt1_resources,
258 .num_resources = ARRAY_SIZE(cmt1_resources),
262 static struct sh_timer_config tmu0_platform_data = {
266 static struct resource tmu0_resources[] = {
267 DEFINE_RES_MEM(0xfff80000, 0x2c),
268 DEFINE_RES_IRQ(gic_spi(198)),
269 DEFINE_RES_IRQ(gic_spi(199)),
270 DEFINE_RES_IRQ(gic_spi(200)),
273 static struct platform_device tmu0_device = {
277 .platform_data = &tmu0_platform_data,
279 .resource = tmu0_resources,
280 .num_resources = ARRAY_SIZE(tmu0_resources),
283 /* IPMMUI (an IPMMU module for ICB/LMB) */
284 static struct resource ipmmu_resources[] = {
289 .flags = IORESOURCE_MEM,
293 static const char * const ipmmu_dev_names[] = {
294 "sh_mobile_lcdc_fb.0",
295 "sh_mobile_lcdc_fb.1",
299 static struct shmobile_ipmmu_platform_data ipmmu_platform_data = {
300 .dev_names = ipmmu_dev_names,
301 .num_dev_names = ARRAY_SIZE(ipmmu_dev_names),
304 static struct platform_device ipmmu_device = {
308 .platform_data = &ipmmu_platform_data,
310 .resource = ipmmu_resources,
311 .num_resources = ARRAY_SIZE(ipmmu_resources),
314 static struct platform_device *r8a7740_early_devices[] __initdata = {
334 static const struct sh_dmae_slave_config r8a7740_dmae_slaves[] = {
336 .slave_id = SHDMA_SLAVE_SDHI0_TX,
338 .chcr = CHCR_TX(XMIT_SZ_16BIT),
341 .slave_id = SHDMA_SLAVE_SDHI0_RX,
343 .chcr = CHCR_RX(XMIT_SZ_16BIT),
346 .slave_id = SHDMA_SLAVE_SDHI1_TX,
348 .chcr = CHCR_TX(XMIT_SZ_16BIT),
351 .slave_id = SHDMA_SLAVE_SDHI1_RX,
353 .chcr = CHCR_RX(XMIT_SZ_16BIT),
356 .slave_id = SHDMA_SLAVE_SDHI2_TX,
358 .chcr = CHCR_TX(XMIT_SZ_16BIT),
361 .slave_id = SHDMA_SLAVE_SDHI2_RX,
363 .chcr = CHCR_RX(XMIT_SZ_16BIT),
366 .slave_id = SHDMA_SLAVE_FSIA_TX,
368 .chcr = CHCR_TX(XMIT_SZ_32BIT),
371 .slave_id = SHDMA_SLAVE_FSIA_RX,
373 .chcr = CHCR_RX(XMIT_SZ_32BIT),
376 .slave_id = SHDMA_SLAVE_FSIB_TX,
378 .chcr = CHCR_TX(XMIT_SZ_32BIT),
381 .slave_id = SHDMA_SLAVE_MMCIF_TX,
383 .chcr = CHCR_TX(XMIT_SZ_32BIT),
386 .slave_id = SHDMA_SLAVE_MMCIF_RX,
388 .chcr = CHCR_RX(XMIT_SZ_32BIT),
393 #define DMA_CHANNEL(a, b, c) \
398 .chclr_offset = (0x220 - 0x20) + a \
401 static const struct sh_dmae_channel r8a7740_dmae_channels[] = {
402 DMA_CHANNEL(0x00, 0, 0),
403 DMA_CHANNEL(0x10, 0, 8),
404 DMA_CHANNEL(0x20, 4, 0),
405 DMA_CHANNEL(0x30, 4, 8),
406 DMA_CHANNEL(0x50, 8, 0),
407 DMA_CHANNEL(0x60, 8, 8),
410 static struct sh_dmae_pdata dma_platform_data = {
411 .slave = r8a7740_dmae_slaves,
412 .slave_num = ARRAY_SIZE(r8a7740_dmae_slaves),
413 .channel = r8a7740_dmae_channels,
414 .channel_num = ARRAY_SIZE(r8a7740_dmae_channels),
415 .ts_low_shift = TS_LOW_SHIFT,
416 .ts_low_mask = TS_LOW_BIT << TS_LOW_SHIFT,
417 .ts_high_shift = TS_HI_SHIFT,
418 .ts_high_mask = TS_HI_BIT << TS_HI_SHIFT,
419 .ts_shift = dma_ts_shift,
420 .ts_shift_num = ARRAY_SIZE(dma_ts_shift),
421 .dmaor_init = DMAOR_DME,
425 /* Resource order important! */
426 static struct resource r8a7740_dmae0_resources[] = {
428 /* Channel registers and DMAOR */
431 .flags = IORESOURCE_MEM,
437 .flags = IORESOURCE_MEM,
441 .start = gic_spi(34),
443 .flags = IORESOURCE_IRQ,
446 /* IRQ for channels 0-5 */
447 .start = gic_spi(28),
449 .flags = IORESOURCE_IRQ,
453 /* Resource order important! */
454 static struct resource r8a7740_dmae1_resources[] = {
456 /* Channel registers and DMAOR */
459 .flags = IORESOURCE_MEM,
465 .flags = IORESOURCE_MEM,
469 .start = gic_spi(41),
471 .flags = IORESOURCE_IRQ,
474 /* IRQ for channels 0-5 */
475 .start = gic_spi(35),
477 .flags = IORESOURCE_IRQ,
481 /* Resource order important! */
482 static struct resource r8a7740_dmae2_resources[] = {
484 /* Channel registers and DMAOR */
487 .flags = IORESOURCE_MEM,
493 .flags = IORESOURCE_MEM,
497 .start = gic_spi(48),
499 .flags = IORESOURCE_IRQ,
502 /* IRQ for channels 0-5 */
503 .start = gic_spi(42),
505 .flags = IORESOURCE_IRQ,
509 static struct platform_device dma0_device = {
510 .name = "sh-dma-engine",
512 .resource = r8a7740_dmae0_resources,
513 .num_resources = ARRAY_SIZE(r8a7740_dmae0_resources),
515 .platform_data = &dma_platform_data,
519 static struct platform_device dma1_device = {
520 .name = "sh-dma-engine",
522 .resource = r8a7740_dmae1_resources,
523 .num_resources = ARRAY_SIZE(r8a7740_dmae1_resources),
525 .platform_data = &dma_platform_data,
529 static struct platform_device dma2_device = {
530 .name = "sh-dma-engine",
532 .resource = r8a7740_dmae2_resources,
533 .num_resources = ARRAY_SIZE(r8a7740_dmae2_resources),
535 .platform_data = &dma_platform_data,
540 static const struct sh_dmae_channel r8a7740_usb_dma_channels[] = {
548 static const struct sh_dmae_slave_config r8a7740_usb_dma_slaves[] = {
550 .slave_id = SHDMA_SLAVE_USBHS_TX,
551 .chcr = USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE),
553 .slave_id = SHDMA_SLAVE_USBHS_RX,
554 .chcr = USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE),
558 static struct sh_dmae_pdata usb_dma_platform_data = {
559 .slave = r8a7740_usb_dma_slaves,
560 .slave_num = ARRAY_SIZE(r8a7740_usb_dma_slaves),
561 .channel = r8a7740_usb_dma_channels,
562 .channel_num = ARRAY_SIZE(r8a7740_usb_dma_channels),
563 .ts_low_shift = USBTS_LOW_SHIFT,
564 .ts_low_mask = USBTS_LOW_BIT << USBTS_LOW_SHIFT,
565 .ts_high_shift = USBTS_HI_SHIFT,
566 .ts_high_mask = USBTS_HI_BIT << USBTS_HI_SHIFT,
567 .ts_shift = dma_usbts_shift,
568 .ts_shift_num = ARRAY_SIZE(dma_usbts_shift),
569 .dmaor_init = DMAOR_DME,
571 .chcr_ie_bit = 1 << 5,
578 static struct resource r8a7740_usb_dma_resources[] = {
580 /* Channel registers and DMAOR */
582 .end = 0xe68a0064 - 1,
583 .flags = IORESOURCE_MEM,
588 .end = 0xe68a0014 - 1,
589 .flags = IORESOURCE_MEM,
592 /* IRQ for channels */
593 .start = gic_spi(49),
595 .flags = IORESOURCE_IRQ,
599 static struct platform_device usb_dma_device = {
600 .name = "sh-dma-engine",
602 .resource = r8a7740_usb_dma_resources,
603 .num_resources = ARRAY_SIZE(r8a7740_usb_dma_resources),
605 .platform_data = &usb_dma_platform_data,
610 static struct resource i2c0_resources[] = {
614 .end = 0xfff20425 - 1,
615 .flags = IORESOURCE_MEM,
618 .start = gic_spi(201),
620 .flags = IORESOURCE_IRQ,
624 static struct resource i2c1_resources[] = {
628 .end = 0xe6c20425 - 1,
629 .flags = IORESOURCE_MEM,
632 .start = gic_spi(70), /* IIC1_ALI1 */
633 .end = gic_spi(73), /* IIC1_DTEI1 */
634 .flags = IORESOURCE_IRQ,
638 static struct platform_device i2c0_device = {
639 .name = "i2c-sh_mobile",
641 .resource = i2c0_resources,
642 .num_resources = ARRAY_SIZE(i2c0_resources),
645 static struct platform_device i2c1_device = {
646 .name = "i2c-sh_mobile",
648 .resource = i2c1_resources,
649 .num_resources = ARRAY_SIZE(i2c1_resources),
652 static struct resource pmu_resources[] = {
654 .start = gic_spi(83),
656 .flags = IORESOURCE_IRQ,
660 static struct platform_device pmu_device = {
663 .num_resources = ARRAY_SIZE(pmu_resources),
664 .resource = pmu_resources,
667 static struct platform_device *r8a7740_late_devices[] __initdata = {
678 * r8a7740 chip has lasting errata on MERAM buffer.
679 * this is work-around for it.
681 * "Media RAM (MERAM)" on r8a7740 documentation
683 #define MEBUFCNTR 0xFE950098
684 void __init r8a7740_meram_workaround(void)
688 reg = ioremap_nocache(MEBUFCNTR, 4);
690 iowrite32(0x01600164, reg);
696 #define ICSTART 0x0070
698 #define i2c_read(reg, offset) ioread8(reg + offset)
699 #define i2c_write(reg, offset, data) iowrite8(data, reg + offset)
702 * r8a7740 chip has lasting errata on I2C I/O pad reset.
703 * this is work-around for it.
705 static void r8a7740_i2c_workaround(struct platform_device *pdev)
707 struct resource *res;
710 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
711 if (unlikely(!res)) {
712 pr_err("r8a7740 i2c workaround fail (cannot find resource)\n");
716 reg = ioremap(res->start, resource_size(res));
717 if (unlikely(!reg)) {
718 pr_err("r8a7740 i2c workaround fail (cannot map IO)\n");
722 i2c_write(reg, ICCR, i2c_read(reg, ICCR) | 0x80);
723 i2c_read(reg, ICCR); /* dummy read */
725 i2c_write(reg, ICSTART, i2c_read(reg, ICSTART) | 0x10);
726 i2c_read(reg, ICSTART); /* dummy read */
730 i2c_write(reg, ICCR, 0x01);
731 i2c_write(reg, ICSTART, 0x00);
735 i2c_write(reg, ICCR, 0x10);
737 i2c_write(reg, ICCR, 0x00);
739 i2c_write(reg, ICCR, 0x10);
745 void __init r8a7740_add_standard_devices(void)
747 /* I2C work-around */
748 r8a7740_i2c_workaround(&i2c0_device);
749 r8a7740_i2c_workaround(&i2c1_device);
751 r8a7740_init_pm_domains();
754 platform_add_devices(r8a7740_early_devices,
755 ARRAY_SIZE(r8a7740_early_devices));
756 platform_add_devices(r8a7740_late_devices,
757 ARRAY_SIZE(r8a7740_late_devices));
759 /* add devices to PM domain */
761 rmobile_add_device_to_domain("A3SP", &scif0_device);
762 rmobile_add_device_to_domain("A3SP", &scif1_device);
763 rmobile_add_device_to_domain("A3SP", &scif2_device);
764 rmobile_add_device_to_domain("A3SP", &scif3_device);
765 rmobile_add_device_to_domain("A3SP", &scif4_device);
766 rmobile_add_device_to_domain("A3SP", &scif5_device);
767 rmobile_add_device_to_domain("A3SP", &scif6_device);
768 rmobile_add_device_to_domain("A3SP", &scif7_device);
769 rmobile_add_device_to_domain("A3SP", &scif8_device);
770 rmobile_add_device_to_domain("A3SP", &i2c1_device);
773 void __init r8a7740_add_early_devices(void)
775 early_platform_add_devices(r8a7740_early_devices,
776 ARRAY_SIZE(r8a7740_early_devices));
778 /* setup early console here as well */
779 shmobile_setup_console();
784 void __init r8a7740_add_standard_devices_dt(void)
786 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
789 void __init r8a7740_init_irq_of(void)
791 void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
792 void __iomem *intc_msk_base = ioremap_nocache(0xe6900040, 0x10);
793 void __iomem *pfc_inta_ctrl = ioremap_nocache(0xe605807c, 0x4);
797 /* route signals to GIC */
798 iowrite32(0x0, pfc_inta_ctrl);
801 * To mask the shared interrupt to SPI 149 we must ensure to set
802 * PRIO *and* MASK. Else we run into IRQ floods when registering
803 * the intc_irqpin devices
805 iowrite32(0x0, intc_prio_base + 0x0);
806 iowrite32(0x0, intc_prio_base + 0x4);
807 iowrite32(0x0, intc_prio_base + 0x8);
808 iowrite32(0x0, intc_prio_base + 0xc);
809 iowrite8(0xff, intc_msk_base + 0x0);
810 iowrite8(0xff, intc_msk_base + 0x4);
811 iowrite8(0xff, intc_msk_base + 0x8);
812 iowrite8(0xff, intc_msk_base + 0xc);
814 iounmap(intc_prio_base);
815 iounmap(intc_msk_base);
816 iounmap(pfc_inta_ctrl);
819 static void __init r8a7740_generic_init(void)
821 r8a7740_clock_init(0);
822 r8a7740_add_standard_devices_dt();
825 static const char *r8a7740_boards_compat_dt[] __initdata = {
830 DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
831 .map_io = r8a7740_map_io,
832 .init_early = shmobile_init_delay,
833 .init_irq = r8a7740_init_irq_of,
834 .init_machine = r8a7740_generic_init,
835 .init_late = shmobile_init_late,
836 .dt_compat = r8a7740_boards_compat_dt,
839 #endif /* CONFIG_USE_OF */