forked from Mirrors/opensbi

Move the PLIC save/restore functions inside the driver, so they can be reused on any platform that needs them. The memory needed to store the PLIC context is also allocated by the driver. The PM data cannot be completely encapsulated, as some platforms (including Allwinner D1) need to program the IRQ enable status to a sideband interrupt controller for wakeup capability. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
20 lines
359 B
C
20 lines
359 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2022 Samuel Holland <samuel@sholland.org>
|
|
*/
|
|
|
|
#ifndef __IRQCHIP_FDT_IRQCHIP_PLIC_H__
|
|
#define __IRQCHIP_FDT_IRQCHIP_PLIC_H__
|
|
|
|
#include <sbi/sbi_types.h>
|
|
#include <sbi_utils/irqchip/plic.h>
|
|
|
|
struct plic_data *fdt_plic_get(void);
|
|
|
|
void fdt_plic_suspend(void);
|
|
|
|
void fdt_plic_resume(void);
|
|
|
|
#endif
|