diff options
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 @@ | |||
38 | #include <linux/bitops.h> | 38 | #include <linux/bitops.h> |
39 | #include <linux/io.h> | 39 | #include <linux/io.h> |
40 | #include <linux/irq.h> | 40 | #include <linux/irq.h> |
41 | #include <linux/clk.h> | ||
41 | 42 | ||
42 | #include <asm/cacheflush.h> | 43 | #include <asm/cacheflush.h> |
44 | |||
45 | #ifndef CONFIG_ARCH_MXC | ||
43 | #include <asm/coldfire.h> | 46 | #include <asm/coldfire.h> |
44 | #include <asm/mcfsim.h> | 47 | #include <asm/mcfsim.h> |
48 | #endif | ||
45 | 49 | ||
46 | #include "fec.h" | 50 | #include "fec.h" |
47 | 51 | ||
@@ -51,6 +55,13 @@ | |||
51 | #define FEC_MAX_PORTS 1 | 55 | #define FEC_MAX_PORTS 1 |
52 | #endif | 56 | #endif |
53 | 57 | ||
58 | #ifdef CONFIG_ARCH_MXC | ||
59 | #include <mach/hardware.h> | ||
60 | #define FEC_ALIGNMENT 0xf | ||
61 | #else | ||
62 | #define FEC_ALIGNMENT 0x3 | ||
63 | #endif | ||
64 | |||
54 | #if defined(CONFIG_M5272) | 65 | #if defined(CONFIG_M5272) |
55 | #define HAVE_mii_link_interrupt | 66 | #define HAVE_mii_link_interrupt |
56 | #endif | 67 | #endif |
@@ -158,7 +169,7 @@ typedef struct { | |||
158 | * account when setting it. | 169 | * account when setting it. |
159 | */ | 170 | */ |
160 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ | 171 | #if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ |
161 | defined(CONFIG_M520x) || defined(CONFIG_M532x) | 172 | defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARCH_MXC) |
162 | #define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16) | 173 | #define OPT_FRAME_SIZE (PKT_MAXBUF_SIZE << 16) |
163 | #else | 174 | #else |
164 | #define OPT_FRAME_SIZE 0 | 175 | #define OPT_FRAME_SIZE 0 |
@@ -339,7 +350,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
339 | * 4-byte boundaries. Use bounce buffers to copy data | 350 | * 4-byte boundaries. Use bounce buffers to copy data |
340 | * and get it aligned. Ugh. | 351 | * and get it aligned. Ugh. |
341 | */ | 352 | */ |
342 | if (bdp->cbd_bufaddr & 0x3) { | 353 | if (bdp->cbd_bufaddr & FEC_ALIGNMENT) { |
343 | unsigned int index; | 354 | unsigned int index; |
344 | index = bdp - fep->tx_bd_base; | 355 | index = bdp - fep->tx_bd_base; |
345 | memcpy(fep->tx_bounce[index], (void *)skb->data, skb->len); | 356 | memcpy(fep->tx_bounce[index], (void *)skb->data, skb->len); |