[U-Boot] [PATCH v11 08/16] regmap: Add raw read/write functions

sjg at google.com sjg at google.com
Wed Oct 24 17:35:35 UTC 2018


On 15 October 2018 at 01:24, Mario Six <mario.six at gdsys.cc> wrote:
> The regmap functions currently assume that all register map accesses
> have a data width of 32 bits, but there are maps that have different
> widths.
>
> To rectify this, implement the regmap_raw_read and regmap_raw_write
> functions from the Linux kernel API that specify the width of a desired
> read or write operation on a regmap.
>
> Implement the regmap_read and regmap_write functions using these raw
> functions in a backwards-compatible manner.
>
> Reviewed-by: Anatolij Gustschin <agust at denx.de>
> Signed-off-by: Mario Six <mario.six at gdsys.cc>
>
> ---
> v10 -> v11:
> No changes
>
> v9 -> v10:
> * Switched to the read{b,w,l,q} and write{b,w,l,q} functions for
>   register map access
>
> v8 -> v9:
> * Removed forgotten "fpgamap" in documentation
>
> v7 -> v8:
> No changes
>
> v6 -> v7:
> * Fixed wrong variable type in 64-bit read (u32 -> u64)
> * Added 64-bit case in write function
>
> v5 -> v6:
> * Corrected format specifier
> * Added support for 64-bit reads/writes
>
> v4 -> v5:
> No changes
>
> v3 -> v4:
> * Switched 'ranges[0] + offset' to 'ranges[0].start + offset'
> * Explained the difference between the raw and non-raw read/write
>   functions better in the docs
>
> v2 -> v3:
> * Implement the "raw" functions from Linux instead of adding a size
>   parameter to the regmap_{read,write} functions
> * Fixed style violation
> * Improved error handling
>
> v1 -> v2:
> New in v2
> ---
>  drivers/core/regmap.c | 64 ++++++++++++++++++++++++++++++++++++++-----
>  include/regmap.h      | 58 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 115 insertions(+), 7 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list