diff mbox

[1/2] ARM: r8a7740: Add interim sh-eth device name to clocks list

Message ID 1355851359-8871-2-git-send-email-hechtb+renesas@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bastian Hecht Dec. 18, 2012, 5:22 p.m. UTC
When we use the ethernet device via DT setup, we need to add it
to a lookup list until this is properly handled later in a DT-only
fashion.

Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
---
 arch/arm/mach-shmobile/clock-r8a7740.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Guennadi Liakhovetski Dec. 19, 2012, 9:10 a.m. UTC | #1
Hi Bastian

Thanks for the patch.

On Tue, 18 Dec 2012, Bastian Hecht wrote:

> When we use the ethernet device via DT setup, we need to add it
> to a lookup list until this is properly handled later in a DT-only
> fashion.
> 
> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
> ---
>  arch/arm/mach-shmobile/clock-r8a7740.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
> index 19ce885..8765a76 100644
> --- a/arch/arm/mach-shmobile/clock-r8a7740.c
> +++ b/arch/arm/mach-shmobile/clock-r8a7740.c
> @@ -614,6 +614,7 @@ static struct clk_lookup lookups[] = {
>  	CLKDEV_DEV_ID("sh_mobile_sdhi.1",	&mstp_clks[MSTP313]),
>  	CLKDEV_DEV_ID("sh_mmcif",		&mstp_clks[MSTP312]),
>  	CLKDEV_DEV_ID("sh-eth",			&mstp_clks[MSTP309]),
> +	CLKDEV_DEV_ID("e9a00000.sh-eth",	&mstp_clks[MSTP309]),

In a recent thread

http://thread.gmane.org/gmane.linux.ports.sh.devel/18062/focus=18057

I've been suggested to use OF_DEV_AUXDATA(), isn't this also a case for 
it?

Thanks
Guennadi

>  
>  	CLKDEV_DEV_ID("sh_mobile_sdhi.2",	&mstp_clks[MSTP415]),
>  
> -- 
> 1.7.9.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
Magnus Damm Dec. 19, 2012, 10:50 a.m. UTC | #2
On Wed, Dec 19, 2012 at 6:10 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> Hi Bastian
>
> Thanks for the patch.
>
> On Tue, 18 Dec 2012, Bastian Hecht wrote:
>
>> When we use the ethernet device via DT setup, we need to add it
>> to a lookup list until this is properly handled later in a DT-only
>> fashion.
>>
>> Signed-off-by: Bastian Hecht <hechtb+renesas@gmail.com>
>> ---
>>  arch/arm/mach-shmobile/clock-r8a7740.c |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
>> index 19ce885..8765a76 100644
>> --- a/arch/arm/mach-shmobile/clock-r8a7740.c
>> +++ b/arch/arm/mach-shmobile/clock-r8a7740.c
>> @@ -614,6 +614,7 @@ static struct clk_lookup lookups[] = {
>>       CLKDEV_DEV_ID("sh_mobile_sdhi.1",       &mstp_clks[MSTP313]),
>>       CLKDEV_DEV_ID("sh_mmcif",               &mstp_clks[MSTP312]),
>>       CLKDEV_DEV_ID("sh-eth",                 &mstp_clks[MSTP309]),
>> +     CLKDEV_DEV_ID("e9a00000.sh-eth",        &mstp_clks[MSTP309]),
>
> In a recent thread
>
> http://thread.gmane.org/gmane.linux.ports.sh.devel/18062/focus=18057
>
> I've been suggested to use OF_DEV_AUXDATA(), isn't this also a case for
> it?

AUXDATA seems to be a great way to add a platform data pointer as a
workaround while implementing DT support, but when it comes to
translate the name based on base address the code becomes very
verbose.

I am all for going with the simplest half-way solution that uses the
least amount of lines of code, but I doubt it can get any simpler than
a single line of CLKDEV_DEV_ID().

Thanks,

/ magnus
Simon Horman Jan. 9, 2013, 2:06 a.m. UTC | #3
On Tue, Dec 18, 2012 at 06:22:38PM +0100, Bastian Hecht wrote:
> When we use the ethernet device via DT setup, we need to add it
> to a lookup list until this is properly handled later in a DT-only
> fashion.

Thanks, looks good.
I will apply this.
Simon Horman April 11, 2013, 3:09 a.m. UTC | #4
On Wed, Jan 09, 2013 at 11:06:47AM +0900, Simon Horman wrote:
> On Tue, Dec 18, 2012 at 06:22:38PM +0100, Bastian Hecht wrote:
> > When we use the ethernet device via DT setup, we need to add it
> > to a lookup list until this is properly handled later in a DT-only
> > fashion.
> 
> Thanks, looks good.
> I will apply this.

Apparently I forgot to actually do that.
I have done so now, it is queued up for v3.11 in the soc-r8a7740 branch.
diff mbox

Patch

diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
index 19ce885..8765a76 100644
--- a/arch/arm/mach-shmobile/clock-r8a7740.c
+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
@@ -614,6 +614,7 @@  static struct clk_lookup lookups[] = {
 	CLKDEV_DEV_ID("sh_mobile_sdhi.1",	&mstp_clks[MSTP313]),
 	CLKDEV_DEV_ID("sh_mmcif",		&mstp_clks[MSTP312]),
 	CLKDEV_DEV_ID("sh-eth",			&mstp_clks[MSTP309]),
+	CLKDEV_DEV_ID("e9a00000.sh-eth",	&mstp_clks[MSTP309]),
 
 	CLKDEV_DEV_ID("sh_mobile_sdhi.2",	&mstp_clks[MSTP415]),