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 #include <linux/dma-mapping.h>
17 #include <linux/kernel.h>
18 #include <linux/init.h>
20 #include <linux/irqchip.h>
21 #include <linux/irqchip/arm-gic.h>
22 #include <linux/platform_data/irq-renesas-intc-irqpin.h>
23 #include <linux/platform_device.h>
24 #include <linux/of_platform.h>
25 #include <linux/serial_sci.h>
26 #include <linux/sh_dma.h>
27 #include <linux/sh_timer.h>
28 #include <linux/platform_data/sh_ipmmu.h>
30 #include <asm/mach-types.h>
31 #include <asm/mach/map.h>
32 #include <asm/mach/arch.h>
33 #include <asm/mach/time.h>
34 #include <asm/hardware/cache-l2x0.h>
37 #include "dma-register.h"
39 #include "pm-rmobile.h"
42 static struct map_desc r8a7740_io_desc
[] __initdata
= {
45 * 0xe6000000-0xefffffff -> 0xe6000000-0xefffffff
48 .virtual = 0xe6000000,
49 .pfn
= __phys_to_pfn(0xe6000000),
51 .type
= MT_DEVICE_NONSHARED
53 #ifdef CONFIG_CACHE_L2X0
56 * 0xf0100000-0xf0101000 -> 0xf0002000-0xf0003000
59 .virtual = 0xf0002000,
60 .pfn
= __phys_to_pfn(0xf0100000),
62 .type
= MT_DEVICE_NONSHARED
67 void __init
r8a7740_map_io(void)
70 iotable_init(r8a7740_io_desc
, ARRAY_SIZE(r8a7740_io_desc
));
74 static const struct resource pfc_resources
[] = {
75 DEFINE_RES_MEM(0xe6050000, 0x8000),
76 DEFINE_RES_MEM(0xe605800c, 0x0020),
79 void __init
r8a7740_pinmux_init(void)
81 platform_device_register_simple("pfc-r8a7740", -1, pfc_resources
,
82 ARRAY_SIZE(pfc_resources
));
85 static struct renesas_intc_irqpin_config irqpin0_platform_data
= {
86 .irq_base
= irq_pin(0), /* IRQ0 -> IRQ7 */
89 static struct resource irqpin0_resources
[] = {
90 DEFINE_RES_MEM(0xe6900000, 4), /* ICR1A */
91 DEFINE_RES_MEM(0xe6900010, 4), /* INTPRI00A */
92 DEFINE_RES_MEM(0xe6900020, 1), /* INTREQ00A */
93 DEFINE_RES_MEM(0xe6900040, 1), /* INTMSK00A */
94 DEFINE_RES_MEM(0xe6900060, 1), /* INTMSKCLR00A */
95 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ0 */
96 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ1 */
97 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ2 */
98 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ3 */
99 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ4 */
100 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ5 */
101 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ6 */
102 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ7 */
105 static struct platform_device irqpin0_device
= {
106 .name
= "renesas_intc_irqpin",
108 .resource
= irqpin0_resources
,
109 .num_resources
= ARRAY_SIZE(irqpin0_resources
),
111 .platform_data
= &irqpin0_platform_data
,
115 static struct renesas_intc_irqpin_config irqpin1_platform_data
= {
116 .irq_base
= irq_pin(8), /* IRQ8 -> IRQ15 */
119 static struct resource irqpin1_resources
[] = {
120 DEFINE_RES_MEM(0xe6900004, 4), /* ICR2A */
121 DEFINE_RES_MEM(0xe6900014, 4), /* INTPRI10A */
122 DEFINE_RES_MEM(0xe6900024, 1), /* INTREQ10A */
123 DEFINE_RES_MEM(0xe6900044, 1), /* INTMSK10A */
124 DEFINE_RES_MEM(0xe6900064, 1), /* INTMSKCLR10A */
125 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ8 */
126 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ9 */
127 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ10 */
128 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ11 */
129 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ12 */
130 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ13 */
131 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ14 */
132 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ15 */
135 static struct platform_device irqpin1_device
= {
136 .name
= "renesas_intc_irqpin",
138 .resource
= irqpin1_resources
,
139 .num_resources
= ARRAY_SIZE(irqpin1_resources
),
141 .platform_data
= &irqpin1_platform_data
,
145 static struct renesas_intc_irqpin_config irqpin2_platform_data
= {
146 .irq_base
= irq_pin(16), /* IRQ16 -> IRQ23 */
149 static struct resource irqpin2_resources
[] = {
150 DEFINE_RES_MEM(0xe6900008, 4), /* ICR3A */
151 DEFINE_RES_MEM(0xe6900018, 4), /* INTPRI30A */
152 DEFINE_RES_MEM(0xe6900028, 1), /* INTREQ30A */
153 DEFINE_RES_MEM(0xe6900048, 1), /* INTMSK30A */
154 DEFINE_RES_MEM(0xe6900068, 1), /* INTMSKCLR30A */
155 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ16 */
156 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ17 */
157 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ18 */
158 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ19 */
159 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ20 */
160 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ21 */
161 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ22 */
162 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ23 */
165 static struct platform_device irqpin2_device
= {
166 .name
= "renesas_intc_irqpin",
168 .resource
= irqpin2_resources
,
169 .num_resources
= ARRAY_SIZE(irqpin2_resources
),
171 .platform_data
= &irqpin2_platform_data
,
175 static struct renesas_intc_irqpin_config irqpin3_platform_data
= {
176 .irq_base
= irq_pin(24), /* IRQ24 -> IRQ31 */
179 static struct resource irqpin3_resources
[] = {
180 DEFINE_RES_MEM(0xe690000c, 4), /* ICR3A */
181 DEFINE_RES_MEM(0xe690001c, 4), /* INTPRI30A */
182 DEFINE_RES_MEM(0xe690002c, 1), /* INTREQ30A */
183 DEFINE_RES_MEM(0xe690004c, 1), /* INTMSK30A */
184 DEFINE_RES_MEM(0xe690006c, 1), /* INTMSKCLR30A */
185 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ24 */
186 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ25 */
187 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ26 */
188 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ27 */
189 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ28 */
190 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ29 */
191 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ30 */
192 DEFINE_RES_IRQ(gic_spi(149)), /* IRQ31 */
195 static struct platform_device irqpin3_device
= {
196 .name
= "renesas_intc_irqpin",
198 .resource
= irqpin3_resources
,
199 .num_resources
= ARRAY_SIZE(irqpin3_resources
),
201 .platform_data
= &irqpin3_platform_data
,
206 #define R8A7740_SCIF(scif_type, index, baseaddr, irq) \
207 static struct plat_sci_port scif##index##_platform_data = { \
209 .flags = UPF_BOOT_AUTOCONF, \
210 .scscr = SCSCR_RE | SCSCR_TE, \
213 static struct resource scif##index##_resources[] = { \
214 DEFINE_RES_MEM(baseaddr, 0x100), \
215 DEFINE_RES_IRQ(irq), \
218 static struct platform_device scif##index##_device = { \
221 .resource = scif##index##_resources, \
222 .num_resources = ARRAY_SIZE(scif##index##_resources), \
224 .platform_data = &scif##index##_platform_data, \
228 R8A7740_SCIF(PORT_SCIFA
, 0, 0xe6c40000, gic_spi(100));
229 R8A7740_SCIF(PORT_SCIFA
, 1, 0xe6c50000, gic_spi(101));
230 R8A7740_SCIF(PORT_SCIFA
, 2, 0xe6c60000, gic_spi(102));
231 R8A7740_SCIF(PORT_SCIFA
, 3, 0xe6c70000, gic_spi(103));
232 R8A7740_SCIF(PORT_SCIFA
, 4, 0xe6c80000, gic_spi(104));
233 R8A7740_SCIF(PORT_SCIFA
, 5, 0xe6cb0000, gic_spi(105));
234 R8A7740_SCIF(PORT_SCIFA
, 6, 0xe6cc0000, gic_spi(106));
235 R8A7740_SCIF(PORT_SCIFA
, 7, 0xe6cd0000, gic_spi(107));
236 R8A7740_SCIF(PORT_SCIFB
, 8, 0xe6c30000, gic_spi(108));
239 static struct sh_timer_config cmt1_platform_data
= {
240 .channels_mask
= 0x3f,
243 static struct resource cmt1_resources
[] = {
244 DEFINE_RES_MEM(0xe6138000, 0x170),
245 DEFINE_RES_IRQ(gic_spi(58)),
248 static struct platform_device cmt1_device
= {
252 .platform_data
= &cmt1_platform_data
,
254 .resource
= cmt1_resources
,
255 .num_resources
= ARRAY_SIZE(cmt1_resources
),
259 static struct sh_timer_config tmu0_platform_data
= {
263 static struct resource tmu0_resources
[] = {
264 DEFINE_RES_MEM(0xfff80000, 0x2c),
265 DEFINE_RES_IRQ(gic_spi(198)),
266 DEFINE_RES_IRQ(gic_spi(199)),
267 DEFINE_RES_IRQ(gic_spi(200)),
270 static struct platform_device tmu0_device
= {
274 .platform_data
= &tmu0_platform_data
,
276 .resource
= tmu0_resources
,
277 .num_resources
= ARRAY_SIZE(tmu0_resources
),
280 /* IPMMUI (an IPMMU module for ICB/LMB) */
281 static struct resource ipmmu_resources
[] = {
286 .flags
= IORESOURCE_MEM
,
290 static const char * const ipmmu_dev_names
[] = {
291 "sh_mobile_lcdc_fb.0",
292 "sh_mobile_lcdc_fb.1",
296 static struct shmobile_ipmmu_platform_data ipmmu_platform_data
= {
297 .dev_names
= ipmmu_dev_names
,
298 .num_dev_names
= ARRAY_SIZE(ipmmu_dev_names
),
301 static struct platform_device ipmmu_device
= {
305 .platform_data
= &ipmmu_platform_data
,
307 .resource
= ipmmu_resources
,
308 .num_resources
= ARRAY_SIZE(ipmmu_resources
),
311 static struct platform_device
*r8a7740_early_devices
[] __initdata
= {
331 static const struct sh_dmae_slave_config r8a7740_dmae_slaves
[] = {
333 .slave_id
= SHDMA_SLAVE_SDHI0_TX
,
335 .chcr
= CHCR_TX(XMIT_SZ_16BIT
),
338 .slave_id
= SHDMA_SLAVE_SDHI0_RX
,
340 .chcr
= CHCR_RX(XMIT_SZ_16BIT
),
343 .slave_id
= SHDMA_SLAVE_SDHI1_TX
,
345 .chcr
= CHCR_TX(XMIT_SZ_16BIT
),
348 .slave_id
= SHDMA_SLAVE_SDHI1_RX
,
350 .chcr
= CHCR_RX(XMIT_SZ_16BIT
),
353 .slave_id
= SHDMA_SLAVE_SDHI2_TX
,
355 .chcr
= CHCR_TX(XMIT_SZ_16BIT
),
358 .slave_id
= SHDMA_SLAVE_SDHI2_RX
,
360 .chcr
= CHCR_RX(XMIT_SZ_16BIT
),
363 .slave_id
= SHDMA_SLAVE_FSIA_TX
,
365 .chcr
= CHCR_TX(XMIT_SZ_32BIT
),
368 .slave_id
= SHDMA_SLAVE_FSIA_RX
,
370 .chcr
= CHCR_RX(XMIT_SZ_32BIT
),
373 .slave_id
= SHDMA_SLAVE_FSIB_TX
,
375 .chcr
= CHCR_TX(XMIT_SZ_32BIT
),
378 .slave_id
= SHDMA_SLAVE_MMCIF_TX
,
380 .chcr
= CHCR_TX(XMIT_SZ_32BIT
),
383 .slave_id
= SHDMA_SLAVE_MMCIF_RX
,
385 .chcr
= CHCR_RX(XMIT_SZ_32BIT
),
390 #define DMA_CHANNEL(a, b, c) \
395 .chclr_offset = (0x220 - 0x20) + a \
398 static const struct sh_dmae_channel r8a7740_dmae_channels
[] = {
399 DMA_CHANNEL(0x00, 0, 0),
400 DMA_CHANNEL(0x10, 0, 8),
401 DMA_CHANNEL(0x20, 4, 0),
402 DMA_CHANNEL(0x30, 4, 8),
403 DMA_CHANNEL(0x50, 8, 0),
404 DMA_CHANNEL(0x60, 8, 8),
407 static struct sh_dmae_pdata dma_platform_data
= {
408 .slave
= r8a7740_dmae_slaves
,
409 .slave_num
= ARRAY_SIZE(r8a7740_dmae_slaves
),
410 .channel
= r8a7740_dmae_channels
,
411 .channel_num
= ARRAY_SIZE(r8a7740_dmae_channels
),
412 .ts_low_shift
= TS_LOW_SHIFT
,
413 .ts_low_mask
= TS_LOW_BIT
<< TS_LOW_SHIFT
,
414 .ts_high_shift
= TS_HI_SHIFT
,
415 .ts_high_mask
= TS_HI_BIT
<< TS_HI_SHIFT
,
416 .ts_shift
= dma_ts_shift
,
417 .ts_shift_num
= ARRAY_SIZE(dma_ts_shift
),
418 .dmaor_init
= DMAOR_DME
,
422 /* Resource order important! */
423 static struct resource r8a7740_dmae0_resources
[] = {
425 /* Channel registers and DMAOR */
428 .flags
= IORESOURCE_MEM
,
434 .flags
= IORESOURCE_MEM
,
438 .start
= gic_spi(34),
440 .flags
= IORESOURCE_IRQ
,
443 /* IRQ for channels 0-5 */
444 .start
= gic_spi(28),
446 .flags
= IORESOURCE_IRQ
,
450 /* Resource order important! */
451 static struct resource r8a7740_dmae1_resources
[] = {
453 /* Channel registers and DMAOR */
456 .flags
= IORESOURCE_MEM
,
462 .flags
= IORESOURCE_MEM
,
466 .start
= gic_spi(41),
468 .flags
= IORESOURCE_IRQ
,
471 /* IRQ for channels 0-5 */
472 .start
= gic_spi(35),
474 .flags
= IORESOURCE_IRQ
,
478 /* Resource order important! */
479 static struct resource r8a7740_dmae2_resources
[] = {
481 /* Channel registers and DMAOR */
484 .flags
= IORESOURCE_MEM
,
490 .flags
= IORESOURCE_MEM
,
494 .start
= gic_spi(48),
496 .flags
= IORESOURCE_IRQ
,
499 /* IRQ for channels 0-5 */
500 .start
= gic_spi(42),
502 .flags
= IORESOURCE_IRQ
,
506 static struct platform_device dma0_device
= {
507 .name
= "sh-dma-engine",
509 .resource
= r8a7740_dmae0_resources
,
510 .num_resources
= ARRAY_SIZE(r8a7740_dmae0_resources
),
512 .platform_data
= &dma_platform_data
,
516 static struct platform_device dma1_device
= {
517 .name
= "sh-dma-engine",
519 .resource
= r8a7740_dmae1_resources
,
520 .num_resources
= ARRAY_SIZE(r8a7740_dmae1_resources
),
522 .platform_data
= &dma_platform_data
,
526 static struct platform_device dma2_device
= {
527 .name
= "sh-dma-engine",
529 .resource
= r8a7740_dmae2_resources
,
530 .num_resources
= ARRAY_SIZE(r8a7740_dmae2_resources
),
532 .platform_data
= &dma_platform_data
,
537 static const struct sh_dmae_channel r8a7740_usb_dma_channels
[] = {
545 static const struct sh_dmae_slave_config r8a7740_usb_dma_slaves
[] = {
547 .slave_id
= SHDMA_SLAVE_USBHS_TX
,
548 .chcr
= USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE
),
550 .slave_id
= SHDMA_SLAVE_USBHS_RX
,
551 .chcr
= USBTS_INDEX2VAL(USBTS_XMIT_SZ_8BYTE
),
555 static struct sh_dmae_pdata usb_dma_platform_data
= {
556 .slave
= r8a7740_usb_dma_slaves
,
557 .slave_num
= ARRAY_SIZE(r8a7740_usb_dma_slaves
),
558 .channel
= r8a7740_usb_dma_channels
,
559 .channel_num
= ARRAY_SIZE(r8a7740_usb_dma_channels
),
560 .ts_low_shift
= USBTS_LOW_SHIFT
,
561 .ts_low_mask
= USBTS_LOW_BIT
<< USBTS_LOW_SHIFT
,
562 .ts_high_shift
= USBTS_HI_SHIFT
,
563 .ts_high_mask
= USBTS_HI_BIT
<< USBTS_HI_SHIFT
,
564 .ts_shift
= dma_usbts_shift
,
565 .ts_shift_num
= ARRAY_SIZE(dma_usbts_shift
),
566 .dmaor_init
= DMAOR_DME
,
568 .chcr_ie_bit
= 1 << 5,
575 static struct resource r8a7740_usb_dma_resources
[] = {
577 /* Channel registers and DMAOR */
579 .end
= 0xe68a0064 - 1,
580 .flags
= IORESOURCE_MEM
,
585 .end
= 0xe68a0014 - 1,
586 .flags
= IORESOURCE_MEM
,
589 /* IRQ for channels */
590 .start
= gic_spi(49),
592 .flags
= IORESOURCE_IRQ
,
596 static struct platform_device usb_dma_device
= {
597 .name
= "sh-dma-engine",
599 .resource
= r8a7740_usb_dma_resources
,
600 .num_resources
= ARRAY_SIZE(r8a7740_usb_dma_resources
),
602 .platform_data
= &usb_dma_platform_data
,
607 static struct resource i2c0_resources
[] = {
611 .end
= 0xfff20425 - 1,
612 .flags
= IORESOURCE_MEM
,
615 .start
= gic_spi(201),
617 .flags
= IORESOURCE_IRQ
,
621 static struct resource i2c1_resources
[] = {
625 .end
= 0xe6c20425 - 1,
626 .flags
= IORESOURCE_MEM
,
629 .start
= gic_spi(70), /* IIC1_ALI1 */
630 .end
= gic_spi(73), /* IIC1_DTEI1 */
631 .flags
= IORESOURCE_IRQ
,
635 static struct platform_device i2c0_device
= {
636 .name
= "i2c-sh_mobile",
638 .resource
= i2c0_resources
,
639 .num_resources
= ARRAY_SIZE(i2c0_resources
),
642 static struct platform_device i2c1_device
= {
643 .name
= "i2c-sh_mobile",
645 .resource
= i2c1_resources
,
646 .num_resources
= ARRAY_SIZE(i2c1_resources
),
649 static struct resource pmu_resources
[] = {
651 .start
= gic_spi(83),
653 .flags
= IORESOURCE_IRQ
,
657 static struct platform_device pmu_device
= {
660 .num_resources
= ARRAY_SIZE(pmu_resources
),
661 .resource
= pmu_resources
,
664 static struct platform_device
*r8a7740_late_devices
[] __initdata
= {
675 * r8a7740 chip has lasting errata on MERAM buffer.
676 * this is work-around for it.
678 * "Media RAM (MERAM)" on r8a7740 documentation
680 #define MEBUFCNTR 0xFE950098
681 void __init
r8a7740_meram_workaround(void)
685 reg
= ioremap_nocache(MEBUFCNTR
, 4);
687 iowrite32(0x01600164, reg
);
692 void __init
r8a7740_add_standard_devices(void)
694 static struct pm_domain_device domain_devices
[] __initdata
= {
695 { "A4R", &tmu0_device
},
696 { "A4R", &i2c0_device
},
697 { "A4S", &irqpin0_device
},
698 { "A4S", &irqpin1_device
},
699 { "A4S", &irqpin2_device
},
700 { "A4S", &irqpin3_device
},
701 { "A3SP", &scif0_device
},
702 { "A3SP", &scif1_device
},
703 { "A3SP", &scif2_device
},
704 { "A3SP", &scif3_device
},
705 { "A3SP", &scif4_device
},
706 { "A3SP", &scif5_device
},
707 { "A3SP", &scif6_device
},
708 { "A3SP", &scif7_device
},
709 { "A3SP", &scif8_device
},
710 { "A3SP", &i2c1_device
},
711 { "A3SP", &ipmmu_device
},
712 { "A3SP", &dma0_device
},
713 { "A3SP", &dma1_device
},
714 { "A3SP", &dma2_device
},
715 { "A3SP", &usb_dma_device
},
718 r8a7740_init_pm_domains();
721 platform_add_devices(r8a7740_early_devices
,
722 ARRAY_SIZE(r8a7740_early_devices
));
723 platform_add_devices(r8a7740_late_devices
,
724 ARRAY_SIZE(r8a7740_late_devices
));
726 /* add devices to PM domain */
727 rmobile_add_devices_to_domains(domain_devices
,
728 ARRAY_SIZE(domain_devices
));
731 void __init
r8a7740_add_early_devices(void)
733 early_platform_add_devices(r8a7740_early_devices
,
734 ARRAY_SIZE(r8a7740_early_devices
));
736 /* setup early console here as well */
737 shmobile_setup_console();
742 void __init
r8a7740_init_irq_of(void)
744 void __iomem
*intc_prio_base
= ioremap_nocache(0xe6900010, 0x10);
745 void __iomem
*intc_msk_base
= ioremap_nocache(0xe6900040, 0x10);
746 void __iomem
*pfc_inta_ctrl
= ioremap_nocache(0xe605807c, 0x4);
748 #ifdef CONFIG_ARCH_SHMOBILE_LEGACY
749 void __iomem
*gic_dist_base
= ioremap_nocache(0xc2800000, 0x1000);
750 void __iomem
*gic_cpu_base
= ioremap_nocache(0xc2000000, 0x1000);
752 gic_init(0, 29, gic_dist_base
, gic_cpu_base
);
757 /* route signals to GIC */
758 iowrite32(0x0, pfc_inta_ctrl
);
761 * To mask the shared interrupt to SPI 149 we must ensure to set
762 * PRIO *and* MASK. Else we run into IRQ floods when registering
763 * the intc_irqpin devices
765 iowrite32(0x0, intc_prio_base
+ 0x0);
766 iowrite32(0x0, intc_prio_base
+ 0x4);
767 iowrite32(0x0, intc_prio_base
+ 0x8);
768 iowrite32(0x0, intc_prio_base
+ 0xc);
769 iowrite8(0xff, intc_msk_base
+ 0x0);
770 iowrite8(0xff, intc_msk_base
+ 0x4);
771 iowrite8(0xff, intc_msk_base
+ 0x8);
772 iowrite8(0xff, intc_msk_base
+ 0xc);
774 iounmap(intc_prio_base
);
775 iounmap(intc_msk_base
);
776 iounmap(pfc_inta_ctrl
);
779 static void __init
r8a7740_generic_init(void)
781 r8a7740_meram_workaround();
783 #ifdef CONFIG_CACHE_L2X0
784 /* Shared attribute override enable, 32K*8way */
785 l2x0_init(IOMEM(0xf0002000), 0x00400000, 0xc20f0fff);
787 of_platform_populate(NULL
, of_default_bus_match_table
, NULL
, NULL
);
790 static const char *r8a7740_boards_compat_dt
[] __initdata
= {
795 DT_MACHINE_START(R8A7740_DT
, "Generic R8A7740 (Flattened Device Tree)")
796 .map_io
= r8a7740_map_io
,
797 .init_early
= shmobile_init_delay
,
798 .init_irq
= r8a7740_init_irq_of
,
799 .init_machine
= r8a7740_generic_init
,
800 .init_late
= shmobile_init_late
,
801 .dt_compat
= r8a7740_boards_compat_dt
,
804 #endif /* CONFIG_USE_OF */