From: afzal@ti.com (Afzal Mohammed)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 01/11] ARM: OMAP2+: CM: cm_inst offset s16->u16
Date: Mon, 30 Sep 2013 14:20:38 +0530 [thread overview]
Message-ID: <52493B5E.7000807@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1309300314520.17980@utopia.booyaka.com>
Hi Paul,
On Monday 30 September 2013 08:53 AM, Paul Walmsley wrote:
> On Thu, 26 Sep 2013, Afzal Mohammed wrote:
>> Most of the AM43x CM reg address offsets are with MSB bit '1' (on
>> 16-bit value) leading to arithmetic miscalculations while calculating
>> CLOCK ENABLE register's address because cm_inst field was a type of
>> "const s16", so make it "const u16".
>>
>> Also modify relevant functions so as to take care of the above.
>>
>> [afzal at ti.com: fixup and cleanup]
>>
>> Signed-off-by: Ankur Kishore <a-kishore@ti.com>
>> Signed-off-by: Afzal Mohammed <afzal@ti.com>
>> ---
>> arch/arm/mach-omap2/clockdomain.h | 2 +-
>> arch/arm/mach-omap2/cm33xx.c | 16 ++++++++--------
>> arch/arm/mach-omap2/cm33xx.h | 10 +++++-----
>> arch/arm/mach-omap2/cminst44xx.c | 20 ++++++++++----------
>> arch/arm/mach-omap2/cminst44xx.h | 26 +++++++++++++-------------
>> 5 files changed, 37 insertions(+), 37 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
>> index 4b03394..5431b0c 100644
>> --- a/arch/arm/mach-omap2/clockdomain.h
>> +++ b/arch/arm/mach-omap2/clockdomain.h
>> @@ -132,7 +132,7 @@ struct clockdomain {
>> u8 _flags;
>> const u8 dep_bit;
>> const u8 prcm_partition;
>> - const s16 cm_inst;
>> + const u16 cm_inst;
>> const u16 clkdm_offs;
>> struct clkdm_dep *wkdep_srcs;
>> struct clkdm_dep *sleepdep_srcs;
> OMAP3 has at least one CM_INST that's negative:
>
> ./prcm-common.h:40:#define OMAP3430_IVA2_MOD -0x800
>
> Have you tested this on OMAP34xx/35xx to ensure that the generated
> addresses for IVA2_MOD-based addresses doesn't change? Seems like there's
> a risk that they might change, due to sign extension.
cm_inst field of clockdomain struct is not being used on OMAP3, but
instead prcm_offs of struct powerdomain is being made use. cm_inst field
of struct clockdomain is being used by OMAP4 types only, hence would
affect OMAP4, OMAP5, DRA7x & AM43x only and these don't have CM_INST
that is negative.
This has been tested on OMAP3 Beagle Xm and verified that it does not
cause any regresions.
Regards
Afzal
next prev parent reply other threads:[~2013-09-30 8:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 9:28 [PATCH v4 00/11] ARM: OMAP2+: AM43x PRCM basic support Afzal Mohammed
2013-09-26 9:32 ` [PATCH v4 01/11] ARM: OMAP2+: CM: cm_inst offset s16->u16 Afzal Mohammed
2013-09-30 3:23 ` Paul Walmsley
2013-09-30 8:50 ` Afzal Mohammed [this message]
2013-09-26 9:32 ` [PATCH v4 03/11] ARM: OMAP2+: hwmod: AM335x: runtime register update Afzal Mohammed
2013-09-26 9:32 ` [PATCH v4 04/11] ARM: OMAP2+: hwmod: AM335x: remove static register offs Afzal Mohammed
2013-09-26 9:32 ` [PATCH v4 05/11] ARM: OMAP2+: PRCM: AM43x definitions Afzal Mohammed
2013-09-26 9:33 ` [PATCH v4 06/11] ARM: OMAP2+: PM: AM43x powerdomain data Afzal Mohammed
2013-09-30 10:27 ` Paul Walmsley
2013-09-30 12:14 ` Afzal Mohammed
2013-09-26 9:33 ` [PATCH v4 07/11] ARM: OMAP2+: CM: AM43x clockdomain data Afzal Mohammed
2013-09-30 9:31 ` Paul Walmsley
2013-09-30 10:16 ` Paul Walmsley
2013-09-30 11:05 ` Afzal Mohammed
2013-09-30 11:09 ` Paul Walmsley
2013-09-30 11:38 ` Afzal Mohammed
2013-09-26 9:33 ` [PATCH v4 08/11] ARM: OMAP2+: hwmod: AM43x support Afzal Mohammed
2013-09-26 9:33 ` [PATCH v4 09/11] ARM: OMAP2+: hwmod: AM43x operations Afzal Mohammed
2013-09-26 9:33 ` [PATCH v4 10/11] ARM: OMAP2+: AM43x: PRCM kbuild Afzal Mohammed
2013-09-26 9:33 ` [PATCH v4 11/11] ARM: OMAP2+: AM43x PRCM init Afzal Mohammed
2013-09-26 10:30 ` [PATCH v4 00/11] ARM: OMAP2+: AM43x PRCM basic support Afzal Mohammed
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=52493B5E.7000807@ti.com \
--to=afzal@ti.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).