From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>,
Sylvain Meyer <sylvain.meyer@ifrance.com>
Subject: [PATCH] fbdev: Add __iomem annotations to intelfb
Date: Thu, 28 Oct 2004 09:10:41 +0800 [thread overview]
Message-ID: <200410280910.41649.adaplas@hotpop.com> (raw)
- Add __iomem annotations to intelfb
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
intelfb.h | 6 +++---
intelfbdrv.c | 23 +++++++++++++----------
intelfbhw.c | 28 ++++++++++++++++------------
intelfbhw.h | 12 +++++++-----
4 files changed, 39 insertions(+), 30 deletions(-)
diff -Nru a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
--- a/drivers/video/intelfb/intelfb.h 2004-10-21 05:06:38 +08:00
+++ b/drivers/video/intelfb/intelfb.h 2004-10-23 23:13:14 +08:00
@@ -205,7 +205,7 @@
struct intelfb_heap_data {
u32 physical;
- u32 virtual;
+ u32 __iomem *virtual;
u32 offset; // in GATT pages
u32 size; // in bytes
};
@@ -234,13 +234,13 @@
/* mmio regs */
u32 mmio_base_phys;
- u32 mmio_base;
+ u32 __iomem *mmio_base;
/* fb start offset (in bytes) */
u32 fb_start;
/* ring buffer */
- u32 ring_head;
+ u32 __iomem *ring_head;
u32 ring_tail;
u32 ring_tail_mask;
u32 ring_space;
diff -Nru a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
--- a/drivers/video/intelfb/intelfbdrv.c 2004-10-21 05:06:40 +08:00
+++ b/drivers/video/intelfb/intelfbdrv.c 2004-10-23 23:13:14 +08:00
@@ -410,9 +410,9 @@
}
if (dinfo->mmio_base)
- iounmap((void *)dinfo->mmio_base);
+ iounmap((void __iomem *)dinfo->mmio_base);
if (dinfo->aperture.virtual)
- iounmap((void *)dinfo->aperture.virtual);
+ iounmap((void __iomem *)dinfo->aperture.virtual);
if (dinfo->mmio_base_phys)
release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE);
@@ -510,15 +510,16 @@
}
/* Map the fb and MMIO regions */
- dinfo->aperture.virtual = (u32)ioremap_nocache
+ dinfo->aperture.virtual = (u32 __iomem *)ioremap_nocache
(dinfo->aperture.physical, dinfo->aperture.size);
if (!dinfo->aperture.virtual) {
ERR_MSG("Cannot remap FB region.\n");
cleanup(dinfo);
return -ENODEV;
}
- dinfo->mmio_base = (u32)ioremap_nocache(dinfo->mmio_base_phys,
- INTEL_REG_SIZE);
+ dinfo->mmio_base =
+ (u32 __iomem *)ioremap_nocache(dinfo->mmio_base_phys,
+ INTEL_REG_SIZE);
if (!dinfo->mmio_base) {
ERR_MSG("Cannot remap MMIO region.\n");
cleanup(dinfo);
@@ -656,14 +657,16 @@
DBG_MSG("fb: 0x%x(+ 0x%x)/0x%x (0x%x)\n",
dinfo->fb.physical, dinfo->fb.offset, dinfo->fb.size,
- dinfo->fb.virtual);
+ (u32 __iomem ) dinfo->fb.virtual);
DBG_MSG("MMIO: 0x%x/0x%x (0x%x)\n",
- dinfo->mmio_base_phys, INTEL_REG_SIZE, dinfo->mmio_base);
+ dinfo->mmio_base_phys, INTEL_REG_SIZE,
+ (u32 __iomem) dinfo->mmio_base);
DBG_MSG("ring buffer: 0x%x/0x%x (0x%x)\n",
- dinfo->ring.physical, dinfo->ring.size, dinfo->ring.virtual);
+ dinfo->ring.physical, dinfo->ring.size,
+ (u32 __iomem ) dinfo->ring.virtual);
DBG_MSG("HW cursor: 0x%x/0x%x (0x%x) (offset 0x%x) (phys 0x%x)\n",
dinfo->cursor.physical, dinfo->cursor.size,
- dinfo->cursor.virtual, dinfo->cursor.offset,
+ (u32 __iomem ) dinfo->cursor.virtual, dinfo->cursor.offset,
dinfo->cursor.physical);
DBG_MSG("options: accel = %d, hwcursor = %d, fixed = %d, "
@@ -1159,7 +1162,7 @@
if (FIXED_MODE(dinfo))
dinfo->pitch = dinfo->initial_pitch;
- dinfo->info->screen_base = (char *)dinfo->fb.virtual;
+ dinfo->info->screen_base = (char __iomem *)dinfo->fb.virtual;
dinfo->info->fix.line_length = dinfo->pitch;
dinfo->info->fix.visual = dinfo->visual;
}
diff -Nru a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
--- a/drivers/video/intelfb/intelfbhw.c 2004-10-21 05:06:43 +08:00
+++ b/drivers/video/intelfb/intelfbhw.c 2004-10-23 23:13:14 +08:00
@@ -1240,17 +1240,19 @@
end = jiffies + (HZ * 3);
while (dinfo->ring_space < n) {
- dinfo->ring_head = INREG(PRI_RING_HEAD) & RING_HEAD_MASK;
- if (dinfo->ring_tail + RING_MIN_FREE < dinfo->ring_head)
- dinfo->ring_space = dinfo->ring_head
+ dinfo->ring_head = (u32 __iomem *)(INREG(PRI_RING_HEAD) &
+ RING_HEAD_MASK);
+ if (dinfo->ring_tail + RING_MIN_FREE <
+ (u32 __iomem) dinfo->ring_head)
+ dinfo->ring_space = (u32 __iomem) dinfo->ring_head
- (dinfo->ring_tail + RING_MIN_FREE);
else
dinfo->ring_space = (dinfo->ring.size +
- dinfo->ring_head)
+ (u32 __iomem) dinfo->ring_head)
- (dinfo->ring_tail + RING_MIN_FREE);
- if (dinfo->ring_head != last_head) {
+ if ((u32 __iomem) dinfo->ring_head != last_head) {
end = jiffies + (HZ * 3);
- last_head = dinfo->ring_head;
+ last_head = (u32 __iomem) dinfo->ring_head;
}
i++;
if (time_before(end, jiffies)) {
@@ -1310,13 +1312,15 @@
DBG_MSG("refresh_ring\n");
#endif
- dinfo->ring_head = INREG(PRI_RING_HEAD) & RING_HEAD_MASK;
+ dinfo->ring_head = (u32 __iomem *) (INREG(PRI_RING_HEAD) &
+ RING_HEAD_MASK);
dinfo->ring_tail = INREG(PRI_RING_TAIL) & RING_TAIL_MASK;
- if (dinfo->ring_tail + RING_MIN_FREE < dinfo->ring_head)
- dinfo->ring_space = dinfo->ring_head
+ if (dinfo->ring_tail + RING_MIN_FREE < (u32 __iomem)dinfo->ring_head)
+ dinfo->ring_space = (u32 __iomem) dinfo->ring_head
- (dinfo->ring_tail + RING_MIN_FREE);
else
- dinfo->ring_space = (dinfo->ring.size + dinfo->ring_head)
+ dinfo->ring_space = (dinfo->ring.size +
+ (u32 __iomem) dinfo->ring_head)
- (dinfo->ring_tail + RING_MIN_FREE);
}
@@ -1701,7 +1705,7 @@
intelfbhw_cursor_load(struct intelfb_info *dinfo, int width, int height,
u8 *data)
{
- u8 *addr = (u8 *)dinfo->cursor.virtual;
+ u8 __iomem *addr = (u8 __iomem *)dinfo->cursor.virtual;
int i, j, w = width / 8;
int mod = width % 8, t_mask, d_mask;
@@ -1729,7 +1733,7 @@
void
intelfbhw_cursor_reset(struct intelfb_info *dinfo) {
- u8 *addr = (u8 *)dinfo->cursor.virtual;
+ u8 __iomem *addr = (u8 __iomem *)dinfo->cursor.virtual;
int i, j;
#if VERBOSE > 0
diff -Nru a/drivers/video/intelfb/intelfbhw.h b/drivers/video/intelfb/intelfbhw.h
--- a/drivers/video/intelfb/intelfbhw.h 2004-10-21 05:06:45 +08:00
+++ b/drivers/video/intelfb/intelfbhw.h 2004-10-23 23:13:14 +08:00
@@ -484,14 +484,16 @@
/*** Macros ***/
/* I/O macros */
-#define INREG8(addr) readb((u8 *)(dinfo->mmio_base + (addr)))
-#define INREG(addr) readl((u32 *)(dinfo->mmio_base + (addr)))
-#define OUTREG8(addr, val) writeb((val), (u8 *)(dinfo->mmio_base + (addr)))
-#define OUTREG(addr, val) writel((val), (u32 *)(dinfo->mmio_base + (addr)))
+#define INREG8(addr) readb((u8 __iomem *)(dinfo->mmio_base + (addr)))
+#define INREG(addr) readl((u32 __iomem *)(dinfo->mmio_base + (addr)))
+#define OUTREG8(addr, val) writeb((val),(u8 __iomem *)(dinfo->mmio_base + \
+ (addr)))
+#define OUTREG(addr, val) writel((val),(u32 __iomem *)(dinfo->mmio_base + \
+ (addr)))
/* Ring buffer macros */
#define OUT_RING(n) do { \
- writel((n), (u32 *)(dinfo->ring.virtual + dinfo->ring_tail)); \
+ writel((n), (u32 __iomem *)(dinfo->ring.virtual + dinfo->ring_tail));\
dinfo->ring_tail += 4; \
dinfo->ring_tail &= dinfo->ring_tail_mask; \
} while (0)
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
reply other threads:[~2004-10-28 1:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200410280910.41649.adaplas@hotpop.com \
--to=adaplas@hotpop.com \
--cc=akpm@osdl.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=sylvain.meyer@ifrance.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).