Re: [PATCH 2/2] nvmem: iomap: new driver exposing NVMEM accessible using I/O mapping

2021-03-05 Thread Rafał Miłecki
On 05.03.2021 11:33, Srinivas Kandagatla wrote: On 05/03/2021 10:24, Rafał Miłecki wrote: +static int iomap_read(void *context, unsigned int offset, void *val, +  size_t bytes) +{ +    struct iomap *priv = context; +    u8 *src = priv->base + offset; +    u8 *dst = val; +    size_t

Re: [PATCH 2/2] nvmem: iomap: new driver exposing NVMEM accessible using I/O mapping

2021-03-05 Thread Srinivas Kandagatla
On 05/03/2021 10:24, Rafał Miłecki wrote: +static int iomap_read(void *context, unsigned int offset, void *val, +  size_t bytes) +{ +    struct iomap *priv = context; +    u8 *src = priv->base + offset; +    u8 *dst = val; +    size_t tmp; + +    tmp = offset % 4; +    memcpy_from

Re: [PATCH 2/2] nvmem: iomap: new driver exposing NVMEM accessible using I/O mapping

2021-03-05 Thread Rafał Miłecki
On 05.03.2021 11:02, Srinivas Kandagatla wrote: On 04/03/2021 14:41, Rafał Miłecki wrote: From: Rafał Miłecki This is a generic NVMEM access method used e.g. by Broadcom for their NVRAM on MIPS and Northstar devices. Signed-off-by: Rafał Miłecki ---   drivers/nvmem/Kconfig  |  7 +++   driver

Re: [PATCH 2/2] nvmem: iomap: new driver exposing NVMEM accessible using I/O mapping

2021-03-05 Thread Srinivas Kandagatla
On 04/03/2021 14:41, Rafał Miłecki wrote: From: Rafał Miłecki This is a generic NVMEM access method used e.g. by Broadcom for their NVRAM on MIPS and Northstar devices. Signed-off-by: Rafał Miłecki --- drivers/nvmem/Kconfig | 7 +++ drivers/nvmem/Makefile | 2 + drivers/nvmem/iomap.

[PATCH 2/2] nvmem: iomap: new driver exposing NVMEM accessible using I/O mapping

2021-03-04 Thread Rafał Miłecki
From: Rafał Miłecki This is a generic NVMEM access method used e.g. by Broadcom for their NVRAM on MIPS and Northstar devices. Signed-off-by: Rafał Miłecki --- drivers/nvmem/Kconfig | 7 +++ drivers/nvmem/Makefile | 2 + drivers/nvmem/iomap.c | 99 ++