diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2007-11-06 22:19:41 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2007-11-06 22:19:41 +0000 |
commit | a4722f82b03d640131e911f1af70672e745ceb8a (patch) | |
tree | 11b3636b49d63ce585f9c121acf825be232e05de /c/src/lib/libbsp/powerpc/score603e/irq | |
parent | 2007-11-06 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-a4722f82b03d640131e911f1af70672e745ceb8a.tar.bz2 |
2007-11-06 Till Straumann <strauman@slac.stanford.edu>
* ep1a/irq/irq.c, gen5200/irq/irq.c, mbx8xx/irq/irq.c,
mpc8260ads/irq/irq.c, mvme5500/irq/irq.c, psim/irq/irq.c,
score603e/irq/irq.c, shared/irq/irq.c:
test for non-NULL-ness before calling 'on'/'off'
methods so that users don't have to provide
no-ops if they don't want this feature.
Diffstat (limited to 'c/src/lib/libbsp/powerpc/score603e/irq')
-rw-r--r-- | c/src/lib/libbsp/powerpc/score603e/irq/irq.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/powerpc/score603e/irq/irq.c b/c/src/lib/libbsp/powerpc/score603e/irq/irq.c index a3f4904791..1e4f0097de 100644 --- a/c/src/lib/libbsp/powerpc/score603e/irq/irq.c +++ b/c/src/lib/libbsp/powerpc/score603e/irq/irq.c @@ -129,7 +129,8 @@ int BSP_install_rtems_shared_irq_handler (const rtems_irq_connect_data* irq) /* * Enable interrupt on device */ - irq->on(irq); + if (irq->on) + irq->on(irq); rtems_interrupt_enable(level); @@ -183,7 +184,8 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq) /* * Enable interrupt on device */ - irq->on(irq); + if (irq->on) + irq->on(irq); rtems_interrupt_enable(level); @@ -268,7 +270,8 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq) /* * Disable interrupt on device */ - irq->off(irq); + if (irq->off) + irq->off(irq); /* * restore the default irq value @@ -332,19 +335,21 @@ int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config) ((int)vchain != -1 && vchain->hdl != default_rtems_entry.hdl); vchain = (rtems_irq_connect_data*)vchain->next_handler ) { - vchain->on(vchain); + if (vchain->on) + vchain->on(vchain); } } } else { - /* rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]); */ + /* if (rtems_hdl_tbl[i].off) rtems_hdl_tbl[i].off(&rtems_hdl_tbl[i]); */ { rtems_irq_connect_data* vchain; for( vchain = &rtems_hdl_tbl[i]; ((int)vchain != -1 && vchain->hdl != default_rtems_entry.hdl); vchain = (rtems_irq_connect_data*)vchain->next_handler ) { + if (vchain->off) vchain->off(vchain); } } @@ -361,6 +366,7 @@ int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config) ((int)vchain != -1 && vchain->hdl != default_rtems_entry.hdl); vchain = (rtems_irq_connect_data*)vchain->next_handler ) { + if (vchain->on) vchain->on(vchain); } } @@ -373,6 +379,7 @@ int BSP_rtems_irq_mngt_set(rtems_irq_global_settings* config) ((int)vchain != -1 && vchain->hdl != default_rtems_entry.hdl); vchain = (rtems_irq_connect_data*)vchain->next_handler ) { + if (vchain->off) vchain->off(vchain); } } |