Unverified Commit 1a0e5dbd authored by Vincent Chen's avatar Vincent Chen Committed by Palmer Dabbelt
Browse files

riscv: sifive: Add SiFive alternative ports



Add required ports of the Alternative scheme for SiFive.

Signed-off-by: default avatarVincent Chen <vincent.chen@sifive.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 6f4eea90
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -9,4 +9,14 @@ config RISCV_ERRATA_ALTERNATIVE
	  code patching is performed once in the boot stages. It means
	  that the overhead from this mechanism is just taken once.

config ERRATA_SIFIVE
	bool "SiFive errata"
	depends on RISCV_ERRATA_ALTERNATIVE
	help
	  All SiFive errata Kconfig depend on this Kconfig. Disabling
	  this Kconfig will disable all SiFive errata. Please say "Y"
	  here if your platform uses SiFive CPU cores.

	  Otherwise, please say "N" here to avoid unnecessary overhead.

endmenu
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ config SOC_SIFIVE
	select CLK_SIFIVE
	select CLK_SIFIVE_PRCI
	select SIFIVE_PLIC
	select ERRATA_SIFIVE
	help
	  This enables support for SiFive SoC platform hardware.

+1 −0
Original line number Diff line number Diff line
obj-y	+= alternative.o
obj-$(CONFIG_ERRATA_SIFIVE) += sifive/
+5 −0
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@ static void __init init_alternative(void)
	riscv_fill_cpu_mfr_info();

	switch (cpu_mfr_info.vendor_id) {
#ifdef CONFIG_ERRATA_SIFIVE
	case SIFIVE_VENDOR_ID:
		vendor_patch_func = sifive_errata_patch_func;
		break;
#endif
	default:
		vendor_patch_func = NULL;
	}
+1 −0
Original line number Diff line number Diff line
obj-y += errata.o
Loading