From patchwork Mon Feb 5 03:17:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13544950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16F34C4828F for ; Mon, 5 Feb 2024 03:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=xkgzazLYq9952NWpTVGJ2YV/M+F/avCIgk8zv/9TAnM=; b=CLopceLRz97ho+ OmSL6Fxbmk5tCQGH3g1XWJIWeB/hBKvirVbAjlYoEQFcb5uEp2aMzBkAJ2pmf3zQZ5fZ+97uroOl/ muVdxCU+4zCvIgWvBzOfc8MuuIWoqKAzyP3auCBcbVpcdOylx3YJxqQNuHO8amVLmw9ObVtfbqn5L WcZ7R6Cpcv47wqzCwovVV5jkXab7mPF1fSPmKRX/OAhww3xqQV4OXb6GA5yyoloN6jorTZNxCzgZd ETQu1fm3Pv859ErwGwCl3M8lWOBT0kGl+INY3a1OsDEyh1rwglkjiN+rNBSsnIi/Ft5ZZtITx7tzh LWj+Ny/67mXwAKbEprvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWpQe-00000001tbZ-1d4x; Mon, 05 Feb 2024 03:13:52 +0000 Received: from mail-vi1eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2613::600] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWpQa-00000001tak-2yKg for linux-arm-kernel@lists.infradead.org; Mon, 05 Feb 2024 03:13:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lkFv3GajaD+1pCGJKkOaS6K9+h9JEyfe6gbnkvp3xjb6rBJyXG9vKeskxaVslaEJ1A26kY/HUvBZuF+DX6HH4+isoxK3uwrg6KSMweyRWV1FaWL2ndv8/fmR+IyYVyVrtTX3mjYbRx3S091fpunvuQtxLOTNJzxPlMwP7ts8fhlh5gK2J8LE5F27dRK9FoMAFwBLOMJaOR18zox33aEbBcnvCY4I6MqjjuFiMia8gcAlvB0gJAGzrBZ0L3vqaLNEBpv1luOQpuliScOcqXre2A34tEgnYAdN24PmJ8IbJmuEKvz5ObRwist5DbPmA9Ty7XnZ68hfRg4drv07GOXL7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6IiOJrVFnr4zhlj8JpXz5IH3hUjJ+iOT8QmVy+Iws/4=; b=VXNbOpLI0K46hLqMKaABuU8cIWktxYx0F8KVMSh0kuFvBwyUjkRTFeBvualG7gXJUEE5UuXMd7SNLxfpB1ueq6CaYjukpu7NDRs8eELNO3J/9Bx/bcs7N+k4dWBCoj3mZtvx4/xlHsNHAfbImGASyhhmlzb+MUlX0qkkubNp1K/ffOccB76BjStyC2x89slSEUWUC0A4K0LxJ4zM+1llbaFQlyQi0CHw6od/FuYRTGJxgzkMKg/LIRqcOMrA3jGC+/kH4VlOMT4tI+L/NCK6HPz5rpu6Shd7kcogAMS4gLw61gSr7zcHaySS7IIv4x6IOXxFj4dB/U3FXnp7JoC4oA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6IiOJrVFnr4zhlj8JpXz5IH3hUjJ+iOT8QmVy+Iws/4=; b=FccyDkCcWw/tjbcql2IsQsZliKCbSkF6ls0uYJ3i26LG0WyBgdO/HiLegOmG5vRiSMu2XDAEqH41ehzVAyzVPMc7AGuPoeyVqfyGK3E0nUGOhOsnU5QPpDYtKZXhiePS17KeAzWlwhYvSsaMHnSkL/Zw/U8nSQGByPdsgdTV3LQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by PA4PR04MB7775.eurprd04.prod.outlook.com (2603:10a6:102:c3::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.34; Mon, 5 Feb 2024 03:13:40 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6%3]) with mapi id 15.20.7249.032; Mon, 5 Feb 2024 03:13:39 +0000 From: "Peng Fan (OSS)" Subject: [PATCH v4 0/3] clocksource: imx-sysctr: support i.MX95 Date: Mon, 05 Feb 2024 11:17:56 +0800 Message-Id: <20240205-imx-sysctr-v4-0-ca5a6e1552e7@nxp.com> X-B4-Tracking: v=1; b=H4sIAGRTwGUC/23Myw6CMBCF4Vcxs7amzABFV76HcdGUQWbBJS1pI IR3t7BRE5fnJN+/QmAvHOB2WsFzlCBDn0Z+PoFrbf9iJXXagBpznWGhpJtVWIKbvCJbXa2uCiR TQgKj50bmI/Z4pt1KmAa/HO2I+/s3E1FpZYgwN9rVxvK9n8eLGzrYI5G+YfkDKUGihiud1UVD2 Qdu2/YGv7At9NsAAAA= To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bai Ping , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Marco Felsch Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan , Krzysztof Kozlowski X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707103086; l=1346; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=s9G+71tPkns3tJbaPqdwLtIcxDTfdPPhPBzYx1UNYcA=; b=Nk4lvIgIEwi2RhT65PML/BO4uk6udMYofZW9edusRAiirWIeqH1o+bNtJMA7CVvt+ldWhkLCa pUYa5iHx6GgALVSuGry4tIUHGPrnCuQUW15pk6MslcH0A/pm50LYJk3 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0124.apcprd02.prod.outlook.com (2603:1096:4:188::9) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PA4PR04MB7775:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ee43cdc-0b69-4b53-1400-08dc25f8734c X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8nDitdvmxkBbUCKRgH4khpcvIFuPodg7tGBTcc/0/HxTV2o/h1JIYcHdsVrDlxs/x84w6SbOuXJhMW1T9gk6hSP028lLcDlkcTFkUlNsnw6R6TQp9Ps1OuMCuC429Wq+HBH2AH33jIvVJA56O+dQww1E5+mEF1tGraocjk4G/JRRUvSRvYVEYQIvNtKyj2sfDT5vPlOzQp/ATFmbmtLMzA9DgFp4rxPXgAg/gapSPxmpwJEUYLI9+3n8Mq9kawz+1XoUGnqwwpAlzWtptumiNyk2tJSt4AV/KgEocMt+BPdWzW+AmKtqNvJzOOC//+aKmUVLXji3PJg8EVokEH5AF7dAbarkL6jcT9IVk99rH9+9XBVcEcKo0N1EOyfbMSXkBvWcAnumPDMaVvkWQzK22RvYuQY5tRqAr8bx+6sCh+Snx8HXIWVjwuzpvRloVTG4BNiF9C7NFCOPEOfux19wfaGDtqUg0g3kWOfuGmue8MOa0SNbwt5ANt6yuGZyEoJzonXV0WaWGL1kgSRzG1Ze2bDY8b4tT+qCNKmyTFnVoc7W4jz+0BUfe39YdKu7o86FTkyyEOyYIFtb7c/Xus5Lre0j5M71LBzJb2aNyaX4S1nEluMrrUVc1ao+eA5OnFs1bRURh/1Ijz8t0wnkE0cnm2JdDMoyH/s6dn5VHN46ouM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(136003)(346002)(366004)(396003)(376002)(230922051799003)(186009)(64100799003)(1800799012)(451199024)(6666004)(52116002)(6506007)(83380400001)(38100700002)(26005)(86362001)(41300700001)(4326008)(36756003)(8936002)(8676002)(9686003)(6512007)(921011)(478600001)(2906002)(966005)(6486002)(7416002)(5660300002)(66476007)(54906003)(316002)(66946007)(66556008)(38350700005)(110136005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?z9vqtQYKKX1g5g9jjH7HcxgJJ8ck?= =?utf-8?q?ohjFO3xiM6+n6euY0E1/WDBcU2k3mJfVOOX+RknDnS+Z2wluA21woLcuVd96j85fF?= =?utf-8?q?pjbQVUgajRVDLJn15/BruqR9Z47mMeEimEWidPXcUvb7W4kxibvA5rpypO/C2tJRH?= =?utf-8?q?t3dM3LG4qNJ3YblQJmfXT/zWTeF740ttIJ6+mBBt9EYa/hNy78helHA8G1ODPvqjb?= =?utf-8?q?NX08yBUEHVGbtTaRdUHQ19HpPURP3GtOJ1oV8PXpmefPPR2OChdrIUGDVnIlI0mQ8?= =?utf-8?q?8mEpJjGmmQo1rTHhFLaXk7ZbvdmaUPfsvTMHX8Zy15kJcZGt3mLvrCfgEprIMR6aj?= =?utf-8?q?rjJmbLT/0+PdOo2TiVyalxuKgbja7RPNOs640iDlSoJyR7SjcSX3XIYPvOVsg2xwU?= =?utf-8?q?RenSxP4EvAA85KcotDEyLLNq/30JfX/a2aUbxeBUUwzxSZPt335gwNLtKg1auUyea?= =?utf-8?q?UGIOJUbkzknT6JlonFJa9vl2/jGyHRhgyJt2vo7k747AnB7Ojy+LAxAL6kaQNruYh?= =?utf-8?q?OXdPINx1js89EiGalAtylCxNJlWb/Cjd9fFteYZEOYoE+NtdDKNVcVAuyafTgVPAC?= =?utf-8?q?YS9E2xzb2tl7CPTLEPxB/UGarxzkT/WQEDKvQWMV+Z+F8IQ+MRIdRmiUlK6HNPD9j?= =?utf-8?q?fbZN3dodkMX0QvD0ZATLbWb2xlyd7YE/keESmF7FeCR8d6nW2ud0teg0KA0JxYmtk?= =?utf-8?q?KPMLsBWyx7Ks1m84Bv6H6nh6oPAA0ZVQKd+hJgO0lRsh+kW7Excoub9xfVloYth7r?= =?utf-8?q?b2JdLb0e+kmOctRWYmpnEh3zTPZOOfkxqY2LF9K92y7dB0QBuKKzMwCv7y+oapwvv?= =?utf-8?q?y4NfOtxFqE5pxwunRbmOevdyG/UEfOHxObmDSNY6LfNhQhx7CYtC6KbyqZkNfzENH?= =?utf-8?q?N7tlc/7mWSf2NFYTRLd0sjG/J8pzPg2nI63Z8Txsq+cJElLOEwCqmhHYUnY27a9xc?= =?utf-8?q?I6/2dCem7uh/xq4UNfJ+h7d+1ttjtnA9wkkL/ng4MOwjNYsV6yTM0cVaGN9PLEBQr?= =?utf-8?q?pvwguOR33wvD2mzPWpO7EiVmQFaO/j4T7lIK20vomgUi+JNZiWGrsJ85VeS3PGrTm?= =?utf-8?q?l7eN3OkrYys4mEMi4bm3XXZ0HbwVjAHh7KLaSfLj8cuqMoSq9RjbSnBhPY5KevWdB?= =?utf-8?q?Utx6uTIpumUVGcugqMjy5AM47Xh1KMGijcuyYKflZqmDnJGfT6+WHMzrzyHb1daTP?= =?utf-8?q?KN6P0i4TxA24Em+pcuCiVUp+e4I/pUd4AxSg5MTLqiuLlt1VK3jBKuI37EU6NEp6R?= =?utf-8?q?skhnFyDLsxNEapq8TAr63U/q5QUGnY7dbj1WhJPu4eLXHH+7v4DGhdZ8bVzaELfTa?= =?utf-8?q?+/adQYQojKU3bbm4ES2Hd7Kn7AecCtlqsiughhfpEMFGw1H23p8+Ax+EbjmI0vSSt?= =?utf-8?q?cv6F6cGftFTayzZ4a61Zezv3E0F1xjkJqS4a3/o2OX9CUpSLU3qj7XokQeyWs9tA+?= =?utf-8?q?8dANc9xcs8fAEGaRKeOshX16df1zn1WseEGZo8bpQ4L6HTstHpDF0+DRkz3THAI9H?= =?utf-8?q?0YvAH4ZPcSRx?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ee43cdc-0b69-4b53-1400-08dc25f8734c X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2024 03:13:39.7475 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: W5UoTZWQEJ0DlnmTFT1q+BQw1PKnAY1Lr1f/+eGXz0LCYXXsopLgRkpO6uxkYqCeMx0RSkyyPnrTYP2d5exG0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7775 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240204_191348_797727_9FA6686B X-CRM114-Status: UNSURE ( 8.31 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org i.MX95 System Counter module control register space is blocked by SCMI firmware, so we use Read Register space to get the counter. V2: - imx95 is not compatible with the existing hardware, so add a seperate entry for i.MX95 in dt-binding. - Per Marco's comments, the global variables was removed except to_sysctr. And add a new TIMER_OF_DECLARE entry for i.MX95 Signed-off-by: Peng Fan --- Changes in v4: - Add A-b in patch 1 - Include slab.h in patch 2 to fix kernel build failure for i386 compile test. - Link to v3: https://lore.kernel.org/r/20240126-imx-sysctr-v3-0-33fe801d5f31@nxp.com Changes in v3: - Drop items in patch 1 per Conor's comments - Link to v2: https://lore.kernel.org/r/20240125-imx-sysctr-v2-0-7332470cd7ae@nxp.com --- Peng Fan (3): dt-bindings: timer: nxp,sysctr-timer: support i.MX95 clocksource/drivers/imx-sysctr: drop use global variables clocksource/drivers/imx-sysctr: support i.MX95 .../bindings/timer/nxp,sysctr-timer.yaml | 4 +- drivers/clocksource/timer-imx-sysctr.c | 117 +++++++++++++++------ 2 files changed, 90 insertions(+), 31 deletions(-) --- base-commit: 01af33cc9894b4489fb68fa35c40e9fe85df63dc change-id: 20240125-imx-sysctr-3a89a0852376 Best regards,