public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>
Subject: [PATCH 2/14] CF: Change omap_cf.c to use  omap_readw/writew instead of __REG for multi-omap
Date: Tue, 27 May 2008 21:20:06 -0700	[thread overview]
Message-ID: <1211948418-16455-3-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1211948418-16455-2-git-send-email-tony@atomide.com>

Change omap_cf.c to use  omap_readw/writew instead of __REG for multi-omap

Signed-off-by: Tony Lindren <tony@atomide.com>
---
 drivers/pcmcia/omap_cf.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 46314b4..a7d9e4b 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -38,19 +38,19 @@
 #define	CF_BASE	0xfffe2800
 
 /* status; read after IRQ */
-#define CF_STATUS_REG		__REG16(CF_BASE + 0x00)
+#define CF_STATUS			(CF_BASE + 0x00)
 #	define	CF_STATUS_BAD_READ	(1 << 2)
 #	define	CF_STATUS_BAD_WRITE	(1 << 1)
 #	define	CF_STATUS_CARD_DETECT	(1 << 0)
 
 /* which chipselect (CS0..CS3) is used for CF (active low) */
-#define CF_CFG_REG		__REG16(CF_BASE + 0x02)
+#define CF_CFG				(CF_BASE + 0x02)
 
 /* card reset */
-#define CF_CONTROL_REG		__REG16(CF_BASE + 0x04)
+#define CF_CONTROL			(CF_BASE + 0x04)
 #	define	CF_CONTROL_RESET	(1 << 0)
 
-#define omap_cf_present() (!(CF_STATUS_REG & CF_STATUS_CARD_DETECT))
+#define omap_cf_present() (!(omap_readw(CF_STATUS) & CF_STATUS_CARD_DETECT))
 
 /*--------------------------------------------------------------------------*/
 
@@ -139,11 +139,11 @@ omap_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s)
 		return -EINVAL;
 	}
 
-	control = CF_CONTROL_REG;
+	control = omap_readw(CF_CONTROL);
 	if (s->flags & SS_RESET)
-		CF_CONTROL_REG = CF_CONTROL_RESET;
+		omap_writew(CF_CONTROL_RESET, CF_CONTROL);
 	else
-		CF_CONTROL_REG = 0;
+		omap_writew(0, CF_CONTROL);
 
 	pr_debug("%s: Vcc %d, io_irq %d, flags %04x csc %04x\n",
 		driver_name, s->Vcc, s->io_irq, s->flags, s->csc_mask);
@@ -270,7 +270,7 @@ static int __init omap_cf_probe(struct platform_device *pdev)
 	omap_cfg_reg(V10_1610_CF_IREQ);
 	omap_cfg_reg(W10_1610_CF_RESET);
 
-	CF_CFG_REG = ~(1 << seg);
+	omap_writew(~(1 << seg), CF_CFG);
 
 	pr_info("%s: cs%d on irq %d\n", driver_name, seg, irq);
 
@@ -286,7 +286,8 @@ static int __init omap_cf_probe(struct platform_device *pdev)
 	/* CF uses armxor_ck, which is "always" available */
 
 	pr_debug("%s: sts %04x cfg %04x control %04x %s\n", driver_name,
-		CF_STATUS_REG, CF_CFG_REG, CF_CONTROL_REG,
+		omap_readw(CF_STATUS), omap_readw(CF_CFG),
+		omap_readw(CF_CONTROL),
 		omap_cf_present() ? "present" : "(not present)");
 
 	cf->socket.owner = THIS_MODULE;
-- 
1.5.3.6


  reply	other threads:[~2008-05-28  4:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28  4:20 [PATCH 0/14] Big clean-up for multi-omap Tony Lindgren
2008-05-28  4:20 ` [PATCH 1/14] ARM: OMAP: Fix debug-macro for multi_omap Tony Lindgren
2008-05-28  4:20   ` Tony Lindgren [this message]
2008-05-28  4:20     ` [PATCH 3/14] USB: Change omap USB code to use omap_read/write instead of __REG for multi-omap Tony Lindgren
2008-05-28  4:20       ` [PATCH 4/14] ARM: OMAP: Change __REG access to omap/read write for traffic controller Tony Lindgren
2008-05-28  4:20         ` [PATCH 5/14] musb_hdrc: Change __REG access to omap_read/write for multi-boot Tony Lindgren
2008-05-28  4:20           ` [PATCH 6/14] ARM: OMAP: Remove __REG access for multi-omap Tony Lindgren
2008-05-28  4:20             ` [PATCH 7/14] ARM: OMAP: Split sleep24xx.S into sleep242x.S and sleep243x.S Tony Lindgren
2008-05-28  4:20               ` [PATCH 8/14] ARM: OMAP: Split sram24xx.S into sram242x.S and sram243x.S Tony Lindgren
2008-05-28  4:20                 ` [PATCH 9/14] ARM: OMAP: Remove omap_sram_patch_va Tony Lindgren
2008-05-28  4:20                   ` [PATCH 10/14] ARM: OMAP: Introduce omap_globals and prcm access functions for multi-omap Tony Lindgren
2008-05-28  4:20                     ` [PATCH 11/14] ARM: OMAP: Remove OMAP_PRM_REGADDR Tony Lindgren
2008-05-28  4:20                       ` [PATCH 12/14] ARM: OMAP: Remove OMAP_CM_REGADDR for multi-boot Tony Lindgren
2008-05-28  4:20                         ` [PATCH 13/14] ARM: OMAP: Change to use CM offsets for clocks for multi-omap Tony Lindgren
2008-05-28  4:20                           ` [PATCH 14/14] ARM: OMAP: Use omap_globals for CPU detection " Tony Lindgren
2008-05-30 21:41 ` [PATCH 0/14] Big clean-up " 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=1211948418-16455-3-git-send-email-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap@vger.kernel.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