[PATCH] atyfb ppc asm removal... (fwd)

Geert Uytterhoeven geert at linux-m68k.org
Wed Jul 5 07:08:22 EST 2000


---------- Forwarded message ----------
Date: Sun, 2 Jul 2000 19:09:53 -0700 (PDT)
From: Ani Joshi <ajoshi at shell.unixbox.com>
To: geert at linux-m68k.org
Subject: [PATCH] atyfb ppc asm removal...



Hi Geert,

The attatched patch removes the ppc load/store asm from the inlines.  I
guess these were used back before we had a nice asm/io.h.  I don't see why
we can't just use readl/writel.  Patch is against 2.4.0-test3-2's atyfb.


ani
-------------- next part --------------
--- atyfb.c.orig	Sun Jul  2 21:24:31 2000
+++ atyfb.c	Sun Jul  2 21:25:25 2000
@@ -570,14 +570,7 @@
 static inline u32 aty_ld_le32(unsigned int regindex,
 			      const struct fb_info_aty *info)
 {
-#if defined(__powerpc__)
-    unsigned long temp;
-    u32 val;
-
-    temp = info->ati_regbase;
-    asm volatile("lwbrx %0,%1,%2;eieio" : "=r"(val) : "b" (regindex), "r" (temp));
-    return val;
-#elif defined(__mc68000__)
+#if defined(__mc68000__)
     return le32_to_cpu(*((volatile u32 *)(info->ati_regbase+regindex)));
 #else
     return readl (info->ati_regbase + regindex);
@@ -587,13 +580,7 @@
 static inline void aty_st_le32(unsigned int regindex, u32 val,
 			       const struct fb_info_aty *info)
 {
-#if defined(__powerpc__)
-    unsigned long temp;
-
-    temp = info->ati_regbase;
-    asm volatile("stwbrx %0,%1,%2;eieio" : : "r" (val), "b" (regindex), "r" (temp) :
-	"memory");
-#elif defined(__mc68000__)
+#if defined(__mc68000__)
     *((volatile u32 *)(info->ati_regbase+regindex)) = cpu_to_le32(val);
 #else
     writel (val, info->ati_regbase + regindex);


More information about the Linuxppc-dev mailing list