forked from Mirrors/opensbi
platform: Drop irqchip warm init and exit hooks
Now that driver lifecycle is managed from within the SBI irqchip core, platforms need only to initialize the driver once during cold init. Remove the remaining platform hooks that are no longer used. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
2dd6eaf680
commit
678f5909a3
@@ -111,10 +111,8 @@ struct sbi_platform_operations {
|
||||
/** Get platform specific mhpmevent value */
|
||||
uint64_t (*pmu_xlate_to_mhpmevent)(uint32_t event_idx, uint64_t data);
|
||||
|
||||
/** Initialize the platform interrupt controller for current HART */
|
||||
int (*irqchip_init)(bool cold_boot);
|
||||
/** Exit the platform interrupt controller for current HART */
|
||||
void (*irqchip_exit)(void);
|
||||
/** Initialize the platform interrupt controller during cold boot */
|
||||
int (*irqchip_init)(void);
|
||||
|
||||
/** Initialize IPI during cold boot */
|
||||
int (*ipi_init)(void);
|
||||
@@ -543,32 +541,19 @@ static inline uint64_t sbi_platform_pmu_xlate_to_mhpmevent(const struct sbi_plat
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the platform interrupt controller for current HART
|
||||
* Initialize the platform interrupt controller during cold boot
|
||||
*
|
||||
* @param plat pointer to struct sbi_platform
|
||||
* @param cold_boot whether cold boot (true) or warm_boot (false)
|
||||
*
|
||||
* @return 0 on success and negative error code on failure
|
||||
*/
|
||||
static inline int sbi_platform_irqchip_init(const struct sbi_platform *plat,
|
||||
bool cold_boot)
|
||||
static inline int sbi_platform_irqchip_init(const struct sbi_platform *plat)
|
||||
{
|
||||
if (plat && sbi_platform_ops(plat)->irqchip_init)
|
||||
return sbi_platform_ops(plat)->irqchip_init(cold_boot);
|
||||
return sbi_platform_ops(plat)->irqchip_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Exit the platform interrupt controller for current HART
|
||||
*
|
||||
* @param plat pointer to struct sbi_platform
|
||||
*/
|
||||
static inline void sbi_platform_irqchip_exit(const struct sbi_platform *plat)
|
||||
{
|
||||
if (plat && sbi_platform_ops(plat)->irqchip_exit)
|
||||
sbi_platform_ops(plat)->irqchip_exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the platform IPI support during cold boot
|
||||
*
|
||||
|
@@ -17,19 +17,13 @@
|
||||
struct fdt_irqchip {
|
||||
const struct fdt_match *match_table;
|
||||
int (*cold_init)(const void *fdt, int nodeoff, const struct fdt_match *match);
|
||||
int (*warm_init)(void);
|
||||
void (*exit)(void);
|
||||
};
|
||||
|
||||
void fdt_irqchip_exit(void);
|
||||
|
||||
int fdt_irqchip_init(bool cold_boot);
|
||||
int fdt_irqchip_init(void);
|
||||
|
||||
#else
|
||||
|
||||
static inline void fdt_irqchip_exit(void) { }
|
||||
|
||||
static inline int fdt_irqchip_init(bool cold_boot) { return 0; }
|
||||
static inline int fdt_irqchip_init(void) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user