All of lore.kernel.org
 help / color / mirror / Atom feed
From: ivan.khoronzhuk@ti.com (Ivan Khoronzhuk)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone
Date: Thu, 6 Feb 2014 16:09:41 +0200	[thread overview]
Message-ID: <52F397A5.8030201@ti.com> (raw)
In-Reply-To: <20140206003526.GQ20228@joshc.qualcomm.com>

On 02/06/2014 02:35 AM, Josh Cartwright wrote:
> Hey Ivan-
>
> On Wed, Feb 05, 2014 at 03:47:38PM +0200, Ivan Khoronzhuk wrote:
>> Add broadcast clock-event device for the Keystone arch.
>>
>> The timer can be configured as a general-purpose 64-bit timer,
>> dual general-purpose 32-bit timers. When configured as dual 32-bit
>> timers, each half can operate in conjunction (chain mode) or
>> independently (unchained mode) of each other.
>>
>> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
>> Acked-by: Santosh shilimkar <santosh.shilimkar@ti.com>
>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
>> ---
>>   drivers/clocksource/Makefile         |   1 +
>>   drivers/clocksource/timer-keystone.c | 233 +++++++++++++++++++++++++++++++++++
>>   2 files changed, 234 insertions(+)
>>   create mode 100644 drivers/clocksource/timer-keystone.c
>>
>> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
>> index c7ca50a..4abe5aa 100644
>> --- a/drivers/clocksource/Makefile
>> +++ b/drivers/clocksource/Makefile
>> @@ -37,3 +37,4 @@ obj-$(CONFIG_ARM_ARCH_TIMER)		+= arm_arch_timer.o
>>   obj-$(CONFIG_ARM_GLOBAL_TIMER)		+= arm_global_timer.o
>>   obj-$(CONFIG_CLKSRC_METAG_GENERIC)	+= metag_generic.o
>>   obj-$(CONFIG_ARCH_HAS_TICK_BROADCAST)	+= dummy_timer.o
>> +obj-$(CONFIG_ARCH_KEYSTONE)		+= timer-keystone.o
>> diff --git a/drivers/clocksource/timer-keystone.c b/drivers/clocksource/timer-keystone.c
>> new file mode 100644
>> index 0000000..2299666
>> --- /dev/null
>> +++ b/drivers/clocksource/timer-keystone.c
>> +static void __init keystone_timer_init(struct device_node *np)
>> +{
>> +	struct clock_event_device *event_dev = &timer.event_dev;
>> +	unsigned long rate;
>> +	struct clk *clk;
>> +	int irq, error;
>> +	u32 tgcr;
>> +
>> +	irq  = irq_of_parse_and_map(np, 0);
>> +	if (irq == NO_IRQ) {
>> +		pr_err("%s: failed to map interrupts\n", __func__);
>> +		return;
>> +	}
>> +
>> +	timer.base = of_iomap(np, 0);
>> +	if (!timer.base) {
>> +		pr_err("%s: failed to map registers\n", __func__);
>> +		return;
>> +	}
>> +
>> +	clk = of_clk_get(np, 0);
>> +	if (!clk) {
> This condition should be IS_ERR(clk).

Thanks Josh,
I'll fix it.

-- 
Regards,
Ivan Khoronzhuk

WARNING: multiple messages have this Message-ID (diff)
From: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
To: Josh Cartwright <joshc@codeaurora.org>
Cc: santosh.shilimkar@ti.com, rob@landley.net,
	linux@arm.linux.org.uk, galak@codeaurora.org,
	mark.rutland@arm.com, devicetree@vger.kernel.org,
	grygorii.strashko@ti.com, pawel.moll@arm.com,
	ijc+devicetree@hellion.org.uk, daniel.lezcano@linaro.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, tglx@linutronix.de,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone
Date: Thu, 6 Feb 2014 16:09:41 +0200	[thread overview]
Message-ID: <52F397A5.8030201@ti.com> (raw)
In-Reply-To: <20140206003526.GQ20228@joshc.qualcomm.com>

On 02/06/2014 02:35 AM, Josh Cartwright wrote:
> Hey Ivan-
>
> On Wed, Feb 05, 2014 at 03:47:38PM +0200, Ivan Khoronzhuk wrote:
>> Add broadcast clock-event device for the Keystone arch.
>>
>> The timer can be configured as a general-purpose 64-bit timer,
>> dual general-purpose 32-bit timers. When configured as dual 32-bit
>> timers, each half can operate in conjunction (chain mode) or
>> independently (unchained mode) of each other.
>>
>> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
>> Acked-by: Santosh shilimkar <santosh.shilimkar@ti.com>
>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
>> ---
>>   drivers/clocksource/Makefile         |   1 +
>>   drivers/clocksource/timer-keystone.c | 233 +++++++++++++++++++++++++++++++++++
>>   2 files changed, 234 insertions(+)
>>   create mode 100644 drivers/clocksource/timer-keystone.c
>>
>> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
>> index c7ca50a..4abe5aa 100644
>> --- a/drivers/clocksource/Makefile
>> +++ b/drivers/clocksource/Makefile
>> @@ -37,3 +37,4 @@ obj-$(CONFIG_ARM_ARCH_TIMER)		+= arm_arch_timer.o
>>   obj-$(CONFIG_ARM_GLOBAL_TIMER)		+= arm_global_timer.o
>>   obj-$(CONFIG_CLKSRC_METAG_GENERIC)	+= metag_generic.o
>>   obj-$(CONFIG_ARCH_HAS_TICK_BROADCAST)	+= dummy_timer.o
>> +obj-$(CONFIG_ARCH_KEYSTONE)		+= timer-keystone.o
>> diff --git a/drivers/clocksource/timer-keystone.c b/drivers/clocksource/timer-keystone.c
>> new file mode 100644
>> index 0000000..2299666
>> --- /dev/null
>> +++ b/drivers/clocksource/timer-keystone.c
>> +static void __init keystone_timer_init(struct device_node *np)
>> +{
>> +	struct clock_event_device *event_dev = &timer.event_dev;
>> +	unsigned long rate;
>> +	struct clk *clk;
>> +	int irq, error;
>> +	u32 tgcr;
>> +
>> +	irq  = irq_of_parse_and_map(np, 0);
>> +	if (irq == NO_IRQ) {
>> +		pr_err("%s: failed to map interrupts\n", __func__);
>> +		return;
>> +	}
>> +
>> +	timer.base = of_iomap(np, 0);
>> +	if (!timer.base) {
>> +		pr_err("%s: failed to map registers\n", __func__);
>> +		return;
>> +	}
>> +
>> +	clk = of_clk_get(np, 0);
>> +	if (!clk) {
> This condition should be IS_ERR(clk).

Thanks Josh,
I'll fix it.

-- 
Regards,
Ivan Khoronzhuk


WARNING: multiple messages have this Message-ID (diff)
From: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
To: Josh Cartwright <joshc@codeaurora.org>
Cc: <santosh.shilimkar@ti.com>, <rob@landley.net>,
	<linux@arm.linux.org.uk>, <galak@codeaurora.org>,
	<mark.rutland@arm.com>, <devicetree@vger.kernel.org>,
	<grygorii.strashko@ti.com>, <pawel.moll@arm.com>,
	<ijc+devicetree@hellion.org.uk>, <daniel.lezcano@linaro.org>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<robh+dt@kernel.org>, <tglx@linutronix.de>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone
Date: Thu, 6 Feb 2014 16:09:41 +0200	[thread overview]
Message-ID: <52F397A5.8030201@ti.com> (raw)
In-Reply-To: <20140206003526.GQ20228@joshc.qualcomm.com>

On 02/06/2014 02:35 AM, Josh Cartwright wrote:
> Hey Ivan-
>
> On Wed, Feb 05, 2014 at 03:47:38PM +0200, Ivan Khoronzhuk wrote:
>> Add broadcast clock-event device for the Keystone arch.
>>
>> The timer can be configured as a general-purpose 64-bit timer,
>> dual general-purpose 32-bit timers. When configured as dual 32-bit
>> timers, each half can operate in conjunction (chain mode) or
>> independently (unchained mode) of each other.
>>
>> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
>> Acked-by: Santosh shilimkar <santosh.shilimkar@ti.com>
>> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
>> ---
>>   drivers/clocksource/Makefile         |   1 +
>>   drivers/clocksource/timer-keystone.c | 233 +++++++++++++++++++++++++++++++++++
>>   2 files changed, 234 insertions(+)
>>   create mode 100644 drivers/clocksource/timer-keystone.c
>>
>> diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
>> index c7ca50a..4abe5aa 100644
>> --- a/drivers/clocksource/Makefile
>> +++ b/drivers/clocksource/Makefile
>> @@ -37,3 +37,4 @@ obj-$(CONFIG_ARM_ARCH_TIMER)		+= arm_arch_timer.o
>>   obj-$(CONFIG_ARM_GLOBAL_TIMER)		+= arm_global_timer.o
>>   obj-$(CONFIG_CLKSRC_METAG_GENERIC)	+= metag_generic.o
>>   obj-$(CONFIG_ARCH_HAS_TICK_BROADCAST)	+= dummy_timer.o
>> +obj-$(CONFIG_ARCH_KEYSTONE)		+= timer-keystone.o
>> diff --git a/drivers/clocksource/timer-keystone.c b/drivers/clocksource/timer-keystone.c
>> new file mode 100644
>> index 0000000..2299666
>> --- /dev/null
>> +++ b/drivers/clocksource/timer-keystone.c
>> +static void __init keystone_timer_init(struct device_node *np)
>> +{
>> +	struct clock_event_device *event_dev = &timer.event_dev;
>> +	unsigned long rate;
>> +	struct clk *clk;
>> +	int irq, error;
>> +	u32 tgcr;
>> +
>> +	irq  = irq_of_parse_and_map(np, 0);
>> +	if (irq == NO_IRQ) {
>> +		pr_err("%s: failed to map interrupts\n", __func__);
>> +		return;
>> +	}
>> +
>> +	timer.base = of_iomap(np, 0);
>> +	if (!timer.base) {
>> +		pr_err("%s: failed to map registers\n", __func__);
>> +		return;
>> +	}
>> +
>> +	clk = of_clk_get(np, 0);
>> +	if (!clk) {
> This condition should be IS_ERR(clk).

Thanks Josh,
I'll fix it.

-- 
Regards,
Ivan Khoronzhuk


  reply	other threads:[~2014-02-06 14:09 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05 13:47 [PATCH v5 0/3] Introduce clocksource driver for Keystone platform Ivan Khoronzhuk
2014-02-05 13:47 ` Ivan Khoronzhuk
2014-02-05 13:47 ` Ivan Khoronzhuk
2014-02-05 13:47 ` [PATCH v5 1/3] clocksource: timer-keystone: introduce clocksource driver for Keystone Ivan Khoronzhuk
2014-02-05 13:47   ` Ivan Khoronzhuk
2014-02-05 13:47   ` Ivan Khoronzhuk
2014-02-05 20:27   ` Thomas Gleixner
2014-02-05 20:27     ` Thomas Gleixner
2014-02-06 14:08     ` Ivan Khoronzhuk
2014-02-06 14:08       ` Ivan Khoronzhuk
2014-02-06 14:08       ` Ivan Khoronzhuk
2014-02-06 14:21       ` Thomas Gleixner
2014-02-06 14:21         ` Thomas Gleixner
2014-02-06  0:35   ` Josh Cartwright
2014-02-06  0:35     ` Josh Cartwright
2014-02-06 14:09     ` Ivan Khoronzhuk [this message]
2014-02-06 14:09       ` Ivan Khoronzhuk
2014-02-06 14:09       ` Ivan Khoronzhuk
2014-02-05 13:47 ` [PATCH v5 2/3] clocksource: keystone: add bindings for keystone timer Ivan Khoronzhuk
2014-02-05 13:47   ` Ivan Khoronzhuk
2014-02-05 13:47   ` Ivan Khoronzhuk
2014-02-05 14:39   ` Rob Herring
2014-02-05 14:39     ` Rob Herring
2014-02-05 16:18     ` Ivan Khoronzhuk
2014-02-05 16:18       ` Ivan Khoronzhuk
2014-02-05 17:41       ` Rob Herring
2014-02-05 17:41         ` Rob Herring
2014-02-05 18:52         ` Ivan Khoronzhuk
2014-02-05 18:52           ` Ivan Khoronzhuk
2014-02-05 23:36           ` Rob Herring
2014-02-05 23:36             ` Rob Herring
2014-02-06 14:09             ` Ivan Khoronzhuk
2014-02-06 14:09               ` Ivan Khoronzhuk
2014-02-05 13:47 ` [PATCH v5 3/3] arm: dts: keystone: add keystone timer entry Ivan Khoronzhuk
2014-02-05 13:47   ` Ivan Khoronzhuk
2014-02-05 13:47   ` Ivan Khoronzhuk

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=52F397A5.8030201@ti.com \
    --to=ivan.khoronzhuk@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.