source: rtems/c/src/lib/libbsp/powerpc/psim/irq/no_pic.c @ a9e62c2

4.104.114.95
Last change on this file since a9e62c2 was a9e62c2, checked in by Till Straumann <strauman@…>, on 12/08/07 at 17:26:19

2007-12-08 Till Straumann <strauman@…>

  • ep1a/irq/irq.c, gen5200/irq/irq.c, gen83xx/irq/irq_init.c, mbx8xx/irq/irq.c, mpc8260ads/irq/irq.c, mvme5500/irq/irq.c, psim/irq/no_pic.c, score603e/irq/irq.c, shared/irq/irq_supp.h, shared/irq/openpic_i8259_irq.c, virtex/irq/irq_init.c: let C_dispatch_irq_handler() return zero to indicate to low-level exception handling code that the exception was handled (not used yet).
  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[10483cba]1/*
2 *
3 *  This file contains the implementation of the function described in irq.h
4 *
5 *  Copyright (C) 1998, 1999 valette@crf.canon.fr
6 *
7 *  The license and distribution terms for this file may be
8 *  found in found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  Dummy support for just the decrementer interrupt but no PIC.
12 *
13 *  T. Straumann, 2007/11/30
14 *
[2ae35c2]15 *  $Id$
[10483cba]16 */
[2ae35c2]17
[10483cba]18#include <rtems.h>
19#include <bsp.h>
20#include <bsp/irq.h>
[393a1e05]21#include <bsp/irq_supp.h>
[10483cba]22#include <libcpu/raw_exception.h>
23
24static rtems_irq_connect_data *rtems_hdl_tbl;
[daccc4a]25static rtems_irq_connect_data  dflt_entry;
[10483cba]26
27/*
28 * High level IRQ handler called from shared_raw_irq_code_entry
29 */
[a9e62c2]30int C_dispatch_irq_handler(
[2ae35c2]31  struct _BSP_Exception_frame *frame,
32  unsigned int excNum
33)
[10483cba]34{
[2ae35c2]35  register uint32_t l_orig;
[10483cba]36
[2ae35c2]37  if (excNum == ASM_DEC_VECTOR) {
[10483cba]38
[2ae35c2]39    l_orig = _ISR_Get_level();
40    /* re-enable all interrupts */
41    _ISR_Set_level(0);
[daccc4a]42
[2ae35c2]43    bsp_irq_dispatch_list(rtems_hdl_tbl, BSP_DECREMENTER, dflt_entry.hdl);
[10483cba]44
[2ae35c2]45    _ISR_Set_level(l_orig);
[a9e62c2]46    return 0;
[2ae35c2]47  }
[a9e62c2]48  return -1; /* unhandled interrupt */
[10483cba]49}
50
51void
52BSP_enable_irq_at_pic(const rtems_irq_number irq)
53{
54}
55
[daccc4a]56int
[10483cba]57BSP_disable_irq_at_pic(const rtems_irq_number irq)
58{
[2ae35c2]59  return 0;
[10483cba]60}
61
62int
63BSP_setup_the_pic(rtems_irq_global_settings *config)
64{
[2ae35c2]65  dflt_entry    = config->defaultEntry;
66  rtems_hdl_tbl = config->irqHdlTbl;
67  return 1;
[10483cba]68}
Note: See TracBrowser for help on using the repository browser.