Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7472f4f2 authored by Iordache Florinel-R70177's avatar Iordache Florinel-R70177 Committed by David S. Miller
Browse files

fsl/fman: enable FMan Keygen



Add support for the FMan Keygen with a hardcoded scheme to spread
incoming traffic on a FQ range based on source and destination IPs
and ports.

Signed-off-by: default avatarIordache Florinel <florinel.iordache@nxp.com>
Signed-off-by: default avatarMadalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ca58ce57
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4,6 +4,6 @@ obj-$(CONFIG_FSL_FMAN) += fsl_fman.o
obj-$(CONFIG_FSL_FMAN) += fsl_fman_port.o
obj-$(CONFIG_FSL_FMAN) += fsl_mac.o

fsl_fman-objs	:= fman_muram.o fman.o fman_sp.o
fsl_fman-objs	:= fman_muram.o fman.o fman_sp.o fman_keygen.o
fsl_fman_port-objs := fman_port.o
fsl_mac-objs:= mac.o fman_dtsec.o fman_memac.o fman_tgec.o
+8 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@

#include "fman.h"
#include "fman_muram.h"
#include "fman_keygen.h"

/* General defines */
#define FMAN_LIODN_TBL			64	/* size of LIODN table */
@@ -56,6 +57,7 @@
/* Modules registers offsets */
#define BMI_OFFSET		0x00080000
#define QMI_OFFSET		0x00080400
#define KG_OFFSET		0x000C1000
#define DMA_OFFSET		0x000C2000
#define FPM_OFFSET		0x000C3000
#define IMEM_OFFSET		0x000C4000
@@ -1737,6 +1739,7 @@ static int fman_config(struct fman *fman)
	fman->qmi_regs = base_addr + QMI_OFFSET;
	fman->dma_regs = base_addr + DMA_OFFSET;
	fman->hwp_regs = base_addr + HWP_OFFSET;
	fman->kg_regs = base_addr + KG_OFFSET;
	fman->base_addr = base_addr;

	spin_lock_init(&fman->spinlock);
@@ -2009,6 +2012,11 @@ static int fman_init(struct fman *fman)
	/* Init HW Parser */
	hwp_init(fman->hwp_regs);

	/* Init KeyGen */
	fman->keygen = keygen_init(fman->kg_regs);
	if (!fman->keygen)
		return -EINVAL;

	err = enable(fman, cfg);
	if (err != 0)
		return err;
+2 −0
Original line number Diff line number Diff line
@@ -328,6 +328,7 @@ struct fman {
	struct fman_qmi_regs __iomem *qmi_regs;
	struct fman_dma_regs __iomem *dma_regs;
	struct fman_hwp_regs __iomem *hwp_regs;
	struct fman_kg_regs __iomem *kg_regs;
	fman_exceptions_cb *exception_cb;
	fman_bus_error_cb *bus_error_cb;
	/* Spinlock for FMan use */
@@ -336,6 +337,7 @@ struct fman {

	struct fman_cfg *cfg;
	struct muram_info *muram;
	struct fman_keygen *keygen;
	/* cam section in muram */
	unsigned long cam_offset;
	size_t cam_size;
+783 −0

File added.

Preview size limit exceeded, changes collapsed.

+46 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading