Replace the existing Apache 2.0 boilerplate header with an SPDX tag throughout the zephyr code tree. This patch was generated via a script run over the master branch. Also updated doc/porting/application.rst that had a dependency on line numbers in a literal include. Manually updated subsys/logging/sys_log.c that had a malformed header in the original file. Also cleanup several cases that already had a SPDX tag and we either got a duplicate or missed updating. Jira: ZEP-1457 Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c Signed-off-by: David B. Kinder <david.b.kinder@intel.com> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
70 lines
2.0 KiB
C
70 lines
2.0 KiB
C
/*
|
|
* Copyright (c) 2015 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef MVIC_H
|
|
#define MVIC_H
|
|
|
|
#include <arch/cpu.h>
|
|
|
|
/* Register defines. A lot of similarities to APIC, but not quite the same */
|
|
#define MVIC_TPR 0xFEE00080 /* Task priority register */
|
|
#define MVIC_PPR 0xFEE000A0 /* Process priority register */
|
|
#define MVIC_EOI 0xFEE000B0 /* End-of-interrupt register */
|
|
#define MVIC_SIVR 0xFEE000F0 /* Spurious interrupt vector register */
|
|
#define MVIC_ISR 0xFEE00110 /* In-service register */
|
|
#define MVIC_IRR 0xFEE00210 /* Interrupt request register */
|
|
#define MVIC_LVTTIMER 0xFEE00320 /* Local vector table timer register */
|
|
#define MVIC_ICR 0xFEE00380 /* Timer initial count register */
|
|
#define MVIC_CCR 0xFEE00390 /* Timer current count register */
|
|
#define MVIC_IOREGSEL 0xFEC00000 /* Register select (index) */
|
|
#define MVIC_IOWIN 0xFEC00010 /* Register windows (data) */
|
|
|
|
/* MVIC_LVTTIMER bits */
|
|
#define MVIC_LVTTIMER_MASK BIT(16)
|
|
#define MVIC_LVTTIMER_PERIODIC BIT(17)
|
|
|
|
/* MVIC_IOWIN bits */
|
|
#define MVIC_IOWIN_TRIGGER_LEVEL BIT(15)
|
|
#define MVIC_IOWIN_TRIGGER_EDGE 0
|
|
#define MVIC_IOWIN_MASK BIT(16)
|
|
#define MVIC_IOWIN_SUPPORTED_BITS_MASK (MVIC_IOWIN_MASK | \
|
|
MVIC_IOWIN_TRIGGER_LEVEL)
|
|
|
|
/* MVIC IOREGSEL register usage defines */
|
|
#define MVIC_LOW_NIBBLE_MASK 0x07
|
|
#define MVIC_HIGH_NIBBLE_MASK 0x18
|
|
|
|
#define MVIC_NUM_RTES 32
|
|
|
|
#define _IRQ_TRIGGER_EDGE MVIC_IOWIN_TRIGGER_EDGE
|
|
#define _IRQ_TRIGGER_LEVEL MVIC_IOWIN_TRIGGER_LEVEL
|
|
|
|
/* MVIC does not support IRQ_POLARITY_HIGH or IRQ_POLARITY_LOW,
|
|
* leave undefined
|
|
*/
|
|
|
|
#ifndef _ASMLANGUAGE
|
|
|
|
/* Implementation of irq_controller.h interface */
|
|
|
|
#define __IRQ_CONTROLLER_VECTOR_MAPPING(irq) ((irq) + 32)
|
|
|
|
void __irq_controller_irq_config(unsigned int vector, unsigned int irq,
|
|
uint32_t flags);
|
|
|
|
int __irq_controller_isr_vector_get(void);
|
|
|
|
#else /* _ASMLANGUAGE */
|
|
|
|
.macro __irq_controller_eoi
|
|
xorl %eax, %eax /* zeroes eax */
|
|
movl %eax, MVIC_EOI /* tell MVIC the IRQ is handled */
|
|
.endm
|
|
|
|
#endif
|
|
|
|
#endif /* MVIC_H */
|