All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@linaro.org>
To: Joel Fernandes <joelf@ti.com>
Cc: Rob Herring <robh@kernel.org>, Tony Lindgren <tony@atomide.com>,
	Tero Kristo <t-kristo@ti.com>, Nishanth Menon <nm@ti.com>,
	Suman Anna <s-anna@ti.com>, Felipe Balbi <balbi@ti.com>,
	Linux OMAP List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 3/5] ARM: OMAP2+: timer: Add clocksource initialization and powerup support
Date: Fri, 14 Mar 2014 14:09:50 -0700	[thread overview]
Message-ID: <7h38ikij1d.fsf@paris.lan> (raw)
In-Reply-To: <532240F0.1030403@ti.com> (Joel Fernandes's message of "Thu, 13 Mar 2014 18:36:16 -0500")

Joel Fernandes <joelf@ti.com> writes:

> On 03/13/2014 04:52 PM, Rob Herring wrote:
>> On Thu, Mar 13, 2014 at 3:35 PM, Joel Fernandes <joelf@ti.com> wrote:
>>> Introduce a generic omap timer initialization function that can
>>> be used by all SoCs for which support is available in the clocksource
>>> driver introduced in the series.
>>>
>>> The function will also be responsible for calling clock initialization
>>> required for everything else to work.
>>>
>>> Signed-off-by: Joel Fernandes <joelf@ti.com>
>>> ---
>>>  arch/arm/mach-omap2/common.h |    1 +
>>>  arch/arm/mach-omap2/timer.c  |   28 ++++++++++++++++++++++++++++
>>>  2 files changed, 29 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
>>> index a6aae30..e58d9a4 100644
>>> --- a/arch/arm/mach-omap2/common.h
>>> +++ b/arch/arm/mach-omap2/common.h
>>> @@ -92,6 +92,7 @@ extern void omap3_secure_sync32k_timer_init(void);
>>>  extern void omap3_gptimer_timer_init(void);
>>>  extern void omap4_local_timer_init(void);
>>>  extern void omap5_realtime_timer_init(void);
>>> +void omap_generic_timer_init(void);
>>>
>>>  void omap2420_init_early(void);
>>>  void omap2430_init_early(void);
>>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>>> index 74044aa..08c73a0 100644
>>> --- a/arch/arm/mach-omap2/timer.c
>>> +++ b/arch/arm/mach-omap2/timer.c
>>> @@ -324,6 +324,25 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
>>>         return r;
>>>  }
>>>
>>> +int __init omap_dmtimer_powerup(struct omap_dm_timer *timer,
>>> +                                       struct device_node *np) {
>> 
>> This function seems unrelated to the commit message.
>
> Ok, I'll add it in the message.
>
>> 
>>> +       struct omap_hwmod *oh;
>>> +       const char *oh_name = NULL;
>>> +
>>> +       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;
>>> +
>>> +       omap_hwmod_setup_one(oh_name);
>>> +
>>> +       omap_hwmod_enable(oh);
>>> +       return 0;
>>> +}
>>> +
>>>  static void __init omap2_gp_clockevent_init(int gptimer_id,
>>>                                                 const char *fck_source,
>>>                                                 const char *property)
>>> @@ -615,6 +634,15 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
>>>                                2, "sys_clkin_ck", NULL);
>>>  #endif
>>>
>>> +void omap_generic_timer_init(void)
>>> +{
>>> +       if (!of_have_populated_dt())
>>> +               BUG_ON("Generic timer init should only be used for DT boot\n");
>> 
>> I thought omap2 is always DT boot now.
>
> That's right, sorry- I'll get rid of the check.

Actually, mainline still supports legacy boot and has board files for
OMAP3 platforms, and we shouldn't break legacy boot on purpose IMO.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: khilman@linaro.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 3/5] ARM: OMAP2+: timer: Add clocksource initialization and powerup support
Date: Fri, 14 Mar 2014 14:09:50 -0700	[thread overview]
Message-ID: <7h38ikij1d.fsf@paris.lan> (raw)
In-Reply-To: <532240F0.1030403@ti.com> (Joel Fernandes's message of "Thu, 13 Mar 2014 18:36:16 -0500")

Joel Fernandes <joelf@ti.com> writes:

> On 03/13/2014 04:52 PM, Rob Herring wrote:
>> On Thu, Mar 13, 2014 at 3:35 PM, Joel Fernandes <joelf@ti.com> wrote:
>>> Introduce a generic omap timer initialization function that can
>>> be used by all SoCs for which support is available in the clocksource
>>> driver introduced in the series.
>>>
>>> The function will also be responsible for calling clock initialization
>>> required for everything else to work.
>>>
>>> Signed-off-by: Joel Fernandes <joelf@ti.com>
>>> ---
>>>  arch/arm/mach-omap2/common.h |    1 +
>>>  arch/arm/mach-omap2/timer.c  |   28 ++++++++++++++++++++++++++++
>>>  2 files changed, 29 insertions(+)
>>>
>>> diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
>>> index a6aae30..e58d9a4 100644
>>> --- a/arch/arm/mach-omap2/common.h
>>> +++ b/arch/arm/mach-omap2/common.h
>>> @@ -92,6 +92,7 @@ extern void omap3_secure_sync32k_timer_init(void);
>>>  extern void omap3_gptimer_timer_init(void);
>>>  extern void omap4_local_timer_init(void);
>>>  extern void omap5_realtime_timer_init(void);
>>> +void omap_generic_timer_init(void);
>>>
>>>  void omap2420_init_early(void);
>>>  void omap2430_init_early(void);
>>> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
>>> index 74044aa..08c73a0 100644
>>> --- a/arch/arm/mach-omap2/timer.c
>>> +++ b/arch/arm/mach-omap2/timer.c
>>> @@ -324,6 +324,25 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
>>>         return r;
>>>  }
>>>
>>> +int __init omap_dmtimer_powerup(struct omap_dm_timer *timer,
>>> +                                       struct device_node *np) {
>> 
>> This function seems unrelated to the commit message.
>
> Ok, I'll add it in the message.
>
>> 
>>> +       struct omap_hwmod *oh;
>>> +       const char *oh_name = NULL;
>>> +
>>> +       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;
>>> +
>>> +       omap_hwmod_setup_one(oh_name);
>>> +
>>> +       omap_hwmod_enable(oh);
>>> +       return 0;
>>> +}
>>> +
>>>  static void __init omap2_gp_clockevent_init(int gptimer_id,
>>>                                                 const char *fck_source,
>>>                                                 const char *property)
>>> @@ -615,6 +634,15 @@ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
>>>                                2, "sys_clkin_ck", NULL);
>>>  #endif
>>>
>>> +void omap_generic_timer_init(void)
>>> +{
>>> +       if (!of_have_populated_dt())
>>> +               BUG_ON("Generic timer init should only be used for DT boot\n");
>> 
>> I thought omap2 is always DT boot now.
>
> That's right, sorry- I'll get rid of the check.

Actually, mainline still supports legacy boot and has board files for
OMAP3 platforms, and we shouldn't break legacy boot on purpose IMO.

Kevin

  parent reply	other threads:[~2014-03-14 21:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 20:35 [RFC 0/5] Clocksource driver for OMAP SoCs Joel Fernandes
2014-03-13 20:35 ` Joel Fernandes
2014-03-13 20:35 ` [RFC 1/5] ARM: dts: am33xx: Add clock nodes for timer1 and timer2 Joel Fernandes
2014-03-13 20:35   ` Joel Fernandes
2014-03-13 20:35   ` Joel Fernandes
2014-03-13 20:35 ` [RFC 2/5] ARM: dts: am33xx: Set parent clock for timer through DT Joel Fernandes
2014-03-13 20:35   ` Joel Fernandes
2014-03-13 20:35   ` Joel Fernandes
2014-03-14  8:08   ` Tero Kristo
2014-03-14  8:08     ` Tero Kristo
2014-03-13 20:35 ` [RFC 3/5] ARM: OMAP2+: timer: Add clocksource initialization and powerup support Joel Fernandes
2014-03-13 20:35   ` Joel Fernandes
2014-03-13 21:52   ` Rob Herring
2014-03-13 21:52     ` Rob Herring
2014-03-13 23:36     ` Joel Fernandes
2014-03-13 23:36       ` Joel Fernandes
2014-03-14  8:03       ` Tero Kristo
2014-03-14  8:03         ` Tero Kristo
2014-03-14 21:09       ` Kevin Hilman [this message]
2014-03-14 21:09         ` Kevin Hilman
2014-03-14 21:16         ` Rob Herring
2014-03-14 21:16           ` Rob Herring
2014-03-13 20:35 ` [RFC 4/5] clocksource: omap-timer: Introduce clocksource driver for OMAP SoCs Joel Fernandes
2014-03-13 20:35   ` Joel Fernandes
2014-03-13 20:48   ` Tony Lindgren
2014-03-13 20:48     ` Tony Lindgren
2014-03-13 23:49     ` Joel Fernandes
2014-03-13 23:49       ` Joel Fernandes
2014-03-13 23:49       ` Joel Fernandes
2014-03-14 15:52       ` Tony Lindgren
2014-03-14 15:52         ` Tony Lindgren
2014-03-14 19:32         ` Joel Fernandes
2014-03-14 19:32           ` Joel Fernandes
2014-03-14 19:33           ` Joel Fernandes
2014-03-14 19:33             ` Joel Fernandes
2014-03-15  0:13   ` Suman Anna
2014-03-15  0:13     ` Suman Anna
2014-03-15  0:13     ` Suman Anna
2014-03-15  1:11     ` Joel Fernandes
2014-03-15  1:11       ` Joel Fernandes
2014-03-13 20:35 ` [RFC 5/5] ARM: AM33xx: Move to using omap_generic_timer_init for init_time Joel Fernandes
2014-03-13 20:35   ` Joel Fernandes

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=7h38ikij1d.fsf@paris.lan \
    --to=khilman@linaro.org \
    --cc=balbi@ti.com \
    --cc=joelf@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=s-anna@ti.com \
    --cc=t-kristo@ti.com \
    --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.