All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Michal Simek <michal.simek@xilinx.com>
Cc: Josh Cartwright <josh.cartwright@ni.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Russell King <linux@arm.linux.org.uk>,
	Mike Turquette <mturquette@ti.com>,
	John Stultz <johnstul@us.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Alan Cox <alan@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	John Linn <John.Linn@xilinx.com>,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH 2/8] ARM: zynq: move ttc timer code to drivers/clocksource
Date: Mon, 05 Nov 2012 08:49:12 -0600	[thread overview]
Message-ID: <5097D1E8.2000403@gmail.com> (raw)
In-Reply-To: <CAHTX3d++0fGSw7GQHcc-S1X1Qh-rfekpr-E8Jkg2_vFqdCFFTg@mail.gmail.com>



On 11/05/2012 05:22 AM, Michal Simek wrote:
> 2012/10/29 Josh Cartwright <josh.cartwright@ni.com>:
>> Suggested cleanup by Arnd Bergmann.  Move the ttc timer.c code to
>> drivers/clocksource, and out of the mach-zynq directory.
>>
>> The common.h (which only held the timer declaration) was renamed to
>> xilinx_ttc.h and moved into include/linux.
>>
>> Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  arch/arm/mach-zynq/Makefile                                    | 2 +-
>>  arch/arm/mach-zynq/common.c                                    | 2 +-
>>  drivers/clocksource/Makefile                                   | 1 +
>>  arch/arm/mach-zynq/timer.c => drivers/clocksource/xilinx_ttc.c | 1 -
>>  arch/arm/mach-zynq/common.h => include/linux/xilinx_ttc.h      | 4 ++--
>>  5 files changed, 5 insertions(+), 5 deletions(-)
>>  rename arch/arm/mach-zynq/timer.c => drivers/clocksource/xilinx_ttc.c (99%)
>>  rename arch/arm/mach-zynq/common.h => include/linux/xilinx_ttc.h (91%)
> 
> Not going to apply this patch till there is clean way how to move all
> drivers there.
> Especially I don't like to add xilinx_ttc.h to include/linux folder.
> 

A cleaner way is how we are doing irqchips [1]. This needs a single
function (or one each for clksrc and clkevt) that has a DT match list of
all known timers and calls their init function. It should be a bit
simpler than irqchips init function because you don't need to worry
about hierarchy init ordering. That doesn't solve non-DT though and if
there are any extra functions like we have with irqchips, you still need
the header in include/linux.

Rob

[1] http://www.spinics.net/lists/arm-kernel/msg203687.html

WARNING: multiple messages have this Message-ID (diff)
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/8] ARM: zynq: move ttc timer code to drivers/clocksource
Date: Mon, 05 Nov 2012 08:49:12 -0600	[thread overview]
Message-ID: <5097D1E8.2000403@gmail.com> (raw)
In-Reply-To: <CAHTX3d++0fGSw7GQHcc-S1X1Qh-rfekpr-E8Jkg2_vFqdCFFTg@mail.gmail.com>



On 11/05/2012 05:22 AM, Michal Simek wrote:
> 2012/10/29 Josh Cartwright <josh.cartwright@ni.com>:
>> Suggested cleanup by Arnd Bergmann.  Move the ttc timer.c code to
>> drivers/clocksource, and out of the mach-zynq directory.
>>
>> The common.h (which only held the timer declaration) was renamed to
>> xilinx_ttc.h and moved into include/linux.
>>
>> Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  arch/arm/mach-zynq/Makefile                                    | 2 +-
>>  arch/arm/mach-zynq/common.c                                    | 2 +-
>>  drivers/clocksource/Makefile                                   | 1 +
>>  arch/arm/mach-zynq/timer.c => drivers/clocksource/xilinx_ttc.c | 1 -
>>  arch/arm/mach-zynq/common.h => include/linux/xilinx_ttc.h      | 4 ++--
>>  5 files changed, 5 insertions(+), 5 deletions(-)
>>  rename arch/arm/mach-zynq/timer.c => drivers/clocksource/xilinx_ttc.c (99%)
>>  rename arch/arm/mach-zynq/common.h => include/linux/xilinx_ttc.h (91%)
> 
> Not going to apply this patch till there is clean way how to move all
> drivers there.
> Especially I don't like to add xilinx_ttc.h to include/linux folder.
> 

A cleaner way is how we are doing irqchips [1]. This needs a single
function (or one each for clksrc and clkevt) that has a DT match list of
all known timers and calls their init function. It should be a bit
simpler than irqchips init function because you don't need to worry
about hierarchy init ordering. That doesn't solve non-DT though and if
there are any extra functions like we have with irqchips, you still need
the header in include/linux.

