Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1878593ybl; Thu, 9 Jan 2020 03:14:10 -0800 (PST) X-Google-Smtp-Source: APXvYqwp0yUJ+iCtktKGC3cymmTOjHwD4QdUOxmATkv40AgJnedpaBuHMkIcxMdi6n/onklXohZp X-Received: by 2002:a05:6830:1385:: with SMTP id d5mr8321476otq.61.1578568450584; Thu, 09 Jan 2020 03:14:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1578568450; cv=pass; d=google.com; s=arc-20160816; b=x52aFZpqy10DsiMm0Qq/q48Y/HVql6x/a63XF9AScH8CP657GhQ/S5Z/guESQAlYoo ni81VWcfgev6vZLHC3nlnnRqluC8ny0teCWnmqozBdUCbVgEWqwp18iizJ71V2ULROhO 1KMg1VT24+oMJA4w+pGbKxCekk+Y3XeGVe3u7Q39lpN2on0h4+FwgANmUPR3wyMd/8Mm bO22eFq2SXUhwr/qXN2LUSoEGaLgDmrS+UP+k1HfBQH3FeuU/MKY4V4FPMoUIo9mbosL x3WAFZRRHTRaGHKhvb3Obet9xVV83ID9abxM1fMr2p855YycfzgJF4X7hKbZqvJG+BsD hgZg== 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=muRifBPHRwcqLMy00aKt6JR3b/i4J6Lpr9xqb2CLxMo=; b=Rdj+A8YAxmsW2tkwLx0SPksrsf6CXhAgjeJbLGBzgDqh76j0i926BOOj7DpXzpnuVc eQ/qnUbZsbR2u3d62lHkBNgHKFqRRkqQf3yyDgtrHGBeY5GsyP0Zq+NpEJeXgGISZvAB jKa94/b3g/YySaySU0Q4QivlnS24OaMaBGBYpCn/Ne26JZi0zb9IgrDeAyNCSZ4Ohsev r3stNLiiLf5XDB/0hED5vbl8Nk4HP5RGzjV5+ccF787QbCiwmaBdWVhlb0up8zQsVDLZ dmE2mjN1vd5hCnip7FPB44wgM9R2KzinX7IBUHZ+AQHF/MI3Y/I0pZWKeS2DX8+X31vJ n5jQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=oGxFEn89; 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 h18si3902116otj.114.2020.01.09.03.13.57; Thu, 09 Jan 2020 03:14:10 -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=oGxFEn89; 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 S1729905AbgAIJwH (ORCPT + 99 others); Thu, 9 Jan 2020 04:52:07 -0500 Received: from mail-eopbgr140080.outbound.protection.outlook.com ([40.107.14.80]:57486 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729170AbgAIJwG (ORCPT ); Thu, 9 Jan 2020 04:52:06 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KG3QDthfan+AkxmaoC44kIr1yOuDEUI+XOcE8s+jHQ9PEyWnkTK5KKVbIvkCuSBnrD7+f5ajn79/0FoXBOUiEPbozqEcu9TdcrIXJcbcszOwK8HPpOjx4qyvNM3k7E9BBsSgcBPixt5cryKigqBkkMB7NGAv1xV5FA5ZG65frtB+NUyHxRaaLuhWyO3b00vfnHgYb2JRrEVBFDAM2qPBOupWDaaUGapg6RHja99c5+W6g+ptD0sksqswLlS6ygAJrnL7NYR2Y/7sMZwGU0/IgKreRTVKMzOhBhOPDWI0tsV0Sss81vti7jLZUdAhqL0nsKVvD7d77SX8nXP4Ngn05w== 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=muRifBPHRwcqLMy00aKt6JR3b/i4J6Lpr9xqb2CLxMo=; b=T6QIdved3GdoMej7Wyy10/7p2KbjJev0w6Hc9pWRbplCNGlFQeNiX+C5onk+KvhDAr/ZpgZFQlrYIazrmnueN1DTv10ewWTd98zdoFuUbRXuMM7kookKNRf14rSycoeClUs9QYcCa50SIc5cM85/f9rHldNEoGXvz9ZnFcWYOWGqp1KrYexF4scjszUDf67K61dKaKztgnkeXRArfvTySxy3Vs7u92B2Dhi2KyI6Q1Va/0BuMz5UE+NX/qaNPohKreymrEh6UoGadyFdeC7bYxwqgNKLOgZHVhlRnt66nVjJzjWMBidcitWuVDFvL51tpjIbVWwVcILHE9HR2EnkgA== 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=muRifBPHRwcqLMy00aKt6JR3b/i4J6Lpr9xqb2CLxMo=; b=oGxFEn89zWmElkJ4mG5szYY8nYEOqMeKa3m+pLQ7VCVlyN5FLoHDBpAXk0x/hYxdhkm5usAT2cF50LWRYXUq8nTVrXyAvamTlXnBTaaCouBEaq9OFP+G/F4GO8k6SrNAdhmgLzpBq9LNtyhkTSFZVE/C98ohkRiwT9JOAfdwllA= Received: from VI1PR04MB4496.eurprd04.prod.outlook.com (20.177.54.92) by VI1PR04MB6878.eurprd04.prod.outlook.com (52.133.244.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.10; Thu, 9 Jan 2020 09:52:02 +0000 Received: from VI1PR04MB4496.eurprd04.prod.outlook.com ([fe80::25c7:9207:684a:5e2b]) by VI1PR04MB4496.eurprd04.prod.outlook.com ([fe80::25c7:9207:684a:5e2b%6]) with mapi id 15.20.2623.010; Thu, 9 Jan 2020 09:52:02 +0000 Received: from localhost.localdomain (119.31.174.67) by HK2PR02CA0172.apcprd02.prod.outlook.com (2603:1096:201:1f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2602.12 via Frontend Transport; Thu, 9 Jan 2020 09:51:55 +0000 From: Peng Fan To: "sboyd@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Abel Vesa , Leonard Crestez 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" , Anson Huang , Jacky Bai , Peng Fan Subject: [PATCH 2/4] clk: imx: imx8mq: use imx8m_clk_hw_core_composite Thread-Topic: [PATCH 2/4] clk: imx: imx8mq: use imx8m_clk_hw_core_composite Thread-Index: AQHVxtJxubTNOuBidU6XCx51bC8+lg== Date: Thu, 9 Jan 2020 09:52:02 +0000 Message-ID: <1578563269-32710-3-git-send-email-peng.fan@nxp.com> References: <1578563269-32710-1-git-send-email-peng.fan@nxp.com> In-Reply-To: <1578563269-32710-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: HK2PR02CA0172.apcprd02.prod.outlook.com (2603:1096:201:1f::32) To VI1PR04MB4496.eurprd04.prod.outlook.com (2603:10a6:803:69::28) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.67] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: c2b488d9-cf7a-4836-cfa3-08d794e993d0 x-ms-traffictypediagnostic: VI1PR04MB6878:|VI1PR04MB6878: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:239; x-forefront-prvs: 02778BF158 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(376002)(366004)(346002)(39860400002)(189003)(199004)(6486002)(26005)(4326008)(54906003)(69590400006)(36756003)(6636002)(71200400001)(6506007)(110136005)(52116002)(478600001)(8936002)(6512007)(316002)(16526019)(186003)(86362001)(6666004)(2616005)(956004)(44832011)(66946007)(66556008)(5660300002)(66446008)(64756008)(2906002)(8676002)(81166006)(66476007)(81156014)(32563001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB6878;H:VI1PR04MB4496.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A: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: wDG89ymshYTqWy7uo+8p8wfuNm4kS+zcYTqWdI9hlvEHYE6OnDTljznZbZxDOEmb6SfNNT9Z/8Htv7h7aarALUa6b/lnXCZofto8kmBYFL/3rt1p4LE3EryBZERNHxfLOhpUtflIp1K3MKDycE2iaMII6OXOSsk6RLYtfXjAwMGRZFf+Ngs5jEOccttaR2sTVIjJHdiCvrFKMq6BzosAkOEYZtOxXX1uB5fj61KolB/5FIbKqjGEH7Cdid8pLeFdK5c8+qfE2ArOBX3GQqZZ7G+J/c+tAwvz+ax9cHYnAhXht1a5UxccRarwpQ1uKV1tFKBKIDdy4/f8iuT3v52gGBwP2SxpGN2jeaXARpxOK9PIsMVaQGJirHbNrq8vA+Y1VLPcwM9KZ7ZRIhyB9r8PUs5m7PBBIOvexth8Bon8tiXLwIxtC/suhq6LaoC079jdCLanS6uKdx5GQfIOz9BKZr3KCB3tqr7LL6ks8eRdIRAvGUIFfIME0opF2d7gu6DtIDJAH8Tu7QVqEBR7WCq59g== 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: c2b488d9-cf7a-4836-cfa3-08d794e993d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2020 09:52:02.6439 (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: n2LlPYd3hHLwF7M0MLu5ZI8x0r6O5P8pCpuNljmHtUrNdnDJtzGpszaDY0GUP6EjRvpMoNbhzESMG0NgbihJBQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6878 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan Use imx8m_clk_hw_core_composite to simplify code. Signed-off-by: Peng Fan --- drivers/clk/imx/clk-imx8mq.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c index 4c0edca1a6d0..5e22950d4907 100644 --- a/drivers/clk/imx/clk-imx8mq.c +++ b/drivers/clk/imx/clk-imx8mq.c @@ -403,22 +403,13 @@ static int imx8mq_clocks_probe(struct platform_device= *pdev) =20 /* CORE */ hws[IMX8MQ_CLK_A53_SRC] =3D imx_clk_hw_mux2("arm_a53_src", base + 0x8000,= 24, 3, imx8mq_a53_sels, ARRAY_SIZE(imx8mq_a53_sels)); - hws[IMX8MQ_CLK_M4_SRC] =3D imx_clk_hw_mux2("arm_m4_src", base + 0x8080, 2= 4, 3, imx8mq_arm_m4_sels, ARRAY_SIZE(imx8mq_arm_m4_sels)); - hws[IMX8MQ_CLK_VPU_SRC] =3D imx_clk_hw_mux2("vpu_src", base + 0x8100, 24,= 3, imx8mq_vpu_sels, ARRAY_SIZE(imx8mq_vpu_sels)); - hws[IMX8MQ_CLK_GPU_CORE_SRC] =3D imx_clk_hw_mux2("gpu_core_src", base + 0= x8180, 24, 3, imx8mq_gpu_core_sels, ARRAY_SIZE(imx8mq_gpu_core_sels)); - hws[IMX8MQ_CLK_GPU_SHADER_SRC] =3D imx_clk_hw_mux2("gpu_shader_src", base= + 0x8200, 24, 3, imx8mq_gpu_shader_sels, ARRAY_SIZE(imx8mq_gpu_shader_sel= s)); - hws[IMX8MQ_CLK_A53_CG] =3D imx_clk_hw_gate3_flags("arm_a53_cg", "arm_a53_= src", base + 0x8000, 28, CLK_IS_CRITICAL); - hws[IMX8MQ_CLK_M4_CG] =3D imx_clk_hw_gate3("arm_m4_cg", "arm_m4_src", bas= e + 0x8080, 28); - hws[IMX8MQ_CLK_VPU_CG] =3D imx_clk_hw_gate3("vpu_cg", "vpu_src", base + 0= x8100, 28); - hws[IMX8MQ_CLK_GPU_CORE_CG] =3D imx_clk_hw_gate3("gpu_core_cg", "gpu_core= _src", base + 0x8180, 28); - hws[IMX8MQ_CLK_GPU_SHADER_CG] =3D imx_clk_hw_gate3("gpu_shader_cg", "gpu_= shader_src", base + 0x8200, 28); - hws[IMX8MQ_CLK_A53_DIV] =3D imx_clk_hw_divider2("arm_a53_div", "arm_a53_c= g", base + 0x8000, 0, 3); - hws[IMX8MQ_CLK_M4_DIV] =3D imx_clk_hw_divider2("arm_m4_div", "arm_m4_cg",= base + 0x8080, 0, 3); - hws[IMX8MQ_CLK_VPU_DIV] =3D imx_clk_hw_divider2("vpu_div", "vpu_cg", base= + 0x8100, 0, 3); - hws[IMX8MQ_CLK_GPU_CORE_DIV] =3D imx_clk_hw_divider2("gpu_core_div", "gpu= _core_cg", base + 0x8180, 0, 3); - hws[IMX8MQ_CLK_GPU_SHADER_DIV] =3D imx_clk_hw_divider2("gpu_shader_div", = "gpu_shader_cg", base + 0x8200, 0, 3); + + hws[IMX8MQ_CLK_M4_DIV] =3D imx8m_clk_hw_core_composite("arm_m4_div", imx8= mq_arm_m4_sels, base + 0x8080); + hws[IMX8MQ_CLK_VPU_DIV] =3D imx8m_clk_hw_core_composite("vpu_div", imx8mq= _vpu_sels, base + 0x8100); + hws[IMX8MQ_CLK_GPU_CORE_DIV] =3D imx8m_clk_hw_core_composite("gpu_core_di= v", imx8mq_gpu_core_sels, base + 0x8180); + hws[IMX8MQ_CLK_GPU_SHADER_DIV] =3D imx8m_clk_hw_composite("gpu_shader_div= ", imx8mq_gpu_shader_sels, base + 0x8200); =20 /* BUS */ hws[IMX8MQ_CLK_MAIN_AXI] =3D imx8m_clk_hw_composite_critical("main_axi", = imx8mq_main_axi_sels, base + 0x8800); --=20 2.16.4