From cd69ea2c185ec10d849e4e241f7197da52d775d6 Mon Sep 17 00:00:00 2001 From: Kasin Lee Date: Thu, 19 Sep 2013 10:23:04 +0800 Subject: [PATCH] remove useless sentence, add gate off to runtime_pm callback --- mali/platform/meson8/mali_clock.c | 2 +- mali/platform/meson8/mali_clock.h | 2 ++ mali/platform/meson8/meson_main.c | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mali/platform/meson8/mali_clock.c b/mali/platform/meson8/mali_clock.c index a62e911..63dbcb6 100644 --- a/mali/platform/meson8/mali_clock.c +++ b/mali/platform/meson8/mali_clock.c @@ -18,7 +18,7 @@ int mali_clock_set(unsigned int clock) { clrbits_le32(P_HHI_MALI_CLK_CNTL, (0x7F | (0x7 << 9))); writel(clock, P_HHI_MALI_CLK_CNTL | (1 << 8)); /* set clock to 333MHZ.*/ setbits_le32(P_HHI_MALI_CLK_CNTL, 1 << 8); - //writel(0x0001c007, P_HHI_MPLL_CNTL4); + writel(0x0001c007, P_HHI_MPLL_CNTL4); } void disable_clock(void) diff --git a/mali/platform/meson8/mali_clock.h b/mali/platform/meson8/mali_clock.h index 916108c..0a1cad4 100644 --- a/mali/platform/meson8/mali_clock.h +++ b/mali/platform/meson8/mali_clock.h @@ -33,5 +33,7 @@ extern unsigned int min_mali_clock_index; extern unsigned int max_mali_clock_index; extern int mali_clock_set(unsigned int index); +extern void disable_clock(void); +extern void enable_clock(void); #endif /* _MALI_CLOCK_H_ */ diff --git a/mali/platform/meson8/meson_main.c b/mali/platform/meson8/meson_main.c index a968022..824a1f7 100755 --- a/mali/platform/meson8/meson_main.c +++ b/mali/platform/meson8/meson_main.c @@ -226,7 +226,7 @@ static int mali_os_suspend(struct device *device) } /* clock scaling off. Kasin... */ - mali_pmu_powerdown(); + return ret; } @@ -238,7 +238,7 @@ static int mali_os_resume(struct device *device) MALI_DEBUG_PRINT(4, ("mali_os_resume() called\n")); /* clock scaling up. Kasin.. */ - mali_pmu_powerup(); + if (NULL != device->driver && NULL != device->driver->pm && @@ -301,6 +301,7 @@ static int mali_runtime_suspend(struct device *device) } /* clock scaling. Kasin..*/ + disable_clock(); return ret; } @@ -311,6 +312,7 @@ static int mali_runtime_resume(struct device *device) MALI_DEBUG_PRINT(4, ("mali_runtime_resume() called\n")); /* clock scaling. Kasin..*/ + enable_clock(); if (NULL != device->driver && NULL != device->driver->pm && -- 2.20.1