diff options
author | Gabriel Somlo <gsomlo@gmail.com> | 2021-01-12 18:31:44 +0100 |
---|---|---|
committer | Stafford Horne <shorne@gmail.com> | 2021-01-14 01:52:54 +0100 |
commit | 4f70d150294b3ddfbe4be7130ca53898cd5b91be (patch) | |
tree | ae8e087a2f74bacfda26c3f3de814f9083a9eab0 /drivers/soc/litex | |
parent | drivers/soc/litex: support 32-bit subregisters, 64-bit CPUs (diff) | |
download | linux-4f70d150294b3ddfbe4be7130ca53898cd5b91be.tar.xz linux-4f70d150294b3ddfbe4be7130ca53898cd5b91be.zip |
drivers/soc/litex: make 'litex_[set|get]_reg()' methods private
The 'litex_[set|get]_reg()' methods use the 'reg_size' parameter to
specify the width of the LiteX CSR (MMIO) register being accessed.
Since 'u64' is the widest data being supported, the value of 'reg_size'
MUST be between 1 and sizeof(u64), which SHOULD be checked at runtime
if these methods are publicly available for use by other LiteX device
drivers.
At the same time, none of the existing (or foreseeable) LiteX device
drivers have a need to access registers whose size is unknown during
compilation. As such, all LiteX device drivers should use fixed-width
accessor methods such as 'litex_[write|read][8|16|32|64]()'.
This patch renames 'litex_[set|get]_reg()' to '_litex_[set|get]_reg()',
indicating that they should NOT be directly called from outside of
the 'include/linux/litex.h' header file.
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'drivers/soc/litex')
-rw-r--r-- | drivers/soc/litex/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/litex/Kconfig b/drivers/soc/litex/Kconfig index 973f8d2fe1a7..b9b3d51ea7df 100644 --- a/drivers/soc/litex/Kconfig +++ b/drivers/soc/litex/Kconfig @@ -11,7 +11,7 @@ config LITEX_SOC_CONTROLLER select LITEX help This option enables the SoC Controller Driver which verifies - LiteX CSR access and provides common litex_get_reg/litex_set_reg + LiteX CSR access and provides common litex_[read|write]* accessors. All drivers that use functions from litex.h must depend on LITEX. |