diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh2a/setup-mxg.c')
| -rw-r--r-- | arch/sh/kernel/cpu/sh2a/setup-mxg.c | 108 | 
1 files changed, 19 insertions, 89 deletions
diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c index f7f1cf2af30..26fcdbd4127 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c +++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c @@ -114,102 +114,36 @@ static struct intc_mask_reg mask_registers[] __initdata = {  static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups,  			 mask_registers, prio_registers, NULL); -static struct sh_timer_config mtu2_0_platform_data = { -	.channel_offset = -0x80, -	.timer_bit = 0, -	.clockevent_rating = 200, +static struct resource mtu2_resources[] = { +	DEFINE_RES_MEM(0xff801000, 0x400), +	DEFINE_RES_IRQ_NAMED(228, "tgi0a"), +	DEFINE_RES_IRQ_NAMED(234, "tgi1a"), +	DEFINE_RES_IRQ_NAMED(240, "tgi2a"),  }; -static struct resource mtu2_0_resources[] = { -	[0] = { -		.start	= 0xff801300, -		.end	= 0xff801326, -		.flags	= IORESOURCE_MEM, -	}, -	[1] = { -		.start	= 228, -		.flags	= IORESOURCE_IRQ, -	}, -}; - -static struct platform_device mtu2_0_device = { -	.name		= "sh_mtu2", -	.id		= 0, -	.dev = { -		.platform_data	= &mtu2_0_platform_data, -	}, -	.resource	= mtu2_0_resources, -	.num_resources	= ARRAY_SIZE(mtu2_0_resources), -}; - -static struct sh_timer_config mtu2_1_platform_data = { -	.channel_offset = -0x100, -	.timer_bit = 1, -	.clockevent_rating = 200, -}; - -static struct resource mtu2_1_resources[] = { -	[0] = { -		.start	= 0xff801380, -		.end	= 0xff801390, -		.flags	= IORESOURCE_MEM, -	}, -	[1] = { -		.start	= 234, -		.flags	= IORESOURCE_IRQ, -	}, -}; - -static struct platform_device mtu2_1_device = { -	.name		= "sh_mtu2", -	.id		= 1, -	.dev = { -		.platform_data	= &mtu2_1_platform_data, -	}, -	.resource	= mtu2_1_resources, -	.num_resources	= ARRAY_SIZE(mtu2_1_resources), -}; - -static struct sh_timer_config mtu2_2_platform_data = { -	.channel_offset = 0x80, -	.timer_bit = 2, -	.clockevent_rating = 200, -}; - -static struct resource mtu2_2_resources[] = { -	[0] = { -		.start	= 0xff801000, -		.end	= 0xff80100a, -		.flags	= IORESOURCE_MEM, -	}, -	[1] = { -		.start	= 240, -		.flags	= IORESOURCE_IRQ, -	}, -}; - -static struct platform_device mtu2_2_device = { -	.name		= "sh_mtu2", -	.id		= 2, -	.dev = { -		.platform_data	= &mtu2_2_platform_data, -	}, -	.resource	= mtu2_2_resources, -	.num_resources	= ARRAY_SIZE(mtu2_2_resources), +static struct platform_device mtu2_device = { +	.name		= "sh-mtu2", +	.id		= -1, +	.resource	= mtu2_resources, +	.num_resources	= ARRAY_SIZE(mtu2_resources),  };  static struct plat_sci_port scif0_platform_data = { -	.mapbase	= 0xff804000,  	.flags		= UPF_BOOT_AUTOCONF,  	.scscr		= SCSCR_RE | SCSCR_TE | SCSCR_REIE, -	.scbrr_algo_id	= SCBRR_ALGO_2,  	.type		= PORT_SCIF, -	.irqs		= SCIx_IRQ_MUXED(220), +}; + +static struct resource scif0_resources[] = { +	DEFINE_RES_MEM(0xff804000, 0x100), +	DEFINE_RES_IRQ(220),  };  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,  	}, @@ -217,9 +151,7 @@ static struct platform_device scif0_device = {  static struct platform_device *mxg_devices[] __initdata = {  	&scif0_device, -	&mtu2_0_device, -	&mtu2_1_device, -	&mtu2_2_device, +	&mtu2_device,  };  static int __init mxg_devices_setup(void) @@ -236,9 +168,7 @@ void __init plat_irq_setup(void)  static struct platform_device *mxg_early_devices[] __initdata = {  	&scif0_device, -	&mtu2_0_device, -	&mtu2_1_device, -	&mtu2_2_device, +	&mtu2_device,  };  void __init plat_early_device_setup(void)  | 
