Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: move common DMA AXI register bits to common.h

Move the common DMA AXI register bits to common.h so they can be shared
and we can provide a common function to convert the axi->dma_blen[]
array to the format needed for this register.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vLfLL-0000000FMap-49gf@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
8c696659 f7ac9a0b

+21 -25
+10
drivers/net/ethernet/stmicro/stmmac/common.h
··· 548 548 #define LPI_CTRL_STATUS_TLPIEX BIT(1) /* Transmit LPI Exit */ 549 549 #define LPI_CTRL_STATUS_TLPIEN BIT(0) /* Transmit LPI Entry */ 550 550 551 + /* Common definitions for AXI Master Bus Mode */ 552 + #define DMA_AXI_AAL BIT(12) 553 + #define DMA_AXI_BLEN256 BIT(7) 554 + #define DMA_AXI_BLEN128 BIT(6) 555 + #define DMA_AXI_BLEN64 BIT(5) 556 + #define DMA_AXI_BLEN32 BIT(4) 557 + #define DMA_AXI_BLEN16 BIT(3) 558 + #define DMA_AXI_BLEN8 BIT(2) 559 + #define DMA_AXI_BLEN4 BIT(1) 560 + 551 561 #define STMMAC_CHAIN_MODE 0x1 552 562 #define STMMAC_RING_MODE 0x2 553 563
+1 -8
drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
··· 69 69 70 70 #define DMA_SYS_BUS_MB BIT(14) 71 71 #define DMA_AXI_1KBBE BIT(13) 72 - #define DMA_SYS_BUS_AAL BIT(12) 72 + #define DMA_SYS_BUS_AAL DMA_AXI_AAL 73 73 #define DMA_SYS_BUS_EAME BIT(11) 74 - #define DMA_AXI_BLEN256 BIT(7) 75 - #define DMA_AXI_BLEN128 BIT(6) 76 - #define DMA_AXI_BLEN64 BIT(5) 77 - #define DMA_AXI_BLEN32 BIT(4) 78 - #define DMA_AXI_BLEN16 BIT(3) 79 - #define DMA_AXI_BLEN8 BIT(2) 80 - #define DMA_AXI_BLEN4 BIT(1) 81 74 #define DMA_SYS_BUS_FB BIT(0) 82 75 83 76 #define DMA_BURST_LEN_DEFAULT (DMA_AXI_BLEN256 | DMA_AXI_BLEN128 | \
+2 -9
drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
··· 68 68 #define DMA_AXI_OSR_MAX 0xf 69 69 #define DMA_AXI_MAX_OSR_LIMIT ((DMA_AXI_OSR_MAX << DMA_AXI_WR_OSR_LMT_SHIFT) | \ 70 70 (DMA_AXI_OSR_MAX << DMA_AXI_RD_OSR_LMT_SHIFT)) 71 - #define DMA_AXI_1KBBE BIT(13) 72 - #define DMA_AXI_AAL BIT(12) 73 - #define DMA_AXI_BLEN256 BIT(7) 74 - #define DMA_AXI_BLEN128 BIT(6) 75 - #define DMA_AXI_BLEN64 BIT(5) 76 - #define DMA_AXI_BLEN32 BIT(4) 77 - #define DMA_AXI_BLEN16 BIT(3) 78 - #define DMA_AXI_BLEN8 BIT(2) 79 - #define DMA_AXI_BLEN4 BIT(1) 80 71 #define DMA_BURST_LEN_DEFAULT (DMA_AXI_BLEN256 | DMA_AXI_BLEN128 | \ 81 72 DMA_AXI_BLEN64 | DMA_AXI_BLEN32 | \ 82 73 DMA_AXI_BLEN16 | DMA_AXI_BLEN8 | \ 83 74 DMA_AXI_BLEN4) 75 + 76 + #define DMA_AXI_1KBBE BIT(13) 84 77 85 78 #define DMA_AXI_UNDEF BIT(0) 86 79
+8 -8
drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h
··· 338 338 #define XGMAC_RD_OSR_LMT_SHIFT 16 339 339 #define XGMAC_EN_LPI BIT(15) 340 340 #define XGMAC_LPI_XIT_PKT BIT(14) 341 - #define XGMAC_AAL BIT(12) 341 + #define XGMAC_AAL DMA_AXI_AAL 342 342 #define XGMAC_EAME BIT(11) 343 343 #define XGMAC_BLEN GENMASK(7, 1) 344 - #define XGMAC_BLEN256 BIT(7) 345 - #define XGMAC_BLEN128 BIT(6) 346 - #define XGMAC_BLEN64 BIT(5) 347 - #define XGMAC_BLEN32 BIT(4) 348 - #define XGMAC_BLEN16 BIT(3) 349 - #define XGMAC_BLEN8 BIT(2) 350 - #define XGMAC_BLEN4 BIT(1) 344 + #define XGMAC_BLEN256 DMA_AXI_BLEN256 345 + #define XGMAC_BLEN128 DMA_AXI_BLEN128 346 + #define XGMAC_BLEN64 DMA_AXI_BLEN64 347 + #define XGMAC_BLEN32 DMA_AXI_BLEN32 348 + #define XGMAC_BLEN16 DMA_AXI_BLEN16 349 + #define XGMAC_BLEN8 DMA_AXI_BLEN8 350 + #define XGMAC_BLEN4 DMA_AXI_BLEN4 351 351 #define XGMAC_UNDEF BIT(0) 352 352 #define XGMAC_TX_EDMA_CTRL 0x00003040 353 353 #define XGMAC_TDPS GENMASK(29, 0)