Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46a12f74 authored by Paul Mundt's avatar Paul Mundt
Browse files

sh: Consolidate MTU2/CMT/TMU timer platform data.



All of the SH timers use a roughly identical structure for platform data,
which presently is broken out for each block. Consolidate all of these
definitions, as there is no reason for them to be broken out in the first
place.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent d43a41bf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#include <linux/init.h>
#include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/sh_cmt.h>
#include <linux/sh_timer.h>
#include <linux/io.h>

enum {
@@ -111,7 +111,7 @@ static struct platform_device eth_device = {
	.resource = eth_resources,
};

static struct sh_cmt_config cmt0_platform_data = {
static struct sh_timer_config cmt0_platform_data = {
	.name = "CMT0",
	.channel_offset = 0x02,
	.timer_bit = 0,
@@ -143,7 +143,7 @@ static struct platform_device cmt0_device = {
	.num_resources	= ARRAY_SIZE(cmt0_resources),
};

static struct sh_cmt_config cmt1_platform_data = {
static struct sh_timer_config cmt1_platform_data = {
	.name = "CMT1",
	.channel_offset = 0x08,
	.timer_bit = 1,
+4 −4
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
#include <linux/init.h>
#include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/sh_mtu2.h>
#include <linux/sh_timer.h>

enum {
	UNUSED = 0,
@@ -114,7 +114,7 @@ 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_mtu2_config mtu2_0_platform_data = {
static struct sh_timer_config mtu2_0_platform_data = {
	.name = "MTU2_0",
	.channel_offset = -0x80,
	.timer_bit = 0,
@@ -145,7 +145,7 @@ static struct platform_device mtu2_0_device = {
	.num_resources	= ARRAY_SIZE(mtu2_0_resources),
};

static struct sh_mtu2_config mtu2_1_platform_data = {
static struct sh_timer_config mtu2_1_platform_data = {
	.name = "MTU2_1",
	.channel_offset = -0x100,
	.timer_bit = 1,
@@ -176,7 +176,7 @@ static struct platform_device mtu2_1_device = {
	.num_resources	= ARRAY_SIZE(mtu2_1_resources),
};

static struct sh_mtu2_config mtu2_2_platform_data = {
static struct sh_timer_config mtu2_2_platform_data = {
	.name = "MTU2_2",
	.channel_offset = 0x80,
	.timer_bit = 2,
+4 −4
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#include <linux/init.h>
#include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/sh_mtu2.h>
#include <linux/sh_timer.h>
#include <linux/io.h>

enum {
@@ -251,7 +251,7 @@ static struct platform_device rtc_device = {
	.resource	= rtc_resources,
};

static struct sh_mtu2_config mtu2_0_platform_data = {
static struct sh_timer_config mtu2_0_platform_data = {
	.name = "MTU2_0",
	.channel_offset = -0x80,
	.timer_bit = 0,
@@ -282,7 +282,7 @@ static struct platform_device mtu2_0_device = {
	.num_resources	= ARRAY_SIZE(mtu2_0_resources),
};

static struct sh_mtu2_config mtu2_1_platform_data = {
static struct sh_timer_config mtu2_1_platform_data = {
	.name = "MTU2_1",
	.channel_offset = -0x100,
	.timer_bit = 1,
@@ -313,7 +313,7 @@ static struct platform_device mtu2_1_device = {
	.num_resources	= ARRAY_SIZE(mtu2_1_resources),
};

static struct sh_mtu2_config mtu2_2_platform_data = {
static struct sh_timer_config mtu2_2_platform_data = {
	.name = "MTU2_2",
	.channel_offset = 0x80,
	.timer_bit = 2,
+5 −6
Original line number Diff line number Diff line
@@ -11,8 +11,7 @@
#include <linux/init.h>
#include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/sh_cmt.h>
#include <linux/sh_mtu2.h>
#include <linux/sh_timer.h>
#include <linux/io.h>

enum {
@@ -208,7 +207,7 @@ static struct platform_device sci_device = {
	},
};

static struct sh_cmt_config cmt0_platform_data = {
static struct sh_timer_config cmt0_platform_data = {
	.name = "CMT0",
	.channel_offset = 0x02,
	.timer_bit = 0,
@@ -240,7 +239,7 @@ static struct platform_device cmt0_device = {
	.num_resources	= ARRAY_SIZE(cmt0_resources),
};

static struct sh_cmt_config cmt1_platform_data = {
static struct sh_timer_config cmt1_platform_data = {
	.name = "CMT1",
	.channel_offset = 0x08,
	.timer_bit = 1,
@@ -272,7 +271,7 @@ static struct platform_device cmt1_device = {
	.num_resources	= ARRAY_SIZE(cmt1_resources),
};

static struct sh_mtu2_config mtu2_0_platform_data = {
static struct sh_timer_config mtu2_0_platform_data = {
	.name = "MTU2_0",
	.channel_offset = -0x80,
	.timer_bit = 0,
@@ -303,7 +302,7 @@ static struct platform_device mtu2_0_device = {
	.num_resources	= ARRAY_SIZE(mtu2_0_resources),
};

static struct sh_mtu2_config mtu2_1_platform_data = {
static struct sh_timer_config mtu2_1_platform_data = {
	.name = "MTU2_1",
	.channel_offset = -0x100,
	.timer_bit = 1,
+6 −7
Original line number Diff line number Diff line
@@ -12,8 +12,7 @@
#include <linux/init.h>
#include <linux/serial.h>
#include <linux/serial_sci.h>
#include <linux/sh_cmt.h>
#include <linux/sh_mtu2.h>
#include <linux/sh_timer.h>
#include <linux/io.h>

enum {
@@ -168,7 +167,7 @@ static struct platform_device sci_device = {
	},
};

static struct sh_cmt_config cmt0_platform_data = {
static struct sh_timer_config cmt0_platform_data = {
	.name = "CMT0",
	.channel_offset = 0x02,
	.timer_bit = 0,
@@ -200,7 +199,7 @@ static struct platform_device cmt0_device = {
	.num_resources	= ARRAY_SIZE(cmt0_resources),
};

static struct sh_cmt_config cmt1_platform_data = {
static struct sh_timer_config cmt1_platform_data = {
	.name = "CMT1",
	.channel_offset = 0x08,
	.timer_bit = 1,
@@ -232,7 +231,7 @@ static struct platform_device cmt1_device = {
	.num_resources	= ARRAY_SIZE(cmt1_resources),
};

static struct sh_mtu2_config mtu2_0_platform_data = {
static struct sh_timer_config mtu2_0_platform_data = {
	.name = "MTU2_0",
	.channel_offset = -0x80,
	.timer_bit = 0,
@@ -263,7 +262,7 @@ static struct platform_device mtu2_0_device = {
	.num_resources	= ARRAY_SIZE(mtu2_0_resources),
};

static struct sh_mtu2_config mtu2_1_platform_data = {
static struct sh_timer_config mtu2_1_platform_data = {
	.name = "MTU2_1",
	.channel_offset = -0x100,
	.timer_bit = 1,
@@ -294,7 +293,7 @@ static struct platform_device mtu2_1_device = {
	.num_resources	= ARRAY_SIZE(mtu2_1_resources),
};

static struct sh_mtu2_config mtu2_2_platform_data = {
static struct sh_timer_config mtu2_2_platform_data = {
	.name = "MTU2_2",
	.channel_offset = 0x80,
	.timer_bit = 2,
Loading