Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@animalcreek.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/7] ARM: OMAP2xxx: hwmod: Convert SHAM crypto device data to hwmod
Date: Mon, 22 Oct 2012 12:33:36 -0700	[thread overview]
Message-ID: <20121022193336.GA1708@animalcreek.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1210201934550.27264@utopia.booyaka.com>

On Sat, Oct 20, 2012 at 07:40:19PM +0000, Paul Walmsley wrote:
> Hi

Hi Paul.

> a few comments:
> 
> On Fri, 19 Oct 2012, Mark A. Greer wrote:
> 
> > From: "Mark A. Greer" <mgreer@animalcreek.com>
> > 
> > Convert the device data for the OMAP2 SHAM crypto IP from
> > explicit platform_data to hwmod.  When bit 1 (OMAP24XX_ST_SHA_MASK)
> > of the CM_IDLEST4_CORE register is set, the SHA IP is present.
> > 
> > CC: Paul Walmsley <paul@pwsan.com>
> > Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
> 
> ...
> 
> > 
> > diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
> > index c3cde1a..a09603c 100644
> > --- a/arch/arm/mach-omap2/clock2420_data.c
> > +++ b/arch/arm/mach-omap2/clock2420_data.c
> > @@ -1905,6 +1905,7 @@ static struct omap_clk omap2420_clks[] = {
> >  	CLK(NULL,	"vlynq_ick",	&vlynq_ick,	CK_242X),
> >  	CLK(NULL,	"vlynq_fck",	&vlynq_fck,	CK_242X),
> >  	CLK(NULL,	"des_ick",	&des_ick,	CK_242X),
> > +	CLK(NULL,	"sha_ick",	&sha_ick,	CK_242X),
> 
> This isn't needed; this alias already exists two lines below.

Umm, yeah.  Oops.  :)

> >  	CLK("omap-sham",	"ick",	&sha_ick,	CK_242X),
> >  	CLK(NULL,	"sha_ick",	&sha_ick,	CK_242X),
> >  	CLK("omap_rng",	"ick",		&rng_ick,	CK_242X),

> > diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> > index c8c2117..5b613fa 100644
> > --- a/arch/arm/mach-omap2/devices.c
> > +++ b/arch/arm/mach-omap2/devices.c

> > @@ -500,17 +484,27 @@ static struct platform_device sham_device = {
> >  
> >  static void omap_init_sham(void)
> >  {
> > -	if (cpu_is_omap24xx()) {
> > -		sham_device.resource = omap2_sham_resources;
> > -		sham_device.num_resources = omap2_sham_resources_sz;
> > +	if (cpu_is_omap24xx() &&
> > +	    (omap2_cm_read_mod_reg(CORE_MOD, OMAP24XX_CM_IDLEST4) &
> > +						 OMAP24XX_ST_SHA_MASK)) {
> 
> Hmm.  Not sure I understand the purpose of this CM read.  Don't we want to 
> initialize this device unconditionally?

No, the device doesn't exist on all parts.  This is the only way
to tell if its there (AFAIK).

> Also we're trying to get rid of all of the direct CM/PRM accesses outside 
> of the prm*.c/cm*.c code.  If we need something like this, we should add 
> some support for it in hwmod & CM code, since that's where the data lives.

Okay.

Mark
--

  reply	other threads:[~2012-10-22 19:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19 21:53 [PATCH 0/7] crypto: omap-sham updates Mark A. Greer
2012-10-19 21:53 ` [PATCH 1/7] ARM: OMAP2xxx: hwmod: Convert SHAM crypto device data to hwmod Mark A. Greer
2012-10-20 19:40   ` Paul Walmsley
2012-10-22 19:33     ` Mark A. Greer [this message]
2012-10-22 19:49       ` Paul Walmsley
2012-10-23 22:02         ` Mark A. Greer
2012-10-19 21:53 ` [PATCH 2/7] ARM: OMAP2xxx: hwmod: Add DMA information for SHAM module Mark A. Greer
2012-10-20 19:40   ` Paul Walmsley
2012-10-22 19:37     ` Mark A. Greer
2012-10-22 19:53       ` Paul Walmsley
2012-10-22 20:01         ` Mark A. Greer
2012-10-19 21:53 ` [PATCH 3/7] ARM: OMAP3xxx: hwmod: Convert SHAM crypto device data to hwmod Mark A. Greer
2012-10-20 19:41   ` Paul Walmsley
2012-10-19 21:53 ` [PATCH 4/7] ARM: OMAP2+: Remove unnecessary message when no SHA IP is present Mark A. Greer
2012-10-19 21:53 ` [PATCH 5/7] crypto: omap-sham: Convert to use pm_runtime API Mark A. Greer
2012-10-19 21:53 ` [PATCH 6/7] crypto: omap-sham: Add code to use dmaengine API Mark A. Greer
2012-10-21 11:52   ` Kasatkin, Dmitry
2012-10-22 20:53     ` Mark A. Greer
2012-10-19 21:54 ` [PATCH 7/7] crypto: omap_sham: Remove usage of private DMA API Mark A. Greer
2012-10-20 19:34 ` [PATCH 0/7] crypto: omap-sham updates Paul Walmsley
2012-10-22 19:38   ` Mark A. Greer
2012-10-21  6:28 ` Santosh Shilimkar
2012-10-22 19:46   ` Mark A. Greer

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=20121022193336.GA1708@animalcreek.com \
    --to=mgreer@animalcreek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox