summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-19 07:56:59 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-19 07:56:59 -0600
commitfdb61a3c601a66e60cc13635d337237d49e73297 (patch)
tree3ea23f17a24ff98cbeef486e5a53435d571ca967
parent725d57285f3d7bd9d72294b241467028689c1940 (diff)
downloadnuttx-fdb61a3c601a66e60cc13635d337237d49e73297.tar.gz
nuttx-fdb61a3c601a66e60cc13635d337237d49e73297.tar.bz2
nuttx-fdb61a3c601a66e60cc13635d337237d49e73297.zip
LPC17xx: Prioritized interrupts are not supported (although hooks are present to prioritize interrupts). Make LPC17 Ethernet default priority to be the system default, not the highest. If the unsupported feature is enabled, then at least it should do no harm
-rw-r--r--nuttx/ChangeLog2
-rw-r--r--nuttx/arch/arm/src/lpc17xx/Kconfig5
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c25
3 files changed, 9 insertions, 23 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 5adf931df..bc54bc698 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -7207,3 +7207,5 @@
fixed number of initializations based a priori knowledge of the number
of interrupt lines in the MCU. This logic is untested on some MCUs
on initial check-in0 (2014-4-17).
+ * arm/src/lpc17xx/Kconfig and lpc17_ethernet.c: The default interrupt
+ priority should be default, not the highest priority (2014-4-19).
diff --git a/nuttx/arch/arm/src/lpc17xx/Kconfig b/nuttx/arch/arm/src/lpc17xx/Kconfig
index d1e76062d..b876835ca 100644
--- a/nuttx/arch/arm/src/lpc17xx/Kconfig
+++ b/nuttx/arch/arm/src/lpc17xx/Kconfig
@@ -668,9 +668,10 @@ config NET_NRXDESC
config NET_PRIORITY
int "Ethernet interrupt priority"
- default 0
+ default 128
+ depends on ARCH_IRQPRIO && EXPERIMENTAL
---help---
- Ethernet interrupt priority. The is default is the higest priority (0).
+ Ethernet interrupt priority. The default is the default priority (128).
config NET_WOL
bool "Wake-up on LAN"
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
index 2b7c157a0..360b6acc9 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_ethernet.c
*
- * Copyright (C) 2010-2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -72,7 +72,7 @@
#if LPC17_NETHCONTROLLERS > 0
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
@@ -104,28 +104,11 @@
#endif
/* If the user did not specify a priority for Ethernet interrupts, set the
- * interrupt priority to the maximum (unless CONFIG_ARMV7M_USEBASEPRI is
- * defined, then set it to the maximum allowable priority).
+ * interrupt priority to the default.
*/
#ifndef CONFIG_NET_PRIORITY
-# ifdef CONFIG_ARMV7M_USEBASEPRI
-# define CONFIG_NET_PRIORITY NVIC_SYSH_DISABLE_PRIORITY
-# else
-# define CONFIG_NET_PRIORITY NVIC_SYSH_PRIORITY_MAX
-# endif
-#endif
-
-/* If the priority is set at the max (0) and CONFIG_ARMV7M_USEBASEPRI is
- * defined, then silently drop the priority to NVIC_SYSH_DISABLE_PRIORITY.
- * In this configuratin, nothing is permitted to run at priority zero
- * except for the SVCALL handler. NVIC_SYSH_DISABLE_PRIORITY is the
- * maximum allowable priority in that case.
- */
-
-#if CONFIG_NET_PRIORITY == 0 && defined(CONFIG_ARMV7M_USEBASEPRI)
-# undef CONFIG_NET_PRIORITY
-# define CONFIG_NET_PRIORITY NVIC_SYSH_DISABLE_PRIORITY
+# define CONFIG_NET_PRIORITY NVIC_SYSH_PRIORITY_DEFAULT
#endif
/* Debug Configuration *****************************************************/