forked from Imagelibrary/rtems
bsps: Fix the generic IRQ support
The genmcf548x partly uses is own implementation of the interrupt extension API for libbsd support. This patch is a part of the BSP source reorganization. Update #3285.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-generic.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-generic.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-info.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-info.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-legacy.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-legacy.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-lock.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-server.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-server.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-shell.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-shell.c
|
||||||
|
|||||||
@@ -27,9 +27,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <rtems/score/apimutex.h>
|
|
||||||
#include <rtems/score/processormask.h>
|
#include <rtems/score/processormask.h>
|
||||||
#include <rtems/score/sysstate.h>
|
|
||||||
#include <rtems/malloc.h>
|
#include <rtems/malloc.h>
|
||||||
|
|
||||||
#ifdef BSP_INTERRUPT_USE_INDEX_TABLE
|
#ifdef BSP_INTERRUPT_USE_INDEX_TABLE
|
||||||
@@ -155,20 +153,6 @@ static void bsp_interrupt_free_handler_entry(bsp_interrupt_handler_entry *e)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void bsp_interrupt_lock(void)
|
|
||||||
{
|
|
||||||
if (_System_state_Is_up(_System_state_Get())) {
|
|
||||||
_RTEMS_Lock_allocator();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void bsp_interrupt_unlock(void)
|
|
||||||
{
|
|
||||||
if (_System_state_Is_up(_System_state_Get())) {
|
|
||||||
_RTEMS_Unlock_allocator();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void bsp_interrupt_initialize(void)
|
void bsp_interrupt_initialize(void)
|
||||||
{
|
{
|
||||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||||
|
|||||||
42
bsps/shared/irq/irq-lock.c
Normal file
42
bsps/shared/irq/irq-lock.c
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* @file
|
||||||
|
*
|
||||||
|
* @ingroup bsp_interrupt
|
||||||
|
*
|
||||||
|
* @brief BSP interrupt support lock implementation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Based on concepts of Pavel Pisa, Till Straumann and Eric Valette.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2008, 2018 embedded brains GmbH.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Dornierstr. 4
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.org/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <bsp/irq-generic.h>
|
||||||
|
|
||||||
|
#include <rtems/score/apimutex.h>
|
||||||
|
#include <rtems/score/sysstate.h>
|
||||||
|
|
||||||
|
void bsp_interrupt_lock(void)
|
||||||
|
{
|
||||||
|
if (_System_state_Is_up(_System_state_Get())) {
|
||||||
|
_RTEMS_Lock_allocator();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void bsp_interrupt_unlock(void)
|
||||||
|
{
|
||||||
|
if (_System_state_Is_up(_System_state_Get())) {
|
||||||
|
_RTEMS_Unlock_allocator();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,6 +39,11 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/genmcf548x/btimer/btimer.c
|
|||||||
|
|
||||||
# IRQ
|
# IRQ
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-default-handler.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-default-handler.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-info.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-legacy.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-lock.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-server.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-shell.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/genmcf548x/irq/irq.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/genmcf548x/irq/irq.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/genmcf548x/irq/intc-icr-init-values.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/genmcf548x/irq/intc-icr-init-values.c
|
||||||
|
|
||||||
@@ -55,6 +60,5 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/m68k/genmcf548x/net/network.c
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
include $(top_srcdir)/../../../../automake/local.am
|
include $(top_srcdir)/../../../../automake/local.am
|
||||||
include $(srcdir)/../../../../../../bsps/shared/irq-sources.am
|
|
||||||
include $(srcdir)/../../../../../../bsps/shared/shared-sources.am
|
include $(srcdir)/../../../../../../bsps/shared/shared-sources.am
|
||||||
include $(srcdir)/../../../../../../bsps/m68k/genmcf548x/headers.am
|
include $(srcdir)/../../../../../../bsps/m68k/genmcf548x/headers.am
|
||||||
|
|||||||
Reference in New Issue
Block a user