2014-04-23 01:31:27

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 0/8] OMAP2+ system timer cleanup series

Here is a clean up series that attempts to separate out some of the DT-only vs
legacy system timer usage for OMAP2+. Emphasis is on separating legacy stuff,
and abstracting annoyances such as hwmod to give us the flexibilty for the
migration. The series will relieve some of the difficulties in moving out the
timer code from mach layer. As such it is incremental and there is a bit of
duplication for fallback cases, but emphasis is on keeping things working
during the migration.

Earlier series posted for dmtimer cleanup, and changes for OMAP1 is at [1].

[1] https://lkml.org/lkml/2014/4/16/737

Joel Fernandes (8):
ARM: OMAP2+: timer: Add a powerup function
ARM: OMAP2+: timer: Simplify clock event/source name setting
ARM: OMAP2+: timer: Add comment on timer clk parenting
ARM: OMAP2+: timer: Remove hwmod look-up dependency for DT-boot
ARM: OMAP2+: timer: Use of_clk_get for DT platforms
ARM: OMAP2+: timer: Fix error message to not use hwmod structure
ARM: OMAP2+: timer: Add fallback for of_clk_get
ARM: OMAP2+: timer: Add legacy code for old way of getting fclk

arch/arm/mach-omap2/timer.c | 111 +++++++++++++++++++++++++++++++++----------
1 file changed, 85 insertions(+), 26 deletions(-)

--
1.7.9.5


2014-04-23 01:28:10

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 2/8] ARM: OMAP2+: timer: Simplify clock event/source name setting

For the OMAPs, we're setting up only one clockevent and clocksource. Further,
for DT boot there's no easy way to get the timer name and currently this is
done in an ugly way by reading a hwmod entry. So let's just set it to a simpler
name like timer_clkev and timer_clksrc.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index ec427e6..f192a41 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -251,7 +251,6 @@ static u32 __init omap_dm_timer_get_errata(void)
static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
const char *fck_source,
const char *property,
- const char **timer_name,
int posted)
{
char name[10]; /* 10 = sizeof("gptXX_Xck0") */
@@ -290,8 +289,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (!oh)
return -ENODEV;

- *timer_name = oh->name;
-
if (!of_have_populated_dt()) {
r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL,
&irq);
@@ -365,8 +362,10 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
*/
__omap_dm_timer_override_errata(&clkev, OMAP_TIMER_ERRATA_I103_I767);

+ clockevent_gpt.name = "timer_clkev";
+
res = omap_dm_timer_init_one(&clkev, fck_source, property,
- &clockevent_gpt.name, OMAP_TIMER_POSTED);
+ OMAP_TIMER_POSTED);
BUG_ON(res);

omap2_gp_timer_irq.dev_id = &clkev;
@@ -489,10 +488,11 @@ static void __init omap2_gptimer_clocksource_init(int gptimer_id,
clksrc.errata = omap_dm_timer_get_errata();

res = omap_dm_timer_init_one(&clksrc, fck_source, property,
- &clocksource_gpt.name,
OMAP_TIMER_NONPOSTED);
BUG_ON(res);

+ clocksource_gpt.name = "timer_clksrc";
+
__omap_dm_timer_load_start(&clksrc,
OMAP_TIMER_CTRL_AR, 0,
OMAP_TIMER_NONPOSTED);
--
1.7.9.5

2014-04-23 01:28:08

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 4/8] ARM: OMAP2+: timer: Remove hwmod look-up dependency for DT-boot

hwmod look ups should no longer directly happen for dmtimer users of
DT-boot platforms. We separate out the code for platforms that are
still non-DT. Ultimately this code should be deleted if all platforms
are converted to DT-boot.

We use omap_dmtimer_powerup introduced earlier in the series to abstract
out the hwmod dependency for the same. This will help us move the generic
DT specific code out into drivers/clocksource/ later.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 9fdff5b..ea91ef9 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -266,10 +266,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (!np)
return -ENODEV;

- of_property_read_string_index(np, "ti,hwmods", 0, &oh_name);
- if (!oh_name)
- return -ENODEV;
-
timer->irq = irq_of_parse_and_map(np, 0);
if (!timer->irq)
return -ENXIO;
@@ -277,19 +273,24 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
timer->io_base = of_iomap(np, 0);

of_node_put(np);
+
+ if (!timer->io_base)
+ return -ENXIO;
+
+ r = omap_dmtimer_powerup(np);
+ if (r)
+ return r;
} else {
if (omap_dm_timer_reserve_systimer(timer->id))
return -ENODEV;

sprintf(name, "timer%d", timer->id);
oh_name = name;
- }

- oh = omap_hwmod_lookup(oh_name);
- if (!oh)
- return -ENODEV;
+ oh = omap_hwmod_lookup(oh_name);
+ if (!oh)
+ return -ENODEV;

