summaryrefslogtreecommitdiff
path: root/common/uart_buffering.c
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2018-05-18 15:47:45 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-06-04 17:23:27 -0700
commiteee7778fcfc5e555d119cff65caa7c045343e356 (patch)
treea5e43bc8e5f85345f204b725a68cbdfcadd9f6a1 /common/uart_buffering.c
parentb49d5872e9eacae9cee17c9bf011835bc5e3eb45 (diff)
downloadchrome-ec-eee7778fcfc5e555d119cff65caa7c045343e356.tar.gz
stm32: use D-cache on STM32H7
Enable the D-cache on STM32H7. Use the ahb4 RAM region as uncached memory for DMA buffers. Mark the serial, SPI and fingerprint DMA buffers as uncached for proper operations. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=poppy BUG=b:78535052, b:75068419 TEST=On ZerbleBarn, run fingerprint match. CQ-DEPEND=CL:*616448 Change-Id: Ia33496ebde3508d3427e522cc7ba060829f8f3fd Reviewed-on: https://chromium-review.googlesource.com/1065822 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'common/uart_buffering.c')
-rw-r--r--common/uart_buffering.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c
index 439d7cce28..1f9f57f18a 100644
--- a/common/uart_buffering.c
+++ b/common/uart_buffering.c
@@ -11,6 +11,7 @@
#include "console.h"
#include "hooks.h"
#include "host_command.h"
+#include "link_defs.h"
#include "printf.h"
#include "system.h"
#include "task.h"
@@ -36,10 +37,10 @@
(CONFIG_UART_RX_DMA_RECHECKS + 1))
/* Transmit and receive buffers */
-static volatile char tx_buf[CONFIG_UART_TX_BUF_SIZE];
+static volatile char tx_buf[CONFIG_UART_TX_BUF_SIZE] __uncached;
static volatile int tx_buf_head;
static volatile int tx_buf_tail;
-static volatile char rx_buf[CONFIG_UART_RX_BUF_SIZE];
+static volatile char rx_buf[CONFIG_UART_RX_BUF_SIZE] __uncached;
static volatile int rx_buf_head;
static volatile int rx_buf_tail;
static int tx_snapshot_head;