Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv1] rtc: bcm-iproc: Add support for Broadcom iproc rtc
Date: Wed, 11 Mar 2015 21:31:42 +0100	[thread overview]
Message-ID: <3192051.z32dL5alyl@wuerfel> (raw)
In-Reply-To: <55009ED6.4050205@broadcom.com>

On Wednesday 11 March 2015 13:00:22 Arun Ramamurthy wrote:
> 
> Arnd, this is the device tree entry that I would end up with and I plan 
> to use syscon_regmap_lookup_by_phandle in the rtc driver. Does this look 
> acceptable?
> 
> rtc: iproc_rtc at 0x03026000 {
>                 compatible = "brcm,iproc-rtc";
>                 reg =   <0x03026000 0xC>,
>                 iso_cell_syscon = <&crmu_iso_cell_control>;
>                 bbl_auth_syscon = <&crmu_bbl_auth>
>                 status = "okay";
> 
> crmu_iso_cell_control:crmu at 0x0301C02C {
>                 compatible = "syscon";
>                 reg = <0x0301C038 0x8>
> }
> 
> crmu_bbl_auth:crmu at 0x03024C74 {
>                 compatible = "syscon";
>                 reg = <0x03024C74 0x8>;
> }

This doesn't look right, sorry:

A syscon device is defined as a collection of registers that
have no logical grouping within them but that can be seen
as a single device. What you have here instead are two syscon
nodes that each have only a single 8-byte register.

What are the other registers surrounding those? I would expect
something like

	crmu0: syscon at 03010000 {
                 compatible = "syscon";
                 reg = <0x03010000 0x10000>;
	};

and then use an offset into the syscon from the rtc node, like

	iproc_rtc: rtc at 03026000 {
		compatible = "brcm,iproc-rtc";
		reg = <0x03026000 0x1000>;
		iso_cell_syscon = <&crmu0 0xc038>;
		bbl_auth_syscon = <&crmu1 0x4c74>;
	};

Note also that you got most of the naming wrong:

- node names should be generic strings like "rtc", "syscon", "pci" etc.
  The specific strings are defined in ePAPR.
- unit addresses should match the first 'reg' property and
  not start with '0x'.
- it seems strange that the rtc has only 12 bytes of registers,
  though that may actually be correct.

	Arnd

      reply	other threads:[~2015-03-11 20:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 19:22 [PATCHv1] rtc: bcm-iproc: Add support for Broadcom iproc rtc arun.ramamurthy at broadcom.com
2014-12-16 19:42 ` Arnd Bergmann
2014-12-16 20:05   ` Arun Ramamurthy
2014-12-16 20:19     ` Arnd Bergmann
2014-12-16 20:27       ` Ray Jui
2014-12-16 21:54         ` Arun Ramamurthy
2014-12-17 14:31           ` Arnd Bergmann
2015-02-12 22:17             ` Arun Ramamurthy
2015-03-04 22:21               ` Arnd Bergmann
2015-03-04 22:40                 ` Arun Ramamurthy
2015-03-04 22:50                   ` Arnd Bergmann
2015-03-04 22:53                     ` Arun Ramamurthy
2015-03-04 22:58                       ` Arnd Bergmann
2015-03-11 20:00                         ` Arun Ramamurthy
2015-03-11 20:31                           ` 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=3192051.z32dL5alyl@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox