public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Omar Ramirez Luna <omar.ramirez@ti.com>,
	Nishant Menon <nm@ti.com>, Hiroshi Doyu <Hiroshi.DOYU@nokia.com>,
	Ameya Palande <ameya.palande@nokia.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 1/6] DSPBRIDGE: replace IO_ADDRESS with ioremap
Date: Mon, 11 Jan 2010 14:12:41 -0600	[thread overview]
Message-ID: <1263240766-13000-2-git-send-email-omar.ramirez@ti.com> (raw)
In-Reply-To: <1263240766-13000-1-git-send-email-omar.ramirez@ti.com>

Use ioremap() instead of using IO_ADDRESS macro to make it generic.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
CC: Nishant Menon <nm@ti.com>
CC: Hiroshi Doyu <Hiroshi.DOYU@nokia.com>
CC: Ameya Palande <ameya.palande@nokia.com>
CC: Felipe Contreras <felipe.contreras@gmail.com>
---
 drivers/dsp/bridge/services/clk.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/dsp/bridge/services/clk.c b/drivers/dsp/bridge/services/clk.c
index d1c68fc..116e10e 100644
--- a/drivers/dsp/bridge/services/clk.c
+++ b/drivers/dsp/bridge/services/clk.c
@@ -54,10 +54,9 @@
 
 typedef volatile unsigned long  REG_UWORD32;
 
-#define SSI_Base        0x48058000
-
-#define SSI_BASE                     IO_ADDRESS(SSI_Base)
-
+#define OMAP_SSI_OFFSET			0x58000
+#define OMAP_SSI_SIZE			0x1000
+#define OMAP_SSI_SYSCONFIG_OFFSET	0x10
 
 struct SERVICES_Clk_t {
 	struct clk *clk_handle;
@@ -355,7 +354,9 @@ s32 CLK_Get_UseCnt(IN enum SERVICES_ClkId clk_id)
 void SSI_Clk_Prepare(bool FLAG)
 {
 	u32 ssi_sysconfig;
-	ssi_sysconfig = __raw_readl((SSI_BASE) + 0x10);
+	void __iomem *ssi_base;
+
+	ssi_base = ioremap(L4_34XX_BASE + OMAP_SSI_OFFSET, OMAP_SSI_SIZE);
 
 	if (FLAG) {
 		/* Set Autoidle, SIDLEMode to smart idle, and MIDLEmode to
@@ -368,5 +369,7 @@ void SSI_Clk_Prepare(bool FLAG)
 		 */
 		ssi_sysconfig = 0x1;
 	}
-	__raw_writel((u32)ssi_sysconfig, SSI_BASE + 0x10);
+
+	__raw_writel(ssi_sysconfig, ssi_base + OMAP_SSI_SYSCONFIG_OFFSET);
+	iounmap(ssi_base);
 }
-- 
1.6.2.4


  reply	other threads:[~2010-01-11 20:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 20:12 [PATCH v2 0/6] misc patches Omar Ramirez Luna
2010-01-11 20:12 ` Omar Ramirez Luna [this message]
2010-01-11 20:12   ` [PATCH 2/6] DSPBRIDGE: Replace magic numbers in SSI configuration Omar Ramirez Luna
2010-01-11 20:12     ` [PATCH 3/6] DSPBRIDGE: Mark unused ioctls as deprecated Omar Ramirez Luna
2010-01-11 20:12       ` [PATCH 4/6] DSPBRIDGE: remove ioctl runtime check Omar Ramirez Luna
2010-01-11 20:12         ` [PATCH 5/6] DSPBRIDGE: Rename pResult to result for WCD_CallDevIOCtl Omar Ramirez Luna
2010-01-11 20:12           ` [PATCH 6/6] DSPBRIDGE: Use _IOxx macro to define ioctls Omar Ramirez Luna
2010-01-11 20:11             ` Nishanth Menon
2010-01-11 22:32   ` [PATCH 1/6] DSPBRIDGE: replace IO_ADDRESS with ioremap Tony Lindgren

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=1263240766-13000-2-git-send-email-omar.ramirez@ti.com \
    --to=omar.ramirez@ti.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=felipe.contreras@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.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