aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/aty128fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r--drivers/video/aty/aty128fb.c57
1 files changed, 27 insertions, 30 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 0fefa84ed9ae..8c55011313dc 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -98,7 +98,7 @@
98 98
99#ifndef CONFIG_PPC_PMAC 99#ifndef CONFIG_PPC_PMAC
100/* default mode */ 100/* default mode */
101static struct fb_var_screeninfo default_var __devinitdata = { 101static struct fb_var_screeninfo default_var = {
102 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */ 102 /* 640x480, 60 Hz, Non-Interlaced (25.175 MHz dotclock) */
103 640, 480, 640, 480, 0, 0, 8, 0, 103 640, 480, 640, 480, 0, 0, 8, 0,
104 {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, 104 {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0},
@@ -121,7 +121,7 @@ static struct fb_var_screeninfo default_var = {
121 121
122/* default modedb mode */ 122/* default modedb mode */
123/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ 123/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
124static struct fb_videomode defaultmode __devinitdata = { 124static struct fb_videomode defaultmode = {
125 .refresh = 60, 125 .refresh = 60,
126 .xres = 640, 126 .xres = 640,
127 .yres = 480, 127 .yres = 480,
@@ -149,7 +149,7 @@ enum {
149}; 149};
150 150
151/* Must match above enum */ 151/* Must match above enum */
152static char * const r128_family[] __devinitconst = { 152static char * const r128_family[] = {
153 "AGP", 153 "AGP",
154 "PCI", 154 "PCI",
155 "PRO AGP", 155 "PRO AGP",
@@ -275,7 +275,7 @@ static struct pci_driver aty128fb_driver = {
275 .name = "aty128fb", 275 .name = "aty128fb",
276 .id_table = aty128_pci_tbl, 276 .id_table = aty128_pci_tbl,
277 .probe = aty128_probe, 277 .probe = aty128_probe,
278 .remove = __devexit_p(aty128_remove), 278 .remove = aty128_remove,
279 .suspend = aty128_pci_suspend, 279 .suspend = aty128_pci_suspend,
280 .resume = aty128_pci_resume, 280 .resume = aty128_pci_resume,
281}; 281};
@@ -333,7 +333,7 @@ static const struct aty128_meminfo sdr_sgram =
333static const struct aty128_meminfo ddr_sgram = 333static const struct aty128_meminfo ddr_sgram =
334 { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" }; 334 { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" };
335 335
336static struct fb_fix_screeninfo aty128fb_fix __devinitdata = { 336static struct fb_fix_screeninfo aty128fb_fix = {
337 .id = "ATY Rage128", 337 .id = "ATY Rage128",
338 .type = FB_TYPE_PACKED_PIXELS, 338 .type = FB_TYPE_PACKED_PIXELS,
339 .visual = FB_VISUAL_PSEUDOCOLOR, 339 .visual = FB_VISUAL_PSEUDOCOLOR,
@@ -343,24 +343,24 @@ static struct fb_fix_screeninfo aty128fb_fix __devinitdata = {
343 .accel = FB_ACCEL_ATI_RAGE128, 343 .accel = FB_ACCEL_ATI_RAGE128,
344}; 344};
345 345
346static char *mode_option __devinitdata = NULL; 346static char *mode_option = NULL;
347 347
348#ifdef CONFIG_PPC_PMAC 348#ifdef CONFIG_PPC_PMAC
349static int default_vmode __devinitdata = VMODE_1024_768_60; 349static int default_vmode = VMODE_1024_768_60;
350static int default_cmode __devinitdata = CMODE_8; 350static int default_cmode = CMODE_8;
351#endif 351#endif
352 352
353static int default_crt_on __devinitdata = 0; 353static int default_crt_on = 0;
354static int default_lcd_on __devinitdata = 1; 354static int default_lcd_on = 1;
355 355
356#ifdef CONFIG_MTRR 356#ifdef CONFIG_MTRR
357static bool mtrr = true; 357static bool mtrr = true;
358#endif 358#endif
359 359
360#ifdef CONFIG_PMAC_BACKLIGHT 360#ifdef CONFIG_PMAC_BACKLIGHT
361static int backlight __devinitdata = 1; 361static int backlight = 1;
362#else 362#else
363static int backlight __devinitdata = 0; 363static int backlight = 0;
364#endif 364#endif
365 365
366/* PLL constants */ 366/* PLL constants */
@@ -449,10 +449,9 @@ static int aty128_encode_var(struct fb_var_screeninfo *var,
449static int aty128_decode_var(struct fb_var_screeninfo *var, 449static int aty128_decode_var(struct fb_var_screeninfo *var,
450 struct aty128fb_par *par); 450 struct aty128fb_par *par);
451#if 0 451#if 0
452static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, 452static void aty128_get_pllinfo(struct aty128fb_par *par, void __iomem *bios);
453 void __iomem *bios); 453static void __iomem *aty128_map_ROM(struct pci_dev *pdev,
454static void __devinit __iomem *aty128_map_ROM(struct pci_dev *pdev, 454 const struct aty128fb_par *par);
455 const struct aty128fb_par *par);
456#endif 455#endif
457static void aty128_timings(struct aty128fb_par *par); 456static void aty128_timings(struct aty128fb_par *par);
458static void aty128_init_engine(struct aty128fb_par *par); 457static void aty128_init_engine(struct aty128fb_par *par);
@@ -582,7 +581,7 @@ static void aty_pll_writeupdate(const struct aty128fb_par *par)
582 581
583 582
584/* write to the scratch register to test r/w functionality */ 583/* write to the scratch register to test r/w functionality */
585static int __devinit register_test(const struct aty128fb_par *par) 584static int register_test(const struct aty128fb_par *par)
586{ 585{
587 u32 val; 586 u32 val;
588 int flag = 0; 587 int flag = 0;
@@ -781,8 +780,8 @@ static u32 depth_to_dst(u32 depth)
781 780
782 781
783#ifndef __sparc__ 782#ifndef __sparc__
784static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par, 783static void __iomem *aty128_map_ROM(const struct aty128fb_par *par,
785 struct pci_dev *dev) 784 struct pci_dev *dev)
786{ 785{
787 u16 dptr; 786 u16 dptr;
788 u8 rom_type; 787 u8 rom_type;
@@ -868,8 +867,8 @@ static void __iomem * __devinit aty128_map_ROM(const struct aty128fb_par *par,
868 return NULL; 867 return NULL;
869} 868}
870 869
871static void __devinit aty128_get_pllinfo(struct aty128fb_par *par, 870static void aty128_get_pllinfo(struct aty128fb_par *par,
872 unsigned char __iomem *bios) 871 unsigned char __iomem *bios)
873{ 872{
874 unsigned int bios_hdr; 873 unsigned int bios_hdr;
875 unsigned int bios_pll; 874 unsigned int bios_pll;
@@ -891,7 +890,7 @@ static void __devinit aty128_get_pllinfo(struct aty128fb_par *par,
891} 890}
892 891
893#ifdef CONFIG_X86 892#ifdef CONFIG_X86
894static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par) 893static void __iomem *aty128_find_mem_vbios(struct aty128fb_par *par)
895{ 894{
896 /* I simplified this code as we used to miss the signatures in 895 /* I simplified this code as we used to miss the signatures in
897 * a lot of case. It's now closer to XFree, we just don't check 896 * a lot of case. It's now closer to XFree, we just don't check
@@ -916,7 +915,7 @@ static void __iomem * __devinit aty128_find_mem_vbios(struct aty128fb_par *par)
916#endif /* ndef(__sparc__) */ 915#endif /* ndef(__sparc__) */
917 916
918/* fill in known card constants if pll_block is not available */ 917/* fill in known card constants if pll_block is not available */
919static void __devinit aty128_timings(struct aty128fb_par *par) 918static void aty128_timings(struct aty128fb_par *par)
920{ 919{
921#ifdef CONFIG_PPC_OF 920#ifdef CONFIG_PPC_OF
922 /* instead of a table lookup, assume OF has properly 921 /* instead of a table lookup, assume OF has properly
@@ -1658,7 +1657,7 @@ static int aty128fb_sync(struct fb_info *info)
1658} 1657}
1659 1658
1660#ifndef MODULE 1659#ifndef MODULE
1661static int __devinit aty128fb_setup(char *options) 1660static int aty128fb_setup(char *options)
1662{ 1661{
1663 char *this_opt; 1662 char *this_opt;
1664 1663
@@ -1888,8 +1887,7 @@ static void aty128_early_resume(void *data)
1888} 1887}
1889#endif /* CONFIG_PPC_PMAC */ 1888#endif /* CONFIG_PPC_PMAC */
1890 1889
1891static int __devinit aty128_init(struct pci_dev *pdev, 1890static int aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
1892 const struct pci_device_id *ent)
1893{ 1891{
1894 struct fb_info *info = pci_get_drvdata(pdev); 1892 struct fb_info *info = pci_get_drvdata(pdev);
1895 struct aty128fb_par *par = info->par; 1893 struct aty128fb_par *par = info->par;
@@ -2039,8 +2037,7 @@ static int __devinit aty128_init(struct pci_dev *pdev,
2039 2037
2040#ifdef CONFIG_PCI 2038#ifdef CONFIG_PCI
2041/* register a card ++ajoshi */ 2039/* register a card ++ajoshi */
2042static int __devinit aty128_probe(struct pci_dev *pdev, 2040static int aty128_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2043 const struct pci_device_id *ent)
2044{ 2041{
2045 unsigned long fb_addr, reg_addr; 2042 unsigned long fb_addr, reg_addr;
2046 struct aty128fb_par *par; 2043 struct aty128fb_par *par;
@@ -2156,7 +2153,7 @@ err_free_fb:
2156 return -ENODEV; 2153 return -ENODEV;
2157} 2154}
2158 2155
2159static void __devexit aty128_remove(struct pci_dev *pdev) 2156static void aty128_remove(struct pci_dev *pdev)
2160{ 2157{
2161 struct fb_info *info = pci_get_drvdata(pdev); 2158 struct fb_info *info = pci_get_drvdata(pdev);
2162 struct aty128fb_par *par; 2159 struct aty128fb_par *par;
@@ -2558,7 +2555,7 @@ static int aty128_pci_resume(struct pci_dev *pdev)
2558} 2555}
2559 2556
2560 2557
2561static int __devinit aty128fb_init(void) 2558static int aty128fb_init(void)
2562{ 2559{
2563#ifndef MODULE 2560#ifndef MODULE
2564 char *option = NULL; 2561 char *option = NULL;