u-boot-brain/drivers
Przemyslaw Marczak 41ac233c61 dfu: mmc: file buffer: remove static allocation
For writing files, DFU implementation requires the file buffer
with the len at least of file size. For big files it requires
the same big buffer.

Previously the file buffer was allocated as a static variable,
so it was a part of U-Boot .bss section. For 32MiB len of buffer
we have 32MiB of additional space, required for this section.

The .bss needs to be cleared after the relocation.
This introduces an additional boot delay at every start, but usually
the dfu feature is not required at the standard boot, so the buffer
should be allocated only if required.

This patch removes the static allocation of this buffer,
and alloc it with memalign after first call of function:
- dfu_fill_entity_mmc()
and the buffer is freed on dfu_free_entity() call.

This was tested on Trats2.
A quick test with trace. Boot time from start to main_loop() entry:
- ~888ms - before this change (arch memset enabled for .bss clear)
- ~464ms - after this change

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
2015-03-09 11:13:28 -04:00
..
bios_emulator bios_emulator: Add some VESA interface debugging 2015-01-23 17:24:16 -07:00
block x86: ahci: Make sure interface is not busy after enabling the port 2015-01-23 17:24:53 -07:00
bootcount qe: move immap_qe.h from arch directory into common directory 2014-07-22 16:25:54 -07:00
core kconfig: remove unneeded dependency on !SPL_BUILD 2015-02-24 17:06:27 -05:00
crypto Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2015-03-05 20:50:30 -05:00
ddr driver/ddr/fsl: Add sync of refresh 2015-02-24 13:09:42 -08:00
demo dm: Add Kconfig for driver/demo 2015-02-12 10:35:33 -07:00
dfu dfu: mmc: file buffer: remove static allocation 2015-03-09 11:13:28 -04:00
dma dma: keystone_nav: remove spurious qm_cfg verification 2014-11-06 11:04:39 -05:00
fpga fpga: xilinx: Show fpga info if defined 2015-01-21 10:25:43 +01:00
gpio dm: tegra: Enable driver model in SPL and adjust the GPIO driver 2015-03-04 14:55:04 -05:00
hwmon kconfig: add blank Kconfig files 2014-09-24 18:30:28 -04:00
i2c dm: i2c: Add a missing memory allocaton check 2015-03-05 19:13:35 -07:00
input dm: cros_ec: Convert to Kconfig 2015-02-19 06:19:18 -07:00
memory ARM: keystone: aemif: move aemif driver to drivers/memory/ti-aemif.c 2014-06-19 17:53:58 -04:00
misc fsl_sec_mon: Add driver for Security Monitor block of Freescale 2015-03-05 12:04:59 -08:00
mmc Merge branch 'master' of git://git.denx.de/u-boot 2015-03-02 09:42:53 +01:00
mtd omap: gpmc: 'nandecc sw' can use HAM1 or BCH8 2015-03-05 20:49:43 -05:00
net net: Support DMA threshold mode in DWMAC driver 2015-03-05 11:17:53 -05:00
pci driver/pci: add Layerscape PCIe driver 2015-02-24 13:10:50 -08:00
pcmcia powerpc: mpc824x: remove MPC824X cpu support 2015-01-05 12:08:55 -05:00
power Merge branch 'master' of git://git.denx.de/u-boot-sunxi 2015-02-02 10:11:44 -05:00
pwm pwm, imx6: add support for pwm modul on imx6 2014-07-23 12:25:42 +02:00
qe qe/deep-sleep: modify qe deep-sleep for generic board 2014-12-15 09:16:49 -08:00
rtc x86: rtc: mc146818: Add helpers to read/write CMOS RAM 2015-01-24 06:13:44 -07:00
serial serial: ns16550: Fix build error due to a typo 2015-03-02 08:48:00 -05:00
soc soc: keystone_serdes: generalize configuration mechanism 2014-10-23 11:27:28 -04:00
sound kconfig: add blank Kconfig files 2014-09-24 18:30:28 -04:00
spi dm: Expand and complete Kconfig in drivers/ 2015-02-12 10:35:33 -07:00
thermal dm: Expand and complete Kconfig in drivers/ 2015-02-12 10:35:33 -07:00
tpm Replace <compiler.h> with <linux/compiler.h> 2014-12-08 09:35:46 -05:00
twserial drivers: convert makefiles to Kbuild style 2013-10-31 13:26:01 -04:00
usb Merge git://git.denx.de/u-boot-usb 2015-03-02 07:24:27 -05:00
video drivers/video/am335x-fb: Add possibility to wait for stable power/picture 2015-03-05 20:13:16 -05:00
watchdog ARM: remove tnetv107x board support 2015-02-24 17:07:24 -05:00
Kconfig dm: Expand and complete Kconfig in drivers/ 2015-02-12 10:35:33 -07:00
Makefile Merge branch 'master' of git://git.denx.de/u-boot-fsl-qoriq 2014-11-26 11:23:26 -05:00