]> xenbits.xensource.com Git - qemu-xen.git/commit
aspeed: i2c: Use reg array instead of individual vars
authorJoe Komlodi <komlodi@google.com>
Mon, 13 Jun 2022 12:05:48 +0000 (14:05 +0200)
committerCédric Le Goater <clg@kaod.org>
Wed, 22 Jun 2022 07:49:34 +0000 (09:49 +0200)
commit2260fc6ff3ff384bf384118a9be7aa6bec43b45b
tree04db9072b015e1e7597ccfe18323cb3e4521b440
parent3be3d6ccf2adbc305645d097fb364753e11edb0f
aspeed: i2c: Use reg array instead of individual vars

Using a register array will allow us to represent old-mode and new-mode
I2C registers by using the same underlying register array, instead of
adding an entire new set of variables to represent new mode.

As part of this, we also do additional cleanup to use ARRAY_FIELD_
macros instead of FIELD_ macros on registers.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Change-Id: Ib94996b17c361b8490c042b43c99d8abc69332e3
[ clg: use of memset in aspeed_i2c_bus_reset() ]
Message-Id: <20220331043248.2237838-5-komlodi@google.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
hw/i2c/aspeed_i2c.c
include/hw/i2c/aspeed_i2c.h