Commit | Line | Data |
---|---|---|
d25bc64b JY |
1 | /* |
2 | * | |
142b0cea | 3 | * (C) COPYRIGHT 2011-2014, 2017 ARM Limited. All rights reserved. |
d25bc64b JY |
4 | * |
5 | * This program is free software and is provided to you under the terms of the | |
6 | * GNU General Public License version 2 as published by the Free Software | |
7 | * Foundation, and any use by you of this program is subject to the terms | |
8 | * of such GNU licence. | |
9 | * | |
10 | * A copy of the licence is included with the program, and can also be obtained | |
11 | * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
12 | * Boston, MA 02110-1301, USA. | |
13 | * | |
14 | */ | |
15 | ||
16 | ||
17 | ||
18 | #include <linux/ioport.h> | |
19 | #include <mali_kbase.h> | |
20 | #include <mali_kbase_defs.h> | |
21 | #include <mali_kbase_config.h> | |
22 | ||
d25bc64b JY |
23 | #ifndef CONFIG_OF |
24 | static struct kbase_io_resources io_resources = { | |
25 | .job_irq_number = 68, | |
26 | .mmu_irq_number = 69, | |
27 | .gpu_irq_number = 70, | |
28 | .io_memory_region = { | |
29 | .start = 0x2f010000, | |
30 | .end = 0x2f010000 + (4096 * 4) - 1} | |
31 | }; | |
32 | #endif | |
33 | ||
34 | static int pm_callback_power_on(struct kbase_device *kbdev) | |
35 | { | |
36 | /* Nothing is needed on VExpress, but we may have destroyed GPU state (if the below HARD_RESET code is active) */ | |
37 | return 1; | |
38 | } | |
39 | ||
40 | static void pm_callback_power_off(struct kbase_device *kbdev) | |
41 | { | |
d25bc64b JY |
42 | } |
43 | ||
44 | struct kbase_pm_callback_conf pm_callbacks = { | |
45 | .power_on_callback = pm_callback_power_on, | |
46 | .power_off_callback = pm_callback_power_off, | |
47 | .power_suspend_callback = NULL, | |
48 | .power_resume_callback = NULL | |
49 | }; | |
50 | ||
51 | static struct kbase_platform_config versatile_platform_config = { | |
52 | #ifndef CONFIG_OF | |
53 | .io_resources = &io_resources | |
54 | #endif | |
55 | }; | |
56 | ||
57 | struct kbase_platform_config *kbase_get_platform_config(void) | |
58 | { | |
59 | return &versatile_platform_config; | |
60 | } | |
61 | ||
62 | int kbase_platform_early_init(void) | |
63 | { | |
64 | /* Nothing needed at this stage */ | |
65 | return 0; | |
66 | } |