boards: Apply IRQ offload API change
Switching to constant parameter on ISR handler. Fixes #27399 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
50edd19f3a
commit
fd6fbe9c5f
4 changed files with 25 additions and 23 deletions
|
@ -15,9 +15,10 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
|
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(const void *),
|
||||||
void *isr_param_p);
|
const void *isr_param_p);
|
||||||
void posix_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags);
|
void posix_irq_priority_set(unsigned int irq, unsigned int prio,
|
||||||
|
uint32_t flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure a static interrupt.
|
* Configure a static interrupt.
|
||||||
|
@ -42,8 +43,8 @@ void posix_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
|
||||||
*/
|
*/
|
||||||
#define ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
|
#define ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
|
||||||
{ \
|
{ \
|
||||||
posix_isr_declare(irq_p, ISR_FLAG_DIRECT, (void (*)(void *))isr_p, \
|
posix_isr_declare(irq_p, ISR_FLAG_DIRECT, \
|
||||||
NULL); \
|
(void (*)(const void *))isr_p, NULL); \
|
||||||
posix_irq_priority_set(irq_p, priority_p, flags_p); \
|
posix_irq_priority_set(irq_p, priority_p, flags_p); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "soc.h"
|
#include "soc.h"
|
||||||
#include <tracing/tracing.h>
|
#include <tracing/tracing.h>
|
||||||
|
|
||||||
typedef void (*normal_irq_f_ptr)(void *);
|
typedef void (*normal_irq_f_ptr)(const void *);
|
||||||
typedef int (*direct_irq_f_ptr)(void);
|
typedef int (*direct_irq_f_ptr)(void);
|
||||||
|
|
||||||
typedef struct _isr_list isr_table_entry_t;
|
typedef struct _isr_list isr_table_entry_t;
|
||||||
|
@ -229,8 +229,8 @@ int posix_get_current_irq(void)
|
||||||
* @param isr_param_p ISR parameter
|
* @param isr_param_p ISR parameter
|
||||||
* @param flags_p IRQ options
|
* @param flags_p IRQ options
|
||||||
*/
|
*/
|
||||||
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
|
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(const void *),
|
||||||
void *isr_param_p)
|
const void *isr_param_p)
|
||||||
{
|
{
|
||||||
irq_vector_table[irq_p].irq = irq_p;
|
irq_vector_table[irq_p].irq = irq_p;
|
||||||
irq_vector_table[irq_p].func = isr_p;
|
irq_vector_table[irq_p].func = isr_p;
|
||||||
|
@ -278,13 +278,13 @@ void posix_sw_clear_pending_IRQ(unsigned int IRQn)
|
||||||
/**
|
/**
|
||||||
* Storage for functions offloaded to IRQ
|
* Storage for functions offloaded to IRQ
|
||||||
*/
|
*/
|
||||||
static void (*off_routine)(void *);
|
static void (*off_routine)(const void *);
|
||||||
static void *off_parameter;
|
static const void *off_parameter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IRQ handler for the SW interrupt assigned to irq_offload()
|
* IRQ handler for the SW interrupt assigned to irq_offload()
|
||||||
*/
|
*/
|
||||||
static void offload_sw_irq_handler(void *a)
|
static void offload_sw_irq_handler(const void *a)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(a);
|
ARG_UNUSED(a);
|
||||||
off_routine(off_parameter);
|
off_routine(off_parameter);
|
||||||
|
@ -295,7 +295,7 @@ static void offload_sw_irq_handler(void *a)
|
||||||
*
|
*
|
||||||
* Raise the SW IRQ assigned to handled this
|
* Raise the SW IRQ assigned to handled this
|
||||||
*/
|
*/
|
||||||
void posix_irq_offload(void (*routine)(void *), void *parameter)
|
void posix_irq_offload(void (*routine)(const void *), const void *parameter)
|
||||||
{
|
{
|
||||||
off_routine = routine;
|
off_routine = routine;
|
||||||
off_parameter = parameter;
|
off_parameter = parameter;
|
||||||
|
|
|
@ -15,9 +15,10 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
|
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(const void *),
|
||||||
void *isr_param_p);
|
const void *isr_param_p);
|
||||||
void posix_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags);
|
void posix_irq_priority_set(unsigned int irq, unsigned int prio,
|
||||||
|
uint32_t flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configure a static interrupt.
|
* Configure a static interrupt.
|
||||||
|
@ -42,8 +43,8 @@ void posix_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
|
||||||
*/
|
*/
|
||||||
#define ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
|
#define ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
|
||||||
{ \
|
{ \
|
||||||
posix_isr_declare(irq_p, ISR_FLAG_DIRECT, (void (*)(void *))isr_p, \
|
posix_isr_declare(irq_p, ISR_FLAG_DIRECT, \
|
||||||
NULL); \
|
(void (*)(const void *))isr_p, NULL); \
|
||||||
posix_irq_priority_set(irq_p, priority_p, flags_p); \
|
posix_irq_priority_set(irq_p, priority_p, flags_p); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -288,8 +288,8 @@ int posix_get_current_irq(void)
|
||||||
* @param isr_param_p ISR parameter
|
* @param isr_param_p ISR parameter
|
||||||
* @param flags_p IRQ options
|
* @param flags_p IRQ options
|
||||||
*/
|
*/
|
||||||
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(void *),
|
void posix_isr_declare(unsigned int irq_p, int flags, void isr_p(const void *),
|
||||||
void *isr_param_p)
|
const void *isr_param_p)
|
||||||
{
|
{
|
||||||
irq_vector_table[irq_p].irq = irq_p;
|
irq_vector_table[irq_p].irq = irq_p;
|
||||||
irq_vector_table[irq_p].func = isr_p;
|
irq_vector_table[irq_p].func = isr_p;
|
||||||
|
@ -337,13 +337,13 @@ void posix_sw_clear_pending_IRQ(unsigned int IRQn)
|
||||||
/**
|
/**
|
||||||
* Storage for functions offloaded to IRQ
|
* Storage for functions offloaded to IRQ
|
||||||
*/
|
*/
|
||||||
static void (*off_routine)(void *);
|
static void (*off_routine)(const void *);
|
||||||
static void *off_parameter;
|
static const void *off_parameter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IRQ handler for the SW interrupt assigned to irq_offload()
|
* IRQ handler for the SW interrupt assigned to irq_offload()
|
||||||
*/
|
*/
|
||||||
static void offload_sw_irq_handler(void *a)
|
static void offload_sw_irq_handler(const void *a)
|
||||||
{
|
{
|
||||||
ARG_UNUSED(a);
|
ARG_UNUSED(a);
|
||||||
off_routine(off_parameter);
|
off_routine(off_parameter);
|
||||||
|
@ -354,7 +354,7 @@ static void offload_sw_irq_handler(void *a)
|
||||||
*
|
*
|
||||||
* Raise the SW IRQ assigned to handled this
|
* Raise the SW IRQ assigned to handled this
|
||||||
*/
|
*/
|
||||||
void posix_irq_offload(void (*routine)(void *), void *parameter)
|
void posix_irq_offload(void (*routine)(const void *), const void *parameter)
|
||||||
{
|
{
|
||||||
off_routine = routine;
|
off_routine = routine;
|
||||||
off_parameter = parameter;
|
off_parameter = parameter;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue