]> code.ossystems Code Review - bsp/u-boot.git/commit
arm: mx6: ddr: fix cs0_end calculation
authorNikita Kiryanov <nikita@compulab.co.il>
Wed, 20 Aug 2014 12:08:58 +0000 (15:08 +0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 9 Sep 2014 15:30:36 +0000 (12:30 -0300)
commitb6faaf1f5e47c6a0f1ca2ad13e7762abe7230dca
treee2a2b1a1677461f549c79be09c7a65b0bb2fcd06
parent07917e7a25e2cf9c27173974d7e9379fd1e7ef0a
arm: mx6: ddr: fix cs0_end calculation

Current way of calculation CS0_END field for MMDCx_MDASP register
is problematic because in most cases the user is forced to define
cs_density in an unnatural way: as value - 2, instead of value.

This breaks the abstraction provided by struct mx6_ddr_sysinfo
because the user is forced to be aware of the way the calculation
is performed.

Refactor the calculation.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
arch/arm/cpu/armv7/mx6/ddr.c