All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/6] timer: dw-apb: add reset handling
Date: Wed, 24 Jul 2019 09:21:26 +0200	[thread overview]
Message-ID: <fc9ae741-d568-0b8c-35d7-8e4d49d10f68@denx.de> (raw)
In-Reply-To: <20190723202758.21295-4-simon.k.r.goldschmidt@gmail.com>

On 7/23/19 10:27 PM, Simon Goldschmidt wrote:
> To use this timer on socfpga as system tick, it needs to take itself out
> of reset.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
> 
>  drivers/timer/dw-apb-timer.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c
> index 86312b8dc7..fad22be8c9 100644
> --- a/drivers/timer/dw-apb-timer.c
> +++ b/drivers/timer/dw-apb-timer.c
> @@ -8,6 +8,7 @@
>  #include <common.h>
>  #include <dm.h>
>  #include <clk.h>
> +#include <reset.h>
>  #include <timer.h>
>  
>  #include <asm/io.h>
> @@ -18,7 +19,8 @@
>  #define DW_APB_CTRL		0x8
>  
>  struct dw_apb_timer_priv {
> -	fdt_addr_t	regs;
> +	fdt_addr_t regs;
> +	struct reset_ctl_bulk resets;
>  };
>  
>  static int dw_apb_timer_get_count(struct udevice *dev, u64 *count)
> @@ -42,6 +44,12 @@ static int dw_apb_timer_probe(struct udevice *dev)
>  	struct clk clk;
>  	int ret;
>  
> +	ret = reset_get_bulk(dev, &priv->resets);
> +	if (ret)
> +		dev_warn(dev, "Can't get reset: %d\n", ret);

Shouldn't this be printed by the subsystem ?

[...]

  reply	other threads:[~2019-07-24  7:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 20:27 [U-Boot] [PATCH 0/6] arm: socfpga: gen5: DM improvements Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 1/6] ddr: socfpga: gen5: constify altera_gen5_sdram_ops Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 2/6] arm: socfpga: gen5: increase SPL_SYS_MALLOC_F_LEN Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 3/6] timer: dw-apb: add reset handling Simon Goldschmidt
2019-07-24  7:21   ` Marek Vasut [this message]
2019-07-24  7:43     ` Simon Goldschmidt
2019-07-24  7:48       ` Marek Vasut
2019-07-24 18:09         ` Simon Goldschmidt
2019-07-25  7:34           ` Marek Vasut
2019-07-25 11:21             ` Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 4/6] arm: socfpga: gen5: move initial reset handling to reset driver Simon Goldschmidt
2019-07-24  7:21   ` Marek Vasut
2019-07-24  7:41     ` Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 5/6] arm: socfpga: gen5: add readonly clk driver Simon Goldschmidt
2019-07-24  7:23   ` Marek Vasut
2019-07-24  7:45     ` Simon Goldschmidt
2019-07-24  7:51       ` Marek Vasut
2019-07-24  8:24         ` Simon Goldschmidt
2019-07-24  8:29           ` Marek Vasut
2019-08-15 16:22       ` Simon Goldschmidt
2019-08-15 16:34         ` Marek Vasut
2019-08-15 16:57           ` Simon Goldschmidt
2019-08-15 17:07             ` Marek Vasut
2019-08-15 17:42               ` Simon Goldschmidt
2019-08-16  8:37                 ` Marek Vasut
2019-08-16 12:12                   ` Simon Goldschmidt
2019-07-23 20:27 ` [U-Boot] [PATCH 6/6] arm: socfpga: gen5: use DM_TIMER for systick Simon Goldschmidt
2019-07-23 20:33 ` [U-Boot] [PATCH 0/6] arm: socfpga: gen5: DM improvements Simon Goldschmidt

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=fc9ae741-d568-0b8c-35d7-8e4d49d10f68@denx.de \
    --to=marex@denx.de \
    --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.