Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751904AbdFMH6f (ORCPT ); Tue, 13 Jun 2017 03:58:35 -0400 Received: from mail-dm3nam03on0074.outbound.protection.outlook.com ([104.47.41.74]:22944 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751765AbdFMH6c (ORCPT ); Tue, 13 Jun 2017 03:58:32 -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=fail action=none header.from=nxp.com; From: Dong Aisheng To: CC: , , , , , , , , , Dong Aisheng Subject: [PATCH V2 0/2] timer: add imx tpm timer support Date: Tue, 13 Jun 2017 15:58:43 +0800 Message-ID: <1497340725-26594-1-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131418143113519032;(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)(336005)(39860400002)(39380400002)(39850400002)(39410400002)(39840400002)(39400400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(54534003)(4326008)(86362001)(39060400002)(6666003)(47776003)(6916009)(104016004)(7416002)(8676002)(8656002)(498600001)(8936002)(53936002)(77096006)(50226002)(68736007)(5660300001)(81166006)(38730400002)(81156014)(5003940100001)(2351001)(110136004)(2906002)(54906002)(33646002)(105606002)(189998001)(106466001)(356003)(305945005)(85426001)(50986999)(50466002)(48376002)(97736004)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0911;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD015;1:kX1Zz6CFV5aEsU8gcZvpYakLpqRw2m1wwhp3MPnfY7KV6ryYpPB/pdm+QhWOpfa/seeKu3ngz590ao/uTecQrA/fjxsvbf/YS/c4of+A8jvYt7CIhZydtB2uu5uL11rc3xFus7b7RlZjRRDXXASTx3/TZPnmUw2Mr/IvDELdyXJxLL9NVgWqDzOVXkVveMvGPNxxFBFl8qUybNJbIaiW08ji9XiXiAo6A5ckILp1asyX1NwOs2zQtr+nWCx1FTSCRXl8rqtYYF7Dqz5WN2XHh/o3KxOB0eCc6zkcr/cGHmJr8Rk/uoGfVbi4g73gMZRKdzFHZ1Cj2cG0eMc6Xme2wc7C52CeMqwzPdSwwMDZ9BSmecrYivtJUxG7sZ5LSLPTIOINpCac84fibtlbRg3h9MHaIPwMrNxIhkeqK8KppCswgtCqJRHG6X6mfYsddH16QRg5Ydr7nSAP3+jE6ARdhldchmuOcoNcu0BcfJZAU/v8h8Ml7Ga6CYCKheY/ZCmoJceCTc78TZW1cV2IiwMQrT2xrGW8Wt9deDWsvEwnpJ0H1gEdgIRFPVdnQfBtocek57VqIweprBlWTv5HCmIAA27zPgEjAB3d/Lu/YrIWrjqNdVEoO/iUzYxl5HQMA+B7IvqEun99Fu4xeaaGTIyjgTRbR/4byLETqXm6mvH8zanfSB6CbMKBy/YabWH+qZrC MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0301MB0911: X-MS-Office365-Filtering-Correlation-Id: 39155a94-1cf3-4727-3e5a-08d4b231fbc7 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:DM2PR0301MB0911; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0911;3:Rvz1eiznR1WsJdK+JqLuLA55hv4pLy/t1srVd9CkdEwticUzCe5Q9A3Kb7eGhbW5JR5AWlsIJnotQMeIWlDdV0Ka91ZLYiukjCc8t7RF0bke2ifQpWiS67jdsUODkz+ZZ7te0/ecc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sKgXf90h2OcGJYxUqamD7O6D9Dxo8mAcVo2j1a9a2XrHsyg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6096035)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123556025)(20161123559100)(20161123561025)(20161123563025)(20161123565025)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0301MB0911;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0301MB0911; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR0301MB0911;4:5NpNnIPQrXW3h4l7BzpxRP4tbFodGIarCx/9h2WX?= =?us-ascii?Q?gFly6kpKC43p34Xmaj73Zb6NIxtwhfyN5eurEfpCe+OM1g8EpxVeDIFDtr6D?= =?us-ascii?Q?Z/T4IMbAa1shYPcumwiqQ3Bs9NeJLFOqtKDPxfY2wRQt4U98+mVHowO1ttHL?= =?us-ascii?Q?mJROVKea7iTqsM2YYHLyN4BOijMnddIshkNEXFwcHOiN9IN4796uNWhn7MlB?= =?us-ascii?Q?GiLpG4fffVQQOBAdNE4AyI+WQsXhRRVm3df30Qc5/sE/8PS16CWLq0Yw4YJQ?= =?us-ascii?Q?DXQsWEC3pZD6u5MYo5mu+Pw9CYg0A1IK45VVCGInVyIctmMTGaiKpqtPpiRd?= =?us-ascii?Q?qpUbqatHrqDd5KMVj6pPvBdCw5Sm2ZqEj4/q3Bm10G9KhyX//miNhFXOmozw?= =?us-ascii?Q?SWvKGKkSEHb2IXDZOLxtEuVfZSf2X1VrpzI+PfLvP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zrXU0u9ZRb3TV/YfC2Z4w6+1CjNuTShAteYEQ/1nblOXB4JrvjaiwSyG3GjI/w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2017 07:58:31.1647 (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: DM2PR0301MB0911 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1220 Lines: 30 The Timer/PWM Module (TPM) supports input capture, output compare, and the generation of PWM signals to control electric motor and power management applications. The counter, compare and capture registers are clocked by an asynchronous clock that can remain enabled in low power modes. TPM can support global counter bus where one TPM drives the counter bus for the others, provided bit width is the same. This patch only adds the timer support. PWM would be added later. ChangeLog: v1->v2: * change to readl/writel from __raw_readl/writel according to Arnd's suggestion to avoid endian issue * add help information in Kconfig * add more error checking Dong Aisheng (2): dt-bindings: timer: add nxp tpm timer binding doc timer: imx-tpm: add imx tpm timer support .../devicetree/bindings/timer/nxp,tpm-timer.txt | 28 +++ drivers/clocksource/Kconfig | 8 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-imx-tpm.c | 227 +++++++++++++++++++++ 4 files changed, 264 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/nxp,tpm-timer.txt create mode 100644 drivers/clocksource/timer-imx-tpm.c -- 2.7.4