aboutsummaryrefslogtreecommitdiff
path: root/dev/interrupt
diff options
context:
space:
mode:
authorNick Bray <ncbray@google.com>2018-08-23 14:19:10 -0700
committerNick Bray <ncbray@google.com>2018-10-08 13:29:11 -0700
commit8007cb550a559cb7e6aa347b8e0c30c30bcee1ee (patch)
tree73b2592fac9a701b827ba967017982e7344026c4 /dev/interrupt
parentdbfc27fcd8d5fd5c8031ab27201c6b2165c773b8 (diff)
downloadcommon-8007cb550a559cb7e6aa347b8e0c30c30bcee1ee.tar.gz
Remove unneeded architecture-specific files.
This includes: * Everything microblaze, mips, and or1k related. * All non-generic platforms and targets. * All projects. * All scripts. Bug: 113121731 Change-Id: I06949f0b70d8bb9b208e4c8b2f22d53136b77e93
Diffstat (limited to 'dev/interrupt')
-rw-r--r--dev/interrupt/or1k_pic/or1k_pic.c89
-rw-r--r--dev/interrupt/or1k_pic/rules.mk8
2 files changed, 0 insertions, 97 deletions
diff --git a/dev/interrupt/or1k_pic/or1k_pic.c b/dev/interrupt/or1k_pic/or1k_pic.c
deleted file mode 100644
index 12fcadf1..00000000
--- a/dev/interrupt/or1k_pic/or1k_pic.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2015 Stefan Kristiansson
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files
- * (the "Software"), to deal in the Software without restriction,
- * including without limitation the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-#include <err.h>
-#include <debug.h>
-#include <kernel/thread.h>
-#include <platform/interrupts.h>
-#include <platform/pic.h>
-#include <arch/or1k.h>
-
-static spin_lock_t gicd_lock;
-#if WITH_LIB_SM
-#define GICD_LOCK_FLAGS SPIN_LOCK_FLAG_IRQ_FIQ
-#else
-#define GICD_LOCK_FLAGS SPIN_LOCK_FLAG_INTERRUPTS
-#endif
-
-struct int_handler_struct {
- int_handler handler;
- void *arg;
-};
-
-static struct int_handler_struct int_handler_table[MAX_INT];
-
-void register_int_handler(unsigned int vector, int_handler handler, void *arg)
-{
- spin_lock_saved_state_t state;
-
- if (vector >= MAX_INT)
- panic("%s: vector out of range %d\n", __FUNCTION__, vector);
-
- spin_lock_save(&gicd_lock, &state, GICD_LOCK_FLAGS);
-
- int_handler_table[vector].handler = handler;
- int_handler_table[vector].arg = arg;
-
- spin_unlock_restore(&gicd_lock, state, GICD_LOCK_FLAGS);
-}
-
-status_t mask_interrupt(unsigned int vector)
-{
- if (vector >= MAX_INT)
- return ERR_INVALID_ARGS;
-
- mtspr(OR1K_SPR_PIC_PICMR_ADDR, mfspr(OR1K_SPR_PIC_PICMR_ADDR) & ~(1 << vector));
-
- return NO_ERROR;
-}
-
-status_t unmask_interrupt(unsigned int vector)
-{
- if (vector >= MAX_INT)
- return ERR_INVALID_ARGS;
-
- mtspr(OR1K_SPR_PIC_PICMR_ADDR, mfspr(OR1K_SPR_PIC_PICMR_ADDR) | (1 << vector));
-
- return NO_ERROR;
-}
-
-enum handler_return platform_irq(void)
-{
- enum handler_return ret = INT_NO_RESCHEDULE;
-
- uint irq = __builtin_ffs(mfspr(OR1K_SPR_PIC_PICSR_ADDR)) - 1;
-
- if (irq < MAX_INT && int_handler_table[irq].handler)
- ret = int_handler_table[irq].handler(int_handler_table[irq].arg);
-
- return ret;
-}
diff --git a/dev/interrupt/or1k_pic/rules.mk b/dev/interrupt/or1k_pic/rules.mk
deleted file mode 100644
index 1148b7f2..00000000
--- a/dev/interrupt/or1k_pic/rules.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-LOCAL_DIR := $(GET_LOCAL_DIR)
-
-MODULE := $(LOCAL_DIR)
-
-MODULE_SRCS += \
- $(LOCAL_DIR)/or1k_pic.c
-
-include make/module.mk