sunxi: fix DRAM gate/reset sequence of H6
authorIcenowy Zheng <icenowy@aosc.io>
Sat, 6 Oct 2018 15:23:32 +0000 (23:23 +0800)
committerJagan Teki <jagan@amarulasolutions.com>
Wed, 10 Oct 2018 06:34:07 +0000 (12:04 +0530)
commit90de3969be48924114f2d725923e12f32bf7796e
treedadc24e75dfbce9b3b312cb4f3c6f7779041835f
parent0a60a81ba3860946551cb79aa6486aa076e357f3
sunxi: fix DRAM gate/reset sequence of H6

Currently the DRAM bus gate and reset is changed at the same time in
H6 DRAM initialization code, which disobeys the user manual's
programming guide.

Fix the sequence by follow the sequence suggested by the user manual
(ungate the bus clock after release the reset signal).

By some experiments it seems to fix the DRAM size detection failure that
rarely happens.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/mach-sunxi/dram_sun50i_h6.c