summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-04-30 14:45:42 +0200
committerStefan Roese <sr@denx.de>2016-05-20 11:01:00 +0200
commit29b59353fe7cd62c74960b76e7b56bbc368429d2 (patch)
tree4fac9a8399e0a4610e7ff7d9d1897da9552363c0 /include
parent4b6e1fda107e5244e80ebc41865650ac2873dc88 (diff)
downloadblackbird-obmc-uboot-29b59353fe7cd62c74960b76e7b56bbc368429d2.tar.gz
blackbird-obmc-uboot-29b59353fe7cd62c74960b76e7b56bbc368429d2.zip
arm: mvebu: a38x: Weed out floating point use
For reason unknown, recently, the DDR init code writers are really fond of hiding some small floating point operating deep in their creations. This patch removes one from the Marvell A38x code. Instead of returning size of chip as float from ddr3_get_device_size() in GiB units, return it as int in MiB units. Since this would interfere with the huge switch code in ddr3_calc_mem_cs_size(), rework the code to match the change. Before this patch, the cs_mem_size variable could have these values: ( { 16, 32 } x { 8, 16 } x { 0.01, 0.5, 1, 2, 4, 8 } ) / 8 = { 0.000000, 0.001250, 0.002500, 0.005000, 0.062500, 0.125000, 0.250000, 0.500000, 1.000000, 2.000000, 4.000000, } The switch code checked for a subset of the resulting RAM sizes, which is in range 128 MiB ... 2048 MiB. With this patch, the cs_mem_size variable can have these values: ( { 16, 32 } x { 8, 16 } x { 0, 512, 1024, 2048, 4096, 8192 } ) / 8 = { 0, 64, 128, 256, 512, 1024, 2048, 4096 } To retain previous behavior, filter out 0 MiB (invalid size), 64 MiB and 4096 MiB options. Removing the floating point stuff also saves 1.5k from text segment: clearfog : spl/u-boot-spl:all -1592 spl/u-boot-spl:text -1592 Signed-off-by: Marek Vasut <marex@denx.de> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud