Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: add EBI2 clocks to the MSM8660 GCC

This adds the EBI2 2X and EBI2 clocks to the MSM8660/APQ8060
GCC. This is necessary to enable clocking of the external bus
interface so that peripherals on it can be mounted. These two
clocks are simple gated branch clocks.

In the vendor tree clock-8x60, these clocks have some kind of
dependency, the EBI2 clock has .depends = &ebi2_2x_clk.c,
what this means is undocumented, it doesn't seem like there
is a parent/child relationship, so the solution I chose was to
just have the EBI2 driver get and enable both clocks.

Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Linus Walleij and committed by
Stephen Boyd
cdbf85c1 e8e628fb

+28
+28
drivers/clk/qcom/gcc-msm8660.c
··· 2290 2290 }, 2291 2291 }; 2292 2292 2293 + static struct clk_branch ebi2_2x_clk = { 2294 + .halt_reg = 0x2fcc, 2295 + .halt_bit = 18, 2296 + .clkr = { 2297 + .enable_reg = 0x2660, 2298 + .enable_mask = BIT(4), 2299 + .hw.init = &(struct clk_init_data){ 2300 + .name = "ebi2_2x_clk", 2301 + .ops = &clk_branch_ops, 2302 + }, 2303 + }, 2304 + }; 2305 + 2306 + static struct clk_branch ebi2_clk = { 2307 + .halt_reg = 0x2fcc, 2308 + .halt_bit = 19, 2309 + .clkr = { 2310 + .enable_reg = 0x2664, 2311 + .enable_mask = BIT(4), 2312 + .hw.init = &(struct clk_init_data){ 2313 + .name = "ebi2_clk", 2314 + .ops = &clk_branch_ops, 2315 + }, 2316 + }, 2317 + }; 2318 + 2293 2319 static struct clk_branch adm0_clk = { 2294 2320 .halt_reg = 0x2fdc, 2295 2321 .halt_check = BRANCH_HALT_VOTED, ··· 2559 2533 [SDC3_H_CLK] = &sdc3_h_clk.clkr, 2560 2534 [SDC4_H_CLK] = &sdc4_h_clk.clkr, 2561 2535 [SDC5_H_CLK] = &sdc5_h_clk.clkr, 2536 + [EBI2_2X_CLK] = &ebi2_2x_clk.clkr, 2537 + [EBI2_CLK] = &ebi2_clk.clkr, 2562 2538 [ADM0_CLK] = &adm0_clk.clkr, 2563 2539 [ADM0_PBUS_CLK] = &adm0_pbus_clk.clkr, 2564 2540 [ADM1_CLK] = &adm1_clk.clkr,