[coreboot-gerrit] New patch to review for coreboot: sio/it8718f: hook up common environment-controller driver

Arthur Heymans (arthur@aheymans.xyz) gerrit at coreboot.org
Wed Nov 23 16:48:15 CET 2016


Arthur Heymans (arthur at aheymans.xyz) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17581

-gerrit

commit ed04a9cc0d500b5cd6a665998d260160c06d3ab0
Author: Arthur Heymans <arthur at aheymans.xyz>
Date:   Wed Nov 23 16:39:52 2016 +0100

    sio/it8718f: hook up common environment-controller driver
    
    Change-Id: I25019c6323b6e9de2e0ce19325266bf3e8f2e309
    Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
 src/superio/ite/it8718f/Kconfig   |  3 +++
 src/superio/ite/it8718f/chip.h    | 26 ++++++++++++++++++++++++++
 src/superio/ite/it8718f/superio.c | 12 +++++++++++-
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/src/superio/ite/it8718f/Kconfig b/src/superio/ite/it8718f/Kconfig
index 0721317..3201195 100644
--- a/src/superio/ite/it8718f/Kconfig
+++ b/src/superio/ite/it8718f/Kconfig
@@ -17,3 +17,6 @@
 config SUPERIO_ITE_IT8718F
 	bool
 	select SUPERIO_ITE_COMMON_ROMSTAGE
+	select SUPERIO_ITE_ENV_CTRL
+	select SUPERIO_ITE_ENV_CTRL_FAN16_CONFIG
+	select SUPERIO_ITE_ENV_CTRL_PWM_FREQ2
diff --git a/src/superio/ite/it8718f/chip.h b/src/superio/ite/it8718f/chip.h
new file mode 100644
index 0000000..23511bb
--- /dev/null
+++ b/src/superio/ite/it8718f/chip.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 secunet Security Networks AG
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef SUPERIO_ITE_IT8718F_CHIP_H
+#define SUPERIO_ITE_IT8718F_CHIP_H
+
+#include <superio/ite/common/env_ctrl_chip.h>
+
+struct superio_ite_it8718f_config {
+	struct ite_ec_config ec;
+};
+
+#endif /* SUPERIO_ITE_IT8718F_CHIP_H */
diff --git a/src/superio/ite/it8718f/superio.c b/src/superio/ite/it8718f/superio.c
index a156aa6..a384ec0 100644
--- a/src/superio/ite/it8718f/superio.c
+++ b/src/superio/ite/it8718f/superio.c
@@ -18,10 +18,15 @@
 #include <device/pnp.h>
 #include <pc80/keyboard.h>
 #include <stdlib.h>
+#include <superio/ite/common/env_ctrl.h>
+
 #include "it8718f.h"
+#include "chip.h"
 
 static void init(struct device *dev)
 {
+	const struct superio_ite_it8718f_config *conf;
+	const struct resource *res;
 
 	if (!dev->enabled)
 		return;
@@ -31,7 +36,12 @@ static void init(struct device *dev)
 		break;
 	case IT8718F_PP: /* TODO. */
 		break;
-	case IT8718F_EC: /* TODO. */
+	case IT8718F_EC:
+		conf = dev->chip_info;
+		res = find_resource(dev, PNP_IDX_IO0);
+		if (!conf || !res)
+			break;
+		ite_ec_init(res->base, &conf->ec);
 		break;
 	case IT8718F_KBCK:
 		pc_keyboard_init(NO_AUX_DEVICE);



More information about the coreboot-gerrit mailing list