interrupts: new static IRQ API

The interrupt API has been redesigned:

- irq_connect() for dynamic interrupts renamed to irq_connect_dynamic().
  It will be used in situations where the new static irq_connect()
  won't work, i.e. the value of arguments can't be computed at build time
- a new API for static interrupts replaces irq_connect(). it is used
  exactly the same way as its dynamic counterpart. The old static irq
  macros will be removed
- Separate stub assembly files are no longer needed as the stubs are now
  generated inline with irq_connect()

ReST documentation updated for the changed API. Some detail about the
IDT in ROM added, and an oblique reference to the internal-only
_irq_handler_set() API removed; we don't talk about internal APIs in
the official documentation.

Change-Id: I280519993da0e0fe671eb537a876f67de33d3cd4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-01-08 00:46:14 -08:00 committed by Anas Nashif
commit d9cfbd5a61
70 changed files with 347 additions and 923 deletions

View file

@ -1 +1 @@
obj-$(CONFIG_AIO_DW_COMPARATOR) += aio_dw_comparator.o aio_static_irq_stubs.o
obj-$(CONFIG_AIO_DW_COMPARATOR) += aio_dw_comparator.o

View file

@ -213,20 +213,11 @@ struct dw_aio_cmp_dev_data_t dw_aio_cmp_dev_data = {
SYS_DEFINE_DEVICE(dw_aio_cmp, &dw_aio_cmp_dev_data, SECONDARY,
CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
struct device *dw_aio_cmp_device = SYS_GET_DEVICE(dw_aio_cmp);
IRQ_CONNECT_STATIC(dw_aio_cmp,
INT_AIO_CMP_IRQ,
0,
dw_aio_cmp_isr,
0,
0);
static int dw_aio_cmp_config(struct device *dev)
{
ARG_UNUSED(dev);
IRQ_CONFIG(dw_aio_cmp, INT_AIO_CMP_IRQ);
irq_connect(INT_AIO_CMP_IRQ, 0, dw_aio_cmp_isr,
SYS_GET_DEVICE(dw_aio_cmp), 0);
return DEV_OK;
}

View file

@ -1,34 +0,0 @@
/*
* Copyright (c) 2015, Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @brief AIO interrupt stubs
* This module contains the static interrupt stubs for the aio driver
*/
#define _ASMLANGUAGE
#ifdef CONFIG_X86
#include <arch/x86/asm.h>
#include <drivers/ioapic.h>
#endif
#if defined(CONFIG_AIO_DW_COMPARATOR)
#if defined(CONFIG_IOAPIC)
ioapic_mkstub dw_aio_cmp dw_aio_cmp_isr dw_aio_cmp_device
#endif
#endif /* CONFIG_AIO_DW_COMPARATOR */