Rob

[1] http://www.spinics.net/lists/arm-kernel/msg203687.html

  reply	other threads:[~2012-11-05 14:49 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-31 22:06 [PATCH 0/8] zynq COMMON_CLK support Josh Cartwright
2012-10-31 22:06 ` Josh Cartwright
2012-10-29 18:42 ` [PATCH 2/8] ARM: zynq: move ttc timer code to drivers/clocksource Josh Cartwright
2012-10-29 18:42   ` Josh Cartwright
2012-11-05 11:22   ` Michal Simek
2012-11-05 11:22     ` Michal Simek
2012-11-05 14:49     ` Rob Herring [this message]
2012-11-05 14:49       ` Rob Herring
     [not found]     ` <CAHTX3d++0fGSw7GQHcc-S1X1Qh-rfekpr-E8Jkg2_vFqdCFFTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-05 21:47       ` Josh Cartwright
2012-11-05 21:47         ` Josh Cartwright
2012-11-05 21:47         ` Josh Cartwright
2012-11-12 11:53         ` Michal Simek
2012-11-12 11:53           ` Michal Simek
2012-10-30 12:25 ` [PATCH 6/8] serial: xilinx_uartps: kill CONFIG_OF conditional Josh Cartwright
2012-10-30 12:25   ` Josh Cartwright
2012-10-30 12:25   ` Josh Cartwright
2012-11-05 12:16   ` Michal Simek
2012-11-05 12:16     ` Michal Simek
2012-10-31 17:11 ` [PATCH 1/8] ARM: zynq: move arm-specific sys_timer out of ttc Josh Cartwright
2012-10-31 17:11   ` Josh Cartwright
2012-10-31 17:11   ` Josh Cartwright
2012-11-05 11:20   ` Michal Simek
2012-11-05 11:20     ` Michal Simek
2012-11-05 11:20     ` Michal Simek
2012-10-31 18:24 ` [PATCH 4/8] ARM: zynq: dts: split up device tree Josh Cartwright
2012-10-31 18:24   ` Josh Cartwright
2012-10-31 18:24   ` Josh Cartwright
2012-11-05 11:32   ` Michal Simek
2012-11-05 11:32     ` Michal Simek
2012-10-31 18:58 ` [PATCH 5/8] ARM: zynq: add COMMON_CLK support Josh Cartwright
2012-10-31 18:58   ` Josh Cartwright
2012-11-02  9:33   ` Lars-Peter Clausen
2012-11-02  9:33     ` Lars-Peter Clausen
2012-11-02 13:38     ` Josh Cartwright
2012-11-02 13:38       ` Josh Cartwright
2012-11-02 13:38       ` Josh Cartwright
2012-11-02 15:12       ` Lars-Peter Clausen
2012-11-02 15:12         ` Lars-Peter Clausen
2012-11-02 15:28         ` Josh Cartwright
2012-11-02 15:28           ` Josh Cartwright
2012-11-02 15:28           ` Josh Cartwright
2012-11-05 12:31           ` Michal Simek
2012-11-05 12:31             ` Michal Simek
2012-10-31 19:28 ` [PATCH 7/8] serial: xilinx_uartps: get clock rate info from dts Josh Cartwright
2012-10-31 19:28   ` Josh Cartwright
2012-11-02  9:20   ` Lars-Peter Clausen
2012-11-02  9:20     ` Lars-Peter Clausen
2012-11-02 13:39     ` Josh Cartwright
2012-11-02 13:39       ` Josh Cartwright
2012-11-02 13:39       ` Josh Cartwright
2012-10-31 19:45 ` [PATCH 3/8] ARM: zynq: dts: add description of the second uart Josh Cartwright
2012-10-31 19:45   ` Josh Cartwright
2012-10-31 19:45   ` Josh Cartwright
2012-11-05 11:35   ` Michal Simek
2012-11-05 11:35     ` Michal Simek
2012-10-31 19:56 ` [PATCH 8/8] clocksource: xilinx_ttc: add OF_CLK support Josh Cartwright
2012-10-31 19:56   ` Josh Cartwright
2012-11-02  2:56   ` Josh Cartwright
2012-11-02  2:56     ` Josh Cartwright
2012-11-05 13:02   ` Michal Simek
2012-11-05 13:02     ` Michal Simek

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=5097D1E8.2000403@gmail.com \
    --to=robherring2@gmail.com \
    --cc=John.Linn@xilinx.com \
    --cc=alan@linux.intel.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnstul@us.ibm.com \
    --cc=josh.cartwright@ni.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=michal.simek@xilinx.com \
    --cc=mturquette@ti.com \
    --cc=tglx@linutronix.de \
    /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.