diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/Kconfig | 2 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 6 | ||||
-rw-r--r-- | drivers/video/aty/radeon_base.c | 12 | ||||
-rw-r--r-- | drivers/video/aty/radeon_monitor.c | 16 | ||||
-rw-r--r-- | drivers/video/aty/radeonfb.h | 4 | ||||
-rw-r--r-- | drivers/video/cg3.c | 2 | ||||
-rw-r--r-- | drivers/video/igafb.c | 24 |
7 files changed, 34 insertions, 32 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 5af684b40496..b1cb72c3780f 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -139,7 +139,7 @@ config FB_TILEBLITTING | |||
139 | This is particularly important to one driver, matroxfb. If | 139 | This is particularly important to one driver, matroxfb. If |
140 | unsure, say N. | 140 | unsure, say N. |
141 | 141 | ||
142 | comment "Frambuffer hardware drivers" | 142 | comment "Frame buffer hardware drivers" |
143 | depends on FB | 143 | depends on FB |
144 | 144 | ||
145 | config FB_CIRRUS | 145 | config FB_CIRRUS |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index d7627fc4f11e..8514f2a6f060 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2899,7 +2899,7 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | |||
2899 | struct fb_info *info, unsigned long addr) | 2899 | struct fb_info *info, unsigned long addr) |
2900 | { | 2900 | { |
2901 | struct atyfb_par *par = info->par; | 2901 | struct atyfb_par *par = info->par; |
2902 | struct pcidev_cookie *pcp; | 2902 | struct device_node *dp; |
2903 | char prop[128]; | 2903 | char prop[128]; |
2904 | int node, len, i, j, ret; | 2904 | int node, len, i, j, ret; |
2905 | u32 mem, chip_id; | 2905 | u32 mem, chip_id; |
@@ -3037,8 +3037,8 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | |||
3037 | node = 0; | 3037 | node = 0; |
3038 | } | 3038 | } |
3039 | 3039 | ||
3040 | pcp = pdev->sysdata; | 3040 | dp = pci_device_to_OF_node(pdev); |
3041 | if (node == pcp->prom_node->node) { | 3041 | if (node == dp->node) { |
3042 | struct fb_var_screeninfo *var = &default_var; | 3042 | struct fb_var_screeninfo *var = &default_var; |
3043 | unsigned int N, P, Q, M, T, R; | 3043 | unsigned int N, P, Q, M, T, R; |
3044 | u32 v_total, h_total; | 3044 | u32 v_total, h_total; |
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 1bf6f42eb400..a4b3fd185de7 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -410,7 +410,7 @@ static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo) | |||
410 | } | 410 | } |
411 | #endif | 411 | #endif |
412 | 412 | ||
413 | #ifdef CONFIG_PPC_OF | 413 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
414 | /* | 414 | /* |
415 | * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device | 415 | * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device |
416 | * tree. Hopefully, ATI OF driver is kind enough to fill these | 416 | * tree. Hopefully, ATI OF driver is kind enough to fill these |
@@ -440,7 +440,7 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo) | |||
440 | 440 | ||
441 | return 0; | 441 | return 0; |
442 | } | 442 | } |
443 | #endif /* CONFIG_PPC_OF */ | 443 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ |
444 | 444 | ||
445 | /* | 445 | /* |
446 | * Read PLL infos from chip registers | 446 | * Read PLL infos from chip registers |
@@ -645,7 +645,7 @@ static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo) | |||
645 | rinfo->pll.ref_div = INPLL(PPLL_REF_DIV) & PPLL_REF_DIV_MASK; | 645 | rinfo->pll.ref_div = INPLL(PPLL_REF_DIV) & PPLL_REF_DIV_MASK; |
646 | 646 | ||
647 | 647 | ||
648 | #ifdef CONFIG_PPC_OF | 648 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
649 | /* | 649 | /* |
650 | * Retrieve PLL infos from Open Firmware first | 650 | * Retrieve PLL infos from Open Firmware first |
651 | */ | 651 | */ |
@@ -653,7 +653,7 @@ static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo) | |||
653 | printk(KERN_INFO "radeonfb: Retrieved PLL infos from Open Firmware\n"); | 653 | printk(KERN_INFO "radeonfb: Retrieved PLL infos from Open Firmware\n"); |
654 | goto found; | 654 | goto found; |
655 | } | 655 | } |
656 | #endif /* CONFIG_PPC_OF */ | 656 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ |
657 | 657 | ||
658 | /* | 658 | /* |
659 | * Check out if we have an X86 which gave us some PLL informations | 659 | * Check out if we have an X86 which gave us some PLL informations |
@@ -2231,7 +2231,7 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, | |||
2231 | rinfo->family == CHIP_FAMILY_RS200) | 2231 | rinfo->family == CHIP_FAMILY_RS200) |
2232 | rinfo->errata |= CHIP_ERRATA_PLL_DELAY; | 2232 | rinfo->errata |= CHIP_ERRATA_PLL_DELAY; |
2233 | 2233 | ||
2234 | #ifdef CONFIG_PPC_OF | 2234 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
2235 | /* On PPC, we obtain the OF device-node pointer to the firmware | 2235 | /* On PPC, we obtain the OF device-node pointer to the firmware |
2236 | * data for this chip | 2236 | * data for this chip |
2237 | */ | 2237 | */ |
@@ -2240,6 +2240,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, | |||
2240 | printk(KERN_WARNING "radeonfb (%s): Cannot match card to OF node !\n", | 2240 | printk(KERN_WARNING "radeonfb (%s): Cannot match card to OF node !\n", |
2241 | pci_name(rinfo->pdev)); | 2241 | pci_name(rinfo->pdev)); |
2242 | 2242 | ||
2243 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ | ||
2244 | #ifdef CONFIG_PPC_OF | ||
2243 | /* On PPC, the firmware sets up a memory mapping that tends | 2245 | /* On PPC, the firmware sets up a memory mapping that tends |
2244 | * to cause lockups when enabling the engine. We reconfigure | 2246 | * to cause lockups when enabling the engine. We reconfigure |
2245 | * the card internal memory mappings properly | 2247 | * the card internal memory mappings properly |
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index 38c7dbf8c151..737b5c09dbdb 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
@@ -52,7 +52,7 @@ static char *radeon_get_mon_name(int type) | |||
52 | } | 52 | } |
53 | 53 | ||
54 | 54 | ||
55 | #ifdef CONFIG_PPC_OF | 55 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
56 | /* | 56 | /* |
57 | * Try to find monitor informations & EDID data out of the Open Firmware | 57 | * Try to find monitor informations & EDID data out of the Open Firmware |
58 | * device-tree. This also contains some "hacks" to work around a few machine | 58 | * device-tree. This also contains some "hacks" to work around a few machine |
@@ -156,7 +156,7 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_ | |||
156 | } | 156 | } |
157 | return MT_NONE; | 157 | return MT_NONE; |
158 | } | 158 | } |
159 | #endif /* CONFIG_PPC_OF */ | 159 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ |
160 | 160 | ||
161 | 161 | ||
162 | static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) | 162 | static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) |
@@ -495,11 +495,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, | |||
495 | * Old single head cards | 495 | * Old single head cards |
496 | */ | 496 | */ |
497 | if (!rinfo->has_CRTC2) { | 497 | if (!rinfo->has_CRTC2) { |
498 | #ifdef CONFIG_PPC_OF | 498 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
499 | if (rinfo->mon1_type == MT_NONE) | 499 | if (rinfo->mon1_type == MT_NONE) |
500 | rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, | 500 | rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, |
501 | &rinfo->mon1_EDID); | 501 | &rinfo->mon1_EDID); |
502 | #endif /* CONFIG_PPC_OF */ | 502 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ |
503 | #ifdef CONFIG_FB_RADEON_I2C | 503 | #ifdef CONFIG_FB_RADEON_I2C |
504 | if (rinfo->mon1_type == MT_NONE) | 504 | if (rinfo->mon1_type == MT_NONE) |
505 | rinfo->mon1_type = | 505 | rinfo->mon1_type = |
@@ -544,11 +544,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, | |||
544 | /* | 544 | /* |
545 | * Probe primary head (DVI or laptop internal panel) | 545 | * Probe primary head (DVI or laptop internal panel) |
546 | */ | 546 | */ |
547 | #ifdef CONFIG_PPC_OF | 547 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
548 | if (rinfo->mon1_type == MT_NONE) | 548 | if (rinfo->mon1_type == MT_NONE) |
549 | rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, | 549 | rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, |
550 | &rinfo->mon1_EDID); | 550 | &rinfo->mon1_EDID); |
551 | #endif /* CONFIG_PPC_OF */ | 551 | #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ |
552 | #ifdef CONFIG_FB_RADEON_I2C | 552 | #ifdef CONFIG_FB_RADEON_I2C |
553 | if (rinfo->mon1_type == MT_NONE) | 553 | if (rinfo->mon1_type == MT_NONE) |
554 | rinfo->mon1_type = radeon_probe_i2c_connector(rinfo, ddc_dvi, | 554 | rinfo->mon1_type = radeon_probe_i2c_connector(rinfo, ddc_dvi, |
@@ -572,11 +572,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, | |||
572 | /* | 572 | /* |
573 | * Probe secondary head (mostly VGA, can be DVI) | 573 | * Probe secondary head (mostly VGA, can be DVI) |
574 | */ | 574 | */ |
575 | #ifdef CONFIG_PPC_OF | 575 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
576 | if (rinfo->mon2_type == MT_NONE) | 576 | if (rinfo->mon2_type == MT_NONE) |
577 | rinfo->mon2_type = radeon_probe_OF_head(rinfo, 1, | 577 | rinfo->mon2_type = radeon_probe_OF_head(rinfo, 1, |
578 | &rinfo->mon2_EDID); | 578 | &rinfo->mon2_EDID); |
579 | #endif /* CONFIG_PPC_OF */ | 579 | #endif /* CONFIG_PPC_OF || defined(CONFIG_SPARC) */ |
580 | #ifdef CONFIG_FB_RADEON_I2C | 580 | #ifdef CONFIG_FB_RADEON_I2C |
581 | if (rinfo->mon2_type == MT_NONE) | 581 | if (rinfo->mon2_type == MT_NONE) |
582 | rinfo->mon2_type = radeon_probe_i2c_connector(rinfo, ddc_vga, | 582 | rinfo->mon2_type = radeon_probe_i2c_connector(rinfo, ddc_vga, |
diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h index d5ff224a6258..319000360285 100644 --- a/drivers/video/aty/radeonfb.h +++ b/drivers/video/aty/radeonfb.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | 18 | ||
19 | #ifdef CONFIG_PPC_OF | 19 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
20 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
21 | #endif | 21 | #endif |
22 | 22 | ||
@@ -292,7 +292,7 @@ struct radeonfb_info { | |||
292 | unsigned long fb_local_base; | 292 | unsigned long fb_local_base; |
293 | 293 | ||
294 | struct pci_dev *pdev; | 294 | struct pci_dev *pdev; |
295 | #ifdef CONFIG_PPC_OF | 295 | #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) |
296 | struct device_node *of_node; | 296 | struct device_node *of_node; |
297 | #endif | 297 | #endif |
298 | 298 | ||
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 767c850f8eb7..f042428a84f4 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
@@ -266,7 +266,7 @@ static void __devinit cg3_init_fix(struct fb_info *info, int linebytes, | |||
266 | static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, | 266 | static void __devinit cg3_rdi_maybe_fixup_var(struct fb_var_screeninfo *var, |
267 | struct device_node *dp) | 267 | struct device_node *dp) |
268 | { | 268 | { |
269 | char *params; | 269 | const char *params; |
270 | char *p; | 270 | char *p; |
271 | int ww, hh; | 271 | int ww, hh; |
272 | 272 | ||
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c index 90592fb59156..eb1a4812ad1d 100644 --- a/drivers/video/igafb.c +++ b/drivers/video/igafb.c | |||
@@ -44,8 +44,8 @@ | |||
44 | 44 | ||
45 | #include <asm/io.h> | 45 | #include <asm/io.h> |
46 | 46 | ||
47 | #ifdef __sparc__ | 47 | #ifdef CONFIG_SPARC |
48 | #include <asm/pbm.h> | 48 | #include <asm/prom.h> |
49 | #include <asm/pcic.h> | 49 | #include <asm/pcic.h> |
50 | #endif | 50 | #endif |
51 | 51 | ||
@@ -96,7 +96,7 @@ struct fb_var_screeninfo default_var = { | |||
96 | .vmode = FB_VMODE_NONINTERLACED | 96 | .vmode = FB_VMODE_NONINTERLACED |
97 | }; | 97 | }; |
98 | 98 | ||
99 | #ifdef __sparc__ | 99 | #ifdef CONFIG_SPARC |
100 | struct fb_var_screeninfo default_var_1024x768 __initdata = { | 100 | struct fb_var_screeninfo default_var_1024x768 __initdata = { |
101 | /* 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock) */ | 101 | /* 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock) */ |
102 | .xres = 1024, | 102 | .xres = 1024, |
@@ -188,7 +188,7 @@ static inline void iga_outb(struct iga_par *par, unsigned char val, | |||
188 | pci_outb(par, val, reg+1); | 188 | pci_outb(par, val, reg+1); |
189 | } | 189 | } |
190 | 190 | ||
191 | #endif /* __sparc__ */ | 191 | #endif /* CONFIG_SPARC */ |
192 | 192 | ||
193 | /* | 193 | /* |
194 | * Very important functionality for the JavaEngine1 computer: | 194 | * Very important functionality for the JavaEngine1 computer: |
@@ -217,7 +217,7 @@ static void iga_blank_border(struct iga_par *par) | |||
217 | iga_outb(par, 0, IGA_EXT_CNTRL, IGA_IDX_OVERSCAN_COLOR + i); | 217 | iga_outb(par, 0, IGA_EXT_CNTRL, IGA_IDX_OVERSCAN_COLOR + i); |
218 | } | 218 | } |
219 | 219 | ||
220 | #ifdef __sparc__ | 220 | #ifdef CONFIG_SPARC |
221 | static int igafb_mmap(struct fb_info *info, | 221 | static int igafb_mmap(struct fb_info *info, |
222 | struct vm_area_struct *vma) | 222 | struct vm_area_struct *vma) |
223 | { | 223 | { |
@@ -271,7 +271,7 @@ static int igafb_mmap(struct fb_info *info, | |||
271 | vma->vm_flags |= VM_IO; | 271 | vma->vm_flags |= VM_IO; |
272 | return 0; | 272 | return 0; |
273 | } | 273 | } |
274 | #endif /* __sparc__ */ | 274 | #endif /* CONFIG_SPARC */ |
275 | 275 | ||
276 | static int igafb_setcolreg(unsigned regno, unsigned red, unsigned green, | 276 | static int igafb_setcolreg(unsigned regno, unsigned red, unsigned green, |
277 | unsigned blue, unsigned transp, | 277 | unsigned blue, unsigned transp, |
@@ -323,7 +323,7 @@ static struct fb_ops igafb_ops = { | |||
323 | .fb_fillrect = cfb_fillrect, | 323 | .fb_fillrect = cfb_fillrect, |
324 | .fb_copyarea = cfb_copyarea, | 324 | .fb_copyarea = cfb_copyarea, |
325 | .fb_imageblit = cfb_imageblit, | 325 | .fb_imageblit = cfb_imageblit, |
326 | #ifdef __sparc__ | 326 | #ifdef CONFIG_SPARC |
327 | .fb_mmap = igafb_mmap, | 327 | .fb_mmap = igafb_mmap, |
328 | #endif | 328 | #endif |
329 | }; | 329 | }; |
@@ -424,7 +424,7 @@ int __init igafb_init(void) | |||
424 | 424 | ||
425 | par->frame_buffer_phys = addr & PCI_BASE_ADDRESS_MEM_MASK; | 425 | par->frame_buffer_phys = addr & PCI_BASE_ADDRESS_MEM_MASK; |
426 | 426 | ||
427 | #ifdef __sparc__ | 427 | #ifdef CONFIG_SPARC |
428 | /* | 428 | /* |
429 | * The following is sparc specific and this is why: | 429 | * The following is sparc specific and this is why: |
430 | * | 430 | * |
@@ -477,8 +477,8 @@ int __init igafb_init(void) | |||
477 | * Set default vmode and cmode from PROM properties. | 477 | * Set default vmode and cmode from PROM properties. |
478 | */ | 478 | */ |
479 | { | 479 | { |
480 | struct pcidev_cookie *cookie = pdev->sysdata; | 480 | struct device_node *dp = pci_device_to_OF_node(pdev); |
481 | int node = cookie->prom_node; | 481 | int node = dp->node; |
482 | int width = prom_getintdefault(node, "width", 1024); | 482 | int width = prom_getintdefault(node, "width", 1024); |
483 | int height = prom_getintdefault(node, "height", 768); | 483 | int height = prom_getintdefault(node, "height", 768); |
484 | int depth = prom_getintdefault(node, "depth", 8); | 484 | int depth = prom_getintdefault(node, "depth", 8); |
@@ -534,7 +534,7 @@ int __init igafb_init(void) | |||
534 | kfree(info); | 534 | kfree(info); |
535 | } | 535 | } |
536 | 536 | ||
537 | #ifdef __sparc__ | 537 | #ifdef CONFIG_SPARC |
538 | /* | 538 | /* |
539 | * Add /dev/fb mmap values. | 539 | * Add /dev/fb mmap values. |
540 | */ | 540 | */ |
@@ -552,7 +552,7 @@ int __init igafb_init(void) | |||
552 | par->mmap_map[1].size = PAGE_SIZE * 2; /* X wants 2 pages */ | 552 | par->mmap_map[1].size = PAGE_SIZE * 2; /* X wants 2 pages */ |
553 | par->mmap_map[1].prot_mask = SRMMU_CACHE; | 553 | par->mmap_map[1].prot_mask = SRMMU_CACHE; |
554 | par->mmap_map[1].prot_flag = SRMMU_WRITE; | 554 | par->mmap_map[1].prot_flag = SRMMU_WRITE; |
555 | #endif /* __sparc__ */ | 555 | #endif /* CONFIG_SPARC */ |
556 | 556 | ||
557 | return 0; | 557 | return 0; |
558 | } | 558 | } |