Re: [RFC PATCH] clocksource/drivers/sh_cmt: access registers according to spec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> unsigned int (everywhere)?
> Yes, this is the result of a long-by-long division, but it should be
> a small value anyway.

OK.

> > +       /* Tests showed that we need to wait 3 clocks here */
> > +       unsigned long cmcnt_delay = ch->cmt->reg_delay * 3 / 2;
> 
> DIV_ROUND_UP()

Really here? reg_delay is ensured to be a multiple of two...

> > +       /* We shall wait 2 input clks after register writes */
> > +       if (cmt->info->model >= SH_CMT_48BIT) // FIXME: Really not needed for older ones?
> > +               cmt->reg_delay = 2000000UL / rate + 1;

... but here it would make a lot of sense!

> > +       cmt->rate = cmt->info->width == 16 ? rate / 512 : rate / 8;
> 
> cmt->rate = rate / (cmt->info->width == 16 ? 512 : 8);

OK. I had it without the parens and it looked ugly. With parens it looks
good.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux