[coreboot-gerrit] Patch set updated for coreboot: c8f44aa superio/fintek/f71869ad: Make SIO HWM conf conditional

Edward O'Callaghan (eocallaghan@alterapraxis.com) gerrit at coreboot.org
Mon May 26 23:12:24 CEST 2014


Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5841

-gerrit

commit c8f44aa796472ad0048f64517a3a0d9211c6d63c
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Sat May 24 14:43:03 2014 +1000

    superio/fintek/f71869ad: Make SIO HWM conf conditional
    
    Not everyone may like to enable the Super I/O HWM on their board or for
    their purposes. Hence, make hwm configuration conditional in Kconfig.
    
    Change-Id: I8f75bda30a1df4d6f33b73f3d0e6dd2e5dc9963f
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/mainboard/jetway/nf81-t56n-lf/Kconfig     |  1 +
 src/superio/fintek/Kconfig                    | 20 ++++++++++++++++++++
 src/superio/fintek/f71869ad/Makefile.inc      |  4 ++--
 src/superio/fintek/f71869ad/chip.h            |  2 ++
 src/superio/fintek/f71869ad/fintek_internal.h |  5 +++++
 5 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/src/mainboard/jetway/nf81-t56n-lf/Kconfig b/src/mainboard/jetway/nf81-t56n-lf/Kconfig
index d90e7a1..bcb95f6 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/Kconfig
+++ b/src/mainboard/jetway/nf81-t56n-lf/Kconfig
@@ -26,6 +26,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
 	select NORTHBRIDGE_AMD_AGESA_FAMILY14
 	select SOUTHBRIDGE_AMD_CIMX_SB800
 	select SUPERIO_FINTEK_F71869AD
+	select SUPERIO_FINTEK_F71869AD_HWM
 	select HAVE_OPTION_TABLE
 	select HAVE_PIRQ_TABLE
 	select HAVE_MP_TABLE
diff --git a/src/superio/fintek/Kconfig b/src/superio/fintek/Kconfig
index f577898..43f4b4d 100644
--- a/src/superio/fintek/Kconfig
+++ b/src/superio/fintek/Kconfig
@@ -39,6 +39,26 @@ config SUPERIO_FINTEK_F71869AD
 	bool
 	select SUPERIO_FINTEK_COMMON_ROMSTAGE
 
+choice
+	prompt "Super I/O Hardware Monitor"
+	default SUPERIO_NO_HWM
+	help
+	  Select the method of hardware monitor fan control to be used.
+
+config SUPERIO_NO_HWM
+	bool "None"
+	help
+	  No Super I/O Fan control - Do not set up the HWM fan control registers.
+
+config SUPERIO_FINTEK_F71869AD_HWM
+	bool "Fintek F71869AD HWM"
+	depends on SUPERIO_FINTEK_F71869AD
+	help
+	  Configure the Fintek Super I/O hardware monitor fan control registers in
+	  devicetree.cb.
+
+endchoice
+
 config SUPERIO_FINTEK_F71872
 	bool
 	select SUPERIO_FINTEK_COMMON_ROMSTAGE
diff --git a/src/superio/fintek/f71869ad/Makefile.inc b/src/superio/fintek/f71869ad/Makefile.inc
index 1d8cc6a..4de156d 100644
--- a/src/superio/fintek/f71869ad/Makefile.inc
+++ b/src/superio/fintek/f71869ad/Makefile.inc
@@ -18,6 +18,6 @@
 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 ##
 
-ramstage-$(CONFIG_SUPERIO_FINTEK_F71869AD) += f71869ad_multifunc.c
-ramstage-$(CONFIG_SUPERIO_FINTEK_F71869AD) += f71869ad_hwm.c
+ramstage-$(CONFIG_SUPERIO_FINTEK_F71869AD_HWM) += f71869ad_multifunc.c
+ramstage-$(CONFIG_SUPERIO_FINTEK_F71869AD_HWM) += f71869ad_hwm.c
 ramstage-$(CONFIG_SUPERIO_FINTEK_F71869AD) += superio.c
diff --git a/src/superio/fintek/f71869ad/chip.h b/src/superio/fintek/f71869ad/chip.h
index e12e51d..7dfd3a3 100644
--- a/src/superio/fintek/f71869ad/chip.h
+++ b/src/superio/fintek/f71869ad/chip.h
@@ -24,6 +24,7 @@
 #include <stdint.h>
 
 struct superio_fintek_f71869ad_config {
+#if IS_ENABLED(CONFIG_SUPERIO_FINTEK_F71869AD_HWM)
 	/* Member variables are defined in devicetree.cb. */
 	uint8_t multi_function_register_1;
 	uint8_t multi_function_register_2;
@@ -41,6 +42,7 @@ struct superio_fintek_f71869ad_config {
 	uint8_t hwm_fan1_seg2_speed_count;
 	uint8_t hwm_fan1_seg3_speed_count;
 	uint8_t hwm_fan1_temp_map_sel;
+#endif /* CONFIG_SUPERIO_FINTEK_F71869AD_HWM */
 };
 
 #endif /* SUPERIO_FINTEK_F71869AD_CHIP_H */
diff --git a/src/superio/fintek/f71869ad/fintek_internal.h b/src/superio/fintek/f71869ad/fintek_internal.h
index 6856c01..4b3a760 100644
--- a/src/superio/fintek/f71869ad/fintek_internal.h
+++ b/src/superio/fintek/f71869ad/fintek_internal.h
@@ -24,7 +24,12 @@
 #include <arch/io.h>
 #include <device/pnp.h>
 
+#if IS_ENABLED(CONFIG_SUPERIO_FINTEK_F71869AD_HWM)
 void f71869ad_multifunc_init(device_t dev);
 void f71869ad_hwm_init(device_t dev);
+#else
+void f71869ad_multifunc_init(device_t dev) {}
+void f71869ad_hwm_init(device_t dev) {}
+#endif /* CONFIG_SUPERIO_FINTEK_F71869AD_HWM */
 
 #endif /* SUPERIO_FINTEK_F71869AD_INTERNAL_H */



More information about the coreboot-gerrit mailing list