* [PATCH] ARM: omap4: prm: Fix up swapped offset macros
@ 2011-11-07 10:06 Rajendra Nayak
2011-11-07 13:24 ` Cousson, Benoit
0 siblings, 1 reply; 4+ messages in thread
From: Rajendra Nayak @ 2011-11-07 10:06 UTC (permalink / raw)
To: linux-omap; +Cc: Rajendra Nayak, Gina Glaser
The offset macros for OMAP4_RM_RSTST and OMAP4_RM_RSTTIME
are wrongly swapped up.
Thanks to Gina Glaser for identifying and reporting this.
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Cc: Gina Glaser <g-glaser@ti.com>
---
arch/arm/mach-omap2/prm44xx.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 3d66ccd..aa8593e 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -62,8 +62,8 @@
/* OMAP4 specific register offsets */
#define OMAP4_RM_RSTCTRL 0x0000
-#define OMAP4_RM_RSTTIME 0x0004
-#define OMAP4_RM_RSTST 0x0008
+#define OMAP4_RM_RSTST 0x0004
+#define OMAP4_RM_RSTTIME 0x0008
#define OMAP4_PM_PWSTCTRL 0x0000
#define OMAP4_PM_PWSTST 0x0004
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: omap4: prm: Fix up swapped offset macros
2011-11-07 10:06 [PATCH] ARM: omap4: prm: Fix up swapped offset macros Rajendra Nayak
@ 2011-11-07 13:24 ` Cousson, Benoit
2011-11-08 6:22 ` Rajendra Nayak
0 siblings, 1 reply; 4+ messages in thread
From: Cousson, Benoit @ 2011-11-07 13:24 UTC (permalink / raw)
To: Rajendra Nayak; +Cc: linux-omap, Gina Glaser
Hi Rajendra,
On 11/7/2011 11:06 AM, Rajendra Nayak wrote:
> The offset macros for OMAP4_RM_RSTST and OMAP4_RM_RSTTIME
> are wrongly swapped up.
>
> Thanks to Gina Glaser for identifying and reporting this.
>
> Signed-off-by: Rajendra Nayak<rnayak@ti.com>
> Cc: Gina Glaser<g-glaser@ti.com>
> ---
> arch/arm/mach-omap2/prm44xx.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
> index 3d66ccd..aa8593e 100644
> --- a/arch/arm/mach-omap2/prm44xx.h
> +++ b/arch/arm/mach-omap2/prm44xx.h
> @@ -62,8 +62,8 @@
>
> /* OMAP4 specific register offsets */
> #define OMAP4_RM_RSTCTRL 0x0000
> -#define OMAP4_RM_RSTTIME 0x0004
> -#define OMAP4_RM_RSTST 0x0008
> +#define OMAP4_RM_RSTST 0x0004
> +#define OMAP4_RM_RSTTIME 0x0008
> #define OMAP4_PM_PWSTCTRL 0x0000
> #define OMAP4_PM_PWSTST 0x0004
In fact these defines were already defined correctly later (with a slightly different name):
/* PRM.DEVICE_PRM register offsets */
[...]
#define OMAP4_PRM_RSTST_OFFSET 0x0004
#define OMAP4430_PRM_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x0004)
#define OMAP4_PRM_RSTTIME_OFFSET 0x0008
#define OMAP4430_PRM_RSTTIME OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x0008)
I don't know where these defines are used, but we'd better use the existing ones.
Benoit
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: omap4: prm: Fix up swapped offset macros
2011-11-07 13:24 ` Cousson, Benoit
@ 2011-11-08 6:22 ` Rajendra Nayak
2011-11-08 7:04 ` Rajendra Nayak
0 siblings, 1 reply; 4+ messages in thread
From: Rajendra Nayak @ 2011-11-08 6:22 UTC (permalink / raw)
To: Cousson, Benoit; +Cc: linux-omap, Gina Glaser
>>
>> /* OMAP4 specific register offsets */
>> #define OMAP4_RM_RSTCTRL 0x0000
>> -#define OMAP4_RM_RSTTIME 0x0004
>> -#define OMAP4_RM_RSTST 0x0008
>> +#define OMAP4_RM_RSTST 0x0004
>> +#define OMAP4_RM_RSTTIME 0x0008
>> #define OMAP4_PM_PWSTCTRL 0x0000
>> #define OMAP4_PM_PWSTST 0x0004
>
> In fact these defines were already defined correctly later (with a slightly different name):
>
> /* PRM.DEVICE_PRM register offsets */
>
> [...]
>
> #define OMAP4_PRM_RSTST_OFFSET 0x0004
> #define OMAP4430_PRM_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x0004)
> #define OMAP4_PRM_RSTTIME_OFFSET 0x0008
> #define OMAP4430_PRM_RSTTIME OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x0008)
>
>
> I don't know where these defines are used, but we'd better use the existing ones.
Yes, it looks like it makes sense to completely get rid of these and
instead use the auto-generated ones.
I see there are these multiple defines for omap3 too, maybe its best to
get rid of them for omap3 too?
>
> Benoit
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: omap4: prm: Fix up swapped offset macros
2011-11-08 6:22 ` Rajendra Nayak
@ 2011-11-08 7:04 ` Rajendra Nayak
0 siblings, 0 replies; 4+ messages in thread
From: Rajendra Nayak @ 2011-11-08 7:04 UTC (permalink / raw)
To: Cousson, Benoit; +Cc: linux-omap, Gina Glaser
On Tuesday 08 November 2011 11:52 AM, Rajendra Nayak wrote:
>>>
>>> /* OMAP4 specific register offsets */
>>> #define OMAP4_RM_RSTCTRL 0x0000
>>> -#define OMAP4_RM_RSTTIME 0x0004
>>> -#define OMAP4_RM_RSTST 0x0008
>>> +#define OMAP4_RM_RSTST 0x0004
>>> +#define OMAP4_RM_RSTTIME 0x0008
>>> #define OMAP4_PM_PWSTCTRL 0x0000
>>> #define OMAP4_PM_PWSTST 0x0004
>>
>> In fact these defines were already defined correctly later (with a
>> slightly different name):
>>
>> /* PRM.DEVICE_PRM register offsets */
>>
>> [...]
>>
>> #define OMAP4_PRM_RSTST_OFFSET 0x0004
>> #define OMAP4430_PRM_RSTST
>> OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x0004)
>> #define OMAP4_PRM_RSTTIME_OFFSET 0x0008
>> #define OMAP4430_PRM_RSTTIME
>> OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x0008)
>>
>>
>> I don't know where these defines are used, but we'd better use the
>> existing ones.
>
> Yes, it looks like it makes sense to completely get rid of these and
> instead use the auto-generated ones.
> I see there are these multiple defines for omap3 too, maybe its best to
> get rid of them for omap3 too?
Looking at it a little more closely, I now see why some of these
are needed.
#define OMAP4_PM_PWSTCTRL 0x0000
#define OMAP4_PM_PWSTST 0x0004
These seem to be needed because the autogen output throws out offsets
with the individual domain names embedded, which can't be used in
generic powerdomain code, and since all of them are the same, the
ones with the individual domain names never get used.
Maybe a case for the autogen script updates to get rid of all those and
just generate something like the above. Should give some good -ve
diffstat :)
#define OMAP4_RM_RSTCTRL 0x0000
#define OMAP4_RM_RSTTIME 0x0004
These don't seem to be used at all.
#define OMAP4_RM_RSTST 0x0008
The only instance of this being used I see is in
omap_prcm_get_reset_sources() and seems completely wrong
as its using a omap2/3 api (omap2_prm_read_mod_reg())
on omap4.
>
>>
>> Benoit
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-08 7:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07 10:06 [PATCH] ARM: omap4: prm: Fix up swapped offset macros Rajendra Nayak
2011-11-07 13:24 ` Cousson, Benoit
2011-11-08 6:22 ` Rajendra Nayak
2011-11-08 7:04 ` Rajendra Nayak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox