fsl/qe: add rx_sync and tx_sync for TDM mode
authorZhao Qiang <qiang.zhao@nxp.com>
Mon, 6 Jun 2016 06:29:58 +0000 (14:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Jun 2016 22:56:30 +0000 (15:56 -0700)
Rx_sync and tx_sync are used by QE-TDM mode,
add them to struct ucc_fast_info.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/soc/fsl/qe/qe.c
include/soc/fsl/qe/qe.h
include/soc/fsl/qe/ucc_fast.h

index 709fc63809e5ca2fa28aeb0ad8be171cba783b4e..7026507e6f1d5e4e53245a43c7c5839d5a4f9171 100644 (file)
@@ -239,6 +239,12 @@ enum qe_clock qe_clock_source(const char *source)
        if (strcasecmp(source, "none") == 0)
                return QE_CLK_NONE;
 
+       if (strcmp(source, "tsync_pin") == 0)
+               return QE_TSYNC_PIN;
+
+       if (strcmp(source, "rsync_pin") == 0)
+               return QE_RSYNC_PIN;
+
        if (strncasecmp(source, "brg", 3) == 0) {
                i = simple_strtoul(source + 3, NULL, 10);
                if ((i >= 1) && (i <= 16))
index 33b29ead3d55acd48a4419ee8d7f0c618b6264b1..f91874582ab39f9b1f27627450477c43da00e078 100644 (file)
@@ -80,6 +80,8 @@ enum qe_clock {
        QE_CLK22,               /* Clock 22 */
        QE_CLK23,               /* Clock 23 */
        QE_CLK24,               /* Clock 24 */
+       QE_RSYNC_PIN,           /* RSYNC from pin */
+       QE_TSYNC_PIN,           /* TSYNC from pin */
        QE_CLK_DUMMY
 };
 
index df8ea7958c6375c3f50b2c2694732cc18d35f148..31548b7aa50e5f60c8c29e602684f34ba118c03b 100644 (file)
@@ -120,6 +120,8 @@ struct ucc_fast_info {
        int ucc_num;
        enum qe_clock rx_clock;
        enum qe_clock tx_clock;
+       enum qe_clock rx_sync;
+       enum qe_clock tx_sync;
        u32 regs;
        int irq;
        u32 uccm_mask;