Commit cab5901e authored by Ville Syrjala's avatar Ville Syrjala Committed by Linus Torvalds

[PATCH] atyfb: Remove aty_cmap_regs

Remove aty_cmap_regs. Access the LUT in the same way as other registers.
Signed-off-by: default avatarVille Syrjala <syrjala@sci.fi>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 5850e0cf
...@@ -126,7 +126,6 @@ union aty_pll { ...@@ -126,7 +126,6 @@ union aty_pll {
*/ */
struct atyfb_par { struct atyfb_par {
struct aty_cmap_regs __iomem *aty_cmap_regs;
struct { u8 red, green, blue; } palette[256]; struct { u8 red, green, blue; } palette[256];
const struct aty_dac_ops *dac_ops; const struct aty_dac_ops *dac_ops;
const struct aty_pll_ops *pll_ops; const struct aty_pll_ops *pll_ops;
......
...@@ -203,14 +203,6 @@ static void ATIReduceRatio(int *Numerator, int *Denominator) ...@@ -203,14 +203,6 @@ static void ATIReduceRatio(int *Numerator, int *Denominator)
* The Hardware parameters for each card * The Hardware parameters for each card
*/ */
struct aty_cmap_regs {
u8 windex;
u8 lut;
u8 mask;
u8 rindex;
u8 cntl;
};
struct pci_mmap_map { struct pci_mmap_map {
unsigned long voff; unsigned long voff;
unsigned long poff; unsigned long poff;
...@@ -1937,17 +1929,14 @@ static void atyfb_save_palette(struct atyfb_par *par, int enter) ...@@ -1937,17 +1929,14 @@ static void atyfb_save_palette(struct atyfb_par *par, int enter)
aty_st_8(DAC_CNTL, tmp, par); aty_st_8(DAC_CNTL, tmp, par);
aty_st_8(DAC_MASK, 0xff, par); aty_st_8(DAC_MASK, 0xff, par);
writeb(i, &par->aty_cmap_regs->rindex); aty_st_8(DAC_R_INDEX, i, par);
atyfb_save.r[enter][i] = readb(&par->aty_cmap_regs->lut); atyfb_save.r[enter][i] = aty_ld_8(DAC_DATA, par);
atyfb_save.g[enter][i] = readb(&par->aty_cmap_regs->lut); atyfb_save.g[enter][i] = aty_ld_8(DAC_DATA, par);
atyfb_save.b[enter][i] = readb(&par->aty_cmap_regs->lut); atyfb_save.b[enter][i] = aty_ld_8(DAC_DATA, par);
writeb(i, &par->aty_cmap_regs->windex); aty_st_8(DAC_W_INDEX, i, par);
writeb(atyfb_save.r[1 - enter][i], aty_st_8(DAC_DATA, atyfb_save.r[1 - enter][i], par);
&par->aty_cmap_regs->lut); aty_st_8(DAC_DATA, atyfb_save.g[1 - enter][i], par);
writeb(atyfb_save.g[1 - enter][i], aty_st_8(DAC_DATA, atyfb_save.b[1 - enter][i], par);
&par->aty_cmap_regs->lut);
writeb(atyfb_save.b[1 - enter][i],
&par->aty_cmap_regs->lut);
} }
} }
...@@ -2355,9 +2344,6 @@ static int __devinit aty_init(struct fb_info *info) ...@@ -2355,9 +2344,6 @@ static int __devinit aty_init(struct fb_info *info)
init_waitqueue_head(&par->vblank.wait); init_waitqueue_head(&par->vblank.wait);
spin_lock_init(&par->int_lock); spin_lock_init(&par->int_lock);
par->aty_cmap_regs =
(struct aty_cmap_regs __iomem *) (par->ati_regbase + 0xc0);
#ifdef CONFIG_PPC_PMAC #ifdef CONFIG_PPC_PMAC
/* The Apple iBook1 uses non-standard memory frequencies. We detect it /* The Apple iBook1 uses non-standard memory frequencies. We detect it
* and set the frequency manually. */ * and set the frequency manually. */
...@@ -2862,17 +2848,10 @@ static int atyfb_blank(int blank, struct fb_info *info) ...@@ -2862,17 +2848,10 @@ static int atyfb_blank(int blank, struct fb_info *info)
static void aty_st_pal(u_int regno, u_int red, u_int green, u_int blue, static void aty_st_pal(u_int regno, u_int red, u_int green, u_int blue,
const struct atyfb_par *par) const struct atyfb_par *par)
{ {
#ifdef CONFIG_ATARI aty_st_8(DAC_W_INDEX, regno, par);
out_8(&par->aty_cmap_regs->windex, regno); aty_st_8(DAC_DATA, red, par);
out_8(&par->aty_cmap_regs->lut, red); aty_st_8(DAC_DATA, green, par);
out_8(&par->aty_cmap_regs->lut, green); aty_st_8(DAC_DATA, blue, par);
out_8(&par->aty_cmap_regs->lut, blue);
#else
writeb(regno, &par->aty_cmap_regs->windex);
writeb(red, &par->aty_cmap_regs->lut);
writeb(green, &par->aty_cmap_regs->lut);
writeb(blue, &par->aty_cmap_regs->lut);
#endif
} }
/* /*
......
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