arm: mx6: ddr: fix cs0_end calculation
authorNikita Kiryanov <nikita@compulab.co.il>
Wed, 20 Aug 2014 12:08:58 +0000 (15:08 +0300)
committerStefano Babic <sbabic@denx.de>
Tue, 9 Sep 2014 13:35:00 +0000 (15:35 +0200)
commit07ee927d2c319b477232affad7d3b6119ac079c9
tree937f9fb2cbf4f48d55e47cca4aead70f40daeaa5
parent08155289a453acee836179553131e9d51ab02a52
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