- if (!of_have_populated_dt()) {
r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL,
&irq);
if (r)
@@ -303,11 +304,14 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,

/* Static mapping, never released */
timer->io_base = ioremap(mem.start, mem.end - mem.start);
+
+ if (!timer->io_base)
+ return -ENXIO;
+
+
+ omap_hwmod_setup_one(oh_name);
+ omap_hwmod_enable(oh);
}
-
- if (!timer->io_base)
- return -ENXIO;
-
/* After the dmtimer is using hwmod these clocks won't be needed */
timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
if (IS_ERR(timer->fclk))
@@ -333,10 +337,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,

clk_put(src);

- omap_hwmod_setup_one(oh_name);
- omap_hwmod_enable(oh);
__omap_dm_timer_init_regs(timer);
-
if (posted)
__omap_dm_timer_enable_posted(timer);

--
1.7.9.5

2014-04-23 01:28:07

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 1/8] ARM: OMAP2+: timer: Add a powerup function

In an effort to isolate the time power initialization for future purposes, add
a function to do the same. This primarily involves a hwmod lookup, setup and
enable.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index dfb19df..ec427e6 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -210,6 +210,31 @@ static void __init omap_dmtimer_init(void)
}
}

+int __init omap_dmtimer_powerup(struct device_node *np)
+{
+ struct omap_hwmod *oh;
+ const char *oh_name = NULL;
+ int ret;
+
+ of_property_read_string_index(np, "ti,hwmods", 0, &oh_name);
+ if (!oh_name)
+ return -ENODEV;
+
+ oh = omap_hwmod_lookup(oh_name);
+ if (!oh)
+ return -ENODEV;
+
+ ret = omap_hwmod_setup_one(oh_name);
+ if (ret)
+ return ret;
+
+ ret = omap_hwmod_enable(oh);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
/**
* omap_dm_timer_get_errata - get errata flags for a timer
*
--
1.7.9.5

2014-04-23 01:28:02

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 8/8] ARM: OMAP2+: timer: Add legacy code for old way of getting fclk

Separate out legacy code for getting timer->fclk and reuse it for
the DT-case as a fallback. All DT users should ideally be specifying
a clock property with a phandle of its clock node. Till the migration
is complete, add a legacy function to keep things working.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b3db1da..81a29b1 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -248,6 +248,19 @@ static u32 __init omap_dm_timer_get_errata(void)
return OMAP_TIMER_ERRATA_I103_I767;
}

+static int legacy_hwmod_clkget(struct omap_dm_timer *timer, const char *oh_name)
+{
+ struct omap_hwmod *oh;
+
+ oh = omap_hwmod_lookup(oh_name);
+ if (!oh)
+ return -ENODEV;
+
+ timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
+ if (IS_ERR(timer->fclk))
+ return PTR_ERR(timer->fclk);
+}
+
static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
const char *fck_source,
const char *property,
@@ -289,6 +302,14 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
* fall back code is to be deleted and we're to return
* PTR_ERR(timer->fclk) here.
*/
+ of_property_read_string_index(np, "ti,hwmods", 0,
+ &oh_name);
+ if (!oh_name)
+ return -ENODEV;
+
+ r = legacy_hwmod_clkget(timer, oh_name);
+ if (r)
+ return r;
}
} else {
if (omap_dm_timer_reserve_systimer(timer->id))
@@ -320,15 +341,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,

omap_hwmod_setup_one(oh_name);
omap_hwmod_enable(oh);
- }

- if (!timer->fclk || IS_ERR(timer->fclk)) {
- oh = omap_hwmod_lookup(oh_name);
- if (!oh)
- return -ENODEV;
- timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
- if (IS_ERR(timer->fclk))
- return PTR_ERR(timer->fclk);
+ r = legacy_hwmod_clkget(timer, oh_name);
+ if (r)
+ return r;
}

/*
--
1.7.9.5

2014-04-23 01:29:51

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 5/8] ARM: OMAP2+: timer: Use of_clk_get for DT platforms

For DT-booting platforms, use of_clk_get to get the fclk for system timers.
Separate out the legacy code for non-DT platform use.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index ea91ef9..4fcfd7a 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -277,6 +277,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (!timer->io_base)
return -ENXIO;

+ timer->fclk = of_clk_get(np, 0);
+ if (IS_ERR(timer->fclk))
+ return PTR_ERR(timer->fclk);
+
r = omap_dmtimer_powerup(np);
if (r)
return r;
@@ -308,14 +312,13 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (!timer->io_base)
return -ENXIO;

+ timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
+ if (IS_ERR(timer->fclk))
+ return PTR_ERR(timer->fclk);

omap_hwmod_setup_one(oh_name);
omap_hwmod_enable(oh);
}
- /* After the dmtimer is using hwmod these clocks won't be needed */
- timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
- if (IS_ERR(timer->fclk))
- return PTR_ERR(timer->fclk);

