[PATCH v7 1/4] i2c: designware: Add CONFIG_ACPIGEN limitation to designware_i2c_pci.c
Minda Chen
minda.chen at starfivetech.com
Fri Jul 21 03:32:57 CEST 2023
On 2023/7/21 3:42, Simon Glass wrote:
> Hi,
>
> On Thu, 20 Jul 2023 at 05:24, Minda Chen <minda.chen at starfivetech.com> wrote:
>>
>> As the designware_i2c_pci.c uses ACPI APIs, If some SoCs (StarFive
>> JH7110) contain designware i2c and PCI but do not use ACPI,
>> This file will be can't be compiled. So add ACPIGEN to
>> designware_i2c_pci.c
>>
>> Signed-off-by: Minda Chen <minda.chen at starfivetech.com>
>> ---
>> drivers/i2c/Makefile | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
>> index 99545df2e5..92b1ec6bc3 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_ACPIGEN
>
> You should use Kconfig to see SYS_I2C_DW depends on ACPIGEN. You might
> need a separate I2C_DW_PCI Kconfig.
>
I think so.
I can add Kconfig like this.
config SYS_I2C_DW_PCI
bool "Designware PCI I2C Controller"
depends on SYS_I2C_DW && PCI && APIGEN
default y
> But that sounds bad to me. Why does it have to generate ACPI tables?
> It should work fine without that.
>
designware_i2c_pci.c contain ACPI and lpss related codes.
>> 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
>> --
>> 2.17.1
>>
>
> Regards,
> Simon
More information about the U-Boot
mailing list