All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kyungmin.park@samsung.com,
	kgene.kim@samsung.com, ben-linux@fluff.org
Subject: Re: [PATCH 3/4] ARM: S5PC110: add common FIMC setup code
Date: Mon, 06 Sep 2010 18:10:00 +0900	[thread overview]
Message-ID: <4C84AFE8.2010402@samsung.com> (raw)
In-Reply-To: <AANLkTinhbmKX5gs4TPZwVUX0WSEQ5RLN+_gHAqXsTj1b@mail.gmail.com>

Hello,

On 2010-09-06 13:52, Jassi Brar wrote:
> On Mon, Sep 6, 2010 at 12:50 PM, Marek Szyprowski
> <m.szyprowski@samsung.com>  wrote:
> ....
>> +       parent = clk_get(NULL, "mout_epll");
>> +       if (IS_ERR(parent))
>> +               return PTR_ERR(parent);
>> +
>> +       for (i = 0; err == 0&&  i<  ARRAY_SIZE(fimc_devs); i++) {
>> +               if (fimc_devs[i]) {
>> +                       clk_fimc = clk_get(fimc_devs[i], "sclk_fimc");
>> +                       if (IS_ERR(clk_fimc)) {
>> +                               err = PTR_ERR(clk_fimc);
>> +                               break;
>> +                       }
>> +                       clk_set_parent(clk_fimc, parent);
>> +                       clk_put(clk_fimc);
>> +               }
>> +       }
>
> The sclk_fimc could source clock from a number of options out of a mux.
> mout_epll is just one of them. Different machines may want to source the
> clock differently.

Right, I forgot about this case.

> So, IMO the parent selection should not be done in platform code, but rather
> in machine init code.
> Not the best, but a better solution can be found in
> arch/arm/mach-s5pc100/dev-spi.c
> Give it a thought.

I'm thinking of making the parent clock an argument to the 
s5pv210_fimc_setup_clks().

I really don't like the idea of passing clock name through the platform 
data and letting driver to mess with clock's parents. Machine startup 
code is the last place where such things should be changed.

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center

WARNING: multiple messages have this Message-ID (diff)
From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: S5PC110: add common FIMC setup code
Date: Mon, 06 Sep 2010 18:10:00 +0900	[thread overview]
Message-ID: <4C84AFE8.2010402@samsung.com> (raw)
In-Reply-To: <AANLkTinhbmKX5gs4TPZwVUX0WSEQ5RLN+_gHAqXsTj1b@mail.gmail.com>

Hello,

On 2010-09-06 13:52, Jassi Brar wrote:
> On Mon, Sep 6, 2010 at 12:50 PM, Marek Szyprowski
> <m.szyprowski@samsung.com>  wrote:
> ....
>> +       parent = clk_get(NULL, "mout_epll");
>> +       if (IS_ERR(parent))
>> +               return PTR_ERR(parent);
>> +
>> +       for (i = 0; err == 0&&  i<  ARRAY_SIZE(fimc_devs); i++) {
>> +               if (fimc_devs[i]) {
>> +                       clk_fimc = clk_get(fimc_devs[i], "sclk_fimc");
>> +                       if (IS_ERR(clk_fimc)) {
>> +                               err = PTR_ERR(clk_fimc);
>> +                               break;
>> +                       }
>> +                       clk_set_parent(clk_fimc, parent);
>> +                       clk_put(clk_fimc);
>> +               }
>> +       }
>
> The sclk_fimc could source clock from a number of options out of a mux.
> mout_epll is just one of them. Different machines may want to source the
> clock differently.

Right, I forgot about this case.

> So, IMO the parent selection should not be done in platform code, but rather
> in machine init code.
> Not the best, but a better solution can be found in
> arch/arm/mach-s5pc100/dev-spi.c
> Give it a thought.

I'm thinking of making the parent clock an argument to the 
s5pv210_fimc_setup_clks().

I really don't like the idea of passing clock name through the platform 
data and letting driver to mess with clock's parents. Machine startup 
code is the last place where such things should be changed.

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center

  parent reply	other threads:[~2010-09-06  9:10 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06  3:50 [PATCH] Platform fixes for s5p-fimc Marek Szyprowski
2010-09-06  3:50 ` Marek Szyprowski
2010-09-06  3:50 ` [PATCH 1/4] ARM: S5PC110: add fimc clocks Marek Szyprowski
2010-09-06  3:50   ` Marek Szyprowski
2010-09-09  0:23   ` Kukjin Kim
2010-09-09  0:23     ` Kukjin Kim
2010-09-06  3:50 ` [PATCH 2/4] ARM: Samsung: s5p-fimc: fix dma coherent mask Marek Szyprowski
2010-09-06  3:50   ` Marek Szyprowski
2010-09-09  0:41   ` Kukjin Kim
2010-09-09  0:41     ` Kukjin Kim
2010-09-09  1:44     ` Marek Szyprowski
2010-09-09  1:44       ` Marek Szyprowski
2010-09-09  2:17     ` [PATCH v2] " Marek Szyprowski
2010-09-09  2:17       ` Marek Szyprowski
2010-09-09 11:20       ` Kukjin Kim
2010-09-09 11:20         ` Kukjin Kim
2010-09-14  9:27         ` Marek Szyprowski
2010-09-14  9:27           ` Marek Szyprowski
2010-09-15 23:49           ` Kukjin Kim
2010-09-15 23:49             ` Kukjin Kim
2010-09-06  3:50 ` [PATCH 3/4] ARM: S5PC110: add common FIMC setup code Marek Szyprowski
2010-09-06  3:50   ` Marek Szyprowski
2010-09-06  4:16   ` Marek Vasut
2010-09-06  4:16     ` Marek Vasut
2010-09-06  4:34     ` Marek Szyprowski
2010-09-06  4:34       ` Marek Szyprowski
2010-09-06  4:40       ` Marek Vasut
2010-09-06  4:40         ` Marek Vasut
2010-09-06  4:52   ` Jassi Brar
2010-09-06  4:52     ` Jassi Brar
2010-09-06  8:46     ` Marek Szyprowski
2010-09-06  8:46       ` Marek Szyprowski
2010-09-06  9:17       ` Jassi Brar
2010-09-06  9:17         ` Jassi Brar
2010-09-06 10:21         ` Marek Szyprowski
2010-09-06 10:21           ` Marek Szyprowski
2010-09-06 11:28           ` Jassi Brar
2010-09-06 11:28             ` Jassi Brar
2010-09-06  9:10     ` Marek Szyprowski [this message]
2010-09-06  9:10       ` Marek Szyprowski
2010-09-06  3:50 ` [PATCH 4/4] ARM: S5PC110: use common FIMC clock " Marek Szyprowski
2010-09-06  3:50   ` Marek Szyprowski

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=4C84AFE8.2010402@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=ben-linux@fluff.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.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.