Skip to content
Commit 501ef306 authored by Vadym Kochan's avatar Vadym Kochan Committed by David S. Miller
Browse files

net: marvell: prestera: Add driver for Prestera family ASIC devices



Marvell Prestera 98DX326x integrates up to 24 ports of 1GbE with 8
ports of 10GbE uplinks or 2 ports of 40Gbps stacking for a largely
wireless SMB deployment.

The current implementation supports only boards designed for the Marvell
Switchdev solution and requires special firmware.

The core Prestera switching logic is implemented in prestera_main.c,
there is an intermediate hw layer between core logic and firmware. It is
implemented in prestera_hw.c, the purpose of it is to encapsulate hw
related logic, in future there is a plan to support more devices with
different HW related configurations.

This patch contains only basic switch initialization and RX/TX support
over SDMA mechanism.

Currently supported devices have DMA access range <= 32bit and require
ZONE_DMA to be enabled, for such cases SDMA driver checks if the skb
allocated in proper range supported by the Prestera device.

Also meanwhile there is no TX interrupt support in current firmware
version so recycling work is scheduled on each xmit.

Port's mac address is generated from the switch base mac which may be
provided via device-tree (static one or as nvme cell), or randomly
generated. This is required by the firmware.

Co-developed-by: default avatarAndrii Savka <andrii.savka@plvision.eu>
Signed-off-by: default avatarAndrii Savka <andrii.savka@plvision.eu>
Co-developed-by: default avatarOleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: default avatarOleksandr Mazur <oleksandr.mazur@plvision.eu>
Co-developed-by: default avatarSerhiy Boiko <serhiy.boiko@plvision.eu>
Signed-off-by: default avatarSerhiy Boiko <serhiy.boiko@plvision.eu>
Co-developed-by: default avatarSerhiy Pshyk <serhiy.pshyk@plvision.eu>
Signed-off-by: default avatarSerhiy Pshyk <serhiy.pshyk@plvision.eu>
Co-developed-by: default avatarTaras Chornyi <taras.chornyi@plvision.eu>
Signed-off-by: default avatarTaras Chornyi <taras.chornyi@plvision.eu>
Co-developed-by: default avatarVolodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>
Signed-off-by: default avatarVolodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>
Signed-off-by: default avatarVadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5114b331
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment