Merge tag 'for-3.7-rc1' of git://gitorious.org/linux-pwm/linux-pwm
[firefly-linux-kernel-4.4.55.git] / arch / m68k / include / asm / nettel.h
index 4dec2d9fb99442e3752a21f6da4f9b25255f9024..2a7a7667d8074f02323bc113100557b559763289 100644 (file)
@@ -21,6 +21,7 @@
 #ifdef CONFIG_COLDFIRE
 #include <asm/coldfire.h>
 #include <asm/mcfsim.h>
+#include <asm/io.h>
 #endif
 
 /*---------------------------------------------------------------------------*/
@@ -86,16 +87,12 @@ static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
  */
 static __inline__ unsigned int mcf_getppdata(void)
 {
-       volatile unsigned short *pp;
-       pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
-       return((unsigned int) *pp);
+       return readw(MCFSIM_PBDAT);
 }
 
 static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
 {
-       volatile unsigned short *pp;
-       pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
-       *pp = (*pp & ~mask) | bits;
+       write((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
 }
 #endif