Skip to contentSkip to conversation

ddr: altera: Add delay before writing to MBRDADDR register

PATCH In review Boon Khai Ng 2 participants 2 messages Feb 25 – Apr 14

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ddr: altera: Add delay before writing to MBRDADDR register

From: Alif Zakuan Yuslaimi <[email protected]>

Add a delay of 1ms before writing the address of the data for HIP interface into the Responder Mailbox Read Address Register.

The UIBSSM mailbox require some time to settle down while waiting for the MBRDADATA_VALID bit to become 1 without this delay, specifically the board will timeout while waiting for MBRDDATA_VALID bit to 1 after setting to 1.

This 1ms delay has been tested thoroughly and no intermittent issues with UIBSSM mailbox communication is observed.

---
 drivers/ddr/altera/uibssm_mailbox.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/ddr/altera/uibssm_mailbox.c +2 -0
index deef61f1178..2316e602d3a 100644
@@ -243,6 +243,8 @@ static u32 uib_mailbox_read_request(u32 target_read_addr, phys_addr_t csr_addr)
 		hang();
 	}
 
+	mdelay(1);
+
 	/* Write <target read address> to chms0034 MBRDADDR */
 	debug("%s: #2 Write 0x%x to UIB_R_MBRDADDR\n", __func__, target_read_addr);
 	writel(target_read_addr, csr_addr + UIB_R_MBRDADDR);
Signature · 1 line
2.43.7
Acked-by on v1 1/1
#1 lore raw
Quoted 39 lines

From: Ng, Boon Khai <[email protected]>
Sent: Wednesday, February 25, 2026 4:42 PM
To: U-boot Openlist <[email protected]>
Cc: Yuslaimi, Alif Zakuan <[email protected]>; Ng, Boon Khai <[email protected]>; Marek Vasut <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>; Tingting Meng <[email protected]>; Tom Rini <[email protected]>; Maniyam, Dinesh <[email protected]>; Lok, Chen Huei <[email protected]>; Hea, Kok Kiang <[email protected]>
Subject: [PATCH v1] ddr: altera: Add delay before writing to MBRDADDR register
From: Alif Zakuan Yuslaimi <[email protected]>
Add a delay of 1ms before writing the address of the data for HIP interface into the Responder Mailbox Read Address Register.
The UIBSSM mailbox require some time to settle down while waiting for the MBRDADATA_VALID bit to become 1 without this delay, specifically the board will timeout while waiting for MBRDDATA_VALID bit to 1 after setting to 1.
This 1ms delay has been tested thoroughly and no intermittent issues with UIBSSM mailbox communication is observed.

---
 drivers/ddr/altera/uibssm_mailbox.c | 2 ++

 1 file changed, 2 insertions(+)
drivers/ddr/altera/uibssm_mailbox.c +2 -0
index deef61f1178..2316e602d3a 100644
@@ -243,6 +243,8 @@ static u32 uib_mailbox_read_request(u32 target_read_addr,
 phys_addr_t csr_addr)
                  hang();
          }
+       mdelay(1);
+
          /* Write <target read address> to chms0034 MBRDADDR */
          debug("%s: #2 Write 0x%x to UIB_R_MBRDADDR\n", __func__,
          target_read_addr);
Quoted 3 lines

         writel(target_read_addr, csr_addr + UIB_R_MBRDADDR); --
2.43.7

Best regards,
Tien Fong