aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShow Liu <show.liu@linaro.org>2014-06-21 02:02:04 +0800
committerShow Liu <show.liu@linaro.org>2014-06-21 02:02:04 +0800
commit18b19ed48f8abdbbde8cdfd1821b3ff550406e52 (patch)
tree203092ec33677450dc54ab78d75d01a509cc32ab
parentd5df8b6d8ad3bdb8ec359629c65aa27b59a05253 (diff)
downloadlinaro-lsk-18b19ed48f8abdbbde8cdfd1821b3ff550406e52.tar.gz
Mali T6xx fixed for device tree binding
-rwxr-xr-xdrivers/gpu/arm/t6xx/kbase/src/linux/mali_kbase_core_linux.c93
-rw-r--r--drivers/gpu/arm/t6xx/kbase/src/platform/arndale/mali_kbase_config_arndale.c8
2 files changed, 19 insertions, 82 deletions
diff --git a/drivers/gpu/arm/t6xx/kbase/src/linux/mali_kbase_core_linux.c b/drivers/gpu/arm/t6xx/kbase/src/linux/mali_kbase_core_linux.c
index c4481598be0..0a0cf42453a 100755
--- a/drivers/gpu/arm/t6xx/kbase/src/linux/mali_kbase_core_linux.c
+++ b/drivers/gpu/arm/t6xx/kbase/src/linux/mali_kbase_core_linux.c
@@ -2481,7 +2481,7 @@ static int kbase_platform_device_probe(struct platform_device *pdev)
attribute_count = kbasep_get_config_attribute_count(config->attributes);
- kbasep_config_parse_io_resources(config->io_resources, resources);
+ //kbasep_config_parse_io_resources(config->io_resources, resources);
err = platform_device_add_data(pdev, config->attributes, attribute_count * sizeof(config->attributes[0]));
if (err)
@@ -2780,89 +2780,20 @@ static const struct of_device_id mali_of_match[] = {
};
MODULE_DEVICE_TABLE(of, mali_of_match);
-static struct platform_driver kbase_platform_driver = {
- .probe = kbase_platform_device_probe,
- .remove = kbase_platform_device_remove,
- .driver = {
- .name = kbase_drv_name,
- .owner = THIS_MODULE,
- .pm = &kbase_pm_ops,
- .of_match_table = mali_of_match,
- },
-};
-
-#ifdef CONFIG_MALI_PLATFORM_FAKE
-static struct platform_device *mali_device;
-#endif /* CONFIG_MALI_PLATFORM_FAKE */
-
-static int __init kbase_driver_init(void)
+static struct platform_driver kbase_platform_driver =
{
- int err;
-#ifdef CONFIG_MALI_PLATFORM_FAKE
- kbase_platform_config *config;
- int attribute_count;
- struct resource resources[PLATFORM_CONFIG_RESOURCE_COUNT];
-
- config = kbase_get_platform_config();
- if (config == NULL)
+ .probe = kbase_platform_device_probe,
+ .remove = kbase_platform_device_remove,
+ .driver =
{
- printk(KERN_ERR KBASE_DRV_NAME "couldn't get platform config\n");
- return -ENODEV;
- }
-
- attribute_count = kbasep_get_config_attribute_count(config->attributes);
-#ifdef CONFIG_MACH_MANTA
- err = platform_device_add_data(&exynos5_device_g3d, config->attributes, attribute_count * sizeof(config->attributes[0]));
- if (err)
- return err;
-#else
-
- mali_device = platform_device_alloc(kbase_drv_name, 0);
- if (mali_device == NULL)
- return -ENOMEM;
-
- kbasep_config_parse_io_resources(config->io_resources, resources);
- err = platform_device_add_resources(mali_device, resources, PLATFORM_CONFIG_RESOURCE_COUNT);
- if (err) {
- platform_device_put(mali_device);
- mali_device = NULL;
- return err;
- }
-
- err = platform_device_add_data(mali_device, config->attributes, attribute_count * sizeof(config->attributes[0]));
- if (err) {
- platform_device_unregister(mali_device);
- mali_device = NULL;
- return err;
- }
-
- err = platform_device_add(mali_device);
- if (err) {
- platform_device_unregister(mali_device);
- mali_device = NULL;
- return err;
- }
-#endif /* CONFIG_CONFIG_MACH_MANTA */
-#endif /* CONFIG_MALI_PLATFORM_FAKE */
- err = platform_driver_register(&kbase_platform_driver);
- if (err)
- return err;
-
- return 0;
-}
-
-static void __exit kbase_driver_exit(void)
-{
- platform_driver_unregister(&kbase_platform_driver);
-#ifdef CONFIG_MALI_PLATFORM_FAKE
- if (mali_device)
- platform_device_unregister(mali_device);
-#endif /* CONFIG_MALI_PLATFORM_FAKE */
-}
-
-module_init(kbase_driver_init);
-module_exit(kbase_driver_exit);
+ .name = kbase_drv_name,
+ .owner = THIS_MODULE,
+ .pm = &kbase_pm_ops,
+ .of_match_table = mali_of_match,
+ },
+};
+module_platform_driver(kbase_platform_driver);
MODULE_LICENSE("GPL");
MODULE_VERSION(MALI_RELEASE_NAME);
diff --git a/drivers/gpu/arm/t6xx/kbase/src/platform/arndale/mali_kbase_config_arndale.c b/drivers/gpu/arm/t6xx/kbase/src/platform/arndale/mali_kbase_config_arndale.c
index 519dae9d6a7..b2ade0ffbca 100644
--- a/drivers/gpu/arm/t6xx/kbase/src/platform/arndale/mali_kbase_config_arndale.c
+++ b/drivers/gpu/arm/t6xx/kbase/src/platform/arndale/mali_kbase_config_arndale.c
@@ -499,8 +499,9 @@ const kbase_attribute config_attributes_exynos5420[] = {
}
};
-kbase_platform_config chromebook_platform_config;
+kbase_platform_config platform_config;
kbase_platform_config *kbase_get_platform_config(void) {
+#if 0
if (soc_is_exynos5250())
{
chromebook_platform_config.attributes = config_attributes_exynos5250;
@@ -510,6 +511,11 @@ kbase_platform_config *kbase_get_platform_config(void) {
}
return NULL;
+#endif
+ platform_config.attributes = config_attributes_exynos5420;
+
+ platform_config.midgard_type = KBASE_MALI_T604;
+ return &platform_config;
}
static struct clk *clk_g3d = NULL;