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 diff --git a/arch/m68k/platform/coldfire/m5272.c b/arch/m68k/platform/coldfire/m5272.c index eae59f67bc1c..45b246d052ef 100644 --- a/arch/m68k/platform/coldfire/m5272.c +++ b/arch/m68k/platform/coldfire/m5272.c @@ -35,13 +35,13 @@ static void __init m5272_uarts_init(void) u32 v; /* Enable the output lines for the serial ports */ - v = readl(MCF_MBAR + MCFSIM_PBCNT); + v = readl(MCFSIM_PBCNT); v = (v & ~0x000000ff) | 0x00000055; - writel(v, MCF_MBAR + MCFSIM_PBCNT); + writel(v, MCFSIM_PBCNT); - v = readl(MCF_MBAR + MCFSIM_PDCNT); + v = readl(MCFSIM_PDCNT); v = (v & ~0x000003fc) | 0x000002a8; - writel(v, MCF_MBAR + MCFSIM_PDCNT); + writel(v, MCFSIM_PDCNT); } /***************************************************************************/