diff options
author | Greg Ungerer <gerg@uclinux.org> | 2009-08-12 02:14:43 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2009-09-15 19:43:56 -0400 |
commit | 14c16db3906ba9453e9c786323f872e11fd0f48d (patch) | |
tree | b534093122b665c423bab26d4caae0598c467164 /arch/m68knommu | |
parent | d89395babbe811811e70c6ee3465e3b60c0cdc11 (diff) |
m68knommu: set multi-function pins for ethernet when enabled
The ethernet pins on the 532x ColdFire CPU family are multi-function
pins. We need to enable them as ethernet pins when using the FEC
ethernet driver.
Bug report, and older patch, from timothee@manaud.net.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68knommu')
-rw-r--r-- | arch/m68knommu/platform/523x/config.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c index 00f08d2e43b0..6ba84f2aa397 100644 --- a/arch/m68knommu/platform/523x/config.c +++ b/arch/m68knommu/platform/523x/config.c | |||
@@ -82,6 +82,20 @@ static struct platform_device *m523x_devices[] __initdata = { | |||
82 | 82 | ||
83 | /***************************************************************************/ | 83 | /***************************************************************************/ |
84 | 84 | ||
85 | static void __init m523x_fec_init(void) | ||
86 | { | ||
87 | u16 par; | ||
88 | u8 v; | ||
89 | |||
90 | /* Set multi-function pins to ethernet use */ | ||
91 | par = readw(MCF_IPSBAR + 0x100082); | ||
92 | writew(par | 0xf00, MCF_IPSBAR + 0x100082); | ||
93 | v = readb(MCF_IPSBAR + 0x100078); | ||
94 | writeb(v | 0xc0, MCF_IPSBAR + 0x100078); | ||
95 | } | ||
96 | |||
97 | /***************************************************************************/ | ||
98 | |||
85 | static void m523x_cpu_reset(void) | 99 | static void m523x_cpu_reset(void) |
86 | { | 100 | { |
87 | local_irq_disable(); | 101 | local_irq_disable(); |
@@ -99,6 +113,7 @@ void __init config_BSP(char *commandp, int size) | |||
99 | 113 | ||
100 | static int __init init_BSP(void) | 114 | static int __init init_BSP(void) |
101 | { | 115 | { |
116 | m523x_fec_init(); | ||
102 | platform_add_devices(m523x_devices, ARRAY_SIZE(m523x_devices)); | 117 | platform_add_devices(m523x_devices, ARRAY_SIZE(m523x_devices)); |
103 | return 0; | 118 | return 0; |
104 | } | 119 | } |