On Wed, Jul 29, 2020 at 1:02 AM Heinrich Schuchardt <xypron.g...@gmx.de> wrote: > > readl() and writel() expect void *. Do not pass an integer value. > > Remove unused include include asm/arch/timer.h.
two include ? > > Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de> > --- > The driver is needed for the timers of the Kendryte K210 (compatible > "snps,dw-apb-timer"). > --- > drivers/timer/dw-apb-timer.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c > index 35271b20c8..c8be4417fd 100644 > --- a/drivers/timer/dw-apb-timer.c > +++ b/drivers/timer/dw-apb-timer.c > @@ -14,7 +14,6 @@ > #include <dm/device_compat.h> > > #include <asm/io.h> > -#include <asm/arch/timer.h> > > #define DW_APB_LOAD_VAL 0x0 > #define DW_APB_CURR_VAL 0x4 > @@ -34,7 +33,7 @@ static int dw_apb_timer_get_count(struct udevice *dev, u64 > *count) > * requires the count to be incrementing. Invert the > * result. > */ > - *count = timer_conv_64(~readl(priv->regs + DW_APB_CURR_VAL)); > + *count = timer_conv_64(~readl((void *)(priv->regs + > DW_APB_CURR_VAL))); > > return 0; > } > @@ -61,8 +60,8 @@ static int dw_apb_timer_probe(struct udevice *dev) > clk_free(&clk); > > /* init timer */ > - writel(0xffffffff, priv->regs + DW_APB_LOAD_VAL); > - writel(0xffffffff, priv->regs + DW_APB_CURR_VAL); > + writel(0xffffffff, (void *)(priv->regs + DW_APB_LOAD_VAL)); > + writel(0xffffffff, (void *)(priv->regs + DW_APB_CURR_VAL)); > setbits_le32(priv->regs + DW_APB_CTRL, 0x3); > Reviewed-by: Bin Meng <bin.m...@windriver.com>