platform: generic: Modify platform ops instead of using hooks

Switch all existing platform overrides to use the helper pattern instead
of the platform hooks. After this commit, only the .match_table and
.init members of struct platform_override are used.

There are two minor behavioral differences:
 - For Allwinner D1, fdt_add_cpu_idle_states() is now called before the
   body of generic_final_init(). This should have no functional impact.
 - For StarFive JH7110, if the /chosen/starfive,boot-hart-id property is
   missing, the code now falls back to using generic_coldboot_harts,
   instead of accepting any hart.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250325234342.711447-7-samuel.holland@sifive.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2025-03-25 16:43:29 -07:00
committed by Anup Patel
parent 2489e1421d
commit b353af63e2
12 changed files with 160 additions and 80 deletions

View File

@@ -8,11 +8,8 @@
#define _RISCV_ANDES_PMU_H
#include <sbi/sbi_hart.h>
#include <sbi_utils/fdt/fdt_helper.h>
#include <sbi_utils/fdt/fdt_pmu.h>
int andes_pmu_init(const struct fdt_match *match);
int andes_pmu_extensions_init(const struct fdt_match *match,
struct sbi_hart_features *hfeatures);
int andes_pmu_init(void);
int andes_pmu_extensions_init(struct sbi_hart_features *hfeatures);
#endif /* _RISCV_ANDES_PMU_H */

View File

@@ -5,11 +5,9 @@
#include <sbi/sbi_ecall.h>
#include <sbi/sbi_trap.h>
#include <sbi_utils/fdt/fdt_helper.h>
int andes_sbi_vendor_ext_provider(long funcid,
struct sbi_trap_regs *regs,
struct sbi_ecall_return *out,
const struct fdt_match *match);
struct sbi_ecall_return *out);
#endif /* _RISCV_ANDES_SBI_H */