From 3c562205635af8e12959f8ccf3e385f0f17f0537 Mon Sep 17 00:00:00 2001 From: chenzhen Date: Thu, 10 Nov 2016 14:52:57 +0800 Subject: [PATCH] MALI: utgard: RK: fix compile errors under arm64 Change-Id: I88df540e9822f148703aa07f74fbea59fbbf3350 Signed-off-by: chenzhen --- .../arm/mali400/mali/linux/mali_kernel_linux.c | 6 ++++-- .../mali400/mali/platform/rk30/mali_platform.c | 6 +++--- .../gpu/arm/mali400/mali/platform/rk30/rk3066.c | 17 +++++++---------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c b/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c index ec481ba2797c..29964d199163 100755 --- a/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c +++ b/drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c @@ -497,8 +497,10 @@ static int mali_probe(struct platform_device *pdev) int i = 0; for(i = 0; i < mali_platform_device->num_resources; i++) - dev_info(&pdev->dev, "mali_platform_device->resource[%d].start = 0x%08x\n", - i, mali_platform_device->resource[i].start); + dev_info(&pdev->dev, + "resource[%d].start = 0x%pa\n", + i, + &mali_platform_device->resource[i].start); } #ifdef CONFIG_MALI_DT diff --git a/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c b/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c index bd73ea4e01c6..00d4e09891fd 100644 --- a/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c +++ b/drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c @@ -232,9 +232,9 @@ static ssize_t show_utilisation(struct device *dev, return scnprintf(buf, PAGE_SIZE, "%u\n", mali_dvfs_utilisation(dev)); } -static int error_count_show(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t error_count_show(struct device *dev, + struct device_attribute *attr, + char *buf) { return sprintf(buf, "%d\n", mali_group_error); } diff --git a/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c b/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c index e8c607e59af9..f7d264459da1 100644 --- a/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c +++ b/drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef CONFIG_PM_RUNTIME #include #endif @@ -224,18 +225,14 @@ int mali_platform_device_init(struct platform_device *pdev) D("mali_platform_device_register() called\n"); - /* - if (cpu_is_rk312x()) - num_pp_cores = 2; - else if (cpu_is_rk3036()) - */ + if (of_machine_is_compatible("rockchip,rk3036")) num_pp_cores = 1; - /* - else if (cpu_is_rk3188()) - num_pp_cores = 4; - else if (cpu_is_rk3228()) + else if (of_machine_is_compatible("rockchip,rk3228h")) + num_pp_cores = 2; + else if (of_machine_is_compatible("rockchip,rk3328h")) + num_pp_cores = 2; + else num_pp_cores = 2; - */ D("to add config."); mali_platform_device_add_config(pdev); -- 2.34.1