Commit d838d91e authored by Jake Moilanen's avatar Jake Moilanen Committed by Linus Torvalds

[PATCH] ppc64: 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: default avatarJake Moilanen <moilanen@austin.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e7725deb
...@@ -29,6 +29,10 @@ ...@@ -29,6 +29,10 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#ifdef CONFIG_PPC64
#include <asm/pci-bridge.h>
#endif
#ifdef CONFIG_PPC32 #ifdef CONFIG_PPC32
#include <asm/bootx.h> #include <asm/bootx.h>
#endif #endif
...@@ -322,7 +326,8 @@ static void __init offb_init_nodriver(struct device_node *dp) ...@@ -322,7 +326,8 @@ static void __init offb_init_nodriver(struct device_node *dp)
int *pp, i; int *pp, i;
unsigned int len; unsigned int len;
int width = 640, height = 480, depth = 8, pitch; 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 if ((pp = (int *) get_property(dp, "depth", &len)) != NULL
&& len == sizeof(int)) && len == sizeof(int))
...@@ -357,6 +362,10 @@ static void __init offb_init_nodriver(struct device_node *dp) ...@@ -357,6 +362,10 @@ static void __init offb_init_nodriver(struct device_node *dp)
address = (u_long) dp->addrs[i].address; address = (u_long) dp->addrs[i].address;
#ifdef CONFIG_PPC64
address += dp->phb->pci_mem_offset;
#endif
/* kludge for valkyrie */ /* kludge for valkyrie */
if (strcmp(dp->name, "valkyrie") == 0) if (strcmp(dp->name, "valkyrie") == 0)
address += 0x1000; address += 0x1000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment