X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=arch%2Fm68k%2Finclude%2Fasm%2Fnettel.h;h=2a7a7667d8074f02323bc113100557b559763289;hb=2474542f64432398f503373f53bdf620491bcfa8;hp=4dec2d9fb99442e3752a21f6da4f9b25255f9024;hpb=67cb40560940ba36de22d66f0d5d8efe235c8bb1;p=firefly-linux-kernel-4.4.55.git diff --git a/arch/m68k/include/asm/nettel.h b/arch/m68k/include/asm/nettel.h index 4dec2d9fb994..2a7a7667d807 100644 --- a/arch/m68k/include/asm/nettel.h +++ b/arch/m68k/include/asm/nettel.h @@ -21,6 +21,7 @@ #ifdef CONFIG_COLDFIRE #include #include +#include #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