Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: radeon: replace PPC_OF with PPC

The PPC_OF is a ppc specific option which is used to mean that the
firmware device tree access functions are available. Since all the
ppc platforms have a device tree, it is aways set to 'y' for ppc.
So it makes no sense to keep a such option in the current kernel.
Replace it with PPC.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Kevin Hao and committed by
Michael Ellerman
758ddd1d e7b410ef

+33 -33
+1 -1
drivers/video/fbdev/Kconfig
··· 1333 1333 select FB_CFB_FILLRECT 1334 1334 select FB_CFB_COPYAREA 1335 1335 select FB_CFB_IMAGEBLIT 1336 - select FB_MACMODES if PPC_OF 1336 + select FB_MACMODES if PPC 1337 1337 help 1338 1338 Choose this option if you want to use an ATI Radeon graphics card as 1339 1339 a framebuffer device. There are both PCI and AGP versions. You
+12 -12
drivers/video/fbdev/aty/radeon_base.c
··· 74 74 #include <asm/io.h> 75 75 #include <linux/uaccess.h> 76 76 77 - #ifdef CONFIG_PPC_OF 77 + #ifdef CONFIG_PPC 78 78 79 79 #include <asm/pci-bridge.h> 80 80 #include "../macmodes.h" ··· 83 83 #include <asm/btext.h> 84 84 #endif 85 85 86 - #endif /* CONFIG_PPC_OF */ 86 + #endif /* CONFIG_PPC */ 87 87 88 88 #ifdef CONFIG_MTRR 89 89 #include <asm/mtrr.h> ··· 418 418 } 419 419 #endif 420 420 421 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 421 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 422 422 /* 423 423 * Read XTAL (ref clock), SCLK and MCLK from Open Firmware device 424 424 * tree. Hopefully, ATI OF driver is kind enough to fill these ··· 448 448 449 449 return 0; 450 450 } 451 - #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ 451 + #endif /* CONFIG_PPC || CONFIG_SPARC */ 452 452 453 453 /* 454 454 * Read PLL infos from chip registers ··· 653 653 rinfo->pll.ref_div = INPLL(PPLL_REF_DIV) & PPLL_REF_DIV_MASK; 654 654 655 655 656 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 656 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 657 657 /* 658 658 * Retrieve PLL infos from Open Firmware first 659 659 */ ··· 661 661 printk(KERN_INFO "radeonfb: Retrieved PLL infos from Open Firmware\n"); 662 662 goto found; 663 663 } 664 - #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ 664 + #endif /* CONFIG_PPC || CONFIG_SPARC */ 665 665 666 666 /* 667 667 * Check out if we have an X86 which gave us some PLL informations ··· 1910 1910 * I put the card's memory at 0 in card space and AGP at some random high 1911 1911 * local (0xe0000000 for now) that will be changed by XFree/DRI anyway 1912 1912 */ 1913 - #ifdef CONFIG_PPC_OF 1913 + #ifdef CONFIG_PPC 1914 1914 #undef SET_MC_FB_FROM_APERTURE 1915 1915 static void fixup_memory_mappings(struct radeonfb_info *rinfo) 1916 1916 { ··· 1984 1984 ((aper_base + aper_size - 1) & 0xffff0000) | (aper_base >> 16), 1985 1985 0xffff0000 | (agp_base >> 16)); 1986 1986 } 1987 - #endif /* CONFIG_PPC_OF */ 1987 + #endif /* CONFIG_PPC */ 1988 1988 1989 1989 1990 1990 static void radeon_identify_vram(struct radeonfb_info *rinfo) ··· 2236 2236 rinfo->family == CHIP_FAMILY_RS200) 2237 2237 rinfo->errata |= CHIP_ERRATA_PLL_DELAY; 2238 2238 2239 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 2239 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 2240 2240 /* On PPC, we obtain the OF device-node pointer to the firmware 2241 2241 * data for this chip 2242 2242 */ ··· 2245 2245 printk(KERN_WARNING "radeonfb (%s): Cannot match card to OF node !\n", 2246 2246 pci_name(rinfo->pdev)); 2247 2247 2248 - #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ 2249 - #ifdef CONFIG_PPC_OF 2248 + #endif /* CONFIG_PPC || CONFIG_SPARC */ 2249 + #ifdef CONFIG_PPC 2250 2250 /* On PPC, the firmware sets up a memory mapping that tends 2251 2251 * to cause lockups when enabling the engine. We reconfigure 2252 2252 * the card internal memory mappings properly 2253 2253 */ 2254 2254 fixup_memory_mappings(rinfo); 2255 - #endif /* CONFIG_PPC_OF */ 2255 + #endif /* CONFIG_PPC */ 2256 2256 2257 2257 /* Get VRAM size and type */ 2258 2258 radeon_identify_vram(rinfo);
+10 -10
drivers/video/fbdev/aty/radeon_monitor.c
··· 55 55 } 56 56 57 57 58 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 58 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 59 59 /* 60 60 * Try to find monitor informations & EDID data out of the Open Firmware 61 61 * device-tree. This also contains some "hacks" to work around a few machine ··· 160 160 } 161 161 return MT_NONE; 162 162 } 163 - #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ 163 + #endif /* CONFIG_PPC || CONFIG_SPARC */ 164 164 165 165 166 166 static int radeon_get_panel_info_BIOS(struct radeonfb_info *rinfo) ··· 499 499 * Old single head cards 500 500 */ 501 501 if (!rinfo->has_CRTC2) { 502 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 502 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 503 503 if (rinfo->mon1_type == MT_NONE) 504 504 rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, 505 505 &rinfo->mon1_EDID); 506 - #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ 506 + #endif /* CONFIG_PPC || CONFIG_SPARC */ 507 507 #ifdef CONFIG_FB_RADEON_I2C 508 508 if (rinfo->mon1_type == MT_NONE) 509 509 rinfo->mon1_type = ··· 548 548 /* 549 549 * Probe primary head (DVI or laptop internal panel) 550 550 */ 551 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 551 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 552 552 if (rinfo->mon1_type == MT_NONE) 553 553 rinfo->mon1_type = radeon_probe_OF_head(rinfo, 0, 554 554 &rinfo->mon1_EDID); 555 - #endif /* CONFIG_PPC_OF || CONFIG_SPARC */ 555 + #endif /* CONFIG_PPC || CONFIG_SPARC */ 556 556 #ifdef CONFIG_FB_RADEON_I2C 557 557 if (rinfo->mon1_type == MT_NONE) 558 558 rinfo->mon1_type = radeon_probe_i2c_connector(rinfo, ddc_dvi, ··· 576 576 /* 577 577 * Probe secondary head (mostly VGA, can be DVI) 578 578 */ 579 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 579 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 580 580 if (rinfo->mon2_type == MT_NONE) 581 581 rinfo->mon2_type = radeon_probe_OF_head(rinfo, 1, 582 582 &rinfo->mon2_EDID); 583 - #endif /* CONFIG_PPC_OF || defined(CONFIG_SPARC) */ 583 + #endif /* CONFIG_PPC || defined(CONFIG_SPARC) */ 584 584 #ifdef CONFIG_FB_RADEON_I2C 585 585 if (rinfo->mon2_type == MT_NONE) 586 586 rinfo->mon2_type = radeon_probe_i2c_connector(rinfo, ddc_vga, ··· 653 653 */ 654 654 static void radeon_fixup_panel_info(struct radeonfb_info *rinfo) 655 655 { 656 - #ifdef CONFIG_PPC_OF 656 + #ifdef CONFIG_PPC 657 657 /* 658 658 * LCD Flat panels should use fixed dividers, we enfore that on 659 659 * PPC only for now... ··· 676 676 (rinfo->panel_info.post_divider << 16), 677 677 ppll_div_sel); 678 678 } 679 - #endif /* CONFIG_PPC_OF */ 679 + #endif /* CONFIG_PPC */ 680 680 } 681 681 682 682
+8 -8
drivers/video/fbdev/aty/radeon_pm.c
··· 523 523 OUTPLL(pllVCLK_ECP_CNTL, tmp); 524 524 525 525 /* X doesn't do that ... hrm, we do on mobility && Macs */ 526 - #ifdef CONFIG_PPC_OF 526 + #ifdef CONFIG_PPC 527 527 if (rinfo->is_mobility) { 528 528 tmp = INPLL(pllMCLK_CNTL); 529 529 tmp &= ~(MCLK_CNTL__FORCE_MCLKA | ··· 541 541 OUTPLL(pllMCLK_MISC, tmp); 542 542 radeon_msleep(15); 543 543 } 544 - #endif /* CONFIG_PPC_OF */ 544 + #endif /* CONFIG_PPC */ 545 545 } 546 546 547 547 #ifdef CONFIG_PM ··· 1288 1288 radeon_pm_enable_dll_m10(rinfo); 1289 1289 radeon_pm_yclk_mclk_sync_m10(rinfo); 1290 1290 1291 - #ifdef CONFIG_PPC_OF 1291 + #ifdef CONFIG_PPC 1292 1292 if (rinfo->of_node != NULL) { 1293 1293 int size; 1294 1294 ··· 1298 1298 else 1299 1299 mrtable = default_mrtable; 1300 1300 } 1301 - #endif /* CONFIG_PPC_OF */ 1301 + #endif /* CONFIG_PPC */ 1302 1302 1303 1303 /* Program the SDRAM */ 1304 1304 sdram_mode_reg = mrtable[0]; ··· 1943 1943 } 1944 1944 #endif 1945 1945 1946 - #ifdef CONFIG_PPC_OF 1946 + #ifdef CONFIG_PPC 1947 1947 #ifdef CONFIG_PPC_PMAC 1948 1948 static void radeon_pm_m9p_reconfigure_mc(struct radeonfb_info *rinfo) 1949 1949 { ··· 2512 2512 } 2513 2513 #endif /* 0 */ 2514 2514 2515 - #endif /* CONFIG_PPC_OF */ 2515 + #endif /* CONFIG_PPC */ 2516 2516 2517 2517 static void radeonfb_whack_power_state(struct radeonfb_info *rinfo, pci_power_t state) 2518 2518 { ··· 2793 2793 return rc; 2794 2794 } 2795 2795 2796 - #ifdef CONFIG_PPC_OF__disabled 2796 + #ifdef CONFIG_PPC__disabled 2797 2797 static void radeonfb_early_resume(void *data) 2798 2798 { 2799 2799 struct radeonfb_info *rinfo = data; ··· 2803 2803 radeonfb_pci_resume(rinfo->pdev); 2804 2804 rinfo->no_schedule = 0; 2805 2805 } 2806 - #endif /* CONFIG_PPC_OF */ 2806 + #endif /* CONFIG_PPC */ 2807 2807 2808 2808 #endif /* CONFIG_PM */ 2809 2809
+2 -2
drivers/video/fbdev/aty/radeonfb.h
··· 20 20 21 21 #include <asm/io.h> 22 22 23 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 23 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 24 24 #include <asm/prom.h> 25 25 #endif 26 26 ··· 301 301 unsigned long fb_local_base; 302 302 303 303 struct pci_dev *pdev; 304 - #if defined(CONFIG_PPC_OF) || defined(CONFIG_SPARC) 304 + #if defined(CONFIG_PPC) || defined(CONFIG_SPARC) 305 305 struct device_node *of_node; 306 306 #endif 307 307