[PATCH 01/23] sapi: Use rtems_config*_get_microseconds_per_tick

Gedare Bloom gedare at rtems.org
Tue Nov 6 15:25:14 UTC 2012


Can you provide some background on this patch series?
-Gedare
On Tue, Nov 6, 2012 at 7:56 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> ---
>  c/src/lib/libbsp/m68k/idp/clock/ckinit.c     |    2 +-
>  c/src/lib/libbsp/m68k/mcf52235/clock/clock.c |    4 ++--
>  c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c |    4 ++--
>  c/src/lib/libbsp/m68k/mcf5329/clock/clock.c  |    4 ++--
>  c/src/lib/libcpu/arm/pxa255/clock/clock.c    |    8 ++++----
>  cpukit/libmisc/capture/capture.c             |    2 +-
>  6 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
> index efc4aa5..8391f8c 100644
> --- a/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
> +++ b/c/src/lib/libbsp/m68k/idp/clock/ckinit.c
> @@ -90,7 +90,7 @@ void Install_clock(
>    rtems_isr_entry clock_isr )
>  {
>    Clock_driver_ticks = 0;
> -  Clock_isrs = (int)(Configuration.microseconds_per_tick / 1000);
> +  Clock_isrs = (int)(rtems_configuration_get_microseconds_per_tick() / 1000);
>
>  /*    led_putnum('c'); * for debugging purposes */
>      Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
> diff --git a/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c b/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c
> index fd79dfe..c22393d 100644
> --- a/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c
> +++ b/c/src/lib/libbsp/m68k/mcf52235/clock/clock.c
> @@ -60,7 +60,7 @@ static void Clock_driver_support_shutdown_hardware(void)
>  /*
>   * Set up the clock hardware
>   *
> - * We need to have 1 interrupt every BSP_Configuration.microseconds_per_tick
> + * We need to have 1 interrupt every rtems_configuration_get_microseconds_per_tick()
>   */
>  static void Clock_driver_support_initialize_hardware(void)
>  {
> @@ -68,7 +68,7 @@ static void Clock_driver_support_initialize_hardware(void)
>    uint32_t pmr;
>    uint32_t preScaleCode = 0;
>    uint32_t clk = bsp_get_CPU_clock_speed() >> 1;
> -  uint32_t tps = 1000000 / Configuration.microseconds_per_tick;
> +  uint32_t tps = 1000000 / rtems_configuration_get_microseconds_per_tick();
>
>    while (preScaleCode < 15) {
>      pmr = (clk >> preScaleCode) / tps;
> diff --git a/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c b/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c
> index 4e18828..d058126 100644
> --- a/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c
> +++ b/c/src/lib/libbsp/m68k/mcf5225x/clock/clock.c
> @@ -52,7 +52,7 @@ static void Clock_driver_support_shutdown_hardware(void)
>  /*
>   * Set up the clock hardware
>   *
> - * We need to have 1 interrupt every BSP_Configuration.microseconds_per_tick
> + * We need to have 1 interrupt every BSP_rtems_configuration_get_microseconds_per_tick()
>   */
>  static void Clock_driver_support_initialize_hardware(void)
>  {
> @@ -60,7 +60,7 @@ static void Clock_driver_support_initialize_hardware(void)
>    uint32_t pmr;
>    uint32_t preScaleCode = 0;
>    uint32_t clk = bsp_get_CPU_clock_speed() >> 1;
> -  uint32_t tps = 1000000 / Configuration.microseconds_per_tick;
> +  uint32_t tps = 1000000 / rtems_configuration_get_microseconds_per_tick();
>
>    while (preScaleCode < 15) {
>      pmr = (clk >> preScaleCode) / tps;
> diff --git a/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c b/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c
> index a96e211..ed11320 100644
> --- a/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c
> +++ b/c/src/lib/libbsp/m68k/mcf5329/clock/clock.c
> @@ -59,7 +59,7 @@ static void Clock_driver_support_shutdown_hardware(void)
>  /*
>   * Set up the clock hardware
>   *
> - * We need to have 1 interrupt every BSP_Configuration.microseconds_per_tick
> + * We need to have 1 interrupt every rtems_configuration_get_microseconds_per_tick()
>   */
>  static void Clock_driver_support_initialize_hardware(void)
>  {
> @@ -67,7 +67,7 @@ static void Clock_driver_support_initialize_hardware(void)
>    uint32_t pmr;
>    uint32_t preScaleCode = 0;
>    uint32_t clk = bsp_get_BUS_clock_speed();
> -  uint32_t tps = 1000000 / Configuration.microseconds_per_tick;
> +  uint32_t tps = 1000000 / rtems_configuration_get_microseconds_per_tick();
>
>    while (preScaleCode < 15) {
>      pmr = (clk >> preScaleCode) / tps;
> diff --git a/c/src/lib/libcpu/arm/pxa255/clock/clock.c b/c/src/lib/libcpu/arm/pxa255/clock/clock.c
> index 0bb2b08..0736b14 100644
> --- a/c/src/lib/libcpu/arm/pxa255/clock/clock.c
> +++ b/c/src/lib/libcpu/arm/pxa255/clock/clock.c
> @@ -50,9 +50,9 @@ static void clock_isr_on(const rtems_irq_connect_data *unused)
>    XSCALE_OS_TIMER_IER |= 0x1;
>
>  #if ON_SKYEYE==1
> -  period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/100000;
> +  period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/100000;
>  #else
> -  period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
> +  period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/10000;
>  #endif
>
>    XSCALE_OS_TIMER_MR0 = XSCALE_OS_TIMER_TCR + period_num;
> @@ -103,9 +103,9 @@ rtems_irq_connect_data clock_isr_data = {
>  void Clock_driver_support_initialize_hardware(void)
>  {
>  #if ON_SKYEYE==1
> -  period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/100000;
> +  period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/100000;
>  #else
> -  period_num = (TIMER_RATE* Configuration.microseconds_per_tick)/10000;
> +  period_num = (TIMER_RATE* rtems_configuration_get_microseconds_per_tick())/10000;
>  #endif
>  }
>
> diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c
> index 9f068f9..d3f8c5b 100644
> --- a/cpukit/libmisc/capture/capture.c
> +++ b/cpukit/libmisc/capture/capture.c
> @@ -1031,7 +1031,7 @@ rtems_capture_open (uint32_t   size, rtems_capture_timestamp timestamp __attribu
>    /*
>     * Get the tick period from the BSP Configuration Table.
>     */
> -  capture_tick_period = Configuration.microseconds_per_tick;
> +  capture_tick_period = rtems_configuration_get_microseconds_per_tick();
>
>    /*
>     * Register the user extension handlers for the CAPture Engine.
> --
> 1.7.7
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel



More information about the devel mailing list