soc/amd/common/block/i2c: Move SoC agnostic parts into common
commit4f87ae1d4a3a597f1260534001bd99160cc8ca99
authorKarthikeyan Ramasubramanian <kramasub@google.com>
Fri, 19 Mar 2021 05:16:29 +0000 (18 23:16 -0600)
committerMartin Roth <martinroth@google.com>
Mon, 22 Mar 2021 03:40:42 +0000 (22 03:40 +0000)
treed9b2e6f2a396744b9a10f8f3cc7106d85c0afdc7
parent0dbea48d46013c004014a024ad8717d049e67c8d
soc/amd/common/block/i2c: Move SoC agnostic parts into common

The logic behind I2C bus initialization, I2C MMIO base address getter
and setter, I2C bus ACPI name resolution are identical for all the AMD
SoCs. Hence moving all the SoC agnotic parts of the driver into the
common driver and just configure the SoC specific parts into individual
I2C drivers.

BUG=None
TEST=Build Dalboz and Grunt. Boot to OS in Dalboz. Ensure that the I2C
peripherals are detected as earlier in Dalboz. Verify some I2C
peripheral functionality like trackpad and touchscreen.

Change-Id: Ic9c99ec769d7d8ad7e1e566fdf42a5206657183d
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Suggested-by: Kyosti Malkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51509
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
14 files changed:
src/mainboard/google/kahlee/mainboard.c
src/mainboard/google/zork/verstage.c
src/soc/amd/common/block/i2c/i2c.c
src/soc/amd/common/block/include/amdblocks/i2c.h
src/soc/amd/picasso/chip.c
src/soc/amd/picasso/chip.h
src/soc/amd/picasso/fch.c
src/soc/amd/picasso/i2c.c
src/soc/amd/picasso/include/soc/iomap.h
src/soc/amd/picasso/include/soc/southbridge.h
src/soc/amd/stoneyridge/chip.c
src/soc/amd/stoneyridge/i2c.c
src/soc/amd/stoneyridge/include/soc/iomap.h
src/soc/amd/stoneyridge/include/soc/southbridge.h