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 1/2] ohci-platform: Add support for devicetree instantiation
Date: Tue, 07 Jan 2014 22:16:16 +0100	[thread overview]
Message-ID: <4061478.AqT6BOpdOY@wuerfel> (raw)
In-Reply-To: <52CC6B8F.5000404@redhat.com>

On Tuesday 07 January 2014 22:03:11 Hans de Goede wrote:
> >> +
> >> +Optional properties:
> >> + - clocks: array of clocks
> >> + - clock-names: clock names "ahb" and/or "ohci"
> >
> > Where does "ahb" come from, what does it mean, and how is it relevant
> > to generic platforms?
> 
> ahb is an ARM specific thing, so your right it does not belong in a
> generic driver. I'll use clk1 and clk2 as names in my next version.

While AHB is a bus created by ARM Ltd, it's not actually specific
to the ARM architecture. My guess is that it is in fact used on 95%
of all SoCs, so I would leave it at that. For the other clock, I
think that's actually the bus clock for the USB interface, so I would
not call it "ohci" but rather just "usb" or "phy".

I think it's important to distinguish the names and not just use
"clk1" and "clk2", because the driver may actually want to access
a particular clock in some scenario.

> > What about platforms that use 3 clocks?
> 
> Ah yes I see some platforms have 3 clocks, I'll also add a clk3.

I guess we should try to find at least one hardware data sheet
for an actual ohci implementation and look at what the clock
inputs are really called. A lot of the drivers seem to incorrectly
use the name for the clock signal inside of the soc, which tends
to be named after who provides it, not what it's used for.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: Alan Stern
	<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
	Tony Prisk <linux-ci5G2KO2hbZ+pU9mqzGVBQ@public.gmane.org>,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH 1/2] ohci-platform: Add support for devicetree instantiation
Date: Tue, 07 Jan 2014 22:16:16 +0100	[thread overview]
Message-ID: <4061478.AqT6BOpdOY@wuerfel> (raw)
In-Reply-To: <52CC6B8F.5000404-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Tuesday 07 January 2014 22:03:11 Hans de Goede wrote:
> >> +
> >> +Optional properties:
> >> + - clocks: array of clocks
> >> + - clock-names: clock names "ahb" and/or "ohci"
> >
> > Where does "ahb" come from, what does it mean, and how is it relevant
> > to generic platforms?
> 
> ahb is an ARM specific thing, so your right it does not belong in a
> generic driver. I'll use clk1 and clk2 as names in my next version.

While AHB is a bus created by ARM Ltd, it's not actually specific
to the ARM architecture. My guess is that it is in fact used on 95%
of all SoCs, so I would leave it at that. For the other clock, I
think that's actually the bus clock for the USB interface, so I would
not call it "ohci" but rather just "usb" or "phy".

I think it's important to distinguish the names and not just use
"clk1" and "clk2", because the driver may actually want to access
a particular clock in some scenario.

> > What about platforms that use 3 clocks?
> 
> Ah yes I see some platforms have 3 clocks, I'll also add a clk3.

I guess we should try to find at least one hardware data sheet
for an actual ohci implementation and look at what the clock
inputs are really called. A lot of the drivers seem to incorrectly
use the name for the clock signal inside of the soc, which tends
to be named after who provides it, not what it's used for.

	Arnd

  reply	other threads:[~2014-01-07 21:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-05 23:04 [PATCH 1/2] ohci-platform: Add support for devicetree instantiation Hans de Goede
2014-01-05 23:04 ` Hans de Goede
2014-01-05 23:04 ` [PATCH 2/2] ehci-platform: Add support for clks and phy passed through devicetree Hans de Goede
2014-01-05 23:04   ` Hans de Goede
2014-01-06 15:52   ` Mark Rutland
2014-01-06 15:52     ` Mark Rutland
2014-01-06  7:16 ` [PATCH 1/2] ohci-platform: Add support for devicetree instantiation Arnd Bergmann
2014-01-06  7:16   ` Arnd Bergmann
2014-01-06  7:50   ` Hans de Goede
2014-01-06  7:50     ` Hans de Goede
2014-01-06 16:03     ` Arnd Bergmann
2014-01-06 16:03       ` Arnd Bergmann
2014-01-08 16:00     ` Hans de Goede
2014-01-08 16:00       ` Hans de Goede
2014-01-06 15:45 ` Mark Rutland
2014-01-06 15:45   ` Mark Rutland
2014-01-07 21:01   ` Hans de Goede
2014-01-07 21:01     ` Hans de Goede
2014-01-06 15:49 ` Alan Stern
2014-01-06 15:49   ` Alan Stern
2014-01-07 21:03   ` Hans de Goede
2014-01-07 21:03     ` Hans de Goede
2014-01-07 21:16     ` Arnd Bergmann [this message]
2014-01-07 21:16       ` Arnd Bergmann
2014-01-07 21:26       ` Hans de Goede
2014-01-07 21:26         ` Hans de Goede
2014-01-08 16:59         ` Alan Stern
2014-01-08 16:59           ` Alan Stern

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=4061478.AqT6BOpdOY@wuerfel \
    --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.