Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp227540pxx; Thu, 29 Oct 2020 00:40:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk0wbWh+sAxpLDvjCmuNNCFLgb+szcr/HQD6oVcnayljfaFqWwuFFIhD0sokyfEQt3ehet X-Received: by 2002:a17:906:ec9:: with SMTP id u9mr2825976eji.400.1603957204121; Thu, 29 Oct 2020 00:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603957204; cv=none; d=google.com; s=arc-20160816; b=rkY0PFy24h+nFPYVpaZjYmH4btdnTYcRmsEzzXvft6D4qPq0rWkRMc7LgN/OXk1zwf c8QIkhQWmoW/LUQrCnJOF3BOoQQc4NsxpXyzTCwVm9A4r3o+MVo6ZtNxKT067ulRphGD g2u8Yh7qo6hCSWeqgr5dCznEXeZ/LBO/AZS8bra7TMchsIPBSWN4lE3PEV+SA2cLKyZs sptferCy+dlwZjtYpAxAuA4OB0rmafsj0M/f49/7DtfJLuypuLfWUNr/MJtKVVnnjZbZ o8HW+lpPW1c10kKimG+TOvcbEuq9tl/upLaexyc4uT+lg0hjHmLiGFvJ2MPD/P/YeL76 C+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=3Zgs3PAaXIp2L5lMTNEPV5hW4nJnyUS7gSL+Ziv1xPE=; b=UfCUuQOmbCBhFuBkXBYzlugvUknhhTx86MzTZ6H/lRE9axEi7HyixNA+ssbs2wSYBL 7+Y5RaNVhAyT1lDyX88m+NFESDGHZF7bdrLA/PF/OVyNweuR+Wfrr65mSGGXyh8fEslD 0g76imIR8EqNEhF3Gdl/niLkTax2DVpXkRJ6X7R7C/gEQfFNz9fCMtr3F/dVI/s/SHXg KI2Sfe8Z1IuWNSl9v2jaBenPmj84lWC70B5WkyF5gVURrl6Kq8kKZmdpleJFX9peQWJC sFuUBHRV2ziWQS71D/r8rl7yQUrhxTLba1v/dsE/giLROqJ8DUfIfhWV+blDSgz55y+Q d45Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si989438edr.585.2020.10.29.00.39.42; Thu, 29 Oct 2020 00:40:04 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732987AbgJ1WZs (ORCPT + 99 others); Wed, 28 Oct 2020 18:25:48 -0400 Received: from inva021.nxp.com ([92.121.34.21]:58412 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732965AbgJ1WZo (ORCPT ); Wed, 28 Oct 2020 18:25:44 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 23D372015FE; Wed, 28 Oct 2020 13:59:35 +0100 (CET) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 16AA92015F8; Wed, 28 Oct 2020 13:59:35 +0100 (CET) Received: from fsr-ub1664-175.ea.freescale.net (fsr-ub1664-175.ea.freescale.net [10.171.82.40]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 6391A2030E; Wed, 28 Oct 2020 13:59:34 +0100 (CET) From: Abel Vesa To: Mike Turquette , Stephen Boyd , Lucas Stach , Rob Herring , Shawn Guo , Sascha Hauer , Fabio Estevam , Anson Huang , Jacky Bai , Peng Fan , Dong Aisheng Cc: NXP Linux Team , linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, Abel Vesa Subject: [PATCH v2 0/5] Fix the gate2 and make it more flexible Date: Wed, 28 Oct 2020 14:58:57 +0200 Message-Id: <1603889942-27026-1-git-send-email-abel.vesa@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org First version here: https://lkml.org/lkml/2020/10/26/988 Changes since v1: * split the work in multiple iterative patches Abel Vesa (5): clk: imx: gate2: Remove the IMX_CLK_GATE2_SINGLE_BIT special case clk: imx: gate2: Keep the register writing in on place clk: imx: gate2: Check if clock is enabled against cgr_val clk: imx: gate2: Add cgr_mask for more flexible number of control bits clk: imx: gate2: Add locking in is_enabled op drivers/clk/imx/clk-gate2.c | 65 +++++++++++++++++++++------------------------ drivers/clk/imx/clk.h | 27 +++++++++---------- 2 files changed, 43 insertions(+), 49 deletions(-) -- 2.7.4