Skip to content
Snippets Groups Projects
Commit abbe536e authored by Matthew McClintock's avatar Matthew McClintock Committed by Andy Fleming
Browse files

powerpc/p1010rdb: nandboot: compare SVR properly


We were not comparing the SVRs properly previously. This comparison
will properly shift the SVR and mask off the E bit

This fixes the boot output to show the correct DDR bus width:

512 MiB (DDR3, 16-bit, CL=5, ECC off)

instead of

512 MiB (DDR3, 32-bit, CL=5, ECC off)

Signed-off-by: default avatarMatthew McClintock <msm@freescale.com>
Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
parent c8f9802a
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ unsigned long ddr_freq_mhz;
void sdram_init(void)
{
ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC85xx_DDR_ADDR;
u32 svr = mfspr(SPRN_SVR);
/* mask off E bit */
u32 svr = SVR_SOC_VER(mfspr(SPRN_SVR));
out_be32(&ddr->sdram_cfg, CONFIG_SYS_DDR_CONTROL | SDRAM_CFG_32_BE);
out_be32(&ddr->cs0_bnds, CONFIG_SYS_DDR_CS0_BNDS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment