diff options
author | John Stultz <john.stultz@linaro.org> | 2015-11-10 13:39:46 -0800 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2016-02-02 19:32:32 -0800 |
commit | 7b70a1df99084ecd51f436c9e2f1cdf9aa7c1db8 (patch) | |
tree | e23b646082daae0e45eb7ba92ffb0ff3dd150014 | |
parent | f7364ab617b5ae9bbc44b7efa255ef39049dfd3c (diff) | |
download | hikey-linaro-7b70a1df99084ecd51f436c9e2f1cdf9aa7c1db8.tar.gz |
mali_hikey: Modify irq initialization in mali hikey platform logic
Due to the irq domain code landing upstream in 3.19, the logic
for requesting irqs in the hikey platform code no longer works.
This patch tries to sovle the issue by using platform_irq_get
to fetch irq details from the DT entry (which properly sets up
the irq through the GIC), and then re-writes the static tables
so irq code gets the right irq number.
This patch cheats a bit, since it only calls platform_irq_get()
once on the first interrupt value in the DT, but that's because
the mali device shares interrupts.
Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r-- | drivers/gpu/arm/utgard/platform/hikey/mali_hikey.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/arm/utgard/platform/hikey/mali_hikey.c b/drivers/gpu/arm/utgard/platform/hikey/mali_hikey.c index b7a4338225fd..186ff887ef42 100644 --- a/drivers/gpu/arm/utgard/platform/hikey/mali_hikey.c +++ b/drivers/gpu/arm/utgard/platform/hikey/mali_hikey.c @@ -622,6 +622,7 @@ static void mali_unmap_soc_addr(void) int mali_platform_device_init(struct platform_device *pdev) { int stat; + int irq, i; #if HISI6220_USE_ION stat = mali_ion_mem_init(); @@ -647,6 +648,17 @@ int mali_platform_device_init(struct platform_device *pdev) return -EINVAL; } + /* + * We need to use DT to get the irq domain, so rewrite the static + * table with the irq given from platform_get_irq(). + */ + irq = platform_get_irq(pdev, 0); + for (i = 0; i < ARRAY_SIZE(mali_gpu_resources_m450_mp4); i++) { + if (IORESOURCE_IRQ & mali_gpu_resources_m450_mp4[i].flags) { + mali_gpu_resources_m450_mp4[i].start = irq; + mali_gpu_resources_m450_mp4[i].end = irq; + } + } pdev->num_resources = ARRAY_SIZE(mali_gpu_resources_m450_mp4); pdev->resource = mali_gpu_resources_m450_mp4; |