35 lines
889 B
C
35 lines
889 B
C
/*
|
|
* Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef _MAILBOX_IRQ_H_
|
|
#define _MAILBOX_IRQ_H_
|
|
|
|
#include "mailbox_soc.h"
|
|
|
|
typedef void (*vHandlerFunc)(void *);
|
|
|
|
struct xHandlerTableEntry {
|
|
void (*vHandler)(void *vArg);
|
|
void *vArg;
|
|
unsigned int xPriority;
|
|
};
|
|
|
|
extern struct xHandlerTableEntry xMbHandlerTable[];
|
|
void vMbDefaultHandler(void *vArg);
|
|
void vSetMbIrqHandler(unsigned int xNum, vHandlerFunc vHandler, void *vArg, unsigned int xPriority);
|
|
void vMbSetIrqPriority(unsigned int xNum, unsigned int xPriority);
|
|
#if (IRQ_MAX == 64)
|
|
void vEnableMbInterrupt(uint64_t xMask);
|
|
void vDisableMbInterrupt(uint64_t xMask);
|
|
void vClrMbInterrupt(uint64_t xMask);
|
|
#else
|
|
void vEnableMbInterrupt(uint32_t xMask);
|
|
void vDisableMbInterrupt(uint32_t xMask);
|
|
void vClrMbInterrupt(uint32_t xMask);
|
|
#endif
|
|
uint64_t xGetMbIrqStats(void);
|
|
#endif
|