diff options
author | Stephane Viau <sviau@codeaurora.org> | 2015-08-06 06:37:50 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-09-16 18:22:47 -0400 |
commit | cb2eb7de38e946e8e49536af7fa439c0f0210931 (patch) | |
tree | c6300a5f2b9a0b3f80a9eeb16038e99f61d48cab | |
parent | 639af9490b545bb41ae1f7623aec73d6951d5630 (diff) |
clk: qcom: gdsc: Add GDSCs in apq8084 MMCC
Add the GDSC instances that exist as part of apq8084 MMCC block.
Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r-- | drivers/clk/qcom/Kconfig | 1 | ||||
-rw-r--r-- | drivers/clk/qcom/mmcc-apq8084.c | 86 | ||||
-rw-r--r-- | include/dt-bindings/clock/qcom,mmcc-apq8084.h | 10 |
3 files changed, 96 insertions, 1 deletions
diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index fe00dd66af88..47b988f567e8 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig | |||
@@ -17,6 +17,7 @@ config APQ_GCC_8084 | |||
17 | config APQ_MMCC_8084 | 17 | config APQ_MMCC_8084 |
18 | tristate "APQ8084 Multimedia Clock Controller" | 18 | tristate "APQ8084 Multimedia Clock Controller" |
19 | select APQ_GCC_8084 | 19 | select APQ_GCC_8084 |
20 | select QCOM_GDSC | ||
20 | depends on COMMON_CLK_QCOM | 21 | depends on COMMON_CLK_QCOM |
21 | help | 22 | help |
22 | Support for the multimedia clock controller on apq8084 devices. | 23 | Support for the multimedia clock controller on apq8084 devices. |
diff --git a/drivers/clk/qcom/mmcc-apq8084.c b/drivers/clk/qcom/mmcc-apq8084.c index 5d2aab7663f0..aa3809d9cec5 100644 --- a/drivers/clk/qcom/mmcc-apq8084.c +++ b/drivers/clk/qcom/mmcc-apq8084.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014, The Linux Foundation. All rights reserved. | 2 | * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. |
3 | * | 3 | * |
4 | * This software is licensed under the terms of the GNU General Public | 4 | * This software is licensed under the terms of the GNU General Public |
5 | * License version 2, as published by the Free Software Foundation, and | 5 | * License version 2, as published by the Free Software Foundation, and |
@@ -26,6 +26,7 @@ | |||
26 | #include "clk-rcg.h" | 26 | #include "clk-rcg.h" |
27 | #include "clk-branch.h" | 27 | #include "clk-branch.h" |
28 | #include "reset.h" | 28 | #include "reset.h" |
29 | #include "gdsc.h" | ||
29 | 30 | ||
30 | enum { | 31 | enum { |
31 | P_XO, | 32 | P_XO, |
@@ -3063,6 +3064,76 @@ static const struct pll_config mmpll3_config = { | |||
3063 | .aux_output_mask = BIT(1), | 3064 | .aux_output_mask = BIT(1), |
3064 | }; | 3065 | }; |
3065 | 3066 | ||
3067 | static struct gdsc venus0_gdsc = { | ||
3068 | .gdscr = 0x1024, | ||
3069 | .pd = { | ||
3070 | .name = "venus0", | ||
3071 | }, | ||
3072 | .pwrsts = PWRSTS_OFF_ON, | ||
3073 | }; | ||
3074 | |||
3075 | static struct gdsc venus0_core0_gdsc = { | ||
3076 | .gdscr = 0x1040, | ||
3077 | .pd = { | ||
3078 | .name = "venus0_core0", | ||
3079 | }, | ||
3080 | .pwrsts = PWRSTS_OFF_ON, | ||
3081 | }; | ||
3082 | |||
3083 | static struct gdsc venus0_core1_gdsc = { | ||
3084 | .gdscr = 0x1044, | ||
3085 | .pd = { | ||
3086 | .name = "venus0_core1", | ||
3087 | }, | ||
3088 | .pwrsts = PWRSTS_OFF_ON, | ||
3089 | }; | ||
3090 | |||
3091 | static struct gdsc mdss_gdsc = { | ||
3092 | .gdscr = 0x2304, | ||
3093 | .cxcs = (unsigned int []){ 0x231c, 0x2320 }, | ||
3094 | .cxc_count = 2, | ||
3095 | .pd = { | ||
3096 | .name = "mdss", | ||
3097 | }, | ||
3098 | .pwrsts = PWRSTS_OFF_ON, | ||
3099 | }; | ||
3100 | |||
3101 | static struct gdsc camss_jpeg_gdsc = { | ||
3102 | .gdscr = 0x35a4, | ||
3103 | .pd = { | ||
3104 | .name = "camss_jpeg", | ||
3105 | }, | ||
3106 | .pwrsts = PWRSTS_OFF_ON, | ||
3107 | }; | ||
3108 | |||
3109 | static struct gdsc camss_vfe_gdsc = { | ||
3110 | .gdscr = 0x36a4, | ||
3111 | .cxcs = (unsigned int []){ 0x36a8, 0x36ac, 0x36b0 }, | ||
3112 | .cxc_count = 3, | ||
3113 | .pd = { | ||
3114 | .name = "camss_vfe", | ||
3115 | }, | ||
3116 | .pwrsts = PWRSTS_OFF_ON, | ||
3117 | }; | ||
3118 | |||
3119 | static struct gdsc oxili_gdsc = { | ||
3120 | .gdscr = 0x4024, | ||
3121 | .cxcs = (unsigned int []){ 0x4028 }, | ||
3122 | .cxc_count = 1, | ||
3123 | .pd = { | ||
3124 | .name = "oxili", | ||
3125 | }, | ||
3126 | .pwrsts = PWRSTS_OFF_ON, | ||
3127 | }; | ||
3128 | |||
3129 | static struct gdsc oxilicx_gdsc = { | ||
3130 | .gdscr = 0x4034, | ||
3131 | .pd = { | ||
3132 | .name = "oxilicx", | ||
3133 | }, | ||
3134 | .pwrsts = PWRSTS_OFF_ON, | ||
3135 | }; | ||
3136 | |||
3066 | static struct clk_regmap *mmcc_apq8084_clocks[] = { | 3137 | static struct clk_regmap *mmcc_apq8084_clocks[] = { |
3067 | [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, | 3138 | [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, |
3068 | [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, | 3139 | [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, |
@@ -3280,6 +3351,17 @@ static const struct qcom_reset_map mmcc_apq8084_resets[] = { | |||
3280 | [MMSSNOCAXI_RESET] = { 0x5060 }, | 3351 | [MMSSNOCAXI_RESET] = { 0x5060 }, |
3281 | }; | 3352 | }; |
3282 | 3353 | ||
3354 | static struct gdsc *mmcc_apq8084_gdscs[] = { | ||
3355 | [VENUS0_GDSC] = &venus0_gdsc, | ||
3356 | [VENUS0_CORE0_GDSC] = &venus0_core0_gdsc, | ||
3357 | [VENUS0_CORE1_GDSC] = &venus0_core1_gdsc, | ||
3358 | [MDSS_GDSC] = &mdss_gdsc, | ||
3359 | [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, | ||
3360 | [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, | ||
3361 | [OXILI_GDSC] = &oxili_gdsc, | ||
3362 | [OXILICX_GDSC] = &oxilicx_gdsc, | ||
3363 | }; | ||
3364 | |||
3283 | static const struct regmap_config mmcc_apq8084_regmap_config = { | 3365 | static const struct regmap_config mmcc_apq8084_regmap_config = { |
3284 | .reg_bits = 32, | 3366 | .reg_bits = 32, |
3285 | .reg_stride = 4, | 3367 | .reg_stride = 4, |
@@ -3294,6 +3376,8 @@ static const struct qcom_cc_desc mmcc_apq8084_desc = { | |||
3294 | .num_clks = ARRAY_SIZE(mmcc_apq8084_clocks), | 3376 | .num_clks = ARRAY_SIZE(mmcc_apq8084_clocks), |
3295 | .resets = mmcc_apq8084_resets, | 3377 | .resets = mmcc_apq8084_resets, |
3296 | .num_resets = ARRAY_SIZE(mmcc_apq8084_resets), | 3378 | .num_resets = ARRAY_SIZE(mmcc_apq8084_resets), |
3379 | .gdscs = mmcc_apq8084_gdscs, | ||
3380 | .num_gdscs = ARRAY_SIZE(mmcc_apq8084_gdscs), | ||
3297 | }; | 3381 | }; |
3298 | 3382 | ||
3299 | static const struct of_device_id mmcc_apq8084_match_table[] = { | 3383 | static const struct of_device_id mmcc_apq8084_match_table[] = { |
diff --git a/include/dt-bindings/clock/qcom,mmcc-apq8084.h b/include/dt-bindings/clock/qcom,mmcc-apq8084.h index d72b5b35f15e..03861e3f498e 100644 --- a/include/dt-bindings/clock/qcom,mmcc-apq8084.h +++ b/include/dt-bindings/clock/qcom,mmcc-apq8084.h | |||
@@ -180,4 +180,14 @@ | |||
180 | #define VPU_SLEEP_CLK 163 | 180 | #define VPU_SLEEP_CLK 163 |
181 | #define VPU_VDP_CLK 164 | 181 | #define VPU_VDP_CLK 164 |
182 | 182 | ||
183 | /* GDSCs */ | ||
184 | #define VENUS0_GDSC 0 | ||
185 | #define VENUS0_CORE0_GDSC 1 | ||
186 | #define VENUS0_CORE1_GDSC 2 | ||
187 | #define MDSS_GDSC 3 | ||
188 | #define CAMSS_JPEG_GDSC 4 | ||
189 | #define CAMSS_VFE_GDSC 5 | ||
190 | #define OXILI_GDSC 6 | ||
191 | #define OXILICX_GDSC 7 | ||
192 | |||
183 | #endif | 193 | #endif |