Patrick Georgi | ac95903 | 2020-05-05 22:49:26 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Lance Zhao | a7ff9c5 | 2015-11-12 18:19:41 -0800 | [diff] [blame] | 2 | |
Lance Zhao | a7ff9c5 | 2015-11-12 18:19:41 -0800 | [diff] [blame] | 3 | #include <device/pci.h> |
Ravi Sarawadi | efa606b | 2017-08-04 16:26:09 -0700 | [diff] [blame] | 4 | #include <intelblocks/lpc_lib.h> |
5 | #include <intelblocks/rtc.h> | ||||
Ravi Sarawadi | efa606b | 2017-08-04 16:26:09 -0700 | [diff] [blame] | 6 | #include <soc/pcr_ids.h> |
Jagadish Krishnamoorthy | b6b233a | 2016-05-17 18:06:49 -0700 | [diff] [blame] | 7 | #include <soc/pm.h> |
Alexandru Gagniuc | 3aa34a8 | 2016-04-04 10:47:49 -0700 | [diff] [blame] | 8 | #include "chip.h" |
9 | |||||
Subrata Banik | 8885206 | 2018-01-10 10:51:50 +0530 | [diff] [blame] | 10 | void lpc_soc_init(struct device *dev) |
Alexandru Gagniuc | 3aa34a8 | 2016-04-04 10:47:49 -0700 | [diff] [blame] | 11 | { |
Ravi Sarawadi | efa606b | 2017-08-04 16:26:09 -0700 | [diff] [blame] | 12 | const struct soc_intel_apollolake_config *cfg; |
Kyösti Mälkki | 8950cfb | 2019-07-13 22:16:25 +0300 | [diff] [blame] | 13 | cfg = config_of(dev); |
Alexandru Gagniuc | 3aa34a8 | 2016-04-04 10:47:49 -0700 | [diff] [blame] | 14 | |
Ravi Sarawadi | efa606b | 2017-08-04 16:26:09 -0700 | [diff] [blame] | 15 | /* Set LPC Serial IRQ mode */ |
16 | lpc_set_serirq_mode(cfg->serirq_mode); | ||||
Jagadish Krishnamoorthy | b6b233a | 2016-05-17 18:06:49 -0700 | [diff] [blame] | 17 | |
18 | /* Initialize RTC */ | ||||
19 | rtc_init(); | ||||
Alexandru Gagniuc | 3aa34a8 | 2016-04-04 10:47:49 -0700 | [diff] [blame] | 20 | } |