Changeset 3a3869c4 in rtems


Ignore:
Timestamp:
May 9, 2014, 12:25:40 PM (5 years ago)
Author:
Christian Mauderer <Christian.Mauderer@…>
Branches:
4.11, master
Children:
6339cd2d
Parents:
89f0794
git-author:
Christian Mauderer <Christian.Mauderer@…> (05/09/14 12:25:40)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/12/14 06:37:00)
Message:

bsps/sparc: Move flags to grlib header

This enables re-use for other BSPs

Location:
c/src/lib/libbsp/sparc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/clock/ckinit.c

    r89f0794 r3a3869c4  
    114114    \
    115115    LEON3_Timer_Regs->timer[LEON3_CLOCK_INDEX].ctrl = \
    116       LEON3_GPTIMER_EN | LEON3_GPTIMER_RL | \
    117         LEON3_GPTIMER_LD | LEON3_GPTIMER_IRQEN; \
     116      GPTIMER_TIMER_CTRL_EN | GPTIMER_TIMER_CTRL_RS | \
     117        GPTIMER_TIMER_CTRL_LD | GPTIMER_TIMER_CTRL_IE; \
    118118  } while (0)
    119119
  • c/src/lib/libbsp/sparc/leon3/include/leon.h

    r89f0794 r3a3869c4  
    144144
    145145/* Macros used for manipulating bits in LEON3 GP Timer Control Register */
    146 
    147 #define LEON3_GPTIMER_EN 1
    148 #define LEON3_GPTIMER_RL 2
    149 #define LEON3_GPTIMER_LD 4
    150 #define LEON3_GPTIMER_IRQEN 8
    151146
    152147#define LEON3_MP_IRQ    14        /* Irq used by shared memory driver */
  • c/src/lib/libbsp/sparc/leon3/startup/cpucounter.c

    r89f0794 r3a3869c4  
    114114      gpt->scaler_reload = min_prescaler - 1;
    115115      gpt->timer[0].reload = 0xffffffff;
    116       gpt->timer[0].ctrl = LEON3_GPTIMER_EN | LEON3_GPTIMER_RL
    117         | LEON3_GPTIMER_LD;
     116      gpt->timer[0].ctrl = GPTIMER_TIMER_CTRL_EN | GPTIMER_TIMER_CTRL_RS
     117        | GPTIMER_TIMER_CTRL_LD;
    118118
    119119      gpt_counter_initialize(gpt, 0, frequency, free_counter_difference);
  • c/src/lib/libbsp/sparc/leon3/timer/timer.c

    r89f0794 r3a3869c4  
    4949      benchmark_timer_is_initialized = true;
    5050    }
    51     LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].ctrl = LEON3_GPTIMER_EN | LEON3_GPTIMER_LD;
     51    LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].ctrl =
     52      GPTIMER_TIMER_CTRL_EN | GPTIMER_TIMER_CTRL_LD;
    5253  }
    5354}
  • c/src/lib/libbsp/sparc/shared/include/grlib.h

    r89f0794 r3a3869c4  
    7979};
    8080
     81#define GPTIMER_TIMER_CTRL_EN 0x00000001U
     82#define GPTIMER_TIMER_CTRL_RS 0x00000002U
     83#define GPTIMER_TIMER_CTRL_LD 0x00000004U
     84#define GPTIMER_TIMER_CTRL_IE 0x00000008U
     85#define GPTIMER_TIMER_CTRL_IP 0x00000010U
     86#define GPTIMER_TIMER_CTRL_CH 0x00000020U
     87#define GPTIMER_TIMER_CTRL_DH 0x00000040U
     88
    8189/* GPTIMER common registers */
    8290struct gptimer_regs {
Note: See TracChangeset for help on using the changeset viewer.