Skip to content

Commit fd94b1c

Browse files
committed
Merge branch 'linux-5.15-trunk/at91/pm' into linux-5.15-mchp
2 parents 6daf99a + 4de1ad2 commit fd94b1c

2 files changed

Lines changed: 19 additions & 40 deletions

File tree

arch/arm/mach-at91/pm_suspend.S

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -193,27 +193,16 @@ sr_ena_2:
193193
/* Put DDR PHY's DLL in bypass mode for non-backup modes. */
194194
cmp r7, #AT91_PM_BACKUP
195195
beq sr_ena_3
196-
ldr tmp1, [r3, #DDR3PHY_PIR]
197-
orr tmp1, tmp1, #DDR3PHY_PIR_DLLBYP
198-
str tmp1, [r3, #DDR3PHY_PIR]
196+
197+
ldr tmp1, [r3, #DDR3PHY_DX0DLLCR]
198+
orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS
199+
str tmp1, [r3, #DDR3PHY_DX0DLLCR]
200+
201+
ldr tmp1, [r3, #DDR3PHY_DX1DLLCR]
202+
orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS
203+
str tmp1, [r3, #DDR3PHY_DX1DLLCR]
199204

200205
sr_ena_3:
201-
/* Power down DDR PHY data receivers. */
202-
ldr tmp1, [r3, #DDR3PHY_DXCCR]
203-
orr tmp1, tmp1, #DDR3PHY_DXCCR_DXPDR
204-
str tmp1, [r3, #DDR3PHY_DXCCR]
205-
206-
/* Power down ADDR/CMD IO. */
207-
ldr tmp1, [r3, #DDR3PHY_ACIOCR]
208-
orr tmp1, tmp1, #DDR3PHY_ACIORC_ACPDD
209-
orr tmp1, tmp1, #DDR3PHY_ACIOCR_CKPDD_CK0
210-
orr tmp1, tmp1, #DDR3PHY_ACIOCR_CSPDD_CS0
211-
str tmp1, [r3, #DDR3PHY_ACIOCR]
212-
213-
/* Power down ODT. */
214-
ldr tmp1, [r3, #DDR3PHY_DSGCR]
215-
orr tmp1, tmp1, #DDR3PHY_DSGCR_ODTPDD_ODT0
216-
str tmp1, [r3, #DDR3PHY_DSGCR]
217206
.endm
218207

219208
/**
@@ -225,27 +214,13 @@ sr_ena_3:
225214
ldr r2, .sramc_base
226215
ldr r3, .sramc_phy_base
227216

228-
/* Power up DDR PHY data receivers. */
229-
ldr tmp1, [r3, #DDR3PHY_DXCCR]
230-
bic tmp1, tmp1, #DDR3PHY_DXCCR_DXPDR
231-
str tmp1, [r3, #DDR3PHY_DXCCR]
232-
233-
/* Power up the output of CK and CS pins. */
234-
ldr tmp1, [r3, #DDR3PHY_ACIOCR]
235-
bic tmp1, tmp1, #DDR3PHY_ACIORC_ACPDD
236-
bic tmp1, tmp1, #DDR3PHY_ACIOCR_CKPDD_CK0
237-
bic tmp1, tmp1, #DDR3PHY_ACIOCR_CSPDD_CS0
238-
str tmp1, [r3, #DDR3PHY_ACIOCR]
239-
240-
/* Power up ODT. */
241-
ldr tmp1, [r3, #DDR3PHY_DSGCR]
242-
bic tmp1, tmp1, #DDR3PHY_DSGCR_ODTPDD_ODT0
243-
str tmp1, [r3, #DDR3PHY_DSGCR]
244-
245-
/* Take DDR PHY's DLL out of bypass mode. */
246-
ldr tmp1, [r3, #DDR3PHY_PIR]
247-
bic tmp1, tmp1, #DDR3PHY_PIR_DLLBYP
248-
str tmp1, [r3, #DDR3PHY_PIR]
217+
ldr tmp1, [r3, #DDR3PHY_DX0DLLCR]
218+
bic tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS
219+
str tmp1, [r3, #DDR3PHY_DX0DLLCR]
220+
221+
ldr tmp1, [r3, #DDR3PHY_DX1DLLCR]
222+
bic tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS
223+
str tmp1, [r3, #DDR3PHY_DX1DLLCR]
249224

250225
/* Enable quasi-dynamic programming. */
251226
mov tmp1, #0

include/soc/at91/sama7-ddr.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939

4040
#define DDR3PHY_ZQ0SR0 (0x188) /* ZQ status register 0 */
4141

42+
#define DDR3PHY_DX0DLLCR (0x1CC) /* DDR3PHY DATX8 DLL Control Register */
43+
#define DDR3PHY_DX1DLLCR (0x20C) /* DDR3PHY DATX8 DLL Control Register */
44+
#define DDR3PHY_DXDLLCR_DLLDIS (1 << 31) /* DLL Disable */
45+
4246
/* UDDRC */
4347
#define UDDRC_STAT (0x04) /* UDDRC Operating Mode Status Register */
4448
#define UDDRC_STAT_SELFREF_TYPE_DIS (0x0 << 4) /* SDRAM is not in Self-refresh */

0 commit comments

Comments
 (0)