Changeset f1c53e8e in rtems


Ignore:
Timestamp:
Dec 11, 2007, 3:50:22 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
4130d8e2
Parents:
bdb6005
Message:

2007-12-11 Joel Sherrill <joel.sherrill@…>

  • clock/clockdrv.c, include/bsp.h, startup/bspstart.c: Eliminate copies of the Configuration Table. Use the RTEMS provided accessor macros to obtain configuration fields.
Location:
c/src/lib/libbsp/arm
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/edb7312/ChangeLog

    rbdb6005 rf1c53e8e  
     12007-12-11      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * clock/clockdrv.c, include/bsp.h, startup/bspstart.c: Eliminate copies
     4        of the Configuration Table. Use the RTEMS provided accessor macros to
     5        obtain configuration fields.
     6
    172007-12-04      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c

    rbdb6005 rf1c53e8e  
    4949  do {                                                                        \
    5050    *EP7312_SYSCON1 |= EP7312_SYSCON1_TC1_PRESCALE;                         \
    51     *EP7312_TC1D =(BSP_Configuration.microseconds_per_tick * 2000)/1000000; \
     51    *EP7312_TC1D =(rtems_configuration_get_microseconds_per_tick() * 2000)/1000000; \
    5252    *EP7312_TC1EOI = 0xFFFFFFFF;                                            \
    5353  } while (0)
  • c/src/lib/libbsp/arm/edb7312/include/bsp.h

    rbdb6005 rf1c53e8e  
    3838#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
    3939
    40 extern rtems_configuration_table BSP_Configuration;
    41 
    4240/*
    4341 * Network driver configuration
  • c/src/lib/libbsp/arm/edb7312/startup/bspstart.c

    rbdb6005 rf1c53e8e  
    3838unsigned long           free_mem_start;
    3939unsigned long           free_mem_end;
    40 
    41 /* The original BSP configuration table from the application and our copy of it
    42    with some changes. */
    43 
    44 extern rtems_configuration_table  Configuration;
    45        rtems_configuration_table  BSP_Configuration;
    46 
    47 char            *rtems_progname;              /* Program name - from main(). */
    4840
    4941/*************************************************************/
     
    108100/*                                                                        */
    109101/* GLOBALS USED:                                                          */
    110 /*    CPU_table                                                    */
    111 /*    BSP_Configuration                                            */
    112 /*    free_mem_start                                               */
    113 /*    free_mem_end                                                 */
    114 /*    free_mem_nocache_start                                       */
    115 /*    _bss_free_start                                              */
    116 /*    mpu_region_tbl                                               */
     102/*    CPU_table                                                           */
     103/*    Configuration                                                       */
     104/*    free_mem_start                                                      */
     105/*    free_mem_end                                                        */
     106/*    free_mem_nocache_start                                              */
     107/*    _bss_free_start                                                     */
     108/*    mpu_region_tbl                                                      */
    117109/*                                                                        */
    118110/*                                                                        */
     
    130122
    131123    /* Place RTEMS workspace at beginning of free memory. */
    132     BSP_Configuration.work_space_start = (void *)&_bss_free_start;
     124    Configuration.work_space_start = (void *)&_bss_free_start;
    133125
    134126    free_mem_start = ((uint32_t)&_bss_free_start +
    135                       BSP_Configuration.work_space_size);
     127                      rtems_configuration_get_work_space_size());
    136128
    137129    free_mem_end = ((uint32_t)&_sdram_base + (uint32_t)&_sdram_size);
     
    151143     */
    152144#if 0
    153     printk( "work_space_size = 0x%x\n", BSP_Configuration.work_space_size );
    154     printk( "maximum_extensions = 0x%x\n", BSP_Configuration.maximum_extensions );
     145    printk( "work_space_size = 0x%x\n",
     146            rtems_configuration_get_work_space_size() );
    155147    printk( "microseconds_per_tick = 0x%x\n",
    156             BSP_Configuration.microseconds_per_tick );
     148            rtems_configuration_get_microseconds_per_tick() );
    157149    printk( "ticks_per_timeslice = 0x%x\n",
    158             BSP_Configuration.ticks_per_timeslice );
    159     printk( "number_of_device_drivers = 0x%x\n",
    160             BSP_Configuration.number_of_device_drivers );
    161     printk( "Device_driver_table = 0x%x\n",
    162             BSP_Configuration.Device_driver_table );
     150            rtems_configuration_get_ticks_per_timeslice() );
    163151
    164152    /*  printk( "_stack_size = 0x%x\n", _stack_size );*/
    165     printk( "work_space_start = 0x%x\n", BSP_Configuration.work_space_start );
    166     printk( "work_space_size = 0x%x\n", BSP_Configuration.work_space_size );
     153    printk( "work_space_start = 0x%x\n", Configuration.work_space_start );
     154    printk( "work_space_size = 0x%x\n", rtems_configuration_get_work_space_size() );
    167155#endif
    168156} /* bsp_start */
  • c/src/lib/libbsp/arm/gba/ChangeLog

    rbdb6005 rf1c53e8e  
     12007-12-11      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * clock/clockdrv.c, include/bsp.h, startup/bspstart.c: Eliminate copies
     4        of the Configuration Table. Use the RTEMS provided accessor macros to
     5        obtain configuration fields.
     6
    172007-12-04      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • c/src/lib/libbsp/arm/gba/clock/clockdrv.c

    rbdb6005 rf1c53e8e  
    7575#endif
    7676
    77 
    78 extern rtems_configuration_table BSP_Configuration;
    79 
    8077/**
    8178 *  @brief This function set up the clock hardware
     
    8683void Clock_driver_support_initialize_hardware()
    8784{
    88   int tmreload = ((BSP_Configuration.microseconds_per_tick*1000)/__TimTickTime_ns);
     85  int tmreload = ((rtems_configuration_get_microseconds_per_tick()*1000)/__TimTickTime_ns);
    8986
    9087  if (tmreload>0xFFFF) tmreload = 0xFFFF;
  • c/src/lib/libbsp/arm/gba/include/bsp.h

    rbdb6005 rf1c53e8e  
    4848  }
    4949
    50 /** Our copy of BSP configuration table from the application. */
    51 extern rtems_configuration_table BSP_Configuration;
    52 
    5350/** gba_zero_memory library function in start.S  */
    5451extern void gba_zero_memory(int start, int stop);
  • c/src/lib/libbsp/arm/gba/startup/bspstart.c

    rbdb6005 rf1c53e8e  
    5151extern  void __bss_end;
    5252
    53 /**  The original BSP configuration table from the application. */
    54 extern rtems_configuration_table  Configuration;
    55 /** Our copy of BSP configuration table from the application. */
    56 rtems_configuration_table  BSP_Configuration;
    57 
    5853/* External Prototypes */
    5954extern void bsp_cleanup( void );
     
    7469/** Address of start of free memory - should be updated after creating new partitions or regions.*/
    7570uint32_t   rtemsFreeMemStart;
    76 
    77 /** Program name - from main(). */
    78 char              *rtems_progname;
    79 
    8071
    8172/**
     
    141132
    142133  /* Place RTEMS workspace at beginning of free memory. */
    143   BSP_Configuration.work_space_start = (void *)rtemsFreeMemStart;
    144   rtemsFreeMemStart += BSP_Configuration.work_space_size;
     134  Configuration.work_space_start = (void *)rtemsFreeMemStart;
     135  rtemsFreeMemStart += rtems_configuration_get_work_space_size();
    145136
    146137  /* Init conio  */
     
    159150  printk("rtemsFreeMemStart= 0x%x\n", rtemsFreeMemStart);
    160151  printk("__heap_limit     = 0x%x\n", (uint32_t)&__heap_limit);
    161   printk("work_space_start = 0x%x size = 0x%x\n", BSP_Configuration.work_space_start,BSP_Configuration.work_space_size);
    162   printk("maximum_extensions    = 0x%x\n", BSP_Configuration.maximum_extensions);
    163   printk("microseconds_per_tick = 0x%x\n", BSP_Configuration.microseconds_per_tick);
    164   printk("ticks_per_timeslice   = 0x%x\n", BSP_Configuration.ticks_per_timeslice);
    165   printk("number_of_device_drivers = 0x%x\n", BSP_Configuration.number_of_device_drivers);
    166   printk("Device_driver_table      = 0x%x\n", BSP_Configuration.Device_driver_table);
     152  printk("work_space_start = 0x%x size = 0x%x\n",
     153          Configuration.work_space_start,
     154          rtems_configuration_get_work_space_size());
     155  printk("microseconds_per_tick = 0x%x\n",
     156          rtems_configuration_get_microseconds_per_tick());
     157  printk("ticks_per_timeslice   = 0x%x\n",
     158          rtems_configuration_get_ticks_per_timeslice());
    167159#endif
    168160
Note: See TracChangeset for help on using the changeset viewer.