All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Sangbeom Kim <sbkim73@samsung.com>, kgene.kim@samsung.com
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org
Subject: Re: [PATCH 1/3] ARM: S5P: Add s5p_timer support for HRT
Date: Tue, 01 Mar 2011 10:16:36 +0100	[thread overview]
Message-ID: <4D6CB974.8060003@samsung.com> (raw)
In-Reply-To: <20110226142413.GC3640@n2100.arm.linux.org.uk>

Hello,

On 02/26/2011 03:24 PM, Russell King - ARM Linux wrote:
> On Sat, Feb 26, 2011 at 11:45:55AM +0900, Sangbeom Kim wrote:
>> +static irqreturn_t s5p_clock_event_isr(int irq, void *dev_id)
>> +{
>> +	struct clock_event_device *evt = &time_event_device;
> 
> 	struct clock_event_device *evt = dev_id;
> 
>> +
>> +	evt->event_handler(evt);
>> +
>> +	return IRQ_HANDLED;
>> +}
>> +
>> +static struct irqaction s5p_clock_event_irq = {
>> +	.name		= "s5p_time_irq",
>> +	.flags		= IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
>> +	.handler	= s5p_clock_event_isr,
> 
> 	.dev_id	 	= &time_event_device,
> 
>> +};
> ...
>> +static void __init s5p_timer_resources(void)
>> +{
>> +	struct platform_device tmpdev;
>> +
>> +	tmpdev.dev.bus = &platform_bus_type;
>> +
>> +	timerclk = clk_get(NULL, "timers");
>> +	if (IS_ERR(timerclk))
>> +		panic("failed to get timers clock for system timer");
>> +
>> +	clk_enable(timerclk);
>> +
>> +	tmpdev.id = timer_source.event_id;
> 
> So Samsung clock stuff is still being idiotic.  Will this ever be fixed?
> 

Are there any serious difficulties preventing converting Samsung platforms
to clkdev? I don't seem to be aware of any.
Shortcomings of current clk API appeared few times already, and this one
being a disgraceful example.

>> +	tin_event = clk_get(&tmpdev.dev, "pwm-tin");
>> +	if (IS_ERR(tin_event)) {
>> +		clk_put(tin_event);
> 
> Don't clk_put errors.
> 
>> +		panic("failed to get pwm-tin2 clock for system timer");
>> +	}
>> +
>> +	tdiv_event = clk_get(&tmpdev.dev, "pwm-tdiv");
>> +	if (IS_ERR(tdiv_event)) {
>> +		clk_put(tdiv_event);
> 
> Ditto.
> 
>> +		panic("failed to get pwm-tdiv2 clock for system timer");
>> +	}
>> +
>> +	clk_enable(tin_event);
>> +
>> +	tmpdev.id = timer_source.source_id;
>> +	tin_source = clk_get(&tmpdev.dev, "pwm-tin");
>> +	if (IS_ERR(tin_source)) {
>> +		clk_put(tin_source);
> 
> Ditto.
> 
>> +		panic("failed to get pwm-tin4 clock for system timer");
>> +	}
>> +
>> +	tdiv_source = clk_get(&tmpdev.dev, "pwm-tdiv");
>> +	if (IS_ERR(tdiv_source)) {
>> +		clk_put(tdiv_source);
> 
> Ditto.

-- 
Sylwester Nawrocki
Samsung Poland R&D Center

WARNING: multiple messages have this Message-ID (diff)
From: s.nawrocki@samsung.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: S5P: Add s5p_timer support for HRT
Date: Tue, 01 Mar 2011 10:16:36 +0100	[thread overview]
Message-ID: <4D6CB974.8060003@samsung.com> (raw)
In-Reply-To: <20110226142413.GC3640@n2100.arm.linux.org.uk>

Hello,

On 02/26/2011 03:24 PM, Russell King - ARM Linux wrote:
> On Sat, Feb 26, 2011 at 11:45:55AM +0900, Sangbeom Kim wrote:
>> +static irqreturn_t s5p_clock_event_isr(int irq, void *dev_id)
>> +{
>> +	struct clock_event_device *evt = &time_event_device;
> 
> 	struct clock_event_device *evt = dev_id;
> 
>> +
>> +	evt->event_handler(evt);
>> +
>> +	return IRQ_HANDLED;
>> +}
>> +
>> +static struct irqaction s5p_clock_event_irq = {
>> +	.name		= "s5p_time_irq",
>> +	.flags		= IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
>> +	.handler	= s5p_clock_event_isr,
> 
> 	.dev_id	 	= &time_event_device,
> 
>> +};
> ...
>> +static void __init s5p_timer_resources(void)
>> +{
>> +	struct platform_device tmpdev;
>> +
>> +	tmpdev.dev.bus = &platform_bus_type;
>> +
>> +	timerclk = clk_get(NULL, "timers");
>> +	if (IS_ERR(timerclk))
>> +		panic("failed to get timers clock for system timer");
>> +
>> +	clk_enable(timerclk);
>> +
>> +	tmpdev.id = timer_source.event_id;
> 
> So Samsung clock stuff is still being idiotic.  Will this ever be fixed?
> 

Are there any serious difficulties preventing converting Samsung platforms
to clkdev? I don't seem to be aware of any.
Shortcomings of current clk API appeared few times already, and this one
being a disgraceful example.

>> +	tin_event = clk_get(&tmpdev.dev, "pwm-tin");
>> +	if (IS_ERR(tin_event)) {
>> +		clk_put(tin_event);
> 
> Don't clk_put errors.
> 
>> +		panic("failed to get pwm-tin2 clock for system timer");
>> +	}
>> +
>> +	tdiv_event = clk_get(&tmpdev.dev, "pwm-tdiv");
>> +	if (IS_ERR(tdiv_event)) {
>> +		clk_put(tdiv_event);
> 
> Ditto.
> 
>> +		panic("failed to get pwm-tdiv2 clock for system timer");
>> +	}
>> +
>> +	clk_enable(tin_event);
>> +
>> +	tmpdev.id = timer_source.source_id;
>> +	tin_source = clk_get(&tmpdev.dev, "pwm-tin");
>> +	if (IS_ERR(tin_source)) {
>> +		clk_put(tin_source);
> 
> Ditto.
> 
>> +		panic("failed to get pwm-tin4 clock for system timer");
>> +	}
>> +
>> +	tdiv_source = clk_get(&tmpdev.dev, "pwm-tdiv");
>> +	if (IS_ERR(tdiv_source)) {
>> +		clk_put(tdiv_source);
> 
> Ditto.

-- 
Sylwester Nawrocki
Samsung Poland R&D Center

  reply	other threads:[~2011-03-01  9:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-26  2:45 [PATCH 0/3] ARM: S5P: Add high resolution timer support Sangbeom Kim
2011-02-26  2:45 ` Sangbeom Kim
2011-02-26  2:45 ` [PATCH 1/3] ARM: S5P: Add s5p_timer support for HRT Sangbeom Kim
2011-02-26  2:45   ` Sangbeom Kim
2011-02-26  4:31   ` Kyungmin Park
2011-02-26  4:31     ` Kyungmin Park
2011-02-26  9:33   ` Linus Walleij
2011-02-26  9:33     ` Linus Walleij
2011-02-28  7:56     ` Sangbeom Kim
2011-02-28  7:56       ` Sangbeom Kim
2011-02-26 14:24   ` Russell King - ARM Linux
2011-02-26 14:24     ` Russell King - ARM Linux
2011-03-01  9:16     ` Sylwester Nawrocki [this message]
2011-03-01  9:16       ` Sylwester Nawrocki
2011-02-26  2:45 ` [PATCH 2/3] ARM: S5P: Update machine initialization " Sangbeom Kim
2011-02-26  2:45   ` Sangbeom Kim
2011-02-26  4:27   ` Kyungmin Park
2011-02-26  4:27     ` Kyungmin Park
2011-02-28  8:11     ` Sangbeom Kim
2011-02-28  8:11       ` Sangbeom Kim
2011-02-26  2:45 ` [PATCH 3/3] ARM: S5P: Update defconfig for HRT support Sangbeom Kim
2011-02-26  2:45   ` Sangbeom Kim

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=4D6CB974.8060003@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=sbkim73@samsung.com \
    /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.