From 665c8385c7865dcc4f92b9c212d6e2b35d7fa9f0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 5 Nov 2006 19:46:53 +1100 Subject: add powerpc mmio swapper to NV_READ/WRITE macros --- shared-core/nouveau_drv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h index 94b46efd..4b35e6d1 100644 --- a/shared-core/nouveau_drv.h +++ b/shared-core/nouveau_drv.h @@ -171,8 +171,13 @@ extern void nouveau_irq_preinstall(drm_device_t*); extern void nouveau_irq_postinstall(drm_device_t*); extern void nouveau_irq_uninstall(drm_device_t*); +#if defined(__powerpc__) +#define NV_READ(reg) in_be32((void __iomem *)(dev_priv->mmio)->handle + (reg) ) +#define NV_WRITE(reg,val) out_be32((void __iomem *)(dev_priv->mmio)->handle + (reg) , (val) ) +#else #define NV_READ(reg) DRM_READ32( dev_priv->mmio, (reg) ) #define NV_WRITE(reg,val) DRM_WRITE32( dev_priv->mmio, (reg), (val) ) +#endif #endif /* __NOUVEAU_DRV_H__ */ -- cgit v1.2.3