From: Kevin Hilman <khilman@ti.com>
To: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: tony@atomide.com, linux-arm-kernel@lists.infradead.org,
linux-omap@vger.kernel.org, R Sricharan <r.sricharan@ti.com>
Subject: Re: [PATCH v2 02/14] ARM: OMAP: counter-32k: Select the CR register offset using the IP scheme.
Date: Mon, 09 Jul 2012 09:47:47 -0700 [thread overview]
Message-ID: <873950x4ng.fsf@ti.com> (raw)
In-Reply-To: <1341566515-22665-3-git-send-email-santosh.shilimkar@ti.com> (Santosh Shilimkar's message of "Fri, 6 Jul 2012 14:51:43 +0530")
Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
> From: R Sricharan <r.sricharan@ti.com>
>
> OMAP socs has a legacy and a highlander version of the
> 32k sync counter IP. The register offsets vary between the
> highlander and the legacy scheme. So use the 'SCHEME'
> bits(30-31) of the revision register to distinguish between
> the two versions and choose the CR register offset accordingly.
Do these scheme bits exist on *all* OMAPs? including OMAP1?
This driver is used on OMAP1 as well as OMAP2+.
The cover letter says this was only build tested on OMAP1 so I suggest
this actually be tested on OMAP1 before merging.
Kevin
> Signed-off-by: R Sricharan <r.sricharan@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
> arch/arm/plat-omap/counter_32k.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
> index 2132c4f..dbf1e03 100644
> --- a/arch/arm/plat-omap/counter_32k.c
> +++ b/arch/arm/plat-omap/counter_32k.c
> @@ -29,7 +29,10 @@
> #include <plat/clock.h>
>
> /* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */
> -#define OMAP2_32KSYNCNT_CR_OFF 0x10
> +#define OMAP2_32KSYNCNT_REV_OFF 0x0
> +#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
> +#define OMAP2_32KSYNCNT_CR_OFF_LOW 0x10
> +#define OMAP2_32KSYNCNT_CR_OFF_HIGH 0x30
>
> /*
> * 32KHz clocksource ... always available, on pretty most chips except
> @@ -84,9 +87,16 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
> int ret;
>
> /*
> - * 32k sync Counter register offset is at 0x10
> + * 32k sync Counter IP register offsets vary between the
> + * highlander version and the legacy ones.
> + * The 'SCHEME' bits(30-31) of the revision register is used
> + * to identify the version.
> */
> - sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF;
> + if (__raw_readl(vbase + OMAP2_32KSYNCNT_REV_OFF) &
> + OMAP2_32KSYNCNT_REV_SCHEME)
> + sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_HIGH;
> + else
> + sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_LOW;
>
> /*
> * 120000 rough estimate from the calculations in
WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 02/14] ARM: OMAP: counter-32k: Select the CR register offset using the IP scheme.
Date: Mon, 09 Jul 2012 09:47:47 -0700 [thread overview]
Message-ID: <873950x4ng.fsf@ti.com> (raw)
In-Reply-To: <1341566515-22665-3-git-send-email-santosh.shilimkar@ti.com> (Santosh Shilimkar's message of "Fri, 6 Jul 2012 14:51:43 +0530")
Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
> From: R Sricharan <r.sricharan@ti.com>
>
> OMAP socs has a legacy and a highlander version of the
> 32k sync counter IP. The register offsets vary between the
> highlander and the legacy scheme. So use the 'SCHEME'
> bits(30-31) of the revision register to distinguish between
> the two versions and choose the CR register offset accordingly.
Do these scheme bits exist on *all* OMAPs? including OMAP1?
This driver is used on OMAP1 as well as OMAP2+.
The cover letter says this was only build tested on OMAP1 so I suggest
this actually be tested on OMAP1 before merging.
Kevin
> Signed-off-by: R Sricharan <r.sricharan@ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
> arch/arm/plat-omap/counter_32k.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
> index 2132c4f..dbf1e03 100644
> --- a/arch/arm/plat-omap/counter_32k.c
> +++ b/arch/arm/plat-omap/counter_32k.c
> @@ -29,7 +29,10 @@
> #include <plat/clock.h>
>
> /* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */
> -#define OMAP2_32KSYNCNT_CR_OFF 0x10
> +#define OMAP2_32KSYNCNT_REV_OFF 0x0
> +#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
> +#define OMAP2_32KSYNCNT_CR_OFF_LOW 0x10
> +#define OMAP2_32KSYNCNT_CR_OFF_HIGH 0x30
>
> /*
> * 32KHz clocksource ... always available, on pretty most chips except
> @@ -84,9 +87,16 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
> int ret;
>
> /*
> - * 32k sync Counter register offset is at 0x10
> + * 32k sync Counter IP register offsets vary between the
> + * highlander version and the legacy ones.
> + * The 'SCHEME' bits(30-31) of the revision register is used
> + * to identify the version.
> */
> - sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF;
> + if (__raw_readl(vbase + OMAP2_32KSYNCNT_REV_OFF) &
> + OMAP2_32KSYNCNT_REV_SCHEME)
> + sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_HIGH;
> + else
> + sync32k_cnt_reg = vbase + OMAP2_32KSYNCNT_CR_OFF_LOW;
>
> /*
> * 120000 rough estimate from the calculations in
next prev parent reply other threads:[~2012-07-09 16:47 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-06 9:21 [PATCH v2 00/14] ARM: OMAP5: Add minimal OMAP5 SOC support Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 01/14] ARM: OMAP2+: Move stubbed secure_sram_reserve function to a common.c and call it __weak Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 02/14] ARM: OMAP: counter-32k: Select the CR register offset using the IP scheme Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-09 8:50 ` Vaibhav Hiremath
2012-07-09 8:50 ` Vaibhav Hiremath
2012-07-09 10:42 ` Shilimkar, Santosh
2012-07-09 10:42 ` Shilimkar, Santosh
2012-07-10 6:41 ` Hiremath, Vaibhav
2012-07-10 6:41 ` Hiremath, Vaibhav
2012-07-10 7:12 ` Shilimkar, Santosh
2012-07-10 7:12 ` Shilimkar, Santosh
2012-07-10 7:25 ` Hiremath, Vaibhav
2012-07-10 7:25 ` Hiremath, Vaibhav
2012-07-09 16:47 ` Kevin Hilman [this message]
2012-07-09 16:47 ` Kevin Hilman
2012-07-09 23:21 ` Jon Hunter
2012-07-09 23:21 ` Jon Hunter
2012-07-10 5:50 ` Shilimkar, Santosh
2012-07-10 5:50 ` Shilimkar, Santosh
2012-07-09 23:52 ` Jon Hunter
2012-07-09 23:52 ` Jon Hunter
2012-07-06 9:21 ` [PATCH v2 03/14] ARM: OMAP5: id: Add cpu id for ES versions Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-11-02 10:03 ` Roger Quadros
2012-11-02 10:03 ` Roger Quadros
2012-11-06 18:18 ` Tony Lindgren
2012-11-06 18:18 ` Tony Lindgren
2012-07-06 9:21 ` [PATCH v2 04/14] ARM: OMAP5: Add minimal support for OMAP5430 SOC Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-09 8:50 ` Vaibhav Hiremath
2012-07-09 8:50 ` Vaibhav Hiremath
2012-07-09 10:39 ` Shilimkar, Santosh
2012-07-09 10:39 ` Shilimkar, Santosh
2012-07-10 5:57 ` Hiremath, Vaibhav
2012-07-10 5:57 ` Hiremath, Vaibhav
2012-07-10 6:06 ` Shilimkar, Santosh
2012-07-10 6:06 ` Shilimkar, Santosh
2012-07-10 6:11 ` Hiremath, Vaibhav
2012-07-10 6:11 ` Hiremath, Vaibhav
2012-07-09 13:11 ` Tony Lindgren
2012-07-09 13:11 ` Tony Lindgren
2012-07-09 13:25 ` Tony Lindgren
2012-07-09 13:25 ` Tony Lindgren
2012-07-09 13:26 ` Shilimkar, Santosh
2012-07-09 13:26 ` Shilimkar, Santosh
2012-07-09 14:26 ` Shilimkar, Santosh
2012-07-09 14:26 ` Shilimkar, Santosh
2012-07-10 6:25 ` Hiremath, Vaibhav
2012-07-10 6:25 ` Hiremath, Vaibhav
2012-07-10 8:18 ` Tony Lindgren
2012-07-10 8:18 ` Tony Lindgren
2012-07-10 8:30 ` Hiremath, Vaibhav
2012-07-10 8:30 ` Hiremath, Vaibhav
2012-07-10 8:37 ` Tony Lindgren
2012-07-10 8:37 ` Tony Lindgren
2012-08-15 22:26 ` Paul Walmsley
2012-08-15 22:26 ` Paul Walmsley
2012-08-16 8:39 ` Tony Lindgren
2012-08-16 8:39 ` Tony Lindgren
2012-08-16 9:36 ` Hiremath, Vaibhav
2012-08-16 9:36 ` Hiremath, Vaibhav
2012-07-06 9:21 ` [PATCH v2 05/14] ARM: OMAP5: timer: Add clocksource, clockevent support Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 06/14] ARM: OMAP5: gpmc: Update gpmc_init() Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 07/14] ARM: OMAP5: l3: Add l3 error handler support for omap5 Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 08/14] ARM: OMAP5: Add the WakeupGen IP updates Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 09/14] ARM: OMAP5: Add SMP support Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 10/14] ARM: omap2+: board-generic: clean up the irq data from board file Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 11/14] ARM: OMAP5: board-generic: Add device tree support Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 12/14] arm/dts: OMAP5: Add omap5 dts files Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 13/14] ARM: OMAP5: Add the build support Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 9:21 ` [PATCH v2 14/14] ARM: Kconfig update to support additional GPIOs in OMAP5 Santosh Shilimkar
2012-07-06 9:21 ` Santosh Shilimkar
2012-07-06 12:36 ` [PATCH v2 00/14] ARM: OMAP5: Add minimal OMAP5 SOC support Tony Lindgren
2012-07-06 12:36 ` Tony Lindgren
2012-07-06 12:47 ` Shilimkar, Santosh
2012-07-06 12:47 ` Shilimkar, Santosh
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=873950x4ng.fsf@ti.com \
--to=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=r.sricharan@ti.com \
--cc=santosh.shilimkar@ti.com \
--cc=tony@atomide.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.