From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 04 Jun 2026 13:08:30 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wV5w6-002Fph-1S for lore@lore.pengutronix.de; Thu, 04 Jun 2026 13:08:30 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wV5w5-0000vD-QW for lore@pengutronix.de; Thu, 04 Jun 2026 13:08:30 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dwkRlqkBniinZm1cOLzLCsKn59l8kTCQNr7UBj+nm0o=; b=iiomPaORtznTE8GdtXGBpW8bTf 1nUgEqcaWmY3KIsdiafm0XezZkPR/PfDy4fDNa+R23vHmrMnWSbQEWgSllTtbTilZwqBXoqnKS7bJ IRBVDJwO16jkF8mO2Vs/19IH24Udk5vwrpfEzi1Ar/C7gQ0X8shuLCQsIjq1pzEVrWIE5BY1MHP1X 6p8bXm3VGdzWSqabw9YX+wSwdIdNmyvMBcFJ71zEMur54Xb2j/hlonXUYwqrPhBRKqbtxOVoaViwZ L8cxFdHzod/+f5FhHkjavrZaqVKJYfIrFXEQZasvEMQ2BkC16TvNSfuXFVWkxJlr4avnzyaeJYztv k7oBrP3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wV5ul-0000000GbzZ-3FU7; Thu, 04 Jun 2026 11:07:07 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wV5ue-0000000GbwV-2YzP for barebox@lists.infradead.org; Thu, 04 Jun 2026 11:07:06 +0000 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wV5uc-0000IX-BX; Thu, 04 Jun 2026 13:06:58 +0200 From: Michael Tretter Date: Thu, 04 Jun 2026 13:06:57 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260604-socfpga-axe5-sdram-init-v1-4-274f6361ce98@pengutronix.de> References: <20260604-socfpga-axe5-sdram-init-v1-0-274f6361ce98@pengutronix.de> In-Reply-To: <20260604-socfpga-axe5-sdram-init-v1-0-274f6361ce98@pengutronix.de> To: Sascha Hauer , BAREBOX Cc: Steffen Trumtrar , Michael Tretter X-Mailer: b4 0.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260604_040700_680719_19E403DA X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.0 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [PATCH 4/5] arm: socfpga: agilex5: drop dual port hack X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) On Agilex 5 with a firmware generated by Quartus 25.3, the dualport value in the handoff_table is correctly set to 0. In this case, the workaround is not necessary. If the Agilex 5 is configured with dual port DDR access, the hack is not correct either, because while the firmware is configured for dual port, barebox would incorrectly initialize the IOSSM controller. Remove the hack. If the dualport issues become apparent, either use this as a test case to fix dualport support correctly or implement a proper workaround with documentation and warning. Signed-off-by: Michael Tretter --- arch/arm/mach-socfpga/agilex5-sdram.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-socfpga/agilex5-sdram.c b/arch/arm/mach-socfpga/agilex5-sdram.c index 7a82dc6a6ad4..fa940958d104 100644 --- a/arch/arm/mach-socfpga/agilex5-sdram.c +++ b/arch/arm/mach-socfpga/agilex5-sdram.c @@ -94,14 +94,8 @@ static int populate_ddr_handoff(struct altera_sdram_plat *plat, struct io96b_inf /* Read handoff for DDR configuration */ socfpga_handoff_read((void *)SOC64_HANDOFF_SDRAM, handoff_table, len); - /* Read handoff - dual port - FIXME: Intel u-boot has a patch that HACKs this to 0 - https://github.com/altera-opensource/meta-intel-fpga-refdes/ \ - blob/master/recipes-bsp/u-boot/files/v1-0001-HSD-15015933655-ddr-altera-agilex5-Hack-dual-port-DO-NOT-MERGE.patch - Patch doesn't say why or what is broken here: handoff files? dualport RAM access? - */ - //plat->dualport = FIELD_GET(BIT(0), handoff_table[PORT_EMIF_CONFIG_OFFSET]); - plat->dualport = 0; + /* Read handoff - dual port */ + plat->dualport = FIELD_GET(BIT(0), handoff_table[PORT_EMIF_CONFIG_OFFSET]); pr_debug("%s: dualport from handoff: 0x%x\n", __func__, plat->dualport); if (plat->dualport) -- 2.47.3