All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dr. Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot,2/3] rockchip: rk3188: add timer3 node
Date: Thu, 26 Apr 2018 09:14:17 +0200	[thread overview]
Message-ID: <F21407BF-1940-4316-AB49-A46DE4B0E90B@theobroma-systems.com> (raw)
In-Reply-To: <64e21a24-971c-8cba-6669-0b5f8bac49dc@rock-chips.com>


> On 26 Apr 2018, at 04:50, Kever Yang <kever.yang@rock-chips.com> wrote:
> 
> Hi Philipp,
> 
> On 04/25/2018 06:17 PM, Dr. Philipp Tomsich wrote:
>> Kever,
>> 
>>> On 25 Apr 2018, at 12:04, Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote:
>>> 
>>>> Add dts node for timer3.
>>>> Because of the rockchip timer can only KNOWN "dtd_rockchip_rk3368_timer"
>>>> with OF_PLATDATA enable, so we override its compatible to
>>>> "rockchip,rk3368-timer".
>>>> 
>>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>>> ---
>>>> 
>>>> arch/arm/dts/rk3188-radxarock-u-boot.dtsi | 6 ++++++
>>>> arch/arm/dts/rk3188.dtsi                  | 6 ++++++
>>>> 2 files changed, 12 insertions(+)
>>>> 
>>> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>> This looks like a work-around that we’ll have to revert eventually.
>> I would instead extend the driver to recognise the ‘rockchip,rk3188-timer’
>> and ‘rockchip,rk3288-timer’ as well.
>> 
>> Please confirm that both these .compatible strings should also be handled
>> by the same driver and I’ll make the change when applying this series.
> 
> Do you mean you want patch like this? I do not like add lots
> #ifdef/#elif like this.
> +++ b/drivers/timer/rockchip_timer.c
> @@ -17,7 +17,11 @@ DECLARE_GLOBAL_DATA_PTR;
>  
>  #if CONFIG_IS_ENABLED(OF_PLATDATA)
>  struct rockchip_timer_plat {
> +#ifdef CONFIG_ROCKCHIP_RK3368
>         struct dtd_rockchip_rk3368_timer dtd;
> +#elif CONFIG_ROCKCHIP_RK3188
> +       struct dtd_rockchip_rk3188_timer dtd;
> +#endif
>  };
>  #endif

The OF_PLATDATA implementation is really broken in this regard: the
only fix I can think of would be to emit "struct dtd_…” for every compatible
listed in the DTS.

> @@ -153,6 +157,7 @@ static const struct timer_ops rockchip_timer_ops = {
>  
>  static const struct udevice_id rockchip_timer_ids[] = {
>         { .compatible = "rockchip,rk3368-timer" },
> +       { .compatible = "rockchip,rk3188-timer" },
>         {}
>  };

I actually referred only to this part (i.e. adding the .compatible).

  reply	other threads:[~2018-04-26  7:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18  3:13 [U-Boot] [PATCH 1/3] rockchip: rk3188: add -u-boot.dtsi for rock-rk3188 Kever Yang
2018-04-18  3:13 ` [U-Boot] [PATCH 2/3] rockchip: rk3188: add timer3 node Kever Yang
2018-04-25 10:04   ` [U-Boot] [U-Boot,2/3] " Philipp Tomsich
2018-04-25 10:17     ` Dr. Philipp Tomsich
2018-04-26  2:50       ` Kever Yang
2018-04-26  7:14         ` Dr. Philipp Tomsich [this message]
2018-04-26  7:37           ` Dr. Philipp Tomsich
2018-04-26  7:05   ` Philipp Tomsich
2018-04-18  3:13 ` [U-Boot] [PATCH 3/3] rockchip: rk3188: use DM timer instead of rk_timer Kever Yang
2018-04-25 10:04   ` [U-Boot] [U-Boot, " Philipp Tomsich
2018-04-25 10:04   ` Philipp Tomsich
2018-04-26  7:05   ` Philipp Tomsich
2018-04-25 10:04 ` [U-Boot] [U-Boot, 1/3] rockchip: rk3188: add -u-boot.dtsi for rock-rk3188 Philipp Tomsich
2018-04-25 10:04 ` Philipp Tomsich
2018-04-26  7:05 ` Philipp Tomsich

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=F21407BF-1940-4316-AB49-A46DE4B0E90B@theobroma-systems.com \
    --to=philipp.tomsich@theobroma-systems.com \
    --cc=u-boot@lists.denx.de \
    /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.