Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177033
b: refs/heads/master
c: a9571d7
h: refs/heads/master
i:
  177031: 4e9a3dd
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Dec 15, 2009
1 parent 0dcb60e commit 786a40a
Show file tree
Hide file tree
Showing 8 changed files with 552 additions and 271 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: bcac24d0535402d6e3414d3951609f12caaa1c7d
refs/heads/master: a9571d7b045eb3b38d856c6dfda1798fb67ca44c
92 changes: 62 additions & 30 deletions trunk/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,51 @@
#include <linux/mm.h>
#include <linux/sh_timer.h>

static struct plat_sci_port scif2_platform_data = {
.mapbase = 0xfe4b0000, /* SCIF2 */
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 40, 40, 40, 40 },
};

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

static struct plat_sci_port scif3_platform_data = {
.mapbase = 0xfe4c0000, /* SCIF3 */
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 76, 76, 76, 76 },
};

static struct platform_device scif3_device = {
.name = "sh-sci",
.id = 3,
.dev = {
.platform_data = &scif3_platform_data,
},
};

static struct plat_sci_port scif4_platform_data = {
.mapbase = 0xfe4d0000, /* SCIF4 */
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 104, 104, 104, 104 },
};

static struct platform_device scif4_device = {
.name = "sh-sci",
.id = 4,
.dev = {
.platform_data = &scif4_platform_data,
},
};

static struct sh_timer_config tmu0_platform_data = {
.name = "TMU0",
.channel_offset = 0x04,
Expand Down Expand Up @@ -79,39 +124,12 @@ static struct platform_device tmu1_device = {
.num_resources = ARRAY_SIZE(tmu1_resources),
};

static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xfe4b0000, /* SCIF2 */
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 40, 40, 40, 40 },
}, {
.mapbase = 0xfe4c0000, /* SCIF3 */
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 76, 76, 76, 76 },
}, {
.mapbase = 0xfe4d0000, /* SCIF4 */
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 104, 104, 104, 104 },
}, {
.flags = 0,
}
};

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

static struct platform_device *sh7757_devices[] __initdata = {
&scif2_device,
&scif3_device,
&scif4_device,
&tmu0_device,
&tmu1_device,
&sci_device,
};

static int __init sh7757_devices_setup(void)
Expand All @@ -121,6 +139,20 @@ static int __init sh7757_devices_setup(void)
}
arch_initcall(sh7757_devices_setup);

static struct platform_device *sh7757_early_devices[] __initdata = {
&scif2_device,
&scif3_device,
&scif4_device,
&tmu0_device,
&tmu1_device,
};

void __init plat_early_device_setup(void)
{
early_platform_add_devices(sh7757_early_devices,
ARRAY_SIZE(sh7757_early_devices));
}

enum {
UNUSED = 0,

Expand Down
81 changes: 51 additions & 30 deletions trunk/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,51 @@
#include <linux/io.h>
#include <linux/serial_sci.h>

static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xffe00000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 40, 40, 40, 40 },
};

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

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

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

static struct plat_sci_port scif2_platform_data = {
.mapbase = 0xffe10000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 104, 104, 104, 104 },
};

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

static struct resource rtc_resources[] = {
[0] = {
.start = 0xffe80000,
Expand All @@ -36,35 +81,6 @@ static struct platform_device rtc_device = {
.resource = rtc_resources,
};

static struct plat_sci_port sci_platform_data[] = {
{
.mapbase = 0xffe00000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 40, 40, 40, 40 },
}, {
.mapbase = 0xffe08000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 76, 76, 76, 76 },
}, {
.mapbase = 0xffe10000,
.flags = UPF_BOOT_AUTOCONF,
.type = PORT_SCIF,
.irqs = { 104, 104, 104, 104 },
}, {
.flags = 0,
}
};

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

static struct resource usb_ohci_resources[] = {
[0] = {
.start = 0xffec8000,
Expand Down Expand Up @@ -297,14 +313,16 @@ static struct platform_device tmu5_device = {
};

static struct platform_device *sh7763_devices[] __initdata = {
&scif0_device,
&scif1_device,
&scif2_device,
&tmu0_device,
&tmu1_device,
&tmu2_device,
&tmu3_device,
&tmu4_device,
&tmu5_device,
&rtc_device,
&sci_device,
&usb_ohci_device,
&usbf_device,
};
Expand All @@ -317,6 +335,9 @@ static int __init sh7763_devices_setup(void)
arch_initcall(sh7763_devices_setup);

static struct platform_device *sh7763_early_devices[] __initdata = {
&scif0_device,
&scif1_device,
&scif2_device,
&tmu0_device,
&tmu1_device,
&tmu2_device,
Expand Down
Loading

0 comments on commit 786a40a

Please sign in to comment.