* [U-Boot] [PATCH 1/1] MPC8541/MPC8555: Enable SS_EN in DDR_SDRAM_CLK_CNLT register
@ 2015-02-13 18:57 Curt Brune
2015-02-13 19:01 ` York Sun
2015-04-20 20:56 ` York Sun
0 siblings, 2 replies; 3+ messages in thread
From: Curt Brune @ 2015-02-13 18:57 UTC (permalink / raw)
To: u-boot
According to the MPC8555/MPC8541 reference manual the SS_EN (source
synchronous enable) bit in the DDR_SDRAM_CLK_CNLT register must be set
during initialization.
From section 9.4.1.8 of that manual:
Source synchronous enable. This bit field must be set during
initialization. See Section 9.6.1, "DDR SDRAM Initialization
Sequence," details.
0 - Reserved
1 - The address and command are sent to the DDR SDRAMs source
synchronously.
In addition, Freescale application note AN2805 is also very clear that
this bit must be set.
This patch reverts a change introduced by commit
457caecdbca3df21a93abff19eab12dbc61b7897.
Testing Done:
Compiled targets CONFIG_TARGET_MPC8555CDS and CONFIG_TARGET_MPC8541CDS
and inspected the generated assembly code to verify the SS_EN bit was being
set. There is one extra instruction emitted:
fff9b774: 65 29 80 00 oris r9,r9,32768
Compiled the CONFIG_TARGET_MPC8548CDS target and verified that no
additional instructions were emitted related to this patch.
Booted an image on a MPC8541 based board successfully.
Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
---
drivers/ddr/fsl/ctrl_regs.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/ddr/fsl/ctrl_regs.c b/drivers/ddr/fsl/ctrl_regs.c
index 03d7ff1..6bdc47e 100644
--- a/drivers/ddr/fsl/ctrl_regs.c
+++ b/drivers/ddr/fsl/ctrl_regs.c
@@ -1730,13 +1730,21 @@ static void set_ddr_data_init(fsl_ddr_cfg_regs_t *ddr)
*/
static void set_ddr_sdram_clk_cntl(fsl_ddr_cfg_regs_t *ddr,
const memctl_options_t *popts)
{
unsigned int clk_adjust; /* Clock adjust */
+ unsigned int ss_en = 0; /* Source synchronous enable */
+#if defined(CONFIG_MPC8541) || defined(CONFIG_MPC8555)
+ /* Per FSL Application Note: AN2805 */
+ ss_en = 1;
+#endif
clk_adjust = popts->clk_adjust;
- ddr->ddr_sdram_clk_cntl = (clk_adjust & 0xF) << 23;
+ ddr->ddr_sdram_clk_cntl = (0
+ | ((ss_en & 0x1) << 31)
+ | ((clk_adjust & 0xF) << 23)
+ );
debug("FSLDDR: clk_cntl = 0x%08x\n", ddr->ddr_sdram_clk_cntl);
}
/* DDR Initialization Address (DDR_INIT_ADDR) */
static void set_ddr_init_addr(fsl_ddr_cfg_regs_t *ddr)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH 1/1] MPC8541/MPC8555: Enable SS_EN in DDR_SDRAM_CLK_CNLT register
2015-02-13 18:57 [U-Boot] [PATCH 1/1] MPC8541/MPC8555: Enable SS_EN in DDR_SDRAM_CLK_CNLT register Curt Brune
@ 2015-02-13 19:01 ` York Sun
2015-04-20 20:56 ` York Sun
1 sibling, 0 replies; 3+ messages in thread
From: York Sun @ 2015-02-13 19:01 UTC (permalink / raw)
To: u-boot
On 02/13/2015 12:57 PM, Curt Brune wrote:
> According to the MPC8555/MPC8541 reference manual the SS_EN (source
> synchronous enable) bit in the DDR_SDRAM_CLK_CNLT register must be set
> during initialization.
>
> From section 9.4.1.8 of that manual:
>
> Source synchronous enable. This bit field must be set during
> initialization. See Section 9.6.1, "DDR SDRAM Initialization
> Sequence," details.
>
> 0 - Reserved
> 1 - The address and command are sent to the DDR SDRAMs source
> synchronously.
>
> In addition, Freescale application note AN2805 is also very clear that
> this bit must be set.
>
> This patch reverts a change introduced by commit
> 457caecdbca3df21a93abff19eab12dbc61b7897.
>
> Testing Done:
>
> Compiled targets CONFIG_TARGET_MPC8555CDS and CONFIG_TARGET_MPC8541CDS
> and inspected the generated assembly code to verify the SS_EN bit was being
> set. There is one extra instruction emitted:
>
> fff9b774: 65 29 80 00 oris r9,r9,32768
>
> Compiled the CONFIG_TARGET_MPC8548CDS target and verified that no
> additional instructions were emitted related to this patch.
>
> Booted an image on a MPC8541 based board successfully.
>
> Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
> ---
Thanks for fixing this.
York
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH 1/1] MPC8541/MPC8555: Enable SS_EN in DDR_SDRAM_CLK_CNLT register
2015-02-13 18:57 [U-Boot] [PATCH 1/1] MPC8541/MPC8555: Enable SS_EN in DDR_SDRAM_CLK_CNLT register Curt Brune
2015-02-13 19:01 ` York Sun
@ 2015-04-20 20:56 ` York Sun
1 sibling, 0 replies; 3+ messages in thread
From: York Sun @ 2015-04-20 20:56 UTC (permalink / raw)
To: u-boot
On 02/13/2015 10:57 AM, Curt Brune wrote:
> According to the MPC8555/MPC8541 reference manual the SS_EN (source
> synchronous enable) bit in the DDR_SDRAM_CLK_CNLT register must be set
> during initialization.
>
> From section 9.4.1.8 of that manual:
>
> Source synchronous enable. This bit field must be set during
> initialization. See Section 9.6.1, "DDR SDRAM Initialization
> Sequence," details.
>
> 0 - Reserved
> 1 - The address and command are sent to the DDR SDRAMs source
> synchronously.
>
> In addition, Freescale application note AN2805 is also very clear that
> this bit must be set.
>
> This patch reverts a change introduced by commit
> 457caecdbca3df21a93abff19eab12dbc61b7897.
>
> Testing Done:
>
> Compiled targets CONFIG_TARGET_MPC8555CDS and CONFIG_TARGET_MPC8541CDS
> and inspected the generated assembly code to verify the SS_EN bit was being
> set. There is one extra instruction emitted:
>
> fff9b774: 65 29 80 00 oris r9,r9,32768
>
> Compiled the CONFIG_TARGET_MPC8548CDS target and verified that no
> additional instructions were emitted related to this patch.
>
> Booted an image on a MPC8541 based board successfully.
>
> Signed-off-by: Curt Brune <curt@cumulusnetworks.com>
> ---
Applied to mpc85xx master, awaiting upstream.
York
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-20 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 18:57 [U-Boot] [PATCH 1/1] MPC8541/MPC8555: Enable SS_EN in DDR_SDRAM_CLK_CNLT register Curt Brune
2015-02-13 19:01 ` York Sun
2015-04-20 20:56 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox