From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Sylwester Nawrocki <snjw23@gmail.com>,
Anand Kumar N <anand.kn@samsung.com>,
lethal@linux-sh.org, kgene.kim@samsung.com,
linux-samsung-soc@vger.kernel.org, jg1.han@samsung.com,
jonghun.han@samsung.com, thomas.ab@samsung.com,
linux@arm.linux.org.uk
Subject: Re: [RE-SEND] [PATCH 3/4] s3c-fb: Add support EXYNOS4 FIMD
Date: Wed, 15 Jun 2011 10:01:29 +0200 [thread overview]
Message-ID: <4DF866D9.7090406@samsung.com> (raw)
In-Reply-To: <BANLkTinuAnaoo2hA6MLBDncXxXtL8NO2pg@mail.gmail.com>
Hi Thomas,
On 06/15/2011 08:14 AM, Thomas Abraham wrote:
> Hi Sylwester,
>
> On 11 June 2011 22:10, Sylwester Nawrocki <snjw23@gmail.com> wrote:
>> Hello,
>>
>> On 06/10/2011 10:15 AM, Anand Kumar N wrote:
>>> From: Jonghun Han<jonghun.han@samsung.com>
>>>
>>> This patch adds struct s3c_fb_driverdata s3c_fb_data_exynos4 for EXYNOS4.
>>> The clk_type is added to distinguish clock type in it and lcd_clk is added
>>> in structure s3c_fb to calculate divider for lcd panel.
>
> <snip>
>
>>> + default:
>>> + dev_err(dev, "failed to enable clock for FIMD\n");
>>> goto err_sfb;
>>> }
>>
>> I'm not really a clock expert, but IMHO there is an issue in Thomas'
>> migration to clkdev proposal [1] that the device clock connection ids
>> (con_id) and clock names related to them are identical. Mostly it works
>> but in situation like this one it is not possible to remap two clocks
>> of different names onto a single connection id.
>>
>> For instance, looking at arch/arm/mach-omap2/clock3xxx_data.c:
>>
>> static struct clk i2c3_fck = {
>> .name = "i2c3_fck",
>> ^^^^^^^^^^
>> .ops = &clkops_omap2_dflt_wait,
>> .parent = &core_96m_fck,
>> ...
>> };
>> static struct clk i2c2_fck = {
>> .name = "i2c2_fck",
>> ^^^^^^^^^^^
>> .ops = &clkops_omap2_dflt_wait,
>> ...
>> };
>>
>> static struct omap_clk omap3xxx_clks[] = {
>> ...
>> CLK("omap_i2c.3", "fck", &i2c3_fck, CK_3XXX),
>> ^^^^^^^^^^^^^^^^^
>> CLK("omap_i2c.2", "fck", &i2c2_fck, CK_3XXX),
>> ^^^^^^^^^^^^^^^^^
>> ...
>>
>> Different clock names (i2c3_fck, i2c3_fck,..) are mapped to single
>> unified id (fck), which the driver only needs to care about.
>> The name is common across H/W instances and also SoC variants.
>> So it doesn't have to be driver's business to resolve clock differences.
>>
>> The same (con_id) name can be used on distinct SoC version providing
>> similar/same peripheral device IP.
>> It's aeasy to figure out by just comparing omap3xxx_clks[] and
>> omap44xx_clks arrays.
>
> Sorry, I am not quite sure if I understand the problem here. For
> instance, all Samsung SoC's and each instance of i2c device in a SoC,
> use the same con_id for the i2c 'struct clock' instance. The con_id is
> 'i2c'. The i2c driver uses the con_id 'i2c' to lookup the 'struct
> clock' instance and it works for all Samsung SoC's and all instances
> of i2c device in the SoC.
>
> Is your point different than what I understand? Please help.
I appreciate your efforts in converting all Samsung platforms to clkdev.
With the above I2C example I was trying to illustrate the additional
level of indirection that is present in case of OMAP clock mappings,
comparing to your implementation.
As long as IP clock names are same among various SoC there is no issue
at all with your clk lookup approach.
But this is already not the case with LCD controller IP.
On S3C series the IP bus clock name is "lcd" while on S5P series it's "fimd".
There is a common framebuffer driver for S3C and S5P SoCs.
It just does not look right to me to be adding in the driver switch/case
for the clock names. I thought clkdev is meant to resolve such differences.
Then how it would be possible to map those clocks into single con_id with
your patches? E.g.
S3C clk | S5P clk | con_id
---------------------------
"lcd" | "fimd" | "lcd" ?
I believe there will come more differences like that in the future.
Regards,
Sylwester
> Thanks,
> Thomas.
>>
>> That said I wouldn't go for a "devname" in struct clk, just create
>> an additional table matching device names, con_id and struct clk and
>> use it while registering clk_lookup items into clkdev.
...
>> [1] http://www.spinics.net/lists/arm-kernel/msg127901.html
>> http://www.spinics.net/lists/arm-kernel/msg127907.html
next prev parent reply other threads:[~2011-06-15 8:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 8:15 [PATCH 0/4] s3c-fb: Add support S5PV310 FIMD Anand Kumar N
2011-06-10 8:15 ` [RE-SEND] [PATCH 1/4] ARM: EXYNOS4: Add FIMD resource definition Anand Kumar N
2011-06-10 8:15 ` [RE-SEND] [PATCH 2/4] ARM: EXYNOS4: Add platform device and helper functions for FIMD Anand Kumar N
2011-06-11 12:24 ` Sylwester Nawrocki
2011-06-10 8:15 ` [RE-SEND] [PATCH 3/4] s3c-fb: Add support EXYNOS4 FIMD Anand Kumar N
2011-06-11 16:40 ` Sylwester Nawrocki
2011-06-15 6:14 ` Thomas Abraham
2011-06-15 8:01 ` Sylwester Nawrocki [this message]
2011-06-15 8:06 ` Russell King - ARM Linux
2011-06-15 9:43 ` Marek Szyprowski
2011-06-15 10:04 ` Thomas Abraham
2011-06-15 10:08 ` Russell King - ARM Linux
2011-06-15 10:22 ` Thomas Abraham
2011-06-16 15:44 ` Sylwester Nawrocki
2011-06-10 8:15 ` [RE-SEND] [PATCH 4/4] ARM: EXYNOS4: Add platform data for EXYNOS4 FIMD and LTE480WV platform-lcd Anand Kumar N
2011-06-11 12:19 ` [PATCH 0/4] s3c-fb: Add support S5PV310 FIMD Sylwester Nawrocki
2011-06-14 2:44 ` Kyungmin Park
2011-06-14 5:10 ` Kukjin 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=4DF866D9.7090406@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=anand.kn@samsung.com \
--cc=jg1.han@samsung.com \
--cc=jonghun.han@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=lethal@linux-sh.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=snjw23@gmail.com \
--cc=thomas.ab@samsung.com \
--cc=thomas.abraham@linaro.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.