dp8393x: Rewrite dp8393x_get() / dp8393x_put()
commit82adabf7e533a29fe5a122090c2bee523624330a
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sat, 3 Jul 2021 13:44:33 +0000 (3 15:44 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 11 Jul 2021 20:29:54 +0000 (11 22:29 +0200)
tree8dbb7fe40b0f4cac9e6e415dd081a04d52a046e7
parent8ac2ffb584590b0398ae4e1a08a0b5d209b6f250
dp8393x: Rewrite dp8393x_get() / dp8393x_put()

Instead of accessing N registers via a single address_space API
call using a temporary buffer (stored in the device state) and
updating each register, move the address_space call in the
register put/get. The load/store and word size checks are moved
to put/get too. This simplifies a bit, making the code easier
to read.

Co-developed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Co-developed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Finn Thain <fthain@linux-m68k.org>
Message-Id: <20210710174954.2577195-8-f4bug@amsat.org>
hw/net/dp8393x.c