diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-01-28 23:03:10 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-01 00:58:26 -0800 |
commit | 196719ecec0c526de273dcb902f0be956a193232 (patch) | |
tree | fc134667f844daf2a4015621d0f881e887e99d54 /drivers/net/fec.c | |
parent | ccdc4f198193eb4956b8dbc00745270525c4cd6e (diff) |
fec: Add support for Freescale MX27
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fec.c')
-rw-r--r-- | drivers/net/fec.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index a17dc6af30c3..7631062cd44d 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -38,10 +38,14 @@ #include <linux/bitops.h> #include <linux/io.h> #include <linux/irq.h> +#include <linux/clk.h> #include <asm/cacheflush.h> + +#ifndef CONFIG_ARCH_MXC #include <asm/coldfire.h> #include <asm/mcfsim.h> +#endif #include "fec.h" @@ -51,6 +55,13 @@ #define FEC_MAX_PORTS 1 #endif +#ifdef CONFIG_ARCH_MXC +#include <mach/hardware.h> +#define FEC_ALIGNMENT 0xf +#else +#define FEC_ALIGNMENT 0x3 +#endif + #if defined(CONFIG_M5272) #define HAVE_mii_link_interrupt #endif @@ -158,7 +169,7 @@ typedef struct { * account when setting it. */ #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ - defined(CONFIG_M520x) || defined(CONFIG_M532x) + defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARCH_MXC) #define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16) #else #define OPT_FRAME_SIZE 0 @@ -339,7 +350,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) * 4-byte boundaries. Use bounce buffers to copy data * and get it aligned. Ugh. */ - if (bdp->cbd_bufaddr & 0x3) { + if (bdp->cbd_bufaddr & FEC_ALIGNMENT) { unsigned int index; index = bdp - fep->tx_bd_base; memcpy(fep->tx_bounce[index], (void *)skb->data, skb->len); |