/*
* Clock reparenting code, goes away for DT-boot atleast,
--
1.7.9.5

2014-04-23 01:30:25

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 7/8] ARM: OMAP2+: timer: Add fallback for of_clk_get

Not all platforms currently will support of_clk_get on timer
because they may not have clock property in their DT nodes. Add
code to handle this case so that things are kept working. Finally
we can delete this code once all system timer nodes have a clock
property.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 519ccfd..b3db1da 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -277,13 +277,19 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (!timer->io_base)
return -ENXIO;

- timer->fclk = of_clk_get(np, 0);
- if (IS_ERR(timer->fclk))
- return PTR_ERR(timer->fclk);
-
r = omap_dmtimer_powerup(np);
if (r)
return r;
+
+ timer->fclk = of_clk_get(np, 0);
+ if (IS_ERR(timer->fclk)) {
+ /*
+ * Support DT platforms temporarily that don't have
+ * clock property in their dts yet. Ultimately this
+ * fall back code is to be deleted and we're to return
+ * PTR_ERR(timer->fclk) here.
+ */
+ }
} else {
if (omap_dm_timer_reserve_systimer(timer->id))
return -ENODEV;
@@ -312,14 +318,19 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (!timer->io_base)
return -ENXIO;

- timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
- if (IS_ERR(timer->fclk))
- return PTR_ERR(timer->fclk);
-
omap_hwmod_setup_one(oh_name);
omap_hwmod_enable(oh);
}

+ if (!timer->fclk || IS_ERR(timer->fclk)) {
+ oh = omap_hwmod_lookup(oh_name);
+ if (!oh)
+ return -ENODEV;
+ timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
+ if (IS_ERR(timer->fclk))
+ return PTR_ERR(timer->fclk);
+ }
+
/*
* Clock reparenting code, goes away for DT-boot atleast,
* once clock layer can do it through DT.
--
1.7.9.5

2014-04-23 01:30:57

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 6/8] ARM: OMAP2+: timer: Fix error message to not use hwmod structure

oh->name is no longer used, correct the error message.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 4fcfd7a..519ccfd 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -331,8 +331,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (clk_get_parent(timer->fclk) != src) {
r = clk_set_parent(timer->fclk, src);
if (r < 0) {
- pr_warn("%s: %s cannot set source\n", __func__,
- oh->name);
+ pr_warn("%s: cannot set timer's source\n", __func__);
+ WARN_ON(1);
clk_put(src);
return r;
}
--
1.7.9.5

2014-04-23 01:31:25

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH 3/8] ARM: OMAP2+: timer: Add comment on timer clk parenting

Add a comment describing the state of system timer clock parenting. The code
following the comment should be deleted once all platforms can do DT boot, and
specially should not be executed for DT platforms once we can specify default
clock parents through DT.

Signed-off-by: Joel Fernandes <[email protected]>
---
arch/arm/mach-omap2/timer.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index f192a41..9fdff5b 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -313,6 +313,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
if (IS_ERR(timer->fclk))
return PTR_ERR(timer->fclk);

+ /*
+ * Clock reparenting code, goes away for DT-boot atleast,
+ * once clock layer can do it through DT.
+ */
src = clk_get(NULL, fck_source);
if (IS_ERR(src))
return PTR_ERR(src);
--
1.7.9.5

2014-07-21 11:02:26

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 1/8] ARM: OMAP2+: timer: Add a powerup function

* Joel Fernandes <[email protected]> [140422 18:27]:
> In an effort to isolate the time power initialization for future purposes, add
> a function to do the same. This primarily involves a hwmod lookup, setup and
> enable.

No users yet for this function? Can you remove the same code from
somewhere else in this patch?

Regards,

Tony

