Changeset b450e0c in rtems


Ignore:
Timestamp:
May 24, 2010, 3:19:40 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
75d15858
Parents:
d17733c
Message:

2010-05-24 Peter Dufault <dufault@…>

PR 1530/bsps

  • mpc55xx/edma/edma.c: Eliminate use of recently removed macros.
Location:
c/src/lib/libcpu/powerpc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/ChangeLog

    rd17733c rb450e0c  
     12010-05-24      Peter Dufault <dufault@hda.com>
     2
     3        PR 1530/bsps
     4        * mpc55xx/edma/edma.c: Eliminate use of recently removed macros.
     5
    162010-04-30      Sebastian Huber <sebastian.huber@embedded-brains.de>
    27
  • c/src/lib/libcpu/powerpc/mpc55xx/edma/edma.c

    rd17733c rb450e0c  
    2626
    2727#include <bsp/irq.h>
    28 #include <bsp/utility.h>
    2928
    3029#define RTEMS_STATUS_CHECKS_USE_PRINTK
     
    10099
    101100                        /* Any errors in these channels? */
    102                         if (IS_ANY_FLAG_SET( error_channels, channel_flags)) {
     101                        if ( error_channels & channel_flags ) {
    103102                                /* Get new error channels */
    104103                                uint64_t update = (error_channels & channel_flags) ^ channel_flags;
    105104
    106105                                /* Update error channels */
    107                                 error_channels = SET_FLAGS( error_channels, channel_flags);
     106                                error_channels |= channel_flags;
    108107
    109108                                /* Contribute to the update of this round */
    110                                 error_channels_update = SET_FLAGS( error_channels_update, update);
     109                                error_channels_update |=  update;
    111110                        }
    112111                }
     
    119118                mpc55xx_edma_channel_entry *e = (mpc55xx_edma_channel_entry *) node;
    120119
    121                 if (IS_FLAG_SET( error_channels, MPC55XX_EDMA_CHANNEL_FLAG( e->channel))) {
     120                if ( error_channels & MPC55XX_EDMA_CHANNEL_FLAG( e->channel)) {
    122121                        mpc55xx_edma_enable_hardware_requests( e->channel, false);
    123122
     
    131130        /* Clear the error interrupt requests */
    132131        for (i = 0; i < MPC55XX_EDMA_CHANNEL_COUNT; ++i) {
    133                 if (IS_FLAG_SET( error_channels, MPC55XX_EDMA_CHANNEL_FLAG( i))) {
     132                if ( error_channels & MPC55XX_EDMA_CHANNEL_FLAG( i)) {
    134133                        EDMA.CER.R = (uint8_t) i;
    135134                }
     
    217216        rtems_interrupt_disable( level);
    218217        channel_occupation = mpc55xx_edma_channel_occupation;
    219         if (IS_FLAG_CLEARED( channel_occupation, MPC55XX_EDMA_CHANNEL_FLAG( e->channel))) {
    220                 mpc55xx_edma_channel_occupation = SET_FLAG( channel_occupation, MPC55XX_EDMA_CHANNEL_FLAG( e->channel));
     218        if ( (channel_occupation & MPC55XX_EDMA_CHANNEL_FLAG( e->channel)) == 0 ) {
     219                mpc55xx_edma_channel_occupation = channel_occupation | MPC55XX_EDMA_CHANNEL_FLAG( e->channel);
    221220        }
    222221        rtems_interrupt_enable( level);
    223222
    224223        /* Check channel occupation flag */
    225         if (IS_FLAG_SET( channel_occupation, MPC55XX_EDMA_CHANNEL_FLAG( e->channel))) {
     224        if ( channel_occupation & MPC55XX_EDMA_CHANNEL_FLAG( e->channel)) {
    226225                return RTEMS_RESOURCE_IN_USE;
    227226        }
     
    254253        /* Clear channel occupation flag */
    255254        rtems_interrupt_disable( level);
    256         mpc55xx_edma_channel_occupation = CLEAR_FLAG( mpc55xx_edma_channel_occupation, MPC55XX_EDMA_CHANNEL_FLAG( e->channel));
     255        mpc55xx_edma_channel_occupation &= ~MPC55XX_EDMA_CHANNEL_FLAG( e->channel);
    257256        rtems_interrupt_enable( level);
    258257
Note: See TracChangeset for help on using the changeset viewer.