aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2012-09-14 02:36:08 -0400
committerGreg Ungerer <gerg@uclinux.org>2012-09-27 09:33:54 -0400
commit4fb62ededfc5021e7fa25cbc20f92003e148af27 (patch)
treee38eb57e8c06ca02371cf29127adfe882c86b2c9
parent041a89a41993e6023f110bf0cbbda847173e795c (diff)
m68knommu: fix wrong register offsets used for ColdFire 5272 multi-function pins
The registers used to configure and set the multifunction pins on the 5272 ColdFire are defined as absolute addresses. So the use of them does not need to be offset relative to the peripheral region address. Fix two cases of incorrect usage of these addresses. Both affect UART initialization, one in the common UART pin setup code, the other in the NETtel board specific UART signal handling. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
-rw-r--r--arch/m68k/include/asm/nettel.h9
-rw-r--r--arch/m68k/platform/coldfire/m5272.c8
2 files changed, 7 insertions, 10 deletions
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 @@
21#ifdef CONFIG_COLDFIRE 21#ifdef CONFIG_COLDFIRE
22#include <asm/coldfire.h> 22#include <asm/coldfire.h>
23#include <asm/mcfsim.h> 23#include <asm/mcfsim.h>
24#include <asm/io.h>
24#endif 25#endif
25 26
26/*---------------------------------------------------------------------------*/ 27/*---------------------------------------------------------------------------*/
@@ -86,16 +87,12 @@ static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
86 */ 87 */
87static __inline__ unsigned int mcf_getppdata(void) 88static __inline__ unsigned int mcf_getppdata(void)
88{ 89{
89 volatile unsigned short *pp; 90 return readw(MCFSIM_PBDAT);
90 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
91 return((unsigned int) *pp);
92} 91}
93 92
94static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits) 93static __inline__ void mcf_setppdata(unsigned int mask, unsigned int bits)
95{ 94{
96 volatile unsigned short *pp; 95 write((readw(MCFSIM_PBDAT) & ~mask) | bits, MCFSIM_PBDAT);
97 pp = (volatile unsigned short *) (MCF_MBAR + MCFSIM_PBDAT);
98 *pp = (*pp & ~mask) | bits;
99} 96}
100#endif 97#endif
101 98
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)
35 u32 v; 35 u32 v;
36 36
37 /* Enable the output lines for the serial ports */ 37 /* Enable the output lines for the serial ports */
38 v = readl(MCF_MBAR + MCFSIM_PBCNT); 38 v = readl(MCFSIM_PBCNT);
39 v = (v & ~0x000000ff) | 0x00000055; 39 v = (v & ~0x000000ff) | 0x00000055;
40 writel(v, MCF_MBAR + MCFSIM_PBCNT); 40 writel(v, MCFSIM_PBCNT);
41 41
42 v = readl(MCF_MBAR + MCFSIM_PDCNT); 42 v = readl(MCFSIM_PDCNT);
43 v = (v & ~0x000003fc) | 0x000002a8; 43 v = (v & ~0x000003fc) | 0x000002a8;
44 writel(v, MCF_MBAR + MCFSIM_PDCNT); 44 writel(v, MCFSIM_PDCNT);
45} 45}
46 46
47/***************************************************************************/ 47/***************************************************************************/