u-boot-brain/arch/arm/cpu/armv7/sunxi
Siarhei Siamashka 1a9717cbb3 sunxi: dram: Configurable MBUS clock speed (use PLL5 or PLL6)
The sun5i hardware (Allwinner A13) introduced configurable MBUS clock
speed. Allwinner A13 uses only 16-bit data bus width to connect the
external DRAM, which is halved compared to the 32-bit data bus of sun4i
(Allwinner A10), so it does not make much sense to clock a wider
internal bus at a very high speed. The Allwinner A13 manual specifies
300 MHz MBUS clock speed limit and 533 MHz DRAM clock speed limit. Newer
sun7i hardware (Allwinner A20) has a full width 32-bit external memory
interface again, but still keeps the MBUS clock speed configurable.
Clocking MBUS too low inhibits memory performance and one has to find
the optimal MBUS/DRAM clock speed ratio, which may depend on many
factors:
    http://linux-sunxi.org/A10_DRAM_Controller_Performance

This patch introduces a new 'mbus_clock' parameter for the 'dram_para'
struct and uses it as a desired MBUS clock speed target. If 'mbus_clock'
is not set, 300 MHz is used by default to match the older hardcoded
settings.

PLL5P and PLL6 are both evaluated as possible clock sources. Preferring
the one, which can provide higher clock frequency that is lower or
equal to the 'mbus_clock' target. In the case of a tie, PLL5P has
higher priority.

Attempting to set the MBUS clock speed has no effect on sun4i, but does
no harm either.

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:33 +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: Configurable MBUS clock speed (use PLL5 or PLL6) 2014-08-12 08:42:33 +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