Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C8E0C433FE for ; Wed, 23 Nov 2022 14:12:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 701B2851F5; Wed, 23 Nov 2022 15:12:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="hInN53/t"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 062F9852EC; Wed, 23 Nov 2022 15:12:23 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 58383851CB for ; Wed, 23 Nov 2022 15:12:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669212740; x=1700748740; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tA0E/JQy0vnLnKLwhFyvMhL4SpmWd9gIzwDS1gvPd9k=; b=hInN53/tWFxJB0jPkiovKLJNyfC6SDnTLUaiJI5oK/Oag7txUMhh2Jbg MgxJUABpycCdWVbH5/uQ+6szNJoaEgp91hEZ0kaatKmgJ9HjToKmn4N5w J9f3/fi1X4kx2+bnmTOyWBNJ/KjfTNDU69Ca18/e7Vl75jrgcSTcziFKq 9vBztTXoCqx34Acsj+Oh6FoIuTTdiW+JFNS3u76DloanfC5Ulbi7KS1qg JCQaZnYZoSVVjNPpcfp1PvA2kkJ/mN/ya6DGyApme6ps9pfaq7dLn8bZ/ WBNgfbb+BGEBHD614kizQsch0MyH3hscCoz6PTHk+RHTHpzypxeD9sBAL g==; X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="297432987" X-IronPort-AV: E=Sophos;i="5.96,187,1665471600"; d="scan'208";a="297432987" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2022 06:12:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="784258703" X-IronPort-AV: E=Sophos;i="5.96,187,1665471600"; d="scan'208";a="784258703" Received: from pglmail07.png.intel.com ([10.221.193.207]) by fmsmga001.fm.intel.com with ESMTP; 23 Nov 2022 06:12:14 -0800 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id C58A7482B; Wed, 23 Nov 2022 22:12:13 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 90F83E0095B; Wed, 23 Nov 2022 22:12:13 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang Subject: [PATCH] arm: socfpga: Define the usage of boot scratch cold reg 8 Date: Wed, 23 Nov 2022 22:12:12 +0800 Message-Id: <20221123141212.21737-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean From: Tien Fong Chee The boot scratch cold reg 8 is shared between DBE, DDR init progress update and Linux EDAC. This patch defines how the bits are used by respective features above and their macro names used in U-Boot. Signed-off-by: Tien Fong Chee Signed-off-by: Jit Loon Lim --- .../include/mach/system_manager_soc64.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h b/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h index c2d1f8e4b9..4441649a31 100644 --- a/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h +++ b/arch/arm/mach-socfpga/include/mach/system_manager_soc64.h @@ -102,6 +102,19 @@ void populate_sysmgr_pinmux(void); #define ALT_SYSMGR_SCRATCH_REG_0_DDR_RESET_TYPE_MASK GENMASK(30, 28) #define ALT_SYSMGR_SCRATCH_REG_0_DDR_RESET_TYPE_SHIFT 28 +/* + * Bits for SYSMGR_SOC64_BOOT_SCRATCH_COLD8 + * Bit[31] reserved for FSBL to check DBE is triggered (set by SDM to "1") ? + * + * Bit[30] reserved for FSBL to update the DDR init progress + * 1 - means in progress, 0 - haven't started / DDR is up running. + * + * Bit[17:1] - Setting by Linux EDAC. + * Bit[1](ECC_OCRAM), Bit[16](ECC_DDR0), Bit[17](ECC_DDR1) + */ +#define ALT_SYSMGR_SCRATCH_REG_8_DDR_DBE_MASK BIT(31) +#define ALT_SYSMGR_SCRATCH_REG_8_DDR_PROGRESS_MASK BIT(30) + #define SYSMGR_SDMMC SYSMGR_SOC64_SDMMC #define SYSMGR_ROMCODEGRP_CTRL_WARMRSTCFGPINMUX BIT(0) -- 2.26.2