lkml.org 
[lkml]   [2012]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/6] regmap: add MMIO bus support
    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.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2012-04-05 01:01    [W:2.634 / U:0.764 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site