Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4161782pxb; Tue, 25 Jan 2022 04:54:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyt8mEoAy7FMxiMHv4iG2hmdqCRZw4NEvf8nqGoeJcoxQmhwha70ZKiiIY4veCKM2UbSTfH X-Received: by 2002:a63:a84b:: with SMTP id i11mr15030517pgp.486.1643115281929; Tue, 25 Jan 2022 04:54:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1643115281; cv=pass; d=google.com; s=arc-20160816; b=FgL5v0Dl3saMOkdBzUQt/zKQc7BnZeCVJtM4eRMYbKqistDORASt+VnZN0EALSWYCo 6//V7xV/z5DwQSifHL0cDXv9sn+497PbhYKgVgXug+b+qBIH0pN6pMPDow6Jdx7/FEkc KJvNygpMEKY/zLMx3BqBgpoTpMuTN9NudzxVd0R1Vl3Q+wypaJtKszHDSFtwIT+Goxdw tBTSaUn6ud1QBVIbzWbXc8uFwwnNfu3NuHd/gqWznaSbMFSXFYR95kXSsWK4Nz6D6Krx ErBFd2lxa5SB0MFvCwutIrjXm5LdTRzelh/TcXLlTKn+kEYSP5oqGOx9bR29dZXHCU8D y2ug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3X07FiMvTMvbpr8oS6LHNALMIuFKEsGfxRzibfAZUf0=; b=HSMYIxcXVg9YUXtvqsBz4qlMSZ2i0loCaYDytG+m5HUfIqHaJb0/hfgjZKs+KLiC3O R2Y5bhaTZlpFamu4yt3LZihRM/btui2oD0w2ldzzPpW3PqvB4vefyWFrobaoxLAEJq+D E3mxKwxXdt8SeEKHystgorwLiA2ft656sJ/H+PeSde9DKEdA0tgE1EzCwvY5jvnnJTW3 zCkaTNjQR0wcjAMpSdJbwDjaaLud3ZP7mpjAt6hpJwfKTtmlquSZwV0gJAr95GXOl1UU wz0fDY+Z+KBGPx0P0ZKHjLAVn/vpgdWrTuZKE6cstCFC1LfCrJVZh9INzqPykuv8HZ8d q3lQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arrigroup.onmicrosoft.com header.s=selector1-arrigroup-onmicrosoft-com header.b=BUGR6uBq; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c38si15953607pgc.746.2022.01.25.04.53.55; Tue, 25 Jan 2022 04:54:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@arrigroup.onmicrosoft.com header.s=selector1-arrigroup-onmicrosoft-com header.b=BUGR6uBq; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1453100AbiAYI4o (ORCPT + 99 others); Tue, 25 Jan 2022 03:56:44 -0500 Received: from mail-eopbgr80110.outbound.protection.outlook.com ([40.107.8.110]:35650 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1453196AbiAYIw5 (ORCPT ); Tue, 25 Jan 2022 03:52:57 -0500 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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