aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2012-09-17 22:14:18 -0400
committerGreg Ungerer <gerg@uclinux.org>2012-09-27 09:34:01 -0400
commit98d9696b38df7d477be34fccd4abb2aae02987c8 (patch)
tree650785070202b1c0079a608a04ddaf7d6d527a29 /arch/m68k
parentf2f41c68eabfb32574f9088135480618206dd432 (diff)
m68knommu: fix multi-function pin setup for FEC module on ColdFire 523x
The multi-function pin setup code for the FEC ethernet module is using just plain wrong. Looks like it was cut-and-pasted from other init code. It has hard coded register addresses that are incorrect for the 523x, and it is manipulating bits that don't make sense. Add proper register definitions for the Pin Assignment registers of the 532x, and then use them to fix the setup code for the FEC hardware module. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/m523xsim.h8
-rw-r--r--arch/m68k/platform/coldfire/m523x.c8
2 files changed, 9 insertions, 7 deletions
diff --git a/arch/m68k/include/asm/m523xsim.h b/arch/m68k/include/asm/m523xsim.h
index 91d3abc3f2a5..d1d4ec74d286 100644
--- a/arch/m68k/include/asm/m523xsim.h
+++ b/arch/m68k/include/asm/m523xsim.h
@@ -189,8 +189,16 @@
189/* 189/*
190 * Pin Assignment 190 * Pin Assignment
191*/ 191*/
192#define MCFGPIO_PAR_AD (MCF_IPSBAR + 0x100040)
193#define MCFGPIO_PAR_BUSCTL (MCF_IPSBAR + 0x100042)
194#define MCFGPIO_PAR_BS (MCF_IPSBAR + 0x100044)
195#define MCFGPIO_PAR_CS (MCF_IPSBAR + 0x100045)
196#define MCFGPIO_PAR_SDRAM (MCF_IPSBAR + 0x100046)
197#define MCFGPIO_PAR_FECI2C (MCF_IPSBAR + 0x100047)
198#define MCFGPIO_PAR_UART (MCF_IPSBAR + 0x100048)
192#define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10004A) 199#define MCFGPIO_PAR_QSPI (MCF_IPSBAR + 0x10004A)
193#define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10004C) 200#define MCFGPIO_PAR_TIMER (MCF_IPSBAR + 0x10004C)
201#define MCFGPIO_PAR_ETPU (MCF_IPSBAR + 0x10004E)
194 202
195/* 203/*
196 * DMA unit base addresses. 204 * DMA unit base addresses.
diff --git a/arch/m68k/platform/coldfire/m523x.c b/arch/m68k/platform/coldfire/m523x.c
index d47dfd8f50a2..ff37fe9553ea 100644
--- a/arch/m68k/platform/coldfire/m523x.c
+++ b/arch/m68k/platform/coldfire/m523x.c
@@ -42,14 +42,8 @@ static void __init m523x_qspi_init(void)
42 42
43static void __init m523x_fec_init(void) 43static void __init m523x_fec_init(void)
44{ 44{
45 u16 par;
46 u8 v;
47
48 /* Set multi-function pins to ethernet use */ 45 /* Set multi-function pins to ethernet use */
49 par = readw(MCF_IPSBAR + 0x100082); 46 writeb(readb(MCFGPIO_PAR_FECI2C) | 0xf0, MCFGPIO_PAR_FECI2C);
50 writew(par | 0xf00, MCF_IPSBAR + 0x100082);
51 v = readb(MCF_IPSBAR + 0x100078);
52 writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
53} 47}
54 48
55/***************************************************************************/ 49/***************************************************************************/