#include <linux/platform_device.h>
#include <linux/version.h>
#include <linux/pm.h>
+#include <linux/of.h>
#ifdef CONFIG_PM_RUNTIME
#include <linux/pm_runtime.h>
#endif
#include <linux/mali/mali_utgard.h>
#include "mali_kernel_common.h"
#include "mali_platform.h"
-#include "arm_core_scaling.h"
#ifdef CONFIG_PM_RUNTIME
static int mali_runtime_suspend(struct device *device)
*/
int mali_platform_device_init(struct platform_device *pdev)
{
-// error
int err = 0;
- int num_pp_cores = 0;
-
- D("mali_platform_device_register() called\n");
-
- /*
- if (cpu_is_rk312x())
- num_pp_cores = 2;
- else if (cpu_is_rk3036())
- */
- num_pp_cores = 1;
- /*
- else if (cpu_is_rk3188())
- num_pp_cores = 4;
- else if (cpu_is_rk3228())
- num_pp_cores = 2;
- */
-
- D("to add config.");
- mali_platform_device_add_config(pdev);
D("to add data to platform_device..");
/* 将 platform_specific_data 添加到 platform_device_of_mali_gpu.
pm_runtime_use_autosuspend(&(pdev->dev));
pm_runtime_enable(&(pdev->dev));
#endif
- MALI_DEBUG_ASSERT(0 < num_pp_cores);
- mali_core_scaling_init(num_pp_cores);
return 0;
}
}