Skip to content

Commit cef8cdc

Browse files
committed
ARM: at91: pm: avoid soft resetting AC DLL
Do not soft reset AC DLL as controller is buggy and this operation my introduce glitches in the controller leading to undefined behavior. Fixes: f0bbf17 ("ARM: at91: pm: add self-refresh support for sama7g5") Depends-on: a02875c ("ARM: at91: pm: fix self-refresh for sama7g5") Signed-off-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 0873509 commit cef8cdc

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

arch/arm/mach-at91/pm_suspend.S

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,15 @@ sr_ena_2:
169169
cmp tmp1, #UDDRC_STAT_SELFREF_TYPE_SW
170170
bne sr_ena_2
171171

172-
/* Put DDR PHY's DLL in bypass mode for non-backup modes. */
172+
/* Disable DX DLLs for non-backup modes. */
173173
cmp r7, #AT91_PM_BACKUP
174174
beq sr_ena_3
175175

176+
/* Do not soft reset the AC DLL. */
177+
ldr tmp1, [r3, DDR3PHY_ACDLLCR]
178+
bic tmp1, tmp1, DDR3PHY_ACDLLCR_DLLSRST
179+
str tmp1, [r3, DDR3PHY_ACDLLCR]
180+
176181
/* Disable DX DLLs. */
177182
ldr tmp1, [r3, #DDR3PHY_DX0DLLCR]
178183
orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS

include/soc/at91/sama7-ddr.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
#define DDR3PHY_PGSR (0x0C) /* DDR3PHY PHY General Status Register */
2727
#define DDR3PHY_PGSR_IDONE (1 << 0) /* Initialization Done */
2828

29-
#define DDR3PHY_ACIOCR (0x24) /* DDR3PHY AC I/O Configuration Register */
29+
#define DDR3PHY_ACDLLCR (0x14) /* DDR3PHY AC DLL Control Register */
30+
#define DDR3PHY_ACDLLCR_DLLSRST (1 << 30) /* DLL Soft Reset */
31+
32+
#define DDR3PHY_ACIOCR (0x24) /* DDR3PHY AC I/O Configuration Register */
3033
#define DDR3PHY_ACIOCR_CSPDD_CS0 (1 << 18) /* CS#[0] Power Down Driver */
3134
#define DDR3PHY_ACIOCR_CKPDD_CK0 (1 << 8) /* CK[0] Power Down Driver */
3235
#define DDR3PHY_ACIORC_ACPDD (1 << 3) /* AC Power Down Driver */

0 commit comments

Comments
 (0)