summaryrefslogtreecommitdiff
path: root/lib/utils/serial
AgeCommit message (Collapse)AuthorFilesLines
2022-01-11lib: utils/sys: Extend HTIF library to allow custom base addressSDK_v2.0.0Anup Patel1-1/+11
Some of RISC-V emulators provide HTIF at fixed base address so for such emulators users have to hard-code HTIF base address in the linker script. To address this problem, we let users optionally provide fixed HTIF base address via platform support (or device tree). Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Dong Du <Dd_nirvana@sjtu.edu.cn> Reviewed-by: Atish Patra <atishp@rivosinc.com>
2021-11-18lib: utils: Add LiteX UART supportGabriel Somlo4-0/+106
Add support for the UART provided by the LiteX SoC framework (https://github.com/enjoy-digital/litex), based on its FDT info (described in the Linux tree at Documentation/devicetree/bindings/serial/litex,liteuart.yaml). Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2021-11-02include: sbi_utils: Introduce an helper to get fdt base addressAlexandre Ghiti1-1/+1
This simply adds an helper to get fdt address which is more explicit than sbi_scratch_thishart_arg1_ptr. Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2021-06-02lib: utils: consider ':' in stdout-pathHeinrich Schuchardt1-3/+12
The value of the /chosen/stdout-path devicetree property is used to determine the UART used by openSBI. According to the devicetree specification the value may contain a hyphen, e.g. chosen {                 stdout-path = "/serial@f00:115200";         }; If the character ':' is present, it terminates the path of the device. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2021-05-24lib: utils: Try other FDT drivers when we see SBI_ENODEVAnup Patel1-0/+5
We should try other FDT drivers when we see SBI_ENODEV returned by cold_init() of FDT driver. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Xiang W <wxjstz@126.com>
2021-05-19lib: utils/serial: Support Synopsys DesignWare APB UARTBin Meng1-0/+1
Synopsys DesignWare APB UART is seen on the StarFive JH7100 SoC. Its programming interface is compatible with the existing 8250 UART driver. Simply add its compatible string to the driver makes it work with the StarFive JH7100 SoC on a BeagleV board. With this patch, the generic platform firmware can be used out of the box on the BeagleV board. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2021-05-06lib: utils/serial: Add support for Gaisler APBUARTDaniel Cederman4-0/+125
This patch adds support for the UART used by the NOEL-V processor. Cobham Gaisler's NOEL-V RISC-V processor IP is available under GPL and commercial license and is described in more detail at https://www.gaisler.com/noelv. Signed-off-by: Daniel Cederman <cederman@gaisler.com> Reviewed-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2021-04-28lib: sbi: Simplify console platform operationsAnup Patel8-38/+40
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 <anup.patel@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Xiang W <wxjstz@126.com>
2021-01-07lib: utils: Fix shakti uart implementationVijai Kumar K1-2/+6
Fix uart_putc implementation. Due to a bug in the IP, this went unnoticed. Use macros instead of magic numbers to make the code more readable. Signed-off-by: Vijai Kumar K <vijai@behindbytes.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2020-06-19platform: Add support for Shakti C-class SoC from IIT-MVijai Kumar K4-0/+83
C-Class is a member of the SHAKTI family of processors from Indian Institute of Technology - Madras(IIT-M). It is an extremely configurable and commercial-grade 5-stage in-order core supporting the standard RV64GCSUN ISA extensions. https://gitlab.com/shaktiproject/cores/c-class/blob/master/README.md We add OpenSBI support for Shakti C-class SoC. Signed-off-by: Vijai Kumar K <vijai@behindbytes.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2020-05-23lib: utils: Extend fdt_find_match() ImplementationAnup Patel1-1/+1
We extend fdt_find_match() implementation by adding node offset parameter which represents the first node to match from. The improved fdt_find_match() can be used to find multiple match nodes. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-05-01lib: utils: Add simple FDT serial frameworkAnup Patel5-0/+214
We add simple serial framework which will select and use serial driver based on details in FDT passed by previous booting stage. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
2020-05-01lib: utils/serial: Skip baudrate config if input frequency is zeroAnup Patel2-5/+10
We should skip baudrate config for UART8250 and SiFive UART when input frequency is zero. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
2020-03-10lib: serial: Fix coding style issuesBin Meng2-11/+11
This fixes various coding style issues found in the serial codes. No functional changes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2020-03-10lib: Sort build objects in alphabetical orderBin Meng1-1/+1
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
2019-06-19platform: Enable all drivers by default.Atish Patra1-2/+2
The drivers and libfdt are built as libsbiutils.a instead of libplatsbi.a. libsbiutils.a are not built per platform specific. Thus, enable all drivers by default. Signed-off-by: Atish Patra <atish.patra@wdc.com> Acked-by: Anup Patel <anup.patel@wdc.com>
2019-06-19platform: Move platform common to lib/utils.Atish Patra3-0/+233
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 <atish.patra@wdc.com> Acked-by: Anup Patel <anup.patel@wdc.com>