3 * (C) COPYRIGHT ARM Limited. All rights reserved.
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
11 #define ENABLE_DEBUG_LOG
12 #include "custom_log.h"
14 #include <mali_kbase.h>
15 #include <mali_kbase_defs.h>
16 #include <mali_kbase_config.h>
18 #include <linux/pm_runtime.h>
19 #include <linux/suspend.h>
22 * @file mali_kbase_config_rk.c
23 * 对 platform_config_of_rk 的具体实现.
25 * mali_device_driver 包含两部分 :
26 * .DP : platform_dependent_part_in_mdd :
28 * 源码在 <mdd_src_dir>/platform/<platform_name>/
29 * 在 mali_device_driver 内部,
30 * 记为 platform_dependent_part,
31 * 也被记为 platform_specific_code.
32 * .DP : common_parts_in_mdd :
34 * 源码在 <mdd_src_dir>/ 下.
35 * 在 mali_device_driver 内部, 记为 common_parts.
38 /*---------------------------------------------------------------------------*/
40 int kbase_platform_rk_init(struct kbase_device *kbdev)
45 void kbase_platform_rk_term(struct kbase_device *kbdev)
49 struct kbase_platform_funcs_conf platform_funcs = {
50 .platform_init_func = &kbase_platform_rk_init,
51 .platform_term_func = &kbase_platform_rk_term,
54 /*---------------------------------------------------------------------------*/
56 static int pm_callback_power_on(struct kbase_device *kbdev)
61 static void pm_callback_power_off(struct kbase_device *kbdev)
65 int kbase_device_runtime_init(struct kbase_device *kbdev)
70 void kbase_device_runtime_disable(struct kbase_device *kbdev)
74 static int pm_callback_runtime_on(struct kbase_device *kbdev)
79 static void pm_callback_runtime_off(struct kbase_device *kbdev)
83 struct kbase_pm_callback_conf pm_callbacks = {
84 .power_on_callback = pm_callback_power_on,
85 .power_off_callback = pm_callback_power_off,
87 .power_runtime_init_callback = kbase_device_runtime_init,
88 .power_runtime_term_callback = kbase_device_runtime_disable,
89 .power_runtime_on_callback = pm_callback_runtime_on,
90 .power_runtime_off_callback = pm_callback_runtime_off,
92 .power_runtime_init_callback = NULL,
93 .power_runtime_term_callback = NULL,
94 .power_runtime_on_callback = NULL,
95 .power_runtime_off_callback = NULL,
97 #endif /* CONFIG_PM */
100 int kbase_platform_early_init(void)
102 /* Nothing needed at this stage */