aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty
diff options
context:
space:
mode:
authorVille Syrjala <syrjala@sci.fi>2006-12-08 05:40:43 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:07 -0500
commitcab5901e93bfe4f3cfd8cf9cda2558d22568f7a2 (patch)
tree8de4f0586cfeac786eeb48699fa61b5862c4649c /drivers/video/aty
parent5850e0cf9a2345498fe2545c37118ef9405044eb (diff)
[PATCH] atyfb: Remove aty_cmap_regs
Remove aty_cmap_regs. Access the LUT in the same way as other registers. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/aty')
-rw-r--r--drivers/video/aty/atyfb.h1
-rw-r--r--drivers/video/aty/atyfb_base.c45
2 files changed, 12 insertions, 34 deletions
diff --git a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h
index e8dc5d10bd87..c9b35c6b0b69 100644
--- a/drivers/video/aty/atyfb.h
+++ b/drivers/video/aty/atyfb.h
@@ -126,7 +126,6 @@ union aty_pll {
126 */ 126 */
127 127
128struct atyfb_par { 128struct atyfb_par {
129 struct aty_cmap_regs __iomem *aty_cmap_regs;
130 struct { u8 red, green, blue; } palette[256]; 129 struct { u8 red, green, blue; } palette[256];
131 const struct aty_dac_ops *dac_ops; 130 const struct aty_dac_ops *dac_ops;
132 const struct aty_pll_ops *pll_ops; 131 const struct aty_pll_ops *pll_ops;
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 7636f10eb885..d4262b8b8e02 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -203,14 +203,6 @@ static void ATIReduceRatio(int *Numerator, int *Denominator)
203 * The Hardware parameters for each card 203 * The Hardware parameters for each card
204 */ 204 */
205 205
206struct aty_cmap_regs {
207 u8 windex;
208 u8 lut;
209 u8 mask;
210 u8 rindex;
211 u8 cntl;
212};
213
214struct pci_mmap_map { 206struct pci_mmap_map {
215 unsigned long voff; 207 unsigned long voff;
216 unsigned long poff; 208 unsigned long poff;
@@ -1937,17 +1929,14 @@ static void atyfb_save_palette(struct atyfb_par *par, int enter)
1937 aty_st_8(DAC_CNTL, tmp, par); 1929 aty_st_8(DAC_CNTL, tmp, par);
1938 aty_st_8(DAC_MASK, 0xff, par); 1930 aty_st_8(DAC_MASK, 0xff, par);
1939 1931
1940 writeb(i, &par->aty_cmap_regs->rindex); 1932 aty_st_8(DAC_R_INDEX, i, par);
1941 atyfb_save.r[enter][i] = readb(&par->aty_cmap_regs->lut); 1933 atyfb_save.r[enter][i] = aty_ld_8(DAC_DATA, par);
1942 atyfb_save.g[enter][i] = readb(&par->aty_cmap_regs->lut); 1934 atyfb_save.g[enter][i] = aty_ld_8(DAC_DATA, par);
1943 atyfb_save.b[enter][i] = readb(&par->aty_cmap_regs->lut); 1935 atyfb_save.b[enter][i] = aty_ld_8(DAC_DATA, par);
1944 writeb(i, &par->aty_cmap_regs->windex); 1936 aty_st_8(DAC_W_INDEX, i, par);
1945 writeb(atyfb_save.r[1 - enter][i], 1937 aty_st_8(DAC_DATA, atyfb_save.r[1 - enter][i], par);
1946 &par->aty_cmap_regs->lut); 1938 aty_st_8(DAC_DATA, atyfb_save.g[1 - enter][i], par);
1947 writeb(atyfb_save.g[1 - enter][i], 1939 aty_st_8(DAC_DATA, atyfb_save.b[1 - enter][i], par);
1948 &par->aty_cmap_regs->lut);
1949 writeb(atyfb_save.b[1 - enter][i],
1950 &par->aty_cmap_regs->lut);
1951 } 1940 }
1952} 1941}
1953 1942
@@ -2355,9 +2344,6 @@ static int __devinit aty_init(struct fb_info *info)
2355 init_waitqueue_head(&par->vblank.wait); 2344 init_waitqueue_head(&par->vblank.wait);
2356 spin_lock_init(&par->int_lock); 2345 spin_lock_init(&par->int_lock);
2357 2346
2358 par->aty_cmap_regs =
2359 (struct aty_cmap_regs __iomem *) (par->ati_regbase + 0xc0);
2360
2361#ifdef CONFIG_PPC_PMAC 2347#ifdef CONFIG_PPC_PMAC
2362 /* The Apple iBook1 uses non-standard memory frequencies. We detect it 2348 /* The Apple iBook1 uses non-standard memory frequencies. We detect it
2363 * and set the frequency manually. */ 2349 * and set the frequency manually. */
@@ -2862,17 +2848,10 @@ static int atyfb_blank(int blank, struct fb_info *info)
2862static void aty_st_pal(u_int regno, u_int red, u_int green, u_int blue, 2848static void aty_st_pal(u_int regno, u_int red, u_int green, u_int blue,
2863 const struct atyfb_par *par) 2849 const struct atyfb_par *par)
2864{ 2850{
2865#ifdef CONFIG_ATARI 2851 aty_st_8(DAC_W_INDEX, regno, par);
2866 out_8(&par->aty_cmap_regs->windex, regno); 2852 aty_st_8(DAC_DATA, red, par);
2867 out_8(&par->aty_cmap_regs->lut, red); 2853 aty_st_8(DAC_DATA, green, par);
2868 out_8(&par->aty_cmap_regs->lut, green); 2854 aty_st_8(DAC_DATA, blue, par);
2869 out_8(&par->aty_cmap_regs->lut, blue);
2870#else
2871 writeb(regno, &par->aty_cmap_regs->windex);
2872 writeb(red, &par->aty_cmap_regs->lut);
2873 writeb(green, &par->aty_cmap_regs->lut);
2874 writeb(blue, &par->aty_cmap_regs->lut);
2875#endif
2876} 2855}
2877 2856
2878 /* 2857 /*