summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 80c8181)
raw | patch | inline | side by side (parent: 80c8181)
author | Buddy Liong <a0270631@ti.com> | |
Sun, 28 Feb 2016 00:32:20 +0000 (18:32 -0600) | ||
committer | Buddy Liong <a0270631@ti.com> | |
Tue, 1 Mar 2016 20:13:03 +0000 (14:13 -0600) |
In ivahd_acquire and ivahd_release, Hwi_disable and Hwi_restore
are called. There is DEBUG being called when Hwi is disable.
This could be a problem as we don't want to disable Hwi for too long.
The patch is to perform register update when Hwi is disable.
Change-Id: I9bfaee561e57ce0edc66fcabbdf0d32bd8d9bc24
Signed-off-by: Buddy Liong <a0270631@ti.com>
are called. There is DEBUG being called when Hwi is disable.
This could be a problem as we don't want to disable Hwi for too long.
The patch is to perform register update when Hwi is disable.
Change-Id: I9bfaee561e57ce0edc66fcabbdf0d32bd8d9bc24
Signed-off-by: Buddy Liong <a0270631@ti.com>
src/ti/framework/dce/ivahd.c | patch | blob | history |
index 6d74646db7982258971c64d621ed4e77a0ee941c..352829b03964efa630b3bede33b7100748c97c59 100644 (file)
#endif //ENABLE_DEAD_CODE
void ivahd_acquire(void)
{
- UInt hwiKey = Hwi_disable();
-
if( ++ivahd_use_cnt == 1 ) {
DEBUG("ivahd acquire");
+ UInt hwiKey = Hwi_disable();
/* switch SW_WAKEUP mode */
CM_IVAHD_CLKSTCTRL = 0x00000002;
+ Hwi_restore(hwiKey);
} else {
DEBUG("ivahd already acquired");
}
- Hwi_restore(hwiKey);
}
void ivahd_release(void)
{
- UInt hwiKey = Hwi_disable();
-
if( ivahd_use_cnt-- == 1 ) {
DEBUG("ivahd release");
+ UInt hwiKey = Hwi_disable();
/* switch HW_AUTO mode */
CM_IVAHD_CLKSTCTRL = 0x00000003;
+ Hwi_restore(hwiKey);
} else {
DEBUG("ivahd still in use");
}
- Hwi_restore(hwiKey);
}
/* This function is to check IVA clocks to make sure IVAHD is idle */