Completes first cut at Kinetis ethernet driver

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3889 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-08-17 16:24:47 +00:00
parent 94a3c61edb
commit b1edd6327a
6 changed files with 421 additions and 192 deletions
+1 -5
View File
@@ -67,10 +67,6 @@ ifeq ($(CONFIG_GPIO_IRQ),y)
CHIP_CSRCS += kinetis_pinirq.c
endif
ifeq ($(CONFIG_KINETIS_DMA),y)
CHIP_CSRCS += kinetis_pindma.c
endif
ifeq ($(CONFIG_DEBUG_GPIO),y)
CHIP_CSRCS += kinetis_pindbg.c
endif
@@ -84,7 +80,7 @@ CHIP_CSRCS += kinetis_usbhost.c
endif
ifeq ($(CONFIG_KINETIS_DMA),y)
CHIP_CSRCS += kinetis_dma.c
CHIP_CSRCS += kinetis_dma.c kinetis_pindma.c
endif
ifeq ($(CONFIG_NET),y)
+5 -2
View File
@@ -186,8 +186,11 @@
/* Ethernet controller configuration */
#ifndef CONFIG_ENET_NBUFFERS
# define CONFIG_ENET_NBUFFERS 8
#ifndef CONFIG_ENET_NRXBUFFERS
# define CONFIG_ENET_NRXBUFFERS 6
#endif
#ifndef CONFIG_ENET_NTXBUFFERS
# define CONFIG_ENET_NTXBUFFERS 2
#endif
#ifndef CONFIG_ENET_PHYADDR
File diff suppressed because it is too large Load Diff
+2 -3
View File
@@ -320,7 +320,7 @@
/* Receive FIFO Almost Empty Threshold */
#define ENET_RAEM_SHIFT (0) /* Bits 0-7: Value of the receive FIFO almost empty threshold */
#define ENET_RSEM_MASK (0xff << ENET_RAEM_SHIFT)
#define ENET_RAEM_MASK (0xff << ENET_RAEM_SHIFT)
/* Bits 8-31: Reserved */
/* Receive FIFO Almost Full Threshold */
@@ -462,7 +462,7 @@
# define TXDESC_W (1 << 13) /* Common */
# define TXDESC_TO1 (1 << 14) /* Common */
# define TXDESC_R (1 << 15) /* Common */
#endif
#else
# define TXDESC_ABC (1 << 1) /* Legacy */
# define TXDESC_TC (1 << 2) /* Common */
# define TXDESC_L (1 << 3) /* Common */
@@ -489,7 +489,6 @@
# define TXDESC_INT (1 << 30)
# define TXDESC_BDU (1 << 31)
#else
# define TXDESC_IINS (1 << 3)
# define TXDESC_PINS (1 << 4)
+4 -2
View File
@@ -557,8 +557,10 @@ TWR-K60N512-specific Configuration Options
Kenetis ethernet controller settings
CONFIG_ENET_NBUFFERS - Number of TX/RX buffers. The size of one
buffer is determined by CONFIG_NET_BUFSIZE. Default: 8
CONFIG_ENET_NRXBUFFERS - Number of RX buffers. The size of one
buffer is determined by CONFIG_NET_BUFSIZE. Default: 6
CONFIG_ENET_NTXBUFFERS - Number of TX buffers. The size of one
buffer is determined by CONFIG_NET_BUFSIZE. Default: 2
CONFIG_ENET_USEMII - Usee MII mode. Default: RMII mode.
CONFIG_ENET_PHYADDR - PHY address
+1 -1
View File
@@ -163,7 +163,7 @@ static int skel_transmit(FAR struct skel_driver_s *skel)
{
/* Verify that the hardware is ready to send another packet. If we get
* here, then we are committed to sending a packet; Higher level logic
* must have assured that there is not transmission in progress.
* must have assured that there is no transmission in progress.
*/
/* Increment statistics */