diff --git a/arch/sw_64/Kconfig b/arch/sw_64/Kconfig index 3b9b13209e35944b22ff3a746c455649c09cf03c..0d85536419e2854753142af9e9f1c4639ecb2d5a 100644 --- a/arch/sw_64/Kconfig +++ b/arch/sw_64/Kconfig @@ -255,13 +255,6 @@ config PLATFORM_XUELANG endchoice -config LEGACY_XUELANG - bool "Xuelang Reset Interface" - depends on SW64_CHIP3 - help - This enables the legacy reset driver for SW64 chip3 CRBs. This interface - as a temporary solution will be deprecated in the future. - config MIGHT_HAVE_PC_SERIO bool "Use PC serio device i8042" select ARCH_MIGHT_HAVE_PC_SERIO diff --git a/arch/sw_64/include/asm/platform.h b/arch/sw_64/include/asm/platform.h index c52e7fd7a03993fb758190fbd4d0f8d35cfb637e..9f146c5794468c1555efeb55604908ac27f01ea9 100644 --- a/arch/sw_64/include/asm/platform.h +++ b/arch/sw_64/include/asm/platform.h @@ -15,6 +15,7 @@ struct sw64_platform_ops { extern struct sw64_platform_ops *sw64_platform; extern struct sw64_platform_ops xuelang_ops; +extern struct boot_params *sunway_boot_params; extern void sw64_halt(void); extern void sw64_poweroff(void); diff --git a/arch/sw_64/kernel/dup_print.c b/arch/sw_64/kernel/dup_print.c index 3a32c444207d89f2c4e472786d29704798217dc6..e28e0053239cad1d59b2f568029a4052c9e6368f 100644 --- a/arch/sw_64/kernel/dup_print.c +++ b/arch/sw_64/kernel/dup_print.c @@ -3,7 +3,7 @@ #include #include -#include +#include #include #ifdef CONFIG_SW64_RRK diff --git a/drivers/platform/sw64/Makefile b/drivers/platform/sw64/Makefile index 8d166464e4c98b335292782977e9554c76d8442b..28922224fb1763030b979bb8cd2ce204d41dfd80 100644 --- a/drivers/platform/sw64/Makefile +++ b/drivers/platform/sw64/Makefile @@ -1,2 +1,2 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_LEGACY_XUELANG) += legacy_xuelang.o +obj-$(CONFIG_PLATFORM_XUELANG) += legacy_xuelang.o diff --git a/drivers/platform/sw64/legacy_xuelang.c b/drivers/platform/sw64/legacy_xuelang.c index 803bea9467301bcf309390c6df1d03d72a06e764..59ecd3ea8e5e2e8731ec3ebac4ecabe01e107563 100644 --- a/drivers/platform/sw64/legacy_xuelang.c +++ b/drivers/platform/sw64/legacy_xuelang.c @@ -51,9 +51,11 @@ void sw64_restart(void) static int sw64_reset_init(void) { - pm_restart = sw64_restart; - pm_power_off = sw64_poweroff; - pm_halt = sw64_halt; + if (!sunway_boot_params->efi_systab) { + pm_restart = sw64_restart; + pm_power_off = sw64_poweroff; + pm_halt = sw64_halt; + } return 0; }