From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tony Lindgren <tony@atomide.com>
Cc: jean.pihet@newoldbits.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Anton Vorontsov <cbou@mail.ru>, J Keerthy <j-keerthy@ti.com>,
Jean Pihet <j-pihet@ti.com>
Subject: Re: [PATCH 1/2] ARM: OMAP: hwmod: align the SmartReflex fck names
Date: Wed, 03 Oct 2012 17:33:12 -0700 [thread overview]
Message-ID: <87ehlfvzxz.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20121003170059.GD4840@atomide.com> (Tony Lindgren's message of "Wed, 3 Oct 2012 10:00:59 -0700")
Tony Lindgren <tony@atomide.com> writes:
> * jean.pihet@newoldbits.com <jean.pihet@newoldbits.com> [121003 08:48]:
>> @@ -1036,8 +1036,8 @@ static struct omap_clk am33xx_clks[] = {
>> CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX),
>> CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX),
>> CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX),
>> - CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX),
>> - CLK(NULL, "smartreflex1_fck", &smartreflex1_fck, CK_AM33XX),
>> + CLK(NULL, "smartreflex.0", &smartreflex_mpu_fck, CK_AM33XX),
>> + CLK(NULL, "smartreflex.1", &smartreflex_core_fck, CK_AM33XX),
>> CLK(NULL, "timer1_fck", &timer1_fck, CK_AM33XX),
>> CLK(NULL, "timer2_fck", &timer2_fck, CK_AM33XX),
>> CLK(NULL, "timer3_fck", &timer3_fck, CK_AM33XX),
>
> I think this should be something like this instead:
>
> CLK("smartreflex.0", "fck", &smartreflex_mpu_fck, CK_AM33XX),
> CLK("smartreflex.1", "fck", &smartreflex_core_fck, CK_AM33XX),
>
> Where the first one is the dev name, the second one is the
> alias you want to use in the client driver?
Actually, the omap_device creation will create this kind of alias for
you, with the device name populated etc, so adding device names here
isn't necessary.
For omap_devices where drivers are always using clk_get(dev, ...),
the name in the initial clkdev table here really doesn't matter.
However, for core code that needs to do a clk_get(NULL, "name"), then
this name matters. In chatting with Paul offline, he mentioned part of
the CCF conversion will be using clk_get(NULL, ...) on the main_clk
listed in each hwmod. For that reason, it's important that this string
match the name in the hwmod.
I belive the patch below should make this compatible with any future
use.
Jean, can you fold this into $SUBJECT patch?
Thanks,
Kevin
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
index 6de3dc7..8a16504 100644
--- a/arch/arm/mach-omap2/clock33xx_data.c
+++ b/arch/arm/mach-omap2/clock33xx_data.c
@@ -1034,8 +1034,8 @@ static struct omap_clk am33xx_clks[] = {
CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX),
CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX),
CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX),
- CLK(NULL, "smartreflex.0", &smartreflex_mpu_fck, CK_AM33XX),
- CLK(NULL, "smartreflex.1", &smartreflex_core_fck, CK_AM33XX),
+ CLK(NULL, "smartreflex_mpu_fck", &smartreflex_mpu_fck, CK_AM33XX),
+ CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_AM33XX),
CLK(NULL, "timer1_fck", &timer1_fck, CK_AM33XX),
CLK(NULL, "timer2_fck", &timer2_fck, CK_AM33XX),
CLK(NULL, "timer3_fck", &timer3_fck, CK_AM33XX),
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index a197cf2..191d261 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3447,8 +3447,8 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "atclk_fck", &atclk_fck, CK_3XXX),
CLK(NULL, "traceclk_src_fck", &traceclk_src_fck, CK_3XXX),
CLK(NULL, "traceclk_fck", &traceclk_fck, CK_3XXX),
- CLK(NULL, "smartreflex.0", &smartreflex_mpu_iva_fck, CK_34XX | CK_36XX),
- CLK(NULL, "smartreflex.1", &smartreflex_core_fck, CK_34XX | CK_36XX),
+ CLK(NULL, "smartreflex_mpu_iva_fck", &smartreflex_mpu_iva_fck, CK_34XX | CK_36XX),
+ CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_34XX | CK_36XX),
CLK(NULL, "sr_l4_ick", &sr_l4_ick, CK_34XX | CK_36XX),
CLK(NULL, "secure_32k_fck", &secure_32k_fck, CK_3XXX),
CLK(NULL, "gpt12_fck", &gpt12_fck, CK_3XXX),
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 9cc1112..19e0c1e 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3224,8 +3224,8 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "slimbus2_fclk_0", &slimbus2_fclk_0, CK_443X),
CLK(NULL, "slimbus2_slimbus_clk", &slimbus2_slimbus_clk, CK_443X),
CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X),
- CLK(NULL, "smartreflex.0", &smartreflex_core_fck, CK_443X),
- CLK(NULL, "smartreflex.1", &smartreflex_iva_fck, CK_443X),
+ CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_443X),
+ CLK(NULL, "smartreflex_mpu_fck", &smartreflex_iva_fck, CK_443X),
CLK(NULL, "smartreflex.2", &smartreflex_mpu_fck, CK_443X),
CLK(NULL, "timer1_fck", &timer1_fck, CK_443X),
CLK(NULL, "timer10_fck", &timer10_fck, CK_443X),
WARNING: multiple messages have this Message-ID (diff)
From: khilman@deeprootsystems.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: OMAP: hwmod: align the SmartReflex fck names
Date: Wed, 03 Oct 2012 17:33:12 -0700 [thread overview]
Message-ID: <87ehlfvzxz.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20121003170059.GD4840@atomide.com> (Tony Lindgren's message of "Wed, 3 Oct 2012 10:00:59 -0700")
Tony Lindgren <tony@atomide.com> writes:
> * jean.pihet at newoldbits.com <jean.pihet@newoldbits.com> [121003 08:48]:
>> @@ -1036,8 +1036,8 @@ static struct omap_clk am33xx_clks[] = {
>> CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX),
>> CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX),
>> CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX),
>> - CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX),
>> - CLK(NULL, "smartreflex1_fck", &smartreflex1_fck, CK_AM33XX),
>> + CLK(NULL, "smartreflex.0", &smartreflex_mpu_fck, CK_AM33XX),
>> + CLK(NULL, "smartreflex.1", &smartreflex_core_fck, CK_AM33XX),
>> CLK(NULL, "timer1_fck", &timer1_fck, CK_AM33XX),
>> CLK(NULL, "timer2_fck", &timer2_fck, CK_AM33XX),
>> CLK(NULL, "timer3_fck", &timer3_fck, CK_AM33XX),
>
> I think this should be something like this instead:
>
> CLK("smartreflex.0", "fck", &smartreflex_mpu_fck, CK_AM33XX),
> CLK("smartreflex.1", "fck", &smartreflex_core_fck, CK_AM33XX),
>
> Where the first one is the dev name, the second one is the
> alias you want to use in the client driver?
Actually, the omap_device creation will create this kind of alias for
you, with the device name populated etc, so adding device names here
isn't necessary.
For omap_devices where drivers are always using clk_get(dev, ...),
the name in the initial clkdev table here really doesn't matter.
However, for core code that needs to do a clk_get(NULL, "name"), then
this name matters. In chatting with Paul offline, he mentioned part of
the CCF conversion will be using clk_get(NULL, ...) on the main_clk
listed in each hwmod. For that reason, it's important that this string
match the name in the hwmod.
I belive the patch below should make this compatible with any future
use.
Jean, can you fold this into $SUBJECT patch?
Thanks,
Kevin
diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
index 6de3dc7..8a16504 100644
--- a/arch/arm/mach-omap2/clock33xx_data.c
+++ b/arch/arm/mach-omap2/clock33xx_data.c
@@ -1034,8 +1034,8 @@ static struct omap_clk am33xx_clks[] = {
CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX),
CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX),
CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX),
- CLK(NULL, "smartreflex.0", &smartreflex_mpu_fck, CK_AM33XX),
- CLK(NULL, "smartreflex.1", &smartreflex_core_fck, CK_AM33XX),
+ CLK(NULL, "smartreflex_mpu_fck", &smartreflex_mpu_fck, CK_AM33XX),
+ CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_AM33XX),
CLK(NULL, "timer1_fck", &timer1_fck, CK_AM33XX),
CLK(NULL, "timer2_fck", &timer2_fck, CK_AM33XX),
CLK(NULL, "timer3_fck", &timer3_fck, CK_AM33XX),
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index a197cf2..191d261 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3447,8 +3447,8 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "atclk_fck", &atclk_fck, CK_3XXX),
CLK(NULL, "traceclk_src_fck", &traceclk_src_fck, CK_3XXX),
CLK(NULL, "traceclk_fck", &traceclk_fck, CK_3XXX),
- CLK(NULL, "smartreflex.0", &smartreflex_mpu_iva_fck, CK_34XX | CK_36XX),
- CLK(NULL, "smartreflex.1", &smartreflex_core_fck, CK_34XX | CK_36XX),
+ CLK(NULL, "smartreflex_mpu_iva_fck", &smartreflex_mpu_iva_fck, CK_34XX | CK_36XX),
+ CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_34XX | CK_36XX),
CLK(NULL, "sr_l4_ick", &sr_l4_ick, CK_34XX | CK_36XX),
CLK(NULL, "secure_32k_fck", &secure_32k_fck, CK_3XXX),
CLK(NULL, "gpt12_fck", &gpt12_fck, CK_3XXX),
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 9cc1112..19e0c1e 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -3224,8 +3224,8 @@ static struct omap_clk omap44xx_clks[] = {
CLK(NULL, "slimbus2_fclk_0", &slimbus2_fclk_0, CK_443X),
CLK(NULL, "slimbus2_slimbus_clk", &slimbus2_slimbus_clk, CK_443X),
CLK(NULL, "slimbus2_fck", &slimbus2_fck, CK_443X),
- CLK(NULL, "smartreflex.0", &smartreflex_core_fck, CK_443X),
- CLK(NULL, "smartreflex.1", &smartreflex_iva_fck, CK_443X),
+ CLK(NULL, "smartreflex_core_fck", &smartreflex_core_fck, CK_443X),
+ CLK(NULL, "smartreflex_mpu_fck", &smartreflex_iva_fck, CK_443X),
CLK(NULL, "smartreflex.2", &smartreflex_mpu_fck, CK_443X),
CLK(NULL, "timer1_fck", &timer1_fck, CK_443X),
CLK(NULL, "timer10_fck", &timer10_fck, CK_443X),
next prev parent reply other threads:[~2012-10-04 0:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-03 15:47 [PATCH 0/2] ARM: OMAP: SmartReflex: pass device dependent data via platform data jean.pihet
2012-10-03 15:47 ` jean.pihet at newoldbits.com
2012-10-03 15:47 ` [PATCH 1/2] ARM: OMAP: hwmod: align the SmartReflex fck names jean.pihet
2012-10-03 15:47 ` jean.pihet at newoldbits.com
2012-10-03 17:00 ` Tony Lindgren
2012-10-03 17:00 ` Tony Lindgren
2012-10-03 18:19 ` Jean Pihet
2012-10-03 18:19 ` Jean Pihet
2012-10-04 0:33 ` Kevin Hilman [this message]
2012-10-04 0:33 ` Kevin Hilman
2012-10-04 16:49 ` Jean Pihet
2012-10-04 16:49 ` Jean Pihet
2012-10-03 15:47 ` [PATCH 2/2] ARM: OMAP: SmartReflex: pass device dependent data via platform data jean.pihet
2012-10-03 15:47 ` jean.pihet at newoldbits.com
-- strict thread matches above, loose matches on Subject: below --
2012-10-04 16:47 [PATCH 0/2] " jean.pihet
2012-10-04 16:47 ` [PATCH 1/2] ARM: OMAP: hwmod: align the SmartReflex fck names jean.pihet
2012-10-04 16:47 ` jean.pihet at newoldbits.com
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=87ehlfvzxz.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=cbou@mail.ru \
--cc=j-keerthy@ti.com \
--cc=j-pihet@ti.com \
--cc=jean.pihet@newoldbits.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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.