5ca27904c99ae1d9081cbade2cecbb239c265d8d
[openwrt.git] / target / linux / omap / patches-3.12 / 350-ARM-AM33xx-hwmod-Add-RNG-module-data.patch
1 Add RNG hwmod data for AM33xx SoC.
2
3 Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4
5 ---
6 * Made am33xx_l4_per__rng structure as static to fix sparse warning
7
8  arch/arm/mach-omap2/omap_hwmod_33xx_data.c |   36 ++++++++++++++++++++++++++++
9  1 file changed, 36 insertions(+)
10
11 diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
12 index 215894f..3e32f45 100644
13 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
14 +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
15 @@ -2480,6 +2480,41 @@ static struct omap_hwmod_ocp_if am33xx_l3_main__aes0 = {
16         .user           = OCP_USER_MPU | OCP_USER_SDMA,
17  };
18  
19 +/* rng */
20 +static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
21 +       .rev_offs       = 0x1fe0,
22 +       .sysc_offs      = 0x1fe4,
23 +       .sysc_flags     = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
24 +       .idlemodes      = SIDLE_FORCE | SIDLE_NO,
25 +       .sysc_fields    = &omap_hwmod_sysc_type1,
26 +};
27 +
28 +static struct omap_hwmod_class am33xx_rng_hwmod_class = {
29 +       .name           = "rng",
30 +       .sysc           = &am33xx_rng_sysc,
31 +};
32 +
33 +static struct omap_hwmod am33xx_rng_hwmod = {
34 +       .name           = "rng",
35 +       .class          = &am33xx_rng_hwmod_class,
36 +       .clkdm_name     = "l4ls_clkdm",
37 +       .flags          = HWMOD_SWSUP_SIDLE,
38 +       .main_clk       = "rng_fck",
39 +       .prcm           = {
40 +               .omap4  = {
41 +                       .clkctrl_offs   = AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
42 +                       .modulemode     = MODULEMODE_SWCTRL,
43 +               },
44 +       },
45 +};
46 +
47 +static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
48 +       .master         = &am33xx_l4_ls_hwmod,
49 +       .slave          = &am33xx_rng_hwmod,
50 +       .clk            = "rng_fck",
51 +       .user           = OCP_USER_MPU,
52 +};
53 +
54  static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
55         &am33xx_l3_main__emif,
56         &am33xx_mpu__l3_main,
57 @@ -2559,6 +2594,7 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
58         &am33xx_cpgmac0__mdio,
59         &am33xx_l3_main__sha0,
60         &am33xx_l3_main__aes0,
61 +       &am33xx_l4_per__rng,
62         NULL,
63  };
64