[PATCH 1/1] i2c: designware: build PCI support only for X86

designware_i2c_pci.c includes <asm/lpss.h> which is located at arch/x86/include/asm/lpss.h and available only for X86. So enable CONFIG_SYS_I2C_DW only for X86.
Fixes: 070a94600855 ("i2c: designware: Add Apollo Lake support") Signed-off-by: Maxim Kochetkov fido_max@inbox.ru --- drivers/i2c/Makefile | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 99545df2e5..7320e7a80e 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -18,9 +18,11 @@ obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o obj-$(CONFIG_SYS_I2C_CA) += i2c-cortina.o obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o obj-$(CONFIG_SYS_I2C_DW) += designware_i2c.o +ifdef CONFIG_X86 ifdef CONFIG_PCI obj-$(CONFIG_SYS_I2C_DW) += designware_i2c_pci.o endif +endif obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o obj-$(CONFIG_SYS_I2C_IHS) += ihs_i2c.o obj-$(CONFIG_SYS_I2C_INTEL) += intel_i2c.o

Hi Maxim,
On Thu, 27 Jul 2023 at 01:17, Maxim Kochetkov fido_max@inbox.ru wrote:
designware_i2c_pci.c includes <asm/lpss.h> which is located at arch/x86/include/asm/lpss.h and available only for X86. So enable CONFIG_SYS_I2C_DW only for X86.
Fixes: 070a94600855 ("i2c: designware: Add Apollo Lake support") Signed-off-by: Maxim Kochetkov fido_max@inbox.ru
drivers/i2c/Makefile | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 99545df2e5..7320e7a80e 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -18,9 +18,11 @@ obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o obj-$(CONFIG_SYS_I2C_CA) += i2c-cortina.o obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o obj-$(CONFIG_SYS_I2C_DW) += designware_i2c.o +ifdef CONFIG_X86 ifdef CONFIG_PCI obj-$(CONFIG_SYS_I2C_DW) += designware_i2c_pci.o
Can you add a new CONFIG_I2C_DW_PCI and have it depend on PCI && X86? These sorts of things should be done in Kconfig, with just simple one-line rules in Makefiles.
endif +endif obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o obj-$(CONFIG_SYS_I2C_IHS) += ihs_i2c.o obj-$(CONFIG_SYS_I2C_INTEL) += intel_i2c.o -- 2.40.1
Regards, Simon
participants (2)
-
Maxim Kochetkov
-
Simon Glass