]>
Commit | Line | Data |
---|---|---|
27d1c9b7 GKH |
1 | From 3ca4a238106dedc285193ee47f494a6584b6fd2f Mon Sep 17 00:00:00 2001 |
2 | From: Lokesh Vutla <lokeshvutla@ti.com> | |
3 | Date: Sat, 26 Mar 2016 23:08:55 -0600 | |
4 | Subject: ARM: OMAP2+: hwmod: Fix updating of sysconfig register | |
5 | ||
6 | From: Lokesh Vutla <lokeshvutla@ti.com> | |
7 | ||
8 | commit 3ca4a238106dedc285193ee47f494a6584b6fd2f upstream. | |
9 | ||
10 | Commit 127500ccb766f ("ARM: OMAP2+: Only write the sysconfig on idle | |
11 | when necessary") talks about verification of sysconfig cache value before | |
12 | updating it, only during idle path. But the patch is adding the | |
13 | verification in the enable path. So, adding the check in a proper place | |
14 | as per the commit description. | |
15 | ||
16 | Not keeping this check during enable path as there is a chance of losing | |
17 | context and it is safe to do on idle as the context of the register will | |
18 | never be lost while the device is active. | |
19 | ||
20 | Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> | |
21 | Acked-by: Tero Kristo <t-kristo@ti.com> | |
22 | Cc: Jon Hunter <jonathanh@nvidia.com> | |
23 | Fixes: commit 127500ccb766 "ARM: OMAP2+: Only write the sysconfig on idle when necessary" | |
24 | [paul@pwsan.com: appears to have been caused by my own mismerge of the | |
25 | originally posted patch] | |
26 | Signed-off-by: Paul Walmsley <paul@pwsan.com> | |
27 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
28 | ||
29 | --- | |
30 | arch/arm/mach-omap2/omap_hwmod.c | 8 ++++---- | |
31 | 1 file changed, 4 insertions(+), 4 deletions(-) | |
32 | ||
33 | --- a/arch/arm/mach-omap2/omap_hwmod.c | |
34 | +++ b/arch/arm/mach-omap2/omap_hwmod.c | |
35 | @@ -1416,9 +1416,7 @@ static void _enable_sysc(struct omap_hwm | |
36 | (sf & SYSC_HAS_CLOCKACTIVITY)) | |
37 | _set_clockactivity(oh, oh->class->sysc->clockact, &v); | |
38 | ||
39 | - /* If the cached value is the same as the new value, skip the write */ | |
40 | - if (oh->_sysc_cache != v) | |
41 | - _write_sysconfig(v, oh); | |
42 | + _write_sysconfig(v, oh); | |
43 | ||
44 | /* | |
45 | * Set the autoidle bit only after setting the smartidle bit | |
46 | @@ -1481,7 +1479,9 @@ static void _idle_sysc(struct omap_hwmod | |
47 | _set_master_standbymode(oh, idlemode, &v); | |
48 | } | |
49 | ||
50 | - _write_sysconfig(v, oh); | |
51 | + /* If the cached value is the same as the new value, skip the write */ | |
52 | + if (oh->_sysc_cache != v) | |
53 | + _write_sysconfig(v, oh); | |
54 | } | |
55 | ||
56 | /** |