m68knommu: fix IO write size in nettel pin set
authorGreg Ungerer <gerg@linux-m68k.org>
Tue, 23 Aug 2016 11:46:06 +0000 (21:46 +1000)
committerGreg Ungerer <gerg@linux-m68k.org>
Mon, 26 Sep 2016 02:02:58 +0000 (12:02 +1000)
The pin write code that supports the UART signals is not using he correct
word write IO access method. It correctly reads the correct 16 bit
registrer, it should also write the new value back with a 16 bit write.
Fix it to use writew().

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/include/asm/nettel.h

index 2a7a7667d8074f02323bc113100557b559763289..926375d538ecebc4a0d898c1a02ae5739f598ba0 100644 (file)
@@ -92,7 +92,7 @@ static __inline__ unsigned int mcf_getppdata(void)
 
 static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
 {
-       write((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
+       writew((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
 }
 #endif