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>
This commit is contained in:
committed by
Felix Held
parent
1c8e8b259d
commit
ea03d0047b
@ -126,7 +126,6 @@ char *getenv(const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !CONFIG(LP_ARCH_MIPS)
|
||||
/*
|
||||
* Reads a transfer buffer from 32-bit FIFO registers. fifo_stride is the
|
||||
* distance in bytes between registers (e.g. pass 4 for a normal array of 32-bit
|
||||
@ -156,10 +155,10 @@ 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)
|
||||
{
|
||||
u8 *p = buffer;
|
||||
const u8 *p = buffer;
|
||||
int i, j = prefsz;
|
||||
|
||||
assert(fifo_width > 0 && fifo_width <= sizeof(u32) &&
|
||||
@ -175,4 +174,3 @@ void buffer_to_fifo32_prefix(void *buffer, u32 prefix, int prefsz, size_t size,
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user