diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4/setup-sh4-202.c')
| -rw-r--r-- | arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 94 | 
1 files changed, 16 insertions, 78 deletions
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index 2a5320aa73b..e7a7b3cdf68 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c @@ -17,45 +17,42 @@  #include <linux/io.h>  static struct plat_sci_port scif0_platform_data = { -	.mapbase	= 0xffe80000,  	.flags		= UPF_BOOT_AUTOCONF,  	.scscr		= SCSCR_RE | SCSCR_TE | SCSCR_REIE, -	.scbrr_algo_id	= SCBRR_ALGO_2,  	.type		= PORT_SCIF, -	.irqs		= { evt2irq(0x700), -			    evt2irq(0x720), -			    evt2irq(0x760), -			    evt2irq(0x740) }, +}; + +static struct resource scif0_resources[] = { +	DEFINE_RES_MEM(0xffe80000, 0x100), +	DEFINE_RES_IRQ(evt2irq(0x700)), +	DEFINE_RES_IRQ(evt2irq(0x720)), +	DEFINE_RES_IRQ(evt2irq(0x760)), +	DEFINE_RES_IRQ(evt2irq(0x740)),  };  static struct platform_device scif0_device = {  	.name		= "sh-sci",  	.id		= 0, +	.resource	= scif0_resources, +	.num_resources	= ARRAY_SIZE(scif0_resources),  	.dev		= {  		.platform_data	= &scif0_platform_data,  	},  };  static struct sh_timer_config tmu0_platform_data = { -	.channel_offset = 0x04, -	.timer_bit = 0, -	.clockevent_rating = 200, +	.channels_mask = 7,  };  static struct resource tmu0_resources[] = { -	[0] = { -		.start	= 0xffd80008, -		.end	= 0xffd80013, -		.flags	= IORESOURCE_MEM, -	}, -	[1] = { -		.start	= evt2irq(0x400), -		.flags	= IORESOURCE_IRQ, -	}, +	DEFINE_RES_MEM(0xffd80000, 0x30), +	DEFINE_RES_IRQ(evt2irq(0x400)), +	DEFINE_RES_IRQ(evt2irq(0x420)), +	DEFINE_RES_IRQ(evt2irq(0x440)),  };  static struct platform_device tmu0_device = { -	.name		= "sh_tmu", +	.name		= "sh-tmu",  	.id		= 0,  	.dev = {  		.platform_data	= &tmu0_platform_data, @@ -64,66 +61,9 @@ static struct platform_device tmu0_device = {  	.num_resources	= ARRAY_SIZE(tmu0_resources),  }; -static struct sh_timer_config tmu1_platform_data = { -	.channel_offset = 0x10, -	.timer_bit = 1, -	.clocksource_rating = 200, -}; - -static struct resource tmu1_resources[] = { -	[0] = { -		.start	= 0xffd80014, -		.end	= 0xffd8001f, -		.flags	= IORESOURCE_MEM, -	}, -	[1] = { -		.start	= evt2irq(0x420), -		.flags	= IORESOURCE_IRQ, -	}, -}; - -static struct platform_device tmu1_device = { -	.name		= "sh_tmu", -	.id		= 1, -	.dev = { -		.platform_data	= &tmu1_platform_data, -	}, -	.resource	= tmu1_resources, -	.num_resources	= ARRAY_SIZE(tmu1_resources), -}; - -static struct sh_timer_config tmu2_platform_data = { -	.channel_offset = 0x1c, -	.timer_bit = 2, -}; - -static struct resource tmu2_resources[] = { -	[0] = { -		.start	= 0xffd80020, -		.end	= 0xffd8002f, -		.flags	= IORESOURCE_MEM, -	}, -	[1] = { -		.start	= evt2irq(0x440), -		.flags	= IORESOURCE_IRQ, -	}, -}; - -static struct platform_device tmu2_device = { -	.name		= "sh_tmu", -	.id		= 2, -	.dev = { -		.platform_data	= &tmu2_platform_data, -	}, -	.resource	= tmu2_resources, -	.num_resources	= ARRAY_SIZE(tmu2_resources), -}; -  static struct platform_device *sh4202_devices[] __initdata = {  	&scif0_device,  	&tmu0_device, -	&tmu1_device, -	&tmu2_device,  };  static int __init sh4202_devices_setup(void) @@ -136,8 +76,6 @@ arch_initcall(sh4202_devices_setup);  static struct platform_device *sh4202_early_devices[] __initdata = {  	&scif0_device,  	&tmu0_device, -	&tmu1_device, -	&tmu2_device,  };  void __init plat_early_device_setup(void)  | 
