All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Callow <mc-lists@tesco.net>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: Possible error in omap16xxcam_set_xclk?
Date: Tue, 13 Jun 2006 21:52:25 +0100	[thread overview]
Message-ID: <448F2589.6090304@tesco.net> (raw)
In-Reply-To: <448ED4BC.1010804@tesco.net>

Matt Callow wrote:

>  Hi,
>
> I've been looking at omap/omap16xxcam.c (with a view to creating an
> omap1510 equivalent) and have noticed the following:
>
>
>        int divisor = 1;
>        divisor = data->ocp_clk/xclk;
>        if ( divisor * xclk < data->ocp_clk)
>                ++divisor;
>
>        switch (divisor) {
>                case 1:
>                case 2:
>                        xclk_val = FOSCMOD_TC2_CK2;
>                        break;
>                case 3:
>                        xclk_val = FOSCMOD_TC2_CK3;
>                        break;
>                case 4:
>                case 5:
>                case 6:
>                case 7:
>                        xclk_val = FOSCMOD_TC2_CK4;
>                        break;
> ...
>
> Now, by my reckoning, divisor can only be 1 or 2 when it reaches the
> case statement. So, should the preceding if statement actually be:
>
>        while ( divisor * xclk < data->ocp_clk)
>                ++divisor;
>
> ?
>
>
No!
Answered my own question! I should have looked more carefully at the
code :-)

Matt

      reply	other threads:[~2006-06-13 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 15:07 Possible error in omap16xxcam_set_xclk? Matt Callow
2006-06-13 20:52 ` Matt Callow [this message]

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=448F2589.6090304@tesco.net \
    --to=mc-lists@tesco.net \
    --cc=linux-omap-open-source@linux.omap.com \
    /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.