MALI: utgard: RK: fix compile errors under arm64
authorchenzhen <chenzhen@rock-chips.com>
Thu, 10 Nov 2016 06:52:57 +0000 (14:52 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 5 Apr 2017 09:14:44 +0000 (17:14 +0800)
Change-Id: I88df540e9822f148703aa07f74fbea59fbbf3350
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c
drivers/gpu/arm/mali400/mali/platform/rk30/mali_platform.c
drivers/gpu/arm/mali400/mali/platform/rk30/rk3066.c

index ec481ba2797cb84d618bdf27d83f006bc544e924..29964d199163eadb2ca20fa5485cec87268995c6 100755 (executable)
@@ -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
index bd73ea4e01c6844aa2728b9c80472d90ac862800..00d4e09891fd02da26d792292fcf988c0e6a1cfb 100644 (file)
@@ -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);
 }
index e8c607e59af966838440f375af29adb0ddb93bca..f7d264459da1da9ad51c1ec5ec8f52f99a69b3f2 100644 (file)
@@ -27,6 +27,7 @@
 #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
@@ -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);