u-boot-brain/arch/arm/cpu/armv7/sunxi
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
..
board.c sunxi: Add CONFIG_MACPWR option 2014-07-31 15:37:23 +02:00
clock_sun4i.c ahci: provide sunxi SATA driver using AHCI platform framework 2014-07-31 15:37:22 +02:00
clock.c sunxi: add sun7i clocks and timer support. 2014-05-25 16:12:12 +02:00
config.mk sunxi: non-FEL SPL boot support for sun7i 2014-05-25 16:31:03 +02:00
cpu_info.c sunxi: Add sun5i support 2014-07-06 20:12:44 +01:00
dram.c sunxi: dram: Remove broken super-standby remnants 2014-08-12 08:42:32 +02:00
Makefile sunxi: HYP/non-sec: add sun7i PSCI backend 2014-07-31 15:37:24 +02:00
pinmux.c sunxi: add sun7i pinmux and gpio support 2014-05-25 16:12:21 +02:00
psci.S sunxi: HYP/non-sec: add sun7i PSCI backend 2014-07-31 15:37:24 +02:00
start.c sunxi: add sun7i cpu, board and start of day support 2014-05-25 16:12:40 +02:00
timer.c sunxi: add sun7i clocks and timer support. 2014-05-25 16:12:12 +02:00
u-boot-spl-fel.lds sunxi: Add i2c support 2014-07-18 19:41:30 +01:00
u-boot-spl.lds sunxi: Add i2c support 2014-07-18 19:41:30 +01:00