Skip to content

Commit bf32c4a

Browse files
Keshava MunegowdaPaul Walmsley
authored andcommitted
ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods
Create hwmods for ocp2scp3 and sata modules. [Roger Q] Clean up. CC: Benoit Cousson <[email protected]> Signed-off-by: Balaji T K <[email protected]> Signed-off-by: Roger Quadros <[email protected]> Signed-off-by: Paul Walmsley <[email protected]>
1 parent 98bbc11 commit bf32c4a

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

arch/arm/mach-omap2/omap_hwmod_54xx_data.c

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,6 +2020,77 @@ static struct omap_hwmod omap54xx_wd_timer2_hwmod = {
20202020
},
20212021
};
20222022

2023+
/*
2024+
* 'ocp2scp' class
2025+
* bridge to transform ocp interface protocol to scp (serial control port)
2026+
* protocol
2027+
*/
2028+
/* ocp2scp3 */
2029+
static struct omap_hwmod omap54xx_ocp2scp3_hwmod;
2030+
/* l4_cfg -> ocp2scp3 */
2031+
static struct omap_hwmod_ocp_if omap54xx_l4_cfg__ocp2scp3 = {
2032+
.master = &omap54xx_l4_cfg_hwmod,
2033+
.slave = &omap54xx_ocp2scp3_hwmod,
2034+
.clk = "l4_root_clk_div",
2035+
.user = OCP_USER_MPU | OCP_USER_SDMA,
2036+
};
2037+
2038+
static struct omap_hwmod omap54xx_ocp2scp3_hwmod = {
2039+
.name = "ocp2scp3",
2040+
.class = &omap54xx_ocp2scp_hwmod_class,
2041+
.clkdm_name = "l3init_clkdm",
2042+
.prcm = {
2043+
.omap4 = {
2044+
.clkctrl_offs = OMAP54XX_CM_L3INIT_OCP2SCP3_CLKCTRL_OFFSET,
2045+
.context_offs = OMAP54XX_RM_L3INIT_OCP2SCP3_CONTEXT_OFFSET,
2046+
.modulemode = MODULEMODE_HWCTRL,
2047+
},
2048+
},
2049+
};
2050+
2051+
/*
2052+
* 'sata' class
2053+
* sata: serial ata interface gen2 compliant ( 1 rx/ 1 tx)
2054+
*/
2055+
2056+
static struct omap_hwmod_class_sysconfig omap54xx_sata_sysc = {
2057+
.sysc_offs = 0x0000,
2058+
.sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
2059+
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2060+
SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2061+
MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2062+
.sysc_fields = &omap_hwmod_sysc_type2,
2063+
};
2064+
2065+
static struct omap_hwmod_class omap54xx_sata_hwmod_class = {
2066+
.name = "sata",
2067+
.sysc = &omap54xx_sata_sysc,
2068+
};
2069+
2070+
/* sata */
2071+
static struct omap_hwmod omap54xx_sata_hwmod = {
2072+
.name = "sata",
2073+
.class = &omap54xx_sata_hwmod_class,
2074+
.clkdm_name = "l3init_clkdm",
2075+
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
2076+
.main_clk = "func_48m_fclk",
2077+
.mpu_rt_idx = 1,
2078+
.prcm = {
2079+
.omap4 = {
2080+
.clkctrl_offs = OMAP54XX_CM_L3INIT_SATA_CLKCTRL_OFFSET,
2081+
.context_offs = OMAP54XX_RM_L3INIT_SATA_CONTEXT_OFFSET,
2082+
.modulemode = MODULEMODE_SWCTRL,
2083+
},
2084+
},
2085+
};
2086+
2087+
/* l4_cfg -> sata */
2088+
static struct omap_hwmod_ocp_if omap54xx_l4_cfg__sata = {
2089+
.master = &omap54xx_l4_cfg_hwmod,
2090+
.slave = &omap54xx_sata_hwmod,
2091+
.clk = "l3_iclk_div",
2092+
.user = OCP_USER_MPU | OCP_USER_SDMA,
2093+
};
20232094

20242095
/*
20252096
* Interfaces
@@ -2765,6 +2836,8 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = {
27652836
&omap54xx_l4_cfg__usb_tll_hs,
27662837
&omap54xx_l4_cfg__usb_otg_ss,
27672838
&omap54xx_l4_wkup__wd_timer2,
2839+
&omap54xx_l4_cfg__ocp2scp3,
2840+
&omap54xx_l4_cfg__sata,
27682841
NULL,
27692842
};
27702843

0 commit comments

Comments
 (0)