Skip to content

Commit

Permalink
net: marvell: prestera: Add PCI interface support
Browse files Browse the repository at this point in the history
Add PCI interface driver for Prestera Switch ASICs family devices, which
provides:

    - Firmware loading mechanism
    - Requests & events handling to/from the firmware
    - Access to the firmware on the bus level

The firmware has to be loaded each time the device is reset. The driver
is loading it from:

    /lib/firmware/mrvl/prestera/mvsw_prestera_fw-v{MAJOR}.{MINOR}.img

The full firmware image version is located within the internal header
and consists of 3 numbers - MAJOR.MINOR.PATCH. Additionally, driver has
hard-coded minimum supported firmware version which it can work with:

    MAJOR - reflects the support on ABI level between driver and loaded
            firmware, this number should be the same for driver and loaded
            firmware.

    MINOR - this is the minimum supported version between driver and the
            firmware.

    PATCH - indicates only fixes, firmware ABI is not changed.

Firmware image file name contains only MAJOR and MINOR numbers to make
driver be compatible with any PATCH version.

Co-developed-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vadym Kochan authored and David S. Miller committed Sep 17, 2020
1 parent 501ef30 commit 4c2703d
Show file tree
Hide file tree
Showing 3 changed files with 782 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/net/ethernet/marvell/prestera/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ config PRESTERA

To compile this driver as a module, choose M here: the
module will be called prestera.

config PRESTERA_PCI
tristate "PCI interface driver for Marvell Prestera Switch ASICs family"
depends on PCI && HAS_IOMEM && PRESTERA
default PRESTERA
help
This is implementation of PCI interface support for Marvell Prestera
Switch ASICs family.

To compile this driver as a module, choose M here: the
module will be called prestera_pci.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/marvell/prestera/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
obj-$(CONFIG_PRESTERA) += prestera.o
prestera-objs := prestera_main.o prestera_hw.o prestera_dsa.o \
prestera_rxtx.o

obj-$(CONFIG_PRESTERA_PCI) += prestera_pci.o
Loading

0 comments on commit 4c2703d

Please sign in to comment.