summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fman/src
diff options
context:
space:
mode:
authorMandy Lavi <mandy.lavi@freescale.com>2013-04-24 07:56:04 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-04-29 20:22:02 (GMT)
commit5045184a0cc3283bcd30d3bbebff6188d30e9fce (patch)
treef47057a56b74a822fe8329767802f4ff59711e3f /drivers/net/ethernet/freescale/fman/src
parent56206bd9f58df8e2a1640c523d6f7fa392e580d1 (diff)
downloadlinux-fsl-qoriq-5045184a0cc3283bcd30d3bbebff6188d30e9fce.tar.xz
fmd21 integration
Signed-off-by: Mandy Lavi <mandy.lavi@freescale.com> Prev fmd integration was fmd19 Diffs from fmd19 to fmd21: Added kgHashShift to t_FmPcdHashTableParams Added nonConsistentSp to t_FmPcdManipReassemIpStats sp - 2 layers separation - for future flib integration rtc - 2 layers separation - for future flib integration PFC enhancement (B4 Rev2 FMAN) API addition (for B4 rev 2): FM_PORT_SetPfcPrioritiesMappingToQmanWQ File fsl_fman.h renamed to lnxwrp_fsl_fman.h The name fsl_fman.h has been applied to other fman internal header file In dpaa_eth: Due to renaming of fsl_fman.h to lnxwrp_fsl_fman.h The relevant include lines in some of the files had to change accordingly Change-Id: I8f25c758963a44a75ca8676aad45f7f96767b0b5 Reviewed-on: http://git.am.freescale.net:8181/2069 Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/src')
-rw-r--r--drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fm_ext.h2
-rw-r--r--drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h (renamed from drivers/net/ethernet/freescale/fman/src/inc/wrapper/fsl_fman.h)34
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/fman_test.c2
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm_port.c25
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c18
-rw-r--r--drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h1
6 files changed, 42 insertions, 40 deletions
diff --git a/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fm_ext.h b/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fm_ext.h
index 8dda657..1b56cbd 100644
--- a/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fm_ext.h
+++ b/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fm_ext.h
@@ -154,7 +154,7 @@ t_Error LNXWRP_FM_TEST_Free(t_Handle h_FmTestLnxWrp);
@{
*//***************************************************************************/
-#include "fsl_fman.h"
+#include "lnxwrp_fsl_fman.h"
/** @} */ /* end of FM_LnxKern_ctrl_grp group */
/** @} */ /* end of FM_LnxKern_grp group */
diff --git a/drivers/net/ethernet/freescale/fman/src/inc/wrapper/fsl_fman.h b/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h
index 89d022b..595a7c7 100644
--- a/drivers/net/ethernet/freescale/fman/src/inc/wrapper/fsl_fman.h
+++ b/drivers/net/ethernet/freescale/fman/src/inc/wrapper/lnxwrp_fsl_fman.h
@@ -31,13 +31,13 @@
*/
/******************************************************************************
- @File fsl_fman.h
+ @File lnxwrp_fsl_fman.h
@Description Linux internal kernel API
*//***************************************************************************/
-#ifndef __FSL_FMAN_H
-#define __FSL_FMAN_H
+#ifndef __LNXWRP_FSL_FMAN_H
+#define __LNXWRP_FSL_FMAN_H
#include <linux/types.h>
#include <linux/device.h> /* struct device */
@@ -201,7 +201,7 @@ void fm_port_pcd_bind (struct fm_port *port, struct fm_port_pcd_param *params);
@Function fm_port_get_buff_layout_ext_params
@Description Get data_align and manip_extra_space from the device tree
- chosen node if aplied.
+ chosen node if aplied.
This function will only update these two parameters.
When this port has no such parameters in the device tree
values will be set to 0.
@@ -316,27 +316,27 @@ int fm_get_max_frm(void);
int fm_get_rx_extra_headroom(void);
/**************************************************************************//**
- @Function fm_port_set_rate_limit
+@Function fm_port_set_rate_limit
- @Description Configure Shaper parameter on FM-port device (Tx port).
+@Description Configure Shaper parameter on FM-port device (Tx port).
- @Param[in] port - A handle of the FM port device.
- @Param[in] max_burst_size - Value of maximum burst size allowed.
- @Param[in] rate_limit - The required rate value.
+@Param[in] port - A handle of the FM port device.
+@Param[in] max_burst_size - Value of maximum burst size allowed.
+@Param[in] rate_limit - The required rate value.
- @Cautions Allowed only after the port is initialized.
+@Cautions Allowed only after the port is initialized.
*//***************************************************************************/
int fm_port_set_rate_limit(struct fm_port *port,
- uint16_t max_burst_size,
- uint32_t rate_limit);
+ uint16_t max_burst_size,
+ uint32_t rate_limit);
/**************************************************************************//**
- @Function fm_port_set_rate_limit
+@Function fm_port_set_rate_limit
- @Description Delete Shaper configuration on FM-port device (Tx port).
+@Description Delete Shaper configuration on FM-port device (Tx port).
- @Param[in] port - A handle of the FM port device.
+@Param[in] port - A handle of the FM port device.
- @Cautions Allowed only after the port is initialized.
+@Cautions Allowed only after the port is initialized.
*//***************************************************************************/
int fm_port_del_rate_limit(struct fm_port *port);
@@ -344,4 +344,4 @@ int fm_port_del_rate_limit(struct fm_port *port);
/** @} */ /* end of FM_LnxKern_grp group */
-#endif /* __FSL_FMAN_H */
+#endif /* __LNXWRP_FSL_FMAN_H */
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/fman_test.c b/drivers/net/ethernet/freescale/fman/src/wrapper/fman_test.c
index 81edc9a..4bd6261 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/fman_test.c
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/fman_test.c
@@ -56,7 +56,7 @@
/* private headers */
#include "fm_ext.h"
-#include "fsl_fman.h"
+#include "lnxwrp_fsl_fman.h"
#include "fm_port_ext.h"
#if (DPAA_VERSION == 11)
#include "../../Peripherals/FM/MAC/memac.h"
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm_port.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm_port.c
index f9f3353..00b0da4 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm_port.c
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_fm_port.c
@@ -509,39 +509,39 @@ static t_Error CheckNConfigFmPortAdvArgs (t_LnxWrpFmPortDev *p_LnxWrpFmPortDev)
return E_OK;
uint32_prop = (uint32_t *)of_get_property(port_node, "num-tnums", &lenp);
- if (uint32_prop) {
+ if (uint32_prop) {
if (WARN_ON(lenp != sizeof(uint32_t)*2))
RETURN_ERROR(MINOR, E_INVALID_VALUE, NO_MSG);
-
+
portRsrc.num = uint32_prop[0];
portRsrc.extra = uint32_prop[1];
-
+
if ((err = FM_PORT_ConfigNumOfTasks(p_LnxWrpFmPortDev->h_Dev,
&portRsrc)) != E_OK)
RETURN_ERROR(MINOR, err, NO_MSG);
}
-
+
uint32_prop = (uint32_t *)of_get_property(port_node, "num-dmas", &lenp);
- if (uint32_prop) {
+ if (uint32_prop) {
if (WARN_ON(lenp != sizeof(uint32_t)*2))
RETURN_ERROR(MINOR, E_INVALID_VALUE, NO_MSG);
-
+
portRsrc.num = uint32_prop[0];
portRsrc.extra = uint32_prop[1];
-
+
if ((err = FM_PORT_ConfigNumOfOpenDmas(p_LnxWrpFmPortDev->h_Dev,
&portRsrc)) != E_OK)
RETURN_ERROR(MINOR, err, NO_MSG);
}
-
+
uint32_prop = (uint32_t *)of_get_property(port_node, "fifo_size", &lenp);
if (uint32_prop) {
if (WARN_ON(lenp != sizeof(uint32_t)*2))
RETURN_ERROR(MINOR, E_INVALID_VALUE, NO_MSG);
-
+
portRsrc.num = uint32_prop[0];
portRsrc.extra = uint32_prop[1];
-
+
if ((err = FM_PORT_ConfigSizeOfFifo(p_LnxWrpFmPortDev->h_Dev,
&portRsrc)) != E_OK)
RETURN_ERROR(MINOR, err, NO_MSG);
@@ -580,7 +580,7 @@ static t_Error CheckNSetFmPortAdvArgs (t_LnxWrpFmPortDev *p_LnxWrpFmPortDev)
uint8_t portId;
p_LnxWrpFmDev = ((t_LnxWrpFmDev *)p_LnxWrpFmPortDev->h_LnxWrpFmDev);
-
+
if (WARN_ON(lenp != sizeof(uint32_t)*2))
RETURN_ERROR(MINOR, E_INVALID_VALUE, NO_MSG);
@@ -609,7 +609,7 @@ static t_Error CheckNSetFmPortAdvArgs (t_LnxWrpFmPortDev *p_LnxWrpFmPortDev)
portId += FM_MAX_NUM_OF_1G_RX_PORTS;
portVSPAllocParams.h_FmTxPort =
p_LnxWrpFmDev->txPorts[portId].h_Dev;
- fmVspParams.liodnOffset =
+ fmVspParams.liodnOffset =
p_LnxWrpFmDev->rxPorts[portId].settings.param.specificParams.rxParams.liodnOffset;
memcpy(&fmVspParams.extBufPools,
&p_LnxWrpFmPortDev->settings.param.specificParams.rxParams.extBufPools,
@@ -1212,7 +1212,6 @@ static int /*__devinit*/ fm_port_probe(struct platform_device *of_dev)
p_LnxWrpFmDev->name, p_LnxWrpFmPortDev->id);
p_LnxWrpFmPortDev->minor =
p_LnxWrpFmPortDev->id + DEV_FM_OH_PORTS_MINOR_BASE;
- p_LnxWrpFmPortDev->h_Dev = FM_PCD_GetHcDevH(p_LnxWrpFmDev->h_PcdDev);
} else if (p_LnxWrpFmPortDev->settings.param.portType ==
e_FM_PORT_TYPE_OH_OFFLINE_PARSING) {
Sprint(p_LnxWrpFmPortDev->name, "%s-port-oh%d",
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c
index c307473..a8e9f0b 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.c
@@ -508,6 +508,7 @@ void compat_copy_fm_pcd_hash_table(
{
param-> max_num_of_keys = compat_param->max_num_of_keys;
param->statistics_mode = compat_param->statistics_mode;
+ param->kg_hash_shift = compat_param->kg_hash_shift;
param->hash_res_mask = compat_param->hash_res_mask;
param->hash_shift = compat_param->hash_shift;
param->match_key_size = compat_param->match_key_size;
@@ -517,6 +518,7 @@ void compat_copy_fm_pcd_hash_table(
{
compat_param-> max_num_of_keys = param->max_num_of_keys;
compat_param->statistics_mode = param->statistics_mode;
+ compat_param->kg_hash_shift = param->kg_hash_shift;
compat_param->hash_res_mask = param->hash_res_mask;
compat_param->hash_shift = param->hash_shift;
compat_param->match_key_size = param->match_key_size;
@@ -641,10 +643,10 @@ void compat_copy_fm_pcd_kg_scheme(
param->bypass_fqid_generation = compat_param->bypass_fqid_generation;
param->base_fqid = compat_param->base_fqid;
#if DPAA_VERSION >= 11
- param->override_storage_profile =
- compat_param->override_storage_profile;
- param->storage_profile = compat_param->storage_profile;
-#endif /* DPAA_VERSION >= 11 */
+ param->override_storage_profile =
+ compat_param->override_storage_profile;
+ param->storage_profile = compat_param->storage_profile;
+#endif
param->num_of_used_extracted_ors = compat_param->num_of_used_extracted_ors;
memcpy(param->extracted_ors,
compat_param->extracted_ors,
@@ -694,10 +696,10 @@ void compat_copy_fm_pcd_kg_scheme(
compat_param->bypass_fqid_generation = param->bypass_fqid_generation;
compat_param->base_fqid = param->base_fqid;
#if DPAA_VERSION >= 11
- compat_param->override_storage_profile =
- param->override_storage_profile;
- compat_param->storage_profile = param->storage_profile;
-#endif /* DPAA_VERSION >= 11 */
+ compat_param->override_storage_profile =
+ param->override_storage_profile;
+ compat_param->storage_profile = param->storage_profile;
+#endif
compat_param->num_of_used_extracted_ors = param->num_of_used_extracted_ors;
memcpy(compat_param->extracted_ors, param->extracted_ors, IOC_FM_PCD_KG_NUM_OF_GENERIC_REGS * sizeof(ioc_fm_pcd_kg_extracted_or_params_t));
compat_param->next_engine = param->next_engine;
diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h
index e8e6677..3078003 100644
--- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h
+++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm_compat.h
@@ -292,6 +292,7 @@ typedef struct ioc_compat_fm_pcd_cc_node_params_t {
typedef struct ioc_compat_fm_pcd_hash_table_params_t {
uint16_t max_num_of_keys;
ioc_fm_pcd_cc_stats_mode statistics_mode;
+ uint8_t kg_hash_shift;
uint16_t hash_res_mask;
uint8_t hash_shift;
uint8_t match_key_size;