uboot/drivers
Marek Vasut 29b59353fe 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>
2016-05-20 11:01:00 +02:00
..
adc
bios_emulator Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
block dm: blk: Add functions to select a hardware partition 2016-05-17 09:54:43 -06:00
bootcount bootcounter_ram: Flush dcache after data is written into SDRAM 2016-04-11 20:48:25 -04:00
clk clk: uniphier: add Media I/O clock driver support for PH1-LD20 2016-04-24 09:54:10 +09:00
core dm: core: Allow device names to be freed automatically 2016-05-17 09:54:43 -06:00
cpu
crypto armv8: LS2080A: Consolidate LS2080A and LS2085A 2016-04-06 10:26:46 -07:00
ddr arm: mvebu: a38x: Weed out floating point use 2016-05-20 11:01:00 +02:00
demo
dfu dm: mmc: Use the new select_hwpart() API 2016-05-17 09:54:43 -06:00
dma
fpga
gpio gpio: exynos(s5p): remove gpio_xlate routine 2016-05-17 09:54:43 -06:00
hwmon
i2c i2c: mvtwsi: Eliminate twsi_control_flags 2016-05-17 08:32:02 +02:00
input
led
memory memory: Move TI_AEMIF config to KCONFIG 2016-04-18 17:11:43 -04:00
misc
mmc dm: mmc: sandbox: Add an SD-card emulation 2016-05-17 09:54:43 -06:00
mtd SPL: Let spl_parse_image_header() return value 2016-05-17 17:52:20 +02:00
net Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
pch
pci pci: Drop CONFIG_SYS_SCSI_SCAN_BUS_REVERSE 2016-05-17 09:54:43 -06:00
pcmcia
pinctrl pinctrl: uniphier: fix NAND and SD pin-mux settings for PH1-LD11/LD20 2016-04-24 09:53:54 +09:00
power drivers/power/pmic/pm8916.c: Make usid be uint32_t 2016-04-18 17:11:42 -04:00
pwm
qe
ram
remoteproc
rtc
serial m68k: add DM model serial driver 2016-05-17 09:54:43 -06:00
soc
sound
spi dm: spi: introduce dm api 2016-05-17 09:54:43 -06:00
spmi spmi: Fix sandbox spmi driver memory corruption 2016-04-11 20:48:22 -04:00
thermal Fix various typos, scattered over the code. 2016-05-05 21:39:26 -04:00
timer
tpm drivers/tpm/tpm_tis_sandbox.c: Fix uninitialized variable use 2016-04-15 08:14:37 -06:00
twserial
usb drivers: usb: common: add common code for usb drivers to use 2016-05-17 09:54:43 -06:00
video Merge git://git.denx.de/u-boot-dm 2016-05-17 13:58:27 -04:00
watchdog
Kconfig memory: Move TI_AEMIF config to KCONFIG 2016-04-18 17:11:43 -04:00
Makefile dm: mmc: spl: Use the legacy block interface in SPL 2016-05-17 09:54:43 -06:00