|
@@ -74,7 +74,7 @@
|
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
|
#include <linux/uaccess.h>
|
|
#include <linux/uaccess.h>
|
|
|
|
|
|
|
|
-#ifdef CONFIG_PPC_OF
|
|
|
|
|
|
|
+#ifdef CONFIG_PPC
|
|
|
|
|
|
|
|
#include <asm/pci-bridge.h>
|
|
#include <asm/pci-bridge.h>
|
|
|
#include "../macmodes.h"
|
|
#include "../macmodes.h"
|
|
@@ -83,7 +83,7 @@
|
|
|
#include <asm/btext.h>
|
|
#include <asm/btext.h>
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
-#endif /* CONFIG_PPC_OF */
|
|
|
|
|
|
|
+#endif /* CONFIG_PPC */
|
|
|
|
|
|
|
|
#ifdef CONFIG_MTRR
|
|
#ifdef CONFIG_MTRR
|
|
|
#include <asm/mtrr.h>
|
|
#include <asm/mtrr.h>
|
|
@@ -418,7 +418,7 @@ static int radeon_find_mem_vbios(struct radeonfb_info *rinfo)
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
|
|
|
|
|
|
|
+#if defined(CONFIG_PPC) || 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
|
|
@@ -448,7 +448,7 @@ static int radeon_read_xtal_OF(struct radeonfb_info *rinfo)
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
|
-#endif /* CONFIG_PPC_OF || CONFIG_SPARC */
|
|
|
|
|
|
|
+#endif /* CONFIG_PPC || CONFIG_SPARC */
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* Read PLL infos from chip registers
|
|
* Read PLL infos from chip registers
|
|
@@ -653,7 +653,7 @@ static void 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;
|
|
|
|
|
|
|
|
|
|
|
|
|
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
|
|
|
|
|
|
|
+#if defined(CONFIG_PPC) || defined(CONFIG_SPARC)
|
|
|
/*
|
|
/*
|
|
|
* Retrieve PLL infos from Open Firmware first
|
|
* Retrieve PLL infos from Open Firmware first
|
|
|
*/
|
|
*/
|
|
@@ -661,7 +661,7 @@ static void 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 || CONFIG_SPARC */
|
|
|
|
|
|
|
+#endif /* CONFIG_PPC || 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
|
|
@@ -1910,7 +1910,7 @@ static int radeon_set_fbinfo(struct radeonfb_info *rinfo)
|
|
|
* I put the card's memory at 0 in card space and AGP at some random high
|
|
* I put the card's memory at 0 in card space and AGP at some random high
|
|
|
* local (0xe0000000 for now) that will be changed by XFree/DRI anyway
|
|
* local (0xe0000000 for now) that will be changed by XFree/DRI anyway
|
|
|
*/
|
|
*/
|
|
|
-#ifdef CONFIG_PPC_OF
|
|
|
|
|
|
|
+#ifdef CONFIG_PPC
|
|
|
#undef SET_MC_FB_FROM_APERTURE
|
|
#undef SET_MC_FB_FROM_APERTURE
|
|
|
static void fixup_memory_mappings(struct radeonfb_info *rinfo)
|
|
static void fixup_memory_mappings(struct radeonfb_info *rinfo)
|
|
|
{
|
|
{
|
|
@@ -1984,7 +1984,7 @@ static void fixup_memory_mappings(struct radeonfb_info *rinfo)
|
|
|
((aper_base + aper_size - 1) & 0xffff0000) | (aper_base >> 16),
|
|
((aper_base + aper_size - 1) & 0xffff0000) | (aper_base >> 16),
|
|
|
0xffff0000 | (agp_base >> 16));
|
|
0xffff0000 | (agp_base >> 16));
|
|
|
}
|
|
}
|
|
|
-#endif /* CONFIG_PPC_OF */
|
|
|
|
|
|
|
+#endif /* CONFIG_PPC */
|
|
|
|
|
|
|
|
|
|
|
|
|
static void radeon_identify_vram(struct radeonfb_info *rinfo)
|
|
static void radeon_identify_vram(struct radeonfb_info *rinfo)
|
|
@@ -2236,7 +2236,7 @@ static int 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;
|
|
|
|
|
|
|
|
-#if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC)
|
|
|
|
|
|
|
+#if defined(CONFIG_PPC) || 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
|
|
|
*/
|
|
*/
|
|
@@ -2245,14 +2245,14 @@ static int 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
|
|
|
|
|
|
|
+#endif /* CONFIG_PPC || CONFIG_SPARC */
|
|
|
|
|
+#ifdef CONFIG_PPC
|
|
|
/* 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
|
|
|
*/
|
|
*/
|
|
|
fixup_memory_mappings(rinfo);
|
|
fixup_memory_mappings(rinfo);
|
|
|
-#endif /* CONFIG_PPC_OF */
|
|
|
|
|
|
|
+#endif /* CONFIG_PPC */
|
|
|
|
|
|
|
|
/* Get VRAM size and type */
|
|
/* Get VRAM size and type */
|
|
|
radeon_identify_vram(rinfo);
|
|
radeon_identify_vram(rinfo);
|