projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux...
[platform/adaptation/renesas_rcar/renesas_kernel.git]
/
arch
/
sh
/
kernel
/
cpu
/
sh4
/
setup-sh7750.c
diff --git
a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
index
51a945e
..
c2b0aaa
100644
(file)
--- a/
arch/sh/kernel/cpu/sh4/setup-sh7750.c
+++ b/
arch/sh/kernel/cpu/sh4/setup-sh7750.c
@@
-39,16
+39,17
@@
static struct platform_device rtc_device = {
static struct plat_sci_port sci_platform_data = {
.mapbase = 0xffe00000,
.flags = UPF_BOOT_AUTOCONF,
static struct plat_sci_port sci_platform_data = {
.mapbase = 0xffe00000,
.flags = UPF_BOOT_AUTOCONF,
- .type = PORT_SCI,
.scscr = SCSCR_TE | SCSCR_RE,
.scbrr_algo_id = SCBRR_ALGO_2,
.scscr = SCSCR_TE | SCSCR_RE,
.scbrr_algo_id = SCBRR_ALGO_2,
+ .type = PORT_SCI,
.irqs = { 23, 23, 23, 0 },
};
static struct platform_device sci_device = {
.name = "sh-sci",
.irqs = { 23, 23, 23, 0 },
};
static struct platform_device sci_device = {
.name = "sh-sci",
+ .id = 0,
.dev = {
.dev = {
- .platform_data = sci_platform_data,
+ .platform_data =
&
sci_platform_data,
},
};
},
};
@@
-63,22
+64,20
@@
static struct plat_sci_port scif_platform_data = {
static struct platform_device scif_device = {
.name = "sh-sci",
static struct platform_device scif_device = {
.name = "sh-sci",
+ .id = 1,
.dev = {
.dev = {
- .platform_data = scif_platform_data,
+ .platform_data =
&
scif_platform_data,
},
};
static struct sh_timer_config tmu0_platform_data = {
},
};
static struct sh_timer_config tmu0_platform_data = {
- .name = "TMU0",
.channel_offset = 0x04,
.timer_bit = 0,
.channel_offset = 0x04,
.timer_bit = 0,
- .clk = "peripheral_clk",
.clockevent_rating = 200,
};
static struct resource tmu0_resources[] = {
[0] = {
.clockevent_rating = 200,
};
static struct resource tmu0_resources[] = {
[0] = {
- .name = "TMU0",
.start = 0xffd80008,
.end = 0xffd80013,
.flags = IORESOURCE_MEM,
.start = 0xffd80008,
.end = 0xffd80013,
.flags = IORESOURCE_MEM,
@@
-100,16
+99,13
@@
static struct platform_device tmu0_device = {
};
static struct sh_timer_config tmu1_platform_data = {
};
static struct sh_timer_config tmu1_platform_data = {
- .name = "TMU1",
.channel_offset = 0x10,
.timer_bit = 1,
.channel_offset = 0x10,
.timer_bit = 1,
- .clk = "peripheral_clk",
.clocksource_rating = 200,
};
static struct resource tmu1_resources[] = {
[0] = {
.clocksource_rating = 200,
};
static struct resource tmu1_resources[] = {
[0] = {
- .name = "TMU1",
.start = 0xffd80014,
.end = 0xffd8001f,
.flags = IORESOURCE_MEM,
.start = 0xffd80014,
.end = 0xffd8001f,
.flags = IORESOURCE_MEM,
@@
-131,15
+127,12
@@
static struct platform_device tmu1_device = {
};
static struct sh_timer_config tmu2_platform_data = {
};
static struct sh_timer_config tmu2_platform_data = {
- .name = "TMU2",
.channel_offset = 0x1c,
.timer_bit = 2,
.channel_offset = 0x1c,
.timer_bit = 2,
- .clk = "peripheral_clk",
};
static struct resource tmu2_resources[] = {
[0] = {
};
static struct resource tmu2_resources[] = {
[0] = {
- .name = "TMU2",
.start = 0xffd80020,
.end = 0xffd8002f,
.flags = IORESOURCE_MEM,
.start = 0xffd80020,
.end = 0xffd8002f,
.flags = IORESOURCE_MEM,
@@
-166,15
+159,12
@@
static struct platform_device tmu2_device = {
defined(CONFIG_CPU_SUBTYPE_SH7751R)
static struct sh_timer_config tmu3_platform_data = {
defined(CONFIG_CPU_SUBTYPE_SH7751R)
static struct sh_timer_config tmu3_platform_data = {
- .name = "TMU3",
.channel_offset = 0x04,
.timer_bit = 0,
.channel_offset = 0x04,
.timer_bit = 0,
- .clk = "peripheral_clk",
};
static struct resource tmu3_resources[] = {
[0] = {
};
static struct resource tmu3_resources[] = {
[0] = {
- .name = "TMU3",
.start = 0xfe100008,
.end = 0xfe100013,
.flags = IORESOURCE_MEM,
.start = 0xfe100008,
.end = 0xfe100013,
.flags = IORESOURCE_MEM,
@@
-196,15
+186,12
@@
static struct platform_device tmu3_device = {
};
static struct sh_timer_config tmu4_platform_data = {
};
static struct sh_timer_config tmu4_platform_data = {
- .name = "TMU4",
.channel_offset = 0x10,
.timer_bit = 1,
.channel_offset = 0x10,
.timer_bit = 1,
- .clk = "peripheral_clk",
};
static struct resource tmu4_resources[] = {
[0] = {
};
static struct resource tmu4_resources[] = {
[0] = {
- .name = "TMU4",
.start = 0xfe100014,
.end = 0xfe10001f,
.flags = IORESOURCE_MEM,
.start = 0xfe100014,
.end = 0xfe10001f,
.flags = IORESOURCE_MEM,
@@
-243,7
+230,6
@@
static struct platform_device *sh7750_devices[] __initdata = {
static int __init sh7750_devices_setup(void)
{
if (mach_is_rts7751r2d()) {
static int __init sh7750_devices_setup(void)
{
if (mach_is_rts7751r2d()) {
- scif_platform_data.scscr |= SCSCR_CKE1;
platform_register_device(&scif_device);
} else {
platform_register_device(&sci_device);
platform_register_device(&scif_device);
} else {
platform_register_device(&sci_device);
@@
-253,7
+239,7
@@
static int __init sh7750_devices_setup(void)
return platform_add_devices(sh7750_devices,
ARRAY_SIZE(sh7750_devices));
}
return platform_add_devices(sh7750_devices,
ARRAY_SIZE(sh7750_devices));
}
-
_
_initcall(sh7750_devices_setup);
+
arch
_initcall(sh7750_devices_setup);
static struct platform_device *sh7750_early_devices[] __initdata = {
&tmu0_device,
static struct platform_device *sh7750_early_devices[] __initdata = {
&tmu0_device,
@@
-269,6
+255,14
@@
static struct platform_device *sh7750_early_devices[] __initdata = {
void __init plat_early_device_setup(void)
{
void __init plat_early_device_setup(void)
{
+ if (mach_is_rts7751r2d()) {
+ scif_platform_data.scscr |= SCSCR_CKE1;
+ early_platform_add_devices(&scif_device, 1);
+ } else {
+ early_platform_add_devices(&sci_device, 1);
+ early_platform_add_devices(&scif_device, 1);
+ }
+
early_platform_add_devices(sh7750_early_devices,
ARRAY_SIZE(sh7750_early_devices));
}
early_platform_add_devices(sh7750_early_devices,
ARRAY_SIZE(sh7750_early_devices));
}
@@
-449,7
+443,7
@@
void __init plat_irq_setup_pins(int mode)
switch (mode) {
case IRQ_MODE_IRQ: /* individual interrupt mode for IRL3-0 */
switch (mode) {
case IRQ_MODE_IRQ: /* individual interrupt mode for IRL3-0 */
-
ctrl_outw(ctrl_in
w(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
+
__raw_writew(__raw_read
w(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
register_intc_controller(&intc_desc_irlm);
break;
default:
register_intc_controller(&intc_desc_irlm);
break;
default: