diff options
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/timer.c | 12 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/dmtimer.h | 7 |
4 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c index 7814e83fd03f..afad69c6ba6e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | |||
| @@ -68,7 +68,6 @@ static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = { | |||
| 68 | struct omap_hwmod_class omap2xxx_timer_hwmod_class = { | 68 | struct omap_hwmod_class omap2xxx_timer_hwmod_class = { |
| 69 | .name = "timer", | 69 | .name = "timer", |
| 70 | .sysc = &omap2xxx_timer_sysc, | 70 | .sysc = &omap2xxx_timer_sysc, |
| 71 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
| 72 | }; | 71 | }; |
| 73 | 72 | ||
| 74 | /* | 73 | /* |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 7b330944b3f7..0ea53bcc7d18 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -129,7 +129,6 @@ static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { | |||
| 129 | static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = { | 129 | static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = { |
| 130 | .name = "timer", | 130 | .name = "timer", |
| 131 | .sysc = &omap3xxx_timer_1ms_sysc, | 131 | .sysc = &omap3xxx_timer_1ms_sysc, |
| 132 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
| 133 | }; | 132 | }; |
| 134 | 133 | ||
| 135 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { | 134 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { |
| @@ -145,7 +144,6 @@ static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { | |||
| 145 | static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { | 144 | static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { |
| 146 | .name = "timer", | 145 | .name = "timer", |
| 147 | .sysc = &omap3xxx_timer_sysc, | 146 | .sysc = &omap3xxx_timer_sysc, |
| 148 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
| 149 | }; | 147 | }; |
| 150 | 148 | ||
| 151 | /* secure timers dev attribute */ | 149 | /* secure timers dev attribute */ |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index d8a5dc3d695f..8c046d9d8ae8 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
| @@ -397,7 +397,6 @@ OMAP_SYS_TIMER(4) | |||
| 397 | static int omap2_dm_timer_set_src(struct platform_device *pdev, int source) | 397 | static int omap2_dm_timer_set_src(struct platform_device *pdev, int source) |
| 398 | { | 398 | { |
| 399 | int ret; | 399 | int ret; |
| 400 | struct dmtimer_platform_data *pdata = pdev->dev.platform_data; | ||
| 401 | struct clk *fclk, *parent; | 400 | struct clk *fclk, *parent; |
| 402 | char *parent_name = NULL; | 401 | char *parent_name = NULL; |
| 403 | 402 | ||
| @@ -418,14 +417,8 @@ static int omap2_dm_timer_set_src(struct platform_device *pdev, int source) | |||
| 418 | break; | 417 | break; |
| 419 | 418 | ||
| 420 | case OMAP_TIMER_SRC_EXT_CLK: | 419 | case OMAP_TIMER_SRC_EXT_CLK: |
| 421 | if (pdata->timer_ip_version == OMAP_TIMER_IP_VERSION_1) { | 420 | parent_name = "alt_ck"; |
| 422 | parent_name = "alt_ck"; | 421 | break; |
| 423 | break; | ||
| 424 | } | ||
| 425 | dev_err(&pdev->dev, "%s: %d: invalid clk src.\n", | ||
| 426 | __func__, __LINE__); | ||
| 427 | clk_put(fclk); | ||
| 428 | return -EINVAL; | ||
| 429 | } | 422 | } |
| 430 | 423 | ||
| 431 | parent = clk_get(&pdev->dev, parent_name); | 424 | parent = clk_get(&pdev->dev, parent_name); |
| @@ -498,7 +491,6 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused) | |||
| 498 | sscanf(oh->name, "timer%2d", &id); | 491 | sscanf(oh->name, "timer%2d", &id); |
| 499 | 492 | ||
| 500 | pdata->set_timer_src = omap2_dm_timer_set_src; | 493 | pdata->set_timer_src = omap2_dm_timer_set_src; |
| 501 | pdata->timer_ip_version = oh->class->rev; | ||
| 502 | 494 | ||
| 503 | if (timer_dev_attr) | 495 | if (timer_dev_attr) |
| 504 | pdata->timer_capability = timer_dev_attr->timer_capability; | 496 | pdata->timer_capability = timer_dev_attr->timer_capability; |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index 48e54caf9001..362cf97d721c 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
| @@ -55,12 +55,6 @@ | |||
| 55 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 | 55 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 |
| 56 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 | 56 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 |
| 57 | 57 | ||
| 58 | /* | ||
| 59 | * IP revision identifier so that Highlander IP | ||
| 60 | * in OMAP4 can be distinguished. | ||
| 61 | */ | ||
| 62 | #define OMAP_TIMER_IP_VERSION_1 0x1 | ||
| 63 | |||
| 64 | /* timer capabilities used in hwmod database */ | 58 | /* timer capabilities used in hwmod database */ |
| 65 | #define OMAP_TIMER_SECURE 0x80000000 | 59 | #define OMAP_TIMER_SECURE 0x80000000 |
| 66 | #define OMAP_TIMER_ALWON 0x40000000 | 60 | #define OMAP_TIMER_ALWON 0x40000000 |
| @@ -96,7 +90,6 @@ struct timer_regs { | |||
| 96 | 90 | ||
| 97 | struct dmtimer_platform_data { | 91 | struct dmtimer_platform_data { |
| 98 | int (*set_timer_src)(struct platform_device *pdev, int source); | 92 | int (*set_timer_src)(struct platform_device *pdev, int source); |
| 99 | int timer_ip_version; | ||
| 100 | u32 needs_manual_reset:1; | 93 | u32 needs_manual_reset:1; |
| 101 | bool loses_context; | 94 | bool loses_context; |
| 102 | 95 | ||
