From patchwork Tue Jan 25 08:52:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 12723423 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 9253FC433F5 for ; Tue, 25 Jan 2022 08:54:33 +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:Message-ID:Date:Subject:CC :To: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=6ZzcPKKIvzXrsyDQU8V6tqYwy6nSexLfQvSJYNgVon4=; b=v15wng9XxVZREd qjc6UoM0vficAOaea85PA1RzP9GxGm+2Qwhtmi+sJ6delNwP4HJ14YZJMMuztUiAfkhSwQF4sr05v /9YS3/Qhb4F4EnVVRTrha3uS47uvAQZDyah2WNwW8SLXaBCX1EyHyBIuYra18TmFYSCkhZMBkhtiW 4E/DanQoBADATA80OhCMQ1atIJikk+kmn6Snk1FHVE4ok6zeA5ECK7YeBlFRTTRc49z85I0m5p2pg gDe4fEU2yyhnA0A8ZQyEgai+8QBZGuJnubhbchvfqEf5061hqtbZ7VuWYpAjcb+U7z6KZM1lJkHtR uGF9z4HstS6xSONeYIXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCHZN-006ty1-K2; Tue, 25 Jan 2022 08:52:53 +0000 Received: from mail-eopbgr60108.outbound.protection.outlook.com ([40.107.6.108] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCHZK-006tx3-BZ for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 08:52:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CchPKbnpDD2bLuRPjxRa70a422wDS8dPjIwsbUUwwEuPbgpYuA4+XO7sbqeGFebkxgM89Wk/GugsJ3GHgTRMlORE/aYS8S6GPN68GfI5aH6MSyLqvKUO70bghBkOBkKjGFt41HE/xUcjteEONI/UAl0CVKmkyh1rfdCT8SBPHqHmcS2djFJm3YlQqx6o2Pt6brRLVW1SQhlRfCql+7j1OXPjCwwLbRDeuC1NN0J1RCxhercuHd/vXlX8lZ75nMITTgHwx3BtkwU3XYLd+3pFoTAblHAdBwG+f2THfSVIyvZ6CidQtEiFzao/TcDZHB9MNosKPdkW/xSXHkeLVHJylw== 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=3X07FiMvTMvbpr8oS6LHNALMIuFKEsGfxRzibfAZUf0=; b=kQzpmxxZ3bv6plhz/js0QR340DhrTTlCeD/UZQpNBvV6Z9/4a4vevCYplQ0EdjxDsdkZxpIzfVKRre3vIy9WqSnMDPe2kVbf8EMyv0XV+AJTUAmUp2IFdo2zcYZScRn4aRe4NpKkLwERhSVES9lGRQ9pehMdBo6ZEmsFXk/BOEtW8QzDLBMkW7/0b5E/N3N84oWuJLv2k6jH2SMvxjhBtrAFcgPChe8xaodCNkN55hbeXb4W4wVcHdaZ3sWq4Rap5fWiWvLP3BS9abAWjnfjUa7P3YFgPEpcnckSDsMnXlO7/RT14nMKE/vSZBQmqavG8msa1PDnvGRzpA9+0hH/FQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.66) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arri.de; dmarc=none action=none header.from=arri.de; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arrigroup.onmicrosoft.com; s=selector1-arrigroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3X07FiMvTMvbpr8oS6LHNALMIuFKEsGfxRzibfAZUf0=; b=BUGR6uBqZJOQOHgJy/VaJF0CxJNq04NMGOByvIJDDNF3CNVrW+Bz4bRoHWVbfIO8DWlg7mVzuKwHj3rl88oMgTqDTHEWcAQ5q7EIE11ipTSnFewmZziJnpZoC7ayh7jol4S6JXPrfP9ornBFi3JUMYlzpYoOWGBHwLE/UKsGmlw= Received: from AM0PR10CA0026.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:17c::36) by AS8PR07MB8156.eurprd07.prod.outlook.com (2603:10a6:20b:377::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.14; Tue, 25 Jan 2022 08:52:47 +0000 Received: from VE1EUR02FT004.eop-EUR02.prod.protection.outlook.com (2603:10a6:208:17c:cafe::fd) by AM0PR10CA0026.outlook.office365.com (2603:10a6:208:17c::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.8 via Frontend Transport; Tue, 25 Jan 2022 08:52:47 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.66) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.66 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.66; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.66) by VE1EUR02FT004.mail.protection.outlook.com (10.152.12.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4909.7 via Frontend Transport; Tue, 25 Jan 2022 08:52:45 +0000 Received: from localhost.de (192.168.54.129) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.498.0; Tue, 25 Jan 2022 09:52:44 +0100 From: Christian Eggers To: Abel Vesa CC: Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , , , , Stefan Riedmueller Subject: [PATCH 0/6] clk: imx6*: avoid GPMI clock glitches on reparenting/divider change Date: Tue, 25 Jan 2022 09:52:00 +0100 Message-ID: <20220125085206.8508-1-ceggers@arri.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Originating-IP: [192.168.54.129] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d917b04-666b-4a20-7299-08d9dfe00e71 X-MS-TrafficTypeDiagnostic: AS8PR07MB8156:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1x+uC85KivG3WWODoeQPQjZ+AGHY3Oeio2t42QRAPaN3TBdDksbUqz5+4+4Nioc8TyMKtw1dT86M/kJVeGIUNEC6ukRYjSSoi2/ovb0xzsRPUbqKULAQGkt/bDl7TFZFSKki7s7q550Ic02C9d7xv78XySLQQ2UZVzn3k6wQdj5ewUkShs7Qb/sUHB52KmMK9Y+D+bjMRVlTo216dcCjI6pWUDKV9UpJGrQJFszhwpVOQZaxsNC8zvLG3W/xiVRbARhcM1humAkVNvQRRXt/U26/GTrkBeTWaSZlh1gakQ5RlwCTpCL/dECDx4dG9JfQ17n5cpgud8/1qWhYsxUy0ZXlSo8pFJ7XvzH6Myu2bUrlNNSDC60c5OBBwlahFI1yoGeGXrJar9horrip+Qkmwda3R/65BPi9fG+Ah0GHm11rLvOQkhCPnISPRZeU+G2ytyZO7DJ+jCOKDsgmg87EvnKv1JEZ43HnvfXK/kJ+0JquFNw1z+dermOph37zVPPD67PzHj8fAXF4JwYJyM6NcfJHsyAjDjGSvtEl8YgUdB8B5GnHedVlKo0xt6ZuEIxbVHDfEufx4Z5gBDt5kKG9RTu+VqcN6uEt5jRpZOhLPD/mjOjxRVVgH7x+vp/p0BYg6nPqLQ7BZxxkdh/ESmj+LrL2AmYTxGQiR2QPc1H09iO+Zk02DfAt3T0xy4hzWyxACMXNBUNjhXKQvkqu+oUgug== X-Forefront-Antispam-Report: CIP:217.111.95.66; CTRY:DE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mta.arri.de; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(4326008)(8936002)(70206006)(70586007)(8676002)(6862004)(107886003)(508600001)(40460700003)(82310400004)(426003)(47076005)(356005)(336012)(36860700001)(2616005)(81166007)(316002)(1076003)(186003)(26005)(16526019)(54906003)(2906002)(6666004)(86362001)(83380400001)(5660300002)(4744005)(36756003)(36900700001)(20210929001); DIR:OUT; SFP:1102; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2022 08:52:45.4964 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5d917b04-666b-4a20-7299-08d9dfe00e71 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a; Ip=[217.111.95.66]; Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR02FT004.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB8156 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220125_005250_424032_FF2DD580 X-CRM114-Status: UNSURE ( 8.32 ) 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 On the i.MX6 series (but not on i.MX7/8), most clock multiplexers and switchable dividers are not "glitch safe", so switching them while a consumer is connected can cause glitches with a higher frequency than supported by the consuming peripheral. Without fixes, peripherals can fail occasionally. One example is that system boot fails due to lockup of the GPMI NAND controller: f53d4c109a66 ("mtd: rawnand: gpmi: Add ERR007117 protection for nfc_apply_timings") The conditions where this can appear also depend on the device from which the system is booted and whether the bootloader has already performed all reparenting of the clocks. To avoid these problems, the clock subsystem must: - Gate consumer clocks during reparenting - Enforce that all consumer clocks are gated before client drivers can change the divider