sb/intel: Remove spurious HAVE_SMI_HANDLER test
There are no side-effects in calling acpi_is_wakeup_s3() and apm_control() is a no-op with HAVE_SMI_HANDLER=n. Change-Id: Ia9195781955cc5fa96d0690aa7735fc590e527e4 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41986 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
b6585481e8
commit
ad882c3b17
@@ -409,7 +409,7 @@ static void pch_cg_init(struct device *dev)
|
||||
|
||||
static void pch_set_acpi_mode(void)
|
||||
{
|
||||
if (CONFIG(HAVE_SMI_HANDLER) && !acpi_is_wakeup_s3()) {
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -93,7 +93,7 @@ static void pch_pmc_read_resources(struct device *dev)
|
||||
|
||||
void pmc_set_acpi_mode(void)
|
||||
{
|
||||
if (CONFIG(HAVE_SMI_HANDLER) && !acpi_is_wakeup_s3()) {
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ static void pch_power_options(struct device *dev) { /* TODO */ }
|
||||
|
||||
static void pch_set_acpi_mode(void)
|
||||
{
|
||||
if (CONFIG(HAVE_SMI_HANDLER) && !acpi_is_wakeup_s3()) {
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
}
|
||||
}
|
||||
|
@@ -404,7 +404,7 @@ static void enable_clock_gating(struct device *dev)
|
||||
|
||||
static void pch_set_acpi_mode(void)
|
||||
{
|
||||
if (!acpi_is_wakeup_s3() && CONFIG(HAVE_SMI_HANDLER)) {
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
}
|
||||
}
|
||||
@@ -822,11 +822,9 @@ static void lpc_final(struct device *dev)
|
||||
spi_finalize_ops();
|
||||
|
||||
/* Call SMM finalize() handlers before resume */
|
||||
if (CONFIG(HAVE_SMI_HANDLER)) {
|
||||
if (CONFIG(INTEL_CHIPSET_LOCKDOWN) ||
|
||||
acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_FINALIZE);
|
||||
}
|
||||
if (CONFIG(INTEL_CHIPSET_LOCKDOWN) ||
|
||||
acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_FINALIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -314,12 +314,10 @@ static void enable_clock_gating(void)
|
||||
|
||||
static void i82801gx_set_acpi_mode(struct device *dev)
|
||||
{
|
||||
if (CONFIG(HAVE_SMI_HANDLER)) {
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
} else {
|
||||
apm_control(APM_CNT_ACPI_ENABLE);
|
||||
}
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
} else {
|
||||
apm_control(APM_CNT_ACPI_ENABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -343,12 +343,10 @@ static void enable_clock_gating(void)
|
||||
|
||||
static void i82801ix_set_acpi_mode(struct device *dev)
|
||||
{
|
||||
if (CONFIG(HAVE_SMI_HANDLER)) {
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
} else {
|
||||
apm_control(APM_CNT_ACPI_ENABLE);
|
||||
}
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
} else {
|
||||
apm_control(APM_CNT_ACPI_ENABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -347,12 +347,10 @@ static void enable_clock_gating(void)
|
||||
|
||||
static void i82801jx_set_acpi_mode(struct device *dev)
|
||||
{
|
||||
if (CONFIG(HAVE_SMI_HANDLER)) {
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
} else {
|
||||
apm_control(APM_CNT_ACPI_ENABLE);
|
||||
}
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
} else {
|
||||
apm_control(APM_CNT_ACPI_ENABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -408,8 +408,8 @@ static void enable_clock_gating(struct device *dev)
|
||||
|
||||
static void pch_set_acpi_mode(void)
|
||||
{
|
||||
if (!acpi_is_wakeup_s3() && CONFIG(HAVE_SMI_HANDLER)) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE); // Disable ACPI mode
|
||||
if (!acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,11 +722,9 @@ static void lpc_final(struct device *dev)
|
||||
spi_finalize_ops();
|
||||
|
||||
/* Call SMM finalize() handlers before resume */
|
||||
if (CONFIG(HAVE_SMI_HANDLER)) {
|
||||
if (CONFIG(INTEL_CHIPSET_LOCKDOWN) ||
|
||||
acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_FINALIZE);
|
||||
}
|
||||
if (CONFIG(INTEL_CHIPSET_LOCKDOWN) ||
|
||||
acpi_is_wakeup_s3()) {
|
||||
apm_control(APM_CNT_FINALIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -473,9 +473,8 @@ static void enable_lp_clock_gating(struct device *dev)
|
||||
|
||||
static void pch_set_acpi_mode(void)
|
||||
{
|
||||
if (CONFIG(HAVE_SMI_HANDLER) && !acpi_is_wakeup_s3()) {
|
||||
if (!acpi_is_wakeup_s3())
|
||||
apm_control(APM_CNT_ACPI_DISABLE);
|
||||
}
|
||||
}
|
||||
|
||||
static void pch_disable_smm_only_flashing(struct device *dev)
|
||||
|
Reference in New Issue
Block a user