summaryrefslogtreecommitdiff
path: root/cpu/mpc512x/fec.h
diff options
context:
space:
mode:
authorGrzegorz Bernacki <gjb@semihalf.com>2007-09-10 17:39:08 +0200
committerRafal Jaworowski <raj@semihalf.com>2007-09-10 17:39:08 +0200
commit7a888d6b3c32a126dbb504ef146bb4c26574ca7b (patch)
tree5232ab1b43f86b881151712cfd8d2d484719b3c6 /cpu/mpc512x/fec.h
parente251e00d0db4b36d1d2b7e38fec43a7296b529a2 (diff)
downloadu-boot-imx-7a888d6b3c32a126dbb504ef146bb4c26574ca7b.zip
u-boot-imx-7a888d6b3c32a126dbb504ef146bb4c26574ca7b.tar.gz
u-boot-imx-7a888d6b3c32a126dbb504ef146bb4c26574ca7b.tar.bz2
[MPC512x] Streamline frame handling in the FEC driver
- convert frame size settings to be derived from a single base - set frame size to the recommended default value Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
Diffstat (limited to 'cpu/mpc512x/fec.h')
-rw-r--r--cpu/mpc512x/fec.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpu/mpc512x/fec.h b/cpu/mpc512x/fec.h
index d2d877a..9c38502 100644
--- a/cpu/mpc512x/fec.h
+++ b/cpu/mpc512x/fec.h
@@ -164,10 +164,13 @@ typedef enum {
#define FEC_RBD_NUM 32 /* The user can adjust this value */
/* packet size limit */
-#define FEC_MAX_PKT_SIZE 1536
+#define FEC_MAX_FRAME_LEN 1522 /* recommended default value */
+
+/* Buffer size must be evenly divisible by 16 */
+#define FEC_BUFFER_SIZE ((FEC_MAX_FRAME_LEN + 0x10) & (~0xf))
typedef struct {
- uint8 frame[FEC_MAX_PKT_SIZE];
+ uint8 frame[FEC_BUFFER_SIZE];
} mpc512x_frame;
typedef struct {