Commit 2ff1bf2e authored by Antonino Daplas's avatar Antonino Daplas Committed by Linus Torvalds

[PATCH] fbdev: Add __iomem annotations to sstfb

Add __iomem annotations to sstfb
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e7a05fe5
......@@ -67,10 +67,6 @@
#undef SST_DEBUG
#define SST_DEBUG_REG 0
#define SST_DEBUG_FUNC 0
#define SST_DEBUG_VAR 0
/* enable 24/32 bpp functions ? (completely untested!) */
#undef EN_24_32_BPP
......@@ -220,26 +216,26 @@ static void sst_dbg_print_write_reg(u32 reg, u32 val) {
#define dac_i_read(reg) __dac_i_read(par->mmio_vbase, reg)
#define dac_i_write(reg,val) __dac_i_write(par->mmio_vbase, reg, val)
static inline u32 __sst_read(u_long vbase, u32 reg)
static inline u32 __sst_read(u8 __iomem *vbase, u32 reg)
{
u32 ret = readl(vbase + reg);
sst_dbg_print_read_reg(reg, ret);
return ret;
}
static inline void __sst_write(u_long vbase, u32 reg, u32 val)
static inline void __sst_write(u8 __iomem *vbase, u32 reg, u32 val)
{
sst_dbg_print_write_reg(reg, val);
writel(val, vbase + reg);
}
static inline void __sst_set_bits(u_long vbase, u32 reg, u32 val)
static inline void __sst_set_bits(u8 __iomem *vbase, u32 reg, u32 val)
{
r_dprintk("sst_set_bits(%#x, %#x)\n", reg, val);
__sst_write(vbase, reg, __sst_read(vbase, reg) | val);
}
static inline void __sst_unset_bits(u_long vbase, u32 reg, u32 val)
static inline void __sst_unset_bits(u8 __iomem *vbase, u32 reg, u32 val)
{
r_dprintk("sst_unset_bits(%#x, %#x)\n", reg, val);
__sst_write(vbase, reg, __sst_read(vbase, reg) & ~val);
......@@ -254,7 +250,7 @@ static inline void __sst_unset_bits(u_long vbase, u32 reg, u32 val)
#define sst_wait_idle() __sst_wait_idle(par->mmio_vbase)
static int __sst_wait_idle(u_long vbase)
static int __sst_wait_idle(u8 __iomem *vbase)
{
int count = 0;
......@@ -279,7 +275,7 @@ static int __sst_wait_idle(u_long vbase)
/* dac access */
/* dac_read should be remaped to FbiInit2 (via the pci reg init_enable) */
static u8 __sst_dac_read(u_long vbase, u8 reg)
static u8 __sst_dac_read(u8 __iomem *vbase, u8 reg)
{
u8 ret;
......@@ -293,7 +289,7 @@ static u8 __sst_dac_read(u_long vbase, u8 reg)
return ret;
}
static void __sst_dac_write(u_long vbase, u8 reg, u8 val)
static void __sst_dac_write(u8 __iomem *vbase, u8 reg, u8 val)
{
r_dprintk("sst_dac_write(%#x, %#x)\n", reg, val);
reg &= 0x07;
......@@ -301,7 +297,7 @@ static void __sst_dac_write(u_long vbase, u8 reg, u8 val)
}
/* indexed access to ti/att dacs */
static u32 __dac_i_read(u_long vbase, u8 reg)
static u32 __dac_i_read(u8 __iomem *vbase, u8 reg)
{
u32 ret;
......@@ -310,7 +306,7 @@ static u32 __dac_i_read(u_long vbase, u8 reg)
r_dprintk("sst_dac_read_i(%#x): %#x\n", reg, ret);
return ret;
}
static void __dac_i_write(u_long vbase, u8 reg,u8 val)
static void __dac_i_write(u8 __iomem *vbase, u8 reg,u8 val)
{
r_dprintk("sst_dac_write_i(%#x, %#x)\n", reg, val);
__sst_dac_write(vbase, DACREG_ADDR_I, reg);
......@@ -886,7 +882,7 @@ static void sstfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
*/
static int __devinit sst_get_memsize(struct fb_info *info, __u32 *memsize)
{
u_long fbbase_virt = (u_long) info->screen_base;
u8 __iomem *fbbase_virt = info->screen_base;
/* force memsize */
if ((mem >= 1 ) && (mem <= 4)) {
......@@ -1442,7 +1438,7 @@ static int __devinit sstfb_probe(struct pci_dev *pdev,
goto fail_fb_mem;
}
par->mmio_vbase = (u_long) ioremap_nocache(fix->mmio_start,
par->mmio_vbase = ioremap_nocache(fix->mmio_start,
fix->mmio_len);
if (!par->mmio_vbase) {
eprintk("cannot remap register area %#lx\n",
......@@ -1526,7 +1522,7 @@ static int __devinit sstfb_probe(struct pci_dev *pdev,
fail:
iounmap(info->screen_base);
fail_fb_remap:
iounmap((void *)par->mmio_vbase);
iounmap(par->mmio_vbase);
fail_mmio_remap:
release_mem_region(fix->smem_start, 0x400000);
fail_fb_mem:
......@@ -1547,7 +1543,7 @@ static void __devexit sstfb_remove(struct pci_dev *pdev)
sst_shutdown(info);
unregister_framebuffer(info);
iounmap(info->screen_base);
iounmap((void*)par->mmio_vbase);
iounmap(par->mmio_vbase);
release_mem_region(info->fix.smem_start, 0x400000);
release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
kfree(info);
......@@ -1644,10 +1640,10 @@ static int sstfb_dump_regs(struct fb_info *info)
static void sstfb_fillrect_softw( struct fb_info *info, const struct fb_fillrect *rect)
{
unsigned long fbbase_virt = (unsigned long) info->screen_base;
u8 __iomem *fbbase_virt = info->screen_base;
int x, y, w = info->var.bits_per_pixel == 16 ? 2 : 4;
u32 color = rect->color, height = rect->height;
unsigned long p;
u8 __iomem *p;
if (w==2) color |= color<<16;
for (y=rect->dy; height; y++, height--) {
......
......@@ -18,11 +18,14 @@
#ifdef SST_DEBUG
# define dprintk(X...) printk("sstfb: " X)
# define SST_DEBUG_REG 1
# define SST_DEBUG_FUNC 1
# define SST_DEBUG_VAR 1
#else
# define dprintk(X...)
# undef SST_DEBUG_REG
# undef SST_DEBUG_FUNC
# undef SST_DEBUG_VAR
# define SST_DEBUG_REG 0
# define SST_DEBUG_FUNC 0
# define SST_DEBUG_VAR 0
#endif
#if (SST_DEBUG_REG > 0)
......@@ -340,7 +343,7 @@ struct sstfb_par {
unsigned int vBackPorch;
struct pll_timing pll;
unsigned int tiles_in_X;/* num of tiles in X res */
unsigned long mmio_vbase;
u8 __iomem *mmio_vbase;
struct dac_switch dac_sw; /* dac specific functions */
struct pci_dev *dev;
int type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment