refresh/rename patches
[openwrt/staging/chunkeey.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 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
12 +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
13 @@ -2480,6 +2480,41 @@ static struct omap_hwmod_ocp_if am33xx_l
14 .user = OCP_USER_MPU | OCP_USER_SDMA,
15 };
16
17 +/* rng */
18 +static struct omap_hwmod_class_sysconfig am33xx_rng_sysc = {
19 + .rev_offs = 0x1fe0,
20 + .sysc_offs = 0x1fe4,
21 + .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE,
22 + .idlemodes = SIDLE_FORCE | SIDLE_NO,
23 + .sysc_fields = &omap_hwmod_sysc_type1,
24 +};
25 +
26 +static struct omap_hwmod_class am33xx_rng_hwmod_class = {
27 + .name = "rng",
28 + .sysc = &am33xx_rng_sysc,
29 +};
30 +
31 +static struct omap_hwmod am33xx_rng_hwmod = {
32 + .name = "rng",
33 + .class = &am33xx_rng_hwmod_class,
34 + .clkdm_name = "l4ls_clkdm",
35 + .flags = HWMOD_SWSUP_SIDLE,
36 + .main_clk = "rng_fck",
37 + .prcm = {
38 + .omap4 = {
39 + .clkctrl_offs = AM33XX_CM_PER_RNG_CLKCTRL_OFFSET,
40 + .modulemode = MODULEMODE_SWCTRL,
41 + },
42 + },
43 +};
44 +
45 +static struct omap_hwmod_ocp_if am33xx_l4_per__rng = {
46 + .master = &am33xx_l4_ls_hwmod,
47 + .slave = &am33xx_rng_hwmod,
48 + .clk = "rng_fck",
49 + .user = OCP_USER_MPU,
50 +};
51 +
52 static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = {
53 &am33xx_l3_main__emif,
54 &am33xx_mpu__l3_main,
55 @@ -2559,6 +2594,7 @@ static struct omap_hwmod_ocp_if *am33xx_
56 &am33xx_cpgmac0__mdio,
57 &am33xx_l3_main__sha0,
58 &am33xx_l3_main__aes0,
59 + &am33xx_l4_per__rng,
60 NULL,
61 };
62