OSDN Git Service

dp8393x: Always use 32-bit accesses
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 29 Jan 2020 09:27:49 +0000 (20:27 +1100)
committerJason Wang <jasowang@redhat.com>
Tue, 3 Mar 2020 10:04:35 +0000 (18:04 +0800)
commit3fe9a838ec3eae1374ced16b63bf56894b2ffbe6
tree8df071c319fa04cb35c0f0c0ea3ea6d68abf0d28
parent88f632fbb1b3d31d5b6978d28f8735a6ed18b8f5
dp8393x: Always use 32-bit accesses

The DP83932 and DP83934 have 32 data lines. The datasheet says,

    Data Bus: These bidirectional lines are used to transfer data on the
    system bus. When the SONIC is a bus master, 16-bit data is transferred
    on D15-D0 and 32-bit data is transferred on D31-D0. When the SONIC is
    accessed as a slave, register data is driven onto lines D15-D0.
    D31-D16 are held TRI-STATE if SONIC is in 16-bit mode. If SONIC is in
    32-bit mode, they are driven, but invalid.

Always use 32-bit accesses both as bus master and bus slave.

Force the MSW to zero in bus master mode.

This gets the Linux 'jazzsonic' driver working, and avoids the need for
prior hacks to make the NetBSD 'sn' driver work.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/dp8393x.c