ARM: OMAP2+: second set of hwmod changes for v4.6
These patches add RTC support for the AM43xx, and add support for the DRA7xx eDMA controller's TPCC, TPTC0, and TPTC1 IP blocks. Also included is a workaround for PRCM hardreset control of the DRA7xx PCIe subsystem. Note that I do not have a DRA7xx board, and therefore cannot test any patches for that SoC family. Basic build, boot, and PM test logs can be found here: http://www.pwsan.com/omap/testlogs/omap-hwmod-b-for-v4.6/20160301021258/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJW1WdKAAoJEMePsQ0LvSpLoO8P/A05egqdZtbWCte8tK4/E+d1 fdzaev9dC8I6rWlxV6PTFZL8Hw28XtQZDYqV2voRE5nxma1L05Uang2c2tNmO7oH Qa7pvD/m6vy3A2ZIKgTJeV7Elc5SNEmPQq6/1z1viWni4oUFWrsP1cKPTmUOhTNu cx6Q2oxkoGlLRmonygJ49da6XShPMIOolDUNfOKFuSmt80RUor2j1Wpu+3wlVZvr 53jSLG8C+RgiUeBT90PUOvI7dAfocOV+G8CnH7/Fnss9+L2skiKwOOUNudGBz3JZ elAwjyiCkBlo3VGSRk4UarXuzAdCqZqvLSemYZ1JbYT3SbbIWovJ9nX17y7Gl7RT 4KnGW0P+yeYYj9iEwUOs1Yj4DgFTbgkmHqkF2zWPGawjj3AMUKquvYVR1d+Oz3NR 77wdAPIKWWRJ5V8QiQhKiZjpj4TkR7KT1fAF78Kf4eMXwy5tbXUkXyKpj0Izi1Z2 Oe2NHcGOMXbSBYSBK0N9sYXFWKhE3CRkEZ3yoYwTwoDYpDuMWffnRX1a0TGseUb3 xX9j+818/FyKhwEdL4rIHwOYW/iITLUOSUAOt2lnM2xWx3G1aNX7RjreOdobVm7Z 8ZVbX2zFBrP8Fe964ZutoG7FjBqurrOtoJUrZPEPWOcjDMPBi9JfRfwtLzglAnXh IUglDUxMXscaQulEez3J =ospe -----END PGP SIGNATURE----- Merge tag 'for-v4.6/omap-hwmod-b' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v4.6/soc ARM: OMAP2+: second set of hwmod changes for v4.6 These patches add RTC support for the AM43xx, and add support for the DRA7xx eDMA controller's TPCC, TPTC0, and TPTC1 IP blocks. Also included is a workaround for PRCM hardreset control of the DRA7xx PCIe subsystem. Note that I do not have a DRA7xx board, and therefore cannot test any patches for that SoC family. Basic build, boot, and PM test logs can be found here: http://www.pwsan.com/omap/testlogs/omap-hwmod-b-for-v4.6/20160301021258/
This commit is contained in:
commit
e80499190d
|
@ -3583,14 +3583,14 @@ static struct omap_hwmod_class_sysconfig omap34xx_ssi_sysc = {
|
|||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap34xx_ssi_hwmod_class = {
|
||||
static struct omap_hwmod_class omap3xxx_ssi_hwmod_class = {
|
||||
.name = "ssi",
|
||||
.sysc = &omap34xx_ssi_sysc,
|
||||
};
|
||||
|
||||
static struct omap_hwmod omap34xx_ssi_hwmod = {
|
||||
static struct omap_hwmod omap3xxx_ssi_hwmod = {
|
||||
.name = "ssi",
|
||||
.class = &omap34xx_ssi_hwmod_class,
|
||||
.class = &omap3xxx_ssi_hwmod_class,
|
||||
.clkdm_name = "core_l4_clkdm",
|
||||
.main_clk = "ssi_ssr_fck",
|
||||
.prcm = {
|
||||
|
@ -3605,9 +3605,9 @@ static struct omap_hwmod omap34xx_ssi_hwmod = {
|
|||
};
|
||||
|
||||
/* L4 CORE -> SSI */
|
||||
static struct omap_hwmod_ocp_if omap34xx_l4_core__ssi = {
|
||||
static struct omap_hwmod_ocp_if omap3xxx_l4_core__ssi = {
|
||||
.master = &omap3xxx_l4_core_hwmod,
|
||||
.slave = &omap34xx_ssi_hwmod,
|
||||
.slave = &omap3xxx_ssi_hwmod,
|
||||
.clk = "ssi_ick",
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
@ -3760,7 +3760,7 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
|
|||
&omap3xxx_sad2d__l3,
|
||||
&omap3xxx_l4_core__mmu_isp,
|
||||
&omap3xxx_l3_main__mmu_iva,
|
||||
&omap34xx_l4_core__ssi,
|
||||
&omap3xxx_l4_core__ssi,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -3784,6 +3784,7 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
|
|||
&omap3xxx_sad2d__l3,
|
||||
&omap3xxx_l4_core__mmu_isp,
|
||||
&omap3xxx_l3_main__mmu_iva,
|
||||
&omap3xxx_l4_core__ssi,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -1020,9 +1020,21 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_ocp_if *am43xx_rtc_hwmod_ocp_ifs[] __initdata = {
|
||||
&am33xx_l4_wkup__rtc,
|
||||
NULL,
|
||||
};
|
||||
|
||||
int __init am43xx_hwmod_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
omap_hwmod_am43xx_reg();
|
||||
omap_hwmod_init();
|
||||
return omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
|
||||
ret = omap_hwmod_register_links(am43xx_hwmod_ocp_ifs);
|
||||
|
||||
if (!ret && of_machine_is_compatible("ti,am4372"))
|
||||
ret = omap_hwmod_register_links(am43xx_rtc_hwmod_ocp_ifs);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -429,6 +429,67 @@ static struct omap_hwmod dra7xx_dma_system_hwmod = {
|
|||
.dev_attr = &dma_dev_attr,
|
||||
};
|
||||
|
||||
/*
|
||||
* 'tpcc' class
|
||||
*
|
||||
*/
|
||||
static struct omap_hwmod_class dra7xx_tpcc_hwmod_class = {
|
||||
.name = "tpcc",
|
||||
};
|
||||
|
||||
static struct omap_hwmod dra7xx_tpcc_hwmod = {
|
||||
.name = "tpcc",
|
||||
.class = &dra7xx_tpcc_hwmod_class,
|
||||
.clkdm_name = "l3main1_clkdm",
|
||||
.main_clk = "l3_iclk_div",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_offs = DRA7XX_CM_L3MAIN1_TPCC_CLKCTRL_OFFSET,
|
||||
.context_offs = DRA7XX_RM_L3MAIN1_TPCC_CONTEXT_OFFSET,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* 'tptc' class
|
||||
*
|
||||
*/
|
||||
static struct omap_hwmod_class dra7xx_tptc_hwmod_class = {
|
||||
.name = "tptc",
|
||||
};
|
||||
|
||||
/* tptc0 */
|
||||
static struct omap_hwmod dra7xx_tptc0_hwmod = {
|
||||
.name = "tptc0",
|
||||
.class = &dra7xx_tptc_hwmod_class,
|
||||
.clkdm_name = "l3main1_clkdm",
|
||||
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
|
||||
.main_clk = "l3_iclk_div",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC1_CLKCTRL_OFFSET,
|
||||
.context_offs = DRA7XX_RM_L3MAIN1_TPTC1_CONTEXT_OFFSET,
|
||||
.modulemode = MODULEMODE_HWCTRL,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/* tptc1 */
|
||||
static struct omap_hwmod dra7xx_tptc1_hwmod = {
|
||||
.name = "tptc1",
|
||||
.class = &dra7xx_tptc_hwmod_class,
|
||||
.clkdm_name = "l3main1_clkdm",
|
||||
.flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
|
||||
.main_clk = "l3_iclk_div",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_offs = DRA7XX_CM_L3MAIN1_TPTC2_CLKCTRL_OFFSET,
|
||||
.context_offs = DRA7XX_RM_L3MAIN1_TPTC2_CONTEXT_OFFSET,
|
||||
.modulemode = MODULEMODE_HWCTRL,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* 'dss' class
|
||||
*
|
||||
|
@ -1482,8 +1543,7 @@ static struct omap_hwmod_class_sysconfig dra7xx_ocp2scp_sysc = {
|
|||
.syss_offs = 0x0014,
|
||||
.sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
|
||||
SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
SIDLE_SMART_WKUP),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
|
@ -1527,34 +1587,72 @@ static struct omap_hwmod dra7xx_ocp2scp3_hwmod = {
|
|||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* As noted in documentation for _reset() in omap_hwmod.c, the stock reset
|
||||
* functionality of OMAP HWMOD layer does not deassert the hardreset lines
|
||||
* associated with an IP automatically leaving the driver to handle that
|
||||
* by itself. This does not work for PCIeSS which needs the reset lines
|
||||
* deasserted for the driver to start accessing registers.
|
||||
*
|
||||
* We use a PCIeSS HWMOD class specific reset handler to deassert the hardreset
|
||||
* lines after asserting them.
|
||||
*/
|
||||
static int dra7xx_pciess_reset(struct omap_hwmod *oh)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < oh->rst_lines_cnt; i++) {
|
||||
omap_hwmod_assert_hardreset(oh, oh->rst_lines[i].name);
|
||||
omap_hwmod_deassert_hardreset(oh, oh->rst_lines[i].name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct omap_hwmod_class dra7xx_pciess_hwmod_class = {
|
||||
.name = "pcie",
|
||||
.reset = dra7xx_pciess_reset,
|
||||
};
|
||||
|
||||
/* pcie1 */
|
||||
static struct omap_hwmod_rst_info dra7xx_pciess1_resets[] = {
|
||||
{ .name = "pcie", .rst_shift = 0 },
|
||||
};
|
||||
|
||||
static struct omap_hwmod dra7xx_pciess1_hwmod = {
|
||||
.name = "pcie1",
|
||||
.class = &dra7xx_pciess_hwmod_class,
|
||||
.clkdm_name = "pcie_clkdm",
|
||||
.rst_lines = dra7xx_pciess1_resets,
|
||||
.rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess1_resets),
|
||||
.main_clk = "l4_root_clk_div",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS1_CLKCTRL_OFFSET,
|
||||
.rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
|
||||
.context_offs = DRA7XX_RM_L3INIT_PCIESS1_CONTEXT_OFFSET,
|
||||
.modulemode = MODULEMODE_SWCTRL,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/* pcie2 */
|
||||
static struct omap_hwmod_rst_info dra7xx_pciess2_resets[] = {
|
||||
{ .name = "pcie", .rst_shift = 1 },
|
||||
};
|
||||
|
||||
/* pcie2 */
|
||||
static struct omap_hwmod dra7xx_pciess2_hwmod = {
|
||||
.name = "pcie2",
|
||||
.class = &dra7xx_pciess_hwmod_class,
|
||||
.clkdm_name = "pcie_clkdm",
|
||||
.rst_lines = dra7xx_pciess2_resets,
|
||||
.rst_lines_cnt = ARRAY_SIZE(dra7xx_pciess2_resets),
|
||||
.main_clk = "l4_root_clk_div",
|
||||
.prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_offs = DRA7XX_CM_L3INIT_PCIESS2_CLKCTRL_OFFSET,
|
||||
.rstctrl_offs = DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET,
|
||||
.context_offs = DRA7XX_RM_L3INIT_PCIESS2_CONTEXT_OFFSET,
|
||||
.modulemode = MODULEMODE_SWCTRL,
|
||||
},
|
||||
|
@ -2549,6 +2647,30 @@ static struct omap_hwmod_ocp_if dra7xx_l4_cfg__dma_system = {
|
|||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
/* l3_main_1 -> tpcc */
|
||||
static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tpcc = {
|
||||
.master = &dra7xx_l3_main_1_hwmod,
|
||||
.slave = &dra7xx_tpcc_hwmod,
|
||||
.clk = "l3_iclk_div",
|
||||
.user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
/* l3_main_1 -> tptc0 */
|
||||
static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc0 = {
|
||||
.master = &dra7xx_l3_main_1_hwmod,
|
||||
.slave = &dra7xx_tptc0_hwmod,
|
||||
.clk = "l3_iclk_div",
|
||||
.user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
/* l3_main_1 -> tptc1 */
|
||||
static struct omap_hwmod_ocp_if dra7xx_l3_main_1__tptc1 = {
|
||||
.master = &dra7xx_l3_main_1_hwmod,
|
||||
.slave = &dra7xx_tptc1_hwmod,
|
||||
.clk = "l3_iclk_div",
|
||||
.user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
static struct omap_hwmod_addr_space dra7xx_dss_addrs[] = {
|
||||
{
|
||||
.name = "family",
|
||||
|
@ -3366,6 +3488,9 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
|
|||
&dra7xx_l3_main_1__mcasp3,
|
||||
&dra7xx_gmac__mdio,
|
||||
&dra7xx_l4_cfg__dma_system,
|
||||
&dra7xx_l3_main_1__tpcc,
|
||||
&dra7xx_l3_main_1__tptc0,
|
||||
&dra7xx_l3_main_1__tptc1,
|
||||
&dra7xx_l3_main_1__dss,
|
||||
&dra7xx_l3_main_1__dispc,
|
||||
&dra7xx_l3_main_1__hdmi,
|
||||
|
|
|
@ -360,6 +360,7 @@
|
|||
/* PRM.L3INIT_PRM register offsets */
|
||||
#define DRA7XX_PM_L3INIT_PWRSTCTRL_OFFSET 0x0000
|
||||
#define DRA7XX_PM_L3INIT_PWRSTST_OFFSET 0x0004
|
||||
#define DRA7XX_RM_L3INIT_PCIESS_RSTCTRL_OFFSET 0x0010
|
||||
#define DRA7XX_PM_L3INIT_MMC1_WKDEP_OFFSET 0x0028
|
||||
#define DRA7XX_RM_L3INIT_MMC1_CONTEXT_OFFSET 0x002c
|
||||
#define DRA7XX_PM_L3INIT_MMC2_WKDEP_OFFSET 0x0030
|
||||
|
|
Loading…
Reference in New Issue