Commit 65a821ab authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] aty iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d1e2ad54
......@@ -397,7 +397,7 @@ struct aty128fb_par {
struct aty128_ddafifo fifo_reg;
u32 accel_flags;
struct aty128_constants constants; /* PLL and others */
void *regbase; /* remapped mmio */
void __iomem *regbase; /* remapped mmio */
u32 vram_size; /* onboard video ram */
int chip_gen;
const struct aty128_meminfo *mem; /* onboard mem info */
......@@ -450,9 +450,9 @@ static int aty128_decode_var(struct fb_var_screeninfo *var,
struct aty128fb_par *par);
#if 0
static void __init aty128_get_pllinfo(struct aty128fb_par *par,
void *bios);
static void __init *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par);
static void __init aty128_unmap_ROM(struct pci_dev *dev, void * rom);
void __iomem *bios);
static void __init __iomem *aty128_map_ROM(struct pci_dev *pdev, const struct aty128fb_par *par);
static void __init aty128_unmap_ROM(struct pci_dev *dev, void __iomem * rom);
#endif
static void aty128_timings(struct aty128fb_par *par);
static void aty128_init_engine(struct aty128fb_par *par);
......@@ -788,7 +788,7 @@ static u32 depth_to_dst(u32 depth)
#ifndef __sparc__
static void __init aty128_unmap_ROM(struct pci_dev *dev, void * rom)
static void __init aty128_unmap_ROM(struct pci_dev *dev, void __iomem * rom)
{
struct resource *r = &dev->resource[PCI_ROM_RESOURCE];
......@@ -806,12 +806,12 @@ static void __init aty128_unmap_ROM(struct pci_dev *dev, void * rom)
}
static void * __init aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev)
static void __iomem * __init aty128_map_ROM(const struct aty128fb_par *par, struct pci_dev *dev)
{
struct resource *r;
u16 dptr;
u8 rom_type;
void *bios;
void __iomem *bios;
/* Fix from ATI for problem with Rage128 hardware not leaving ROM enabled */
unsigned int temp;
......@@ -903,7 +903,7 @@ static void * __init aty128_map_ROM(const struct aty128fb_par *par, struct pci_d
return NULL;
}
static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char *bios)
static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char __iomem *bios)
{
unsigned int bios_hdr;
unsigned int bios_pll;
......@@ -925,7 +925,7 @@ static void __init aty128_get_pllinfo(struct aty128fb_par *par, unsigned char *b
}
#ifdef CONFIG_X86
static void * __devinit aty128_find_mem_vbios(struct aty128fb_par *par)
static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par)
{
/* I simplified this code as we used to miss the signatures in
* a lot of case. It's now closer to XFree, we just don't check
......@@ -933,10 +933,10 @@ static void * __devinit aty128_find_mem_vbios(struct aty128fb_par *par)
* if we end up having conflicts
*/
u32 segstart;
unsigned char *rom_base = NULL;
unsigned char __iomem *rom_base = NULL;
for (segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) {
rom_base = (char *)ioremap(segstart, 0x10000);
rom_base = ioremap(segstart, 0x10000);
if (rom_base == NULL)
return NULL;
if ((*rom_base == 0x55) && (((*(rom_base + 1)) & 0xff) == 0xaa))
......@@ -1885,7 +1885,7 @@ static int __init aty128_probe(struct pci_dev *pdev, const struct pci_device_id
struct fb_info *info;
int err;
#ifndef __sparc__
void *bios = NULL;
void __iomem *bios = NULL;
#endif
/* Enable device in PCI config */
......
......@@ -59,15 +59,15 @@ union aty_pll {
struct aty_cursor {
u8 bits[8][64];
u8 mask[8][64];
u8 *ram;
u8 __iomem *ram;
};
struct atyfb_par {
struct aty_cmap_regs *aty_cmap_regs;
struct aty_cmap_regs __iomem *aty_cmap_regs;
const struct aty_dac_ops *dac_ops;
const struct aty_pll_ops *pll_ops;
struct aty_cursor *cursor;
unsigned long ati_regbase;
void __iomem *ati_regbase;
unsigned long clk_wr_offset;
struct crtc crtc;
union aty_pll pll;
......
......@@ -1514,7 +1514,7 @@ static int __init aty_init(struct fb_info *info, const char *name)
u8 pll_ref_div;
par->aty_cmap_regs =
(struct aty_cmap_regs *) (par->ati_regbase + 0xc0);
(struct aty_cmap_regs __iomem *) (par->ati_regbase + 0xc0);
chip_id = aty_ld_le32(CONFIG_CHIP_ID, par);
type = chip_id & CFG_CHIP_TYPE;
rev = (chip_id & CFG_CHIP_REV) >> 24;
......@@ -1782,8 +1782,7 @@ static int __init aty_init(struct fb_info *info, const char *name)
info->fix.smem_len -= GUI_RESERVE;
/* Clear the video memory */
fb_memset((void *) info->screen_base, 0,
info->fix.smem_len);
fb_memset(info->screen_base, 0, info->fix.smem_len);
info->fbops = &atyfb_ops;
info->pseudo_palette = pseudo_palette;
......@@ -2216,7 +2215,7 @@ int __init atyfb_do_init(void)
#else /* __sparc__ */
info->fix.mmio_start = 0x7ff000 + addr;
default_par->ati_regbase = (unsigned long)
default_par->ati_regbase =
ioremap(info->fix.mmio_start, 0x1000);
if (!default_par->ati_regbase) {
......@@ -2249,8 +2248,7 @@ int __init atyfb_do_init(void)
/* Map in frame buffer */
info->fix.smem_start = addr;
info->screen_base =
(char *) ioremap(addr, 0x800000);
info->screen_base = ioremap(addr, 0x800000);
if (!info->screen_base) {
#ifdef __sparc__
......@@ -2616,9 +2614,9 @@ void cleanup_module(void)
#ifndef __sparc__
if (par->ati_regbase)
iounmap((void *) par->ati_regbase);
iounmap(par->ati_regbase);
if (info->screen_base)
iounmap((void *) info->screen_base);
iounmap(info->screen_base);
#ifdef __BIG_ENDIAN
if (par->cursor && par->cursor->ram)
iounmap(par->cursor->ram);
......
......@@ -73,7 +73,8 @@ void aty_set_cursor_shape(struct fb_info *info)
struct atyfb_par *par = (struct atyfb_par *) info->par;
struct fb_cursor *cursor = &info->cursor;
struct aty_cursor *c = par->cursor;
u8 *ram, m, b;
u8 m, b;
u8 __iomem *ram;
int x, y;
if (!c)
......@@ -178,7 +179,7 @@ int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
struct aty_cursor *__init aty_init_cursor(struct fb_info *info)
{
struct aty_cursor *cursor;
unsigned long addr;
void __iomem *addr;
cursor = kmalloc(sizeof(struct aty_cursor), GFP_ATOMIC);
if (!cursor)
......@@ -195,8 +196,8 @@ struct aty_cursor *__init aty_init_cursor(struct fb_info *info)
addr = info->fix.smem_start - 0x800000 + info->fix.smem_len;
cursor->ram = (u8 *) ioremap(addr, 1024);
#else
addr = (unsigned long) info->screen_base + info->fix.smem_len;
cursor->ram = (u8 *) addr;
addr = info->screen_base + info->fix.smem_len;
cursor->ram = addr;
#endif
#endif
if (!cursor->ram) {
......
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