From patchwork Wed Sep 16 07:17:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1365001 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=V0P65KO1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrrR91Q9Dz9sS8 for ; Wed, 16 Sep 2020 16:53:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6250282324; Wed, 16 Sep 2020 08:53:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="V0P65KO1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CD92882320; Wed, 16 Sep 2020 08:53:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20603.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::603]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BEA5A821F8 for ; Wed, 16 Sep 2020 08:53:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=au/Lg6jwoJKePNxSvnmAY3g5JxEg5eKMfUZUKfegcLQ7GeS8CMWY4gFLcsQtrHAJxeyJX0nwWcnKyzP9iwSyiw/X+mWze6haJ6eY1nMVKeg6tme1VbgHYIMQ+pwVT0GOqE/O6LOasetqhQhCLDRq0OCkcFgCDl9lCpG2HXW1n0+QDoYFtqnyoE5d6tSX8kQXzEThv0pYZ98eQnXoFUpOph+qASNx5IFbJ8rLcmM/EvuJoL8hqtEQqp1M4CxyAwGpzYOhXQdX9cDpedI1YzYl/hRM5LfBUX/A4YDHO+je3F3/TetXHMUIxjqK0s1iz4KHxO3sOvJF+PIzPdGWYuQI6g== 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=0Lz9Gt030HKEjlVPFyagPBURXXb2Mthe+1NGbD4X1I0=; b=EikmQm0wE7/vcz+nac9aELorx4uAcNWiFmYts6tN8P9ru74jmi5ityBOVyA1zOMlKAiJGaWPuHEYuaVUNU5OaVbcRz/7fvyWkUn6SPKnT/naBuMUBb4aC2DlSXwVxF7p1mUIlwt7pVdcxg/d7VpiSo4MCXmsvrxzlbZPxRsOwTYmqOUySmJxr2dywOSCHDZ6tTPyZqmTOKHIAVXm6ubtyg22/ruq3isAluR6RSkq6X9CKj4ijEujnRIbAalncti8TJBBMIaMJrqILjKjPHO1JxhLgGCfoif+IuplhsAPE1wJKoOXa4sYjOo+YkZCa6jQMXCNL/FVzCUtlLqIBlMDhw== 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=0Lz9Gt030HKEjlVPFyagPBURXXb2Mthe+1NGbD4X1I0=; b=V0P65KO1UjQ0x5W0cKg4FoPDOyUgbg5lq9QYjZt5U7XYGuK1emN3d01paD+YmIOtBi9FON8rSj5w33UCdUx2/whRFfUuLUsLkw0X+3oAhpJNjJ8k6aefZ3+CMp9d7+CBL3J4J3PFzAqlBpzT9wq9BtstmISaeiu1+nh17K2cnC0= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4762.eurprd04.prod.outlook.com (2603:10a6:10:16::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Wed, 16 Sep 2020 06:53:12 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413%10]) with mapi id 15.20.3370.019; Wed, 16 Sep 2020 06:53:12 +0000 From: peng.fan@nxp.com To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan , Ye Li Subject: [PATCH 3/5] imx8mq: fix SSCG_PLL_REFCLK_SEL_x Date: Wed, 16 Sep 2020 15:17:20 +0800 Message-Id: <20200916071722.28772-3-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200916071722.28772-1-peng.fan@nxp.com> References: <20200916071722.28772-1-peng.fan@nxp.com> X-ClientProxiedBy: SG2PR06CA0230.apcprd06.prod.outlook.com (2603:1096:4:ac::14) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR06CA0230.apcprd06.prod.outlook.com (2603:1096:4:ac::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.11 via Frontend Transport; Wed, 16 Sep 2020 06:53:09 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 47c989a7-579a-4894-1b36-08d85a0d2d94 X-MS-TrafficTypeDiagnostic: DB7PR04MB4762: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:913; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jRKEMtMAx/lADpPxU1+J+MkdbQfsmjTvSD3b1oTYuZniIprD8kczTOQpqtYhNc6slrb7oX+9gnR/1NDwoOaddwIxjr2T/5dsuMU5szGk1ZmE6LExh/QXikwi+7pCKURI79F5//a7sjiC3iaiZMr93SK+UPLuqF/liYQqsBj39K3nl4bhwiq5ZO2ljOx61gBFa0NrYWDtHTASQFDkJlBmhSKsjIg+FktZjO/W0ra/nYKRPwM5qkd8O6ka3EOxz24SA1cGEz/6xS9qMHcF8P73++QIDVz8WtDe6nf0MFWrlmpxUsXO+EMrCF/OXYpCSUTeWDVUPVK7iD/VIZoQUbZcxKJanZn7Pqd2eBTQeB2a8J0VJXImdv0t1pJSRc/WnEKF X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(2906002)(6666004)(16526019)(83380400001)(498600001)(186003)(4326008)(36756003)(6506007)(5660300002)(1076003)(6486002)(26005)(8936002)(66946007)(956004)(9686003)(2616005)(8676002)(86362001)(66476007)(6512007)(66556008)(52116002)(54906003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: sv7WgAi92eTTXMCLhmCRwSYGG/Y43BHNcw6SHLSNm57y6nXTVMFc10+syb3j6AzLVpzBWZ8YRpPsZ+1sZbs4Z7Q08JUBf4m1JnWNW4vc2mmtmvXOP3nTF9WJTIl8TLL9CGw0/nM42dsgzs79ySptmOEv6kBQHmdJHGE6aAoZ4byxkkrFyWEf0IZIEl9jZXTdWri7PXEOMS4zcD5axh/58o/jytTGDMnZvvkse7vISN8rvyeovOF2fW+1DQd6JRb3LgNlIr0GYTOeZmf9nVEKqqF3awSLZheGJR7U8H3rgp/Lb5q7wXD0trnG/pE9YO95kje+ErQ1hp0JivnTstWQgHxQXUxxQgyATY9frmzYI2jOGWO+pkzIBSTNZmDRddFgSKSp5dUSXfyREs9wseXLuYlFTixLbVc+2t4Fd8Vs1T23jzpaXSqXzqB57fSn1juyJj/4RD00qrJzDKaJ68YCqIxRvhpyb9BboIZDGRzconyErATvls588hO1cftxu21RM9FpGi67wYJrQa1iV2RduOzlAyNxH+Y81MS5qaFnEGPcZprP8etudzb7u6EmyQWJYcHQDKwOa+mmB4iJw65J3mbzFLBN8fecG8FY3WQl2rIZai1C8LMhDD317cjG6tS+CJDAfVVb/kD2rPMKSQpx/g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47c989a7-579a-4894-1b36-08d85a0d2d94 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2020 06:53:12.3228 (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: aGsNIT/+WGAd2U3CvlgbVpoVu9zL/o6aKGxvRy4Tzuu6P4MD/cUnXTSxihhZatjkOlA7LS30Eo/Jpir47RWoWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4762 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan Fix SSCG_PLL_REFCLK_SEL_x, the offset starts from 0, not 16 Reported-by: Coverity 3448860 Signed-off-by: Peng Fan Reviewed-by: Ye Li --- arch/arm/include/asm/arch-imx8m/clock_imx8mq.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h index 7109d334fa..340a61e55b 100644 --- a/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h +++ b/arch/arm/include/asm/arch-imx8m/clock_imx8mq.h @@ -358,10 +358,10 @@ enum clk_src_index { #define SSCG_PLL_LOCK_SEL_MASK BIT(3) #define SSCG_PLL_COUNTCLK_SEL_MASK BIT(2) #define SSCG_PLL_REFCLK_SEL_MASK 0x3 -#define SSCG_PLL_REFCLK_SEL_OSC_25M (0 << 16) -#define SSCG_PLL_REFCLK_SEL_OSC_27M BIT(16) -#define SSCG_PLL_REFCLK_SEL_HDMI_PHY_27M (2 << 16) -#define SSCG_PLL_REFCLK_SEL_CLK_PN (3 << 16) +#define SSCG_PLL_REFCLK_SEL_OSC_25M (0) +#define SSCG_PLL_REFCLK_SEL_OSC_27M (1) +#define SSCG_PLL_REFCLK_SEL_HDMI_PHY_27M (2) +#define SSCG_PLL_REFCLK_SEL_CLK_PN (3) #define SSCG_PLL_SSDS_MASK BIT(8) #define SSCG_PLL_SSMD_MASK (0x7 << 5)