From nobody Tue Nov 26 17:33:59 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2073.outbound.protection.outlook.com [40.107.20.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B46A1176AB6; Wed, 16 Oct 2024 20:31:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110698; cv=fail; b=KH4mLWEB5Yi54nCwRFbMUqUDbKRyWaUtyZmj/W6NPRRRHwUpLC4zMH60f64izpWIWgsEK5OvXf3iWLG6c4KPNHVurboCOuo2VHaSd7DR/VdRJx78eqUf9yT4frm9Lvsu+5kRy8sODNXDwsL4/PzNxJMVecFFbFV9yfPVtbLz6u8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110698; c=relaxed/simple; bh=tWA2t7dYpkCGQPCP1WcAIC7H3OdUmQUbtGujuyE7dVw=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=ZEm0Juc0VJ5Qox6US6nwRqSRScFtZie5slRtr8L6y/qmZGUzUggHDzP1UJ6KhI+yn3T5FEzHw1l+MILPgR2tUI5cZzJDz7bhH4//sgjaVyjwixAR2fCn0UzYhoRFvPY1RhEix1YFQhelxS1cEFrlA5WTWz631cCoQdZ+QtjHV0k= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=HaUuf68g; arc=fail smtp.client-ip=40.107.20.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="HaUuf68g" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rArMl372FD+nVxbux3L3mBZabLu/qSSChwHXmhakA3I0TyjZ5ggdjx++PMDiiyO10U5YBjCb9wfJDea3XQcbp8p/hNO+d0Ypu/xrL2vCLLEUQb9Km7jFlBerGyRXINqqmAMV8xfNQFXffozTj8U4i9yHNMc89g0gOEA1Yk3b4loB91WzVjLpQluyMHDIv9lh5J9eCypVyeFXekL7PjBNeZTDs3Yi1/bZGWSEgtDn9W5sOwsj7jRAMgSZVrilbl0IH7uraA/xpe9i/SYtGcphnYW/e0yKA8F/gXYD9KwdZgKffyHf4BtKifSfjUaTJkY9nyPAyGM4HY7/fFkUkeGf1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oWWIgflstIVDXTjDGLYnl7metuS73gQMf9j95c82+E0=; b=urJICd3lbSdxaxqeEJplrHvCl1CJfsObgNCFo7v2RW2v4huggHbO3aVv6rkAeIFc/D0rk4lDMLb0NOOhEToreqtV/pyuJ0KmnSBzsJDiW9zV6Tjw6HpEOuxSqNnBU/VGuLtno/F/omV1pR12sHbfzbnKXJ49vFuB/wj/KRGBxbrqp7I1hfiN3fm4ZeQKEO3UrhfbUVHqN6Y0/L/ogqu9d0o+wfLh41inQz3ua2RzuU3BiPWFcQnIiDgjMxD5eAV1OowavrVjYCUVLZAjukL3OowcoEzKUsALTeHRHTb3veTzZ5wrelxw/awTUBduwnorEYOkuwzcMWVX0efeCCq8GA== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oWWIgflstIVDXTjDGLYnl7metuS73gQMf9j95c82+E0=; b=HaUuf68g2dbWxFoph3+axCosMY3+NBHKGOWhZ9NruHfWVJLIRswwoq6oSSdpkgbjL/7faaLBFdQHnCInv6glhsTL6XPF7zIMfn/rDAJTXGgDVY0FPBpLo/L0y4ihGalAtZS1As9GIl99I82zxX88tdoj7fJ71SUs4lbnhEvdHxt/+IzUU2m1kAXHVsDQK7VEPzq9PJzmVPUi8huZxGgI1IQBFfnsnGaX5zlAUVZEhsPrvztmZ9pyCkiNZhysr7TmzJ/O75rpv+G/usIUmSeu6xOFrDvPHOm67Zcl6dhnPzNiWX4n2J7qbRbYfg5li2cBD6m0h5+TacnlQvFU0pevfg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DUZPR04MB9845.eurprd04.prod.outlook.com (2603:10a6:10:4d8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 20:31:34 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 20:31:34 +0000 From: Frank Li Date: Wed, 16 Oct 2024 16:31:09 -0400 Subject: [PATCH v3 1/6] EDAC/fsl_ddr: Pass down fsl_mc_pdata in ddr_in32() and ddr_out32() Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-imx95_edac-v3-1-86ae6fc2756a@nxp.com> References: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> In-Reply-To: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> To: York Sun , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , Krzysztof Kozlowski , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729110683; l=8457; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=tWA2t7dYpkCGQPCP1WcAIC7H3OdUmQUbtGujuyE7dVw=; b=34tuxc5Oxl6QFwxosBHK4hU0B75MJTe51HVmMDYoaMh+3EeG/jrcNLOw3slkd7+tm2ffcoHTI jkuMYiZpWtCD1/fhprUINqz30X9P7tU1Tv7YHghohKKDFDt09Ynp23S X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0042.namprd07.prod.outlook.com (2603:10b6:a03:60::19) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DUZPR04MB9845:EE_ X-MS-Office365-Filtering-Correlation-Id: 85a3b70a-3e17-400c-beeb-08dcee218709 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: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HBqZWZYL2FLZmFW?= =?utf-8?B?OWJRQkRJSGo1VHVSOVNmMVAvQWk3NE9vYmJ2c1dRTlJUb0JxQ2xVV1hCTjJC?= =?utf-8?Q?226FE5O1mRc2M?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(366016)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MkxFdmk1Nmt4OEgwWGtPWWtmR0x3SHpXRlNmTkFQSzBPbmRGZzJiayt1N1Er?= =?utf-8?B?d05jSWJjdmt4K21lOHVCRTBFQjBQbC9JejdTeUpQNGZzNzhReWhhT0JOZzA4?= =?utf-8?B?SkcvRTdmSGtnaFNxMkdiMmFGWmt1UkhwZk1KTUh4enRmVnB6VmUvUHgrOFgv?= =?utf-8?B?QU5Ec1QvY2M2NUQ4Y3lwU3JseURPMDBIRHp1WW55UkxvRVBnOWkvRWRhcWUz?= =?utf-8?B?MTczSnYvUnZHck5TOExhZkhVMHVuTXZUK2VSVVZMd0JFY0VNUkV1Znczc2dG?= =?utf-8?B?YnVPTkZpY3VFaU5tcHZhT2ZGNEdHd1VyRm9qbFhBMWg1Z3RKMklGTy9haVVO?= =?utf-8?B?eXhTVEgrdXNmc2pUTFRMSTZ4TXI4QmRSM3ZucVlqTm5JMmk4eTl6N3lEOE9p?= =?utf-8?B?amxRdWJTYVU5MW9STk1Kam5SaE9Kdit2L0xLNGEvdlp4Nmc0ci9oUjJuRzhy?= =?utf-8?B?aCt1OVFaajhIVUwwVmRaRE00WENzckQzcnEvdzBpcHBDTU84Y1Fad2xSTVl6?= =?utf-8?B?S1FBZ0l3MlFIeVNmUFhYUU5xZHVnbjZVM2l4aTVLakFtSG1VYVFiV2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Vya1FPcDIrbzZoSTlTSk1IWVdxczJiSlBOQVNseEdt?= =?utf-8?B?eFgrNDVMOGM3elozcVFtL0laTzVnam0yb0xBdTM3TVI2anZ1WDRLcVRUMy9E?= =?utf-8?B?dk0zdWFiMWhrejZlNkZVYVg4bGtkWHZ2anpyMGFTTEdnZzY4c0RxMS9zQjd5?= =?utf-8?B?d0JUZ3ExdFpvVTl4TDZwQjdvbnUwVXlhOHBtbTdrTFU5VDMvcW9iT0FiMWVM?= =?utf-8?B?MTB5ZHpyc2hzOTlwcFJoakgrNGJMWHREMWpmaERPcWg4Q05DVnM2NmhBd1lN?= =?utf-8?B?R1hSeW44RWVYZDdMU1pWejJQN285d0RHa09FYWVxdTUrVU1sUlFtSFYvNWRl?= =?utf-8?B?RGtXL0pPTE1od1FJQmZxRTdYZ3U0Uy8rSXE1WjFxTWQ4MzQyWUVraEhTV0Na?= =?utf-8?B?OS93cUpvMmlPbjhHU0swc2VFMnpzUzdkTTQ0dTJrNkgvajJSWVZEYVpxSDBi?= =?utf-8?B?bkd4Q3dtZFJ5R2JFR3NKVkJ3WEJCS1lLbGN3T0NDaHpsRTI1V2dLOFRQdTU3?= =?utf-8?B?em85WUZMeFl1d1lZbnVaWEQvbjJZZFB6MWRyUlh3MXc3UVJLU1dSZ3FqTnpL?= =?utf-8?B?WDBnR0FhcXlrVzJ6eUhPdC9kZTBVMnRhbnlDd1l4S1ZDb2dYTGMrMlVWdlhm?= =?utf-8?Q?UUv8IqWiF6lm23mnJiCkd7ZEP?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 85a3b70a-3e17-400c-beeb-08dcee218709 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 20:31:34.7404 (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: /JS4W3mH56qcjr4pbP4NIchaULlI6C7dV3qAds6E/iMq3ZfaGY6XeXunXXBPDcZGcEwi7gPy5zUNGgcp+UzBmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9845 Pass down `fsl_mc_pdata` in helper functions `ddr_in32()` and `ddr_out32()` to prepare for adding iMX9 support. The iMX9 has a slightly different register layout. No functional change. Signed-off-by: Frank Li --- Change from v1 to v2 - update commit message. - fix a build error. --- drivers/edac/fsl_ddr_edac.c | 64 ++++++++++++++++++++++++-----------------= ---- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c index d148d262d0d4d..9924c6b816648 100644 --- a/drivers/edac/fsl_ddr_edac.c +++ b/drivers/edac/fsl_ddr_edac.c @@ -35,13 +35,17 @@ static u32 orig_ddr_err_disable; static u32 orig_ddr_err_sbe; static bool little_endian; =20 -static inline u32 ddr_in32(void __iomem *addr) +static inline u32 ddr_in32(struct fsl_mc_pdata *pdata, unsigned int off) { + void __iomem *addr =3D pdata->mc_vbase + off; + return little_endian ? ioread32(addr) : ioread32be(addr); } =20 -static inline void ddr_out32(void __iomem *addr, u32 value) +static inline void ddr_out32(struct fsl_mc_pdata *pdata, unsigned int off,= u32 value) { + void __iomem *addr =3D pdata->mc_vbase + off; + if (little_endian) iowrite32(value, addr); else @@ -60,7 +64,7 @@ static ssize_t fsl_mc_inject_data_hi_show(struct device *= dev, struct mem_ctl_info *mci =3D to_mci(dev); struct fsl_mc_pdata *pdata =3D mci->pvt_info; return sprintf(data, "0x%08x", - ddr_in32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_HI)); + ddr_in32(pdata, FSL_MC_DATA_ERR_INJECT_HI)); } =20 static ssize_t fsl_mc_inject_data_lo_show(struct device *dev, @@ -70,7 +74,7 @@ static ssize_t fsl_mc_inject_data_lo_show(struct device *= dev, struct mem_ctl_info *mci =3D to_mci(dev); struct fsl_mc_pdata *pdata =3D mci->pvt_info; return sprintf(data, "0x%08x", - ddr_in32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_LO)); + ddr_in32(pdata, FSL_MC_DATA_ERR_INJECT_LO)); } =20 static ssize_t fsl_mc_inject_ctrl_show(struct device *dev, @@ -80,7 +84,7 @@ static ssize_t fsl_mc_inject_ctrl_show(struct device *dev, struct mem_ctl_info *mci =3D to_mci(dev); struct fsl_mc_pdata *pdata =3D mci->pvt_info; return sprintf(data, "0x%08x", - ddr_in32(pdata->mc_vbase + FSL_MC_ECC_ERR_INJECT)); + ddr_in32(pdata, FSL_MC_ECC_ERR_INJECT)); } =20 static ssize_t fsl_mc_inject_data_hi_store(struct device *dev, @@ -97,7 +101,7 @@ static ssize_t fsl_mc_inject_data_hi_store(struct device= *dev, if (rc) return rc; =20 - ddr_out32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_HI, val); + ddr_out32(pdata, FSL_MC_DATA_ERR_INJECT_HI, val); return count; } return 0; @@ -117,7 +121,7 @@ static ssize_t fsl_mc_inject_data_lo_store(struct devic= e *dev, if (rc) return rc; =20 - ddr_out32(pdata->mc_vbase + FSL_MC_DATA_ERR_INJECT_LO, val); + ddr_out32(pdata, FSL_MC_DATA_ERR_INJECT_LO, val); return count; } return 0; @@ -137,7 +141,7 @@ static ssize_t fsl_mc_inject_ctrl_store(struct device *= dev, if (rc) return rc; =20 - ddr_out32(pdata->mc_vbase + FSL_MC_ECC_ERR_INJECT, val); + ddr_out32(pdata, FSL_MC_ECC_ERR_INJECT, val); return count; } return 0; @@ -286,7 +290,7 @@ static void fsl_mc_check(struct mem_ctl_info *mci) int bad_data_bit; int bad_ecc_bit; =20 - err_detect =3D ddr_in32(pdata->mc_vbase + FSL_MC_ERR_DETECT); + err_detect =3D ddr_in32(pdata, FSL_MC_ERR_DETECT); if (!err_detect) return; =20 @@ -295,14 +299,14 @@ static void fsl_mc_check(struct mem_ctl_info *mci) =20 /* no more processing if not ECC bit errors */ if (!(err_detect & (DDR_EDE_SBE | DDR_EDE_MBE))) { - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_DETECT, err_detect); + ddr_out32(pdata, FSL_MC_ERR_DETECT, err_detect); return; } =20 - syndrome =3D ddr_in32(pdata->mc_vbase + FSL_MC_CAPTURE_ECC); + syndrome =3D ddr_in32(pdata, FSL_MC_CAPTURE_ECC); =20 /* Mask off appropriate bits of syndrome based on bus width */ - bus_width =3D (ddr_in32(pdata->mc_vbase + FSL_MC_DDR_SDRAM_CFG) & + bus_width =3D (ddr_in32(pdata, FSL_MC_DDR_SDRAM_CFG) & DSC_DBW_MASK) ? 32 : 64; if (bus_width =3D=3D 64) syndrome &=3D 0xff; @@ -310,8 +314,8 @@ static void fsl_mc_check(struct mem_ctl_info *mci) syndrome &=3D 0xffff; =20 err_addr =3D make64( - ddr_in32(pdata->mc_vbase + FSL_MC_CAPTURE_EXT_ADDRESS), - ddr_in32(pdata->mc_vbase + FSL_MC_CAPTURE_ADDRESS)); + ddr_in32(pdata, FSL_MC_CAPTURE_EXT_ADDRESS), + ddr_in32(pdata, FSL_MC_CAPTURE_ADDRESS)); pfn =3D err_addr >> PAGE_SHIFT; =20 for (row_index =3D 0; row_index < mci->nr_csrows; row_index++) { @@ -320,8 +324,8 @@ static void fsl_mc_check(struct mem_ctl_info *mci) break; } =20 - cap_high =3D ddr_in32(pdata->mc_vbase + FSL_MC_CAPTURE_DATA_HI); - cap_low =3D ddr_in32(pdata->mc_vbase + FSL_MC_CAPTURE_DATA_LO); + cap_high =3D ddr_in32(pdata, FSL_MC_CAPTURE_DATA_HI); + cap_low =3D ddr_in32(pdata, FSL_MC_CAPTURE_DATA_LO); =20 /* * Analyze single-bit errors on 64-bit wide buses @@ -367,7 +371,7 @@ static void fsl_mc_check(struct mem_ctl_info *mci) row_index, 0, -1, mci->ctl_name, ""); =20 - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_DETECT, err_detect); + ddr_out32(pdata, FSL_MC_ERR_DETECT, err_detect); } =20 static irqreturn_t fsl_mc_isr(int irq, void *dev_id) @@ -376,7 +380,7 @@ static irqreturn_t fsl_mc_isr(int irq, void *dev_id) struct fsl_mc_pdata *pdata =3D mci->pvt_info; u32 err_detect; =20 - err_detect =3D ddr_in32(pdata->mc_vbase + FSL_MC_ERR_DETECT); + err_detect =3D ddr_in32(pdata, FSL_MC_ERR_DETECT); if (!err_detect) return IRQ_NONE; =20 @@ -396,7 +400,7 @@ static void fsl_ddr_init_csrows(struct mem_ctl_info *mc= i) u32 cs_bnds; int index; =20 - sdram_ctl =3D ddr_in32(pdata->mc_vbase + FSL_MC_DDR_SDRAM_CFG); + sdram_ctl =3D ddr_in32(pdata, FSL_MC_DDR_SDRAM_CFG); =20 sdtype =3D sdram_ctl & DSC_SDTYPE_MASK; if (sdram_ctl & DSC_RD_EN) { @@ -444,7 +448,7 @@ static void fsl_ddr_init_csrows(struct mem_ctl_info *mc= i) csrow =3D mci->csrows[index]; dimm =3D csrow->channels[0]->dimm; =20 - cs_bnds =3D ddr_in32(pdata->mc_vbase + FSL_MC_CS_BNDS_0 + + cs_bnds =3D ddr_in32(pdata, FSL_MC_CS_BNDS_0 + (index * FSL_MC_CS_BNDS_OFS)); =20 start =3D (cs_bnds & 0xffff0000) >> 16; @@ -531,7 +535,7 @@ int fsl_mc_err_probe(struct platform_device *op) goto err; } =20 - sdram_ctl =3D ddr_in32(pdata->mc_vbase + FSL_MC_DDR_SDRAM_CFG); + sdram_ctl =3D ddr_in32(pdata, FSL_MC_DDR_SDRAM_CFG); if (!(sdram_ctl & DSC_ECC_EN)) { /* no ECC */ pr_warn("%s: No ECC DIMMs discovered\n", __func__); @@ -558,11 +562,11 @@ int fsl_mc_err_probe(struct platform_device *op) fsl_ddr_init_csrows(mci); =20 /* store the original error disable bits */ - orig_ddr_err_disable =3D ddr_in32(pdata->mc_vbase + FSL_MC_ERR_DISABLE); - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_DISABLE, 0); + orig_ddr_err_disable =3D ddr_in32(pdata, FSL_MC_ERR_DISABLE); + ddr_out32(pdata, FSL_MC_ERR_DISABLE, 0); =20 /* clear all error bits */ - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_DETECT, ~0); + ddr_out32(pdata, FSL_MC_ERR_DETECT, ~0); =20 res =3D edac_mc_add_mc_with_groups(mci, fsl_ddr_dev_groups); if (res) { @@ -571,15 +575,15 @@ int fsl_mc_err_probe(struct platform_device *op) } =20 if (edac_op_state =3D=3D EDAC_OPSTATE_INT) { - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_INT_EN, + ddr_out32(pdata, FSL_MC_ERR_INT_EN, DDR_EIE_MBEE | DDR_EIE_SBEE); =20 /* store the original error management threshold */ - orig_ddr_err_sbe =3D ddr_in32(pdata->mc_vbase + + orig_ddr_err_sbe =3D ddr_in32(pdata, FSL_MC_ERR_SBE) & 0xff0000; =20 /* set threshold to 1 error per interrupt */ - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_SBE, 0x10000); + ddr_out32(pdata, FSL_MC_ERR_SBE, 0x10000); =20 /* register interrupts */ pdata->irq =3D platform_get_irq(op, 0); @@ -620,12 +624,12 @@ void fsl_mc_err_remove(struct platform_device *op) edac_dbg(0, "\n"); =20 if (edac_op_state =3D=3D EDAC_OPSTATE_INT) { - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_INT_EN, 0); + ddr_out32(pdata, FSL_MC_ERR_INT_EN, 0); } =20 - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_DISABLE, + ddr_out32(pdata, FSL_MC_ERR_DISABLE, orig_ddr_err_disable); - ddr_out32(pdata->mc_vbase + FSL_MC_ERR_SBE, orig_ddr_err_sbe); + ddr_out32(pdata, FSL_MC_ERR_SBE, orig_ddr_err_sbe); =20 edac_mc_del_mc(&op->dev); edac_mc_free(mci); --=20 2.34.1 From nobody Tue Nov 26 17:33:59 2024 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2070.outbound.protection.outlook.com [40.107.21.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9A801C4A14; Wed, 16 Oct 2024 20:31:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110704; cv=fail; b=gkdRjYMLL+Uj0IK5RJ4e2hnhLNN1xkWADR4iBCi7/rO9gVymwzIoutddEwPpXo0DUk9HlFnFy+Y7mIMLtY/3bXquDYWmrHIofoff9w5fM6QDW38KutAsOPPjVu44ncZ7nQEqVzgbD5HA0M8ZMVd8J23UebE/XiFik19kZ6JIrDU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110704; c=relaxed/simple; bh=bYOSUeH8Tsfygywx3VBHrQIC4eU9dzx5J8svyPSfkS4=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=PBiPC/yfm83fUxJeL2hDNQgyOwJuLXRDE1n0h1wPc3FOJVYJFiPETHAp+SBhNdsADKk1OnpPZhEh72XZ3HpcMIPp+eaefoD7lD7rCbhIKMzKOHExq4TImuytXuMYRh3I5UxM5/hl2D2ViXS4w0A/OOcEKy+hPAS4upHW3fHFkn8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=M41b0SIk; arc=fail smtp.client-ip=40.107.21.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="M41b0SIk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fNzKmygUhsp8gm9gI4tEUignAIuXPEThaOPO+iAo3Jdcjrhi3Eshn1kvwrgryBuuZMCwLzJOQU7ViCptRq95NYMHRyF8J02JG8c+bHTPB01+UfI8hzO8Q+WbeVCl0xdbkGnkDej9bAikbChhpqWxz9ekXEWZ3H7SMJoTHRZ5zwCxlC4etjLAK+SZ4AWX4CtghHqbDY+QF9X3yms6GPHEBFmtZXPNTa5gUjhCFoEsmc0WeooVDVlfOyS0mUlobwBt8z2u+ptkZ4Q5cXA+UTN9P8KnAfp5ss+yt3DyHS2HFFxT2kdOcjVWCrRtgb01oa7zTpixshDW2nlcCEVObXY74A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oThGc+PInWWFzFHWkQtWRVZUx01s9iDEryoUEl8TSD8=; b=npss4q7HddpLqjpOKOIn4T6eAsqumBA6eE5wwNc03HPRti1qruBUl/wpj3HIyfyWIMrqtXxWg+8ZES38kM2yD1eGoDoYQY47U/J4hefjB8Hj1aUTKkxD4/U30ecAmvm5Q6WQfWoPq65u6LaZjBmMVTHOMQGf/r3u5LH3Vj5wtjWJtJv18OHRVM17NTJdnMfTq57nbrx3gfTmCSGh9rWtPuG/3yD+q10LBCNgXAjQbFaCP4BxZWTNtiMJEHG8h3diWUbTqHAonix5c4hsboD2twITVyokF7HEwGV3JjEYiMdYoJhfCGrLD2mRVqg7BhKdUBvTeuU8er0SKfgK10nBbQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oThGc+PInWWFzFHWkQtWRVZUx01s9iDEryoUEl8TSD8=; b=M41b0SIkwItn3SpnFblrgb2c3amjjvao121fzz9DCPW5HIQmU8nz6cPH+T2dG+Jd7YGcE9x4Fvjgkt/Ru+i08uxlyHVexUZU7MHJoflyd+D2MhIXWrk524aT3r7CkxRMxLookDUo0YqKq4SBvABuuH65UK7/InVIDpsulyplhIPDscHI1vlrao830GBLPSLZMCLSxoooMFejfOIYc4WRYzbDYY1VWRCr9NeNqeUNLNq9kQ28srG91CxehHc6KrRvQcdJ+Jj2Ee2KzOKsfhOFAben+ylIEc27WmJkC1IGhjXH1ZT0yBIvhIZoidGlzv0MMAFX7dOytKncUP6YRMk2aA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DUZPR04MB9845.eurprd04.prod.outlook.com (2603:10a6:10:4d8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 20:31:39 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 20:31:39 +0000 From: Frank Li Date: Wed, 16 Oct 2024 16:31:10 -0400 Subject: [PATCH v3 2/6] EDAC/fsl_ddr: Move global variables into struct fsl_mc_pdata Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-imx95_edac-v3-2-86ae6fc2756a@nxp.com> References: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> In-Reply-To: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> To: York Sun , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , Krzysztof Kozlowski , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729110683; l=3246; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=bYOSUeH8Tsfygywx3VBHrQIC4eU9dzx5J8svyPSfkS4=; b=EKJ8Dge2Ozee1A5eHctxPf+S/Ui6RqoLC6ohUz06aDXLz0UD0HtMz1CDFZWmF1+QiLVF6XjTL 6FqZaRM0buaDpWWjPtzLsbT0bxa1pUWy+WpA1RnLq6V0AOPwE0LDTxU X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0042.namprd07.prod.outlook.com (2603:10b6:a03:60::19) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DUZPR04MB9845:EE_ X-MS-Office365-Filtering-Correlation-Id: cd9e725f-234e-4f9e-14b4-08dcee2189f3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info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EhTWkRLY0MvQkEyREFsZkIrNFlnbzVOdEZ6V09veXNs?= =?utf-8?B?M3ZHZWphSnNyVndKU0lPcW1Ga1Y2RHhvektsbUVpemJhMjJPa2RXcUNIRzBY?= =?utf-8?Q?CIRBxvauV7YE9?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(366016)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OHBkK2JaN0JPcnZZQ2VCZ1NmemRtT2ZEckQ3ejRhMXJCc1JMUnBvSENYVWVy?= =?utf-8?B?dGdVMncybkhQMnV0VTkxYm14aHVCK0xTZnN6bGszRXhvOE1udTlTQnlCRnE2?= =?utf-8?B?T3lwZzZKSHJxWi9Ub1l1MnBrL2RkckRTWkpKbmRjdnF5NnU5emsyK05GU3Ju?= =?utf-8?B?NUpBQnVyUE1nZHRsV0xORkpkTWFicWxZaGQ3QXNRT2Ryem90M2tHRHE5VlJW?= =?utf-8?B?MGdNM1ZwUGg5RENEZEEzS3hPbi84RkEzWXQwY1JUamg0a2MvVG9rbXptcU1T?= =?utf-8?B?Lys1cUN2d3JxYUROMVFhU0RxY2RnT011Z2JTbWU1RkcrQStLV2tMTXJtLzYz?= =?utf-8?B?dHlnZzdHYW9ieXd6bGp1NFpGWDZyM2tGSXBRUmkyZGRQZFcrLzFxVllWV2tj?= =?utf-8?B?TTRTK09ZUDNKcFFMbzRpQ08wWXFzSFBETUt2cUk0VzBlSWx5dGtIMEhRWkk1?= =?utf-8?B?ZTB3UGptUENQb1NrekpUWkE5Tlk5bEtWWHk1N1lZN3o5ODFWdGVpa2FxRm1u?= =?utf-8?B?SndpU1dtT1p1VUc0UnRaYWVuMHl3RlRPLzJ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dDVwZi80cEJJNUovelZrelA4eDZiNHFENGJET3BQVkVt?= =?utf-8?B?aGdWZzVhTHRBZXZadFJrSGU5QVN4bzI4TWdmcEg4Nm5vUGk1LzRxZ2s3QXBI?= =?utf-8?B?ckUvOTZqbzhPZEF4QnQ1OGVkK3UvOTJRN0tieUZET1JpNEYreFZZMEJEN2Vs?= =?utf-8?B?d3lTSElrNEZ1dEJiVjVrV1pZZXhnMDRQNHdzdXkra0kvaW84YXMzOXV2YXJJ?= =?utf-8?B?MW5RR0lVQTlDdHNxT3gvS21MTkpVYjhIeUNhcGJQZ2pIYXZacVhDeXhBMjBo?= =?utf-8?B?Q1Nta0dzbkNaTE0vaVlYeUxrbE5PT1o3bDJtb3VuT0RBbk1JTEFxeWcyYnRC?= =?utf-8?B?YmMxZW9OYS9sQkdwcDYwcFA5MFpMQjZPSzJGT2duTDFtaVdTbkZ5UzBZRGs1?= =?utf-8?B?Z2JTcVJRU2Q3WlZ2MlFFWkx6QUxKZEVUZEtoUTdRSmVtM1kvcGZoK25SazJo?= =?utf-8?B?ODNjMFNCV3VvNWd4MGtpM0lhVmJTOVlVeUYxQ3g4WEtuSGlaWkFUN3d5MVBG?= =?utf-8?B?N1ZCMXZoc3hSSVFNeUhXTE56b2FlZCs3RlRVbndCbUMxQUM1NHl0cmpqN284?= =?utf-8?B?SUxrcWFUVlJxVTRxWnI1WTdMdWc5UU84b0t4b2RqV2Y3RFp6aURKYTN6UmhI?= =?utf-8?Q?lHr7/rCdNXf3T++M8r8hnyuzn?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd9e725f-234e-4f9e-14b4-08dcee2189f3 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 20:31:39.6367 (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: dYPE268wOfISqh9pNv4rPJNh4MXRFgWaut2MenZqSuNVd2P/8LlAmnIOQ/N0CgtChJP768cYT0+apyoG/r+4WA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9845 Move global variables into the struct `fsl_mc_pdata` to handle systems with multiple DDR controllers. No functional change. Signed-off-by: Frank Li --- - rework commit message. --- drivers/edac/fsl_ddr_edac.c | 21 +++++++++------------ drivers/edac/fsl_ddr_edac.h | 3 +++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c index 9924c6b816648..7a9fb1202f1a0 100644 --- a/drivers/edac/fsl_ddr_edac.c +++ b/drivers/edac/fsl_ddr_edac.c @@ -31,22 +31,18 @@ =20 static int edac_mc_idx; =20 -static u32 orig_ddr_err_disable; -static u32 orig_ddr_err_sbe; -static bool little_endian; - static inline u32 ddr_in32(struct fsl_mc_pdata *pdata, unsigned int off) { void __iomem *addr =3D pdata->mc_vbase + off; =20 - return little_endian ? ioread32(addr) : ioread32be(addr); + return pdata->little_endian ? ioread32(addr) : ioread32be(addr); } =20 static inline void ddr_out32(struct fsl_mc_pdata *pdata, unsigned int off,= u32 value) { void __iomem *addr =3D pdata->mc_vbase + off; =20 - if (little_endian) + if (pdata->little_endian) iowrite32(value, addr); else iowrite32be(value, addr); @@ -511,7 +507,7 @@ int fsl_mc_err_probe(struct platform_device *op) * Get the endianness of DDR controller registers. * Default is big endian. */ - little_endian =3D of_property_read_bool(op->dev.of_node, "little-endian"); + pdata->little_endian =3D of_property_read_bool(op->dev.of_node, "little-e= ndian"); =20 res =3D of_address_to_resource(op->dev.of_node, 0, &r); if (res) { @@ -562,7 +558,7 @@ int fsl_mc_err_probe(struct platform_device *op) fsl_ddr_init_csrows(mci); =20 /* store the original error disable bits */ - orig_ddr_err_disable =3D ddr_in32(pdata, FSL_MC_ERR_DISABLE); + pdata->orig_ddr_err_disable =3D ddr_in32(pdata, FSL_MC_ERR_DISABLE); ddr_out32(pdata, FSL_MC_ERR_DISABLE, 0); =20 /* clear all error bits */ @@ -579,8 +575,8 @@ int fsl_mc_err_probe(struct platform_device *op) DDR_EIE_MBEE | DDR_EIE_SBEE); =20 /* store the original error management threshold */ - orig_ddr_err_sbe =3D ddr_in32(pdata, - FSL_MC_ERR_SBE) & 0xff0000; + pdata->orig_ddr_err_sbe =3D ddr_in32(pdata, + FSL_MC_ERR_SBE) & 0xff0000; =20 /* set threshold to 1 error per interrupt */ ddr_out32(pdata, FSL_MC_ERR_SBE, 0x10000); @@ -628,8 +624,9 @@ void fsl_mc_err_remove(struct platform_device *op) } =20 ddr_out32(pdata, FSL_MC_ERR_DISABLE, - orig_ddr_err_disable); - ddr_out32(pdata, FSL_MC_ERR_SBE, orig_ddr_err_sbe); + pdata->orig_ddr_err_disable); + ddr_out32(pdata, FSL_MC_ERR_SBE, pdata->orig_ddr_err_sbe); + =20 edac_mc_del_mc(&op->dev); edac_mc_free(mci); diff --git a/drivers/edac/fsl_ddr_edac.h b/drivers/edac/fsl_ddr_edac.h index c0994a2a003c2..de66f9822fba1 100644 --- a/drivers/edac/fsl_ddr_edac.h +++ b/drivers/edac/fsl_ddr_edac.h @@ -70,6 +70,9 @@ struct fsl_mc_pdata { int edac_idx; void __iomem *mc_vbase; int irq; + u32 orig_ddr_err_disable; + u32 orig_ddr_err_sbe; + bool little_endian; }; int fsl_mc_err_probe(struct platform_device *op); void fsl_mc_err_remove(struct platform_device *op); --=20 2.34.1 From nobody Tue Nov 26 17:33:59 2024 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2089.outbound.protection.outlook.com [40.107.104.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9712217325; Wed, 16 Oct 2024 20:31:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110709; cv=fail; b=E+v7pksyDOtKinh4HN6DGWF7jsQVN6XZlZ0lhc9IZtJ938s65C/NxKC7K6QqtQZfzPWQwmO31SUA5Br+LgC6ky0o+TWRMDLvueziiXagZTKci5x9ldooeNjgoQ2xaaA2sNjgNuNV/ZrA9nWQyfILZr5xlp9auGWrKMLkSSSkc9I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110709; c=relaxed/simple; bh=kkq2oTJ4X6AP95d7t+PEWHZQVH1ktTm8zm0a5adwArE=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=Z7au/KN4WDVzgAl4qniZMGNCRRZ8JjW8o3CVEtznTCMtdXS9czfNUPha2WGze3xD72Bs44rAVNZPcoJtiu6/OEmwTSc7eoJjShKJrriILi+sg7fk8lVrxuh36M910xiwQ8QP9U+FvE6Vcup8+TMrBEhXMVYf49D27xdB5rcs4bI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Lh9j951I; arc=fail smtp.client-ip=40.107.104.89 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Lh9j951I" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oPBJxX3eE+340cZ8GhbqwHR6GgLySNmyJkyuIh9jT5S7G7zXa3CmVLPzEDeWvQsCV3azrmE4Yt2uzo42pd1U85Uw4y5Df10iVDHXXeBwgql5vbomUcyOVNugVuGgjdMQG1PQwLauEAr/u6N/4cldBIMWGVIt/UW42ntL1k+fFkRrYhho1vf+V9iE+ey91djfNjArsFpoMHoY+oDxN/jYXunI/mojrdFYbqoDTGWuuv2u7Nk8h+fGP3r8/DcyHVXor5v2OLCyykfJR/AJvAXubpGJ1VpJhpenBsI412qG0RCNtqAkCMcS7rF7bdG4LX/D0Byrmo0g0FSgB1JXVpQ6/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9d8c0sNGYq4vfHYI6mkZB5AG2AIJXl/qLfLBHwapHrk=; b=MiB40jc6P/oGvueMDUPzG/mzJYxlpqCga0Q6i26ejlOSkf78REE8VZsWFmD+I4XcuXsNU2yQcAis+dVTlh4a7fscXYrm6vqqo5qCkb8QJED+ICAoK/BnMUxiGPHY0up0TzqGPPcWv4+awG17LpEGieBdv/tk9gb8zSkTlPsT93VzTF3E279HFGdxtFzcjLXEl8IY/b4PEJvr1qfSZamSUy6wS9cG/Hz3LzpcdTuSiEySJM/BtDe6WX4kkjaQsZHHQuB8UaU5rNJJqBUTgpUwdI4HcJ+F6VMI+iw18Tx4ErHXD5yBoUwbKjYEOHhRixScT+SCINo9L9jYeoS3Q+Cxdw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9d8c0sNGYq4vfHYI6mkZB5AG2AIJXl/qLfLBHwapHrk=; b=Lh9j951I+4qvPA8k6NwA8eNbnzDlhXWaRn6HNK+XWifJy0Y6XJ0e4n7dVhCTgvjXKrrXfUlAsfwAznIE0vpdUOwQKNMqATogLPP/IukOuXkB48QfdiqrAXYvwCdK3UStj8Up/VzUVNlmlwSCwwaGde0ryIHe0XGFVxF0o1rIXRWR3kT+l460bCXUftE3dhnAK2nBypQIItjrgGIBwTLIckFk65PvfPk7JAgUVvRzY+KvBIrgkBnZY0rIFxIIzVtlFUDSRBBrxolrSjyt4VrpRg2jtuiZc2usG5u+2SltNFsJIJEf0SRRf6syiIKjF80cv1zp/9tzHJbML83taYOBbw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DUZPR04MB9845.eurprd04.prod.outlook.com (2603:10a6:10:4d8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 20:31:45 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 20:31:45 +0000 From: Frank Li Date: Wed, 16 Oct 2024 16:31:11 -0400 Subject: [PATCH v3 3/6] EDAC/fsl_ddr: Fix bad bit shift operations Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-imx95_edac-v3-3-86ae6fc2756a@nxp.com> References: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> In-Reply-To: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> To: York Sun , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , Krzysztof Kozlowski , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li , Priyanka Singh , Sherry Sun , Li Yang X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729110683; l=1889; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=ZoeCNuBkYPhKpS/FeSuF2iwPzcC8UiQC1YFwpngjXhw=; b=D/ksnGAhxZQg7Qb7/AI21/XsrLMkiVMpm8GXiNGcFFbOwL6pE/1hRfED2f6Bk1ehUfuQTPzIz OWQHHVTB3AMCvG146S1knpt5XN0LpICKwrKUbOGPeuAQu35rzRyc3dz X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0042.namprd07.prod.outlook.com (2603:10b6:a03:60::19) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DUZPR04MB9845:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c23579a-3d80-4d0b-b343-08dcee218d35 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ck40bFAxME1tbWNwN2xRaXBYb1k1elo5RkkrSUt6UndmeWFQUjNrRDYyWTRZ?= =?utf-8?B?L05JUll0WDBQZ2dXdDVqUVZLVmNvV3Uvc1Axd0F0aXZkb21rZGh2ZDVGWm5L?= =?utf-8?B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RY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(52116014)(7416014)(366016)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b0xXcEJVUnJSZ2J1OHVKejZYTnd5UXI2QVhhcjRCSFlCYmpralJNQnk1U08z?= =?utf-8?B?aDl0WjFkTW8rcnN1YXVHSUFOT2ZRbTlJUlVYdUhuRU1yRHFFdnUxRVE5NWti?= =?utf-8?B?SEg4SnZUOWhrd2ZPZ1RHQU1iNENweGNVOXRFRTZwWEpXcW9Vb3hrdGJRaVpX?= =?utf-8?B?Y1BMMHRPL1l6aElBVDZYVHVrR0xKSHBQczhEMHpIcE9aR292bHRvTUtFejVa?= =?utf-8?B?THI5S3ZxY25BODM3UysxZlZoMWlCaUlzQWVycFFjUmJac0JOVkdkVWhPM0kw?= =?utf-8?B?Uk8vdE5ROHFjd2MrRGJ4NzVaTEk2ZHgwTmlMUmdMYis3NUV5dnF3bkpZUnJi?= =?utf-8?B?eVRuTXBZQkRrWjNjdkRYdmtpdEhaVGJQb0lPbERCYmZEaDFoRFJnUWNFVjdJ?= =?utf-8?B?ZzhnS2F2K1NYa1Z0QzZ0RytwNW1ScEN6RWxhVmJlV1pjT21QWitDUG4zVFND?= =?utf-8?B?WnJNR3RlN09PY0lnV3hDUVc5Y1QvYWNZaE1UK0xlT1dLd1gvVTJoU2ZPOGNj?= =?utf-8?B?UzZsRW11VnNlWGJEMGJsYXVsM0prL3ErY3dVTnJrek8zREVvVjMzdkxSZDl1?= =?utf-8?B?RjNYalVSdzZwRmk3S21uNEJCNC80SE9HanRVUWsvVnZZWDArQ2JOVTgxR3lX?= =?utf-8?B?L2dTazY0czNoazhWOWUxOStXQlJaRzY5b2FLNEtocldhT29JN0psWmdKZzhM?= =?utf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N3MTF6d1lXeWpjclFI?= =?utf-8?B?YWxSaHVGY0gwNnRISEpHSnJPd2dOU0VxcElXMHlSUTRDSWV6ckpWd2pOMmQ2?= =?utf-8?B?UmdIbWVoL2NqUW5jeDRSUno5R2pFZFZzcmoyVGdURlBxUlQ0Z0tLUnF6Q1Nv?= =?utf-8?B?aVIzaEZBVnZnMVpoWEdFUTVkR0ZEOXdHelU4UDhLQkdkdys4T0l1cFZOVlZF?= =?utf-8?B?M2NNbzBvLy9jYUNFVGMzbEczV3BsV1Bwck1rYWhpdTFlbzN5Y3hPaDNOZGVN?= =?utf-8?B?MWlaREJyUzd4aWNNZ3RyL0dKSWVnWGpiQmNkT1lpK1l0TkExV002MzQrb1dI?= =?utf-8?B?RmdOWGxtMUlHR0VvcEMzWEZyWmdaYVVIbzlZckZraWxiSkFYWG9aTXpxSDY0?= =?utf-8?B?OFJRSlp3SDVhR3c1UFdhd01Td2hzdW9GWG14Nm5NVWtmbFpnQlZXZmlYRHVy?= =?utf-8?B?aHVzTVd4VzhhZ0RrbFN1aUl0M0p6Y1g4a3ZxYWJIdHJxdHBUdGVsLys1NHRo?= =?utf-8?Q?1w9dCgiqaSrb6sIaje2K0+UyT?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c23579a-3d80-4d0b-b343-08dcee218d35 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 20:31:45.1031 (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: vO39xYqeBQbkF95ABuU5xHt2IMORg+s+q6Uz+pN6/OR4CyZtgJYQYV8M61LOtODJEGcJ1y4BbCUdXO8ItPPvAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB9845 From: Priyanka Singh Fix undefined behavior caused by left-shifting a negative value in the expression: cap_high ^ (1 << (bad_data_bit - 32)) The variable 'bad_data_bit' ranges from 0 to 63. When 'bad_data_bit' is less than 32, 'bad_data_bit - 32' becomes negative, and left-shifting by a negative value in C is undefined behavior. Fix this by combining 'cap_high' and 'cap_low' into a 64-bit variable. Fixes: ea2eb9a8b620 ("EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx") Signed-off-by: Priyanka Singh Reviewed-by: Sherry Sun Signed-off-by: Li Yang Signed-off-by: Frank Li --- drivers/edac/fsl_ddr_edac.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c index 7a9fb1202f1a0..846a4ba25342a 100644 --- a/drivers/edac/fsl_ddr_edac.c +++ b/drivers/edac/fsl_ddr_edac.c @@ -328,6 +328,9 @@ static void fsl_mc_check(struct mem_ctl_info *mci) * TODO: Add support for 32-bit wide buses */ if ((err_detect & DDR_EDE_SBE) && (bus_width =3D=3D 64)) { + u64 cap =3D (u64)cap_high << 32 | (u64)cap_low; + u32 s =3D syndrome; + sbe_ecc_decode(cap_high, cap_low, syndrome, &bad_data_bit, &bad_ecc_bit); =20 @@ -338,11 +341,15 @@ static void fsl_mc_check(struct mem_ctl_info *mci) fsl_mc_printk(mci, KERN_ERR, "Faulty ECC bit: %d\n", bad_ecc_bit); =20 + if (bad_data_bit >=3D 0) + cap ^=3D 1ULL << bad_data_bit; + + if (bad_ecc_bit >=3D 0) + s ^=3D 1 << bad_ecc_bit; + fsl_mc_printk(mci, KERN_ERR, "Expected Data / ECC:\t%#8.8x_%08x / %#2.2x\n", - cap_high ^ (1 << (bad_data_bit - 32)), - cap_low ^ (1 << bad_data_bit), - syndrome ^ (1 << bad_ecc_bit)); + upper_32_bits(cap), lower_32_bits(cap), s); } =20 fsl_mc_printk(mci, KERN_ERR, --=20 2.34.1 From nobody Tue Nov 26 17:33:59 2024 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2062.outbound.protection.outlook.com [40.107.247.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83CAB21790E; Wed, 16 Oct 2024 20:31:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110716; cv=fail; b=Rm4ovrPMLio6XihMgoM62ukUIfFId0YLzh51o8e3dYTREmY1EOieLIjmOi20r3Q1Uau84HnljhLOemzaMD1/uZ4Tlr+Cuq4Jr9ivS95oJfqnPs8eQMSTuNkH2Y4tbEG7wbEug3b6lGB5Rchn1GSZeDu3y09IC5joA/DTKWCQUAg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110716; c=relaxed/simple; bh=lyWe/ySMkDZ490wGZqd1uDY524RbQ2uyh4spYd1a1x8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=O2eOq5q+TgLh2M32EXvGy9J5UcbzgbuSDUJo4Q/UlRNuDwA5ZwV2MjR/SOFdl4M78w5uyFD74lbNSwHRL1xG7jZ3wu6orHeAwTSn1yKytascpMCZKEnoClut1NrnfTKV0cTqn+MqPldVbhYcaQt9OWw9sd2vfudECTbGTT4HFIo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Eexrvk5h; arc=fail smtp.client-ip=40.107.247.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Eexrvk5h" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KTFdkbS1NI+OjKOw7n4x73cTf/PvmwkPgysgY6Nr6DhoqKCq7XnFvodR1yDkoMiq6kqAvqZyiPTlID0uGeJERBNQLCdvj4gDXT5Mhs8oDncq6cU2TXv6J7Wx2aRYDbH8Qv4OMlwcxSRRvYUHuJX5usyKYAu6UNER+MbaPU1+nILS+NWx2oQrCi/hBVMQYXocXDZ1ucDBfeRIpf0W5yvHnkHjvB8VT/HUnvUFQlUyTVpg4WZdeETDXl2bJI9R9RQ7C653h/dMQVVoZxg610w6tF/QznrMJ3Id/ES4sZK7BsEEK/IxQqvhdNagVYzkwZK7qZpLIaOqM/APwNXesjlDEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qMo2ngT7gPC02/8eJPlx4Oq5Zz9LMuVnQAOCsuCJbzU=; b=xf/xhWNFo9v+Kwjb+7nnvg7QOMVZYAcyov7+H7Enk0eX+AkYe282Zw3nNOiDBvQ3/u8MBrCPwAb4scnRtRcuHCrBONIWGd/oj7a14At+T76mO9vwgHm1Babfsiqovj6bEmN55ceBxWjrrlM2BU5RBxTpfwwkQISA+cL+j1pQ1ZYftwx/XyJEnHOFbYg9AI1s5439vbvcOyoTMzrL1JFX6KWkkQ51CfDV2wo40RR+Vx6hFNJYjObgCZPPF9Mkn8/vVunoUBv8SdPvwElkcrUa1+pMkx9ejfGpEynTJTpCNZQV3bjr+w6w8nVJVxJ3kA3kINFHwF7oiK+Ny9YE2JlTtQ== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qMo2ngT7gPC02/8eJPlx4Oq5Zz9LMuVnQAOCsuCJbzU=; b=Eexrvk5h+xTam/I2FMoMzP1beBZLqHbLUTvieQeL1/2TgGO2Wi0FCPuq4zEOYpdwIm2Ictxm8iFDhHvv6HH9MMiDQHu71X583mVDsRRZb81bzqqscmdOkUD2kzLQz4efwq5ufSGVM/1bHcBxrG/rvxPNeWXfjHKm9/n3wR+3YBu23KfF3Pj/bJuz4Q35nMnQYMAGALblRhQW4xY9aiHaD3KeEaCfrHsxVEFqBmSvCrgFmC/MG6QvJHetkyMbV8SG7SeIZVs8oRMte8heHsaWpfqRN+atK3qZRWGhMzPmEYT3aHJT6QxK+FhLpZ8SXnAwN4Jptd74ha80SWJS0r+Sww== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS8PR04MB8738.eurprd04.prod.outlook.com (2603:10a6:20b:42b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 20:31:50 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 20:31:50 +0000 From: Frank Li Date: Wed, 16 Oct 2024 16:31:12 -0400 Subject: [PATCH v3 4/6] dt-bindings: memory: fsl: Add compatible string nxp,imx9-memory-controller Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-imx95_edac-v3-4-86ae6fc2756a@nxp.com> References: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> In-Reply-To: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> To: York Sun , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , Krzysztof Kozlowski , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li , Krzysztof Kozlowski X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729110683; l=1970; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=lyWe/ySMkDZ490wGZqd1uDY524RbQ2uyh4spYd1a1x8=; b=qavNKD3m0OnW/A7jjrg2/vgBrQs+uti8j5A1Eefj9Asqy/z29TGn9zSEI9eBCdmmWTPV9yLpp CKOQ8w7jC7XAuBCwZ/JfJ6Vm1NCDXSMPSS+gwGaDzkCqGmMrsP7v2cB X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0042.namprd07.prod.outlook.com (2603:10b6:a03:60::19) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB8738:EE_ X-MS-Office365-Filtering-Correlation-Id: 110464bd-dee4-49a7-b285-08dcee21903b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|366016|52116014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?UFRSTlhGV1F0MklGWVVsSEdnTEtQKytRYzRkNVRCTnNxNkQ1SWcwTlNrM3pW?= =?utf-8?B?Wk5uK2lvVW1aaklqN0VhbFhCeXFyQmpjcEQ2cW96YjYyU1U0T21xRnNpR3VO?= =?utf-8?B?UUFJRllZdGt1YVFZcEFqSHVzamJsdFdVUDh2THBTUW5YL3ZjbG5WTnRXWmw4?= =?utf-8?B?M1BQNHVSZzNVODFOd1pJaE9NRkpJMnVXK1RFc2dtVHVQaThvbHQzaHN6cmpu?= =?utf-8?B?cDRsRVVYaDUxOWlkTWpZbE1vUWVRREtJNnpDYU1HZ2hjeTRGbXNBeCtJYzlM?= =?utf-8?B?LzdYWXJtTHNlQTUrejJkNk95V0cwclN2MkVCcWZzTnVTYjBYMWRneDhGdmh5?= =?utf-8?B?eU04dTFBYUUxMmx1SFJTNjBWSVRDWmVuYUlqR0ZFd2pHNU81MExsVmZqN0FN?= =?utf-8?B?UWFhdHZyTE9DY2NDNVhzNnVHMXJGd21HTVI2S2ZVYUdNejhXaUhuamIyNGxp?= =?utf-8?B?ZEVXQXhUVmF0bUlNUzhRN2o4d0w5OGxzM2FSZldPQUY3TFJpT1oyVWcyUTBz?= =?utf-8?B?SWJreUl6VlNQTHo3UFlnYy9WZmFJUTNKdHV5WmVTa1pVcmo5WjhjZmNXOGow?= =?utf-8?B?RWRuU2g5SFl1aTFsL2lnVk5IZFlKWE5YaEViZjloM2R3akpidkx3TDZqc1Zv?= =?utf-8?B?Vzdyc3poS3l6TldyWFkzY3RCVDR0TURvS1RRWmtsUGxpcHFPYmtHR0l4U1o3?= =?utf-8?B?NW5UM2I1SStrVitWLy9IR0twanMzd0JwQi9VWVFBZGlyNXc2cjd1NWp2ODJr?= =?utf-8?B?SjB3UWczQW9aUTFzZnZ3Y1Qzc1AzYU1QUnVPVHRkOUFK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1BNaDJXZ05STS9JNW53OE9KdmxY?= =?utf-8?B?OWF6MHA0b1hmeG8xTkVGaGY2Nml3cHQ2Ri9aaFA4M0ZHdm51RFhtWjlxS2ZE?= =?utf-8?B?ZkI2Wm15ZjFreTlHUlZrcFBsNkJGNk90dndMNENEOFkxc2hNZjlKaWFndTQz?= =?utf-8?Q?I7c0abybrLXy6?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(366016)(52116014)(376014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eFI5OEhqbXdqVXJhaHFvdE1yZW9ZTEEvZlAyaUlnSFNnRjVabW5DeStpeHR5?= =?utf-8?B?S25CMHpibmJaQUg3WERhRnJrdk43M2JjTWZubE1oT2F2aUd6eHQ2ZktIaG1Y?= =?utf-8?B?V1A0THBSZk9MUkUwSlF4TXlGQU5wSkM5Q2ZXTW5ZM3hRMTNnOTVsQmVCb2lD?= =?utf-8?B?YmgwQjR1OHEvamdNL3ZYMS9uRnA1bW9ScW5oM091K3RXQjJ0QjlpeEt5SkVT?= =?utf-8?B?blk3NTQ4dEEvQTUxM3M1NDZETmxKbWw4TDlkbW4vV2E3MlFYWHZDU2FTNXJz?= =?utf-8?B?SzlFL05WTTlwSjVadXNEQTNSaXZKZnZvTjRRSDlsZjBtZ2w1cU40TVVscUJR?= =?utf-8?B?ZE9sOFZJWTI1UWp2eUJGUzdwQ1pJUG9HWmhSb0Q2bENiYWtFYVJYYW9ubmFW?= =?utf-8?B?UTFnblZoNXJNakVpT01RMFNBdnNSKzAwTUIwNnVyS2hoaGE5dWwxMGZob25w?= =?utf-8?B?UDJTNGIzSlV2OUtES011aGhlTFlyT3YxTElIa1NDNURpampDUC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h5Y21OVE9TUVl0bGxVaXN1QTFKY3c4enpk?= =?utf-8?B?b21EV0lhZ1lXQVREZ1ZtNHRWVmtDWStoNWowYXQzcTdvUWJGMlBYajN4eHFa?= =?utf-8?B?VWVkdzBYNGQ1QXBMRXcwV2VsbUo4cUpldUMvckVneTR6OWt0V2ZOWGxFeDRH?= =?utf-8?B?aEZidTBpVVhpRXJGR0paRXVWV3pYNmRyZ1FrUUlxaTF6YzExcnpYRS9mdGkw?= =?utf-8?B?TzNSUzAwRzZla1g3WFAza3JNejgxZnJLWlZVSmkwdmhQSkhKTk1hVHZPUVZj?= =?utf-8?B?TXlFa3hNSmNqaVdJNFo4dy9SNXpuN2czaHcvVksrR3dxdVBFZE5sYkpsTGxy?= =?utf-8?B?QVJPY1hFc2loL2JCK2RrZUJYMnZoSjFLVllieWRYOWZCZmZZMXA1T0o1L0dK?= =?utf-8?B?bU1lYW1XUk1EcFdLYjBidVM2MmlNcWt4Y09iR1pRL2lXV09UdStYc256OUpm?= =?utf-8?B?QlA0MEdmMGNacndwdFkvVVBsdkZrcmZGK0RRSWJoaEVXTzUxZWcvMFdCeUpI?= =?utf-8?B?TDJYYUhDMEREQ01xWFEyY2hZUWkvRXRvc1JLcFpIaEFQK1R1Q3VQa21aSlkx?= =?utf-8?B?bmt1c085ZDRacjRraStFVUxlcWdJb3ZYV2RMdHdtWWtrK0tGVnNlQm9DUXZr?= =?utf-8?B?anJJZWpNWVJyMU9Wb2ZBRm9yY1YyUWFPMWI1N2RqenNmYzJ5UkY0L2RIc3pl?= =?utf-8?Q?vGicdtKHVthYa90FupKc02P0x?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 110464bd-dee4-49a7-b285-08dcee21903b X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 20:31:50.1700 (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: +LsSMPJ8YOSKqTdqHsc1hqlQsrJrSX0CM4h2V3EyYXfxA/kHWuHB3FxHGRLSIINGlBD15K9C6uanIgMwmGURQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8738 iMX9 memory controller is similar with other layerscape chips. But some register layout has a little bit difference, so add new compatible string 'nxp,imx9-memory-controller' for it. imx9 need two 'reg', one for DDR controller and the other is ECC inject engine register space. Keep the same restriction for other compatible string. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Frank Li --- .../bindings/memory-controllers/fsl/fsl,ddr.yaml | 31 ++++++++++++++++++= +++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/fsl/fsl,d= dr.yaml b/Documentation/devicetree/bindings/memory-controllers/fsl/fsl,ddr.= yaml index 84f778a99546b..e0786153eec73 100644 --- a/Documentation/devicetree/bindings/memory-controllers/fsl/fsl,ddr.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/fsl/fsl,ddr.yaml @@ -40,6 +40,7 @@ properties: - fsl,p1021-memory-controller - fsl,p2020-memory-controller - fsl,qoriq-memory-controller + - nxp,imx9-memory-controller =20 interrupts: maxItems: 1 @@ -51,13 +52,41 @@ properties: type: boolean =20 reg: - maxItems: 1 + items: + - description: Controller register space + - description: Inject register space + minItems: 1 + + reg-names: + items: + - const: ctrl + - const: inject + minItems: 1 =20 required: - compatible - interrupts - reg =20 +allOf: + - if: + properties: + compatible: + contains: + enum: + - nxp,imx9-memory-controller + then: + properties: + reg: + minItems: 2 + reg-names: + minItems: 2 + else: + properties: + reg: + maxItems: 1 + reg-names: false + additionalProperties: false =20 examples: --=20 2.34.1 From nobody Tue Nov 26 17:33:59 2024 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2070.outbound.protection.outlook.com [40.107.247.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5974D218308; Wed, 16 Oct 2024 20:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110720; cv=fail; b=Ik9qQfDI9iQg06WXLHXbJAklA85fT49S7wU04IjUOjzEA0HpswjEsrAvC5DDhT2XPsVio2oKPjE5HY3kQB2egPQioqJ9YF98TOH8yUnLFdRiuQ7fH/jJjBjJoEmywNfgRrzAc0iZM/qZOrJ/draQrScyHa9JmKo47hfuiwv5F4U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110720; c=relaxed/simple; bh=uQlwmIwixbrtiEhQ0s/EITjv87vXrYDoWoQrwUcKDC8=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=saw7Fd1A0PgulkmaC7IiSemIkxYtLIB3AinvVQ7Cu5OZu7aSpJGrbxxXpa++hqbfxuS/3wpccPJ78rV1XEH0HTeF9bZ1lSjF9d0rFQs3SSd81dmuDu7x/AkfxIoQrQ7FKfQ/h73jPT2rgq7wJgW97pIJvCbvcYMTvn73lK368ws= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=FTl8kDJn; arc=fail smtp.client-ip=40.107.247.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="FTl8kDJn" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Kq1wtsFJCWwBen3wXprQS+IpuXaVx6MtvFVuDQ1s20RbRHLkiKUFBf3+++cQtDJ4zWzrrAN3jR8RDBggEm6v4LTKHHTNw1Z/ZwI/heBcOGwKYyPTKKKmNG++sU+JzC/65Q8RNUxZlsOEkoKxIAs/EFajoJJXmkIe6iFl9+EPxCUMfgWiJVYTIwrxeij0Iu3AUqWeAn8Xml6v1jD566Vzcf3JwAg4EwDK//05iGFudAAjsyv41DFI4OS5bf82ibi2XltFmW9ccWYTZ9UjtU/9tD+KPcmMMgYuWJcA0hwypcYwcZQwvfS3OYEqpppRKMPEggQ27xrHS1FSyrirZ/TMZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=in5RvYSFRwXmI05RdH8h/gSXJgH6cbfzuJX+7Y0Tn5s=; b=psWdpb4j2nk9Q4jyJDR5bPKwHtb8TmTvfyh0PBKXBSxOC1VSFH/Uo+SQtR23NCBZsQ/kdhUt23KJxUZz0U/FQVh74YyfN9VKkeQGFzoi6Ul6S0I8dw0nkT1b3fckg0pmUhTZwJzJXlHzCRUFoJAm8HuMF1dhNVNGH75y7aYLwE5sCle/LzbQ1AZAUW9lNbZ8xlxYu8deTAwP+V6UuoUZo7MuIrH6AnQArrh37B2SFZEvjzRNkZlnKe1eZE0K8OpeUHNNjvzksNvSmWr1gfKOOn15pRoLr7e/ZqeUmbaLZJjIjXT/lm261U4wOqo7GKaXD/nCXUPQvqUppBrTsc4hoA== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=in5RvYSFRwXmI05RdH8h/gSXJgH6cbfzuJX+7Y0Tn5s=; b=FTl8kDJntCu17byf1oe2rsYEIKPJXhZ2OXfj5D4cAs3cOHxwt+zf3b2FjfqzBFTp/k2Vit7MHmPvYhgGaH8n1xo80Y0snhbzfNpJ00lGjkLafdirfoa6vGLIeS5fuBcSRQchjU68e+QhfLq0uBMlxHAWCWy7XUAzWvXqqpb33VqMtW/I7vfZf4IgTqVeq78OfKeOCkBlRgfxUU8PLtokct4LueO0IyWPYAgJCq6n3ylDz+JSU8reikH8mbDMPLixaxA2K0piouZ0od/gr/eoA+21ne8XPN5+Edv0g3DUMo8LYnK52zvovFZtRxCfdDFGTVsifRtVqYSyhFZKq+8kiA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS8PR04MB8738.eurprd04.prod.outlook.com (2603:10a6:20b:42b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 20:31:55 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 20:31:55 +0000 From: Frank Li Date: Wed, 16 Oct 2024 16:31:13 -0400 Subject: [PATCH v3 5/6] EDAC/fsl_ddr: Add support for i.MX9 DDR controller Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-imx95_edac-v3-5-86ae6fc2756a@nxp.com> References: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> In-Reply-To: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> To: York Sun , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , Krzysztof Kozlowski , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li , Ye Li , Peng Fan X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729110683; l=5954; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=hUQnyfJFTL94sxJNzfCg3IOb5Vka/0x2CpQy/F03SQk=; b=Uz7YCUC9DM7d3qQwjHo5x/2yPSms5CnmjZlbIqUL1o+tSam1kMslNv3vi7p4IVUo24iIjZYRx 4g0+UNyUhZNBNC+Z0oQpvcFhgjlPyVR+ebRPmLZPZK1I16DxOck64xd X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0042.namprd07.prod.outlook.com (2603:10b6:a03:60::19) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB8738:EE_ X-MS-Office365-Filtering-Correlation-Id: c6b2c753-edd4-4f09-0d9b-08dcee219361 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|366016|52116014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8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8?B?U0xUaHZZVnRDWTdRQ0hQUUZnN3ljazM4UDZtVktaNWhTMkJtVUxUeVl3SDFZ?= =?utf-8?Q?zK82hr+QC3szq?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(366016)(52116014)(376014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U01CcUc3bml4L1FGbFc5UFdEUFcvZ29MaUtkU1NpcE5OVVZ5TnVtN0I1VFNZ?= =?utf-8?B?dWtYL28rckJYajNkK2pGWkMyaGRCdXh2ZVlBZXNMazZ3REZLQ3UydlVYRDZN?= =?utf-8?B?czlWUTFnbGZpSG1OQnRKQWJGWHNqOVcyVStnQWd6MWk1YjExV1ZPanFOL2xl?= =?utf-8?B?TVRlS2JSWTI3NUJSZmRXRmpGbDZ0a1JkSnc4VWRqemxISmxIN2FJMTE2azVJ?= =?utf-8?B?UndqQmhVN0Z0czZnVXM4TmlDYUNnYXRUYW1YRlVjQys0N2RiVkhVSzFOcHFQ?= =?utf-8?B?L2NWVTd4bFRUQUF0bktJTHQ0UVZMZFRNZnkrZEg0eFhYM1Qzc0V6WFZrMVVj?= =?utf-8?B?OWhWMzk4MDhyTVdVK1Z6WFFZdmpvSDBiUnBrcU40U1VaZjJIRUZkWUJxdzlP?= =?utf-8?B?cXBXNmRSeFR2UVhqdTAwVy9vUmExOUx0L3FSczc3ZEJlQVhQTndYZXU2VXgw?= =?utf-8?B?MlN1d2F2Z1hOQW5oeXFmRSt1S0Z0amZtNGxHallBNFRVeTdJV3Q1cjJBandP?= =?utf-8?B?SmprUkdLMW9JbjNFYWtxaGtlSDQwbFB0Zk5qZFJzR21ZNlhTajFnNE1LYnNv?= =?utf-8?B?dHhWN3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U1T?= =?utf-8?B?OHJHd0lkUStYb0VMcGFnSzZwODNsaGhDOVo5Z21GQWljZmhCNEE5Q3NQdWNz?= =?utf-8?B?bHRJVTBBdDc2Wjh4Nkplc1h4dkNSbkxNb2FBQUYyNTduRHZ3NE9iSGFuK3hN?= =?utf-8?B?V1pQcStmdzNmdHNGQXVNaHVEY2RHUkQzT2p1R0RZYUR6d0QvQWg2MWpQa1p0?= =?utf-8?B?WElabm4zOHFMYTUwb1o5aGppU1R3U1k3L0VRd2Q2OVp6OGlqc2Q3ZzlRN3hC?= =?utf-8?B?cTRXeHVPa3ZVeGxhamhmdzlZZnQvL3R5OXk5UTNRRDNiR1k2eEduQS9OUjEx?= =?utf-8?B?UnJaa2VEZERIdHk2TlAwYUdWSUZtMk52dXJVSUVQM21hbmlta3JuclBOblZv?= =?utf-8?B?QWM2YjYvRWs3ek54Q202TE5qUUUvM2g4OHlIS2MxcjhMWjhUcWhjMm9FWktj?= =?utf-8?B?YjV4UVUwRGZCYnFJUVRUeVVLL3VrcGdPTm80OFZSNVhQbEc1ZEJEVUVyWGIv?= =?utf-8?B?YU1TRXhXRklPWE1tZU8rdW5TRFlMeHhOb2Q5VXI1aG5YUVQrM1Y2aDhtby9l?= =?utf-8?B?VTVweERSUzBrTUJzSE9aajdzR29YVy9TYmxxRWk0U00valBhOEJWQk1YelBu?= =?utf-8?Q?UV/XeSYXiTiw9VgdJEBeuA0kc?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6b2c753-edd4-4f09-0d9b-08dcee219361 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 20:31:55.4614 (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: uJFGC/RlPrwU5i2052DDbq+8rnn2bPyU+loxfPS7jfNJlRyYN3m0KZR8rqWDcez/KXnukv505zuPQ4kpdUPoQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8738 From: Ye Li Add support for the i.MX9 DDR controller, which has different register offsets and some function changes compared to the existing fsl_ddr controller. The ECC and error injection functions are almost the same, so update and reuse the driver for i.MX9. A special type 'TYPE_IMX9' is added specifically for the i.MX9 controller to distinguish the differences. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Frank Li --- drivers/edac/fsl_ddr_edac.c | 48 ++++++++++++++++++++++++++++++++++++--= ---- drivers/edac/fsl_ddr_edac.h | 10 +++++++++ drivers/edac/layerscape_edac.c | 1 + 3 files changed, 53 insertions(+), 6 deletions(-) diff --git a/drivers/edac/fsl_ddr_edac.c b/drivers/edac/fsl_ddr_edac.c index 846a4ba25342a..8f64a4fe02ce9 100644 --- a/drivers/edac/fsl_ddr_edac.c +++ b/drivers/edac/fsl_ddr_edac.c @@ -31,16 +31,28 @@ =20 static int edac_mc_idx; =20 +static inline void __iomem *ddr_reg_addr(struct fsl_mc_pdata *pdata, unsig= ned int off) +{ + if (pdata->flag =3D=3D TYPE_IMX9 && off >=3D FSL_MC_DATA_ERR_INJECT_HI &&= off <=3D FSL_MC_ERR_SBE) + return pdata->inject_vbase + off - FSL_MC_DATA_ERR_INJECT_HI + + IMX9_MC_DATA_ERR_INJECT_OFF; + + if (pdata->flag =3D=3D TYPE_IMX9 && off >=3D IMX9_MC_ERR_EN) + return pdata->inject_vbase + off - IMX9_MC_ERR_EN; + + return pdata->mc_vbase + off; +} + static inline u32 ddr_in32(struct fsl_mc_pdata *pdata, unsigned int off) { - void __iomem *addr =3D pdata->mc_vbase + off; + void __iomem *addr =3D ddr_reg_addr(pdata, off); =20 return pdata->little_endian ? ioread32(addr) : ioread32be(addr); } =20 static inline void ddr_out32(struct fsl_mc_pdata *pdata, unsigned int off,= u32 value) { - void __iomem *addr =3D pdata->mc_vbase + off; + void __iomem *addr =3D ddr_reg_addr(pdata, off); =20 if (pdata->little_endian) iowrite32(value, addr); @@ -438,6 +450,9 @@ static void fsl_ddr_init_csrows(struct mem_ctl_info *mc= i) case 0x05000000: mtype =3D MEM_DDR4; break; + case 0x04000000: + mtype =3D MEM_LPDDR4; + break; default: mtype =3D MEM_UNKNOWN; break; @@ -471,7 +486,9 @@ static void fsl_ddr_init_csrows(struct mem_ctl_info *mc= i) dimm->grain =3D 8; dimm->mtype =3D mtype; dimm->dtype =3D DEV_UNKNOWN; - if (sdram_ctl & DSC_X32_EN) + if (pdata->flag =3D=3D TYPE_IMX9) + dimm->dtype =3D DEV_X16; + else if (sdram_ctl & DSC_X32_EN) dimm->dtype =3D DEV_X32; dimm->edac_mode =3D EDAC_SECDED; } @@ -483,6 +500,7 @@ int fsl_mc_err_probe(struct platform_device *op) struct edac_mc_layer layers[2]; struct fsl_mc_pdata *pdata; struct resource r; + u32 ecc_en_mask; u32 sdram_ctl; int res; =20 @@ -510,6 +528,8 @@ int fsl_mc_err_probe(struct platform_device *op) mci->ctl_name =3D pdata->name; mci->dev_name =3D pdata->name; =20 + pdata->flag =3D (unsigned long)device_get_match_data(&op->dev); + /* * Get the endianness of DDR controller registers. * Default is big endian. @@ -538,8 +558,23 @@ int fsl_mc_err_probe(struct platform_device *op) goto err; } =20 - sdram_ctl =3D ddr_in32(pdata, FSL_MC_DDR_SDRAM_CFG); - if (!(sdram_ctl & DSC_ECC_EN)) { + if (pdata->flag =3D=3D TYPE_IMX9) { + pdata->inject_vbase =3D devm_platform_ioremap_resource_byname(op, "injec= t"); + if (IS_ERR(pdata->inject_vbase)) { + res =3D -ENOMEM; + goto err; + } + } + + if (pdata->flag =3D=3D TYPE_IMX9) { + sdram_ctl =3D ddr_in32(pdata, IMX9_MC_ERR_EN); + ecc_en_mask =3D ERR_ECC_EN | ERR_INLINE_ECC; + } else { + sdram_ctl =3D ddr_in32(pdata, FSL_MC_DDR_SDRAM_CFG); + ecc_en_mask =3D DSC_ECC_EN; + } + + if ((sdram_ctl & ecc_en_mask) !=3D ecc_en_mask) { /* no ECC */ pr_warn("%s: No ECC DIMMs discovered\n", __func__); res =3D -ENODEV; @@ -550,7 +585,8 @@ int fsl_mc_err_probe(struct platform_device *op) mci->mtype_cap =3D MEM_FLAG_DDR | MEM_FLAG_RDDR | MEM_FLAG_DDR2 | MEM_FLAG_RDDR2 | MEM_FLAG_DDR3 | MEM_FLAG_RDDR3 | - MEM_FLAG_DDR4 | MEM_FLAG_RDDR4; + MEM_FLAG_DDR4 | MEM_FLAG_RDDR4 | + MEM_FLAG_LPDDR4; mci->edac_ctl_cap =3D EDAC_FLAG_NONE | EDAC_FLAG_SECDED; mci->edac_cap =3D EDAC_FLAG_SECDED; mci->mod_name =3D EDAC_MOD_STR; diff --git a/drivers/edac/fsl_ddr_edac.h b/drivers/edac/fsl_ddr_edac.h index de66f9822fba1..73618f79e587f 100644 --- a/drivers/edac/fsl_ddr_edac.h +++ b/drivers/edac/fsl_ddr_edac.h @@ -39,6 +39,9 @@ #define FSL_MC_CAPTURE_EXT_ADDRESS 0x0e54 #define FSL_MC_ERR_SBE 0x0e58 =20 +#define IMX9_MC_ERR_EN 0x1000 +#define IMX9_MC_DATA_ERR_INJECT_OFF 0x100 + #define DSC_MEM_EN 0x80000000 #define DSC_ECC_EN 0x20000000 #define DSC_RD_EN 0x10000000 @@ -46,6 +49,9 @@ #define DSC_DBW_32 0x00080000 #define DSC_DBW_64 0x00000000 =20 +#define ERR_ECC_EN 0x80000000 +#define ERR_INLINE_ECC 0x40000000 + #define DSC_SDTYPE_MASK 0x07000000 #define DSC_X32_EN 0x00000020 =20 @@ -65,14 +71,18 @@ #define DDR_EDI_SBED 0x4 /* single-bit ECC error disable */ #define DDR_EDI_MBED 0x8 /* multi-bit ECC error disable */ =20 +#define TYPE_IMX9 0x1 /* MC used by iMX9 having registers changed */ + struct fsl_mc_pdata { char *name; int edac_idx; void __iomem *mc_vbase; + void __iomem *inject_vbase; int irq; u32 orig_ddr_err_disable; u32 orig_ddr_err_sbe; bool little_endian; + unsigned long flag; }; int fsl_mc_err_probe(struct platform_device *op); void fsl_mc_err_remove(struct platform_device *op); diff --git a/drivers/edac/layerscape_edac.c b/drivers/edac/layerscape_edac.c index 0d42c1238908b..9a0c92ebbc3c4 100644 --- a/drivers/edac/layerscape_edac.c +++ b/drivers/edac/layerscape_edac.c @@ -21,6 +21,7 @@ =20 static const struct of_device_id fsl_ddr_mc_err_of_match[] =3D { { .compatible =3D "fsl,qoriq-memory-controller", }, + { .compatible =3D "nxp,imx9-memory-controller", .data =3D (void *)TYPE_IM= X9, }, {}, }; MODULE_DEVICE_TABLE(of, fsl_ddr_mc_err_of_match); --=20 2.34.1 From nobody Tue Nov 26 17:33:59 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2040.outbound.protection.outlook.com [40.107.22.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E561F21831C; Wed, 16 Oct 2024 20:32:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110726; cv=fail; b=MngypznOBMLywFLjqga3NoQ2rT07Y1pkde3mo93+KRwonfpFDodFsEUiKTd634/scLMvN9y6ObYvrFazP7qD1gy6ed5R6wPlTPRV/akzCMYE66Dno1bXrYWkUqK6YzCK44nbnEiHC0doyteIfXy3UQ7n8z0kik6BD2o3oD5/ikQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729110726; c=relaxed/simple; bh=79MXg57Cyd0Ls8RHW05eE1dZDeIAJiwGUJukDHuBEDA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=BpvkW9GL2rVSzPDEWLHE7ESGX0Z6QRbyvzshAMFpd02oUkEbbuI7FpiNi3Wp30gK2tO0ePMbtTVQFFj7zaXFleeOoB8dpKHxbup3a8SjL/p1GzJQ1EAmrLfhCQA0FTnNZmvr6zycZP9bg7IRwkcGgn7gNwAhNG1dXA073HZleiQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=EWp5Z5OC; arc=fail smtp.client-ip=40.107.22.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="EWp5Z5OC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=m7nqWUH3ykJUMUBCJW6H51p+tq/PggE2pKpmZead8JqyQe87PKwuwX14XWZ35wnGc52m05vCzWMQtLl3jeX3URLvNFRMHHRyad4Z47rueJfLrF1o0CzHEhMz2luqSIKuqrfnAlLtYTk6HftYMAojJQaSXvpFH95NoimbWD8on+W8+heg9FE3huvkwFkVME7f8aOJK5bb2LN/jpCr2+W2SezQavKh7+jWnedAUnqd5NW23EzhZuTlGZVZLA2UJEeS3UdaLGyYWQvY4vfpwLZuuMGK6yVTBZnvzNNXIGGfeooV7mEvfgXuKGVmXKxZ0AIxck/2E0FTyrvE0XXou043qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yMjEE4+kvbYP5U/kSZ9Rky2OKvC/sfNSCk6XWJ+IRQI=; b=qdD4WlSPqWNiPSlQYIRawj2Sm4867R/3kSZRX2fGSIGlaufcRyuw3mwrTVni2y84dsTRDlSCabHFxMUjgdux6JalOB9jezLt0spv9F1+7VeOizRQCkssjHX48VR+0XBembZ/OlUqv+T5ab/0WJfsT+BFqBWc7CGomNLZySQo4H+xu7Pc8CYD2t4b4famN08wJD3Ligg0oopGhoSmUCxsVo8QAOCXx9zVeqMGauJ7o/grj/Y/TQVcXx/y/o25hPdvI4FwIC5RC6KoMMw02mgy0+Tsc2mV3vOjkGsEnYDK5fHBNqh7zM35K1r56w+T62aF3csUvWL52jwmzS63B5bNSg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yMjEE4+kvbYP5U/kSZ9Rky2OKvC/sfNSCk6XWJ+IRQI=; b=EWp5Z5OCrMn5WTB/Q8OPX70ULzvnXwLEfleJA+OEZNKtPWJ3GQlO4AU3g39EJs+601P/S4KRJtyW+9HP87v47SOevXTWtto2w/+bRkxpaCzo1AiXbd71AmZ7GdtOdG1/mwLSZ+jZxUB2pRSLiohR3mFTB8dHywxTvpPUhKP45GLD1AhNU8ruT1XcJ8VIJXaqxFxQx1Zde8zFx33jX1tPE3rgcdb4henhnoTdm3405CEBiVuZ4aOk+Ypf36kS95fcAjGXlHecbN3DnHdD7gLjUDwbJF8Qbf4JGMTKZEUYAcBjd3lUovYbPT+wns7/3VurtDjNmAq06YavBdrsrGtzzA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS8PR04MB8738.eurprd04.prod.outlook.com (2603:10a6:20b:42b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Wed, 16 Oct 2024 20:32:00 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.8069.016; Wed, 16 Oct 2024 20:32:00 +0000 From: Frank Li Date: Wed, 16 Oct 2024 16:31:14 -0400 Subject: [PATCH v3 6/6] arm64: dts: imx93: add ddr edac support Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241016-imx95_edac-v3-6-86ae6fc2756a@nxp.com> References: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> In-Reply-To: <20241016-imx95_edac-v3-0-86ae6fc2756a@nxp.com> To: York Sun , Borislav Petkov , Tony Luck , James Morse , Mauro Carvalho Chehab , Robert Richter , Krzysztof Kozlowski , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1729110683; l=859; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=79MXg57Cyd0Ls8RHW05eE1dZDeIAJiwGUJukDHuBEDA=; b=+gFAjp6tDX+H4YcIIkzuo7LJNBC1YPQKC7TDTJEGw3ddJQr0Dk3ODfdFOXjBH2OrTcULesOJS voCYDaMaGY1BYjS0gaaKNaAp1/JIYNDrTjZSOlydj0iLjNeJ03X4y4L X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR07CA0042.namprd07.prod.outlook.com (2603:10b6:a03:60::19) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB8738:EE_ X-MS-Office365-Filtering-Correlation-Id: 12c8962b-6a5d-42c6-13b0-08dcee219649 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|366016|52116014|376014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?akwwc3hZUzBjczBUY2RVcnJ4WE5QZ3l0NGhQYmYxZzlBU0JqNm9tbUV1dk5T?= =?utf-8?B?S0ppNGg2anBtcHBSTEZ2ejVDWHZkVWhkUUpHVytHSFRTSVhMTVV4OGZwVmcy?= =?utf-8?B?aGNiR2c5ZDduaTRvRUY5dUdwaVZ6WUdmd2krUEpCbXFpTnJVRTVGUG9FOWxo?= =?utf-8?B?RHhpazBDRGRyaUJXa3g4VWZUaWNGdXJjbk5FcUtpN2NLOFAzR0ljL0VKRy9z?= =?utf-8?B?UTZBRk5PWnRmMk5pdDVzdjhocUU0K0FSTkFvRkNRb1hQcTN6YmlmL1V1cFFS?= =?utf-8?B?ZC83bDBVRFM3bnRydE9NN28wN2l0OUhvTko0enpCQ0VDYUFJUVpsYytjeS9N?= =?utf-8?B?TWh6NDRGRE80WFRUaGZZQjBOL0hwZjVhV09qalhVditDTUJROXFIQjZCTmR4?= =?utf-8?B?UEVqSnpOclRJZzBGTjQ4MnkxWjBPcHNkQjExZVRaTHh3RVUyM1FYWXZleXRL?= =?utf-8?B?bTNOb0dNb2lBZFpndUtRMnNtNmc3NjRkUjVicGF1SGJaVmNNcVRoNDZoakh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j?= =?utf-8?B?K1oyUVUrNit4Slp5K2IraW5NaWlPRDFPMkxTbnRLdmgrSmZJQjJHKzgxUWto?= =?utf-8?B?VGRPUVN4Qk1yV1AxL2pWR1FaTW9TMEZrTmZRMWtrNm5CcWRLbkZOVUhDU05k?= =?utf-8?B?NTV4VVhOSk5qQkppYzZ0amVXOXJPN091MmR4YW85ZEM4YTgzcGZkM1dVTTZw?= =?utf-8?B?eVJvdnNDVDhNZEhJdHArQ3pFYTJ6c2RYajRMMVZKVmxNZEsvNUYxUHpremZS?= =?utf-8?B?NFg4Ykc4bVByc1VaOWxuNkswaERadW5ZcHBsY0Z6TWlVS2VqK3JvK1hjTDIv?= =?utf-8?B?R3ZNSUwwYm9lRDFFWk9Pc1hzM3o5NlJnOC9HUEswdjhvcVZpcklnMEdaeW5w?= =?utf-8?B?TXh5VVcxNnU5UHZnR0lkL0d1ejZ4bVVqMnlDZjJISW9vRnlWeHF5SFBuV3lG?= =?utf-8?Q?APGqXq5XcMG3v?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(366016)(52116014)(376014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WHdwN3FOS3JEV0JxVzdkUlRqekdwM3BDTjJHVDlmc25lYTI0L1dqb0k1WDRV?= =?utf-8?B?b1ZIY3NFdXAvZ1NsUW5RNFZjYzdKZXQxRkdwNlBmN1A5T0tuYjU2emxKV1dU?= =?utf-8?B?ZlgvZ0o3WDU3V3JjT3lVaUhZN1hDcUcyRVlncmN2Z2lJc1BGVTNONXJSdWV1?= =?utf-8?B?M1dvU0hRc0NQVDRkMGZpVStscjc2cHFTSVBwQms1Z29aQlAzMjRhL3Y0VFpZ?= =?utf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0UjB2SERRTHY2?= =?utf-8?B?aVQ1am9wV3N3dGtSaEJXTjFRamdsMXpadTB6TUFyMDRPWEl4dFdKcldCbzc2?= =?utf-8?Q?4RvTnJw7a4SmPzKBKM2wSKYNe?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12c8962b-6a5d-42c6-13b0-08dcee219649 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2024 20:32:00.3274 (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: 15LK+Gco1OhZ5bkpR593crZ9JJ26C4Bplm0bptiZBvn60qkJOOdHdfJeZiQtIm6kvpqZRfesjdBRPwfm7qQGKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8738 Add ddr edac support for imx93. Signed-off-by: Frank Li --- arch/arm64/boot/dts/freescale/imx93.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts= /freescale/imx93.dtsi index 04b9b3d31f4fa..ea83e38ae4d88 100644 --- a/arch/arm64/boot/dts/freescale/imx93.dtsi +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi @@ -1326,6 +1326,14 @@ usbmisc2: usbmisc@4c200200 { #index-cells =3D <1>; }; =20 + memory-controller@4e300000 { + compatible =3D "nxp,imx9-memory-controller"; + reg =3D <0x4e300000 0x800>, <0x4e301000 0x1000>; + reg-names =3D "ctrl", "inject"; + interrupts =3D ; + little-endian; + }; + ddr-pmu@4e300dc0 { compatible =3D "fsl,imx93-ddr-pmu"; reg =3D <0x4e300dc0 0x200>; --=20 2.34.1