ftgmac100: Remove tx descriptor accessors

Directly access the fields when needed. The accessors add clutter
not clarity and in some cases cause unnecessary read-modify-write
type access on the slow (uncached) descriptor memory.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Benjamin Herrenschmidt
2017-04-10 11:15:26 +10:00
committed by David S. Miller
parent 6db7470445
commit 52c0cae874
2 changed files with 69 additions and 114 deletions

View File

@@ -202,10 +202,10 @@
* Transmit descriptor, aligned to 16 bytes
*/
struct ftgmac100_txdes {
unsigned int txdes0;
unsigned int txdes1;
unsigned int txdes2; /* not used by HW */
unsigned int txdes3; /* TXBUF_BADR */
__le32 txdes0; /* Control & status bits */
__le32 txdes1; /* Irq, checksum and vlan control */
__le32 txdes2; /* Reserved */
__le32 txdes3; /* DMA buffer address */
} __attribute__ ((aligned(16)));
#define FTGMAC100_TXDES0_TXBUF_SIZE(x) ((x) & 0x3fff)