Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932752AbcC3JAN (ORCPT ); Wed, 30 Mar 2016 05:00:13 -0400 Received: from mail-by2on0063.outbound.protection.outlook.com ([207.46.100.63]:5473 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753391AbcC3JAI (ORCPT ); Wed, 30 Mar 2016 05:00:08 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; From: Zhao Qiang To: CC: , , , , , , , Zhao Qiang Subject: [PATCH 1/5] fsl/qe: add rx_sync and tx_sync for TDM mode Date: Wed, 30 Mar 2016 16:50:26 +0800 Message-ID: <1459327830-19829-1-git-send-email-qiang.zhao@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131038020053415152;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(50986999)(2906002)(33646002)(5008740100001)(47776003)(81166005)(50226001)(85426001)(48376002)(11100500001)(87936001)(86362001)(4326007)(106466001)(77096005)(189998001)(1096002)(36756003)(229853001)(19580395003)(19580405001)(104016004)(92566002)(586003)(6806005)(110136002)(2351001)(50466002)(105606002)(1220700001)(5003940100001)(7059030);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB1227;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD043;1:D8aR/F9qpa5F7PLAD9Xn9Giydc4TQ2LB3WPKs5d4koN0zWd96PQuBTPm2tKifmlKPU+lQB1dsAmIgWUGKYPl2j5yar4Rbu7VTrO7tg1gPtXArdE5XVBNCo9Sb7w1BUGHEUUPrj7F0218qCeFrMONPRtLRWNpU7q8HlGIM7WT6PYE/nFjOd8DuvMReFzYFF1HgkrukvkK95gOPXUX7nvaKqhcYZugm5I/BNUmnDo1NO7eJnwKt/cdv43cfOfOjBvpNyfA+0z3YM6uTyOlEtq9B7G0hnEzIrexV4UgeT+W1Jw1bnc2c7TIR4kDLuqxkWoiA5Fta8GyEbWgP+CxcWYrBxxvOgKNbX9NO9JBvaWgTelS+ttEy3tGHZ1Qwxachwlbdq8R4e4/yFUbuVlgBoj2A/FAmlcCPNO0QiBcBnOh8KCUPtkwAPEAQ6EAXgegNXellMoIY8FTSN2iGhd14jEPAxGwmqm82oPpSmiZJoBc6xTxyYea9lULcFbNR21I8F9jT7jK8vs4SuREr8Ue8oFj6h4B8fPPQslf4Ic1F1gMnTz4bt8fg0KKs9lfqPTL0itvaZthI/WrlKZ81nD+0piNSDtWpuLzbXP1suuYObozKAwBdTmJQ6PUU8JhhRVYJK7R MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 316acc42-8e6e-4346-538f-08d35879afcf X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1227;2:U5Wvp8JPJpJhjRPAIkKPl5Brbmx6Z5AV9tX6kehQyvwwMMj4cOrkUhHTZvwHce2myGvuelVEwM0dYu+Yr0GqOvTHeH1OlEI7bLOEfnM6i4exGrXGAMIS39IOFRKhqLn81GjCLId0kNhhJa5uaugfZY14ZfSMp9PFtrdOlC3YNHoxsi/U/qXKnnuuWt2ilBpt;3:xndCmCpHwi8LPLtfzu9L30ivCBler8XcsL5rb+oPyuJs8JlpQzOyrFAhtibmJNwpb7+flzYm/Kd4TiSRVn8v6mE7aV4C2E80yRXgdcDisVdHvcmafL0xBh+mP0ASDbfGaUA1ZVZsQQDDzapq1dKBwQkVe5pEjWd6Qfz+w3ZCr//22pz7FIxWqF9l5UAw8XRZX08na+JbYmliXX20uXfTa1GzgNCzsoKh8QQpOcvDXjM= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1227; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1227;25:I2AVlVHaP1I0dSZRiiy9dXRSCxBZ13uaExU+FH14ALctqHKORB5hadPR2JrEEgFtebG1XEAmlj2TqaLejvgaHc98Rg4JZQa+6BqOx/3wACZIVrxbPdf1CWQwYp7SMovOmDI+YecDYcycVOCCaB2OFfad0ALro3M7/+A0O5hhEWfuZiWxXJo/158LxXsUshEjMQUu6aaGb8hxGOvplYYyTU81zoO8d6/5ElQcUESVvkRrCCvRKb9IiydrG9aHbIKiCKl9XLt5Kp4HrilQGFEuw5XVK8hRybYuMV0DjoaOHCyfakRq/OqgIiT9Ajwt9bA/D/JTOlZrl8zxZgyzDotJNg/GEZyLnA6U3lbiW9tKi3ox7btPlcYU51bYbmlTQYhIvct2CVHa3ZG72tO4gN2DshkSOxzNGeFqHr38gHYxt3/iR1IrAYH/nVABk0SlDXS0eyEuCyJoAwhkKGVRaidc+tTbh4+1oyiZTyRzDORQ/2nt/zJJtdIJjl58Yzw46uGFCqqmbIBSpdpiCSwv5QTDgAxVT3r80dKzbtZYuRgwQHaQqPaSBpCjI93jFBuY7gyG X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13017025)(13023025)(13015025)(13018025)(5005006)(8121501046)(13024025)(3002001)(10201501046);SRVR:CY1PR0301MB1227;BCL:0;PCL:0;RULEID:(400006);SRVR:CY1PR0301MB1227; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1227;4:UA5y+YuHqXAb1TqvQQzUpbGjovONWZd2PNtmiFK4VcgVK5CKl7saj+letVowvAlHJXupAuPa/HdfreYIsJHwRS9Axz12NGqVKXnSifvXtXici5MGlErW0A+vg4Jrx4/pxUPlcYnqJeHAqFbI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BHTuWOPdkCNqoaYdBqIlvLY9f/ORK+Z4W?= =?us-ascii?Q?9DrVd2ZSi63JcHf9BcNZnS8SurA/DYmjXPR1skyN+P7RVfO5f89fBuCHsbE/?= =?us-ascii?Q?Wqnj6djkiPPQVBlaWcZQuhU9+SNHrJkzA7M3vrih0Nfxk2pGCsYN9wwQUAIX?= =?us-ascii?Q?IkK6eNdTMTFmUG14NWsi+E+depoQyTmHwfBZis1t/Kfth0TalKbL8Ok5IdH2?= =?us-ascii?Q?G4dGGr6bVY8RjSudo8Mo2Ki1lZ4K6iJ4VJFjCrHS0cnUwS+RXrOQpHKWXqR1?= =?us-ascii?Q?bYas2Ptt747WrSjIDVAtCeEH7efXdhqU6vOm1ExYe4ELstFVSZ0tCm9swzMf?= =?us-ascii?Q?4F6F66ooecvkT2XIOkHlEgdtc99n4NYRM81r+cLq3+iu84CjHirSmmfIx6g3?= =?us-ascii?Q?0DbybIXZwh7UD+QPsJG6CoevdeAodF68CEBDTzI19EwMxQM8bMr5y3psnY3f?= =?us-ascii?Q?NNCaBpyqutLzL5fqJlxRB5uNV?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1227;5:ZM48DViCd+LkL8PNibpHlXS1Y8PskxITOW27Lei7j6LzSxFyAnijjUmGNoUEmIboq0DvAmTqWkFv34efjZkZ8gupN0UeCbWK56wFLF0KITwW9BfPJiT2vhjnWveT7NYPHzhZc6O627LxR+lhyNC0NGklkfKqJD3ySYMy9Gp3ye8=;24:UpeFsSOzCD+P07LLXzELHL+Z8RMzdsrLO52HPE5L+xp2UvnJ0QmFSt+QQR1obfAHjHv2AAstKHxlvPADNWD9l9KcpeOsnmvAPFnfQkFfv1E= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2016 09:00:05.1387 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1227 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1591 Lines: 55 Rx_sync and tx_sync are used by QE-TDM mode, add them to struct ucc_fast_info. Signed-off-by: Zhao Qiang --- drivers/soc/fsl/qe/qe.c | 6 ++++++ include/soc/fsl/qe/qe.h | 2 ++ include/soc/fsl/qe/ucc_fast.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 709fc63..7026507 100644 --- a/drivers/soc/fsl/qe/qe.c +++ b/drivers/soc/fsl/qe/qe.c @@ -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)) diff --git a/include/soc/fsl/qe/qe.h b/include/soc/fsl/qe/qe.h index 33b29ea..f918745 100644 --- a/include/soc/fsl/qe/qe.h +++ b/include/soc/fsl/qe/qe.h @@ -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 }; diff --git a/include/soc/fsl/qe/ucc_fast.h b/include/soc/fsl/qe/ucc_fast.h index df8ea79..31548b7 100644 --- a/include/soc/fsl/qe/ucc_fast.h +++ b/include/soc/fsl/qe/ucc_fast.h @@ -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; -- 2.1.0.27.g96db324