aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-shmobile/setup-r7s72100.c49
1 files changed, 22 insertions, 27 deletions
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
index 55f0b9c7c482..6ae7e3257bf3 100644
--- a/arch/arm/mach-shmobile/setup-r7s72100.c
+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
@@ -28,8 +28,8 @@
28#include <mach/r7s72100.h> 28#include <mach/r7s72100.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30 30
31#define SCIF_DATA(index, baseaddr, irq) \ 31#define R7S72100_SCIF(index, baseaddr, irq) \
32[index] = { \ 32static const struct plat_sci_port scif##index##_platform_data = { \
33 .type = PORT_SCIF, \ 33 .type = PORT_SCIF, \
34 .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \ 34 .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \
35 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \ 35 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
@@ -40,24 +40,19 @@
40 .irqs = { irq + 1, irq + 2, irq + 3, irq }, \ 40 .irqs = { irq + 1, irq + 2, irq + 3, irq }, \
41} 41}
42 42
43enum { SCIF0, SCIF1, SCIF2, SCIF3, SCIF4, SCIF5, SCIF6, SCIF7 }; 43R7S72100_SCIF(0, 0xe8007000, gic_iid(221));
44R7S72100_SCIF(1, 0xe8007800, gic_iid(225));
45R7S72100_SCIF(2, 0xe8008000, gic_iid(229));
46R7S72100_SCIF(3, 0xe8008800, gic_iid(233));
47R7S72100_SCIF(4, 0xe8009000, gic_iid(237));
48R7S72100_SCIF(5, 0xe8009800, gic_iid(241));
49R7S72100_SCIF(6, 0xe800a000, gic_iid(245));
50R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
44 51
45static const struct plat_sci_port scif[] __initconst = { 52#define r7s72100_register_scif(index) \
46 SCIF_DATA(SCIF0, 0xe8007000, gic_iid(221)), /* SCIF0 */ 53 platform_device_register_data(&platform_bus, "sh-sci", index, \
47 SCIF_DATA(SCIF1, 0xe8007800, gic_iid(225)), /* SCIF1 */ 54 &scif##index##_platform_data, \
48 SCIF_DATA(SCIF2, 0xe8008000, gic_iid(229)), /* SCIF2 */ 55 sizeof(scif##index##_platform_data))
49 SCIF_DATA(SCIF3, 0xe8008800, gic_iid(233)), /* SCIF3 */
50 SCIF_DATA(SCIF4, 0xe8009000, gic_iid(237)), /* SCIF4 */
51 SCIF_DATA(SCIF5, 0xe8009800, gic_iid(241)), /* SCIF5 */
52 SCIF_DATA(SCIF6, 0xe800a000, gic_iid(245)), /* SCIF6 */
53 SCIF_DATA(SCIF7, 0xe800a800, gic_iid(249)), /* SCIF7 */
54};
55
56static inline void r7s72100_register_scif(int idx)
57{
58 platform_device_register_data(&platform_bus, "sh-sci", idx, &scif[idx],
59 sizeof(struct plat_sci_port));
60}
61 56
62 57
63static struct sh_timer_config mtu2_0_platform_data __initdata = { 58static struct sh_timer_config mtu2_0_platform_data __initdata = {
@@ -81,14 +76,14 @@ static struct resource mtu2_0_resources[] __initdata = {
81 76
82void __init r7s72100_add_dt_devices(void) 77void __init r7s72100_add_dt_devices(void)
83{ 78{
84 r7s72100_register_scif(SCIF0); 79 r7s72100_register_scif(0);
85 r7s72100_register_scif(SCIF1); 80 r7s72100_register_scif(1);
86 r7s72100_register_scif(SCIF2); 81 r7s72100_register_scif(2);
87 r7s72100_register_scif(SCIF3); 82 r7s72100_register_scif(3);
88 r7s72100_register_scif(SCIF4); 83 r7s72100_register_scif(4);
89 r7s72100_register_scif(SCIF5); 84 r7s72100_register_scif(5);
90 r7s72100_register_scif(SCIF6); 85 r7s72100_register_scif(6);
91 r7s72100_register_scif(SCIF7); 86 r7s72100_register_scif(7);
92 r7s72100_register_mtu2(0); 87 r7s72100_register_mtu2(0);
93} 88}
94 89