From ea03d0047bbde9b2b4d3278470df6a8060640f4f Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 16 Sep 2021 15:53:32 -0700 Subject: 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 Change-Id: I021069680cf691590fdacc3d51f747f12ae3df31 Reviewed-on: https://review.coreboot.org/c/coreboot/+/57731 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin --- src/include/device/mmio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/device/mmio.h') 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, -- cgit v1.2.3