forked from Mirrors/opensbi

Now that all of the overrides are modifying generic_platform_ops directly, remove the unused hooks and forwarding functions. The remaining members of struct platform_override match struct fdt_driver, so use that type instead. This allows a future commit to reuse the fdt_driver-based init function. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20250325234342.711447-8-samuel.holland@sifive.com Signed-off-by: Anup Patel <anup@brainfault.org>
42 lines
1004 B
C
42 lines
1004 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2020 Western Digital Corporation or its affiliates.
|
|
*
|
|
* Authors:
|
|
* Anup Patel <anup.patel@wdc.com>
|
|
*/
|
|
|
|
#include <platform_override.h>
|
|
#include <sbi_utils/fdt/fdt_helper.h>
|
|
#include <sbi_utils/fdt/fdt_fixup.h>
|
|
|
|
static u64 sifive_fu540_tlbr_flush_limit(void)
|
|
{
|
|
/*
|
|
* The sfence.vma by virtual address does not work on
|
|
* SiFive FU540 so we return remote TLB flush limit as zero.
|
|
*/
|
|
return 0;
|
|
}
|
|
|
|
static int sifive_fu540_platform_init(const void *fdt, int nodeoff, const struct fdt_match *match)
|
|
{
|
|
generic_platform_ops.get_tlbr_flush_limit = sifive_fu540_tlbr_flush_limit;
|
|
|
|
return 0;
|
|
}
|
|
|
|
static const struct fdt_match sifive_fu540_match[] = {
|
|
{ .compatible = "sifive,fu540" },
|
|
{ .compatible = "sifive,fu540g" },
|
|
{ .compatible = "sifive,fu540-c000" },
|
|
{ .compatible = "sifive,hifive-unleashed-a00" },
|
|
{ },
|
|
};
|
|
|
|
const struct fdt_driver sifive_fu540 = {
|
|
.match_table = sifive_fu540_match,
|
|
.init = sifive_fu540_platform_init,
|
|
};
|