]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: AM43xx: hwmod: Add data for DES
authorLokesh Vutla <lokeshvutla@ti.com>
Tue, 18 Oct 2016 07:55:26 +0000 (10:55 +0300)
committerTony Lindgren <tony@atomide.com>
Wed, 9 Nov 2016 22:35:56 +0000 (15:35 -0700)
AM43xx SoC contains DES crypto hardware accelerator. Add hwmod data for
this IP so that it can be utilized by crypto frameworks.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod_43xx_data.c
arch/arm/mach-omap2/prcm43xx.h

index 61f2f301d739a0fca4ee345a4a39385bff331184..3f7dac067897b5aa20cddf3232ff9f2358a3aa8a 100644 (file)
@@ -442,6 +442,31 @@ static struct omap_hwmod am43xx_adc_tsc_hwmod = {
        },
 };
 
+static struct omap_hwmod_class_sysconfig am43xx_des_sysc = {
+       .rev_offs       = 0x30,
+       .sysc_offs      = 0x34,
+       .syss_offs      = 0x38,
+       .sysc_flags     = SYSS_HAS_RESET_STATUS,
+};
+
+static struct omap_hwmod_class am43xx_des_hwmod_class = {
+       .name           = "des",
+       .sysc           = &am43xx_des_sysc,
+};
+
+static struct omap_hwmod am43xx_des_hwmod = {
+       .name           = "des",
+       .class          = &am43xx_des_hwmod_class,
+       .clkdm_name     = "l3_clkdm",
+       .main_clk       = "l3_gclk",
+       .prcm           = {
+               .omap4  = {
+                       .clkctrl_offs   = AM43XX_CM_PER_DES_CLKCTRL_OFFSET,
+                       .modulemode     = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
 /* dss */
 
 static struct omap_hwmod am43xx_dss_core_hwmod = {
@@ -870,6 +895,13 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__vpfe1 = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+static struct omap_hwmod_ocp_if am43xx_l3_main__des = {
+       .master         = &am33xx_l3_main_hwmod,
+       .slave          = &am43xx_des_hwmod,
+       .clk            = "l3_gclk",
+       .user           = OCP_USER_MPU,
+};
+
 static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
        &am33xx_l4_wkup__synctimer,
        &am43xx_l4_ls__timer8,
@@ -950,6 +982,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
        &am33xx_cpgmac0__mdio,
        &am33xx_l3_main__sha0,
        &am33xx_l3_main__aes0,
+       &am43xx_l3_main__des,
        &am43xx_l4_ls__ocp2scp0,
        &am43xx_l4_ls__ocp2scp1,
        &am43xx_l3_s__usbotgss0,
index babb5db5a3a407a4d0ba36bdd71dede87a240864..416968545e894c518adbf98f566e199519da4a43 100644 (file)
 #define AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET           0x0050
 #define AM43XX_CM_PER_SHA0_CLKCTRL_OFFSET              0x0058
 #define AM43XX_CM_PER_AES0_CLKCTRL_OFFSET              0x0028
+#define AM43XX_CM_PER_DES_CLKCTRL_OFFSET               0x0030
 #define AM43XX_CM_PER_TIMER8_CLKCTRL_OFFSET            0x0560
 #define AM43XX_CM_PER_TIMER9_CLKCTRL_OFFSET            0x0568
 #define AM43XX_CM_PER_TIMER10_CLKCTRL_OFFSET           0x0570