> Signed-off-by: Joel Fernandes <[email protected]>
> ---
> arch/arm/mach-omap2/timer.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index dfb19df..ec427e6 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -210,6 +210,31 @@ static void __init omap_dmtimer_init(void)
> }
> }
>
> +int __init omap_dmtimer_powerup(struct device_node *np)
> +{
> + struct omap_hwmod *oh;
> + const char *oh_name = NULL;
> + int ret;
> +
> + of_property_read_string_index(np, "ti,hwmods", 0, &oh_name);
> + if (!oh_name)
> + return -ENODEV;
> +
> + oh = omap_hwmod_lookup(oh_name);
> + if (!oh)
> + return -ENODEV;
> +
> + ret = omap_hwmod_setup_one(oh_name);
> + if (ret)
> + return ret;
> +
> + ret = omap_hwmod_enable(oh);
> + if (ret)
> + return ret;
> +
> + return 0;
> +}
> +
> /**
> * omap_dm_timer_get_errata - get errata flags for a timer
> *
> --
> 1.7.9.5
>

2014-07-21 11:07:22

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 2/8] ARM: OMAP2+: timer: Simplify clock event/source name setting

* Joel Fernandes <[email protected]> [140422 18:27]:
> For the OMAPs, we're setting up only one clockevent and clocksource. Further,
> for DT boot there's no easy way to get the timer name and currently this is
> done in an ugly way by reading a hwmod entry. So let's just set it to a simpler
> name like timer_clkev and timer_clksrc.
>
> Signed-off-by: Joel Fernandes <[email protected]>
> ---
> arch/arm/mach-omap2/timer.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index ec427e6..f192a41 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -251,7 +251,6 @@ static u32 __init omap_dm_timer_get_errata(void)
> static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> const char *fck_source,
> const char *property,
> - const char **timer_name,
> int posted)
> {
> char name[10]; /* 10 = sizeof("gptXX_Xck0") */
> @@ -290,8 +289,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> if (!oh)
> return -ENODEV;
>
> - *timer_name = oh->name;
> -
> if (!of_have_populated_dt()) {
> r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL,
> &irq);
> @@ -365,8 +362,10 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
> */
> __omap_dm_timer_override_errata(&clkev, OMAP_TIMER_ERRATA_I103_I767);
>
> + clockevent_gpt.name = "timer_clkev";
> +
> res = omap_dm_timer_init_one(&clkev, fck_source, property,
> - &clockevent_gpt.name, OMAP_TIMER_POSTED);
> + OMAP_TIMER_POSTED);
> BUG_ON(res);
>
> omap2_gp_timer_irq.dev_id = &clkev;
> @@ -489,10 +488,11 @@ static void __init omap2_gptimer_clocksource_init(int gptimer_id,
> clksrc.errata = omap_dm_timer_get_errata();
>
> res = omap_dm_timer_init_one(&clksrc, fck_source, property,
> - &clocksource_gpt.name,
> OMAP_TIMER_NONPOSTED);
> BUG_ON(res);
>
> + clocksource_gpt.name = "timer_clksrc";
> +
> __omap_dm_timer_load_start(&clksrc,
> OMAP_TIMER_CTRL_AR, 0,
> OMAP_TIMER_NONPOSTED);

Hmm aren't we losing information now about which timer we are using?

Might be worth checking if these new names are getting copied somewhere
or what happens after init?

Regards,

Tony

2014-07-21 11:08:59

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 3/8] ARM: OMAP2+: timer: Add comment on timer clk parenting

* Joel Fernandes <[email protected]> [140422 18:27]:
> Add a comment describing the state of system timer clock parenting. The code
> following the comment should be deleted once all platforms can do DT boot, and
> specially should not be executed for DT platforms once we can specify default
> clock parents through DT.

I think we can do it already for DT based booting?

Regards,

Tony

> Signed-off-by: Joel Fernandes <[email protected]>
> ---
> arch/arm/mach-omap2/timer.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index f192a41..9fdff5b 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -313,6 +313,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> if (IS_ERR(timer->fclk))
> return PTR_ERR(timer->fclk);
>
> + /*
> + * Clock reparenting code, goes away for DT-boot atleast,
> + * once clock layer can do it through DT.
> + */
> src = clk_get(NULL, fck_source);
> if (IS_ERR(src))
> return PTR_ERR(src);
> --
> 1.7.9.5
>

2014-07-21 11:10:27

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 6/8] ARM: OMAP2+: timer: Fix error message to not use hwmod structure

* Joel Fernandes <[email protected]> [140422 18:27]:
> oh->name is no longer used, correct the error message.

I guess this error is created by one of the patchs in this
series? So maybe fold it into the patch creating this error?

Regards,

Tony

> Signed-off-by: Joel Fernandes <[email protected]>
> ---
> arch/arm/mach-omap2/timer.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index 4fcfd7a..519ccfd 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -331,8 +331,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
> if (clk_get_parent(timer->fclk) != src) {
> r = clk_set_parent(timer->fclk, src);
> if (r < 0) {
> - pr_warn("%s: %s cannot set source\n", __func__,
> - oh->name);
> + pr_warn("%s: cannot set timer's source\n", __func__);
> + WARN_ON(1);
> clk_put(src);
> return r;
> }
> --
> 1.7.9.5
>

2014-07-21 11:11:47

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 7/8] ARM: OMAP2+: timer: Add fallback for of_clk_get

* Joel Fernandes <[email protected]> [140422 18:27]:
> Not all platforms currently will support of_clk_get on timer
> because they may not have clock property in their DT nodes. Add
> code to handle this case so that things are kept working. Finally
> we can delete this code once all system timer nodes have a clock
> property.

I think this needs updating now too? Might be best to fix the
platforms that don't have clocks available yet via DT instead :)

Regards,

Tony