summaryrefslogtreecommitdiff
path: root/lib/utils/serial/sifive-uart.c
AgeCommit message (Collapse)Author
2025-10-06lib: serial: sifive-uart: add shared memory region for SiFive UARTYu-Chien Peter Lin
Add shared memory region so the driver has permission to access it in OpenSBI. Signed-off-by: Yu-Chien Peter Lin <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2022-07-30lib: utils/serial: Ensure baudrate is non-zero before usingAndrew Jones
RISC-V doesn't generate exceptions on divide-by-zero, but the result, all bits set, is not likely what people expect either. In all cases where we divide by baudrate there's a chance it's zero (when the DT it came from is "bad"). To avoid difficult to debug situations, leave baudrate dependent registers alone when baudrate is zero, as, also in all cases, it appears we can skip initialization of those registers and still [hopefully] have a functioning UART. Signed-off-by: Andrew Jones <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2022-07-30lib: serial: Clean up coding style in sifive-uart.cAndrew Jones
Signed-off-by: Andrew Jones <[email protected]> Reviewed-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2022-01-21lib: fix pointer of type 'void *' used in arithmeticJukka Laitinen
Using "void *" in arithmetic causes errors with strict compiler settings: "error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]" Avoid these by calculating on "char *" where 1-byte data size is assumed. Signed-off-by: Jukka Laitinen <[email protected]> Reviewed-by: Dong Du <[email protected]> Reviewed-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2021-04-28lib: sbi: Simplify console platform operationsAnup Patel
Instead of having console_putc() and console_getc() callbacks in platform operations, it will be much simpler for console driver to directly register these operations as device to the sbi_console implementation. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Reviewed-by: Xiang W <[email protected]>
2020-05-01lib: utils/serial: Skip baudrate config if input frequency is zeroAnup Patel
We should skip baudrate config for UART8250 and SiFive UART when input frequency is zero. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]> Reviewed-by: Alistair Francis <[email protected]>
2020-03-10lib: serial: Fix coding style issuesBin Meng
This fixes various coding style issues found in the serial codes. No functional changes. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2019-06-19platform: Move platform common to lib/utils.Atish Patra
Currently, platform/common contains platform/non-platform specific common minimal drivers and libraries. This is helpful is all platforms are built within opensbi framework. Move them to lib/utils so that any external platform code also can reuse the minimalistic drivers or other common libraries. This patch doesn't introduce any functional changes. Signed-off-by: Atish Patra <[email protected]> Acked-by: Anup Patel <[email protected]>