Re: [PATCH 2/2] OMAP SHA1/MD5 module: Add suppor for SHA1/MD5 algorithm on OMAP.

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

 



Hi,

On Dec 17, 2007 10:04 AM, andrzej zaborowski <balrogg@xxxxxxxxx> wrote:
>
> On 17/12/2007, David Cohen <david.cohen@xxxxxxxxxxx> wrote:
> > This patch adds support for the SHA1/MD5 hw module acceleration on
> > OMAP2420.
> >
> > TODO:
> > - Add DMA transfer.
> > - Add support for OMAP1, OMAP2430, OMAP3.
> >
> > Signed-off-by: David Cohen <david.cohen@xxxxxxxxxxx>
> > ---
> >  arch/arm/mach-omap1/devices.c  |   29 ++
> >  arch/arm/mach-omap2/devices.c  |   29 ++
> >  drivers/crypto/Kconfig         |    9 +
> >  drivers/crypto/Makefile        |    1 +
> >  drivers/crypto/omap-sha1-md5.c |  575
++++++++++++++++++++++++++++++++++++++++
> >  5 files changed, 643 insertions(+), 0 deletions(-)
> >  create mode 100644 drivers/crypto/omap-sha1-md5.c
> >
> > diff --git a/arch/arm/mach-omap1/devices.c
b/arch/arm/mach-omap1/devices.c
> > index da8a3ac..5e7a943 100644
> > --- a/arch/arm/mach-omap1/devices.c
> > +++ b/arch/arm/mach-omap1/devices.c
> > @@ -137,6 +137,34 @@ static inline void omap_init_sti(void)
> >  static inline void omap_init_sti(void) {}
> >  #endif
> >
> > +#ifdef CONFIG_OMAP_SHA1_MD5
> > +static struct resource sha1_md5_resources[] = {
> > +       {
> > +               .start  = OMAP16XX_SEC_SHA1MD5,
> > +               .end    = OMAP16XX_SEC_SHA1MD5 + 0x7ff,
> > +               .flags  = IORESOURCE_MEM,
> > +       },
> > +       {
> > +               .start  = INT_1610_SHA1MD5,
> > +               .flags  = IORESOURCE_IRQ,
> > +       }
> > +};
> > +
> > +static struct platform_device sha1_md5_device = {
> > +       .name           = "OMAP SHA1/MD5",
> > +       .id             = -1,
> > +       .num_resources  = ARRAY_SIZE(sha1_md5_resources),
> > +       .resource       = sha1_md5_resources,
> > +};
> > +
> > +static void omap_init_sha1_md5(void)
> > +{
> > +       platform_device_register(&sha1_md5_device);
> > +}
> > +#else
> > +static inline void omap_init_sha1_md5(void) { }
> > +#endif
> > +
> > 
/*-------------------------------------------------------------------------*/
> >
> >  /*
> > @@ -168,6 +196,7 @@ static int __init omap1_init_devices(void)
> >         omap_init_mbox();
> >         omap_init_rtc();
> >         omap_init_sti();
> > +       omap_init_sha1_md5();
>
> This piece could be in an #ifdef CONFIG_ARCH_OMAP16XX and if
> (cpu_is_omap16xx()) to avoid nasty things happening if the user
> accidentally compiles in the crypto driver. There would also be a
> minimal space saving.

Indeed, it's not only for OMAP16XX, but for OMAP17XX also. As OMAP1
support is in TODO list, I'll remove it for now and resend it with the
OMAP1 stuff, considering your comments.

BR,

David

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux