In general we should avoid calling malloc() and free() repeatedly in
U-Boot lest we turn it into tianocore. In SPL this can make SPI flash
unusable since free() is often a nop and allocation space is limited.
In any case, these seems no need for malloc() since the number of bytes
is very small, perhaps less than 8.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: d13f5b254a (spi: Extend the core to ease integration of SPI
memory controllers)
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit ca2abb75a086d8b0bdb51689f331ba8f1a146379)
Change-Id: Ia76abf7491780b1984eb81c6c78796bcc0141095