superio/nuvoton: Inline `nuvoton_hwm_select_bank`
There's no need to place a single-line function in its own compilation unit, and then guard it behind a Kconfig symbol. This also allows using this function in stages other than ramstage. Change-Id: I103a4ea4cef24844d382854c9358bbb37d229e04 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42130 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
64a6b6cb1f
commit
12beaea5e2
|
@ -8,7 +8,6 @@ config BOARD_SPECIFIC_OPTIONS
|
||||||
select CHECK_SLFRCS_ON_RESUME
|
select CHECK_SLFRCS_ON_RESUME
|
||||||
select SOUTHBRIDGE_INTEL_I82801GX
|
select SOUTHBRIDGE_INTEL_I82801GX
|
||||||
select SUPERIO_WINBOND_W83627EHG
|
select SUPERIO_WINBOND_W83627EHG
|
||||||
select SUPERIO_NUVOTON_COMMON_HWM # Nuvoton is a Winbond spin-off
|
|
||||||
select HAVE_ACPI_TABLES
|
select HAVE_ACPI_TABLES
|
||||||
select HAVE_PIRQ_TABLE
|
select HAVE_PIRQ_TABLE
|
||||||
select HAVE_MP_TABLE
|
select HAVE_MP_TABLE
|
||||||
|
|
|
@ -8,7 +8,6 @@ config BOARD_SPECIFIC_OPTIONS
|
||||||
select CHECK_SLFRCS_ON_RESUME
|
select CHECK_SLFRCS_ON_RESUME
|
||||||
select SOUTHBRIDGE_INTEL_I82801GX
|
select SOUTHBRIDGE_INTEL_I82801GX
|
||||||
select SUPERIO_WINBOND_W83627THG
|
select SUPERIO_WINBOND_W83627THG
|
||||||
select SUPERIO_NUVOTON_COMMON_HWM # Nuvoton is a Winbond spin-off
|
|
||||||
select HAVE_ACPI_TABLES
|
select HAVE_ACPI_TABLES
|
||||||
select HAVE_PIRQ_TABLE
|
select HAVE_PIRQ_TABLE
|
||||||
select HAVE_MP_TABLE
|
select HAVE_MP_TABLE
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
bootblock-$(CONFIG_SUPERIO_NUVOTON_COMMON_PRE_RAM) += common/early_serial.c
|
bootblock-$(CONFIG_SUPERIO_NUVOTON_COMMON_PRE_RAM) += common/early_serial.c
|
||||||
romstage-$(CONFIG_SUPERIO_NUVOTON_COMMON_PRE_RAM) += common/early_serial.c
|
romstage-$(CONFIG_SUPERIO_NUVOTON_COMMON_PRE_RAM) += common/early_serial.c
|
||||||
|
|
||||||
## include generic Nuvoton HWM driver
|
|
||||||
ramstage-$(CONFIG_SUPERIO_NUVOTON_COMMON_HWM) += common/hwm.c
|
|
||||||
|
|
||||||
subdirs-$(CONFIG_SUPERIO_NUVOTON_WPCM450) += wpcm450
|
subdirs-$(CONFIG_SUPERIO_NUVOTON_WPCM450) += wpcm450
|
||||||
subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5104D) += nct5104d
|
subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5104D) += nct5104d
|
||||||
subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += nct5539d
|
subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5539D) += nct5539d
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
||||||
|
|
||||||
/* Nuvoton is a Winbond spin-off, so this code is for both */
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <superio/hwm5_conf.h>
|
|
||||||
#include "hwm.h"
|
|
||||||
|
|
||||||
#define HWM_BANK_SELECT 0x4e
|
|
||||||
|
|
||||||
void nuvoton_hwm_select_bank(const u16 base, const u8 bank)
|
|
||||||
{
|
|
||||||
pnp_write_hwm5_index(base, HWM_BANK_SELECT, bank);
|
|
||||||
}
|
|
|
@ -6,7 +6,13 @@
|
||||||
/* Nuvoton is a Winbond spin-off, so this code is for both */
|
/* Nuvoton is a Winbond spin-off, so this code is for both */
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <superio/hwm5_conf.h>
|
||||||
|
|
||||||
void nuvoton_hwm_select_bank(const u16 base, const u8 bank);
|
#define HWM_BANK_SELECT 0x4e
|
||||||
|
|
||||||
|
static inline void nuvoton_hwm_select_bank(const u16 base, const u8 bank)
|
||||||
|
{
|
||||||
|
pnp_write_hwm5_index(base, HWM_BANK_SELECT, bank);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* SUPERIO_NUVOTON_COMMON_HWM_H */
|
#endif /* SUPERIO_NUVOTON_COMMON_HWM_H */
|
||||||
|
|
Loading…
Reference in New Issue