From f555a58abc487270d4ba42527b1b43850bd718c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 6 Jan 2020 19:41:42 +0200 Subject: sb/intel/common: Declare common smbus_base() and enable_smbus() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This avoids including platform-specific headers with different filenames from common code. Change-Id: Idf9893e55949d63f3ceca2249e618d0f81320321 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/38232 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/soc/intel/broadwell/romstage/pch.c | 1 + src/soc/intel/broadwell/romstage/smbus.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/soc/intel/broadwell/romstage') diff --git a/src/soc/intel/broadwell/romstage/pch.c b/src/soc/intel/broadwell/romstage/pch.c index af8ea53dea..e8f4eb89ee 100644 --- a/src/soc/intel/broadwell/romstage/pch.c +++ b/src/soc/intel/broadwell/romstage/pch.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include diff --git a/src/soc/intel/broadwell/romstage/smbus.c b/src/soc/intel/broadwell/romstage/smbus.c index dd5d030302..4b08b4cbcb 100644 --- a/src/soc/intel/broadwell/romstage/smbus.c +++ b/src/soc/intel/broadwell/romstage/smbus.c @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -36,7 +37,13 @@ static const struct reg_script smbus_init_script[] = { REG_SCRIPT_END, }; -void enable_smbus(void) +uintptr_t smbus_base(void) +{ + return SMBUS_BASE_ADDRESS; +} + +int smbus_enable_iobar(uintptr_t base) { reg_script_run_on_dev(PCH_DEV_SMBUS, smbus_init_script); + return 0; } -- cgit v1.2.3