diff options
author | Guillaume Tucker <guillaume.tucker@arm.com> | 2015-02-23 11:52:29 +0000 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2016-02-02 19:32:29 -0800 |
commit | 12c1ba4058ffb825bdbafb24e833b4dc6356b241 (patch) | |
tree | 1e86aff38f3886eec52c92597a0a23cf2fbbd3fa | |
parent | b6ee9bc31cd139fd8feb8f0a7963f5af98b46691 (diff) | |
download | hikey-linaro-12c1ba4058ffb825bdbafb24e833b4dc6356b241.tar.gz |
drivers/gpu/arm/utgard: add option for custom device tree
Some Mali 450 Utgard GPU platform integration files like
the HiKey need a custom Device Tree entry. This config
option is to disable the standard driver code that expects
things in the device tree which conflict with what the
platform files need.
This is only an interim solution, tne platform files should
really be tidied-up to enable the standard device tree
instead (would require adding more IRQ and other resources).
Signed-off-by: Guillaume Tucker <guillaume.tucker@arm.com>
-rw-r--r-- | drivers/gpu/arm/utgard/Kconfig | 12 | ||||
-rw-r--r-- | drivers/gpu/arm/utgard/common/mali_kernel_core.c | 2 | ||||
-rw-r--r-- | drivers/gpu/arm/utgard/common/mali_osk_mali.h | 2 | ||||
-rw-r--r-- | drivers/gpu/arm/utgard/linux/mali_osk_mali.c | 4 |
4 files changed, 16 insertions, 4 deletions
diff --git a/drivers/gpu/arm/utgard/Kconfig b/drivers/gpu/arm/utgard/Kconfig index f199123e6989..e174e572d182 100644 --- a/drivers/gpu/arm/utgard/Kconfig +++ b/drivers/gpu/arm/utgard/Kconfig @@ -96,6 +96,18 @@ config MALI_DT device tree is enabled in kernel and corresponding hardware description is implemented properly in device DTS file. +config MALI_PLAT_SPECIFIC_DT + bool "Platform specific Device Tree is being used" + depends on MALI_DT + default n + ---help--- + This is a pragmatic approach for some platforms which make + use of a device tree entry that does not strictly comply to + what the standard Utgard driver expects to find, but have + their platform data implemented the old way. Such platforms + should be converted to using the Device Tree so this + configuration option can be removed. + config MALI_QUIET bool "Make Mali driver very quiet" depends on MALI400 && !MALI400_DEBUG diff --git a/drivers/gpu/arm/utgard/common/mali_kernel_core.c b/drivers/gpu/arm/utgard/common/mali_kernel_core.c index 6dca53af2e47..b9a6b7a0a277 100644 --- a/drivers/gpu/arm/utgard/common/mali_kernel_core.c +++ b/drivers/gpu/arm/utgard/common/mali_kernel_core.c @@ -738,7 +738,7 @@ _mali_osk_errcode_t mali_initialize_subsystems(void) { _mali_osk_errcode_t err; -#ifdef CONFIG_MALI_DT +#if defined(CONFIG_MALI_DT) && !defined(CONFIG_MALI_PLAT_SPECIFIC_DT) err = _mali_osk_resource_initialize(); if (_MALI_OSK_ERR_OK != err) { mali_terminate_subsystems(); diff --git a/drivers/gpu/arm/utgard/common/mali_osk_mali.h b/drivers/gpu/arm/utgard/common/mali_osk_mali.h index 230dbecc2040..b27fb7dd36ed 100644 --- a/drivers/gpu/arm/utgard/common/mali_osk_mali.h +++ b/drivers/gpu/arm/utgard/common/mali_osk_mali.h @@ -30,7 +30,7 @@ extern "C" { */ typedef struct mali_gpu_device_data _mali_osk_device_data; -#ifdef CONFIG_MALI_DT +#if defined(CONFIG_MALI_DT) && !defined(CONFIG_MALI_PLAT_SPECIFIC_DT) /** @brief Initialize those device resources when we use device tree * * @return _MALI_OSK_ERR_OK on success, otherwise failure. diff --git a/drivers/gpu/arm/utgard/linux/mali_osk_mali.c b/drivers/gpu/arm/utgard/linux/mali_osk_mali.c index ee82b6ee8b75..a3749d8057b4 100644 --- a/drivers/gpu/arm/utgard/linux/mali_osk_mali.c +++ b/drivers/gpu/arm/utgard/linux/mali_osk_mali.c @@ -25,7 +25,7 @@ #include "mali_kernel_linux.h" -#ifdef CONFIG_MALI_DT +#if defined(CONFIG_MALI_DT) && !defined(CONFIG_MALI_PLAT_SPECIFIC_DT) #define MALI_OSK_INVALID_RESOURCE_ADDRESS 0xFFFFFFFF @@ -248,7 +248,7 @@ u32 _mali_osk_get_pmu_switch_delay(void) return 0; } -#else /* CONFIG_MALI_DT */ +#else /* CONFIG_MALI_DT && !CONFIG_MALI_PLAT_SPECIFIC_DT */ _mali_osk_errcode_t _mali_osk_resource_find(u32 addr, _mali_osk_resource_t *res) { |