All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: Re: [alsa-devel] [PATCH] ASoC: rsnd: Protect register accesses with a	spinlock instead of a mutex
Date: Mon, 28 Jul 2014 08:33:43 +0000	[thread overview]
Message-ID: <87tx619927.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <53D603C6.5070408@metafoo.de>


Hi Lars

> > But it (= base address mapping was not fixed between Gen1 and Gen2)
> > was the reason why I was asked to use regmap_fields
> >
> 
> I think that is fine. But you are only using a single regmap instance even 
> though there are multiple unrelated register maps used and then you specify 
> the offset in the regmap_fields as a absolute address. This is supposed to 
> be a relative offset to the base address.
> 
> So basically use: ".reg = offset" instead of ".reg = (unsigned 
> int)gen->base[reg_id] + offset" and when creating the field instead of 
> passing a global regmap instance pass the regmap instance for the register 
> map in who's range the register falls.

Hmm... I re-checked it, and I could understand.
And, indeed it was hackish.
OK, I try to modify it, then, it seems can use regmap-mmio.


WARNING: multiple messages have this Message-ID (diff)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>,
	Linux-SH <linux-sh@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: Re: [alsa-devel] [PATCH] ASoC: rsnd: Protect register accesses with a	spinlock instead of a mutex
Date: Mon, 28 Jul 2014 01:33:43 -0700 (PDT)	[thread overview]
Message-ID: <87tx619927.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <53D603C6.5070408@metafoo.de>


Hi Lars

> > But it (= base address mapping was not fixed between Gen1 and Gen2)
> > was the reason why I was asked to use regmap_fields
> >
> 
> I think that is fine. But you are only using a single regmap instance even 
> though there are multiple unrelated register maps used and then you specify 
> the offset in the regmap_fields as a absolute address. This is supposed to 
> be a relative offset to the base address.
> 
> So basically use: ".reg = offset" instead of ".reg = (unsigned 
> int)gen->base[reg_id] + offset" and when creating the field instead of 
> passing a global regmap instance pass the regmap instance for the register 
> map in who's range the register falls.

Hmm... I re-checked it, and I could understand.
And, indeed it was hackish.
OK, I try to modify it, then, it seems can use regmap-mmio.


  reply	other threads:[~2014-07-28  8:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 21:19 [PATCH] ASoC: rsnd: Protect register accesses with a spinlock instead of a mutex Laurent Pinchart
2014-07-23 21:19 ` Laurent Pinchart
2014-07-24  0:15 ` [alsa-devel] " Kuninori Morimoto
2014-07-24  0:15   ` Kuninori Morimoto
2014-07-24  2:16   ` Kuninori Morimoto
2014-07-24  2:16     ` Kuninori Morimoto
2014-07-28  5:59     ` Lars-Peter Clausen
2014-07-28  5:59       ` Lars-Peter Clausen
2014-07-28  7:40       ` Kuninori Morimoto
2014-07-28  7:40         ` Kuninori Morimoto
2014-07-28  8:03         ` Lars-Peter Clausen
2014-07-28  8:03           ` Lars-Peter Clausen
2014-07-28  8:33           ` Kuninori Morimoto [this message]
2014-07-28  8:33             ` Kuninori Morimoto
2014-07-27 10:36 ` Ben Dooks
2014-07-27 10:36   ` Ben Dooks

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=87tx619927.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=lars@metafoo.de \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-sh@vger.kernel.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.