All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas WESTIN <andreas.westin@stericsson.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
	"lee.jones@linaro.org" <lee.jones@linaro.org>
Subject: Re: [PATCH 1/2] mach-ux500: Crypto: core support for CRYP/HASH module.
Date: Wed, 9 May 2012 15:18:59 +0200	[thread overview]
Message-ID: <4FAA6EC3.5090205@stericsson.com> (raw)
In-Reply-To: <CACRpkdaR-LTcD+rsq8HbxT7uzWtazC=xJ_dkBsxeq2GvassxPA@mail.gmail.com>



On 2012-05-09 15:09, Linus Walleij wrote:
>>
>> How about using distinct identification strings for each version of the
>> crypto hardware? The driver should really only care about what kind
>> of device it is talking to, not which SoC it is built into.
>
> Do you mean like this (from a recent pinctrl driver):
>
> static int __devinit nmk_pinctrl_probe(struct platform_device *pdev)
> {
>          const struct platform_device_id *platid = platform_get_device_id(pdev);
>          ....
>         (Here we use that ID to control runtime codepath)
> }
>
> static const struct platform_device_id nmk_pinctrl_id[] = {
>          { "pinctrl-stn8815", PINCTRL_NMK_STN8815 },
>          { "pinctrl-db8500", PINCTRL_NMK_DB8500 },
> };
>
> static struct platform_driver nmk_pinctrl_driver = {
>          .driver = {
>                  .owner = THIS_MODULE,
>                  .name = "pinctrl-nomadik",
>          },
>          .probe = nmk_pinctrl_probe,
>          .id_table = nmk_pinctrl_id,
> };
>
> Here one version of ASIC registers the "pinctrl-db8500" device.
> And so on.
>
> So instead of registering "cryp1" and "hash1", register
> "db8500-cryp-v1", "db8500-cryp-v2" etc for the versions,
> then use the ID to control code path.
>
> Is that what you were thinking of?
>

No, I think Arnd is referring to the registers in the crypto hardware, 
I'm preparing a patch for that.

Regards
Andreas

  reply	other threads:[~2012-05-09 13:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08 11:28 [PATCH 0/2] Update for ux500 CRYP and HASH Andreas Westin
2012-05-08 11:28 ` [PATCH 1/2] mach-ux500: Crypto: core support for CRYP/HASH module Andreas Westin
2012-05-08 19:37   ` Arnd Bergmann
2012-05-09  8:36     ` Linus Walleij
2012-05-09  8:51       ` Andreas WESTIN
2012-05-09 12:17         ` Arnd Bergmann
2012-05-09 13:09           ` Linus Walleij
2012-05-09 13:18             ` Andreas WESTIN [this message]
2012-05-09 13:47             ` Arnd Bergmann
2012-05-09 13:59               ` Andreas WESTIN
2012-05-08 11:28 ` [PATCH 2/2] crypto: ux500: Update DMA handling for 3.4 Andreas Westin

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=4FAA6EC3.5090205@stericsson.com \
    --to=andreas.westin@stericsson.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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.