u-boot-brain/arch
Siarhei Siamashka f257796773 sunxi: dram: Remove broken super-standby remnants
If the dram->ppwrsctl (SDR_DPCR) register has the lowest bit set to 1,
this means that DRAM is currently in self-refresh mode and retaining the
old data. Since we have no idea what to do in this situation yet, just
set this register to 0 and initialize DRAM in the same way as on any
normal reboot (discarding whatever was stored there).

This part of code was apparently used by the Allwinner boot0 bootloader
to handle resume from the so-called super-standby mode. But this
particular code got somehow mangled on the way from the boot0 bootloader
to the u-boot-sunxi bootloader and has no chance of doing anything even
remotely sane. For example:
1. in the original boot0 code we had "mctl_write_w(SDR_DPCR,
   0x16510000)" (write to the register) and in the u-boot it now looks
   like "setbits_le32(&dram->ppwrsctl, 0x16510000)" (set bits in the
   register)
2. in the original boot0 code it was issuing three commands "0x12, 0x17,
   0x13" (Self-Refresh entry, Self-Refresh exit, Refresh), but in the
   u-boot they have become "0x12, 0x12, 0x13" (Self-Refresh entry,
   Self-Refresh entry, Refresh)

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-08-12 08:42:32 +02:00
..
arc kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
arm sunxi: dram: Remove broken super-standby remnants 2014-08-12 08:42:32 +02:00
avr32 kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
blackfin kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
m68k kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
microblaze kconfig: add board Kconfig and defconfig files 2014-07-30 08:48:01 -04:00
mips kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
nds32 kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
nios2 kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
openrisc kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
powerpc Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2014-08-06 08:38:18 -04:00
sandbox kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
sh kconfig: add board Kconfig and defconfig files 2014-07-30 08:48:01 -04:00
sparc kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
x86 kconfig: delete redundant CONFIG_${ARCH} definition 2014-07-30 14:42:02 -04:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig kconfig: add basic Kconfig files 2014-07-30 08:48:02 -04:00