提交 65f80f58 编写于 作者: A Andre Przywara 提交者: Jagan Teki

sunxi: H6: DRAM: follow recommended PHY init algorithm

The DRAM controller manual suggests to first program the PHY
initialisation parameters to the PHY_PIR register, and then set bit 0 to
trigger the initialisation. This is also used in boot0.

Follow this recommendation by setting bit 0 in a separate step.
Signed-off-by: NAndre Przywara <andre.przywara@arm.com>
Tested-by: NJernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: NJernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: NJagan Teki <jagan@amarulasolutions.com>
上级 1a1d1df3
......@@ -75,12 +75,14 @@ static void mctl_core_init(struct dram_para *para)
mctl_channel_init(para);
}
/* PHY initialisation */
static void mctl_phy_pir_init(u32 val)
{
struct sunxi_mctl_phy_reg * const mctl_phy =
(struct sunxi_mctl_phy_reg *)SUNXI_DRAM_PHY0_BASE;
writel(val | BIT(0), &mctl_phy->pir);
writel(val, &mctl_phy->pir);
writel(val | BIT(0), &mctl_phy->pir); /* Start initialisation. */
mctl_await_completion(&mctl_phy->pgsr[0], BIT(0), BIT(0));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册