summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/io.h
AgeCommit message (Collapse)Author
2023-11-28riscv: io.h: Fix signatures of reads/writes functionsIgor Prusov
Change type of address parameter from int* to volatile void* for {read,write}s{b,w,l}() functions and add const qualifier for reads. This is done to keep function signatures in sync with asm-generic/io.h and other platforms. Signed-off-by: Igor Prusov <[email protected]>
2023-11-28riscv: io.h: Add defines for reads/writes functionsIgor Prusov
Add defines for {read,write}s{b,w,l} functions to make asm-generic/io.h aware of them. Signed-off-by: Igor Prusov <[email protected]>
2023-11-02riscv: import read/write_relaxed functionsChanho Park
This imports mmio functions from Linux's arch/riscv/include/asm/mmio.h to use read/write[b|w|l|q]_relaxed functions. Signed-off-by: Chanho Park <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-04-20riscv: Correct a comment in io.hBin Meng
Replace NDS32 with RISC-V in the comments. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2022-05-26riscv: Clean up asm/io.hLeo Yu-Chi Liang
Clean up asm/io.h by - removing commented code - removing outdated comments - removing unused definitions (for mem_isa, mem_pci) This massively improves the readability of the file. Suggested by commits: 7ab2e47d27c9 ("arm: Clean up asm/io.h") 909d0399a519 ("ARM: asm/io.h: kill off confusing #ifdef __mem_pci block") Signed-off-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2022-05-26riscv: remove CONFIG_ARCH_MAP_SYSMEM from io.hMichal Simek
Commit ba1ed5b022c6 ("Convert CONFIG_ARCH_MAP_SYSMEM to Kconfig") clearly defined that this option is available for SANDBOX (was also for already removed NDS32). That's why there is no way how this code can be enabled with current Kconfig layout for riscv. Based on this removing this code. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-11-08riscv: add #define in asm/io.h for some device driversWei Fu
This patch adds memcpy_fromio and memcpy_toio definitions for some device drivers which have these definitions, like cadence_qspi_apb.c Signed-off-by: Wei Fu <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2021-10-20riscv: Avoid io read/write cause wrong resultNick Hu
io read/write may cause wrong result because they may read/write data from/to register instead of memory. Add 'volatile' to avoid it. Signed-off-by: Nick Hu <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2018-11-26riscv: do not reimplement generic io functionsLukas Auer
RISC-V U-Boot reimplements the generic io functions from asm-generic/io.h. Remove the redundant implementation and include the generic io.h instead. Signed-off-by: Lukas Auer <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2018-11-26riscv: make use of the barrier functions from LinuxLukas Auer
Replace the barrier functions in arch/riscv/include/asm/io.h with those defined in barrier.h, which is imported from Linux. This version is modified to remove the include statement of asm-generic/barrier.h, which is not available in U-Boot or required. Signed-off-by: Lukas Auer <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Rick Chen <[email protected]>
2018-11-26riscv: fix use of incorrectly sized variablesLukas Auer
The RISC-V arch incorrectly uses 32-bit instead of 64-bit variables in several places. Fix this. In addition, BITS_PER_LONG is set to 64 on RV64I systems. Signed-off-by: Lukas Auer <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <[email protected]>
2018-03-30riscv: checkpatch: Fix alignment should match open parenthesisRick Chen
It is reported by checkpatch.pl. CHECK: Alignment should match open parenthesis Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Rick Chen <[email protected]>
2018-01-12riscv: nx25: include: Add header files to support RISC-VRick Chen
Add header files for RISC-V. Cache, ptregs, data type and other definitions are included. Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Rick Chen <[email protected]> Signed-off-by: Greentime Hu <[email protected]>