All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [PATCH 08/14] MIPS: Octeon: Scale Octeon2 clocks in  octeon_init_cvmcount()
Date: Fri, 08 Oct 2010 14:36:23 +0400	[thread overview]
Message-ID: <4CAEF427.9030608@mvista.com> (raw)
In-Reply-To: <1286492633-26885-9-git-send-email-ddaney@caviumnetworks.com>

Hello.

On 08-10-2010 3:03, David Daney wrote:

> The per-CPU clocks are synchronized from IPD_CLK_COUNT, on cn63XX it
> must be scaled by the clock frequency ratio.

> Signed-off-by: David Daney<ddaney@caviumnetworks.com>
[...]

> diff --git a/arch/mips/cavium-octeon/csrc-octeon.c b/arch/mips/cavium-octeon/csrc-octeon.c
> index b6847c8..c85a681 100644
> --- a/arch/mips/cavium-octeon/csrc-octeon.c
> +++ b/arch/mips/cavium-octeon/csrc-octeon.c
[...]
> @@ -33,8 +49,20 @@ void octeon_init_cvmcount(void)
>   	 * Loop several times so we are executing from the cache,
>   	 * which should give more deterministic timing.
>   	 */
> -	while (loops--)
> -		write_c0_cvmcount(cvmx_read_csr(CVMX_IPD_CLK_COUNT));
> +	while (loops--) {
> +		u64 ipd_clk_count = cvmx_read_csr(CVMX_IPD_CLK_COUNT);
> +		if (rdiv != 0) {
> +			ipd_clk_count = ipd_clk_count * rdiv;

    Why not:

			ipd_clk_count *= rdiv;

WBR, Sergei

  reply	other threads:[~2010-10-08 10:38 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 23:03 [PATCH 00/14] Add initial support for Octeon CN63XX David Daney
2010-10-07 23:03 ` [PATCH 01/14] MIPS: Octeon: Update register definitions for CN63XX chips David Daney
2010-10-11 12:47   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 02/14] MIPS: Octeon: Add cn63XX to Octeon chip detection macros David Daney
2010-10-11 13:08   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 03/14] MIPS: Octeon: Update L2 Cache code for CN63XX David Daney
2010-10-11 12:54   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 04/14] MIPS: Add identifiers for Octeon II CPUs David Daney
2010-10-07 23:03 ` [PATCH 05/14] MIPS: Octeon: Handle Octeon II caches David Daney
2010-10-11 13:13   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 06/14] MIPS: Octeon: Probe for Octeon II CPUs David Daney
2010-10-11 13:23   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 07/14] MIPS: Octeon: Enable Read Inhibit / eXecute Inhibit on Octeon II David Daney
2010-10-11 13:24   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 08/14] MIPS: Octeon: Scale Octeon2 clocks in octeon_init_cvmcount() David Daney
2010-10-08 10:36   ` Sergei Shtylyov [this message]
2010-10-11 12:31     ` Ralf Baechle
2010-10-11 13:26   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 09/14] MIPS: Octeon: Remove bogus code from octeon_get_clock_rate() David Daney
2010-10-11 13:28   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 10/14] MIPS: Octeon: Add octeon_get_io_clock_rate() for cn63xx David Daney
2010-10-11 13:30   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 11/14] MIPS: Octeon: Use I/O clock rate for calculations David Daney
2010-10-11 13:40   ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 12/14] ata: pata_octeon_cf: Use I/O clock rate for timing calculations David Daney
2010-10-11 13:43   ` Ralf Baechle
2010-10-14  8:42     ` Jeff Garzik
2010-10-07 23:03 ` [PATCH 13/14] watchdog: octeon-wdt: " David Daney
2010-10-10 18:23   ` Wim Van Sebroeck
2010-10-11 12:40     ` Ralf Baechle
2010-10-07 23:03 ` [PATCH 14/14] MIPS: Octeon: Apply CN63XXP1 errata workarounds David Daney
2010-10-11 13:45   ` Ralf Baechle

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=4CAEF427.9030608@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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.