Commit 19e13e1
i2c: mlxbf: support BlueField-3 SoC
BlueField-3 SoC has the same I2C IP logic as previous
BlueField-1 and 2 SoCs but it has different registers' addresses.
This is an effort to keep this driver generic across all
BlueField generations.
This patch breaks down the "smbus" resource into 3 separate
resources to enable us to use common registers' offsets for all
BlueField SoCs:
struct mlxbf_i2c_resource *timer;
struct mlxbf_i2c_resource *mst;
struct mlxbf_i2c_resource *slv;
Of course, all offsets had to be adjusted accordingly, and we took
this chance to reorganize the macros depending on the register block
they target.
There are only 2 registers' offsets that do not fit within this
schema so their offsets are passed as SoC-specific parameters:
smbus_master_rs_bytes_off
smbus_master_fsm_off
Reviewed-by: Khalil Blaiech <kblaiech@nvidia.com>
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>1 parent 58b9242 commit 19e13e1
2 files changed
+285
-171
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12984 | 12984 | | |
12985 | 12985 | | |
12986 | 12986 | | |
| 12987 | + | |
12987 | 12988 | | |
12988 | 12989 | | |
12989 | 12990 | | |
| |||
0 commit comments