Re: [PATCH 1/2] mach-ux500: Crypto: core support for CRYP/HASH module.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 09 May 2012, Linus Walleij wrote:
> On Wed, May 9, 2012 at 2:17 PM, Arnd Bergmann <arnd@xxxxxxxx> 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?

Yes, exactly.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux