提交 9e770f77 编写于 作者: M Mike Frysinger

Blackfin: dpmc: optimize SDRAM programming slightly

No need to reload these registers constantly since they're always
available (we're not making any function calls in between).
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
上级 da31d6fb
...@@ -196,21 +196,20 @@ ENTRY(_set_dram_srfs) ...@@ -196,21 +196,20 @@ ENTRY(_set_dram_srfs)
#else /* SDRAM */ #else /* SDRAM */
P0.L = lo(EBIU_SDGCTL); P0.L = lo(EBIU_SDGCTL);
P0.H = hi(EBIU_SDGCTL); P0.H = hi(EBIU_SDGCTL);
P1.L = lo(EBIU_SDSTAT);
P1.H = hi(EBIU_SDSTAT);
R2 = [P0]; R2 = [P0];
BITSET(R2, 24); /* SRFS enter self-refresh mode */ BITSET(R2, 24); /* SRFS enter self-refresh mode */
[P0] = R2; [P0] = R2;
SSYNC; SSYNC;
P0.L = lo(EBIU_SDSTAT);
P0.H = hi(EBIU_SDSTAT);
1: 1:
R2 = w[P0]; R2 = w[P1];
SSYNC; SSYNC;
cc = BITTST(R2, 1); /* SDSRA poll self-refresh status */ cc = BITTST(R2, 1); /* SDSRA poll self-refresh status */
if !cc jump 1b; if !cc jump 1b;
P0.L = lo(EBIU_SDGCTL);
P0.H = hi(EBIU_SDGCTL);
R2 = [P0]; R2 = [P0];
BITCLR(R2, 0); /* SCTLE disable CLKOUT */ BITCLR(R2, 0); /* SCTLE disable CLKOUT */
[P0] = R2; [P0] = R2;
...@@ -220,6 +219,7 @@ ENDPROC(_set_dram_srfs) ...@@ -220,6 +219,7 @@ ENDPROC(_set_dram_srfs)
ENTRY(_unset_dram_srfs) ENTRY(_unset_dram_srfs)
/* set the dram out of self refresh mode */ /* set the dram out of self refresh mode */
#if defined(EBIU_RSTCTL) /* DDR */ #if defined(EBIU_RSTCTL) /* DDR */
P0.H = hi(EBIU_RSTCTL); P0.H = hi(EBIU_RSTCTL);
P0.L = lo(EBIU_RSTCTL); P0.L = lo(EBIU_RSTCTL);
...@@ -227,20 +227,21 @@ ENTRY(_unset_dram_srfs) ...@@ -227,20 +227,21 @@ ENTRY(_unset_dram_srfs)
BITCLR(R2, 3); /* clear SRREQ bit */ BITCLR(R2, 3); /* clear SRREQ bit */
[P0] = R2; [P0] = R2;
#elif defined(EBIU_SDGCTL) /* SDRAM */ #elif defined(EBIU_SDGCTL) /* SDRAM */
/* release CLKOUT from self-refresh */
P0.L = lo(EBIU_SDGCTL); /* release CLKOUT from self-refresh */ P0.L = lo(EBIU_SDGCTL);
P0.H = hi(EBIU_SDGCTL); P0.H = hi(EBIU_SDGCTL);
R2 = [P0]; R2 = [P0];
BITSET(R2, 0); /* SCTLE enable CLKOUT */ BITSET(R2, 0); /* SCTLE enable CLKOUT */
[P0] = R2 [P0] = R2
SSYNC; SSYNC;
P0.L = lo(EBIU_SDGCTL); /* release SDRAM from self-refresh */ /* release SDRAM from self-refresh */
P0.H = hi(EBIU_SDGCTL);
R2 = [P0]; R2 = [P0];
BITCLR(R2, 24); /* clear SRFS bit */ BITCLR(R2, 24); /* clear SRFS bit */
[P0] = R2 [P0] = R2
#endif #endif
SSYNC; SSYNC;
RTS; RTS;
ENDPROC(_unset_dram_srfs) ENDPROC(_unset_dram_srfs)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册