From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/12] clocksource: samsung-time: Use clk_get_sys for getting clocks
Date: Sun, 10 Feb 2013 14:20:18 +0100 [thread overview]
Message-ID: <1360502423-2246-8-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1360502423-2246-1-git-send-email-tomasz.figa@gmail.com>
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(-)
diff --git a/drivers/clocksource/samsung-time.c b/drivers/clocksource/samsung-time.c
index d847036..29fc63f 100644
--- a/drivers/clocksource/samsung-time.c
+++ b/drivers/clocksource/samsung-time.c
@@ -23,8 +23,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))
@@ -335,9 +333,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;
}
@@ -485,28 +480,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");
--
1.8.1.2
next prev parent reply other threads:[~2013-02-10 13:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-10 13:20 [PATCH 00/12] ARM: samsung-time: Prepare for multiplatform support Tomasz Figa
2013-02-10 13:20 ` [PATCH 01/12] ARM: SAMSUNG: Move samsung-time to drivers/clocksource Tomasz Figa
2013-02-10 13:20 ` [PATCH 02/12] clocksource: samsung-time: Set platform-specific parameters at runtime Tomasz Figa
2013-02-10 13:20 ` [PATCH 03/12] clocksource: samsung-time: Drop useless defines from public header Tomasz Figa
2013-02-10 13:20 ` [PATCH 04/12] clocksource: samsung-time: Move samsung-time.h header to include/linux Tomasz Figa
2013-02-11 10:36 ` Mark Rutland
2013-02-11 23:32 ` Tomasz Figa
2013-02-10 13:20 ` [PATCH 05/12] clocksource: samsung-time: Use local register definitions Tomasz Figa
2013-02-10 13:20 ` [PATCH 06/12] clocksource: samsung-time: Remove use of static register mapping Tomasz Figa
2013-02-10 13:20 ` Tomasz Figa [this message]
2013-02-10 13:20 ` [PATCH 08/12] ARM: SAMSUNG: devs: Drop unnecessary IRQ resources of timer devices Tomasz Figa
2013-02-10 13:20 ` [PATCH 09/12] clocksource: samsung-time: Do not use static IRQ definition Tomasz Figa
2013-02-10 13:20 ` [PATCH 10/12] clocksource: samsung-time: Move IRQ mask/ack handling to the driver Tomasz Figa
2013-02-10 13:20 ` [PATCH 11/12] ARM: SAMSUNG: Remove unused PWM timer IRQ chip code Tomasz Figa
2013-02-10 13:20 ` [PATCH 12/12] clocksource: samsung-time: Add Device Tree support Tomasz Figa
2013-02-11 11:00 ` Mark Rutland
2013-02-11 23:46 ` Tomasz Figa
2013-02-12 11:06 ` Mark Rutland
2013-02-10 13:32 ` [PATCH 00/12] ARM: samsung-time: Prepare for multiplatform support Tomasz Figa
2013-02-10 14:12 ` Kyungmin Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360502423-2246-8-git-send-email-tomasz.figa@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).