diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 2c27fdb61e66..7144ae651d3d 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1422,6 +1422,9 @@ static int _ocp_softreset(struct omap_hwmod *oh) | |||
1422 | goto dis_opt_clks; | 1422 | goto dis_opt_clks; |
1423 | _write_sysconfig(v, oh); | 1423 | _write_sysconfig(v, oh); |
1424 | 1424 | ||
1425 | if (oh->class->sysc->srst_udelay) | ||
1426 | udelay(oh->class->sysc->srst_udelay); | ||
1427 | |||
1425 | if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS) | 1428 | if (oh->class->sysc->sysc_flags & SYSS_HAS_RESET_STATUS) |
1426 | omap_test_timeout((omap_hwmod_read(oh, | 1429 | omap_test_timeout((omap_hwmod_read(oh, |
1427 | oh->class->sysc->syss_offs) | 1430 | oh->class->sysc->syss_offs) |
@@ -1903,10 +1906,20 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs) | |||
1903 | */ | 1906 | */ |
1904 | int omap_hwmod_softreset(struct omap_hwmod *oh) | 1907 | int omap_hwmod_softreset(struct omap_hwmod *oh) |
1905 | { | 1908 | { |
1906 | if (!oh) | 1909 | u32 v; |
1910 | int ret; | ||
1911 | |||
1912 | if (!oh || !(oh->_sysc_cache)) | ||
1907 | return -EINVAL; | 1913 | return -EINVAL; |
1908 | 1914 | ||
1909 | return _ocp_softreset(oh); | 1915 | v = oh->_sysc_cache; |
1916 | ret = _set_softreset(oh, &v); | ||
1917 | if (ret) | ||
1918 | goto error; | ||
1919 | _write_sysconfig(v, oh); | ||
1920 | |||
1921 | error: | ||
1922 | return ret; | ||
1910 | } | 1923 | } |
1911 | 1924 | ||
1912 | /** | 1925 | /** |