]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: Fix H616 DRAM read calibration for dual rank
authorJernej Skrabec <jernej.skrabec@gmail.com>
Sat, 29 Jan 2022 15:58:43 +0000 (16:58 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 30 Jan 2022 01:25:00 +0000 (01:25 +0000)
Although it isn't known what bit 0 in PHY reg 8 does, it's obvious that
it has to be set before read calibration and cleared afterwards. This is
already done for first rank, but not for second (copy & paste error.)

Fix it.

Fixes: f4317dbd06b6 ("sunxi: Add H616 DRAM support")
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/mach-sunxi/dram_sun50i_h616.c

index 76f520f4e78040e7a28b6c67ce417741aabd3304..83e8abc2f8d8953c5a2362a59aef0ab2d241b420 100644 (file)
@@ -360,7 +360,7 @@ static bool mctl_phy_read_calibration(struct dram_para *para)
                        }
                }
 
-               setbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 1);
+               clrbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 1);
        }
 
        clrbits_le32(SUNXI_DRAM_PHY0_BASE + 8, 0x30);