* [PATCH v2 1/3] PM / AVS: SmartReflex: disable errgen before vpbound disable
2013-05-30 10:08 [PATCH v2 0/3] PM / AVS: SmartReflex: driver misc fixes Andrii Tseglytskyi
@ 2013-05-30 10:08 ` Andrii Tseglytskyi
2013-05-30 10:08 ` [PATCH v2 2/3] PM / AVS: SmartReflex: disable runtime PM on driver remove Andrii Tseglytskyi
2013-05-30 10:08 ` [PATCH v2 3/3] PM / AVS: SmartReflex: fix driver name Andrii Tseglytskyi
2 siblings, 0 replies; 4+ messages in thread
From: Andrii Tseglytskyi @ 2013-05-30 10:08 UTC (permalink / raw)
To: khilman, j-keerthy; +Cc: linux-kernel, linux-omap, linux-pm
From: Nishanth Menon <nm@ti.com>
vpboundsintr_en is available inside the IP block as an re-sycned
version and one which is not. Due to this, there is an 1 sysclk
cycle window where the SR_SInterruptz signal could be asserted low.
IF, intr_en is cleared on the exact same cycle as the irqclr, an
additional pulse is generated which indicates for VP that
an additional adjustment of voltage is required.
This results in VP doing two voltage adjustments for the SRERR
(based on configuration, upto 4 steps), instead of the needed
1 step.
Due to the unexpected pulse from AVS which breaks the AVS-VP
communication protocol, VP also ends up in a stuck condition by
entering a state where VP module remains non-responsive
to any futher AVS adjustment events. This creates the symptom
called "TRANXDONE Timeout" scenario.
By disabling errgen prior to disable of intr_en, this situation
can be avoided.
Signed-off-by: Vincent Bour <v-bour@ti.com>
Signed-off-by: Leonardo Affortunati <l-affortunati@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
---
drivers/power/avs/smartreflex.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index 6b2238b..f34d34d 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -449,12 +449,17 @@ int sr_disable_errgen(struct voltagedomain *voltdm)
return -EINVAL;
}
- /* Disable the interrupts of ERROR module */
- sr_modify_reg(sr, errconfig_offs, vpboundint_en | vpboundint_st, 0);
-
/* Disable the Sensor and errorgen */
sr_modify_reg(sr, SRCONFIG, SRCONFIG_SENENABLE | SRCONFIG_ERRGEN_EN, 0);
+ /*
+ * Disable the interrupts of ERROR module
+ * NOTE: modify is a read, modify,write - an implicit OCP barrier
+ * which is required is present here - sequencing is critical
+ * at this point (after errgen is disabled, vpboundint disable)
+ */
+ sr_modify_reg(sr, errconfig_offs, vpboundint_en | vpboundint_st, 0);
+
return 0;
}
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 3/3] PM / AVS: SmartReflex: fix driver name
2013-05-30 10:08 [PATCH v2 0/3] PM / AVS: SmartReflex: driver misc fixes Andrii Tseglytskyi
2013-05-30 10:08 ` [PATCH v2 1/3] PM / AVS: SmartReflex: disable errgen before vpbound disable Andrii Tseglytskyi
2013-05-30 10:08 ` [PATCH v2 2/3] PM / AVS: SmartReflex: disable runtime PM on driver remove Andrii Tseglytskyi
@ 2013-05-30 10:08 ` Andrii Tseglytskyi
2 siblings, 0 replies; 4+ messages in thread
From: Andrii Tseglytskyi @ 2013-05-30 10:08 UTC (permalink / raw)
To: khilman, j-keerthy; +Cc: linux-kernel, linux-omap, linux-pm
DRIVER_NAME was undefined for SmartReflex. Now it is
defined with valid value "smartreflex". It is needed
to define proper value for:
MODULE_ALIAS("platform:" DRIVER_NAME);
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
Acked-by: Nishanth Menon <nm@ti.com>
---
drivers/power/avs/smartreflex.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
index 9b56648..002005e 100644
--- a/drivers/power/avs/smartreflex.c
+++ b/drivers/power/avs/smartreflex.c
@@ -27,6 +27,7 @@
#include <linux/pm_runtime.h>
#include <linux/power/smartreflex.h>
+#define DRIVER_NAME "smartreflex"
#define SMARTREFLEX_NAME_LEN 16
#define NVALUE_NAME_LEN 40
#define SR_DISABLE_TIMEOUT 200
@@ -1070,7 +1071,7 @@ static struct platform_driver smartreflex_driver = {
.remove = omap_sr_remove,
.shutdown = omap_sr_shutdown,
.driver = {
- .name = "smartreflex",
+ .name = DRIVER_NAME,
},
};
--
1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread