[PATCH v2 03/12] bsp/generic_or1k: Remove incomplete IRQ support

Sebastian Huber sebastian.huber at embedded-brains.de
Sat Jun 19 14:04:39 UTC 2021


Update #3269.
---
 bsps/or1k/generic_or1k/include/bsp/irq.h      |  3 +-
 bsps/or1k/generic_or1k/irq/irq.c              | 43 -------------------
 .../lib/libbsp/or1k/generic_or1k/Makefile.am  |  6 +--
 .../bsps/or1k/generic_or1k/bspgenericor1k.yml |  4 +-
 4 files changed, 3 insertions(+), 53 deletions(-)
 delete mode 100644 bsps/or1k/generic_or1k/irq/irq.c

diff --git a/bsps/or1k/generic_or1k/include/bsp/irq.h b/bsps/or1k/generic_or1k/include/bsp/irq.h
index 791aefcae0..c9f2c62a91 100644
--- a/bsps/or1k/generic_or1k/include/bsp/irq.h
+++ b/bsps/or1k/generic_or1k/include/bsp/irq.h
@@ -23,8 +23,7 @@
 #include <rtems/irq.h>
 #include <rtems/irq-extension.h>
 
-#define BSP_INTERRUPT_VECTOR_MIN  0x100
-#define BSP_INTERRUPT_VECTOR_MAX  0x1F00
+#include <bsp/irq-default.h>
 
 /* Interrupt Identification Register */
 #define OR1K_BSP_UART_REG_INT_ID_MSI    (0x00)
diff --git a/bsps/or1k/generic_or1k/irq/irq.c b/bsps/or1k/generic_or1k/irq/irq.c
deleted file mode 100644
index f9a7b6426d..0000000000
--- a/bsps/or1k/generic_or1k/irq/irq.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * @file
- *
- * @ingroup or1k_interrupt
- *
- * @brief Interrupt support.
- */
-
-/*
- * Copyright (c) 2014 Hesham ALMatary
- *
- * 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.h>
-#include <bsp/irq-generic.h>
-#include <rtems/inttypes.h>
-
-/* Almost all of the jobs that the following functions should
- * do are implemented in cpukit
- */
-
-void bsp_interrupt_handler_default(rtems_vector_number vector)
-{
-    printk("spurious interrupt: %" PRIdrtems_vector_number "\n", vector);
-}
-
-rtems_status_code bsp_interrupt_facility_initialize()
-{
-  return 0;
-}
-
-void bsp_interrupt_vector_enable(rtems_vector_number vector)
-{
-  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
-}
-
-void bsp_interrupt_vector_disable(rtems_vector_number vector)
-{
-  bsp_interrupt_assert(bsp_interrupt_is_valid_vector(vector));
-}
diff --git a/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am b/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am
index fc3686e54e..e6e185cbeb 100644
--- a/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am
+++ b/c/src/lib/libbsp/or1k/generic_or1k/Makefile.am
@@ -59,10 +59,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/or1k/generic_or1k/btimer/btimer.
 # clock
 librtemsbsp_a_SOURCES +=../../../../../../bsps/or1k/generic_or1k/clock/clockdrv.c
 
-# IRQ
-librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/irq/irq-default-handler.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/or1k/generic_or1k/irq/irq.c
-
 # Cache
 librtemsbsp_a_SOURCES += ../../../../../../bsps/or1k/shared/cache/cache.c
 
@@ -71,6 +67,6 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/or1k/shared/cache/cache.c
 ###############################################################################
 
 
-include $(srcdir)/../../../../../../bsps/shared/irq-sources.am
+include $(srcdir)/../../../../../../bsps/shared/irq-default-sources.am
 include $(srcdir)/../../../../../../bsps/shared/shared-sources.am
 include $(srcdir)/../../../../../../bsps/or1k/generic_or1k/headers.am
diff --git a/spec/build/bsps/or1k/generic_or1k/bspgenericor1k.yml b/spec/build/bsps/or1k/generic_or1k/bspgenericor1k.yml
index 9ab0f3580e..0b2314c8ed 100644
--- a/spec/build/bsps/or1k/generic_or1k/bspgenericor1k.yml
+++ b/spec/build/bsps/or1k/generic_or1k/bspgenericor1k.yml
@@ -27,7 +27,7 @@ links:
 - role: build-dependency
   uid: ../../obj
 - role: build-dependency
-  uid: ../../objirq
+  uid: ../../objirqdflt
 - role: build-dependency
   uid: ../../opto0
 - role: build-dependency
@@ -51,14 +51,12 @@ source:
 - bsps/or1k/generic_or1k/clock/clockdrv.c
 - bsps/or1k/generic_or1k/console/console-config.c
 - bsps/or1k/generic_or1k/console/uart.c
-- bsps/or1k/generic_or1k/irq/irq.c
 - bsps/or1k/generic_or1k/start/bspstart.c
 - bsps/or1k/shared/cache/cache.c
 - bsps/shared/dev/getentropy/getentropy-cpucounter.c
 - bsps/shared/dev/serial/legacy-console-control.c
 - bsps/shared/dev/serial/legacy-console-select.c
 - bsps/shared/dev/serial/legacy-console.c
-- bsps/shared/irq/irq-default-handler.c
 - bsps/shared/start/bspfatal-default.c
 - bsps/shared/start/bspgetworkarea-default.c
 - bsps/shared/start/bspreset-empty.c
-- 
2.26.2



More information about the devel mailing list