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