mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
arch/: Add option to use low-priority work queue to all Ethernet drivers in arch that support CONFIG_NET_NOINTS.
This commit is contained in:
@@ -629,6 +629,25 @@ config KINETIS_ENET_NORXER
|
|||||||
If selected, then the MII/RMII RXER output will be configured as a
|
If selected, then the MII/RMII RXER output will be configured as a
|
||||||
GPIO and pulled low.
|
GPIO and pulled low.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default KINETIS_EMAC_LPWORK if SCHED_LPWORK
|
||||||
|
default KINETIS_EMAC_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 KINETIS_EMAC_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config KINETIS_EMAC_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
endmenu # Kinetis Ethernet Configuration
|
endmenu # Kinetis Ethernet Configuration
|
||||||
|
|
||||||
menu "Kinetis SDHC Configuration"
|
menu "Kinetis SDHC Configuration"
|
||||||
|
|||||||
@@ -80,12 +80,24 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_KINETIS_EMAC_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_KINETIS_EMAC_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_KINETIS_EMAC_HPWORK nor CONFIG_KINETIS_EMAC_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* CONFIG_KINETIS_ENETNETHIFS determines the number of physical interfaces
|
/* CONFIG_KINETIS_ENETNETHIFS determines the number of physical interfaces
|
||||||
@@ -974,11 +986,11 @@ static int kinetis_interrupt(int irq, FAR void *context)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, kinetis_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, kinetis_interrupt_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the interrupt now */
|
/* Process the interrupt now */
|
||||||
@@ -1093,11 +1105,11 @@ static void kinetis_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, kinetis_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, kinetis_txtimeout_work, priv, 0);
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
|
|
||||||
@@ -1206,7 +1218,7 @@ static void kinetis_polltimer_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, kinetis_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, kinetis_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1513,7 +1525,7 @@ static int kinetis_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, kinetis_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, kinetis_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -724,6 +724,26 @@ config LPC17_MULTICAST
|
|||||||
---help---
|
---help---
|
||||||
Enable receipt of multicast (and unicast) frames. Automatically set
|
Enable receipt of multicast (and unicast) frames. Automatically set
|
||||||
if NET_IGMP is selected.
|
if NET_IGMP is selected.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default LPC17_ETHERNET_LPWORK if SCHED_LPWORK
|
||||||
|
default LPC17_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 LPC17_ETHERNET_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config LPC17_ETHERNET_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "LCD device driver options"
|
menu "LCD device driver options"
|
||||||
|
|||||||
@@ -83,12 +83,24 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_LPC17_ETHERNET_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_LPC17_ETHERNET_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_LPC17_ETHERNET_HPWORK nor CONFIG_LPC17_ETHERNET_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* CONFIG_LPC17_NINTERFACES determines the number of physical interfaces
|
/* CONFIG_LPC17_NINTERFACES determines the number of physical interfaces
|
||||||
@@ -1259,11 +1271,11 @@ static int lpc17_interrupt(int irq, void *context)
|
|||||||
|
|
||||||
/* Cancel any pending RX done work */
|
/* Cancel any pending RX done work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->lp_rxwork);
|
work_cancel(ETHWORK, &priv->lp_rxwork);
|
||||||
|
|
||||||
/* Schedule RX-related work to be performed on the work thread */
|
/* Schedule RX-related work to be performed on the work thread */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->lp_rxwork, (worker_t)lpc17_rxdone_work,
|
work_queue(ETHWORK, &priv->lp_rxwork, (worker_t)lpc17_rxdone_work,
|
||||||
priv, 0);
|
priv, 0);
|
||||||
|
|
||||||
#else /* CONFIG_NET_NOINTS */
|
#else /* CONFIG_NET_NOINTS */
|
||||||
@@ -1323,7 +1335,7 @@ static int lpc17_interrupt(int irq, void *context)
|
|||||||
* to avoid race conditions with the TX timeout work)
|
* to avoid race conditions with the TX timeout work)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->lp_txwork);
|
work_cancel(ETHWORK, &priv->lp_txwork);
|
||||||
|
|
||||||
/* Then make sure that the TX poll timer is running (if it is
|
/* Then make sure that the TX poll timer is running (if it is
|
||||||
* already running, the following would restart it). This is
|
* already running, the following would restart it). This is
|
||||||
@@ -1336,7 +1348,7 @@ static int lpc17_interrupt(int irq, void *context)
|
|||||||
|
|
||||||
/* Schedule TX-related work to be performed on the work thread */
|
/* Schedule TX-related work to be performed on the work thread */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->lp_txwork, (worker_t)lpc17_txdone_work,
|
work_queue(ETHWORK, &priv->lp_txwork, (worker_t)lpc17_txdone_work,
|
||||||
priv, 0);
|
priv, 0);
|
||||||
|
|
||||||
#else /* CONFIG_NET_NOINTS */
|
#else /* CONFIG_NET_NOINTS */
|
||||||
@@ -1468,7 +1480,7 @@ static void lpc17_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->lp_txwork, lpc17_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->lp_txwork, lpc17_txtimeout_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -1526,7 +1538,7 @@ static void lpc17_poll_process(FAR struct lpc17_driver_s *priv)
|
|||||||
if (considx != prodidx)
|
if (considx != prodidx)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NET_NOINTS
|
#ifdef CONFIG_NET_NOINTS
|
||||||
work_queue(HPWORK, &priv->lp_rxwork, (worker_t)lpc17_rxdone_work,
|
work_queue(ETHWORK, &priv->lp_rxwork, (worker_t)lpc17_rxdone_work,
|
||||||
priv, 0);
|
priv, 0);
|
||||||
|
|
||||||
#else /* CONFIG_NET_NOINTS */
|
#else /* CONFIG_NET_NOINTS */
|
||||||
@@ -1606,7 +1618,7 @@ static void lpc17_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->lp_pollwork, lpc17_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->lp_pollwork, lpc17_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2013,7 +2025,7 @@ static int lpc17_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->lp_pollwork, lpc17_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->lp_pollwork, lpc17_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -485,8 +485,8 @@ endif # LCP43_EXTSDRAM3
|
|||||||
|
|
||||||
endmenu # External Memory Configuration
|
endmenu # External Memory Configuration
|
||||||
|
|
||||||
if LPC43_ETHERNET
|
|
||||||
menu "Ethernet MAC configuration"
|
menu "Ethernet MAC configuration"
|
||||||
|
depends on LPC43_ETHERNET
|
||||||
|
|
||||||
config LPC43_PHYADDR
|
config LPC43_PHYADDR
|
||||||
int "PHY address"
|
int "PHY address"
|
||||||
@@ -619,6 +619,26 @@ config LPC43_RMII
|
|||||||
bool
|
bool
|
||||||
default y if !LPC43_MII
|
default y if !LPC43_MII
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default LPC43_ETHERNET_LPWORK if SCHED_LPWORK
|
||||||
|
default LPC43_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 LPC43_ETHERNET_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config LPC43_ETHERNET_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
|
|
||||||
config LPC43_ETHERNET_REGDEBUG
|
config LPC43_ETHERNET_REGDEBUG
|
||||||
bool "Register-Level Debug"
|
bool "Register-Level Debug"
|
||||||
default n
|
default n
|
||||||
@@ -627,7 +647,6 @@ config LPC43_ETHERNET_REGDEBUG
|
|||||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
|
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
|
||||||
|
|
||||||
endmenu # Ethernet MAC configuration
|
endmenu # Ethernet MAC configuration
|
||||||
endif # LPC43_ETHERNET
|
|
||||||
|
|
||||||
menu "RS-485 Configuration"
|
menu "RS-485 Configuration"
|
||||||
if LPC43_USART0
|
if LPC43_USART0
|
||||||
|
|||||||
@@ -83,12 +83,24 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_LPC43_ETHERNET_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_LPC43_ETHERNET_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_LPC43_ETHERNET_HPWORK nor CONFIG_LPC43_ETHERNET_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_LPC43_PHYADDR
|
#ifndef CONFIG_LPC43_PHYADDR
|
||||||
@@ -2075,11 +2087,11 @@ static int lpc43_interrupt(int irq, FAR void *context)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, lpc43_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, lpc43_interrupt_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -2195,11 +2207,11 @@ static void lpc43_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, lpc43_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, lpc43_txtimeout_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
@@ -2339,7 +2351,7 @@ static void lpc43_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, lpc43_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, lpc43_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2556,7 +2568,7 @@ static int lpc43_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, lpc43_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, lpc43_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1136,9 +1136,8 @@ config SAM34_SPI_REGDEBUG
|
|||||||
endmenu # AT91SAM3/4 SPI device driver options
|
endmenu # AT91SAM3/4 SPI device driver options
|
||||||
endif # SAM34_SPI0 || SAM34_SPI1
|
endif # SAM34_SPI0 || SAM34_SPI1
|
||||||
|
|
||||||
if SAM34_EMAC
|
|
||||||
|
|
||||||
menu "AT91SAM3/4 EMAC device driver options"
|
menu "AT91SAM3/4 EMAC device driver options"
|
||||||
|
depends on SAM34_EMAC
|
||||||
|
|
||||||
config SAM34_EMAC_NRXBUFFERS
|
config SAM34_EMAC_NRXBUFFERS
|
||||||
int "Number of RX buffers"
|
int "Number of RX buffers"
|
||||||
@@ -1332,6 +1331,30 @@ config SAM34_EMAC_PHYSR_100FD
|
|||||||
This must be provided if SAM34_EMAC_AUTONEG is defined. This is the value
|
This must be provided if SAM34_EMAC_AUTONEG is defined. This is the value
|
||||||
under the bit mask that represents the 100Mbps, full duplex setting.
|
under the bit mask that represents the 100Mbps, full duplex setting.
|
||||||
|
|
||||||
|
config SAM34_EMAC_ISETH0
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default SAM34_EMAC_LPWORK if SCHED_LPWORK
|
||||||
|
default SAM34_EMAC_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 SAM34_EMAC_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config SAM34_EMAC_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
|
|
||||||
config SAM34_EMAC_REGDEBUG
|
config SAM34_EMAC_REGDEBUG
|
||||||
bool "Register-Level Debug"
|
bool "Register-Level Debug"
|
||||||
default n
|
default n
|
||||||
@@ -1339,13 +1362,7 @@ config SAM34_EMAC_REGDEBUG
|
|||||||
---help---
|
---help---
|
||||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
|
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
|
||||||
|
|
||||||
config SAM34_EMAC_ISETH0
|
|
||||||
bool
|
|
||||||
default y if !SAM34_EMAC || !SAM34_GMAC_ISETH0
|
|
||||||
default n if SAM34_EMAC && SAM34_GMAC_ISETH0
|
|
||||||
|
|
||||||
endmenu # EMAC device driver options
|
endmenu # EMAC device driver options
|
||||||
endif # SAM34_EMAC
|
|
||||||
|
|
||||||
if SAM34_HSMCI
|
if SAM34_HSMCI
|
||||||
menu "AT91SAM3/4 HSMCI device driver options"
|
menu "AT91SAM3/4 HSMCI device driver options"
|
||||||
|
|||||||
@@ -97,12 +97,24 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_SAM34_EMAC_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_SAM34_EMAC_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_SAM34_EMAC_HPWORK nor CONFIG_SAM34_EMAC_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Number of buffer for RX */
|
/* Number of buffer for RX */
|
||||||
@@ -1690,11 +1702,11 @@ static int sam_emac_interrupt(int irq, void *context)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_interrupt_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the interrupt now */
|
/* Process the interrupt now */
|
||||||
@@ -1807,11 +1819,11 @@ static void sam_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_txtimeout_work, priv, 0);
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
|
|
||||||
@@ -1918,7 +1930,7 @@ static void sam_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2155,7 +2167,7 @@ static int sam_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1685,13 +1685,11 @@ config SAMA5_EMACA_REGDEBUG
|
|||||||
endmenu # EMAC device driver options
|
endmenu # EMAC device driver options
|
||||||
endif # SAMA5_EMACA
|
endif # SAMA5_EMACA
|
||||||
|
|
||||||
if SAMA5_EMACB
|
|
||||||
|
|
||||||
menu "EMAC device driver options"
|
menu "EMAC device driver options"
|
||||||
|
depends on SAMA5_EMACB
|
||||||
if SAMA5_EMAC0
|
|
||||||
|
|
||||||
menu "EMAC0 device driver options"
|
menu "EMAC0 device driver options"
|
||||||
|
depends on SAMA5_EMAC0
|
||||||
|
|
||||||
config SAMA5_EMAC0_NRXBUFFERS
|
config SAMA5_EMAC0_NRXBUFFERS
|
||||||
int "Number of RX buffers"
|
int "Number of RX buffers"
|
||||||
@@ -1871,11 +1869,9 @@ config SAMA5_EMAC0_PHYSR_FULLDUPLEX
|
|||||||
endif # !SAMA5_EMAC0_PHYSR_ALTCONFIG
|
endif # !SAMA5_EMAC0_PHYSR_ALTCONFIG
|
||||||
endif # SAMA5_EMAC0_AUTONEG
|
endif # SAMA5_EMAC0_AUTONEG
|
||||||
endmenu # EMAC0 device driver options
|
endmenu # EMAC0 device driver options
|
||||||
endif # SAMA5_EMAC0
|
|
||||||
|
|
||||||
if SAMA5_EMAC1
|
|
||||||
|
|
||||||
menu "EMAC1 device driver options"
|
menu "EMAC1 device driver options"
|
||||||
|
depends on SAMA5_EMAC1
|
||||||
|
|
||||||
config SAMA5_EMAC1_NRXBUFFERS
|
config SAMA5_EMAC1_NRXBUFFERS
|
||||||
int "Number of RX buffers"
|
int "Number of RX buffers"
|
||||||
@@ -2055,7 +2051,6 @@ config SAMA5_EMAC1_PHYSR_FULLDUPLEX
|
|||||||
endif # !SAMA5_EMAC1_PHYSR_ALTCONFIG
|
endif # !SAMA5_EMAC1_PHYSR_ALTCONFIG
|
||||||
endif # SAMA5_EMAC1_AUTONEG
|
endif # SAMA5_EMAC1_AUTONEG
|
||||||
endmenu # EMAC1 device driver options
|
endmenu # EMAC1 device driver options
|
||||||
endif # SAMA5_EMAC1
|
|
||||||
|
|
||||||
# These apply to both EMAC0 and EMAC1
|
# These apply to both EMAC0 and EMAC1
|
||||||
|
|
||||||
@@ -2073,6 +2068,26 @@ config SAMA5_EMACB_NBC
|
|||||||
---help---
|
---help---
|
||||||
Select to disable receipt of broadcast packets.
|
Select to disable receipt of broadcast packets.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default SAMA5_EMACB_LPWORK if SCHED_LPWORK
|
||||||
|
default SAMA5_EMACB_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 SAMA5_EMACB_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config SAMA5_EMACB_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
|
|
||||||
config SAMA5_EMACB_DEBUG
|
config SAMA5_EMACB_DEBUG
|
||||||
bool "Force EMAC0/1 DEBUG"
|
bool "Force EMAC0/1 DEBUG"
|
||||||
default n
|
default n
|
||||||
@@ -2092,7 +2107,6 @@ config SAMA5_EMACB_REGDEBUG
|
|||||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
|
Enable very low-level register access debug. Depends on CONFIG_DEBUG_NET_INFO.
|
||||||
|
|
||||||
endmenu # EMAC device driver options
|
endmenu # EMAC device driver options
|
||||||
endif # SAMA5_EMACB
|
|
||||||
|
|
||||||
if SAMA5_EMACA || SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC
|
if SAMA5_EMACA || SAMA5_EMAC0 || SAMA5_EMAC1 || SAMA5_GMAC
|
||||||
choice
|
choice
|
||||||
|
|||||||
@@ -113,12 +113,24 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_SAMA5_EMACB_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_SAMA5_EMACB_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_SAMA5_EMACB_HPWORK nor CONFIG_SAMA5_EMACB_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* EMAC0 Configuration ******************************************************/
|
/* EMAC0 Configuration ******************************************************/
|
||||||
@@ -2098,11 +2110,11 @@ static int sam_emac_interrupt(struct sam_emac_s *priv)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_interrupt_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the interrupt now */
|
/* Process the interrupt now */
|
||||||
@@ -2244,11 +2256,11 @@ static void sam_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_txtimeout_work, priv, 0);
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
|
|
||||||
@@ -2355,7 +2367,7 @@ static void sam_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2600,7 +2612,7 @@ static int sam_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1998,6 +1998,26 @@ config SAMV7_EMAC_NBC
|
|||||||
---help---
|
---help---
|
||||||
Select to disable receipt of broadcast packets.
|
Select to disable receipt of broadcast packets.
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default SAMV7_EMAC_LPWORK if SCHED_LPWORK
|
||||||
|
default SAMV7_EMAC_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 SAMV7_EMAC_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config SAMV7_EMAC_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
|
|
||||||
config SAMV7_EMAC_DEBUG
|
config SAMV7_EMAC_DEBUG
|
||||||
bool "Force EMAC0/1 DEBUG"
|
bool "Force EMAC0/1 DEBUG"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -103,12 +103,24 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
/* Configuration ************************************************************/
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_SAMV7_EMAC_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_SAMV7_EMAC_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_SAMV7_EMAC_HPWORK nor CONFIG_SAMV7_EMAC_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* EMAC0 Configuration ******************************************************/
|
/* EMAC0 Configuration ******************************************************/
|
||||||
@@ -2544,11 +2556,11 @@ static int sam_emac_interrupt(struct sam_emac_s *priv)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_interrupt_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the interrupt now */
|
/* Process the interrupt now */
|
||||||
@@ -2691,11 +2703,11 @@ static void sam_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_txtimeout_work, priv, 0);
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
|
|
||||||
@@ -2802,7 +2814,7 @@ static void sam_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3050,7 +3062,7 @@ static int sam_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, sam_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, sam_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -44,26 +44,6 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_NET
|
#ifdef CONFIG_NET
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Types
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Function Prototypes
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -6146,8 +6146,8 @@ config RTC_HSECLOCK
|
|||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
if STM32_ETHMAC
|
|
||||||
menu "Ethernet MAC configuration"
|
menu "Ethernet MAC configuration"
|
||||||
|
depends on STM32_ETHMAC
|
||||||
|
|
||||||
config STM32_PHYADDR
|
config STM32_PHYADDR
|
||||||
int "PHY address"
|
int "PHY address"
|
||||||
@@ -6351,6 +6351,26 @@ config STM32_RMII_EXTCLK
|
|||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default STM32_ETHMAC_LPWORK if SCHED_LPWORK
|
||||||
|
default STM32_ETHMAC_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 STM32_ETHMAC_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config STM32_ETHMAC_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
|
|
||||||
config STM32_ETHMAC_REGDEBUG
|
config STM32_ETHMAC_REGDEBUG
|
||||||
bool "Register-Level Debug"
|
bool "Register-Level Debug"
|
||||||
default n
|
default n
|
||||||
@@ -6358,8 +6378,7 @@ config STM32_ETHMAC_REGDEBUG
|
|||||||
---help---
|
---help---
|
||||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES.
|
Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES.
|
||||||
|
|
||||||
endmenu
|
endmenu # Ethernet MAC configuration
|
||||||
endif
|
|
||||||
|
|
||||||
menu "USB FS Host Configuration"
|
menu "USB FS Host Configuration"
|
||||||
|
|
||||||
|
|||||||
@@ -93,12 +93,24 @@
|
|||||||
# error "Logic to support multiple Ethernet interfaces is incomplete"
|
# error "Logic to support multiple Ethernet interfaces is incomplete"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_STM32_ETHMAC_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_STM32_ETHMAC_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_STM32_ETHMAC_HPWORK nor CONFIG_STM32_ETHMAC_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(CONFIG_STM32_SYSCFG) && !defined(CONFIG_STM32_CONNECTIVITYLINE)
|
#if !defined(CONFIG_STM32_SYSCFG) && !defined(CONFIG_STM32_CONNECTIVITYLINE)
|
||||||
@@ -2139,11 +2151,11 @@ static int stm32_interrupt(int irq, FAR void *context)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_interrupt_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -2259,11 +2271,11 @@ static void stm32_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_txtimeout_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
@@ -2403,7 +2415,7 @@ static void stm32_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2618,7 +2630,7 @@ static int stm32_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -4436,8 +4436,8 @@ config STM32F7_ADC3_DMA
|
|||||||
|
|
||||||
endmenu # "ADC Configuration"
|
endmenu # "ADC Configuration"
|
||||||
|
|
||||||
if STM32F7_ETHMAC
|
|
||||||
menu "Ethernet MAC configuration"
|
menu "Ethernet MAC configuration"
|
||||||
|
depends on STM32F7_ETHMAC
|
||||||
|
|
||||||
config STM32F7_PHYADDR
|
config STM32F7_PHYADDR
|
||||||
int "PHY address"
|
int "PHY address"
|
||||||
@@ -4619,7 +4619,27 @@ config STM32F7_RMII_EXTCLK
|
|||||||
---help---
|
---help---
|
||||||
Clocking is provided by external logic.
|
Clocking is provided by external logic.
|
||||||
|
|
||||||
endchoice
|
endchoice # RMII clock configuration
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default STM32F7_ETHMAC_LPWORK if SCHED_LPWORK
|
||||||
|
default STM32F7_ETHMAC_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 STM32F7_ETHMAC_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config STM32F7_ETHMAC_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
|
|
||||||
config STM32F7_ETHMAC_REGDEBUG
|
config STM32F7_ETHMAC_REGDEBUG
|
||||||
bool "Register-Level Debug"
|
bool "Register-Level Debug"
|
||||||
@@ -4628,6 +4648,5 @@ config STM32F7_ETHMAC_REGDEBUG
|
|||||||
---help---
|
---help---
|
||||||
Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES.
|
Enable very low-level register access debug. Depends on CONFIG_DEBUG_FEATURES.
|
||||||
|
|
||||||
endmenu
|
endmenu # Ethernet MAC configuration
|
||||||
endif # STM32F7_ETHMAC
|
|
||||||
endif # ARCH_CHIP_STM32F7
|
endif # ARCH_CHIP_STM32F7
|
||||||
|
|||||||
@@ -94,12 +94,24 @@
|
|||||||
# error "Logic to support multiple Ethernet interfaces is incomplete"
|
# error "Logic to support multiple Ethernet interfaces is incomplete"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_STM32F7_ETHMAC_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_STM32F7_ETHMAC_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_STM32F7_ETHMAC_HPWORK nor CONFIG_STM32F7_ETHMAC_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_STM32F7_PHYADDR
|
#ifndef CONFIG_STM32F7_PHYADDR
|
||||||
@@ -2252,11 +2264,11 @@ static int stm32_interrupt(int irq, void *context)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_interrupt_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -2372,11 +2384,11 @@ static void stm32_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_txtimeout_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
@@ -2516,7 +2528,7 @@ static void stm32_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2732,7 +2744,7 @@ static int stm32_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, stm32_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, stm32_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -1100,6 +1100,25 @@ config TIVA_EMAC_HWCHECKSUM
|
|||||||
---help---
|
---help---
|
||||||
Use the hardware checksum capabilities of the Tiva chip
|
Use the hardware checksum capabilities of the Tiva chip
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Work queue"
|
||||||
|
default TIVA_ETHERNET_LPWORK if SCHED_LPWORK
|
||||||
|
default TIVA_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 TIVA_ETHERNET_HPWORK
|
||||||
|
bool "High priority"
|
||||||
|
depends on SCHED_HPWORK
|
||||||
|
|
||||||
|
config TIVA_ETHERNET_LPWORK
|
||||||
|
bool "Low priority"
|
||||||
|
depends on SCHED_LPWORK
|
||||||
|
|
||||||
|
endchoice # Work queue
|
||||||
config TIVA_ETHERNET_REGDEBUG
|
config TIVA_ETHERNET_REGDEBUG
|
||||||
bool "Register-Level Debug"
|
bool "Register-Level Debug"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -98,12 +98,24 @@
|
|||||||
# error Logic to support multiple Ethernet interfaces is incomplete
|
# error Logic to support multiple Ethernet interfaces is incomplete
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If processing is not done at the interrupt level, then high priority
|
/* If processing is not done at the interrupt level, then work queue support
|
||||||
* work queue support is required.
|
* is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
|
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
# error High priority work queue support is required
|
# error Work queue support is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Select work queue */
|
||||||
|
|
||||||
|
#if defined(CONFIG_SCHED_WORKQUEUE)
|
||||||
|
# if defined(CONFIG_TIVA_ETHERNET_HPWORK)
|
||||||
|
# define ETHWORK HPWORK
|
||||||
|
# elif defined(CONFIG_TIVA_ETHERNET_LPWORK)
|
||||||
|
# define ETHWORK LPWORK
|
||||||
|
# else
|
||||||
|
# error Neither CONFIG_TIVA_ETHERNET_HPWORK nor CONFIG_TIVA_ETHERNET_LPWORK defined
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Are we using the internal PHY or an external PHY? */
|
/* Are we using the internal PHY or an external PHY? */
|
||||||
@@ -2167,11 +2179,11 @@ static int tiva_interrupt(int irq, FAR void *context)
|
|||||||
|
|
||||||
/* Cancel any pending poll work */
|
/* Cancel any pending poll work */
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, tiva_interrupt_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, tiva_interrupt_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -2303,11 +2315,11 @@ static void tiva_txtimeout_expiry(int argc, uint32_t arg, ...)
|
|||||||
* on work that has already been started.
|
* on work that has already been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
work_cancel(HPWORK, &priv->work);
|
work_cancel(ETHWORK, &priv->work);
|
||||||
|
|
||||||
/* Schedule to perform the TX timeout processing on the worker thread. */
|
/* Schedule to perform the TX timeout processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, tiva_txtimeout_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, tiva_txtimeout_work, priv, 0);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Process the timeout now */
|
/* Process the timeout now */
|
||||||
@@ -2447,7 +2459,7 @@ static void tiva_poll_expiry(int argc, uint32_t arg, ...)
|
|||||||
{
|
{
|
||||||
/* Schedule to perform the interrupt processing on the worker thread. */
|
/* Schedule to perform the interrupt processing on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, tiva_poll_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, tiva_poll_work, priv, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2662,7 +2674,7 @@ static int tiva_txavail(struct net_driver_s *dev)
|
|||||||
{
|
{
|
||||||
/* Schedule to serialize the poll on the worker thread. */
|
/* Schedule to serialize the poll on the worker thread. */
|
||||||
|
|
||||||
work_queue(HPWORK, &priv->work, tiva_txavail_work, priv, 0);
|
work_queue(ETHWORK, &priv->work, tiva_txavail_work, priv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
+12
-4
@@ -24,7 +24,9 @@ choice
|
|||||||
default LOOPBACK_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
default LOOPBACK_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||||
depends on SCHED_WORKQUEUE
|
depends on SCHED_WORKQUEUE
|
||||||
---help---
|
---help---
|
||||||
Work queue support is required to use the LOOPBACK driver. If the low priority work queue is available, then it should be used by the LOOPBACK.
|
Work queue support is required to use the loopback driver. If the
|
||||||
|
low priority work queue is available, then it should be used by the
|
||||||
|
loopback driver.
|
||||||
|
|
||||||
config LOOPBACK_HPWORK
|
config LOOPBACK_HPWORK
|
||||||
bool "High priority"
|
bool "High priority"
|
||||||
@@ -245,7 +247,9 @@ choice
|
|||||||
default ENC28J60_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
default ENC28J60_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||||
depends on SCHED_WORKQUEUE
|
depends on SCHED_WORKQUEUE
|
||||||
---help---
|
---help---
|
||||||
Work queue support is required to use the ENC28J60 driver. If the low priority work queue is available, then it should be used by the ENC28J60.
|
Work queue support is required to use the ENC28J60 driver. If the
|
||||||
|
low priority work queue is available, then it should be used by the
|
||||||
|
ENC28J60 driver.
|
||||||
|
|
||||||
config ENC28J60_HPWORK
|
config ENC28J60_HPWORK
|
||||||
bool "High priority"
|
bool "High priority"
|
||||||
@@ -332,7 +336,9 @@ choice
|
|||||||
default ENCX24J600_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
default ENCX24J600_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||||
depends on SCHED_WORKQUEUE
|
depends on SCHED_WORKQUEUE
|
||||||
---help---
|
---help---
|
||||||
Work queue support is required to use the ENCX24J600 driver. If the low priority work queue is available, then it should be used by the ENCX24J600.
|
Work queue support is required to use the ENCX24J600 driver. If the
|
||||||
|
low priority work queue is available, then it should be used by the
|
||||||
|
ENCX24J600 driver.
|
||||||
|
|
||||||
config ENCX24J600_HPWORK
|
config ENCX24J600_HPWORK
|
||||||
bool "High priority"
|
bool "High priority"
|
||||||
@@ -444,7 +450,9 @@ choice
|
|||||||
default FTMAC100_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
default FTMAC100_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||||
depends on SCHED_WORKQUEUE
|
depends on SCHED_WORKQUEUE
|
||||||
---help---
|
---help---
|
||||||
Work queue support is required to use the FTMAC100 driver. If the low priority work queue is available, then it should be used by the FTMAC100.
|
Work queue support is required to use the FTMAC100 driver. If the
|
||||||
|
low priority work queue is available, then it should be used by the
|
||||||
|
FTMAC100 driver.
|
||||||
|
|
||||||
config FTMAC100_HPWORK
|
config FTMAC100_HPWORK
|
||||||
bool "High priority"
|
bool "High priority"
|
||||||
|
|||||||
+3
-1
@@ -247,7 +247,9 @@ choice
|
|||||||
default TUN_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
default TUN_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
|
||||||
depends on SCHED_WORKQUEUE
|
depends on SCHED_WORKQUEUE
|
||||||
---help---
|
---help---
|
||||||
Work queue support is required to use the TUN driver. If the low priority work queue is available, then it should be used by the TUN.
|
Work queue support is required to use the TUN driver. If the
|
||||||
|
low priority work queue is available, then it should be used by the
|
||||||
|
TUN driver.
|
||||||
|
|
||||||
config TUN_HPWORK
|
config TUN_HPWORK
|
||||||
bool "High priority"
|
bool "High priority"
|
||||||
|
|||||||
Reference in New Issue
Block a user