summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2021-09-16 15:53:32 -0700
committerFelix Held <felix-coreboot@felixheld.de>2021-09-20 12:07:51 +0000
commitea03d0047bbde9b2b4d3278470df6a8060640f4f (patch)
tree72849e599eb8f136b3c94ef6be0a5a32e6cdbc4c /src/include
parent1c8e8b259d18b3692811243ca7e4b95ade2a8095 (diff)
device/mmio: Make buffer_to_fifo32() take a const buffer
The input buffer to the buffer_to_fifo family of functions is only read, so it can be a const pointer. (Also, remove the MIPS check in libpayload for these functions... the MIPS architecture has been removed a while ago.) Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: I021069680cf691590fdacc3d51f747f12ae3df31 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57731 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/mmio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/device/mmio.h b/src/include/device/mmio.h
index ca3dfa956e..3c9a83363f 100644
--- a/src/include/device/mmio.h
+++ b/src/include/device/mmio.h
@@ -42,7 +42,7 @@ void buffer_from_fifo32(void *buffer, size_t size, void *fifo,
* bytes of the 'prefix' u32 parameter and any high-order bytes exceeding prefsz
* must be 0. Note that 'size' counts total bytes written, including 'prefsz'.
*/
-void buffer_to_fifo32_prefix(void *buffer, u32 prefix, int prefsz, size_t size,
+void buffer_to_fifo32_prefix(const void *buffer, u32 prefix, int prefsz, size_t size,
void *fifo, int fifo_stride, int fifo_width);
/*
@@ -51,7 +51,7 @@ void buffer_to_fifo32_prefix(void *buffer, u32 prefix, int prefsz, size_t size,
* registers or 0 to write everything into the same register). fifo_width is
* the amount of bytes written per register (can be 1 through 4).
*/
-static inline void buffer_to_fifo32(void *buffer, size_t size, void *fifo,
+static inline void buffer_to_fifo32(const void *buffer, size_t size, void *fifo,
int fifo_stride, int fifo_width)
{
buffer_to_fifo32_prefix(buffer, 0, 0, size, fifo,