diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-11-06 11:27:30 +0000 |
---|---|---|
committer | Andy Fleming <afleming@freescale.com> | 2012-11-27 17:26:49 -0600 |
commit | 1981539914b3626efe4a97bde19ec5fe548b50cf (patch) | |
tree | 22f64db46571f7765bfcfd39bccc57ad1d86e18a /drivers/mmc/gen_atmel_mci.c | |
parent | 84d35b2863455bedb9986c2b076241e8a441fc3e (diff) |
mmc: tegra: use bounce buffer APIs
Tegra's MMC driver does DMA, and hence needs cache-aligned buffers. In
some cases (e.g. user load commands) this cannot be guaranteed by callers
of the MMC APIs. To solve this, modify the Tegra MMC driver to use the
new bounce_buffer_*() APIs.
Note: Ideally, all U-Boot code will always provide address- and size-
aligned buffers, so a bounce buffer will only ever be needed for user-
supplied buffers (e.g. load commands). Ensuring this removes the need
for performance-sucking bounce buffer cache management and memcpy()s.
The one known exception at present is the SCR buffer in sd_change_freq(),
which is only 8 bytes long. Solving this requires enhancing struct
mmc_data to know the difference between buffer size and transferred data
size, or forcing all callers of mmc_send_cmd() to have allocated buffers
using ALLOC_CACHE_ALIGN_BUFFER(), which while true in this case, is not
enforced in any way at present, and so cannot be assumed by the core MMC
code.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/mmc/gen_atmel_mci.c')
0 files changed, 0 insertions, 0 deletions