
Dear Lukasz Majewski,
In message 20110824120744.097ba2c5@lmajewski.digital.local you wrote:
After reading dcache related threads I'd like to sum them up:
- alloca() -> not acceptable to u-boot mainline by Wolfgang. I agree
that alloca is NOT the way to go.
malloc/memalign -> avoidable to use
Mike's DMA_DECLARE_BUFFER(<buffer type>, <variable name>,
<size in bytes>) solution looks OK for me, at least for the stack allocated data (e.g. ext_csd). However this proposed implementation has been NAK'ed by Wolfgang.
I'm curious how this macro should look like? Is it only matter of code reordering or other approach shall be found?
I think I'd like to see a macro that can be used like this:
void *dma_buffer_pointer = DMA_BUFFER(size_in_bytes);
- get_dcache_line_size() can be simply defined as
#define get_dcache_line_size() CONFIG_SYS_CACHE_LINE_SIZE if we _really_ want to save a few bytes.
Actually I fail to understand why we would ever need get_dcache_line_size() in a boot loader.
Best regards,
Wolfgang Denk