diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2016-11-23 16:39:52 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-11-28 01:07:14 +0100 |
commit | a6cbbd6a0aaec6f4f3af85e7152d54da7d7ab900 (patch) | |
tree | faedecc5e3905c9c9eeb88f16a381d0e1ae36963 /src/superio/ite/it8718f/superio.c | |
parent | 4b940bea5415d65456d79b555c4f4e4947a633b7 (diff) |
sio/it8718f: Hook up common environment-controller driver
Change-Id: I25019c6323b6e9de2e0ce19325266bf3e8f2e309
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17581
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/superio/ite/it8718f/superio.c')
-rw-r--r-- | src/superio/ite/it8718f/superio.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/superio/ite/it8718f/superio.c b/src/superio/ite/it8718f/superio.c index a156aa6e23..a384ec031f 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); |