diff options
author | Juergen Beisert <jbe@pengutronix.de> | 2010-12-13 11:53:35 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-14 15:15:07 +0100 |
commit | cf463d7430d570e97370bcf799aebdc30d289a88 (patch) | |
tree | 40b6a906a0a7e590f5bdd80ae2ea369721d38ad0 /drivers/net/fec_imx.h | |
parent | 07965c6fa14d8e7e3dedd1bdd07cd789c50b9d97 (diff) | |
download | barebox-cf463d7430d570e97370bcf799aebdc30d289a88.tar.gz barebox-cf463d7430d570e97370bcf799aebdc30d289a88.tar.xz |
MX28: add FEC support
The i.MX28 comes with an extended ethernet controller (ENET/FEC) which
is backwards compatible to the FEC known from other i.MX CPUs. Add a few
adaptions to the existing driver to make it work with the MX28 FEC.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/fec_imx.h')
-rw-r--r-- | drivers/net/fec_imx.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/fec_imx.h b/drivers/net/fec_imx.h index f7fbdc9990..e07071a883 100644 --- a/drivers/net/fec_imx.h +++ b/drivers/net/fec_imx.h @@ -63,8 +63,19 @@ #define FEC_MIIGSK_ENR_READY (1 << 2) #define FEC_MIIGSK_ENR_EN (1 << 1) - -#define FEC_IEVENT_HBERR 0x80000000 +#define FEC_R_CNTRL_GRS (1 << 31) +#define FEC_R_CNTRL_NO_LGTH_CHECK (1 << 30) +#ifdef CONFIG_ARCH_IMX28 +# define FEC_R_CNTRL_MAX_FL(x) (((x) & 0x3fff) << 16) +#else +# define FEC_R_CNTRL_MAX_FL(x) (((x) & 0x7ff) << 16) +#endif +#define FEC_R_CNTRL_RMII_10T (1 << 9) /* i.MX28 specific */ +#define FEC_R_CNTRL_RMII_MODE (1 << 8) /* i.MX28 specific */ +#define FEC_R_CNTRL_FCE (1 << 5) +#define FEC_R_CNTRL_MII_MODE (1 << 2) + +#define FEC_IEVENT_HBERR 0x80000000 /* Note: Not on i.MX28 */ #define FEC_IEVENT_BABR 0x40000000 #define FEC_IEVENT_BABT 0x20000000 #define FEC_IEVENT_GRA 0x10000000 @@ -74,7 +85,7 @@ #define FEC_IEVENT_COL_RETRY_LIM 0x00100000 #define FEC_IEVENT_XFIFO_UN 0x00080000 -#define FEC_IMASK_HBERR 0x80000000 +#define FEC_IMASK_HBERR 0x80000000 /* Note: Not on i.MX28 */ #define FEC_IMASK_BABR 0x40000000 #define FEC_IMASK_BABT 0x20000000 #define FEC_IMASK_GRA 0x10000000 @@ -120,6 +131,8 @@ * @brief Receive & Transmit Buffer Descriptor definitions * * Note: The first BD must be aligned (see DB_ALIGNMENT) + * + * BTW: Don't trust the i.MX27 and i.MX28 data sheet */ struct buffer_descriptor { uint16_t data_length; /**< payload's length in bytes */ |