2 * Copyright (C) 2010, 2012 ARM Limited. All rights reserved.
4 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
5 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
7 * A copy of the licence is included with the program, and can also be obtained from Free Software
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12 * @file mali_pmu_power_up_down.c
15 #include <linux/version.h>
16 #include <linux/sched.h>
17 #include <linux/module.h>
19 #include "mali_kernel_common.h"
21 #include "mali_pp_scheduler.h"
22 #include "linux/mali/mali_utgard.h"
24 /* Mali PMU power up/down APIs */
26 int mali_pmu_powerup(void)
28 struct mali_pmu_core *pmu = mali_pmu_get_global_pmu_core();
30 MALI_DEBUG_PRINT(5, ("Mali PMU: Power up\n"));
32 MALI_DEBUG_ASSERT_POINTER(pmu);
37 if (_MALI_OSK_ERR_OK != mali_pmu_power_up_all(pmu)) {
44 EXPORT_SYMBOL(mali_pmu_powerup);
46 int mali_pmu_powerdown(void)
48 struct mali_pmu_core *pmu = mali_pmu_get_global_pmu_core();
50 MALI_DEBUG_PRINT(5, ("Mali PMU: Power down\n"));
52 MALI_DEBUG_ASSERT_POINTER(pmu);
57 if (_MALI_OSK_ERR_OK != mali_pmu_power_down_all(pmu)) {
64 EXPORT_SYMBOL(mali_pmu_powerdown);
66 int mali_perf_set_num_pp_cores(unsigned int num_cores)
68 return mali_pp_scheduler_set_perf_level(num_cores, MALI_FALSE);
71 EXPORT_SYMBOL(mali_perf_set_num_pp_cores);