cortex-m: add D-cache support

Add support to enable the architectural D-cache on ARMv7-M CPU
supporting it.
Update the MPU code in order to be able to declare an 'uncached' RAM
region (e.g. to store the DMA buffer).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=poppy
BUG=b:78535052, b:75068419
TEST=with the following CL, on ZerbleBarn, boot and capture a finger
image.

Change-Id: I275445e7c0b558cedc3e7d6fc6840ff9b4b76285
Reviewed-on: https://chromium-review.googlesource.com/1032776
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
This commit is contained in:
Vincent Palatin
2018-04-27 08:15:57 +02:00
committed by chrome-bot
parent a6c9a3cd21
commit edbfb3a43b
9 changed files with 159 additions and 14 deletions

View File

@@ -742,6 +742,14 @@
*/
#undef CONFIG_CHIP_PRE_INIT
/*
* Set the caching attributes of one of the RAM regions to uncached.
*
* When defined, CONFIG_CHIP_UNCACHED_REGION must be equal to the name of one
* of the regions defined in memory_regions.inc for CONFIG_CHIP_MEMORY_REGIONS.
*/
#undef CONFIG_CHIP_UNCACHED_REGION
/*****************************************************************************/
/* Chipset config */

View File

@@ -110,5 +110,10 @@ extern const void *__data_end;
#else
#define __SECTION(name)
#endif /* CONFIG_MEMORY_REGIONS */
#ifdef CONFIG_CHIP_UNCACHED_REGION
#define __uncached __SECTION(CONFIG_CHIP_UNCACHED_REGION)
#else
#define __uncached
#endif
#endif /* __CROS_EC_LINK_DEFS_H */