mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
PIC32MX/Z Ethernet: Now supports CONFIG_NET_NOINT
This commit is contained in:
@@ -1094,13 +1094,6 @@ config NET_WOL
|
||||
---help---
|
||||
Enable Wake-up on LAN (not fully implemented).
|
||||
|
||||
config NET_REGDEBUG
|
||||
bool "Register level debug"
|
||||
default n
|
||||
depends on PIC32MX_ETHERNET && DEBUG_NET_INFO
|
||||
---help---
|
||||
Enabled low level register debug. Also needs CONFIG_DEBUG_FEATURES.
|
||||
|
||||
config NET_HASH
|
||||
bool "Hash"
|
||||
default n
|
||||
@@ -1116,6 +1109,33 @@ config PIC32MX_MULTICAST
|
||||
Enable receipt of multicast (and unicast) frames. Automatically set if
|
||||
NET_IGMP is selected.
|
||||
|
||||
choice
|
||||
prompt "Work queue"
|
||||
default PIC32MX_ETHERNET_LPWORK if SCHED_LPWORK
|
||||
default PIC32MX_ETHERNET_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||
depends on SCHED_WORKQUEUE
|
||||
---help---
|
||||
Work queue support is required to use the Ethernet driver. If the
|
||||
low priority work queue is available, then it should be used by the
|
||||
driver.
|
||||
|
||||
config PIC32MX_ETHERNET_HPWORK
|
||||
bool "High priority"
|
||||
depends on SCHED_HPWORK
|
||||
|
||||
config PIC32MX_ETHERNET_LPWORK
|
||||
bool "Low priority"
|
||||
depends on SCHED_LPWORK
|
||||
|
||||
endchoice # Work queue
|
||||
|
||||
config NET_REGDEBUG
|
||||
bool "Register level debug"
|
||||
default n
|
||||
depends on PIC32MX_ETHERNET && DEBUG_NET_INFO
|
||||
---help---
|
||||
Enabled low level register debug. Also needs CONFIG_DEBUG_FEATURES.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Device Configuration 0 (DEVCFG0)"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -265,7 +265,7 @@ config PIC32MZ_CTMU
|
||||
bool "Charge Time Measurement Unit (CMTU)"
|
||||
default n
|
||||
|
||||
endmenu # PIC32MX Peripheral Support
|
||||
endmenu # PIC32MZ Peripheral Support
|
||||
|
||||
menuconfig PIC32MZ_GPIOIRQ
|
||||
bool "GPIO Interrupt Support"
|
||||
@@ -397,13 +397,6 @@ config NET_WOL
|
||||
---help---
|
||||
Enable Wake-up on LAN (not fully implemented).
|
||||
|
||||
config NET_REGDEBUG
|
||||
bool "Register level debug"
|
||||
default n
|
||||
depends on PIC32MZ_ETHERNET && DEBUG_NET_INFO
|
||||
---help---
|
||||
Enabled low level register debug. Also needs CONFIG_DEBUG_FEATURES.
|
||||
|
||||
config NET_HASH
|
||||
bool "Hash"
|
||||
default n
|
||||
@@ -419,6 +412,33 @@ config PIC32MZ_MULTICAST
|
||||
Enable receipt of multicast (and unicast) frames. Automatically set if
|
||||
NET_IGMP is selected.
|
||||
|
||||
choice
|
||||
prompt "Work queue"
|
||||
default PIC32MZ_ETHERNET_LPWORK if SCHED_LPWORK
|
||||
default PIC32MZ_ETHERNET_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||
depends on SCHED_WORKQUEUE
|
||||
---help---
|
||||
Work queue support is required to use the Ethernet driver. If the
|
||||
low priority work queue is available, then it should be used by the
|
||||
driver.
|
||||
|
||||
config PIC32MZ_ETHERNET_HPWORK
|
||||
bool "High priority"
|
||||
depends on SCHED_HPWORK
|
||||
|
||||
config PIC32MZ_ETHERNET_LPWORK
|
||||
bool "Low priority"
|
||||
depends on SCHED_LPWORK
|
||||
|
||||
endchoice # Work queue
|
||||
|
||||
config NET_REGDEBUG
|
||||
bool "Register level debug"
|
||||
default n
|
||||
depends on PIC32MZ_ETHERNET && DEBUG_NET_INFO
|
||||
---help---
|
||||
Enabled low level register debug. Also needs CONFIG_DEBUG_FEATURES.
|
||||
|
||||
endmenu # PIC32MZ PHY/Ethernet device driver settings
|
||||
|
||||
menu "Device Configuration 0 (DEVCFG0)"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -246,6 +246,7 @@ CONFIG_PIC32MX_T1PRIO=16
|
||||
# PIC32MX PHY/Ethernet device driver settings
|
||||
#
|
||||
# CONFIG_PIC32MX_MULTICAST is not set
|
||||
CONFIG_PIC32MX_ETHERNET_HPWORK=y
|
||||
|
||||
#
|
||||
# Device Configuration 0 (DEVCFG0)
|
||||
@@ -422,6 +423,7 @@ CONFIG_NAME_MAX=32
|
||||
# CONFIG_SCHED_STARTHOOK is not set
|
||||
# CONFIG_SCHED_ATEXIT is not set
|
||||
# CONFIG_SCHED_ONEXIT is not set
|
||||
# CONFIG_SIG_EVTHREAD is not set
|
||||
|
||||
#
|
||||
# Signal Numbers
|
||||
@@ -430,6 +432,7 @@ CONFIG_SIG_SIGUSR1=1
|
||||
CONFIG_SIG_SIGUSR2=2
|
||||
CONFIG_SIG_SIGALARM=3
|
||||
CONFIG_SIG_SIGCONDTIMEDOUT=16
|
||||
CONFIG_SIG_SIGWORK=17
|
||||
|
||||
#
|
||||
# POSIX Message Queue Options
|
||||
@@ -441,8 +444,11 @@ CONFIG_MQ_MAXMSGSIZE=32
|
||||
#
|
||||
# Work queue support
|
||||
#
|
||||
# CONFIG_SCHED_WORKQUEUE is not set
|
||||
# CONFIG_SCHED_HPWORK is not set
|
||||
CONFIG_SCHED_WORKQUEUE=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=224
|
||||
CONFIG_SCHED_HPWORKPERIOD=50000
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=2048
|
||||
# CONFIG_SCHED_LPWORK is not set
|
||||
|
||||
#
|
||||
@@ -574,7 +580,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y
|
||||
# CONFIG_NET_DM90x0 is not set
|
||||
# CONFIG_ENC28J60 is not set
|
||||
# CONFIG_ENCX24J600 is not set
|
||||
|
||||
# CONFIG_NET_SLIP is not set
|
||||
# CONFIG_NET_FTMAC100 is not set
|
||||
|
||||
@@ -668,7 +673,7 @@ CONFIG_RAMLOG_SYSLOG=y
|
||||
CONFIG_ARCH_HAVE_NET=y
|
||||
CONFIG_ARCH_HAVE_PHY=y
|
||||
CONFIG_NET=y
|
||||
# CONFIG_NET_NOINTS is not set
|
||||
CONFIG_NET_NOINTS=y
|
||||
# CONFIG_NET_PROMISCUOUS is not set
|
||||
|
||||
#
|
||||
|
||||
@@ -254,6 +254,7 @@ CONFIG_PIC32MX_USBPRIO=16
|
||||
# PIC32MX PHY/Ethernet device driver settings
|
||||
#
|
||||
# CONFIG_PIC32MX_MULTICAST is not set
|
||||
CONFIG_PIC32MX_ETHERNET_HPWORK=y
|
||||
|
||||
#
|
||||
# Device Configuration 0 (DEVCFG0)
|
||||
@@ -431,6 +432,7 @@ CONFIG_NAME_MAX=32
|
||||
# CONFIG_SCHED_STARTHOOK is not set
|
||||
# CONFIG_SCHED_ATEXIT is not set
|
||||
# CONFIG_SCHED_ONEXIT is not set
|
||||
# CONFIG_SIG_EVTHREAD is not set
|
||||
|
||||
#
|
||||
# Signal Numbers
|
||||
@@ -439,6 +441,7 @@ CONFIG_SIG_SIGUSR1=1
|
||||
CONFIG_SIG_SIGUSR2=2
|
||||
CONFIG_SIG_SIGALARM=3
|
||||
CONFIG_SIG_SIGCONDTIMEDOUT=16
|
||||
CONFIG_SIG_SIGWORK=17
|
||||
|
||||
#
|
||||
# POSIX Message Queue Options
|
||||
@@ -450,8 +453,11 @@ CONFIG_MQ_MAXMSGSIZE=32
|
||||
#
|
||||
# Work queue support
|
||||
#
|
||||
# CONFIG_SCHED_WORKQUEUE is not set
|
||||
# CONFIG_SCHED_HPWORK is not set
|
||||
CONFIG_SCHED_WORKQUEUE=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=224
|
||||
CONFIG_SCHED_HPWORKPERIOD=50000
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=2048
|
||||
# CONFIG_SCHED_LPWORK is not set
|
||||
|
||||
#
|
||||
@@ -593,7 +599,6 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y
|
||||
# CONFIG_NET_DM90x0 is not set
|
||||
# CONFIG_ENC28J60 is not set
|
||||
# CONFIG_ENCX24J600 is not set
|
||||
|
||||
# CONFIG_NET_SLIP is not set
|
||||
# CONFIG_NET_FTMAC100 is not set
|
||||
|
||||
@@ -731,7 +736,7 @@ CONFIG_SYSLOG_CONSOLE=y
|
||||
CONFIG_ARCH_HAVE_NET=y
|
||||
CONFIG_ARCH_HAVE_PHY=y
|
||||
CONFIG_NET=y
|
||||
# CONFIG_NET_NOINTS is not set
|
||||
CONFIG_NET_NOINTS=y
|
||||
# CONFIG_NET_PROMISCUOUS is not set
|
||||
|
||||
#
|
||||
|
||||
@@ -53,13 +53,14 @@
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/wdog.h>
|
||||
#include <nuttx/net/arp.h>
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#ifdef CONFIG_NET_NOINTS
|
||||
# include <nuttx/wqueue.h>
|
||||
#endif
|
||||
|
||||
#include <nuttx/net/arp.h>
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
#ifdef CONFIG_NET_PKT
|
||||
# include <nuttx/net/pkt.h>
|
||||
#endif
|
||||
@@ -185,11 +186,13 @@ static void skel_poll_expiry(int argc, wdparm_t arg, ...);
|
||||
|
||||
static int skel_ifup(FAR struct net_driver_s *dev);
|
||||
static int skel_ifdown(FAR struct net_driver_s *dev);
|
||||
|
||||
static inline void skel_txavail_process(FAR struct skel_driver_s *priv);
|
||||
#ifdef CONFIG_NET_NOINTS
|
||||
static void skel_txavail_work(FAR void *arg);
|
||||
#endif
|
||||
static int skel_txavail(FAR struct net_driver_s *dev);
|
||||
|
||||
#if defined(CONFIG_NET_IGMP) || defined(CONFIG_NET_ICMPv6)
|
||||
static int skel_addmac(FAR struct net_driver_s *dev, FAR const uint8_t *mac);
|
||||
#ifdef CONFIG_NET_IGMP
|
||||
@@ -610,7 +613,7 @@ static int skel_interrupt(int irq, FAR void *context)
|
||||
|
||||
{
|
||||
/* If a TX transfer just completed, then cancel the TX timeout so
|
||||
* there will be do race condition between any subsequent timeout
|
||||
* there will be no race condition between any subsequent timeout
|
||||
* expiration and the deferred interrupt processing.
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user