aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-03-29 04:33:46 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 04:54:44 -0400
commit9f47df264fa53e562cafa0de4a405d0846a81fbd (patch)
tree539ca4500b273844f7378c41da8bc189c719d724 /drivers/video
parenta8b8814bdfe3bb2bdfa23722de947bad8283037c (diff)
[RADEON]: Probe clocks and monitor using OF properties on sparc.
Just like powerpc does. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/aty/radeon_base.c12
-rw-r--r--drivers/video/aty/radeon_monitor.c16
-rw-r--r--drivers/video/aty/radeonfb.h4
3 files changed, 17 insertions, 15 deletions
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
162static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) 162static 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