Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3049672ybc; Thu, 21 Nov 2019 02:32:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyi7t6QQPQDqyZXK4YtLegNrN8H2hhz15+3RGxavKW88k8vxuUDD6kG4Vis5YqLy4FEuhKs X-Received: by 2002:a17:906:6093:: with SMTP id t19mr12835409ejj.50.1574332340753; Thu, 21 Nov 2019 02:32:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574332340; cv=pass; d=google.com; s=arc-20160816; b=KHmK3nOHNrzyZq1kIxwPx+VNqzcID0ohuWUoVsO50T/bPohWZrip9Qhz+mfcT+mGKl MfNAgSKc7M66FC41FJc6Wire+fEOp74vaU3moCwh0MnVcJ21o921JSxFM/Q7JBXr4U4Q 7aitTT2/eMYpVL3dtXmi4AvjJu1FLAZsYnjR1u1Sjzjf5RnrUPXD3gKhrsctPSHJ94Or 4G9Ej5xmdbfqhW/yF/OTpMRPjGqAmSLzo1cXpNK1jIaRBAGY9ufdfUSrw3aTZH//Jvwd QxkowJyUx/deYu1hurL3YSX0gym9jWe1BLylYlyGqA0bptCCBS8z/6HWWk2xYzcrl3vK TlOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=drhEai2cOWH9fRNUcjHvoKfxwqUxM2ucCjD2yABaBTw=; b=vXEYw8TR3rnW8DUPTQLvMCK4KeYMMf5th58KPFMv9/YFg6Um9IFjzUpU4SmmWeMlIL GUrYSjnzknz4Djy8uqSl5NLgCWby5jbCMgkzre/Pi5HG6dzZEA4oY9qVG03VpP+4TSoI VC6SnKIX4UfmZoMhDha9zIp9Jmqo2vwYGNfnt2v1XBO7DvydDfkQggkpRFJsPhKblCZM phDTFy52fEpgE1OHKNPR/oBrf2oW3x9DmKSNJMFDsB5CKSgZJmja0tiv43+HHkfwRw1a 0YjyR/7XwRch14glb2Am8HxZIlij1oj+yNas6RhU2Uc9ypdxMfa1Su4XrmrNWas678Fc l1Mw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Y76hToc3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16si1805337edi.158.2019.11.21.02.31.54; Thu, 21 Nov 2019 02:32:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=Y76hToc3; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726614AbfKUKao (ORCPT + 99 others); Thu, 21 Nov 2019 05:30:44 -0500 Received: from mail-eopbgr60087.outbound.protection.outlook.com ([40.107.6.87]:14210 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726132AbfKUKao (ORCPT ); Thu, 21 Nov 2019 05:30:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cr515NtOlfrcRSe6QLECcfdV6/SsZquV2mBciB1XqdCu/r9JeG1ncR2i+XW+68QcgzYQ7KaqCdTMVXg2olX/VUVtFuKn5Rj3f2ZA+ogrRAA6t5w9yUdpZscvDYg+WkPS22pKJXo1ZL1iRkQqGtlXZdseqtsy2higpJtIZKr/waChOQG1luooYcEZBSfK1rtFC4wZZlv400wO3loNZHBD0d2NgQvHmG1r3/m4g0q3Y4InrsXsgIXCko4bE4pEa22BJTs0Unc9Cura/EwWKRUlrPqCxOBs3MIkuewfuEmwzw0qzCxSZVUjtkqBdZfzuLgJ6U8oUfwj1QkAvi/1kLBGQQ== 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-SenderADCheck; bh=drhEai2cOWH9fRNUcjHvoKfxwqUxM2ucCjD2yABaBTw=; b=O35BiRDQG9zA6uuF2zZBe2OD6xVBeeTq+EedwjUe81ayVyTB9OhL0cYFhqXVdcHr9nlHa81/IUHrvksGcihPvduM1oHhG9yl1nluDZwo5CxApRTmjMSRhpYfsvBIKTdPgrkO4fYW+GNWQZZREeaPzP0dRiIW0Bfx9BfAQVFRhOJNf36ZtI/o8YGNQ2PrL3pd/7Hw3fEFq/RuHhVXfXxYbhk931igzr8ovsjrhRcHYp48QGYzcJFgfg9sYCHRelfYa9v2c4ETO4ywK5t0oSggHiYoDYQ2Rf050hbi0/ychsnwb/IyPhL6cNZLLs2+y/EsbO/nzB7xce3yVssprXmfeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=drhEai2cOWH9fRNUcjHvoKfxwqUxM2ucCjD2yABaBTw=; b=Y76hToc3SBVjxF3vul81FYoeQbpUM80jyatF11lLxCHLZni60KcA6F2Yk4AvCdb4HD3E93s5TK1pCqYrSiQzp+yIV3uodFovPA8Wjpxfyg+SVQdhjP4P2Sdb2m+cmj7GA28qb2YDnJwB8UoVonrljWJkj/c37xKgaXA6qjaX0Gs= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5554.eurprd04.prod.outlook.com (20.178.112.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.17; Thu, 21 Nov 2019 10:30:40 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::f16d:a26a:840:f97c]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::f16d:a26a:840:f97c%4]) with mapi id 15.20.2451.031; Thu, 21 Nov 2019 10:30:40 +0000 From: Peng Fan To: "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Abel Vesa CC: "kernel@pengutronix.de" , dl-linux-imx , Aisheng Dong , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Leonard Crestez , Alice Guo , Peng Fan Subject: [PATCH] clk: imx: clk-composite-7ulp: add lock Thread-Topic: [PATCH] clk: imx: clk-composite-7ulp: add lock Thread-Index: AQHVoFa4qHyFBgWUVEOTxio+xNlL5Q== Date: Thu, 21 Nov 2019 10:30:39 +0000 Message-ID: <1574332142-7130-1-git-send-email-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK0PR03CA0110.apcprd03.prod.outlook.com (2603:1096:203:b0::26) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: e5898b92-f064-4113-3809-08d76e6ddac0 x-ms-traffictypediagnostic: AM0PR04MB5554:|AM0PR04MB5554: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1850; x-forefront-prvs: 0228DDDDD7 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(376002)(39860400002)(366004)(396003)(346002)(136003)(199004)(189003)(25786009)(36756003)(66066001)(5660300002)(14454004)(478600001)(86362001)(2906002)(14444005)(256004)(71200400001)(71190400001)(2201001)(8676002)(81156014)(81166006)(8936002)(50226002)(305945005)(7736002)(2501003)(6636002)(44832011)(6436002)(99286004)(6512007)(6486002)(4326008)(2616005)(386003)(110136005)(186003)(6506007)(3846002)(26005)(102836004)(6116002)(66476007)(66556008)(64756008)(66446008)(66946007)(52116002)(54906003)(316002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5554;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mUS2HWutZVkg1GvCogYgG9mJKqW377rU34d0dj1/31kqiTHHUJ6cL29dnWB8MiHumUR/cyI2Fpp2cMhcPPJrEgWsoCGli2MsxIcil6uOLdpN3BBcU4X02Whu6+28OSWBz5JzHe0rArFeet58tXFO5w83o0Bzv6j5AGZekmnZzstgnOhKY3Yy9R5oO/5iC46IqZFgnYMcu+rWawq+pfEBJR95E29AB5OatgIcdrNYEO9SQFplCYRxfcbSVylp1MaGV0UNQFb9URHVzkdvE+HfwFLtLxhwFID7h6LrSlSnN7uU8ZluTNZYmbDdVSea0pcyeN4hA8aD0NAudbN5vbdhp7UK2wFee5RVVRUyIR+U8A+9f1oAeAsh1MCxIoS5G7MOwPERLXNYDL0jXdkXkvo3HbFvXS4pyO7ZKgXrCcKy75ImcEW7ywD0wDY6hekNwMLA Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5898b92-f064-4113-3809-08d76e6ddac0 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2019 10:30:40.0393 (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: cRvtYKQ3HTIn80iAPuyWmkGcaAcTMxC+pTxtkHrPzHAIaKnqqGA/7uCcuNxB4P5cw47jM+vaJQZqY4wuE+tCcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5554 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan Add lock to mux/gate/divider to protect the access to the register Signed-off-by: Peng Fan --- drivers/clk/imx/clk-composite-7ulp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/imx/clk-composite-7ulp.c b/drivers/clk/imx/clk-com= posite-7ulp.c index 060f8600ea0d..d8c6e48207c5 100644 --- a/drivers/clk/imx/clk-composite-7ulp.c +++ b/drivers/clk/imx/clk-composite-7ulp.c @@ -41,6 +41,7 @@ struct clk_hw *imx7ulp_clk_composite(const char *name, mux->reg =3D reg; mux->shift =3D PCG_PCS_SHIFT; mux->mask =3D PCG_PCS_MASK; + mux->lock =3D &imx_ccm_lock; } =20 if (rate_present) { @@ -58,6 +59,7 @@ struct clk_hw *imx7ulp_clk_composite(const char *name, fd->nwidth =3D PCG_PCD_WIDTH; fd->nmask =3D PCG_PCD_MASK; fd->flags =3D CLK_FRAC_DIVIDER_ZERO_BASED; + fd->lock =3D &imx_ccm_lock; } =20 if (gate_present) { @@ -70,6 +72,7 @@ struct clk_hw *imx7ulp_clk_composite(const char *name, gate_hw =3D &gate->hw; gate->reg =3D reg; gate->bit_idx =3D PCG_CGC_SHIFT; + gate->lock =3D &imx_ccm_lock; } =20 hw =3D clk_hw_register_composite(NULL, name, parent_names, num_parents, --=20 2.16.4