Changeset 9e602b0 in rtems


Ignore:
Timestamp:
Dec 5, 2007, 10:24:05 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
9a56628
Parents:
7302f4c
Message:

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

  • irq/irq_init.c: Spacing.
Location:
c/src/lib/libbsp/powerpc/psim
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/psim/ChangeLog

    r7302f4c r9e602b0  
     12007-12-04      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * clock/clock.c: Fix typo.
     4
    152007-12-04      Till Straumann <strauman@slac.stanford.edu>
    26
  • c/src/lib/libbsp/powerpc/psim/irq/irq_init.c

    r7302f4c r9e602b0  
    3636static int connected() {return 1;}
    3737
    38 static rtems_irq_connect_data           rtemsIrq[BSP_IRQ_NUMBER];
    39 static rtems_irq_global_settings        initial_config;
    40 static rtems_irq_connect_data           defaultIrq = {
    41   /* vectorIdex,         hdl            , handle        , on            , off           , isOn */
    42   0,                     nop_func       , NULL          , nop_func      , nop_func      , not_connected
     38static rtems_irq_connect_data      rtemsIrq[BSP_IRQ_NUMBER];
     39static rtems_irq_global_settings   initial_config;
     40static rtems_irq_connect_data      defaultIrq = {
     41  /* vectorIdex,     hdl   , handle  , on       , off      , isOn */
     42      0,          nop_func , NULL    , nop_func , nop_func , not_connected
    4343};
    4444static rtems_irq_prio irqPrioTable[BSP_IRQ_NUMBER]={
     
    6666   * Initialize Rtems management interrupt table
    6767   */
     68  /*
     69   * re-init the rtemsIrq table
     70   */
     71  for (i = 0; i < BSP_IRQ_NUMBER; i++) {
     72    rtemsIrq[i]      = defaultIrq;
     73    rtemsIrq[i].name = i;
     74  }
     75  /*
     76   * Init initial Interrupt management config
     77   */
     78  initial_config.irqNb        = BSP_IRQ_NUMBER;
     79  initial_config.defaultEntry = defaultIrq;
     80  initial_config.irqHdlTbl    = rtemsIrq;
     81  initial_config.irqBase      = BSP_LOWEST_OFFSET;
     82  initial_config.irqPrioTbl   = irqPrioTable;
     83
     84  if (!BSP_rtems_irq_mngt_set(&initial_config)) {
    6885    /*
    69      * re-init the rtemsIrq table
     86     * put something here that will show the failure...
    7087     */
    71     for (i = 0; i < BSP_IRQ_NUMBER; i++) {
    72       rtemsIrq[i]      = defaultIrq;
    73       rtemsIrq[i].name = i;
    74     }
    75     /*
    76      * Init initial Interrupt management config
    77      */
    78     initial_config.irqNb        = BSP_IRQ_NUMBER;
    79     initial_config.defaultEntry = defaultIrq;
    80     initial_config.irqHdlTbl    = rtemsIrq;
    81     initial_config.irqBase      = BSP_LOWEST_OFFSET;
    82     initial_config.irqPrioTbl   = irqPrioTable;
     88    BSP_panic(
     89      "Unable to initialize RTEMS interrupt Management!!! System locked\n"
     90    );
     91  }
     92 
     93  /*
     94   * We must connect the raw irq handler for the two
     95   * expected interrupt sources : decrementer and external interrupts.
     96   */
     97  vectorDesc.exceptIndex      = ASM_DEC_VECTOR;
     98  vectorDesc.hdl.vector       = ASM_DEC_VECTOR;
     99  vectorDesc.hdl.raw_hdl      = decrementer_exception_vector_prolog_code;
     100  vectorDesc.hdl.raw_hdl_size =
     101     (unsigned) decrementer_exception_vector_prolog_code_size;
     102  vectorDesc.on               =   nop_func;
     103  vectorDesc.off              =   nop_func;
     104  vectorDesc.isOn             =   connected;
     105  if (!ppc_set_exception (&vectorDesc))
     106  {
     107    BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
     108  }
    83109
    84     if (!BSP_rtems_irq_mngt_set(&initial_config)) {
    85       /*
    86        * put something here that will show the failure...
    87        */
    88       BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
    89     }
    90  
    91 #ifdef TRACE_IRQ_INIT 
     110  vectorDesc.exceptIndex      = ASM_EXT_VECTOR;
     111  vectorDesc.hdl.vector       = ASM_EXT_VECTOR;
     112  vectorDesc.hdl.raw_hdl      = external_exception_vector_prolog_code;
     113  vectorDesc.hdl.raw_hdl_size =
     114    (unsigned) external_exception_vector_prolog_code_size;
     115  if (!ppc_set_exception (&vectorDesc)) {
     116    BSP_panic("Unable to initialize RTEMS external raw exception\n");
     117  }
     118  #ifdef TRACE_IRQ_INIT 
    92119    printk("RTEMS IRQ management is now operationnal\n");
    93 #endif
     120  #endif
    94121}
Note: See TracChangeset for help on using the changeset viewer.