diff options
author | Rajendra Nayak <rnayak@codeaurora.org> | 2015-08-06 06:37:49 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-09-16 18:22:45 -0400 |
commit | 639af9490b545bb41ae1f7623aec73d6951d5630 (patch) | |
tree | 74b7d1f371da20ba9152416728e1d598a5748c11 | |
parent | 8108b23ca7270ff2c2b551f447e57436d534d23a (diff) |
clk: qcom: gdsc: Add GDSCs in apq8084 GCC
Add the GDSC instances that exist as part of apq8084 GCC block
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/gcc-apq8084.c | 42 | ||||
-rw-r--r-- | include/dt-bindings/clock/qcom,gcc-apq8084.h | 6 |
3 files changed, 49 insertions, 0 deletions
diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig index edab1724537b..fe00dd66af88 100644 --- a/drivers/clk/qcom/Kconfig +++ b/drivers/clk/qcom/Kconfig | |||
@@ -7,6 +7,7 @@ config COMMON_CLK_QCOM | |||
7 | 7 | ||
8 | config APQ_GCC_8084 | 8 | config APQ_GCC_8084 |
9 | tristate "APQ8084 Global Clock Controller" | 9 | tristate "APQ8084 Global Clock Controller" |
10 | select QCOM_GDSC | ||
10 | depends on COMMON_CLK_QCOM | 11 | depends on COMMON_CLK_QCOM |
11 | help | 12 | help |
12 | Support for the global clock controller on apq8084 devices. | 13 | Support for the global clock controller on apq8084 devices. |
diff --git a/drivers/clk/qcom/gcc-apq8084.c b/drivers/clk/qcom/gcc-apq8084.c index 3563019b8e3c..b88c40115263 100644 --- a/drivers/clk/qcom/gcc-apq8084.c +++ b/drivers/clk/qcom/gcc-apq8084.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "clk-rcg.h" | 31 | #include "clk-rcg.h" |
32 | #include "clk-branch.h" | 32 | #include "clk-branch.h" |
33 | #include "reset.h" | 33 | #include "reset.h" |
34 | #include "gdsc.h" | ||
34 | 35 | ||
35 | enum { | 36 | enum { |
36 | P_XO, | 37 | P_XO, |
@@ -3254,6 +3255,38 @@ static struct clk_branch gcc_usb_hsic_system_clk = { | |||
3254 | }, | 3255 | }, |
3255 | }; | 3256 | }; |
3256 | 3257 | ||
3258 | static struct gdsc usb_hs_hsic_gdsc = { | ||
3259 | .gdscr = 0x404, | ||
3260 | .pd = { | ||
3261 | .name = "usb_hs_hsic", | ||
3262 | }, | ||
3263 | .pwrsts = PWRSTS_OFF_ON, | ||
3264 | }; | ||
3265 | |||
3266 | static struct gdsc pcie0_gdsc = { | ||
3267 | .gdscr = 0x1ac4, | ||
3268 | .pd = { | ||
3269 | .name = "pcie0", | ||
3270 | }, | ||
3271 | .pwrsts = PWRSTS_OFF_ON, | ||
3272 | }; | ||
3273 | |||
3274 | static struct gdsc pcie1_gdsc = { | ||
3275 | .gdscr = 0x1b44, | ||
3276 | .pd = { | ||
3277 | .name = "pcie1", | ||
3278 | }, | ||
3279 | .pwrsts = PWRSTS_OFF_ON, | ||
3280 | }; | ||
3281 | |||
3282 | static struct gdsc usb30_gdsc = { | ||
3283 | .gdscr = 0x1e84, | ||
3284 | .pd = { | ||
3285 | .name = "usb30", | ||
3286 | }, | ||
3287 | .pwrsts = PWRSTS_OFF_ON, | ||
3288 | }; | ||
3289 | |||
3257 | static struct clk_regmap *gcc_apq8084_clocks[] = { | 3290 | static struct clk_regmap *gcc_apq8084_clocks[] = { |
3258 | [GPLL0] = &gpll0.clkr, | 3291 | [GPLL0] = &gpll0.clkr, |
3259 | [GPLL0_VOTE] = &gpll0_vote, | 3292 | [GPLL0_VOTE] = &gpll0_vote, |
@@ -3447,6 +3480,13 @@ static struct clk_regmap *gcc_apq8084_clocks[] = { | |||
3447 | [GCC_USB_HSIC_SYSTEM_CLK] = &gcc_usb_hsic_system_clk.clkr, | 3480 | [GCC_USB_HSIC_SYSTEM_CLK] = &gcc_usb_hsic_system_clk.clkr, |
3448 | }; | 3481 | }; |
3449 | 3482 | ||
3483 | static struct gdsc *gcc_apq8084_gdscs[] = { | ||
3484 | [USB_HS_HSIC_GDSC] = &usb_hs_hsic_gdsc, | ||
3485 | [PCIE0_GDSC] = &pcie0_gdsc, | ||
3486 | [PCIE1_GDSC] = &pcie1_gdsc, | ||
3487 | [USB30_GDSC] = &usb30_gdsc, | ||
3488 | }; | ||
3489 | |||
3450 | static const struct qcom_reset_map gcc_apq8084_resets[] = { | 3490 | static const struct qcom_reset_map gcc_apq8084_resets[] = { |
3451 | [GCC_SYSTEM_NOC_BCR] = { 0x0100 }, | 3491 | [GCC_SYSTEM_NOC_BCR] = { 0x0100 }, |
3452 | [GCC_CONFIG_NOC_BCR] = { 0x0140 }, | 3492 | [GCC_CONFIG_NOC_BCR] = { 0x0140 }, |
@@ -3555,6 +3595,8 @@ static const struct qcom_cc_desc gcc_apq8084_desc = { | |||
3555 | .num_clks = ARRAY_SIZE(gcc_apq8084_clocks), | 3595 | .num_clks = ARRAY_SIZE(gcc_apq8084_clocks), |
3556 | .resets = gcc_apq8084_resets, | 3596 | .resets = gcc_apq8084_resets, |
3557 | .num_resets = ARRAY_SIZE(gcc_apq8084_resets), | 3597 | .num_resets = ARRAY_SIZE(gcc_apq8084_resets), |
3598 | .gdscs = gcc_apq8084_gdscs, | ||
3599 | .num_gdscs = ARRAY_SIZE(gcc_apq8084_gdscs), | ||
3558 | }; | 3600 | }; |
3559 | 3601 | ||
3560 | static const struct of_device_id gcc_apq8084_match_table[] = { | 3602 | static const struct of_device_id gcc_apq8084_match_table[] = { |
diff --git a/include/dt-bindings/clock/qcom,gcc-apq8084.h b/include/dt-bindings/clock/qcom,gcc-apq8084.h index 2c0da566c46a..5aa7ebeae411 100644 --- a/include/dt-bindings/clock/qcom,gcc-apq8084.h +++ b/include/dt-bindings/clock/qcom,gcc-apq8084.h | |||
@@ -348,4 +348,10 @@ | |||
348 | #define GCC_PCIE_1_PIPE_CLK 331 | 348 | #define GCC_PCIE_1_PIPE_CLK 331 |
349 | #define GCC_PCIE_1_SLV_AXI_CLK 332 | 349 | #define GCC_PCIE_1_SLV_AXI_CLK 332 |
350 | 350 | ||
351 | /* gdscs */ | ||
352 | #define USB_HS_HSIC_GDSC 0 | ||
353 | #define PCIE0_GDSC 1 | ||
354 | #define PCIE1_GDSC 2 | ||
355 | #define USB30_GDSC 3 | ||
356 | |||
351 | #endif | 357 | #endif |