Commit 75a74920 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Miguel Jimenez Lopez

kernel: added TX/RX timestamp incorrect bitfields to TXTSU and NIC register descriptions

parent bd3ee870
......@@ -401,6 +401,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 1 register 1 */
#define NIC_RX1_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 1 register 1 */
#define NIC_RX1_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 1 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 1 register 2 */
......@@ -446,6 +449,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 2 register 1 */
#define NIC_RX2_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 2 register 1 */
#define NIC_RX2_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 2 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 2 register 2 */
......@@ -491,6 +497,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 3 register 1 */
#define NIC_RX3_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 3 register 1 */
#define NIC_RX3_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 3 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 3 register 2 */
......@@ -536,6 +545,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 4 register 1 */
#define NIC_RX4_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 4 register 1 */
#define NIC_RX4_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 4 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 4 register 2 */
......@@ -581,6 +593,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 5 register 1 */
#define NIC_RX5_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 5 register 1 */
#define NIC_RX5_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 5 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 5 register 2 */
......@@ -626,6 +641,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 6 register 1 */
#define NIC_RX6_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 6 register 1 */
#define NIC_RX6_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 6 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 6 register 2 */
......@@ -671,6 +689,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 7 register 1 */
#define NIC_RX7_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 7 register 1 */
#define NIC_RX7_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 7 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 7 register 2 */
......@@ -716,6 +737,9 @@
/* definitions for field: Got RX Timestamp in reg: RX Descriptor 8 register 1 */
#define NIC_RX8_D1_GOT_TS WBGEN2_GEN_MASK(14, 1)
/* definitions for field: RX timestamp (possibly) incorrect in reg: RX Descriptor 8 register 1 */
#define NIC_RX8_D1_TS_INCORRECT WBGEN2_GEN_MASK(15, 1)
/* definitions for register: RX Descriptor 8 register 2 */
/* definitions for field: RX_TS_R in reg: RX Descriptor 8 register 2 */
......@@ -800,6 +824,7 @@
/* definitions for field: Transmit Error in reg: Interrupt status register */
#define NIC_EIC_ISR_TXERR WBGEN2_GEN_MASK(3, 1)
/* definitions for RAM: TX/RX Buffers */
#define NIC_MEM_BASE 0x00008000 /* base address */
#define NIC_MEM_BYTES 0x00008000 /* size in bytes */
#define NIC_MEM_WORDS 0x00002000 /* size in 32-bit words, 32-bit aligned */
......
......@@ -319,6 +319,19 @@ RX_desc_template = {
access_bus = READ_ONLY;
access_dev = WRITE_ONLY;
};
field {
name = "RX timestamp (possibly) incorrect";
prefix = "TS_INCORRECT";
description = "read 1: the RX timestamp in R2 register may be incorrect, because it has been generated during counter adjustment,\
read 0: the RX timestamp in R2 register is correct";
type = BIT;
access_bus = READ_ONLY;
access_dev = WRITE_ONLY;
};
};
......
......@@ -78,6 +78,11 @@
#define TXTSU_TSF_R1_FID_W(value) WBGEN2_GEN_WRITE(value, 16, 16)
#define TXTSU_TSF_R1_FID_R(reg) WBGEN2_GEN_READ(reg, 16, 16)
/* definitions for register: FIFO 'Timestamp FIFO' data output register 2 */
/* definitions for field: Timestamp (possibly) incorrect in reg: FIFO 'Timestamp FIFO' data output register 2 */
#define TXTSU_TSF_R2_INCORRECT WBGEN2_GEN_MASK(0, 1)
/* definitions for register: FIFO 'Timestamp FIFO' control/status register */
/* definitions for field: FIFO full flag in reg: FIFO 'Timestamp FIFO' control/status register */
......@@ -105,7 +110,9 @@ PACKED struct TXTSU_WB {
uint32_t TSF_R0;
/* [0x14]: REG FIFO 'Timestamp FIFO' data output register 1 */
uint32_t TSF_R1;
/* [0x18]: REG FIFO 'Timestamp FIFO' control/status register */
/* [0x18]: REG FIFO 'Timestamp FIFO' data output register 2 */
uint32_t TSF_R2;
/* [0x1c]: REG FIFO 'Timestamp FIFO' control/status register */
uint32_t TSF_CSR;
};
......
......@@ -19,7 +19,8 @@ peripheral {
properly (there was no metastability/setup/hold violation)\
Entries also contain information required to identify the endpoint and frame for which the timestamp was taken:\
- FID - Frame identifier assigned by the NIC\
- PID - TXTSU port ID to which came the timestamp. Used to distinguish the timestamps for broadcast/multicast frames";
- PID - TXTSU port ID to which came the timestamp. Used to distinguish the timestamps for broadcast/multicast frames;\
- INCORRECT - timestamp may be incorrect, it has been generated during timebase adjustment";
flags_bus = {FIFO_FULL, FIFO_EMPTY, FIFO_COUNT};
flags_dev = {FIFO_FULL, FIFO_EMPTY};
......@@ -58,6 +59,14 @@ peripheral {
type = SLV;
size = 16;
align = 16;
};
field {
name = "Timestamp (possibly) incorrect";
description = "1: This timestamp may be incorrect (generated during PPS adjustment)\
0: Timestamp is correct.";
prefix = "incorrect";
type = BIT;
};
};
......@@ -66,7 +75,7 @@ peripheral {
name = "TXTSU fifo not-empty";
description = "Interrupt active when TXTSU shared FIFO contains any timestamps.";
prefix = "nempty";
trigger = LEVEL_0;
trigger = LEVEL_1;
};
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment