summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/sh
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-26 06:34:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-05 13:41:06 +0200
commit8776bb94197613a369b47b3adf4b2d4e0ba766ed (patch)
tree37f2177f56e8d758bc4433ea8f8d98851fa81a18 /cpukit/score/cpu/sh
parentdev/sc16is752: Deal with a baud of zero (diff)
downloadrtems-8776bb94197613a369b47b3adf4b2d4e0ba766ed.tar.bz2
score: Remove CPU_PROVIDES_IDLE_THREAD_BODY
Remove the CPU_PROVIDES_IDLE_THREAD_BODY option to avoid unnecessary conditional compilation. Close #3539.
Diffstat (limited to 'cpukit/score/cpu/sh')
-rw-r--r--cpukit/score/cpu/sh/Makefile.am1
-rw-r--r--cpukit/score/cpu/sh/cpu.c28
-rw-r--r--cpukit/score/cpu/sh/include/rtems/score/cpu.h32
3 files changed, 1 insertions, 60 deletions
diff --git a/cpukit/score/cpu/sh/Makefile.am b/cpukit/score/cpu/sh/Makefile.am
index 37188443ff..b4a125fd81 100644
--- a/cpukit/score/cpu/sh/Makefile.am
+++ b/cpukit/score/cpu/sh/Makefile.am
@@ -4,6 +4,7 @@ noinst_LIBRARIES = libscorecpu.a
libscorecpu_a_SOURCES = cpu.c context.c
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
+libscorecpu_a_SOURCES += ../no_cpu/cpuidle.c
libscorecpu_a_SOURCES += sh-exception-frame-print.c
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/cpukit/score/cpu/sh/cpu.c b/cpukit/score/cpu/sh/cpu.c
index 8988da98ce..b1e8766ff0 100644
--- a/cpukit/score/cpu/sh/cpu.c
+++ b/cpukit/score/cpu/sh/cpu.c
@@ -175,34 +175,6 @@ void _CPU_ISR_install_vector(
_ISR_Vector_table[ vector ] = new_handler;
}
-/*
- * _CPU_Thread_Idle_body
- *
- * NOTES:
- *
- * 1. This is the same as the regular CPU independent algorithm.
- *
- * 2. If you implement this using a "halt", "idle", or "shutdown"
- * instruction, then don't forget to put it in an infinite loop.
- *
- * 3. Be warned. Some processors with onboard DMA have been known
- * to stop the DMA if the CPU were put in IDLE mode. This might
- * also be a problem with other on-chip peripherals. So use this
- * hook with caution.
- */
-
-#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
-void *_CPU_Thread_Idle_body( uintptr_t ignored )
-{
-
- for( ; ; )
- {
- __asm__ volatile("nop");
- }
- /* insert your "halt" instruction here */ ;
-}
-#endif
-
void _CPU_Context_Initialize(
Context_Control *_the_context,
void *_stack_base,
diff --git a/cpukit/score/cpu/sh/include/rtems/score/cpu.h b/cpukit/score/cpu/sh/include/rtems/score/cpu.h
index a61355d858..61d8e56448 100644
--- a/cpukit/score/cpu/sh/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sh/include/rtems/score/cpu.h
@@ -148,29 +148,6 @@ extern "C" {
#define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE
/*
- * Does this port provide a CPU dependent IDLE task implementation?
- *
- * If TRUE, then the routine _CPU_Thread_Idle_body
- * must be provided and is the default IDLE thread body instead of
- * _CPU_Thread_Idle_body.
- *
- * If FALSE, then use the generic IDLE thread body if the BSP does
- * not provide one.
- *
- * This is intended to allow for supporting processors which have
- * a low power or idle mode. When the IDLE thread is executed, then
- * the CPU can be powered down.
- *
- * The order of precedence for selecting the IDLE thread body is:
- *
- * 1. BSP provided
- * 2. CPU dependent (if provided)
- * 3. generic (if no BSP and no CPU dependent)
- */
-
-#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE
-
-/*
* Does the stack grow up (toward higher addresses) or down
* (toward lower addresses)?
*
@@ -594,15 +571,6 @@ void _CPU_ISR_install_vector(
proc_ptr *old_handler
);
-/*
- * _CPU_Thread_Idle_body
- *
- * This routine is the CPU dependent IDLE thread body.
- *
- * NOTE: It need only be provided if CPU_PROVIDES_IDLE_THREAD_BODY
- * is TRUE.
- */
-
void *_CPU_Thread_Idle_body( uintptr_t ignored );
/*