[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111109121406.GA32212@opensource.wolfsonmicro.com>
Date: Wed, 9 Nov 2011 12:14:06 +0000
From: Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@...afoo.de>
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] regmap: Support some more block operations on
cached devices
On Tue, Nov 08, 2011 at 06:37:26PM +0100, Lars-Peter Clausen wrote:
> Commit 10a08d9f ("regmap: Support some block operations on cached devices")
> allowed raw read operations without throwing a warning when using caches if
> all registers are volatile. This patch does the same for raw write operations.
>
> This is for example useful when loading a firmware in a predefined volatile
> region on a chip where we otherwise want registers to be cached.
>
> Signed-off-by: Lars-Peter Clausen <lars@...afoo.de>
> ---
> drivers/base/regmap/regmap.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index 4016b00..a471083 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -387,9 +387,11 @@ EXPORT_SYMBOL_GPL(regmap_write);
> int regmap_raw_write(struct regmap *map, unsigned int reg,
> const void *val, size_t val_len)
> {
> + size_t val_count = val_len / map->format.val_bytes;
> int ret;
>
> - WARN_ON(map->cache_type != REGCACHE_NONE);
> + WARN_ON(!regmap_volatile_range(map, reg, val_count) &&
> + map->cache_type != REGCACHE_NONE);
>
> mutex_lock(&map->lock);
>
> --
> 1.7.7
Acked-by: Dimitris Papastamos <dp@...nsource.wolfsonmicro.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists