Commit 9b86d0d9 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (4/12) cg6 iomem annotations

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 55866754
...@@ -250,11 +250,11 @@ struct bt_regs { ...@@ -250,11 +250,11 @@ struct bt_regs {
struct cg6_par { struct cg6_par {
spinlock_t lock; spinlock_t lock;
struct bt_regs *bt; struct bt_regs __iomem *bt;
struct cg6_fbc *fbc; struct cg6_fbc __iomem *fbc;
struct cg6_thc *thc; struct cg6_thc __iomem *thc;
struct cg6_tec *tec; struct cg6_tec __iomem *tec;
volatile u32 *fhc; volatile u32 __iomem *fhc;
u32 flags; u32 flags;
#define CG6_FLAG_BLANKED 0x00000001 #define CG6_FLAG_BLANKED 0x00000001
...@@ -269,7 +269,7 @@ struct cg6_par { ...@@ -269,7 +269,7 @@ struct cg6_par {
static int cg6_sync(struct fb_info *info) static int cg6_sync(struct fb_info *info)
{ {
struct cg6_par *par = (struct cg6_par *) info->par; struct cg6_par *par = (struct cg6_par *) info->par;
struct cg6_fbc *fbc = par->fbc; struct cg6_fbc __iomem *fbc = par->fbc;
int limit = 10000; int limit = 10000;
do { do {
...@@ -292,7 +292,7 @@ static int cg6_sync(struct fb_info *info) ...@@ -292,7 +292,7 @@ static int cg6_sync(struct fb_info *info)
static void cg6_fillrect(struct fb_info *info, const struct fb_fillrect *rect) static void cg6_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{ {
struct cg6_par *par = (struct cg6_par *) info->par; struct cg6_par *par = (struct cg6_par *) info->par;
struct cg6_fbc *fbc = par->fbc; struct cg6_fbc __iomem *fbc = par->fbc;
unsigned long flags; unsigned long flags;
s32 val; s32 val;
...@@ -327,7 +327,7 @@ static void cg6_fillrect(struct fb_info *info, const struct fb_fillrect *rect) ...@@ -327,7 +327,7 @@ static void cg6_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
static void cg6_imageblit(struct fb_info *info, const struct fb_image *image) static void cg6_imageblit(struct fb_info *info, const struct fb_image *image)
{ {
struct cg6_par *par = (struct cg6_par *) info->par; struct cg6_par *par = (struct cg6_par *) info->par;
struct cg6_fbc *fbc = par->fbc; struct cg6_fbc __iomem *fbc = par->fbc;
const u8 *data = image->data; const u8 *data = image->data;
unsigned long flags; unsigned long flags;
u32 x, y; u32 x, y;
...@@ -418,7 +418,7 @@ static int cg6_setcolreg(unsigned regno, ...@@ -418,7 +418,7 @@ static int cg6_setcolreg(unsigned regno,
unsigned transp, struct fb_info *info) unsigned transp, struct fb_info *info)
{ {
struct cg6_par *par = (struct cg6_par *) info->par; struct cg6_par *par = (struct cg6_par *) info->par;
struct bt_regs *bt = par->bt; struct bt_regs __iomem *bt = par->bt;
unsigned long flags; unsigned long flags;
if (regno >= 256) if (regno >= 256)
...@@ -449,7 +449,7 @@ static int ...@@ -449,7 +449,7 @@ static int
cg6_blank(int blank, struct fb_info *info) cg6_blank(int blank, struct fb_info *info)
{ {
struct cg6_par *par = (struct cg6_par *) info->par; struct cg6_par *par = (struct cg6_par *) info->par;
struct cg6_thc *thc = par->thc; struct cg6_thc __iomem *thc = par->thc;
unsigned long flags; unsigned long flags;
u32 val; u32 val;
...@@ -593,7 +593,7 @@ cg6_init_fix(struct fb_info *info, int linebytes) ...@@ -593,7 +593,7 @@ cg6_init_fix(struct fb_info *info, int linebytes)
/* Initialize Brooktree DAC */ /* Initialize Brooktree DAC */
static void cg6_bt_init(struct cg6_par *par) static void cg6_bt_init(struct cg6_par *par)
{ {
struct bt_regs *bt = par->bt; struct bt_regs __iomem *bt = par->bt;
sbus_writel(0x04 << 24, &bt->addr); /* color planes */ sbus_writel(0x04 << 24, &bt->addr); /* color planes */
sbus_writel(0xff << 24, &bt->control); sbus_writel(0xff << 24, &bt->control);
...@@ -608,8 +608,8 @@ static void cg6_bt_init(struct cg6_par *par) ...@@ -608,8 +608,8 @@ static void cg6_bt_init(struct cg6_par *par)
static void cg6_chip_init(struct fb_info *info) static void cg6_chip_init(struct fb_info *info)
{ {
struct cg6_par *par = (struct cg6_par *) info->par; struct cg6_par *par = (struct cg6_par *) info->par;
struct cg6_tec *tec = par->tec; struct cg6_tec __iomem *tec = par->tec;
struct cg6_fbc *fbc = par->fbc; struct cg6_fbc __iomem *fbc = par->fbc;
u32 rev, conf, mode, tmp; u32 rev, conf, mode, tmp;
int i; int i;
...@@ -696,31 +696,26 @@ static void cg6_init_one(struct sbus_dev *sdev) ...@@ -696,31 +696,26 @@ static void cg6_init_one(struct sbus_dev *sdev)
if (prom_getbool(sdev->prom_node, "dblbuf")) if (prom_getbool(sdev->prom_node, "dblbuf"))
all->par.fbsize *= 4; all->par.fbsize *= 4;
all->par.fbc = (struct cg6_fbc *) all->par.fbc = sbus_ioremap(&sdev->resource[0], CG6_FBC_OFFSET,
sbus_ioremap(&sdev->resource[0], CG6_FBC_OFFSET,
4096, "cgsix fbc"); 4096, "cgsix fbc");
all->par.tec = (struct cg6_tec *) all->par.tec = sbus_ioremap(&sdev->resource[0], CG6_TEC_OFFSET,
sbus_ioremap(&sdev->resource[0], CG6_TEC_OFFSET,
sizeof(struct cg6_tec), "cgsix tec"); sizeof(struct cg6_tec), "cgsix tec");
all->par.thc = (struct cg6_thc *) all->par.thc = sbus_ioremap(&sdev->resource[0], CG6_THC_OFFSET,
sbus_ioremap(&sdev->resource[0], CG6_THC_OFFSET,
sizeof(struct cg6_thc), "cgsix thc"); sizeof(struct cg6_thc), "cgsix thc");
all->par.bt = (struct bt_regs *) all->par.bt = sbus_ioremap(&sdev->resource[0], CG6_BROOKTREE_OFFSET,
sbus_ioremap(&sdev->resource[0], CG6_BROOKTREE_OFFSET,
sizeof(struct bt_regs), "cgsix dac"); sizeof(struct bt_regs), "cgsix dac");
all->par.fhc = (u32 *) all->par.fhc = sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET,
sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET,
sizeof(u32), "cgsix fhc"); sizeof(u32), "cgsix fhc");
all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT | all->info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_IMAGEBLIT |
FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT; FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT;
all->info.fbops = &cg6_ops; all->info.fbops = &cg6_ops;
#ifdef CONFIG_SPARC32 #ifdef CONFIG_SPARC32
all->info.screen_base = (char *) all->info.screen_base = (char __iomem *)
prom_getintdefault(sdev->prom_node, "address", 0); prom_getintdefault(sdev->prom_node, "address", 0);
#endif #endif
if (!all->info.screen_base) if (!all->info.screen_base)
all->info.screen_base = (char *) all->info.screen_base =
sbus_ioremap(&sdev->resource[0], CG6_RAM_OFFSET, sbus_ioremap(&sdev->resource[0], CG6_RAM_OFFSET,
all->par.fbsize, "cgsix ram"); all->par.fbsize, "cgsix ram");
all->info.par = &all->par; all->info.par = &all->par;
......
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