forked from Imagelibrary/rtems
bsp/mpc55xx: Fix bsp_idle_thread()
This commit is contained in:
@@ -69,12 +69,12 @@ libbsp_a_SOURCES += ../../shared/src/stackalloc.c
|
||||
libbsp_a_SOURCES += ../shared/src/bsp-start-zero.S
|
||||
libbsp_a_SOURCES += ../shared/src/memcpy.c
|
||||
libbsp_a_SOURCES += ../shared/src/tictac.c
|
||||
libbsp_a_SOURCES += ../shared/startup/bspidle.c
|
||||
libbsp_a_SOURCES += startup/bspstart.c
|
||||
libbsp_a_SOURCES += startup/exc-vector-base.S
|
||||
libbsp_a_SOURCES += startup/get-system-clock.c
|
||||
libbsp_a_SOURCES += startup/reset.c
|
||||
libbsp_a_SOURCES += startup/restart.c
|
||||
libbsp_a_SOURCES += startup/idle-thread.c
|
||||
libbsp_a_SOURCES += startup/start-config-clock.c
|
||||
libbsp_a_SOURCES += startup/start-config-ebi-cs.c
|
||||
libbsp_a_SOURCES += startup/start-config-ebi-cs-cal.c
|
||||
|
||||
@@ -74,18 +74,9 @@ rtems_status_code bsp_register_i2c(void);
|
||||
|
||||
void bsp_restart(void *addr);
|
||||
|
||||
#if MPC55XX_CHIP_TYPE / 10 == 567
|
||||
static void *mpc55xx_idle_task(uintptr_t arg)
|
||||
{
|
||||
while (true) {
|
||||
__asm__ volatile ("wait");
|
||||
}
|
||||
void *bsp_idle_thread(uintptr_t arg);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define BSP_IDLE_TASK_BODY mpc55xx_idle_task
|
||||
#endif
|
||||
#define BSP_IDLE_TASK_BODY bsp_idle_thread
|
||||
|
||||
#endif /* ASM */
|
||||
|
||||
|
||||
36
c/src/lib/libbsp/powerpc/mpc55xxevb/startup/idle-thread.c
Normal file
36
c/src/lib/libbsp/powerpc/mpc55xxevb/startup/idle-thread.c
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup mpc55xx
|
||||
*
|
||||
* @brief bsp_idle_thread() implementation.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
|
||||
*
|
||||
* embedded brains GmbH
|
||||
* Obere Lagerstr. 30
|
||||
* 82178 Puchheim
|
||||
* Germany
|
||||
* <rtems@embedded-brains.de>
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#include <mpc55xx/regs.h>
|
||||
|
||||
void *bsp_idle_thread(uintptr_t arg)
|
||||
{
|
||||
while (true) {
|
||||
#ifdef MPC55XX_HAS_WAIT_INSTRUCTION
|
||||
__asm__ volatile ("wait");
|
||||
#endif
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -67,6 +67,7 @@
|
||||
#define MPC55XX_HAS_INSTRUCTION_CACHE
|
||||
#define MPC55XX_HAS_DATA_CACHE
|
||||
#define MPC55XX_HAS_SIU
|
||||
#define MPC55XX_HAS_WAIT_INSTRUCTION
|
||||
#else
|
||||
#error "unsupported chip type"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user