[rtems commit] bsp/lpc24xx: Ethernet support for LPC17XX

Sebastian Huber sebh at rtems.org
Fri Jun 15 13:58:31 UTC 2012


Module:    rtems
Branch:    master
Commit:    e7395c7753e260f86d45d7442786abd2e6ecb7b5
Changeset: http://git.rtems.org/rtems/commit/?id=e7395c7753e260f86d45d7442786abd2e6ecb7b5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jun 12 09:55:52 2012 +0200

bsp/lpc24xx: Ethernet support for LPC17XX

---

 .../arm/lpc24xx/include/lpc-ethernet-config.h      |   35 ++++++++++++++-----
 1 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h b/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
index f12af60..8c787b7 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
+++ b/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
@@ -7,7 +7,7 @@
  */
 
 /*
- * Copyright (c) 2009-2011 embedded brains GmbH.  All rights reserved.
+ * Copyright (c) 2009-2012 embedded brains GmbH.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Obere Lagerstr. 30
@@ -27,6 +27,8 @@
 #include <bsp/io.h>
 #include <bsp/lpc24xx.h>
 
+#include <limits.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -35,13 +37,31 @@ extern "C" {
 
 #define LPC_ETH_CONFIG_REG_BASE MAC_BASE_ADDR
 
-#define LPC_ETH_CONFIG_RX_UNIT_COUNT_DEFAULT 16
-#define LPC_ETH_CONFIG_RX_UNIT_COUNT_MAX 54
+#ifdef ARM_MULTILIB_ARCH_V4
+  #define LPC_ETH_CONFIG_RX_UNIT_COUNT_DEFAULT 16
+  #define LPC_ETH_CONFIG_RX_UNIT_COUNT_MAX 54
+
+  #define LPC_ETH_CONFIG_TX_UNIT_COUNT_DEFAULT 10
+  #define LPC_ETH_CONFIG_TX_UNIT_COUNT_MAX 10
+
+  #define LPC_ETH_CONFIG_UNIT_MULTIPLE 1U
+
+  #define LPC24XX_ETH_RAM_BEGIN 0x7fe00000U
+  #define LPC24XX_ETH_RAM_SIZE (16U * 1024U)
+#else
+  #define LPC_ETH_CONFIG_RX_UNIT_COUNT_DEFAULT 16
+  #define LPC_ETH_CONFIG_RX_UNIT_COUNT_MAX INT_MAX
 
-#define LPC_ETH_CONFIG_TX_UNIT_COUNT_DEFAULT 10
-#define LPC_ETH_CONFIG_TX_UNIT_COUNT_MAX 10
+  #define LPC_ETH_CONFIG_TX_UNIT_COUNT_DEFAULT 32
+  #define LPC_ETH_CONFIG_TX_UNIT_COUNT_MAX INT_MAX
 
-#define LPC_ETH_CONFIG_UNIT_MULTIPLE 1U
+  #define LPC_ETH_CONFIG_UNIT_MULTIPLE 8U
+
+  #define LPC_ETH_CONFIG_USE_TRANSMIT_DMA
+
+  #define LPC24XX_ETH_RAM_BEGIN 0x20000000U
+  #define LPC24XX_ETH_RAM_SIZE (32U * 1024U)
+#endif
 
 #ifdef LPC24XX_ETHERNET_RMII
   #define LPC_ETH_CONFIG_RMII
@@ -72,9 +92,6 @@ extern "C" {
   }
 #endif
 
-#define LPC24XX_ETH_RAM_BEGIN 0x7fe00000U
-#define LPC24XX_ETH_RAM_SIZE (16U * 1024U)
-
 static char *lpc_eth_config_alloc_table_area(size_t size)
 {
   if (size < LPC24XX_ETH_RAM_SIZE) {




More information about the vc mailing list