source: rtems/c/src/lib/libbsp/powerpc/score603e/irq/no_pic.c @ 31a5ec8

4.9
Last change on this file since 31a5ec8 was 31a5ec8, checked in by Jennifer Averett <Jennifer.Averett@…>, on May 5, 2009 at 4:18:06 PM

2009-05-05 Jennifer Averett <jennifer.averett@…>

  • Makefile.am, README, configure.ac, preinstall.am, PCI_bus/PCI.c, PCI_bus/PCI.h, PCI_bus/flash.c, PCI_bus/universe.c, console/85c30.c, console/85c30.h, console/console.c, console/consolebsp.h, console/tbl85c30.c, include/bsp.h, include/coverhd.h, include/gen2.h, include/irq-config.h, include/tm27.h, irq/FPGA.c, irq/irq.h, irq/irq_init.c, start/start.S, startup/Hwr_init.c, startup/bspstart.c, timer/timer.c, tod/tod.c: Updated and tested with the latest powerpc isr source
  • irq/no_pic.c: New file.
  • irq/irq.c, startup/genpvec.c, startup/setvec.c, startup/vmeintr.c: Removed.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 *
3 *  This file contains the implementation of the function described in irq.h
4 *
5 *  COPYRIGHT (c) 1989-2009.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 */
14
15#include <rtems.h>
16#include <bsp.h>
17#include <bsp/irq.h>
18#include <bsp/irq_supp.h>
19#include <libcpu/raw_exception.h>
20
21static rtems_irq_connect_data *rtems_hdl_tbl;
22static rtems_irq_connect_data  dflt_entry;
23
24/*
25 * High level IRQ handler called from shared_raw_irq_code_entry
26 */
27int C_dispatch_irq_handler(
28  struct _BSP_Exception_frame *frame,
29  unsigned int excNum
30)
31{
32  register unsigned int irq;
33#if (HAS_PMC_PSC8)
34  uint16_t              check_irq;
35  uint16_t              status_word;
36#endif
37
38  if (excNum == ASM_DEC_VECTOR) {
39    bsp_irq_dispatch_list(rtems_hdl_tbl, BSP_DECREMENTER, dflt_entry.hdl);
40    return 0;
41  }
42
43  irq = read_and_clear_irq();
44
45#if (HAS_PMC_PSC8)
46   if (irq ==  SCORE603E_PCI_IRQ_0) {
47     status_word = read_and_clear_PMC_irq( irq );
48     for (check_irq=SCORE603E_IRQ16; check_irq<=SCORE603E_IRQ19; check_irq++) {
49       if ( Is_PMC_IRQ( check_irq, status_word )) {
50         bsp_irq_dispatch_list_base(rtems_hdl_tbl, check_irq, dflt_entry.hdl);
51       }
52     }
53   } else
54#endif
55   {
56    bsp_irq_dispatch_list_base(rtems_hdl_tbl, irq, dflt_entry.hdl);
57   }
58
59  return 0;
60}
61
62void
63BSP_enable_irq_at_pic(const rtems_irq_number irq)
64{
65  uint16_t  vec_idx  = irq - Score_IRQ_First;
66  unmask_irq( vec_idx );
67}
68
69int
70BSP_disable_irq_at_pic(const rtems_irq_number irq)
71{
72  uint16_t  vec_idx  = irq - Score_IRQ_First;
73  unmask_irq( vec_idx );
74  return 0;
75}
76
77int
78BSP_setup_the_pic(rtems_irq_global_settings *config)
79{
80  dflt_entry    = config->defaultEntry;
81  rtems_hdl_tbl = config->irqHdlTbl;
82  init_irq_data_register();
83  return 1;
84}
Note: See TracBrowser for help on using the repository browser.