]> git.baikalelectronics.ru Git - uboot.git/commit
ram: rk3399: Compute stride for 2 channels
authorJagan Teki <jagan@amarulasolutions.com>
Mon, 15 Jul 2019 18:28:52 +0000 (23:58 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 19 Jul 2019 03:11:10 +0000 (11:11 +0800)
commita509bec9f9ea1d1ddfa13593eb6e0f3e9c2f3923
tree4c4ae0e81862e2fe4d635b345e3e6b1d69822837
parent29ab32bb1679e0b30d6bdfe21f00732de887a137
ram: rk3399: Compute stride for 2 channels

stride value from sdram timings can be computed dynamically
based on the determined capacity for the given channel.

Right now these stride values are taken as part of sdram timings
via dtsi, but it possible to use same timings dtsi for given
frequency even though the configured board sdram do support
single channel with different size by dynamically detect the
stride value.

Example, NanoPi NEO4 do have DDR3-1866, but with single channel
and 1GB size with dynamic stride detection it is possible to
use existing rk3399-sdram-ddr3-1866.dtsi whose stride,
number of channels and capacity it support is d efferent.

So, add initial support to calculate the stride value for
2 channels sdram, which is available by default on existing
boards.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>
drivers/ram/rockchip/sdram_rk3399.c