]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - drivers/net/ethernet/cadence/macb.h
net: macb: Add support for partial store and forward
[zynq/linux.git] / drivers / net / ethernet / cadence / macb.h
index 5fbd2c36e55d702983e5c2c284dc3ef658a7c7ab..83909bcaa466e38c224d7a2984dd13fed0d6f08b 100644 (file)
@@ -82,6 +82,7 @@
 #define GEM_NCFGR              0x0004 /* Network Config */
 #define GEM_USRIO              0x000c /* User IO */
 #define GEM_DMACFG             0x0010 /* DMA Configuration */
+#define GEM_PBUFRXCUT          0x0044 /* RX Partial Store and Forward */
 #define GEM_JML                        0x0048 /* Jumbo Max Length */
 #define GEM_HRB                        0x0080 /* Hash Bottom */
 #define GEM_HRT                        0x0084 /* Hash Top */
 #define GEM_ADDR64_OFFSET      30 /* Address bus width - 64b or 32b */
 #define GEM_ADDR64_SIZE                1
 
+/* Bitfields in PBUFRXCUT */
+#define GEM_WTRMRK_OFFSET      0 /* Watermark value offset */
+#define GEM_WTRMRK_SIZE                12
+#define GEM_ENCUTTHRU_OFFSET   31 /* Enable RX partial store and forward */
+#define GEM_ENCUTTHRU_SIZE     1
 
 /* Bitfields in NSR */
 #define MACB_NSR_LINK_OFFSET   0 /* pcs_link_state */
 #define MACB_CAPS_JUMBO                                0x00000020
 #define MACB_CAPS_GEM_HAS_PTP                  0x00000040
 #define MACB_CAPS_PCS                          0x00000080
+#define MACB_CAPS_PARTIAL_STORE_FORWARD                0x00000100
 #define MACB_CAPS_FIFO_MODE                    0x10000000
 #define MACB_CAPS_GIGABIT_MODE_AVAILABLE       0x20000000
 #define MACB_CAPS_SG_DISABLED                  0x40000000
@@ -1060,6 +1067,9 @@ struct macb {
 
        struct tasklet_struct   hresp_err_tasklet;
 
+       /* holds value of rx watermark value for pbuf_rxcutthru register */
+       u16                     rx_watermark;
+
        struct macb_ptp_info    *ptp_info;      /* macb-ptp interface */
 #ifdef MACB_EXT_DESC
        uint8_t hw_dma_cap;