All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: linux-kernel@vger.kernel.org, Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH 4/6] regmap: add MMIO bus support
Date: Wed, 4 Apr 2012 23:59:16 +0100	[thread overview]
Message-ID: <20120404225915.GH10787@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1333576113-13196-4-git-send-email-swarren@wwwdotorg.org>

[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]

On Wed, Apr 04, 2012 at 03:48:31PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> This is a basic memory-mapped-IO bus for regmap. It has the following
> features and limitations:

I applied these up to here but it was painful as patch 2 didn't apply
cleanly to -rc1 and git am couldn't find the blobs to use for
resolution.  Please check things worked out OK but I'm pretty sure they
did.

> * Registers themselves may be 8, 16, 32, or 64-bit. 64-bit is only
>   supported on 64-bit platforms.
> * Register offsets are limited to precisely 32-bit.
> * IO is performed using readl/writel, with no provision for using the
>   __raw_readl or readl_relaxed variants.

Also limited native endian register I/O.  It would have been much better
to fix this in the core - please consider producing followup patches to
push the code there, though it's far from essential.

> +static int regmap_mmio_gather_write(void *context,
> +				    const void *reg, size_t reg_size,
> +				    const void *val, size_t val_size)
> +{
> +	struct regmap_mmio_context *ctx = context;
> +	u32 offset;
> +
> +	if (reg_size != 4)
> +		return -EIO;

Given that you constrain on registration too this should be BUG_ON(),
we're seriously confused if we're specifying a different register size
here and -EIO is going to be a bit obscure.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-04-04 22:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04 21:48 [PATCH 1/6] regmap: introduce fast_io busses, and use a spinlock for them Stephen Warren
2012-04-04 21:48 ` [PATCH 2/6] regmap: allow regmap instances to be named Stephen Warren
2012-04-06  3:44   ` Paul Gortmaker
2012-04-06  5:12     ` Stephen Warren
2012-04-04 21:48 ` [PATCH 3/6] regmap: introduce explicit bus_context for bus callbacks Stephen Warren
2012-04-04 21:48 ` [PATCH 4/6] regmap: add MMIO bus support Stephen Warren
2012-04-04 22:59   ` Mark Brown [this message]
2012-04-04 23:15     ` Stephen Warren
2012-04-05  8:38       ` Mark Brown
2012-04-04 21:48 ` [PATCH 5/6] regmap: add runtime PM calls to debugfs file IO Stephen Warren
2012-04-04 22:19   ` Mark Brown
2012-04-04 21:48 ` [PATCH 6/6] regmap: prevent division by zero in rbtree_show Stephen Warren
2012-04-04 22:24   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120404225915.GH10787@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.