summaryrefslogtreecommitdiff
path: root/include/configs/tegra20-common.h
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-11-06 11:27:30 +0000
committerAndy Fleming <afleming@freescale.com>2012-11-27 17:26:49 -0600
commit1981539914b3626efe4a97bde19ec5fe548b50cf (patch)
tree22f64db46571f7765bfcfd39bccc57ad1d86e18a /include/configs/tegra20-common.h
parent84d35b2863455bedb9986c2b076241e8a441fc3e (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 'include/configs/tegra20-common.h')
-rw-r--r--include/configs/tegra20-common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/configs/tegra20-common.h b/include/configs/tegra20-common.h
index 31b68be4db..5c0833a4d8 100644
--- a/include/configs/tegra20-common.h
+++ b/include/configs/tegra20-common.h
@@ -202,4 +202,7 @@
#define CONFIG_SYS_NAND_SELF_INIT
#define CONFIG_SYS_NAND_ONFI_DETECTION
+/* Misc utility code */
+#define CONFIG_BOUNCE_BUFFER
+
#endif /* __TEGRA20_COMMON_H */