mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-04-13 06:11:37 +01:00
The irq_handle() callback of irqchip device is meant to process hardware interrupt of the irqchip hence rename it accordingly. Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260213055342.3124872-3-anup.patel@oss.qualcomm.com Signed-off-by: Anup Patel <anup@brainfault.org>
50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2022 Ventana Micro Systems Inc.
|
|
*
|
|
* Authors:
|
|
* Anup Patel <apatel@ventanamicro.com>
|
|
*/
|
|
|
|
#ifndef __SBI_IRQCHIP_H__
|
|
#define __SBI_IRQCHIP_H__
|
|
|
|
#include <sbi/sbi_list.h>
|
|
#include <sbi/sbi_types.h>
|
|
|
|
struct sbi_scratch;
|
|
|
|
/** irqchip hardware device */
|
|
struct sbi_irqchip_device {
|
|
/** Node in the list of irqchip devices */
|
|
struct sbi_dlist node;
|
|
|
|
/** Initialize per-hart state for the current hart */
|
|
int (*warm_init)(struct sbi_irqchip_device *chip);
|
|
|
|
/** Process hardware interrupts from this irqchip */
|
|
int (*process_hwirqs)(void);
|
|
};
|
|
|
|
/**
|
|
* Process external interrupts
|
|
*
|
|
* This function is called by sbi_trap_handler() to handle external
|
|
* interrupts.
|
|
*
|
|
* @param regs pointer for trap registers
|
|
*/
|
|
int sbi_irqchip_process(void);
|
|
|
|
/** Register an irqchip device to receive callbacks */
|
|
void sbi_irqchip_add_device(struct sbi_irqchip_device *chip);
|
|
|
|
/** Initialize interrupt controllers */
|
|
int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot);
|
|
|
|
/** Exit interrupt controllers */
|
|
void sbi_irqchip_exit(struct sbi_scratch *scratch);
|
|
|
|
#endif
|