linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vaibhav Hiremath <hvaibhav@ti.com>
To: linux-omap@vger.kernel.org
Cc: tony@atomide.com, Vaibhav Hiremath <hvaibhav@ti.com>,
	Kevin Hilman <khilman@ti.com>, Rajendra Nayak <rnayak@ti.com>
Subject: [PATCH-V2 2/3] arm:omap:omap4: Maintain virtual addr in in _prm_bases table
Date: Sun, 8 Jan 2012 15:48:13 +0530	[thread overview]
Message-ID: <1326017894-7632-3-git-send-email-hvaibhav@ti.com> (raw)
In-Reply-To: <1326017894-7632-1-git-send-email-hvaibhav@ti.com>

Since, now omap4 prm code is reused for AM33XX device where,
PRM module fall under different domain than omap4.
So instead of maintaining phy addr for PRM partition
in _prm_bases[] table and then changing it to virt addr for r/w,
just directly maintain respective virt addr.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
---
 arch/arm/mach-omap2/prminst44xx.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index f6de5bc..3d9894f 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -26,11 +26,11 @@

 static u32 _prm_bases[OMAP4_MAX_PRCM_PARTITIONS] = {
 	[OMAP4430_INVALID_PRCM_PARTITION]	= 0,
-	[OMAP4430_PRM_PARTITION]		= OMAP4430_PRM_BASE,
+	[OMAP4430_PRM_PARTITION]		= OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE),
 	[OMAP4430_CM1_PARTITION]		= 0,
 	[OMAP4430_CM2_PARTITION]		= 0,
 	[OMAP4430_SCRM_PARTITION]		= 0,
-	[OMAP4430_PRCM_MPU_PARTITION]		= OMAP4430_PRCM_MPU_BASE,
+	[OMAP4430_PRCM_MPU_PARTITION]		= OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE),
 };

 /* Read a register in a PRM instance */
@@ -39,8 +39,7 @@ u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx)
 	BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
 	       part == OMAP4430_INVALID_PRCM_PARTITION ||
 	       !_prm_bases[part]);
-	return __raw_readl(OMAP2_L4_IO_ADDRESS(_prm_bases[part] + inst +
-					       idx));
+	return __raw_readl(_prm_bases[part] + inst + idx);
 }

 /* Write into a register in a PRM instance */
@@ -49,7 +48,7 @@ void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
 	BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS ||
 	       part == OMAP4430_INVALID_PRCM_PARTITION ||
 	       !_prm_bases[part]);
-	__raw_writel(val, OMAP2_L4_IO_ADDRESS(_prm_bases[part] + inst + idx));
+	__raw_writel(val, _prm_bases[part] + inst + idx);
 }

 /* Read-modify-write a register in PRM. Caller must lock */
--
1.7.0.4


  parent reply	other threads:[~2012-01-08 10:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-08 10:18 [PATCH-V2 0/3] arm:omap:omap4:Remove hardcoded reg-offs for PWRSTCTRL & PWRSTST Vaibhav Hiremath
2012-01-08 10:18 ` [PATCH-V2 1/3] arm:omap:omap4: Remove " Vaibhav Hiremath
2012-01-10 18:09   ` Kevin Hilman
2012-01-11 16:21     ` Hiremath, Vaibhav
2012-01-17  5:54     ` Hiremath, Vaibhav
2012-01-08 10:18 ` Vaibhav Hiremath [this message]
2012-01-08 10:18 ` [PATCH-V2 3/3] arm:omap:omap4: Hook-up am33xx support to existing prm code Vaibhav Hiremath
2012-01-10 18:09   ` Kevin Hilman
2012-01-11 16:18     ` Hiremath, Vaibhav
2012-01-23  8:53     ` Hiremath, Vaibhav
2012-01-23 22:35       ` Kevin Hilman
2012-02-01  6:48         ` Hiremath, Vaibhav
2012-02-01 17:33           ` Kevin Hilman
2012-02-02  9:28             ` Hiremath, Vaibhav
2012-02-02 17:59               ` Kevin Hilman
2012-02-02 18:05             ` Hiremath, Vaibhav

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=1326017894-7632-3-git-send-email-hvaibhav@ti.com \
    --to=hvaibhav@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=rnayak@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 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).