summaryrefslogtreecommitdiff
path: root/src/superio/ite/it8623e/superio.c
diff options
context:
space:
mode:
authorKevin Cody-Little <kcodyjr@gmail.com>2018-05-10 21:33:03 -0400
committerNico Huber <nico.h@gmx.de>2018-05-12 20:32:27 +0000
commitf5f552afcd471ba7ab9dbd77789f2076af176865 (patch)
tree47fbc7eb57953373904bea7aaca2b2f3a34648e1 /src/superio/ite/it8623e/superio.c
parente100fe4a5937db97c6f327553a06c5aaf712b7f0 (diff)
downloadcoreboot-f5f552afcd471ba7ab9dbd77789f2076af176865.tar.xz
superio/ite/it8623e: initialize the PWM fan controller
Copies the common/env_ctrl support code from the it8728f driver. Tested on an ASUS AM1I-A using Linux 4.16.7-gentoo as payload, and booting userspace without a kexec call. Prior to this change, an error was given during boot: it87 it87.656: Detected broken BIOS defaults, disabling PWM interface After this change, the message is gone, and PWM fan control works through the /sys/class/hwmon interface. Change-Id: Id97c4ec19562e7c78308c5afe6ff7c938922c9e7 Signed-off-by: Kevin Cody-Little <kcodyjr@gmail.com> Reviewed-on: https://review.coreboot.org/26224 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/superio/ite/it8623e/superio.c')
-rw-r--r--src/superio/ite/it8623e/superio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/superio/ite/it8623e/superio.c b/src/superio/ite/it8623e/superio.c
index e1ae5036a9..a9cd4e55ae 100644
--- a/src/superio/ite/it8623e/superio.c
+++ b/src/superio/ite/it8623e/superio.c
@@ -22,17 +22,25 @@
#include <arch/io.h>
#include <stdlib.h>
#include <superio/conf_mode.h>
+#include <superio/ite/common/env_ctrl.h>
+#include "chip.h"
#include "it8623e.h"
static void it8623e_init(struct device *dev)
{
+ const struct superio_ite_it8623e_config *conf = dev->chip_info;
+ const struct resource *res;
if (!dev->enabled)
return;
switch (dev->path.pnp.device) {
case IT8623E_EC:
+ res = find_resource(dev, PNP_IDX_IO0);
+ if (!conf || !res)
+ break;
+ ite_ec_init(res->base, &conf->ec);
break;
case IT8623E_KBCK:
pc_keyboard_init(NO_AUX_DEVICE);