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:
parent
4a2ce3c0c9
commit
d9cfbd5a61
70 changed files with 347 additions and 923 deletions
|
@ -1,4 +1,3 @@
|
|||
ccflags-y +=-I$(srctree)/drivers
|
||||
|
||||
obj-$(CONFIG_SHARED_IRQ) = shared_irq_static_irq_stubs.o
|
||||
obj-$(CONFIG_SHARED_IRQ) += shared_irq.o
|
||||
|
|
|
@ -128,13 +128,13 @@ int shared_irq_initialize(struct device *dev)
|
|||
struct shared_irq_config *config = dev->config->config_info;
|
||||
|
||||
dev->driver_api = &api_funcs;
|
||||
config->config(dev);
|
||||
config->config();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if CONFIG_SHARED_IRQ_0
|
||||
void shared_irq_config_0_irq(struct device *port);
|
||||
void shared_irq_config_0_irq(void);
|
||||
|
||||
struct shared_irq_config shared_irq_config_0 = {
|
||||
.irq_num = CONFIG_SHARED_IRQ_0_IRQ,
|
||||
|
@ -165,26 +165,17 @@ SYS_DEFINE_DEVICE(shared_irq_0, &shared_irq_0_runtime, SECONDARY,
|
|||
#define SHARED_IRQ_0_FLAGS 0
|
||||
#endif /* CONFIG_IOAPIC */
|
||||
|
||||
IRQ_CONNECT_STATIC(shared_irq_0, CONFIG_SHARED_IRQ_0_IRQ,
|
||||
CONFIG_SHARED_IRQ_0_PRI, shared_irq_isr_0, 0,
|
||||
SHARED_IRQ_0_FLAGS);
|
||||
|
||||
void shared_irq_config_0_irq(struct device *port)
|
||||
void shared_irq_config_0_irq(void)
|
||||
{
|
||||
struct shared_irq_config *config = port->config->config_info;
|
||||
|
||||
IRQ_CONFIG(shared_irq_0, config->irq_num);
|
||||
}
|
||||
|
||||
void shared_irq_isr_0(void *unused)
|
||||
{
|
||||
shared_irq_isr(&__initconfig_shared_irq_0);
|
||||
irq_connect(CONFIG_SHARED_IRQ_0_IRQ, CONFIG_SHARED_IRQ_0_PRI,
|
||||
shared_irq_isr, SYS_GET_DEVICE(shared_irq_0),
|
||||
SHARED_IRQ_0_FLAGS);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SHARED_IRQ_0 */
|
||||
|
||||
#if CONFIG_SHARED_IRQ_1
|
||||
void shared_irq_config_1_irq(struct device *port);
|
||||
void shared_irq_config_1_irq(void);
|
||||
|
||||
struct shared_irq_config shared_irq_config_1 = {
|
||||
.irq_num = CONFIG_SHARED_IRQ_1_IRQ,
|
||||
|
@ -215,20 +206,11 @@ SYS_DEFINE_DEVICE(shared_irq_1, &shared_irq_1_runtime, SECONDARY,
|
|||
#define SHARED_IRQ_1_FLAGS 0
|
||||
#endif /* CONFIG_IOAPIC */
|
||||
|
||||
IRQ_CONNECT_STATIC(shared_irq_1, CONFIG_SHARED_IRQ_1_IRQ,
|
||||
CONFIG_SHARED_IRQ_1_PRI, shared_irq_isr_1, 0,
|
||||
SHARED_IRQ_1_FLAGS);
|
||||
|
||||
void shared_irq_config_1_irq(struct device *port)
|
||||
void shared_irq_config_1_irq(void)
|
||||
{
|
||||
struct shared_irq_config *config = port->config->config_info;
|
||||
|
||||
IRQ_CONFIG(shared_irq_1, config->irq_num);
|
||||
}
|
||||
|
||||
void shared_irq_isr_1(void *unused)
|
||||
{
|
||||
shared_irq_isr(&__initconfig_shared_irq_1);
|
||||
irq_connect(CONFIG_SHARED_IRQ_1_IRQ, CONFIG_SHARED_IRQ_1_PRI,
|
||||
shared_irq_isr, SYS_GET_DEVICE(shared_irq_1),
|
||||
SHARED_IRQ_1_FLAGS);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SHARED_IRQ_1 */
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2015, Wind River Systems, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#define _ASMLANGUAGE
|
||||
|
||||
#include <arch/x86/asm.h>
|
||||
#include <drivers/ioapic.h>
|
||||
|
||||
|
||||
#if CONFIG_SHARED_IRQ_0
|
||||
ioapic_mkstub shared_irq_0 shared_irq_isr_0 0
|
||||
#endif /* CONFIG_SHARED_IRQ_0 */
|
||||
|
||||
#if CONFIG_SHARED_IRQ_1
|
||||
ioapic_mkstub shared_irq_1 shared_irq_isr_1 0
|
||||
#endif /* CONFIG_SHARED_IRQ_1 */
|
Loading…
Add table
Add a link
Reference in a new issue