summaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/523x/config.c
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2009-08-12 16:14:43 +1000
committerGreg Ungerer <gerg@uclinux.org>2009-09-16 09:43:56 +1000
commit14c16db3906ba9453e9c786323f872e11fd0f48d (patch)
treeb534093122b665c423bab26d4caae0598c467164 /arch/m68knommu/platform/523x/config.c
parentd89395babbe811811e70c6ee3465e3b60c0cdc11 (diff)
downloadop-kernel-dev-14c16db3906ba9453e9c786323f872e11fd0f48d.zip
op-kernel-dev-14c16db3906ba9453e9c786323f872e11fd0f48d.tar.gz
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/platform/523x/config.c')
-rw-r--r--arch/m68knommu/platform/523x/config.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 00f08d2..6ba84f2 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 = {
/***************************************************************************/
+static void __init m523x_fec_init(void)
+{
+ u16 par;
+ u8 v;
+
+ /* Set multi-function pins to ethernet use */
+ par = readw(MCF_IPSBAR + 0x100082);
+ writew(par | 0xf00, MCF_IPSBAR + 0x100082);
+ v = readb(MCF_IPSBAR + 0x100078);
+ writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
+}
+
+/***************************************************************************/
+
static void m523x_cpu_reset(void)
{
local_irq_disable();
@@ -99,6 +113,7 @@ void __init config_BSP(char *commandp, int size)
static int __init init_BSP(void)
{
+ m523x_fec_init();
platform_add_devices(m523x_devices, ARRAY_SIZE(m523x_devices));
return 0;
}
OpenPOWER on IntegriCloud