X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Ftimer%2Faltera_timer.c;h=89fe05b704589c45696a09b7db8b026ceca70bc2;hb=584133665affa0963ca1025a8ad1feae015dee06;hp=2364f1b00f7903cc34e98c1c3c5395f33dba85f1;hpb=9e360a5c9cac27c40547bc2e0b81bbadeffb3ca2;p=u-boot diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c index 2364f1b00f..89fe05b704 100644 --- a/drivers/timer/altera_timer.c +++ b/drivers/timer/altera_timer.c @@ -34,7 +34,7 @@ struct altera_timer_platdata { struct altera_timer_regs *regs; }; -static int altera_timer_get_count(struct udevice *dev, unsigned long *count) +static int altera_timer_get_count(struct udevice *dev, u64 *count) { struct altera_timer_platdata *plat = dev->platdata; struct altera_timer_regs *const regs = plat->regs; @@ -46,7 +46,7 @@ static int altera_timer_get_count(struct udevice *dev, unsigned long *count) /* Read timer value */ val = readl(®s->snapl) & 0xffff; val |= (readl(®s->snaph) & 0xffff) << 16; - *count = ~val; + *count = timer_conv_64(~val); return 0; }