diff options
author | Zhao Qiang <qiang.zhao@nxp.com> | 2016-06-06 02:30:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-07 18:56:31 -0400 |
commit | c19b6d246a35627c3a69b2fa6bdece212b48214b (patch) | |
tree | c7f5748156aed7f2f2c0eb0e33eab1f7ef23e172 /include/soc | |
parent | 35ef1c20fdb26779b6c3c4fd74bbdd5028e70005 (diff) |
drivers/net: support hdlc function for QE-UCC
The driver add hdlc support for Freescale QUICC Engine.
It support NMSI and TSA mode.
Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/fsl/qe/qe.h | 1 | ||||
-rw-r--r-- | include/soc/fsl/qe/ucc_fast.h | 22 |
2 files changed, 21 insertions, 2 deletions
diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h index c3b1dc8a21a7..70339d7958c0 100644 --- a/include/soc/fsl/qe/qe.h +++ b/include/soc/fsl/qe/qe.h | |||
@@ -657,6 +657,7 @@ struct ucc_slow_pram { | |||
657 | #define UCC_SLOW_GUMR_L_MODE_QMC 0x00000002 | 657 | #define UCC_SLOW_GUMR_L_MODE_QMC 0x00000002 |
658 | 658 | ||
659 | /* General UCC FAST Mode Register */ | 659 | /* General UCC FAST Mode Register */ |
660 | #define UCC_FAST_GUMR_LOOPBACK 0x40000000 | ||
660 | #define UCC_FAST_GUMR_TCI 0x20000000 | 661 | #define UCC_FAST_GUMR_TCI 0x20000000 |
661 | #define UCC_FAST_GUMR_TRX 0x10000000 | 662 | #define UCC_FAST_GUMR_TRX 0x10000000 |
662 | #define UCC_FAST_GUMR_TTX 0x08000000 | 663 | #define UCC_FAST_GUMR_TTX 0x08000000 |
diff --git a/include/soc/fsl/qe/ucc_fast.h b/include/soc/fsl/qe/ucc_fast.h index e898895223f9..3ee9e7c1a7d7 100644 --- a/include/soc/fsl/qe/ucc_fast.h +++ b/include/soc/fsl/qe/ucc_fast.h | |||
@@ -21,19 +21,37 @@ | |||
21 | 21 | ||
22 | #include <soc/fsl/qe/ucc.h> | 22 | #include <soc/fsl/qe/ucc.h> |
23 | 23 | ||
24 | /* Receive BD's status */ | 24 | /* Receive BD's status and length*/ |
25 | #define R_E 0x80000000 /* buffer empty */ | 25 | #define R_E 0x80000000 /* buffer empty */ |
26 | #define R_W 0x20000000 /* wrap bit */ | 26 | #define R_W 0x20000000 /* wrap bit */ |
27 | #define R_I 0x10000000 /* interrupt on reception */ | 27 | #define R_I 0x10000000 /* interrupt on reception */ |
28 | #define R_L 0x08000000 /* last */ | 28 | #define R_L 0x08000000 /* last */ |
29 | #define R_F 0x04000000 /* first */ | 29 | #define R_F 0x04000000 /* first */ |
30 | 30 | ||
31 | /* transmit BD's status */ | 31 | /* transmit BD's status and length*/ |
32 | #define T_R 0x80000000 /* ready bit */ | 32 | #define T_R 0x80000000 /* ready bit */ |
33 | #define T_W 0x20000000 /* wrap bit */ | 33 | #define T_W 0x20000000 /* wrap bit */ |
34 | #define T_I 0x10000000 /* interrupt on completion */ | 34 | #define T_I 0x10000000 /* interrupt on completion */ |
35 | #define T_L 0x08000000 /* last */ | 35 | #define T_L 0x08000000 /* last */ |
36 | 36 | ||
37 | /* Receive BD's status */ | ||
38 | #define R_E_S 0x8000 /* buffer empty */ | ||
39 | #define R_W_S 0x2000 /* wrap bit */ | ||
40 | #define R_I_S 0x1000 /* interrupt on reception */ | ||
41 | #define R_L_S 0x0800 /* last */ | ||
42 | #define R_F_S 0x0400 /* first */ | ||
43 | #define R_CM_S 0x0200 /* continuous mode */ | ||
44 | #define R_CR_S 0x0004 /* crc */ | ||
45 | #define R_OV_S 0x0002 /* crc */ | ||
46 | |||
47 | /* transmit BD's status */ | ||
48 | #define T_R_S 0x8000 /* ready bit */ | ||
49 | #define T_W_S 0x2000 /* wrap bit */ | ||
50 | #define T_I_S 0x1000 /* interrupt on completion */ | ||
51 | #define T_L_S 0x0800 /* last */ | ||
52 | #define T_TC_S 0x0400 /* crc */ | ||
53 | #define T_TM_S 0x0200 /* continuous mode */ | ||
54 | |||
37 | /* Rx Data buffer must be 4 bytes aligned in most cases */ | 55 | /* Rx Data buffer must be 4 bytes aligned in most cases */ |
38 | #define UCC_FAST_RX_ALIGN 4 | 56 | #define UCC_FAST_RX_ALIGN 4 |
39 | #define UCC_FAST_MRBLR_ALIGNMENT 4 | 57 | #define UCC_FAST_MRBLR_ALIGNMENT 4 |