aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-02-28 20:05:06 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 04:55:03 -0400
commit9b1caafe09ccec8e0103e9375b711e3a0c838260 (patch)
tree2a3459c9ae489775ec3a51e31ec212eb3d99edc4
parenta02079cdb74dde27391d019abca4a37988504b4e (diff)
[IGAFB]: Use pci_device_to_OF_node() on sparc.
Also __sparc__ --> CONFIG_SPARC Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/video/igafb.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index 90592fb59156..eb1a4812ad1d 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -44,8 +44,8 @@
44 44
45#include <asm/io.h> 45#include <asm/io.h>
46 46
47#ifdef __sparc__ 47#ifdef CONFIG_SPARC
48#include <asm/pbm.h> 48#include <asm/prom.h>
49#include <asm/pcic.h> 49#include <asm/pcic.h>
50#endif 50#endif
51 51
@@ -96,7 +96,7 @@ struct fb_var_screeninfo default_var = {
96 .vmode = FB_VMODE_NONINTERLACED 96 .vmode = FB_VMODE_NONINTERLACED
97}; 97};
98 98
99#ifdef __sparc__ 99#ifdef CONFIG_SPARC
100struct fb_var_screeninfo default_var_1024x768 __initdata = { 100struct fb_var_screeninfo default_var_1024x768 __initdata = {
101 /* 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock) */ 101 /* 1024x768, 75 Hz, Non-Interlaced (78.75 MHz dotclock) */
102 .xres = 1024, 102 .xres = 1024,
@@ -188,7 +188,7 @@ static inline void iga_outb(struct iga_par *par, unsigned char val,
188 pci_outb(par, val, reg+1); 188 pci_outb(par, val, reg+1);
189} 189}
190 190
191#endif /* __sparc__ */ 191#endif /* CONFIG_SPARC */
192 192
193/* 193/*
194 * Very important functionality for the JavaEngine1 computer: 194 * Very important functionality for the JavaEngine1 computer:
@@ -217,7 +217,7 @@ static void iga_blank_border(struct iga_par *par)
217 iga_outb(par, 0, IGA_EXT_CNTRL, IGA_IDX_OVERSCAN_COLOR + i); 217 iga_outb(par, 0, IGA_EXT_CNTRL, IGA_IDX_OVERSCAN_COLOR + i);
218} 218}
219 219
220#ifdef __sparc__ 220#ifdef CONFIG_SPARC
221static int igafb_mmap(struct fb_info *info, 221static int igafb_mmap(struct fb_info *info,
222 struct vm_area_struct *vma) 222 struct vm_area_struct *vma)
223{ 223{
@@ -271,7 +271,7 @@ static int igafb_mmap(struct fb_info *info,
271 vma->vm_flags |= VM_IO; 271 vma->vm_flags |= VM_IO;
272 return 0; 272 return 0;
273} 273}
274#endif /* __sparc__ */ 274#endif /* CONFIG_SPARC */
275 275
276static int igafb_setcolreg(unsigned regno, unsigned red, unsigned green, 276static int igafb_setcolreg(unsigned regno, unsigned red, unsigned green,
277 unsigned blue, unsigned transp, 277 unsigned blue, unsigned transp,
@@ -323,7 +323,7 @@ static struct fb_ops igafb_ops = {
323 .fb_fillrect = cfb_fillrect, 323 .fb_fillrect = cfb_fillrect,
324 .fb_copyarea = cfb_copyarea, 324 .fb_copyarea = cfb_copyarea,
325 .fb_imageblit = cfb_imageblit, 325 .fb_imageblit = cfb_imageblit,
326#ifdef __sparc__ 326#ifdef CONFIG_SPARC
327 .fb_mmap = igafb_mmap, 327 .fb_mmap = igafb_mmap,
328#endif 328#endif
329}; 329};
@@ -424,7 +424,7 @@ int __init igafb_init(void)
424 424
425 par->frame_buffer_phys = addr & PCI_BASE_ADDRESS_MEM_MASK; 425 par->frame_buffer_phys = addr & PCI_BASE_ADDRESS_MEM_MASK;
426 426
427#ifdef __sparc__ 427#ifdef CONFIG_SPARC
428 /* 428 /*
429 * The following is sparc specific and this is why: 429 * The following is sparc specific and this is why:
430 * 430 *
@@ -477,8 +477,8 @@ int __init igafb_init(void)
477 * Set default vmode and cmode from PROM properties. 477 * Set default vmode and cmode from PROM properties.
478 */ 478 */
479 { 479 {
480 struct pcidev_cookie *cookie = pdev->sysdata; 480 struct device_node *dp = pci_device_to_OF_node(pdev);
481 int node = cookie->prom_node; 481 int node = dp->node;
482 int width = prom_getintdefault(node, "width", 1024); 482 int width = prom_getintdefault(node, "width", 1024);
483 int height = prom_getintdefault(node, "height", 768); 483 int height = prom_getintdefault(node, "height", 768);
484 int depth = prom_getintdefault(node, "depth", 8); 484 int depth = prom_getintdefault(node, "depth", 8);
@@ -534,7 +534,7 @@ int __init igafb_init(void)
534 kfree(info); 534 kfree(info);
535 } 535 }
536 536
537#ifdef __sparc__ 537#ifdef CONFIG_SPARC
538 /* 538 /*
539 * Add /dev/fb mmap values. 539 * Add /dev/fb mmap values.
540 */ 540 */
@@ -552,7 +552,7 @@ int __init igafb_init(void)
552 par->mmap_map[1].size = PAGE_SIZE * 2; /* X wants 2 pages */ 552 par->mmap_map[1].size = PAGE_SIZE * 2; /* X wants 2 pages */
553 par->mmap_map[1].prot_mask = SRMMU_CACHE; 553 par->mmap_map[1].prot_mask = SRMMU_CACHE;
554 par->mmap_map[1].prot_flag = SRMMU_WRITE; 554 par->mmap_map[1].prot_flag = SRMMU_WRITE;
555#endif /* __sparc__ */ 555#endif /* CONFIG_SPARC */
556 556
557 return 0; 557 return 0;
558} 558}