mali_hw_core_register_write_relaxed(&pmu->hw_core, PMU_REG_ADDR_MGMT_INT_MASK, 0);
mali_hw_core_register_write_relaxed(&pmu->hw_core, PMU_REG_ADDR_MGMT_SW_DELAY, pmu->switch_delay);
- err = mali_pmu_send_command(pmu, PMU_REG_ADDR_MGMT_POWER_UP, pmu->active_cores_mask);
+ if (pmu->active_cores_mask & 1) {
+ err = mali_pmu_send_command(pmu, PMU_REG_ADDR_MGMT_POWER_UP, 1);
+ }
+
+ if ( err == _MALI_OSK_ERR_OK && pmu->active_cores_mask & 2) {
+ _mali_osk_time_ubusydelay(2);
+ err = mali_pmu_send_command(pmu, PMU_REG_ADDR_MGMT_POWER_UP, 2);
+ }
+
+ if ( err == _MALI_OSK_ERR_OK && pmu->active_cores_mask & 4) {
+ _mali_osk_time_ubusydelay(2);
+ err = mali_pmu_send_command(pmu, PMU_REG_ADDR_MGMT_POWER_UP, 4);
+ }
+
+ if ( err == _MALI_OSK_ERR_OK && pmu->active_cores_mask & 8) {
+ _mali_osk_time_ubusydelay(2);
+ err = mali_pmu_send_command(pmu, PMU_REG_ADDR_MGMT_POWER_UP, 8);
+ }
mali_pmu_unlock(pmu);
return err;
#include "mali_scaling.h"
#include "mali_clock.h"
+#include "common/mali_pmu.h"
/* Configure dvfs mode */
enum mali_scale_mode_t {
static int mali_runtime_suspend(struct device *device)
{
int ret = 0;
+ struct mali_pmu_core* pmu;
MALI_DEBUG_PRINT(4, ("mali_runtime_suspend() called\n"));
}
/* clock scaling. Kasin..*/
+ pmu = mali_pmu_get_global_pmu_core();
+ mali_pmu_power_down_all(pmu);
+
disable_clock();
return ret;
}
static int mali_runtime_resume(struct device *device)
{
int ret = 0;
+ struct mali_pmu_core* pmu;
MALI_DEBUG_PRINT(4, ("mali_runtime_resume() called\n"));
/* clock scaling. Kasin..*/
enable_clock();
+ pmu = mali_pmu_get_global_pmu_core();
+ mali_pmu_power_up_all(pmu);
if (NULL != device->driver &&
NULL != device->driver->pm &&