From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.41]) by mx.groups.io with SMTP id smtpd.web10.4362.1594184269946154670 for ; Tue, 07 Jul 2020 21:57:50 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=KOF69i6z; spf=pass (domain: oss.nxp.com, ip: 40.107.2.41, mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FF4d5ZXiCtKJ8Rq+c0GH8oFmcjcO3bb2Y5qdxLSA0wAHvh7hXfM9+G3jMYA4CKNbac4Bj4ykZd3VXF0NzjeZXSsqkwLHGGqdg4Y19682JOWYjrwCGDraAG/ADn1s4EnEALrXAUj7kcZLFFuLcsDvmgFMgFrv8SuLWg1zl931jYayMbHxnrdqp8EkoKtS+4jCF11ybWgsggkzMPgr3cXkFBS8bVOUjfnzQmmg6JAuiV5ISeVx2s2Rmod4zAgeXWlqnvDliEwGktZKfbYyB+q9d/SHWRHCnC6zVLcEJ91Djx7CCyH4bnPlaCGsBmbQ9xzHfs8Dpt/6a6Z0l0gx7S0zhg== 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=K8hLgjmLNWwt06oX2vtm4tLSGFPdXYx1/6E1UIegO2E=; b=kSXS9BXaCYbqT9fmWlAq3xFEOdFvnPZ6ODDKw1DvxuEAgslN7YBTNDyK+tETPLIeTM5N26cpm34bq6bpF9McwqSZMKz8CgwVjJxapV5PssXAsnzaIQvdLRRAsW6FOq4+PLjTPe6tqNfp0ttoXGEqqDZlPSl5cUTN2lK20yf5uoAy/kee6oWKEklmvlFkE0+Sb37AhNJeBrfs4KnK9Z2QkljmkD8+ceYcVVbx0ygw+IwUl5ykUJ9OIsR5HKPKEb5jn4jDpQrwgJehyiwn9R837PpYm0l9e5tBZqxQasgaPJ0XP8hQEBcWponuuBK6SizpUJfbKK4pOLO8KYCiADHHVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K8hLgjmLNWwt06oX2vtm4tLSGFPdXYx1/6E1UIegO2E=; b=KOF69i6zmrQ8ia+OOrWDPnnrLirl2Yy0UcC212BqrYzj2C/FFmVvgd3h1mww5zRKEahPRqDJqDIxJw4sp3Yd2RA0tdl1YzgD+9BkTgrbsnFogUQR7lmRBv6R0EBgKeQVC+ypeCH2cfJ4pDEd3hf9bUMte8o4v+RG0FsALID6b8Q= Authentication-Results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) by VI1PR04MB6781.eurprd04.prod.outlook.com (2603:10a6:803:13d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21; Wed, 8 Jul 2020 04:57:48 +0000 Received: from VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::4521:b667:cf06:b79b]) by VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::4521:b667:cf06:b79b%7]) with mapi id 15.20.3174.021; Wed, 8 Jul 2020 04:57:47 +0000 From: "Pankaj Bansal" To: Leif Lindholm , Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Augustine Philips , Ard Biesheuvel , Arokia Samy , Kuldip Dwivedi Subject: [PATCH edk2-platforms v3 2/5] Silicon/NXP/LS1043A: Fix the RCW bits' parsing Date: Tue, 7 Jul 2020 23:57:16 -0500 Message-ID: <20200708045719.2648-3-pankaj.bansal@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200708045719.2648-1-pankaj.bansal@oss.nxp.com> References: <20200708045719.2648-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: BY3PR05CA0001.namprd05.prod.outlook.com (2603:10b6:a03:254::6) To VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) Return-Path: pankaj.bansal@oss.nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from TFTPTOUEFI.am.freescale.net (64.157.242.222) by BY3PR05CA0001.namprd05.prod.outlook.com (2603:10b6:a03:254::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.12 via Frontend Transport; Wed, 8 Jul 2020 04:57:44 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [64.157.242.222] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c6a88a5c-4303-4d8b-61a7-08d822fb7557 X-MS-TrafficTypeDiagnostic: VI1PR04MB6781: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:580; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yH2O4D1EVeMV+GMocbhDNYkCWtltjXT8K1A3hTpVaMofna6lj0P0M+J74YQcgr2J03GgOwbd6K5n9+4HMDym2NxxIlBy1ijDPahZFBJa9IqT/zkWTG/Hq+zXQmw3wivhukM1RYFvr3z2aZbwkNCdKx1kDYa9Cs6264gftweyP3977p1y/ddM1653F2/irenn/J2H1FWtal2KmiVHYuIpfyL68bC4QaV2jm+QixEslj5PAwgnmtWXiYftwJy0WJzmD0HT2+iDhWt3+bXJY/0VDLEhoLWkHyDp2SdO4oZBeuwxzcf+OnTTHFv0rC2t3J6VBBTdqU3tjd6RvMiEx3+MI/14wx16uMZqYcoYNBr1g1xXZd6+X0VfbdWfDfnbzIrt X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5933.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(39860400002)(396003)(346002)(136003)(376002)(6512007)(52116002)(6666004)(83380400001)(66556008)(66476007)(5660300002)(6506007)(316002)(44832011)(66946007)(2906002)(19627235002)(16526019)(8936002)(110136005)(86362001)(186003)(8676002)(1076003)(478600001)(956004)(6486002)(26005)(2616005)(921003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vHHyf9U43VZZZfl7877TkPkvGtQBpYGsLBJAk0RP1Qlu/mGicflLVpdN/Xb2w+8+N52r0dI3ryhYkEJOg0ASzESl0auTNugAiBpQQnFJPPNWb4iqlAlDdk76a7sqPBabNtrg2xGFxD5gt+1fmGBdCxzPmy8PDIN9CvgkwsRho/0pvSDQ92g4tLCpzUhgu403qSlO6x5HnIUKMVy7IVlCxAYgGOKqGM1orcvRE3vSXR+s8eHolnfgebgEP2CuKK3Jj71WmJS+hAekIDuJx+VdygjdEaJrZBmEd2OcDDJv8uXgFiaRBGwdpFdWbWY7DmlkxwKg6MlcEoaF4N7X3hJBxAqNf7PgNZOqtFNwWc9O/BbHh5gfCAXoZ2PWjIEWhI3pNg9BHiYGJhQdsTBpBLXetBaTf+dld++HffKgPlD1SS//hUFkES5cKzQowXQBG4jUMOYmZWf6yzjGerEiRx/4NrP6P7XEY7REHtlU+rz7JiC3l951dQ3vsFmXjKjGX8Qo X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6a88a5c-4303-4d8b-61a7-08d822fb7557 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5933.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 04:57:47.8788 (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: lFfwXpOa18RF1iHTi319AtRbLJKuKhYgB4BQsRucE6T6HXazsIFiW9dN6sVtx2sal/XS7Z9/NQOLlPxPXGsHkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6781 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Pankaj Bansal For LS1043A SOC the DCFG registers are read in big endian format. After Reading the registers in code we have the registers in Little Endian Bit format i.e. LSBit 0. However, the RCW bits in RCWSR registers in LS1043A SOC are in MSBit 0 format. Currently, we are parsing the RCW bits in LE bit format i.e. LSBit 0. Therefore, Fix the RCW bits' parsing as per MSBit 0. Signed-off-by: Pankaj Bansal Reviewed-by: Leif Lindholm --- Notes: V3: - Added Reviewed-by: Leif Lindholm =20 V2: - Changed commit header and description. - Moved changes in comments to previous commit Silicon/NXP/LS1043A/Include/Soc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/NXP/LS1043A/Include/Soc.h b/Silicon/NXP/LS1043A/Includ= e/Soc.h index c694576ed18d..40619536c6fe 100644 --- a/Silicon/NXP/LS1043A/Include/Soc.h +++ b/Silicon/NXP/LS1043A/Include/Soc.h @@ -78,7 +78,7 @@ Bit(s) | Field Name | Description | Not= es/comments =20 which is why the RCW bits in RCWSR registers are parsed this way **/ -#define SYS_PLL_RAT(x) (((x) & 0x7c) >> 2) // Bits 2-6 +#define SYS_PLL_RAT(x) (((x) >> 25) & 0x1f) // Bits 2-6 =20 typedef NXP_LAYERSCAPE_CHASSIS2_DEVICE_CONFIG LS1043A_DEVICE_CONFIG; =20 --=20 2.17.1