Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177030
b: refs/heads/master
c: 44658df
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Dec 15, 2009
1 parent cbe5f88 commit fb8e339
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 88 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be091d20efe7b045ca02bdf91c63c72d91f5899d
refs/heads/master: 44658dfb660c4744b862571a3d8e1dae65e8b75a
49 changes: 29 additions & 20 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh7705.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,33 @@ static struct intc_prio_reg prio_registers[] __initdata = {
static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL,
NULL, prio_registers, NULL);

static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xa4410000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 56, 56, 56 },
}, {
.mapbase = 0xa4400000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 52, 52, 52 },
}, {
.flags = 0,
}
};

static struct platform_device sci_device = {
static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xa4410000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 56, 56, 56 },
};

static struct platform_device scif0_device = {
.name = "sh-sci",
.id = -1,
.id = 0,
.dev = {
.platform_data = &scif0_platform_data,
},
};

static struct plat_sci_port scif1_platform_data = {
.mapbase = 0xa4400000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 52, 52, 52 },
};

static struct platform_device scif1_device = {
.name = "sh-sci",
.id = 1,
.dev = {
.platform_data = sci_platform_data,
.platform_data = &scif1_platform_data,
},
};

Expand Down Expand Up @@ -210,10 +216,11 @@ static struct platform_device tmu2_device = {
};

static struct platform_device *sh7705_devices[] __initdata = {
&scif0_device,
&scif1_device,
&tmu0_device,
&tmu1_device,
&tmu2_device,
&sci_device,
&rtc_device,
};

Expand All @@ -225,6 +232,8 @@ static int __init sh7705_devices_setup(void)
arch_initcall(sh7705_devices_setup);

static struct platform_device *sh7705_early_devices[] __initdata = {
&scif0_device,
&scif1_device,
&tmu0_device,
&tmu1_device,
&tmu2_device,
Expand Down
80 changes: 55 additions & 25 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh770x.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,44 +106,55 @@ static struct platform_device rtc_device = {
.resource = rtc_resources,
};

static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xfffffe80,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCI,
.irqs = { 23, 23, 23, 0 },
static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xfffffe80,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCI,
.irqs = { 23, 23, 23, 0 },
};

static struct platform_device scif0_device = {
.name = "sh-sci",
.id = 0,
.dev = {
.platform_data = &scif0_platform_data,
},
};
#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709)
{
.mapbase = 0xa4000150,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 56, 56, 56, 56 },
static struct plat_sci_port scif1_platform_data = {
.mapbase = 0xa4000150,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 56, 56, 56, 56 },
};

static struct platform_device scif1_device = {
.name = "sh-sci",
.id = 1,
.dev = {
.platform_data = &scif1_platform_data,
},
};
#endif
#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709)
{
.mapbase = 0xa4000140,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_IRDA,
.irqs = { 52, 52, 52, 52 },
},
#endif
{
.flags = 0,
}
static struct plat_sci_port scif2_platform_data = {
.mapbase = 0xa4000140,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_IRDA,
.irqs = { 52, 52, 52, 52 },
};

static struct platform_device sci_device = {
static struct platform_device scif2_device = {
.name = "sh-sci",
.id = -1,
.id = 2,
.dev = {
.platform_data = sci_platform_data,
.platform_data = &scif2_platform_data,
},
};
#endif

static struct sh_timer_config tmu0_platform_data = {
.name = "TMU0",
Expand Down Expand Up @@ -238,10 +249,19 @@ static struct platform_device tmu2_device = {
};

static struct platform_device *sh770x_devices[] __initdata = {
&scif0_device,
#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709)
&scif1_device,
#endif
#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709)
&scif2_device,
#endif
&tmu0_device,
&tmu1_device,
&tmu2_device,
&sci_device,
&rtc_device,
};

Expand All @@ -253,6 +273,16 @@ static int __init sh770x_devices_setup(void)
arch_initcall(sh770x_devices_setup);

static struct platform_device *sh770x_early_devices[] __initdata = {
&scif0_device,
#if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709)
&scif1_device,
#endif
#if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
defined(CONFIG_CPU_SUBTYPE_SH7709)
&scif2_device,
#endif
&tmu0_device,
&tmu1_device,
&tmu2_device,
Expand Down
50 changes: 29 additions & 21 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh7710.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,28 +96,33 @@ static struct platform_device rtc_device = {
},
};

static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xa4400000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 52, 52, 52, 52 },
}, {
.mapbase = 0xa4410000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 56, 56, 56, 56 },
}, {

.flags = 0,
}
};

static struct platform_device sci_device = {
static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xa4400000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 52, 52, 52, 52 },
};

static struct platform_device scif0_device = {
.name = "sh-sci",
.id = -1,
.id = 0,
.dev = {
.platform_data = &scif0_platform_data,
},
};

static struct plat_sci_port scif1_platform_data = {
.mapbase = 0xa4410000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 56, 56, 56, 56 },
};

static struct platform_device scif1_device = {
.name = "sh-sci",
.id = 1,
.dev = {
.platform_data = sci_platform_data,
.platform_data = &scif1_platform_data,
},
};

Expand Down Expand Up @@ -214,10 +219,11 @@ static struct platform_device tmu2_device = {
};

static struct platform_device *sh7710_devices[] __initdata = {
&scif0_device,
&scif1_device,
&tmu0_device,
&tmu1_device,
&tmu2_device,
&sci_device,
&rtc_device,
};

Expand All @@ -229,6 +235,8 @@ static int __init sh7710_devices_setup(void)
arch_initcall(sh7710_devices_setup);

static struct platform_device *sh7710_early_devices[] __initdata = {
&scif0_device,
&scif1_device,
&tmu0_device,
&tmu1_device,
&tmu2_device,
Expand Down
50 changes: 29 additions & 21 deletions trunk/arch/sh/kernel/cpu/sh3/setup-sh7720.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,33 @@ static struct platform_device rtc_device = {
},
};

static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xa4430000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 80, 80, 80, 80 },
}, {
.mapbase = 0xa4438000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 81, 81, 81, 81 },
}, {

.flags = 0,
}
};

static struct platform_device sci_device = {
static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xa4430000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 80, 80, 80, 80 },
};

static struct platform_device scif0_device = {
.name = "sh-sci",
.id = -1,
.id = 0,
.dev = {
.platform_data = &scif0_platform_data,
},
};

static struct plat_sci_port scif1_platform_data = {
.mapbase = 0xa4438000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 81, 81, 81, 81 },
};

static struct platform_device scif1_device = {
.name = "sh-sci",
.id = 1,
.dev = {
.platform_data = sci_platform_data,
.platform_data = &scif1_platform_data,
},
};

Expand Down Expand Up @@ -369,6 +374,8 @@ static struct platform_device tmu2_device = {
};

static struct platform_device *sh7720_devices[] __initdata = {
&scif0_device,
&scif1_device,
&cmt0_device,
&cmt1_device,
&cmt2_device,
Expand All @@ -378,7 +385,6 @@ static struct platform_device *sh7720_devices[] __initdata = {
&tmu1_device,
&tmu2_device,
&rtc_device,
&sci_device,
&usb_ohci_device,
&usbf_device,
};
Expand All @@ -391,6 +397,8 @@ static int __init sh7720_devices_setup(void)
arch_initcall(sh7720_devices_setup);

static struct platform_device *sh7720_early_devices[] __initdata = {
&scif0_device,
&scif1_device,
&cmt0_device,
&cmt1_device,
&cmt2_device,
Expand Down

0 comments on commit fb8e339

Please sign in to comment.