All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: zynq: move ttc timer code to drivers/clocksource
Date: Tue, 30 Oct 2012 22:36:42 +0000	[thread overview]
Message-ID: <201210302236.43473.arnd@arndb.de> (raw)
In-Reply-To: <508FBBA5.2080707@monstr.eu>

On Tuesday 30 October 2012, Michal Simek wrote:
> On 10/29/2012 07:56 PM, Josh Cartwright wrote:
> > 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 +-
> >   arch/arm/mach-zynq/common.h      |  24 ----
> >   arch/arm/mach-zynq/timer.c       | 298 ---------------------------------------
> >   drivers/clocksource/Makefile     |   1 +
> >   drivers/clocksource/xilinx_ttc.c | 297 ++++++++++++++++++++++++++++++++++++++
> >   include/linux/xilinx_ttc.h       |  24 ++++
> >   7 files changed, 324 insertions(+), 324 deletions(-)

When you submit a patch that moves files around, please use the '-M' flag to
git-format-patch so we can see the actual changes instead of a file being
removed and another one added.

> >   delete mode 100644 arch/arm/mach-zynq/common.h
> >   delete mode 100644 arch/arm/mach-zynq/timer.c
> >   create mode 100644 drivers/clocksource/xilinx_ttc.c
> >   create mode 100644 include/linux/xilinx_ttc.h
> 
> Really?
> If yes. shouldn't be there any better naming convention
> especially for headers. linux/clocksource/xilinx_ttc.h.

Moving it is certainly the right direction, but I think we need a better way to
handle those forward declarations. "struct sys_timer" is actually an ARM specific
structure, so we might just want to add all the forward declarations for the 
timers into arch/arm/include/asm/mach/time.h. It's not ideal to do it like that,
but I think it's much better than having a new globally visible header for
each timer that is used on ARM.

Eventually, we might want to do something similar to what we are discussing
for the top-level IRQ controllers at the moment, where we just autodetect them
from DT if possible, so we don't need to have any pointer to the timer from
arch code at all.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: monstr@monstr.eu
Cc: Josh Cartwright <josh.cartwright@ni.com>,
	Michal Simek <michal.simek@xilinx.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, arm@kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] ARM: zynq: move ttc timer code to drivers/clocksource
Date: Tue, 30 Oct 2012 22:36:42 +0000	[thread overview]
Message-ID: <201210302236.43473.arnd@arndb.de> (raw)
In-Reply-To: <508FBBA5.2080707@monstr.eu>

On Tuesday 30 October 2012, Michal Simek wrote:
> On 10/29/2012 07:56 PM, Josh Cartwright wrote:
> > 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 +-
> >   arch/arm/mach-zynq/common.h      |  24 ----
> >   arch/arm/mach-zynq/timer.c       | 298 ---------------------------------------
> >   drivers/clocksource/Makefile     |   1 +
> >   drivers/clocksource/xilinx_ttc.c | 297 ++++++++++++++++++++++++++++++++++++++
> >   include/linux/xilinx_ttc.h       |  24 ++++
> >   7 files changed, 324 insertions(+), 324 deletions(-)

When you submit a patch that moves files around, please use the '-M' flag to
git-format-patch so we can see the actual changes instead of a file being
removed and another one added.

> >   delete mode 100644 arch/arm/mach-zynq/common.h
> >   delete mode 100644 arch/arm/mach-zynq/timer.c
> >   create mode 100644 drivers/clocksource/xilinx_ttc.c
> >   create mode 100644 include/linux/xilinx_ttc.h
> 
> Really?
> If yes. shouldn't be there any better naming convention
> especially for headers. linux/clocksource/xilinx_ttc.h.

Moving it is certainly the right direction, but I think we need a better way to
handle those forward declarations. "struct sys_timer" is actually an ARM specific
structure, so we might just want to add all the forward declarations for the 
timers into arch/arm/include/asm/mach/time.h. It's not ideal to do it like that,
but I think it's much better than having a new globally visible header for
each timer that is used on ARM.

Eventually, we might want to do something similar to what we are discussing
for the top-level IRQ controllers at the moment, where we just autodetect them
from DT if possible, so we don't need to have any pointer to the timer from
arch code at all.

	Arnd

  reply	other threads:[~2012-10-30 22:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-29 18:56 [PATCH] ARM: zynq: move ttc timer code to drivers/clocksource Josh Cartwright
2012-10-29 18:56 ` Josh Cartwright
2012-10-30 11:36 ` Michal Simek
2012-10-30 11:36   ` Michal Simek
2012-10-30 22:36   ` Arnd Bergmann [this message]
2012-10-30 22:36     ` Arnd Bergmann
2012-10-31  8:48     ` Michal Simek
2012-10-31  8:48       ` Michal Simek
2012-10-31 12:35       ` Josh Cartwright
2012-10-31 12:35         ` Josh Cartwright

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=201210302236.43473.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.