summaryrefslogtreecommitdiff
path: root/drivers/ddr
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-08-10 22:50:11 +0200
committerMarek Vasut <marex@denx.de>2015-08-23 11:56:19 +0200
commit6d7a33301a05472bc788415c1d1575041e478931 (patch)
tree3b5daccb37bb460a4ac4f059e63c2622e376b360 /drivers/ddr
parent8d77576371381ade83de475bb639949b44941e8c (diff)
downloadu-boot-imx-6d7a33301a05472bc788415c1d1575041e478931.zip
u-boot-imx-6d7a33301a05472bc788415c1d1575041e478931.tar.gz
u-boot-imx-6d7a33301a05472bc788415c1d1575041e478931.tar.bz2
ddr: altera: Replace float multiplication with integer one
This gem is really really rare, there was an actual float used in the Altera DDR init code, which pulled in floating point ops from the libgcc, just wow. Since we don't support floating point operations the same way Linux does not support them, replace this with an integer multiplication and division combo. This removes some 2kiB of size from the SPL as the floating point ops are no longer pulled in from libgcc. This was detected by enabling CONFIG_USE_PRIVATE_LIBGCC=y , which does not contain the floating point bits. Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers/ddr')
-rw-r--r--drivers/ddr/altera/sequencer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c
index 2bd0109..f3621cf 100644
--- a/drivers/ddr/altera/sequencer.c
+++ b/drivers/ddr/altera/sequencer.c
@@ -3247,7 +3247,7 @@ static void mem_skip_calibrate(void)
* (1.25 * iocfg->dll_chain_length - 2)
*/
scc_mgr_set_dqdqs_output_phase(i,
- 1.25 * iocfg->dll_chain_length - 2);
+ ((125 * iocfg->dll_chain_length) / 100) - 2);
}
writel(0xff, &sdr_scc_mgr->dqs_ena);
writel(0xff, &sdr_scc_mgr->dqs_io_ena);