@@ -24,8 +24,6 @@
#include <asm/mach/map.h>
#include <asm/sched_clock.h>
-#include <plat/devs.h>
-
static void __iomem *timer_base;
#define S3C_TIMERREG(x) (timer_base + (x))
@@ -266,9 +264,6 @@ static void samsung_timer_resume(void)
void __init samsung_set_timer_source(enum samsung_timer_mode event,
enum samsung_timer_mode source)
{
- s3c_device_timer[event].dev.bus = &platform_bus_type;
- s3c_device_timer[source].dev.bus = &platform_bus_type;
-
timer_source.event_id = event;
timer_source.source_id = source;
}
@@ -418,28 +413,24 @@ static void __init samsung_timer_resources(void)
clk_enable(timerclk);
sprintf(devname, "s3c24xx-pwm.%lu", event_id);
- s3c_device_timer[event_id].id = event_id;
- s3c_device_timer[event_id].dev.init_name = devname;
- tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin");
+ tin_event = clk_get_sys(devname, "pwm-tin");
if (IS_ERR(tin_event))
panic("failed to get pwm-tin clock for event timer");
- tdiv_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tdiv");
+ tdiv_event = clk_get_sys(devname, "pwm-tdiv");
if (IS_ERR(tdiv_event))
panic("failed to get pwm-tdiv clock for event timer");
clk_enable(tin_event);
sprintf(devname, "s3c24xx-pwm.%lu", source_id);
- s3c_device_timer[source_id].id = source_id;
- s3c_device_timer[source_id].dev.init_name = devname;
- tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin");
+ tin_source = clk_get_sys(devname, "pwm-tin");
if (IS_ERR(tin_source))
panic("failed to get pwm-tin clock for source timer");
- tdiv_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tdiv");
+ tdiv_source = clk_get_sys(devname, "pwm-tdiv");
if (IS_ERR(tdiv_source))
panic("failed to get pwm-tdiv clock for source timer");
This patch removes the need to reference platform_device structs defined in platform code, by using clk_get_sys instead of clk_get for getting necessary clocks. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com> --- drivers/clocksource/samsung-time.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-)