Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4807856ybg; Tue, 29 Oct 2019 12:41:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmsR33wFD73X/B3frBmL5ybJTalTUGoqbwr+f8/kbtCP9h8QfyyqpBHsj1eRqiYA+CSAIs X-Received: by 2002:a50:8dc5:: with SMTP id s5mr27933444edh.115.1572378111861; Tue, 29 Oct 2019 12:41:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1572378111; cv=pass; d=google.com; s=arc-20160816; b=rijb4aR4j8XeuewGsIx/p+FoNuDVjoBmkGS35B9STw72oespWDcZBOkdmYJ5bDTGCm 1FswAGxWK9jAsW7bIUeb8AV7vlvcjQ/zrokgwhd5XRlRqTUmbeJW0favPzeKxy5eLM/P yDUmRlTsnbBJyhctyebk6kBNNZmHzWcFN1XS0uP/ilePSTABG3ppBaGRfDY59lzI/NHz /Ap/UZcsZ6N84TcDFYZ2Od3M/oTniY58GtHNKtCeCUg+6WFtI+0JrzQ/KZtuHJ7sM291 yMMlmNaQICSrlGsfP2nKq4X0kM+LwJrbq5le7eli25ZEsOzh8SyVcRGYvzUQjUFOKGNc pIHw== 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:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=Kr8VloC+mYDuv5cVLFmzjcA/FCSlxCF1LuDIMNtDgmA=; b=KP4VSjIdWxdKXnMBG59sHdBeZlSIcfLO7XWbB10aJ69YPyuLGdBEhR0pzE8t5ak7Fk 4hlnoEtBUbWHqjFYsrShhUoIy8ptbr2lzGQiVdCZkzMKMs8ji4inkrpoEHZtRQfoQJp0 w9/I8i0nTHdVbWHZpW+IJptSVCAD1VmZFFpDQZsJd80ZK4FNSLVStXnQAoG3CM/nLPe0 35PIx0NDmhkrxdAp5FIPKvS5BTqqWYTsWSKm5qBeo2RSOW1w7lKrMvbl9nLcskSR1/u6 ThTUwIEV9FlZaYvkcE4TFXgXk8AURKIg5KtrSedDzophhkbw/ywcgICT6MIVbcgfZuVS yUjQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="rdTj/lno"; 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 u11si11148963eda.235.2019.10.29.12.41.28; Tue, 29 Oct 2019 12:41:51 -0700 (PDT) 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="rdTj/lno"; 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 S2388868AbfJ2NlJ (ORCPT + 99 others); Tue, 29 Oct 2019 09:41:09 -0400 Received: from mail-eopbgr130043.outbound.protection.outlook.com ([40.107.13.43]:22515 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388773AbfJ2NlJ (ORCPT ); Tue, 29 Oct 2019 09:41:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RwXyB4Vs8Bq1ZjiCglG3qSibaGLAqk/IwGXr3n8Sh2KSWpUOW+d9uB6uIH1jxoiZ8goZ9GTHAmMQPk/Z0r0Nchb93r1ar9hd4H0QC2W0JhyQPhKYP29VC4Acd5fzqrb7zppO00Se8D17VUUBL+li8Jts5WWWkE+HlUhoNRO9svO9BC3XlqTUFmDreiqhiAPJnW+5ox3rCOmIVDa65TPHjdTqFS1NihWHDeiFdfDODtsDyM7Mkq5oAEsj7KcWG+RpBcqAPcmvozqFxgklG0y5YBtcQcWqd+rJGJWghv32AevZYoGGD/G1Nxa+HphgtSz7ezp3OF6GmVSzed3BuKWncA== 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=Kr8VloC+mYDuv5cVLFmzjcA/FCSlxCF1LuDIMNtDgmA=; b=HXiTHXsaNIYSr06VJupHdfoelj4X6LURyM4nmGzRliyl1HfONKFzpyyJ5qZD7Ay1Wme9+gNhpaWdGrauFuvdFIDHv6kTJljAmqAUpFPw4dE/cr1FYi4PrF+bEKDm1BBzmZBpzVKiZXnQfgjemI6KVnTXKq13qLlLQB7+MzZNMLiKuChcUCPWmHV6GK7b9vQ+MGiHRToE4rTAmD2NRI70DrijFpScqB8wOFQO+yM+VOvHSzdgBUqRBIh6gUQDbwc2eO4Orz02SbOWxnA2LRHPW5J9HczTgOKRrgTnrjfgzeSZ2diseIP7fY2FHlK8XlZK2CSnc539yhvlwy3SI8k3ZA== 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=Kr8VloC+mYDuv5cVLFmzjcA/FCSlxCF1LuDIMNtDgmA=; b=rdTj/lnoVeJCoP1Wgbk+PaxRuIMNUlcmXv18wBEL+P1lXqQIm2c8OFAGXVhQ1W6ySu4x/0NkJaCBupmwAqmyl4ucxfpXlrSx0wg0WozSo4aUxfxSWPHjPy5PHgWO9IwVHjDs83wy/I05LzkJ695jK7i8f4iczVjRYWQDaGCWGcs= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB5139.eurprd04.prod.outlook.com (20.176.215.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.20; Tue, 29 Oct 2019 13:41:05 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::843c:e722:27cb:74e1]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::843c:e722:27cb:74e1%5]) with mapi id 15.20.2387.023; Tue, 29 Oct 2019 13:41:05 +0000 From: Peng Fan To: "mturquette@baylibre.com" , "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Abel Vesa CC: "kernel@pengutronix.de" , dl-linux-imx , Anson Huang , Jacky Bai , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Leonard Crestez , Peng Fan Subject: [PATCH 3/7] clk: imx: add imx_unregister_hw_clocks Thread-Topic: [PATCH 3/7] clk: imx: add imx_unregister_hw_clocks Thread-Index: AQHVjl6DqFkzDZKMjkuaAFJmKDfH7w== Date: Tue, 29 Oct 2019 13:41:05 +0000 Message-ID: <1572356175-24950-4-git-send-email-peng.fan@nxp.com> References: <1572356175-24950-1-git-send-email-peng.fan@nxp.com> In-Reply-To: <1572356175-24950-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: HK0P153CA0030.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::18) 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: 0af38f9c-b4de-4821-1945-08d75c75a58c x-ms-traffictypediagnostic: AM0PR04MB5139:|AM0PR04MB5139: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1002; x-forefront-prvs: 0205EDCD76 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(376002)(366004)(39860400002)(396003)(136003)(199004)(189003)(6436002)(102836004)(66946007)(52116002)(66556008)(66066001)(5660300002)(66476007)(2501003)(81166006)(8676002)(486006)(81156014)(6506007)(386003)(66446008)(6486002)(64756008)(256004)(478600001)(26005)(2906002)(3846002)(76176011)(186003)(25786009)(99286004)(71190400001)(71200400001)(6116002)(6512007)(6636002)(54906003)(14454004)(7736002)(36756003)(446003)(11346002)(476003)(2616005)(305945005)(4326008)(44832011)(50226002)(316002)(110136005)(86362001)(2201001)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5139;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: 1YyQKMeP+EQSs53hKPrRzJ203xBODIRoduxM809N9Ugt25RQodV+R+EygwZPdrAU0WQPubSICyh1k1jAajRzzTuPEsZhfHg4PD3FP8xN+NtlJAKlemzD4+qGwtv30oES4KWN/psV77PrrDa7nggQ87gla45iuBbl/TZknq+Isqj6iFB8v47od3A5fgfgC7hlnV/wpVxZT7la3JxKdZIJ7x/jr8id2SuHHjKBt2QL5JZ5Pay4TaWeUHf8uW4HF9JX4B7DsBUJAebSLHMXfN4T0gMqTQEbBg+Zi8J6sPQOnYm8abWQndjf51TFhFmVQUbs8tJ+FB/r+hKp5DJ9NEigb0pPdzuxaUnb4CteoC7Llft6+yl961wItbpm7IHD2g1vQ5a6fAngeICM04wFRKhjZS+0YQoxCdMxKnfJLM/Ff0v+AsqzGhA82UGmv6s025Td 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: 0af38f9c-b4de-4821-1945-08d75c75a58c X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2019 13:41:05.7024 (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: tCGJmZdpqjVuaTURmm8sUPPImytfTiVTEsfgyQSldhx13Bd47cgpRQfGNcvEIJ8otVRUQLGmbnMGkxe441ccog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan There is a non hw API based imx_unregister_clocks to unregister clocks when of_clk_add_provider failed. Add a hw API based imx_unregister_hw_clocks when of_clk_add_hw_provider failed. Signed-off-by: Peng Fan --- drivers/clk/imx/clk.c | 8 ++++++++ drivers/clk/imx/clk.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index cfc05e43c343..d0ce29f2c417 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -22,6 +22,14 @@ void imx_unregister_clocks(struct clk *clks[], unsigned = int count) clk_unregister(clks[i]); } =20 +void imx_unregister_hw_clocks(struct clk_hw *hws[], unsigned int count) +{ + unsigned int i; + + for (i =3D 0; i < count; i++) + clk_hw_unregister(hws[i]); +} + void __init imx_mmdc_mask_handshake(void __iomem *ccm_base, unsigned int chn) { diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index e67f7d4ab1dd..7d6157f6dcf9 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -12,6 +12,7 @@ void imx_check_clk_hws(struct clk_hw *clks[], unsigned in= t count); void imx_register_uart_clocks(struct clk ** const clks[]); void imx_mmdc_mask_handshake(void __iomem *ccm_base, unsigned int chn); void imx_unregister_clocks(struct clk *clks[], unsigned int count); +void imx_unregister_hw_clocks(struct clk_hw *hws[], unsigned int count); =20 extern void imx_cscmr1_fixup(u32 *val); =20 --=20 2.16.4