From: Arnd Bergmann <arnd@arndb.de>
To: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v10 19/19] h8300: devicetree source
Date: Mon, 04 May 2015 17:09:21 +0200 [thread overview]
Message-ID: <2656548.FgCj9p2Jp9@wuerfel> (raw)
In-Reply-To: <1430736122-20929-21-git-send-email-ysato@users.sourceforge.jp>
On Monday 04 May 2015 19:42:02 Yoshinori Sato wrote:
> +
> + h8intc: intc@0 {
> + compatible = "renesas,h8s-intc", "renesas,h8300-intc";
> + #interrupt-cells = <1>;
> + interrupt-controller;
> + };
The node name should be "interrupt-controller@0", not "intc@0", to follow
the common conventions.
> + tpu: tpu@ffffe0 {
> + compatible = "renesas,tpu";
> + reg = <0xffffe0 16>, <0xfffff0 12>;
> + clocks = <&pclk>;
> + clock-names = "peripheral_clk";
> + };
> +
> + timer8: timer@ffffb0 {
> + compatible = "renesas,8bit-timer";
> + reg = <0xffff80 10>;
> + interrupts = <72 75>;
> + clocks = <&pclk>;
> + clock-names = "peripheral_clk";
> + renesas,mode = <CLOCKEVENTDEVICE>;
> + renesas,div = <DIV_8>;
> + };
> +
The renesas,div property seems odd here. How about defining a
"clock-frequency" property and figuring out the divider from
the parent clock in the driver?
Your new binding makes it mandatory to have a "fclk" clock, which
seems better suited than "peripheral_clk", so I'd suggest you
change the code to match the documentation (rather than the other
way round). Alternatively, you could make this an anonymous
clock and not specify the name at all.
The renesas,mode property seems odd. Why is that needed? It sounds
like you are encoding how you expect the device to be used by
Linux, rather than what it can do in hardware. If you have multiple
variants of the 8bit-timer hardware that have different features,
better use separate compatible strings for them, or a boolean
flag that announces the presence or absence of a feature.
If however, this is just a hint for Linux, maybe you can find a way
for the driver to take a guess itself, e.g. using the first
device it finds as a clockevent device, and only use a clocksource
device if there is more than one?
> + sci0: serial@ffff78 {
> + compatible = "renesas,sci";
> + reg = <0xffff78 8>;
> + interrupts = <88 89 90 91>;
> + clocks = <&pclk>;
> + clock-names = "peripheral_clk";
> + };
> + sci1: serial@ffff80 {
> + compatible = "renesas,sci";
> + reg = <0xffff80 8>;
> + interrupts = <92 93 94 95>;
> + clocks = <&pclk>;
> + clock-names = "peripheral_clk";
> + };
> + sci2: serial@ffff88 {
> + compatible = "renesas,sci";
> + reg = <0xffff88 8>;
> + interrupts = <96 97 98 99>;
> + clocks = <&pclk>;
> + clock-names = "peripheral_clk";
> + };
> +};
The binding for sci requires the clock to be named "sci_ick", so please
use that instead of "peripheral_clk". The driver can handle both.
Arnd
next prev parent reply other threads:[~2015-05-04 15:09 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 10:41 [PATCH v10 00/19] Re-introduce h8300 architecture Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 01/19] MAINTENRS: Add h8300 Yoshinori Sato
2015-05-04 10:41 ` Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 02/19] Add H8/300 ELF Machine Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 03/19] mksysmap: Avoid h8300's local symbol Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 04/19] sh-sci: Add H8/300 SCI Yoshinori Sato
2015-05-04 13:58 ` Geert Uytterhoeven
2015-05-04 10:41 ` [PATCH v10 05/19] Add common asm-offsets.h Yoshinori Sato
2015-05-04 10:41 ` Yoshinori Sato
2015-05-04 14:46 ` Arnd Bergmann
2015-05-07 4:24 ` Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 06/19] h8300: Assembly headers Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 07/19] h8300: UAPI assembly headers Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 08/19] h8300: Exception and Interrupt handling Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 09/19] h8300: kernel booting Yoshinori Sato
2015-05-04 10:41 ` Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 10/19] h8300: process and signals Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 11/19] h8300: CPU depend helpers Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 12/19] h8300: miscellaneous functions Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 13/19] h8300: Memory management Yoshinori Sato
2015-05-04 10:41 ` Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 14/19] h8300: Library functions Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 15/19] h8300: Build scripts Yoshinori Sato
2015-05-04 10:41 ` [PATCH v10 16/19] h8300: clock driver Yoshinori Sato
2015-05-04 10:42 ` [PATCH v10 17/19] h8300: clocksource Yoshinori Sato
2015-05-04 10:42 ` Yoshinori Sato
2015-05-04 10:42 ` [PATCH v10 18/19] h8300: configs Yoshinori Sato
2015-05-04 10:42 ` [PATCH v10 19/19] h8300: devicetree source Yoshinori Sato
[not found] ` <1430736122-20929-21-git-send-email-ysato-Rn4VEauK+AKRv+LV9MX5uooqe+aC9MnS@public.gmane.org>
2015-05-04 12:40 ` Geert Uytterhoeven
2015-05-04 12:40 ` Geert Uytterhoeven
2015-05-04 15:09 ` Arnd Bergmann [this message]
2015-05-07 4:47 ` Yoshinori Sato
2015-05-04 15:28 ` [PATCH v10 00/19] Re-introduce h8300 architecture Arnd Bergmann
2015-05-05 2:27 ` Guenter Roeck
2015-05-07 4:22 ` Yoshinori Sato
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=2656548.FgCj9p2Jp9@wuerfel \
--to=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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