Changeset 67338ed in rtems


Ignore:
Timestamp:
Nov 15, 2012, 3:57:02 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
da2fa4eb
Parents:
2d561b9
git-author:
Sebastian Huber <sebastian.huber@…> (11/15/12 15:57:02)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/03/12 12:17:10)
Message:

bsp/mpc55xx: Add mpc55xx_wait_for_interrupt()

Use mpc55xx_wait_for_interrupt().

Location:
c/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/bspstart.c

    r2d561b9 r67338ed  
    6262}
    6363
    64 void _BSP_Fatal_error( unsigned n)
     64void _BSP_Fatal_error(unsigned n)
    6565{
    6666        rtems_interrupt_level level;
     
    6868        rtems_interrupt_disable( level);
    6969
    70         printk( "%s PANIC ERROR %u\n", _RTEMS_version, n);
    71 
    72         while (1) {
    73                 /* Do nothing */
     70        while (true) {
     71                mpc55xx_wait_for_interrupt();
    7472        }
    7573}
  • c/src/lib/libbsp/powerpc/mpc55xxevb/startup/idle-thread.c

    r2d561b9 r67338ed  
    2323#include <bsp.h>
    2424
    25 #include <mpc55xx/regs.h>
     25#include <mpc55xx/mpc55xx.h>
    2626
    2727void *bsp_idle_thread(uintptr_t arg)
    2828{
    2929  while (true) {
    30     #ifdef MPC55XX_HAS_WAIT_INSTRUCTION
    31       __asm__ volatile ("wait");
    32     #endif
     30    mpc55xx_wait_for_interrupt();
    3331  }
    3432
  • c/src/lib/libcpu/powerpc/mpc55xx/include/mpc55xx.h

    r2d561b9 r67338ed  
    88
    99/*
    10  * Copyright (c) 2008-2011 embedded brains GmbH.  All rights reserved.
     10 * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
    1111 *
    1212 *  embedded brains GmbH
     
    4444
    4545#include <stddef.h>
    46 #include <stdint.h>
     46
     47#include <mpc55xx/regs.h>
     48
     49#ifdef __cplusplus
     50extern "C" {
     51#endif /* __cplusplus */
    4752
    4853int mpc55xx_flash_copy(void *dest, const void *src, size_t nbytes);
     
    125130}
    126131
     132static inline mpc55xx_wait_for_interrupt(void)
     133{
     134  #ifdef MPC55XX_HAS_WAIT_INSTRUCTION
     135    __asm__ volatile ("wait");
     136  #else
     137    __asm__ volatile ("");
     138  #endif
     139}
     140
     141#ifdef __cplusplus
     142}
     143#endif /* __cplusplus */
     144
    127145#endif /* LIBCPU_POWERPC_MPC55XX_H */
Note: See TracChangeset for help on using the changeset viewer.