diff options
Diffstat (limited to 'drivers/video/aty/atyfb_base.c')
| -rw-r--r-- | drivers/video/aty/atyfb_base.c | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 868932f904ef..4f27fdc58d84 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
| @@ -214,7 +214,7 @@ struct pci_mmap_map { | |||
| 214 | unsigned long prot_mask; | 214 | unsigned long prot_mask; |
| 215 | }; | 215 | }; |
| 216 | 216 | ||
| 217 | static struct fb_fix_screeninfo atyfb_fix __devinitdata = { | 217 | static struct fb_fix_screeninfo atyfb_fix = { |
| 218 | .id = "ATY Mach64", | 218 | .id = "ATY Mach64", |
| 219 | .type = FB_TYPE_PACKED_PIXELS, | 219 | .type = FB_TYPE_PACKED_PIXELS, |
| 220 | .visual = FB_VISUAL_PSEUDOCOLOR, | 220 | .visual = FB_VISUAL_PSEUDOCOLOR, |
| @@ -309,18 +309,18 @@ static int vram; | |||
| 309 | static int pll; | 309 | static int pll; |
| 310 | static int mclk; | 310 | static int mclk; |
| 311 | static int xclk; | 311 | static int xclk; |
| 312 | static int comp_sync __devinitdata = -1; | 312 | static int comp_sync = -1; |
| 313 | static char *mode; | 313 | static char *mode; |
| 314 | 314 | ||
| 315 | #ifdef CONFIG_PMAC_BACKLIGHT | 315 | #ifdef CONFIG_PMAC_BACKLIGHT |
| 316 | static int backlight __devinitdata = 1; | 316 | static int backlight = 1; |
| 317 | #else | 317 | #else |
| 318 | static int backlight __devinitdata = 0; | 318 | static int backlight = 0; |
| 319 | #endif | 319 | #endif |
| 320 | 320 | ||
| 321 | #ifdef CONFIG_PPC | 321 | #ifdef CONFIG_PPC |
| 322 | static int default_vmode __devinitdata = VMODE_CHOOSE; | 322 | static int default_vmode = VMODE_CHOOSE; |
| 323 | static int default_cmode __devinitdata = CMODE_CHOOSE; | 323 | static int default_cmode = CMODE_CHOOSE; |
| 324 | 324 | ||
| 325 | module_param_named(vmode, default_vmode, int, 0); | 325 | module_param_named(vmode, default_vmode, int, 0); |
| 326 | MODULE_PARM_DESC(vmode, "int: video mode for mac"); | 326 | MODULE_PARM_DESC(vmode, "int: video mode for mac"); |
| @@ -329,10 +329,10 @@ MODULE_PARM_DESC(cmode, "int: color mode for mac"); | |||
| 329 | #endif | 329 | #endif |
| 330 | 330 | ||
| 331 | #ifdef CONFIG_ATARI | 331 | #ifdef CONFIG_ATARI |
| 332 | static unsigned int mach64_count __devinitdata = 0; | 332 | static unsigned int mach64_count = 0; |
| 333 | static unsigned long phys_vmembase[FB_MAX] __devinitdata = { 0, }; | 333 | static unsigned long phys_vmembase[FB_MAX] = { 0, }; |
| 334 | static unsigned long phys_size[FB_MAX] __devinitdata = { 0, }; | 334 | static unsigned long phys_size[FB_MAX] = { 0, }; |
| 335 | static unsigned long phys_guiregbase[FB_MAX] __devinitdata = { 0, }; | 335 | static unsigned long phys_guiregbase[FB_MAX] = { 0, }; |
| 336 | #endif | 336 | #endif |
| 337 | 337 | ||
| 338 | /* top -> down is an evolution of mach64 chipset, any corrections? */ | 338 | /* top -> down is an evolution of mach64 chipset, any corrections? */ |
| @@ -371,7 +371,7 @@ static struct { | |||
| 371 | const char *name; | 371 | const char *name; |
| 372 | int pll, mclk, xclk, ecp_max; | 372 | int pll, mclk, xclk, ecp_max; |
| 373 | u32 features; | 373 | u32 features; |
| 374 | } aty_chips[] __devinitdata = { | 374 | } aty_chips[] = { |
| 375 | #ifdef CONFIG_FB_ATY_GX | 375 | #ifdef CONFIG_FB_ATY_GX |
| 376 | /* Mach64 GX */ | 376 | /* Mach64 GX */ |
| 377 | { PCI_CHIP_MACH64GX, "ATI888GX00 (Mach64 GX)", 135, 50, 50, 0, ATI_CHIP_88800GX }, | 377 | { PCI_CHIP_MACH64GX, "ATI888GX00 (Mach64 GX)", 135, 50, 50, 0, ATI_CHIP_88800GX }, |
| @@ -426,7 +426,7 @@ static struct { | |||
| 426 | #endif /* CONFIG_FB_ATY_CT */ | 426 | #endif /* CONFIG_FB_ATY_CT */ |
| 427 | }; | 427 | }; |
| 428 | 428 | ||
| 429 | static int __devinit correct_chipset(struct atyfb_par *par) | 429 | static int correct_chipset(struct atyfb_par *par) |
| 430 | { | 430 | { |
| 431 | u8 rev; | 431 | u8 rev; |
| 432 | u16 type; | 432 | u16 type; |
| @@ -531,34 +531,34 @@ static int __devinit correct_chipset(struct atyfb_par *par) | |||
| 531 | return 0; | 531 | return 0; |
| 532 | } | 532 | } |
| 533 | 533 | ||
| 534 | static char ram_dram[] __devinitdata = "DRAM"; | 534 | static char ram_dram[] = "DRAM"; |
| 535 | static char ram_resv[] __devinitdata = "RESV"; | 535 | static char ram_resv[] = "RESV"; |
| 536 | #ifdef CONFIG_FB_ATY_GX | 536 | #ifdef CONFIG_FB_ATY_GX |
| 537 | static char ram_vram[] __devinitdata = "VRAM"; | 537 | static char ram_vram[] = "VRAM"; |
| 538 | #endif /* CONFIG_FB_ATY_GX */ | 538 | #endif /* CONFIG_FB_ATY_GX */ |
| 539 | #ifdef CONFIG_FB_ATY_CT | 539 | #ifdef CONFIG_FB_ATY_CT |
| 540 | static char ram_edo[] __devinitdata = "EDO"; | 540 | static char ram_edo[] = "EDO"; |
| 541 | static char ram_sdram[] __devinitdata = "SDRAM (1:1)"; | 541 | static char ram_sdram[] = "SDRAM (1:1)"; |
| 542 | static char ram_sgram[] __devinitdata = "SGRAM (1:1)"; | 542 | static char ram_sgram[] = "SGRAM (1:1)"; |
| 543 | static char ram_sdram32[] __devinitdata = "SDRAM (2:1) (32-bit)"; | 543 | static char ram_sdram32[] = "SDRAM (2:1) (32-bit)"; |
| 544 | static char ram_wram[] __devinitdata = "WRAM"; | 544 | static char ram_wram[] = "WRAM"; |
| 545 | static char ram_off[] __devinitdata = "OFF"; | 545 | static char ram_off[] = "OFF"; |
| 546 | #endif /* CONFIG_FB_ATY_CT */ | 546 | #endif /* CONFIG_FB_ATY_CT */ |
| 547 | 547 | ||
| 548 | 548 | ||
| 549 | #ifdef CONFIG_FB_ATY_GX | 549 | #ifdef CONFIG_FB_ATY_GX |
| 550 | static char *aty_gx_ram[8] __devinitdata = { | 550 | static char *aty_gx_ram[8] = { |
| 551 | ram_dram, ram_vram, ram_vram, ram_dram, | 551 | ram_dram, ram_vram, ram_vram, ram_dram, |
| 552 | ram_dram, ram_vram, ram_vram, ram_resv | 552 | ram_dram, ram_vram, ram_vram, ram_resv |
| 553 | }; | 553 | }; |
| 554 | #endif /* CONFIG_FB_ATY_GX */ | 554 | #endif /* CONFIG_FB_ATY_GX */ |
| 555 | 555 | ||
| 556 | #ifdef CONFIG_FB_ATY_CT | 556 | #ifdef CONFIG_FB_ATY_CT |
| 557 | static char *aty_ct_ram[8] __devinitdata = { | 557 | static char *aty_ct_ram[8] = { |
| 558 | ram_off, ram_dram, ram_edo, ram_edo, | 558 | ram_off, ram_dram, ram_edo, ram_edo, |
| 559 | ram_sdram, ram_sgram, ram_wram, ram_resv | 559 | ram_sdram, ram_sgram, ram_wram, ram_resv |
| 560 | }; | 560 | }; |
| 561 | static char *aty_xl_ram[8] __devinitdata = { | 561 | static char *aty_xl_ram[8] = { |
| 562 | ram_off, ram_dram, ram_edo, ram_edo, | 562 | ram_off, ram_dram, ram_edo, ram_edo, |
| 563 | ram_sdram, ram_sgram, ram_sdram32, ram_resv | 563 | ram_sdram, ram_sgram, ram_sdram32, ram_resv |
| 564 | }; | 564 | }; |
| @@ -588,7 +588,7 @@ static u32 atyfb_get_pixclock(struct fb_var_screeninfo *var, | |||
| 588 | * Apple monitor sense | 588 | * Apple monitor sense |
| 589 | */ | 589 | */ |
| 590 | 590 | ||
| 591 | static int __devinit read_aty_sense(const struct atyfb_par *par) | 591 | static int read_aty_sense(const struct atyfb_par *par) |
| 592 | { | 592 | { |
| 593 | int sense, i; | 593 | int sense, i; |
| 594 | 594 | ||
| @@ -2273,7 +2273,7 @@ static void aty_bl_exit(struct backlight_device *bd) | |||
| 2273 | 2273 | ||
| 2274 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ | 2274 | #endif /* CONFIG_FB_ATY_BACKLIGHT */ |
| 2275 | 2275 | ||
| 2276 | static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk) | 2276 | static void aty_calc_mem_refresh(struct atyfb_par *par, int xclk) |
| 2277 | { | 2277 | { |
| 2278 | const int ragepro_tbl[] = { | 2278 | const int ragepro_tbl[] = { |
| 2279 | 44, 50, 55, 66, 75, 80, 100 | 2279 | 44, 50, 55, 66, 75, 80, 100 |
| @@ -2307,8 +2307,8 @@ static void __devinit aty_calc_mem_refresh(struct atyfb_par *par, int xclk) | |||
| 2307 | static struct fb_info *fb_list = NULL; | 2307 | static struct fb_info *fb_list = NULL; |
| 2308 | 2308 | ||
| 2309 | #if defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) | 2309 | #if defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) |
| 2310 | static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par, | 2310 | static int atyfb_get_timings_from_lcd(struct atyfb_par *par, |
| 2311 | struct fb_var_screeninfo *var) | 2311 | struct fb_var_screeninfo *var) |
| 2312 | { | 2312 | { |
| 2313 | int ret = -EINVAL; | 2313 | int ret = -EINVAL; |
| 2314 | 2314 | ||
| @@ -2333,7 +2333,7 @@ static int __devinit atyfb_get_timings_from_lcd(struct atyfb_par *par, | |||
| 2333 | } | 2333 | } |
| 2334 | #endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */ | 2334 | #endif /* defined(__i386__) && defined(CONFIG_FB_ATY_GENERIC_LCD) */ |
| 2335 | 2335 | ||
| 2336 | static int __devinit aty_init(struct fb_info *info) | 2336 | static int aty_init(struct fb_info *info) |
| 2337 | { | 2337 | { |
| 2338 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 2338 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
| 2339 | const char *ramname = NULL, *xtal; | 2339 | const char *ramname = NULL, *xtal; |
| @@ -2787,7 +2787,7 @@ aty_init_exit: | |||
| 2787 | } | 2787 | } |
| 2788 | 2788 | ||
| 2789 | #if defined(CONFIG_ATARI) && !defined(MODULE) | 2789 | #if defined(CONFIG_ATARI) && !defined(MODULE) |
| 2790 | static int __devinit store_video_par(char *video_str, unsigned char m64_num) | 2790 | static int store_video_par(char *video_str, unsigned char m64_num) |
| 2791 | { | 2791 | { |
| 2792 | char *p; | 2792 | char *p; |
| 2793 | unsigned long vmembase, size, guiregbase; | 2793 | unsigned long vmembase, size, guiregbase; |
| @@ -2961,9 +2961,8 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
| 2961 | 2961 | ||
| 2962 | #ifdef __sparc__ | 2962 | #ifdef __sparc__ |
| 2963 | 2963 | ||
| 2964 | static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | 2964 | static int atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info, |
| 2965 | struct fb_info *info, | 2965 | unsigned long addr) |
| 2966 | unsigned long addr) | ||
| 2967 | { | 2966 | { |
| 2968 | struct atyfb_par *par = info->par; | 2967 | struct atyfb_par *par = info->par; |
| 2969 | struct device_node *dp; | 2968 | struct device_node *dp; |
| @@ -3161,7 +3160,7 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | |||
| 3161 | 3160 | ||
| 3162 | #ifdef __i386__ | 3161 | #ifdef __i386__ |
| 3163 | #ifdef CONFIG_FB_ATY_GENERIC_LCD | 3162 | #ifdef CONFIG_FB_ATY_GENERIC_LCD |
| 3164 | static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base) | 3163 | static void aty_init_lcd(struct atyfb_par *par, u32 bios_base) |
| 3165 | { | 3164 | { |
| 3166 | u32 driv_inf_tab, sig; | 3165 | u32 driv_inf_tab, sig; |
| 3167 | u16 lcd_ofs; | 3166 | u16 lcd_ofs; |
| @@ -3392,7 +3391,7 @@ static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base) | |||
| 3392 | } | 3391 | } |
| 3393 | #endif /* CONFIG_FB_ATY_GENERIC_LCD */ | 3392 | #endif /* CONFIG_FB_ATY_GENERIC_LCD */ |
| 3394 | 3393 | ||
| 3395 | static int __devinit init_from_bios(struct atyfb_par *par) | 3394 | static int init_from_bios(struct atyfb_par *par) |
| 3396 | { | 3395 | { |
| 3397 | u32 bios_base, rom_addr; | 3396 | u32 bios_base, rom_addr; |
| 3398 | int ret; | 3397 | int ret; |
| @@ -3445,9 +3444,8 @@ static int __devinit init_from_bios(struct atyfb_par *par) | |||
| 3445 | } | 3444 | } |
| 3446 | #endif /* __i386__ */ | 3445 | #endif /* __i386__ */ |
| 3447 | 3446 | ||
| 3448 | static int __devinit atyfb_setup_generic(struct pci_dev *pdev, | 3447 | static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info, |
| 3449 | struct fb_info *info, | 3448 | unsigned long addr) |
| 3450 | unsigned long addr) | ||
| 3451 | { | 3449 | { |
| 3452 | struct atyfb_par *par = info->par; | 3450 | struct atyfb_par *par = info->par; |
| 3453 | u16 tmp; | 3451 | u16 tmp; |
| @@ -3525,8 +3523,8 @@ atyfb_setup_generic_fail: | |||
| 3525 | 3523 | ||
| 3526 | #endif /* !__sparc__ */ | 3524 | #endif /* !__sparc__ */ |
| 3527 | 3525 | ||
| 3528 | static int __devinit atyfb_pci_probe(struct pci_dev *pdev, | 3526 | static int atyfb_pci_probe(struct pci_dev *pdev, |
| 3529 | const struct pci_device_id *ent) | 3527 | const struct pci_device_id *ent) |
| 3530 | { | 3528 | { |
| 3531 | unsigned long addr, res_start, res_size; | 3529 | unsigned long addr, res_start, res_size; |
| 3532 | struct fb_info *info; | 3530 | struct fb_info *info; |
| @@ -3714,7 +3712,7 @@ static int __init atyfb_atari_probe(void) | |||
| 3714 | 3712 | ||
| 3715 | #ifdef CONFIG_PCI | 3713 | #ifdef CONFIG_PCI |
| 3716 | 3714 | ||
| 3717 | static void __devexit atyfb_remove(struct fb_info *info) | 3715 | static void atyfb_remove(struct fb_info *info) |
| 3718 | { | 3716 | { |
| 3719 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 3717 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
| 3720 | 3718 | ||
| @@ -3762,7 +3760,7 @@ static void __devexit atyfb_remove(struct fb_info *info) | |||
| 3762 | } | 3760 | } |
| 3763 | 3761 | ||
| 3764 | 3762 | ||
| 3765 | static void __devexit atyfb_pci_remove(struct pci_dev *pdev) | 3763 | static void atyfb_pci_remove(struct pci_dev *pdev) |
| 3766 | { | 3764 | { |
| 3767 | struct fb_info *info = pci_get_drvdata(pdev); | 3765 | struct fb_info *info = pci_get_drvdata(pdev); |
| 3768 | 3766 | ||
| @@ -3834,7 +3832,7 @@ static struct pci_driver atyfb_driver = { | |||
| 3834 | .name = "atyfb", | 3832 | .name = "atyfb", |
| 3835 | .id_table = atyfb_pci_tbl, | 3833 | .id_table = atyfb_pci_tbl, |
| 3836 | .probe = atyfb_pci_probe, | 3834 | .probe = atyfb_pci_probe, |
| 3837 | .remove = __devexit_p(atyfb_pci_remove), | 3835 | .remove = atyfb_pci_remove, |
| 3838 | #ifdef CONFIG_PM | 3836 | #ifdef CONFIG_PM |
| 3839 | .suspend = atyfb_pci_suspend, | 3837 | .suspend = atyfb_pci_suspend, |
| 3840 | .resume = atyfb_pci_resume, | 3838 | .resume = atyfb_pci_resume, |
