OSDN Git Service

net: mscc: ocelot: extend watermark encoding function
authorMaxim Kochetkov <fido_max@inbox.ru>
Mon, 13 Jul 2020 16:57:08 +0000 (19:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Jul 2020 00:40:02 +0000 (17:40 -0700)
commitaa92d836d5c40a7e21e563a272ad177f1bfd44dd
tree9416d5341b03b215b505e118ede0fa657c6898d6
parent541132f0961a4f17b02974902085af964adf5966
net: mscc: ocelot: extend watermark encoding function

The ocelot_wm_encode function deals with setting thresholds for pause
frame start and stop. In Ocelot and Felix the register layout is the
same, but for Seville, it isn't. The easiest way to accommodate Seville
hardware configuration is to introduce a function pointer for setting
this up.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/ocelot/felix_vsc9959.c
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot_vsc7514.c
include/soc/mscc/ocelot.h