public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jonas Gorski <jogo@openwrt.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"mbizon@freebox.fr" <mbizon@freebox.fr>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"gregory.0xf0@gmail.com" <gregory.0xf0@gmail.com>
Subject: Re: [PATCH tty-next v2 4/4] Documentation: devicetree: add bindings documentation for bcm63xx-uart
Date: Fri, 21 Feb 2014 15:59:28 +0100	[thread overview]
Message-ID: <3851734.OkR5IG0DHF@wuerfel> (raw)
In-Reply-To: <CAOiHx==LEMeLVxLv2r+btWQNcPitndpVTsjbu0Ji4_tzmap51A@mail.gmail.com>

On Friday 21 February 2014 15:48:04 Jonas Gorski wrote:
> 
> There already is a (non-OF) user for this driver that exports a
> "periph" clock, which is where the name comes from. It currently does
> all clock lookups purely based on the clock name, not the device name
> itself. Of course we can just make it get a different named clock when
> of_node is present; that should satisfy both.

I think you are referring to arch/mips/bcm63xx/clk.c, but that doesn't
actually use clkdev at all and instead expects device drivers to know
the name of *output* of the clock controllers. You can't use that
name in the binding for a device, which needs to know the name of
the *input* from the clock consumer point of view.

An easy solution would be to register a clkdev lookup table in
the above clock driver.

> Technically on BCM6345 there are actually two clocks (more or less),
> the "periph" for the reference clock rate, and a clock bit in the
> clock controller register for the uart block. All later chips do not
> expose a uart clock bit anymore, and the bootloader is expected to
> enable it on systems with the clock, so we can probably pretend that
> it does not exist. Also it's quite unlikely that BCM6345 will ever
> receive proper OF support, and if it does, we can add the second
> optional clock then if we find devices that need it.

That seems fine, but it does mean things would get tricky we use
an anonymous clock and then later need to add the second clock
after all, e.g. if the uart gets reused in a new product that
requires you to program both clocks.

	Arnd

  reply	other threads:[~2014-02-21 14:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 18:15 [PATCH tty-next v2 0/4] Device Tree probing for bcm63xx_uart Florian Fainelli
2014-02-20 18:15 ` [PATCH tty-next v2 1/4] tty: serial: bcm63xx_uart: include linux/io.h Florian Fainelli
2014-02-20 18:15 ` [PATCH tty-next v2 2/4] tty: serial: bcm63xx_uart: define UART_REG_SIZE constant Florian Fainelli
2014-02-20 18:15 ` [PATCH tty-next v2 3/4] tty: serial: bcm63xx_uart: add support for DT probing Florian Fainelli
2014-02-20 18:15 ` [PATCH tty-next v2 4/4] Documentation: devicetree: add bindings documentation for bcm63xx-uart Florian Fainelli
2014-02-21 12:08   ` Mark Rutland
2014-02-21 12:49   ` Arnd Bergmann
2014-02-21 13:49     ` Mark Rutland
2014-02-21 14:48       ` Jonas Gorski
2014-02-21 14:59         ` Arnd Bergmann [this message]
2014-02-21 15:18           ` Jonas Gorski
2014-02-21 15:23             ` Arnd Bergmann

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=3851734.OkR5IG0DHF@wuerfel \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.0xf0@gmail.com \
    --cc=jogo@openwrt.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mbizon@freebox.fr \
    /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