summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGabriel Somlo <gsomlo@gmail.com>2021-01-12 12:31:44 -0500
committerStafford Horne <shorne@gmail.com>2021-01-14 09:52:54 +0900
commit4f70d150294b3ddfbe4be7130ca53898cd5b91be (patch)
treeae8e087a2f74bacfda26c3f3de814f9083a9eab0 /drivers
parent51f109228308a87c7f2583360e54acfc567203da (diff)
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')
-rw-r--r--drivers/soc/litex/Kconfig2
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.