提交 9f47df26 编写于 作者: D David S. Miller

[RADEON]: Probe clocks and monitor using OF properties on sparc.

Just like powerpc does.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a8b8814b
...@@ -410,7 +410,7 @@ static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo) ...@@ -410,7 +410,7 @@ static int __devinit radeon_find_mem_vbios(struct radeonfb_info *rinfo)
} }
#endif #endif
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
/* /*
* Read XTAL (ref clock), SCLK and MCLK from Open Firmware device * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device
* tree. Hopefully, ATI OF driver is kind enough to fill these * 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,7 +440,7 @@ static int __devinit radeon_read_xtal_OF (struct radeonfb_info *rinfo)
return 0; return 0;
} }
#endif /* CONFIG_PPC_OF */ #endif /* CONFIG_PPC_OF || CONFIG_SPARC */
/* /*
* Read PLL infos from chip registers * Read PLL infos from chip registers
...@@ -645,7 +645,7 @@ static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo) ...@@ -645,7 +645,7 @@ static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo)
rinfo->pll.ref_div = INPLL(PPLL_REF_DIV) & PPLL_REF_DIV_MASK; rinfo->pll.ref_div = INPLL(PPLL_REF_DIV) & PPLL_REF_DIV_MASK;
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
/* /*
* Retrieve PLL infos from Open Firmware first * Retrieve PLL infos from Open Firmware first
*/ */
...@@ -653,7 +653,7 @@ static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo) ...@@ -653,7 +653,7 @@ static void __devinit radeon_get_pllinfo(struct radeonfb_info *rinfo)
printk(KERN_INFO "radeonfb: Retrieved PLL infos from Open Firmware\n"); printk(KERN_INFO "radeonfb: Retrieved PLL infos from Open Firmware\n");
goto found; goto found;
} }
#endif /* CONFIG_PPC_OF */ #endif /* CONFIG_PPC_OF || CONFIG_SPARC */
/* /*
* Check out if we have an X86 which gave us some PLL informations * 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,7 +2231,7 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
rinfo->family == CHIP_FAMILY_RS200) rinfo->family == CHIP_FAMILY_RS200)
rinfo->errata |= CHIP_ERRATA_PLL_DELAY; rinfo->errata |= CHIP_ERRATA_PLL_DELAY;
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
/* On PPC, we obtain the OF device-node pointer to the firmware /* On PPC, we obtain the OF device-node pointer to the firmware
* data for this chip * data for this chip
*/ */
...@@ -2240,6 +2240,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev, ...@@ -2240,6 +2240,8 @@ static int __devinit radeonfb_pci_register (struct pci_dev *pdev,
printk(KERN_WARNING "radeonfb (%s): Cannot match card to OF node !\n", printk(KERN_WARNING "radeonfb (%s): Cannot match card to OF node !\n",
pci_name(rinfo->pdev)); pci_name(rinfo->pdev));
#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
#ifdef CONFIG_PPC_OF
/* On PPC, the firmware sets up a memory mapping that tends /* On PPC, the firmware sets up a memory mapping that tends
* to cause lockups when enabling the engine. We reconfigure * to cause lockups when enabling the engine. We reconfigure
* the card internal memory mappings properly * the card internal memory mappings properly
......
...@@ -52,7 +52,7 @@ static char *radeon_get_mon_name(int type) ...@@ -52,7 +52,7 @@ static char *radeon_get_mon_name(int type)
} }
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
/* /*
* Try to find monitor informations & EDID data out of the Open Firmware * Try to find monitor informations & EDID data out of the Open Firmware
* device-tree. This also contains some "hacks" to work around a few machine * 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,7 +156,7 @@ static int __devinit radeon_probe_OF_head(struct radeonfb_info *rinfo, int head_
} }
return MT_NONE; return MT_NONE;
} }
#endif /* CONFIG_PPC_OF */ #endif /* CONFIG_PPC_OF || CONFIG_SPARC */
static int __devinit radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) 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,11 +495,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo,
* Old single head cards * Old single head cards
*/ */
if (!rinfo->has_CRTC2) { if (!rinfo->has_CRTC2) {
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
if (rinfo->mon1_type == MT_NONE) if (rinfo->mon1_type == MT_NONE)
rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0,
&rinfo->mon1_EDID); &rinfo->mon1_EDID);
#endif /* CONFIG_PPC_OF */ #endif /* CONFIG_PPC_OF || CONFIG_SPARC */
#ifdef CONFIG_FB_RADEON_I2C #ifdef CONFIG_FB_RADEON_I2C
if (rinfo->mon1_type == MT_NONE) if (rinfo->mon1_type == MT_NONE)
rinfo->mon1_type = rinfo->mon1_type =
...@@ -544,11 +544,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, ...@@ -544,11 +544,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo,
/* /*
* Probe primary head (DVI or laptop internal panel) * Probe primary head (DVI or laptop internal panel)
*/ */
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
if (rinfo->mon1_type == MT_NONE) if (rinfo->mon1_type == MT_NONE)
rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0,
&rinfo->mon1_EDID); &rinfo->mon1_EDID);
#endif /* CONFIG_PPC_OF */ #endif /* CONFIG_PPC_OF || CONFIG_SPARC */
#ifdef CONFIG_FB_RADEON_I2C #ifdef CONFIG_FB_RADEON_I2C
if (rinfo->mon1_type == MT_NONE) if (rinfo->mon1_type == MT_NONE)
rinfo->mon1_type = radeon_probe_i2c_connector(rinfo, ddc_dvi, rinfo->mon1_type = radeon_probe_i2c_connector(rinfo, ddc_dvi,
...@@ -572,11 +572,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, ...@@ -572,11 +572,11 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo,
/* /*
* Probe secondary head (mostly VGA, can be DVI) * Probe secondary head (mostly VGA, can be DVI)
*/ */
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
if (rinfo->mon2_type == MT_NONE) if (rinfo->mon2_type == MT_NONE)
rinfo->mon2_type = radeon_probe_OF_head(rinfo, 1, rinfo->mon2_type = radeon_probe_OF_head(rinfo, 1,
&rinfo->mon2_EDID); &rinfo->mon2_EDID);
#endif /* CONFIG_PPC_OF */ #endif /* CONFIG_PPC_OF || defined(CONFIG_SPARC) */
#ifdef CONFIG_FB_RADEON_I2C #ifdef CONFIG_FB_RADEON_I2C
if (rinfo->mon2_type == MT_NONE) if (rinfo->mon2_type == MT_NONE)
rinfo->mon2_type = radeon_probe_i2c_connector(rinfo, ddc_vga, rinfo->mon2_type = radeon_probe_i2c_connector(rinfo, ddc_vga,
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <asm/io.h> #include <asm/io.h>
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
#include <asm/prom.h> #include <asm/prom.h>
#endif #endif
...@@ -292,7 +292,7 @@ struct radeonfb_info { ...@@ -292,7 +292,7 @@ struct radeonfb_info {
unsigned long fb_local_base; unsigned long fb_local_base;
struct pci_dev *pdev; struct pci_dev *pdev;
#ifdef CONFIG_PPC_OF #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
struct device_node *of_node; struct device_node *of_node;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册