mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
net: sparx5: use FDMA library symbols
Include and use the new FDMA header, which now provides the required masks and bit offsets for operating on the DCB's and DB's. Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com> Reviewed-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
30e48a75df
commit
947a72f40f
@ -18,3 +18,4 @@ sparx5-switch-$(CONFIG_DEBUG_FS) += sparx5_vcap_debugfs.o
|
||||
|
||||
# Provide include files
|
||||
ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/vcap
|
||||
ccflags-y += -I$(srctree)/drivers/net/ethernet/microchip/fdma
|
||||
|
@ -21,53 +21,9 @@
|
||||
#define FDMA_XTR_CHANNEL 6
|
||||
#define FDMA_INJ_CHANNEL 0
|
||||
|
||||
#define FDMA_DCB_INFO_DATAL(x) ((x) & GENMASK(15, 0))
|
||||
#define FDMA_DCB_INFO_TOKEN BIT(17)
|
||||
#define FDMA_DCB_INFO_INTR BIT(18)
|
||||
#define FDMA_DCB_INFO_SW(x) (((x) << 24) & GENMASK(31, 24))
|
||||
|
||||
#define FDMA_DCB_STATUS_BLOCKL(x) ((x) & GENMASK(15, 0))
|
||||
#define FDMA_DCB_STATUS_SOF BIT(16)
|
||||
#define FDMA_DCB_STATUS_EOF BIT(17)
|
||||
#define FDMA_DCB_STATUS_INTR BIT(18)
|
||||
#define FDMA_DCB_STATUS_DONE BIT(19)
|
||||
#define FDMA_DCB_STATUS_BLOCKO(x) (((x) << 20) & GENMASK(31, 20))
|
||||
#define FDMA_DCB_INVALID_DATA 0x1
|
||||
|
||||
#define FDMA_XTR_BUFFER_SIZE 2048
|
||||
#define FDMA_WEIGHT 4
|
||||
|
||||
/* Frame DMA DCB format
|
||||
*
|
||||
* +---------------------------+
|
||||
* | Next Ptr |
|
||||
* +---------------------------+
|
||||
* | Reserved | Info |
|
||||
* +---------------------------+
|
||||
* | Data0 Ptr |
|
||||
* +---------------------------+
|
||||
* | Reserved | Status0 |
|
||||
* +---------------------------+
|
||||
* | Data1 Ptr |
|
||||
* +---------------------------+
|
||||
* | Reserved | Status1 |
|
||||
* +---------------------------+
|
||||
* | Data2 Ptr |
|
||||
* +---------------------------+
|
||||
* | Reserved | Status2 |
|
||||
* |-------------|-------------|
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* | |
|
||||
* |---------------------------|
|
||||
* | Data14 Ptr |
|
||||
* +-------------|-------------+
|
||||
* | Reserved | Status14 |
|
||||
* +-------------|-------------+
|
||||
*/
|
||||
|
||||
/* For each hardware DB there is an entry in this list and when the HW DB
|
||||
* entry is used, this SW DB entry is moved to the back of the list
|
||||
*/
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <linux/debugfs.h>
|
||||
#include <net/flow_offload.h>
|
||||
|
||||
#include <fdma_api.h>
|
||||
|
||||
#include "sparx5_main_regs.h"
|
||||
|
||||
/* Target chip type */
|
||||
|
Loading…
Reference in New Issue
Block a user