public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Jonas Jensen <jonas.jensen@gmail.com>,
	linux@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARM: mach-moxart: platform port for MOXA ART SoC
Date: Thu, 16 May 2013 16:52:55 +0200	[thread overview]
Message-ID: <4406410.DRdDEViWVK@wuerfel> (raw)
In-Reply-To: <CACmBeS3JZ8bm6jJbmrKTfmZqshezN6QKdmyPCKdQ2HUwzY7ggA@mail.gmail.com>

On Thursday 16 May 2013 15:37:16 Jonas Jensen wrote:
> On 15 May 2013 15:16, Arnd Bergmann <arnd@arndb.de> wrote:
> > The part that I don't understand at all is the "timer0" part. Is that a string
> > from the data sheet?
> 
> I have next to no data sheets or documentation on the SoC itself. What
> I know is from looking at old sources, which suggest there are more
> than one timer (the rest were never implemented).
> 
> It only needs one for timer_tick? Does it make sense to just call it "timer"?

Yes, I think just "moxa,moxart-timer" is fine. Chances are that if you have
more of them, they are actually compatible with one another. If they are not
and you need more than one, you can always pick a different name
if you need another one.

> > Can you provide some more detail why what PMU registers are used here? Is that
> > a "Performance Measurement Unit", "Power Management Unit" or something else?
> > Are you sure that those registers are only ever needed for GPIO?
> 
> It's "Power Management Unit". The MMC driver uses it to read system
> clock and write it to clock control, but I suspect it can be removed.
> It's code under #ifdef MSD_SUPPORT_GET_CLOCK but I think the else is
> perfectly acceptable.
> GPIO uses it only to enable or disable pins.

It sounds like this is used for what should be separate drivers/clk and
drivers/pinctrl drivers:

A pinctrl driver is often the superset of a gpio driver and can control
more aspects of a pin than the gpio interface can.

The clk driver is supposed to give an abstraction of the clock tree
to be used with interfaces like clk_get() and clk_set_rate(). It
can probably be really simple in case of moxart. Is the mmc driver
the only one that needs access to clocks?

Are the pinctrl and clk registers in different parts of the PMU, or are
they intermixed? In the former case, you can just turn it into separate
devices that have their own distinct "reg" properties, in the second
case, the best solution is likely to mark the pmu 'compatible="syscon"'
and use the drivers/mfd/syscon.c driver to get a regmap that is used
by the clock and pinctrl drivers, respectively.

	Arnd

      reply	other threads:[~2013-05-16 14:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACmBeS1NLFUYHBOVL28aCCzRrgXYGPZF9t3qj6AdcgaMkrPGoQ@mail.gmail.com>
     [not found] ` <CACmBeS01vs=fHOXu1Lnq8GX8YAbF6aBKmqopKPVt78mPYm=_9w@mail.gmail.com>
2013-03-13 15:37   ` [PATCH] ARM: mach-moxart: platform port for MOXA ART SoC Jonas Jensen
2013-03-13 18:34     ` Daniel Mack
2013-03-15 11:25       ` Arnd Bergmann
2013-03-17 15:32         ` Jonas Jensen
2013-03-18 15:03           ` Arnd Bergmann
2013-05-15 11:20             ` Jonas Jensen
2013-05-15 13:16               ` Arnd Bergmann
2013-05-15 13:32                 ` Russell King - ARM Linux
2013-05-15 22:54                   ` Arnd Bergmann
2013-05-16  8:57                     ` Russell King - ARM Linux
2013-05-16 13:35                       ` Arnd Bergmann
2013-05-16 13:50                     ` Jonas Jensen
2013-05-16 13:37                 ` Jonas Jensen
2013-05-16 14:52                   ` Arnd Bergmann [this message]

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=4406410.DRdDEViWVK@wuerfel \
    --to=arnd@arndb.de \
    --cc=jonas.jensen@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox