lkml.org 
[lkml]   [2005]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] offb remapped address
The offb code did not take into account a remapped pci address.  Adding
in the pci_mem_offset fixed a DSI in offb.

Signed-off-by: Jake Moilanen <moilanen@austin.ibm.com>

---


diff -puN drivers/video/offb.c~offb_dsi drivers/video/offb.c
--- linux-2.6.11/drivers/video/offb.c~offb_dsi Wed Mar 2 15:03:49 2005
+++ linux-2.6.11-moilanen/drivers/video/offb.c Wed Mar 2 15:40:41 2005
@@ -29,6 +29,10 @@
#include <asm/io.h>
#include <asm/prom.h>

+#ifdef CONFIG_PPC64
+#include <asm/pci-bridge.h>
+#endif
+
#ifdef CONFIG_PPC32
#include <asm/bootx.h>
#endif
@@ -322,7 +326,8 @@ static void __init offb_init_nodriver(st
int *pp, i;
unsigned int len;
int width = 640, height = 480, depth = 8, pitch;
- unsigned *up, address;
+ unsigned *up;
+ unsigned long address;

if ((pp = (int *) get_property(dp, "depth", &len)) != NULL
&& len == sizeof(int))
@@ -357,6 +362,10 @@ static void __init offb_init_nodriver(st

address = (u_long) dp->addrs[i].address;

+#ifdef CONFIG_PPC64
+ address += dp->phb->pci_mem_offset;
+#endif
+
/* kludge for valkyrie */
if (strcmp(dp->name, "valkyrie") == 0)
address += 0x1000;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.055 / U:0.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site