diff options
Diffstat (limited to 'arch/arm/mach-omap2/display.c')
-rw-r--r-- | arch/arm/mach-omap2/display.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 543fcb8b518..a5b7a236aa5 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <video/omapdss.h> | 25 | #include <video/omapdss.h> |
26 | #include <plat/omap_hwmod.h> | 26 | #include <plat/omap_hwmod.h> |
27 | #include <plat/omap_device.h> | 27 | #include <plat/omap_device.h> |
28 | #include <plat/omap-pm.h> | ||
28 | 29 | ||
29 | static struct platform_device omap_display_device = { | 30 | static struct platform_device omap_display_device = { |
30 | .name = "omapdss", | 31 | .name = "omapdss", |
@@ -42,20 +43,6 @@ static struct omap_device_pm_latency omap_dss_latency[] = { | |||
42 | }, | 43 | }, |
43 | }; | 44 | }; |
44 | 45 | ||
45 | /* oh_core is used for getting opt-clocks */ | ||
46 | static struct omap_hwmod *oh_core; | ||
47 | |||
48 | static bool opt_clock_available(const char *clk_role) | ||
49 | { | ||
50 | int i; | ||
51 | |||
52 | for (i = 0; i < oh_core->opt_clks_cnt; i++) { | ||
53 | if (!strcmp(oh_core->opt_clks[i].role, clk_role)) | ||
54 | return true; | ||
55 | } | ||
56 | return false; | ||
57 | } | ||
58 | |||
59 | struct omap_dss_hwmod_data { | 46 | struct omap_dss_hwmod_data { |
60 | const char *oh_name; | 47 | const char *oh_name; |
61 | const char *dev_name; | 48 | const char *dev_name; |
@@ -109,16 +96,9 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) | |||
109 | oh_count = ARRAY_SIZE(omap4_dss_hwmod_data); | 96 | oh_count = ARRAY_SIZE(omap4_dss_hwmod_data); |
110 | } | 97 | } |
111 | 98 | ||
112 | /* opt_clks are always associated with dss hwmod */ | ||
113 | oh_core = omap_hwmod_lookup("dss_core"); | ||
114 | if (!oh_core) { | ||
115 | pr_err("Could not look up dss_core.\n"); | ||
116 | return -ENODEV; | ||
117 | } | ||
118 | |||
119 | pdata.board_data = board_data; | 99 | pdata.board_data = board_data; |
120 | pdata.board_data->get_last_off_on_transaction_id = NULL; | 100 | pdata.board_data->get_context_loss_count = |
121 | pdata.opt_clock_available = opt_clock_available; | 101 | omap_pm_get_dev_context_loss_count; |
122 | 102 | ||
123 | for (i = 0; i < oh_count; i++) { | 103 | for (i = 0; i < oh_count; i++) { |
124 | oh = omap_hwmod_lookup(curr_dss_hwmod[i].oh_name); | 104 | oh = omap_hwmod_lookup(curr_dss_hwmod[i].oh_name); |