arch: cxd56xx: Add CONFIG_ARCH_LEDS_CPU_ACTIVITY to cxd56_idle.c and cxd56_irq.c

Summary:
- This commit adds CPU activity LED feature to cxd56_idle.c and cx56_irq.c
- An LED for the current CPU will turn off before calling WFI
- An LED for the current CPU will turn on when an interrupt happens

Impact:
- CONFIG_ARCH_LEDS_CPU_ACTIVITY=y only

Testing:
- defconfigs will be commited later.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa
2021-03-11 16:15:42 +09:00
committed by Alin Jerpelea
parent d4d996cc28
commit ad094552f8
2 changed files with 9 additions and 3 deletions
+3 -3
View File
@@ -41,9 +41,9 @@
* IDLE state?
*/
#if defined(CONFIG_ARCH_LEDS) && defined(LED_IDLE)
# define BEGIN_IDLE() board_autoled_on(LED_IDLE)
# define END_IDLE() board_autoled_off(LED_IDLE)
#ifdef CONFIG_ARCH_LEDS_CPU_ACTIVITY
# define BEGIN_IDLE() board_autoled_off(LED_CPU)
# define END_IDLE()
#else
# define BEGIN_IDLE()
# define END_IDLE()
+6
View File
@@ -27,9 +27,11 @@
#include <stdint.h>
#include <debug.h>
#include <nuttx/board.h>
#include <nuttx/irq.h>
#include <nuttx/arch.h>
#include <arch/irq.h>
#include <arch/board/board.h>
#include "chip.h"
#include "nvic.h"
@@ -564,6 +566,10 @@ void up_enable_irq(int irq)
void arm_ack_irq(int irq)
{
#ifdef CONFIG_ARCH_LEDS_CPU_ACTIVITY
board_autoled_on(LED_CPU);
#endif
/* Check for external interrupt */
if (irq >= CXD56_IRQ_EXTINT)