More PIC32 Ethernet stuff (still incomplete)

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4305 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-01-17 00:00:25 +00:00
parent fa785d8d31
commit 0691a58eb7
5 changed files with 364 additions and 192 deletions
File diff suppressed because it is too large Load Diff
+28 -8
View File
@@ -727,8 +727,8 @@
#define PIC32MX_TXDESC_ADDRESS 0x04 /* Data buffer address (32-bits) */
#define PIC32MX_TXDESC_TSV1 0x08 /* Transmit filter status vector 1 (32-bits) */
#define PIC32MX_TXDESC_TSV2 0x0c /* Transmit filter status vector 2 (32-bits) */
#define PIC32MX_TXDESC_NEXTED 0x10 /* Size in bytes of one Tx descriptor */
#define PIC32MX_TXDESC_SIZE 0x14
#define PIC32MX_TXDESC_NEXTED 0x10 /* Next Ethernet Descriptor (ED) */
#define PIC32MX_TXDESC_SIZE 0x14 /* Size in bytes of one Tx descriptor */
/* Tx descriptor uint32_t* indices */
@@ -736,8 +736,8 @@
#define TXDESC_ADDRESS 1 /* Data buffer address (32-bits) */
#define TXDESC_TSV1 2 /* Transmit filter status vector 1 (32-bits) */
#define TXDESC_TSV2 3 /* Transmit filter status vector 2 (32-bits) */
#define TXDESC_NEXTED 4 /* Size in bytes of one Tx descriptor */
#define TXDESC_SIZE 5
#define TXDESC_NEXTED 4 /* Next Ethernet Descriptor (ED) */
#define TXDESC_SIZE 5 /* Size in 32-bit words of one Tx descriptor */
/* Rx descriptor offsets */
@@ -745,8 +745,8 @@
#define PIC32MX_RXDESC_ADDRESS 0x04 /* Data buffer address (32-bits) */
#define PIC32MX_RXDESC_RSV1 0x08 /* Receive filter status vector 1 and checksum (32-bits) */
#define PIC32MX_RXDESC_RSV2 0x0c /* Receive filter status vector 2 (32-bits) */
#define PIC32MX_RXDESC_NEXTED 0x10 /* Size in bytes of one Tx descriptor */
#define PIC32MX_RXDESC_SIZE 0x14
#define PIC32MX_RXDESC_NEXTED 0x10 /* Next Ethernet Descriptor (ED) */
#define PIC32MX_RXDESC_SIZE 0x14 /* Size in bytes of one Tx descriptor */
/* Rx descriptor offsets uint32_t* indices */
@@ -754,8 +754,8 @@
#define RXDESC_ADDRESS 1 /* Data buffer address (32-bits) */
#define RXDESC_RSV1 2 /* Receive filter status vector 1 and checksum (32-bits) */
#define RXDESC_RSV2 3 /* Receive filter status vector 2 (32-bits) */
#define RXDESC_NEXTED 4 /* Size in bytes of one Tx descriptor */
#define RXDESC_SIZE 5
#define RXDESC_NEXTED 4 /* Next Ethernet Descriptor (ED) */
#define RXDESC_SIZE 5 /* Size in 32-bit words of one Tx descriptor */
/* Descriptor Bit Definitions ***************************************************************/
/* Tx descriptor status bit definitions */
@@ -853,6 +853,26 @@
#ifndef __ASSEMBLY__
/* Descriptors as structures */
struct pic32mx_txdesc_s
{
uint32_t status; /* Various status bits (32-bits) */
uint32_t address; /* Data buffer address (32-bits) */
uint32_t tsv1; /* Transmit filter status vector 1 (32-bits) */
uint32_t tsv2; /* Transmit filter status vector 2 (32-bits) */
uint32_t nexted; /* Next Ethernet Descriptor (ED) */
};
struct pic32mx_rxdesc_s
{
uint32_t status; /* Various status bits (32-bits) */
uint32_t address; /* Data buffer address (32-bits) */
uint32_t rsv1; /* Receive filter status vector 1 and checksum (32-bits) */
uint32_t rsv2; /* Receive filter status vector 2 (32-bits) */
uint32_t nexted; /* Next Ethernet Descriptor (ED) */
};
/********************************************************************************************
* Inline Functions
********************************************************************************************/
+2 -3
View File
@@ -862,9 +862,8 @@ PIC32MX specific PHY/Ethernet device driver settings
CONFIG_PHY_AUTONEG - Enable auto-negotion
CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
CONFIG_NET_EMACRAM_SIZE - Size of EMAC RAM. Default: 16Kb
CONFIG_NET_NTXDESC - Configured number of Tx descriptors. Default: 18
CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18
CONFIG_NET_NTXDESC - Configured number of Tx descriptors. Default: 2
CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 4
CONFIG_NET_PRIORITY - Ethernet interrupt priority. The is default is
the higest priority.
CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented).
@@ -267,9 +267,8 @@ CONFIG_UART6_2STOP=0
# CONFIG_PHY_AUTONEG - Enable auto-negotion
# CONFIG_PHY_SPEED100 - Select 100Mbit vs. 10Mbit speed.
# CONFIG_PHY_FDUPLEX - Select full (vs. half) duplex
# CONFIG_NET_EMACRAM_SIZE - Size of EMAC RAM. Default: 16Kb
# CONFIG_NET_NTXDESC - Configured number of Tx descriptors. Default: 18
# CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 18
# CONFIG_NET_NTXDESC - Configured number of Tx descriptors. Default: 2
# CONFIG_NET_NRXDESC - Configured number of Rx descriptors. Default: 4
# CONFIG_NET_PRIORITY - Ethernet interrupt priority. The is default is
# the higest priority.
# CONFIG_NET_WOL - Enable Wake-up on Lan (not fully implemented).
@@ -295,7 +294,6 @@ CONFIG_PHY_LAN8720=n
CONFIG_PHY_AUTONEG=y
CONFIG_PHY_SPEED100=n
CONFIG_PHY_FDUPLEX=y
CONFIG_NET_EMACRAM_SIZE=8192
CONFIG_NET_NTXDESC=7
CONFIG_NET_NRXDESC=7
CONFIG_NET_REGDEBUG=n
@@ -607,6 +605,18 @@ CONFIG_MMCSD_HAVECARDDETECT=n
#
# TCP/IP and UDP support via uIP
# CONFIG_NET - Enable or disable all network features
# CONFIG_NET_NOINTS -- CONFIG_NET_NOINT indicates that uIP not called from
# the interrupt level. If CONFIG_NET_NOINTS is defined, critical sections
# will be managed with semaphores; Otherwise, it assumed that uIP will be
# called from interrupt level handling and critical sections will be
# managed by enabling and disabling interrupts.
# CONFIG_NET_MULTIBUFFER - Traditionally, uIP has used a single buffer
# for all incoming and outgoing traffic. If this configuration is
# selected, then the driver can manage multiple I/O buffers and can,
# for example, be filling one input buffer while sending another
# output buffer. Or, as another example, the driver may support
# queuing of concurrent input/ouput and output transfers for better
# performance.
# CONFIG_NET_IPv6 - Build in support for IPv6
# CONFIG_NSOCKET_DESCRIPTORS - Maximum number of socket descriptors per task/thread.
# CONFIG_NET_SOCKOPTS - Enable or disable support for socket options
@@ -631,6 +641,8 @@ CONFIG_MMCSD_HAVECARDDETECT=n
# CONFIG_NET_FWCACHE_SIZE - number of packets to remember when looking for duplicates
#
CONFIG_NET=n
CONFIG_NET_NOINTS=n
CONFIG_NET_MULTIBUFFER=y
CONFIG_NET_IPv6=n
CONFIG_NSOCKET_DESCRIPTORS=0
CONFIG_NET_SOCKOPTS=y
+1 -1
View File
@@ -1,7 +1,7 @@
############################################################################
# configs/sure-pic32mx/ostest/defconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without