Skip to content

Commit f5467da

Browse files
committed
Merge tag 'for-v3.16-rc/omap-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.16/fixes
Two OMAP hwmod patches for early v3.16-rc kernels. There's one OMAP SoC integration fix for the AM43xx SoC, without which, IP blocks can't be placed into hard-reset. There is also one OMAP5 SoC data addition patch that should have gone in for v3.16. Normally I wouldn't send this as part of an -rc series, since it's not technically a fix. But I'd like to make an exception in this case because: - it's intended to go in very early in the v3.16-rc series (or even pre-rc1); - it's a fairly small change; - the impact is limited to a single SoC and a single device; - the only reason that it didn't go in earlier is because it "slipped through the cracks," rather than for any technical reason. Basic build, boot, and PM test logs are available here: http://www.pwsan.com/omap/testlogs/hwmod-a-v3.16-rc/20140615201307/
2 parents 9188883 + bf32c4a commit f5467da

File tree

4 files changed

+81
-6
lines changed

4 files changed

+81
-6
lines changed

arch/arm/mach-omap2/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,16 @@ obj-y += prm_common.o cm_common.o
110110
obj-$(CONFIG_ARCH_OMAP2) += prm2xxx_3xxx.o prm2xxx.o cm2xxx.o
111111
obj-$(CONFIG_ARCH_OMAP3) += prm2xxx_3xxx.o prm3xxx.o cm3xxx.o
112112
obj-$(CONFIG_ARCH_OMAP3) += vc3xxx_data.o vp3xxx_data.o
113-
obj-$(CONFIG_SOC_AM33XX) += prm33xx.o cm33xx.o
114113
omap-prcm-4-5-common = cminst44xx.o cm44xx.o prm44xx.o \
115114
prcm_mpu44xx.o prminst44xx.o \
116115
vc44xx_data.o vp44xx_data.o
117116
obj-$(CONFIG_ARCH_OMAP4) += $(omap-prcm-4-5-common)
118117
obj-$(CONFIG_SOC_OMAP5) += $(omap-prcm-4-5-common)
119118
obj-$(CONFIG_SOC_DRA7XX) += $(omap-prcm-4-5-common)
120-
obj-$(CONFIG_SOC_AM43XX) += $(omap-prcm-4-5-common)
119+
am33xx-43xx-prcm-common += prm33xx.o cm33xx.o
120+
obj-$(CONFIG_SOC_AM33XX) += $(am33xx-43xx-prcm-common)
121+
obj-$(CONFIG_SOC_AM43XX) += $(omap-prcm-4-5-common) \
122+
$(am33xx-43xx-prcm-common)
121123

122124
# OMAP voltage domains
123125
voltagedomain-common := voltage.o vc.o vp.o

arch/arm/mach-omap2/cm33xx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ void am33xx_cm_clkdm_disable_hwsup(u16 inst, u16 cdoffs);
380380
void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs);
381381
void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs);
382382

383-
#ifdef CONFIG_SOC_AM33XX
383+
#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
384384
extern int am33xx_cm_wait_module_idle(u16 inst, s16 cdoffs,
385385
u16 clkctrl_offs);
386386
extern void am33xx_cm_module_enable(u8 mode, u16 inst, s16 cdoffs,

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4251,9 +4251,9 @@ void __init omap_hwmod_init(void)
42514251
soc_ops.enable_module = _omap4_enable_module;
42524252
soc_ops.disable_module = _omap4_disable_module;
42534253
soc_ops.wait_target_ready = _omap4_wait_target_ready;
4254-
soc_ops.assert_hardreset = _omap4_assert_hardreset;
4255-
soc_ops.deassert_hardreset = _omap4_deassert_hardreset;
4256-
soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
4254+
soc_ops.assert_hardreset = _am33xx_assert_hardreset;
4255+
soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
4256+
soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted;
42574257
soc_ops.init_clkdm = _init_clkdm;
42584258
} else if (soc_is_am33xx()) {
42594259
soc_ops.enable_module = _am33xx_enable_module;

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)