From nobody Thu Dec 18 22:26:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1534426643250705.7956613211919; Thu, 16 Aug 2018 06:37:23 -0700 (PDT) Received: from localhost ([::1]:55658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqISo-0003QS-26 for importer@patchew.org; Thu, 16 Aug 2018 09:37:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqIQd-0000ct-H9 for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:35:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqIQc-00020p-P5 for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:35:07 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:44470) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fqIQc-00020P-He for qemu-devel@nongnu.org; Thu, 16 Aug 2018 09:35:06 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fqIQb-000092-KC for qemu-devel@nongnu.org; Thu, 16 Aug 2018 14:35:05 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 16 Aug 2018 14:34:29 +0100 Message-Id: <20180816133438.17061-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180816133438.17061-1-peter.maydell@linaro.org> References: <20180816133438.17061-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 21/30] aspeed_sdmc: Init status always idle X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 From: Joel Stanley The ast2500 SDRAM training routine busy waits on the 'init cycle busy state' bit in DDR PHY Control/Status register #1 (MCR60). This ensures the bit always reads zero, and allows training to complete with upstream u-boot on the ast2500-evb. Signed-off-by: Joel Stanley Reviewed-by: C=C3=A9dric Le Goater Tested-by: C=C3=A9dric Le Goater Message-id: 20180807075757.7242-5-joel@jms.id.au Signed-off-by: Peter Maydell --- hw/misc/aspeed_sdmc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c index 9ece545c4ff..522e01ef8c0 100644 --- a/hw/misc/aspeed_sdmc.c +++ b/hw/misc/aspeed_sdmc.c @@ -23,6 +23,10 @@ /* Configuration Register */ #define R_CONF (0x04 / 4) =20 +/* Control/Status Register #1 (ast2500) */ +#define R_STATUS1 (0x60 / 4) +#define PHY_BUSY_STATE BIT(0) + /* * Configuration register Ox4 (for Aspeed AST2400 SOC) * @@ -137,6 +141,17 @@ static void aspeed_sdmc_write(void *opaque, hwaddr add= r, uint64_t data, g_assert_not_reached(); } } + if (s->silicon_rev =3D=3D AST2500_A0_SILICON_REV || + s->silicon_rev =3D=3D AST2500_A1_SILICON_REV) { + switch (addr) { + case R_STATUS1: + /* Will never return 'busy' */ + data &=3D ~PHY_BUSY_STATE; + break; + default: + break; + } + } =20 s->regs[addr] =3D data; } --=20 2.18.0