Changeset 7f3c6ce in rtems


Ignore:
Timestamp:
Dec 4, 2007, 10:20:55 PM (13 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
077e302
Parents:
2804a3e7
Message:

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

  • amba/amba.c, clock/ckinit.c, console/console.c, include/bsp.h, startup/bspstart.c, timer/timer.c: Move interrupt_stack_size field from CPU Table to Configuration Table. Eliminate CPU Table from all ports. Delete references to CPU Table in all forms.
Location:
c/src/lib/libbsp/sparc/leon3
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/ChangeLog

    r2804a3e7 r7f3c6ce  
     12007-12-04      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * amba/amba.c, clock/ckinit.c, console/console.c, include/bsp.h,
     4        startup/bspstart.c, timer/timer.c: Move interrupt_stack_size field
     5        from CPU Table to Configuration Table. Eliminate CPU Table from all
     6        ports. Delete references to CPU Table in all forms.
     7
    182007-12-03      Joel Sherrill <joel.sherrill@OARcorp.com>
    29
  • c/src/lib/libbsp/sparc/leon3/amba/amba.c

    r2804a3e7 r7f3c6ce  
    5959    /* Found APB IRQ_MP Interrupt Controller */
    6060    LEON3_IrqCtrl_Regs = (volatile LEON3_IrqCtrl_Regs_Map *) dev.start;
    61     if (Configuration.User_multiprocessing_table != NULL) {
    62       tmp = getasr17();
    63       LEON3_Cpu_Index = (tmp >> 28) & 3;
    64     }
     61    #if defined(RTEMS_MULTIPROCESSING)
     62      if (rtems_configuration_get_user_multiprocessing_table() != NULL) {
     63        tmp = getasr17();
     64        LEON3_Cpu_Index = (tmp >> 28) & 3;
     65      }
     66    #endif
    6567  }
    6668 
  • c/src/lib/libbsp/sparc/leon3/clock/ckinit.c

    r2804a3e7 r7f3c6ce  
    3434extern rtems_configuration_table Configuration;
    3535
    36 #define LEON3_CLOCK_INDEX \
    37   (Configuration.User_multiprocessing_table ? LEON3_Cpu_Index : 0)
     36#if defined(RTEMS_MULTIPROCESSING)
     37  #define LEON3_CLOCK_INDEX \
     38    (rtems_configuration_get_user_multiprocessing_table() ? LEON3_Cpu_Index : 0)
     39#else
     40  #define LEON3_CLOCK_INDEX 0
     41#endif
     42
    3843
    3944volatile LEON3_Timer_Regs_Map *LEON3_Timer_Regs = 0;
     
    4348
    4449#define Clock_driver_support_at_tick()
     50
     51#if defined(RTEMS_MULTIPROCESSING)
     52  #define Adjust_clkirq_for_node() \
     53    do { \
     54      if (rtems_configuration_get_user_multiprocessing_table() != NULL) { \
     55        clkirq += LEON3_Cpu_Index; \
     56      } \
     57    } while(0)
     58#else
     59  #define Adjust_clkirq_for_node()
     60#endif
    4561
    4662#define Clock_driver_support_find_timer() \
     
    5672      clkirq = (LEON3_Timer_Regs->status & 0xfc) >> 3; \
    5773      \
    58       if (Configuration.User_multiprocessing_table != NULL) { \
    59         clkirq += LEON3_Cpu_Index; \
    60       } \
     74      Adjust_clkirq_for_node(); \
    6175    } \
    6276  } while (0)
  • c/src/lib/libbsp/sparc/leon3/console/console.c

    r2804a3e7 r7f3c6ce  
    9191volatile LEON3_UART_Regs_Map *LEON3_Console_Uart[LEON3_APBUARTS];
    9292
    93 int scan_uarts() {     
     93int scan_uarts() {
    9494  int i;
    95         amba_apb_device apbuarts[LEON3_APBUARTS];
    96        
     95  amba_apb_device apbuarts[LEON3_APBUARTS];
     96
    9797  if (isinit == 0) {
    9898    i = 0; uarts = 0;
    9999   
    100     uarts = amba_find_apbslvs(&amba_conf,VENDOR_GAISLER,GAISLER_APBUART,apbuarts,LEON3_APBUARTS);
     100    uarts = amba_find_apbslvs(
     101      &amba_conf, VENDOR_GAISLER, GAISLER_APBUART, apbuarts, LEON3_APBUARTS);
    101102    for(i=0; i<uarts; i++){
    102                         LEON3_Console_Uart[i] = (volatile LEON3_UART_Regs_Map *)apbuarts[i].start;
    103                 }
     103      LEON3_Console_Uart[i] = (volatile LEON3_UART_Regs_Map *)apbuarts[i].start;
     104    }
    104105    isinit = 1;
    105106  }
     
    122123  /* Find UARTs */
    123124  scan_uarts();
    124        
    125   if (Configuration.User_multiprocessing_table != NULL)
    126     uart0 =  LEON3_Cpu_Index;
    127   else
    128     uart0 = 0; 
     125
     126  /* default to zero and override if multiprocessing */
     127  uart0 = 0; 
     128  #if defined(RTEMS_MULTIPROCESSING)
     129    if (rtems_configuration_get_user_multiprocessing_table() != NULL)
     130      uart0 =  LEON3_Cpu_Index;
     131  #endif
    129132
    130133  /*  Register Device Names */
     
    146149
    147150  /*
    148    *  Initialize Hardware
     151   *  Initialize Hardware if ONLY CPU or first CPU in MP system
    149152   */
    150   if ((Configuration.User_multiprocessing_table == NULL) ||
    151       ((Configuration.User_multiprocessing_table)->node == 1))
     153 
     154  #if defined(RTEMS_MULTIPROCESSING)
     155    if ((rtems_configuration_get_user_multiprocessing_table())->node == 1))
     156  #endif
    152157  {
    153158    for (i = uart0; i < uarts; i++)
    154159    {
    155       LEON3_Console_Uart[i]->ctrl |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
     160      LEON3_Console_Uart[i]->ctrl |=
     161        LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
    156162      LEON3_Console_Uart[i]->status = 0; 
    157163    }
  • c/src/lib/libbsp/sparc/leon3/include/bsp.h

    r2804a3e7 r7f3c6ce  
    4444
    4545#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2
    46 #define CONFIGURE_INTERRUPT_STACK_MEMORY  (16 * 1024)
    4746
    4847/*
     
    123122extern rtems_configuration_table BSP_Configuration;     /* owned by BSP */
    124123
    125 extern rtems_cpu_table           Cpu_table;             /* owned by BSP */
    126 
    127124#ifdef __cplusplus
    128125}
  • c/src/lib/libbsp/sparc/leon3/startup/bspstart.c

    r2804a3e7 r7f3c6ce  
    3434extern rtems_configuration_table  Configuration;
    3535rtems_configuration_table         BSP_Configuration;
    36 
    37 rtems_cpu_table Cpu_table;
    3836
    3937/*
     
    113111  unsigned char *work_space_start;
    114112
    115   /*
    116    *  This should be enough interrupt stack.
    117    */
    118   Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
    119 
    120113  work_space_start =
    121114    (unsigned char *)rdb_start - BSP_Configuration.work_space_size;
  • c/src/lib/libbsp/sparc/leon3/timer/timer.c

    r2804a3e7 r7f3c6ce  
    2323#include <bsp.h>
    2424
    25 extern rtems_configuration_table Configuration;
    26 
    27 #define LEON3_TIMER_INDEX \
    28   (Configuration.User_multiprocessing_table ?  \
    29          (Configuration.User_multiprocessing_table)->maximum_nodes + \
    30          (Configuration.User_multiprocessing_table)->node - 1 : 1)
     25#if defined(RTEMS_MULTIPROCESSING)
     26  #define LEON3_TIMER_INDEX \
     27      (rtems_configuration_get_user_multiprocessing_table() ? : \
     28        (rtems_configuration_get_user_multiprocessing_table()->node) - 1 : 1)
     29#else
     30  #define LEON3_TIMER_INDEX 0
     31#endif
    3132
    3233rtems_boolean Timer_driver_Find_average_overhead;
Note: See TracChangeset for help on using the changeset viewer.