.. | .. |
---|
34 | 34 | #include <linux/dma-mapping.h> |
---|
35 | 35 | #include <linux/pm_runtime.h> |
---|
36 | 36 | #include <linux/delay.h> |
---|
37 | | -#include <linux/regmap.h> |
---|
38 | | -#include <linux/mfd/syscon.h> |
---|
39 | 37 | #include <linux/rockchip/cpu.h> |
---|
40 | 38 | #include <soc/rockchip/rockchip_ipa.h> |
---|
41 | 39 | #include <soc/rockchip/rockchip_opp_select.h> |
---|
.. | .. |
---|
50 | 48 | |
---|
51 | 49 | /*---------------------------------------------------------------------------*/ |
---|
52 | 50 | |
---|
53 | | -#define RK3528_GPU_SD_SLP_HAST 0x10024 |
---|
54 | 51 | #define DEFAULT_UTILISATION_PERIOD_IN_MS (100) |
---|
55 | 52 | |
---|
56 | 53 | /* |
---|
.. | .. |
---|
59 | 56 | struct rk_context { |
---|
60 | 57 | /* mali device. */ |
---|
61 | 58 | struct device *dev; |
---|
62 | | - struct regmap *grf; |
---|
63 | 59 | /* is the GPU powered on? */ |
---|
64 | 60 | bool is_powered; |
---|
65 | 61 | /* debug only, the period in ms to count gpu_utilisation. */ |
---|
.. | .. |
---|
188 | 184 | } |
---|
189 | 185 | |
---|
190 | 186 | platform->dev = dev; |
---|
191 | | - platform->grf = syscon_regmap_lookup_by_phandle(dev->of_node, |
---|
192 | | - "rockchip,grf"); |
---|
193 | | - if (IS_ERR(platform->grf)) |
---|
194 | | - platform->grf = NULL; |
---|
195 | 187 | platform->is_powered = false; |
---|
196 | 188 | |
---|
197 | 189 | platform->utilisation_period = DEFAULT_UTILISATION_PERIOD_IN_MS; |
---|
.. | .. |
---|
476 | 468 | |
---|
477 | 469 | clk_set_rate(mdev->clock, mdev->current_freq); |
---|
478 | 470 | #endif |
---|
479 | | - if (platform->grf) |
---|
480 | | - regmap_write(platform->grf, |
---|
481 | | - RK3528_GPU_SD_SLP_HAST, |
---|
482 | | - 0xffff0000); |
---|
483 | 471 | } |
---|
484 | | - |
---|
485 | 472 | platform->is_powered = true; |
---|
486 | 473 | } |
---|
487 | 474 | |
---|
.. | .. |
---|
506 | 493 | //use normal pll 200M for gpu when suspend |
---|
507 | 494 | clk_set_rate(mdev->clock, 200000000); |
---|
508 | 495 | #endif |
---|
509 | | - if (platform->grf) |
---|
510 | | - regmap_write(platform->grf, |
---|
511 | | - RK3528_GPU_SD_SLP_HAST, |
---|
512 | | - 0xfffffffd); |
---|
513 | 496 | } |
---|
514 | 497 | rk_platform_disable_clk_gpu(dev); |
---|
515 | 498 | rk_platform_disable_gpu_regulator(dev); |
---|