From 555c2d67a4e70146286c319cf182c6ee4f92ad2e Mon Sep 17 00:00:00 2001 From: Rajesh Patil Date: Wed, 16 Jun 2021 14:13:00 +0530 Subject: [PATCH] soc/qualcomm/common/i2c: Add support for I2C common driver copy existing I2C driver from /soc/qualcomm/sc7180 to common folder. This implements i2c driver for qualcomm chipsets BUG=b:182963902 TEST=Validated on qualcomm sc7180 and sc7280 development board Signed-off-by: Rajesh Patil Change-Id: I16e6fc2c1c24b9814d1803bffd5cfbb657201cfb Reviewed-on: https://review.coreboot.org/c/coreboot/+/55952 Tested-by: build bot (Jenkins) Reviewed-by: Shelley Chen --- src/mainboard/google/trogdor/mainboard.c | 3 ++- .../soc/qupv3_i2c.h => common/include/soc/qupv3_i2c_common.h} | 0 src/soc/qualcomm/{sc7180 => common}/qupv3_i2c.c | 4 ++-- src/soc/qualcomm/sc7180/Makefile.inc | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) rename src/soc/qualcomm/{sc7180/include/soc/qupv3_i2c.h => common/include/soc/qupv3_i2c_common.h} (100%) rename src/soc/qualcomm/{sc7180 => common}/qupv3_i2c.c (99%) diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 982c1c1dae..48949d5a9c 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -15,7 +15,8 @@ #include #include #include -#include +#include +#include #include #include diff --git a/src/soc/qualcomm/sc7180/include/soc/qupv3_i2c.h b/src/soc/qualcomm/common/include/soc/qupv3_i2c_common.h similarity index 100% rename from src/soc/qualcomm/sc7180/include/soc/qupv3_i2c.h rename to src/soc/qualcomm/common/include/soc/qupv3_i2c_common.h diff --git a/src/soc/qualcomm/sc7180/qupv3_i2c.c b/src/soc/qualcomm/common/qupv3_i2c.c similarity index 99% rename from src/soc/qualcomm/sc7180/qupv3_i2c.c rename to src/soc/qualcomm/common/qupv3_i2c.c index 704a0bc0fb..606b3bf935 100644 --- a/src/soc/qualcomm/sc7180/qupv3_i2c.c +++ b/src/soc/qualcomm/common/qupv3_i2c.c @@ -8,9 +8,9 @@ #include #include #include -#include #include -#include +#include +#include #include static void i2c_clk_configure(unsigned int bus, enum i2c_speed speed) diff --git a/src/soc/qualcomm/sc7180/Makefile.inc b/src/soc/qualcomm/sc7180/Makefile.inc index 149d63f4be..0d7e4d62bd 100644 --- a/src/soc/qualcomm/sc7180/Makefile.inc +++ b/src/soc/qualcomm/sc7180/Makefile.inc @@ -8,7 +8,7 @@ all-y += ../common/timer.c all-y += ../common/gpio.c all-y += ../common/spi.c all-$(CONFIG_SC7180_QSPI) += ../common/qspi.c -all-y += qupv3_i2c.c +all-y += ../common/qupv3_i2c.c all-y += qupv3_spi.c all-y += clock.c all-y += ../common/clock.c