On 11.08.2023 13:49, Jie Luo wrote:
My main point is, why can't you use qcom_cc_really_probe?
On 8/10/2023 8:59 PM, Konrad Dybcio wrote:
On 10.08.2023 13:54, Luo Jie wrote:Hi Konrad,
Add clock & reset controller driver for qca8386/qca8084.
Signed-off-by: Luo Jie <quic_luoj@xxxxxxxxxxx>
---
+struct qcom_cc {This all, including the probe func, is required because of the MDIO dance,
+ struct qcom_reset_controller reset;
+ struct clk_regmap **rclks;
+ size_t num_rclks;
+};
I assume?
Commonizing that would make more sense should more clocks like this appear
in the future.
Thanks for the review.
the structure qcom_cc is not because of MDIO dance, this is the common structure used by other qcom clock drivers such as gcc-ipq9574 in the probe function.
seems that we can't make any more commonization on this, please let me know if there is any idea on this.
It's still not obvious at all what "phy mode" or "switch mode" are.
[...]Yes, the clock with flag CLK_IS_CRITICAL needs to be enabled, the hardware register needs to be configured to enable it, it is disabled by default.
+static struct clk_branch nss_cc_switch_core_clk = {Well it clearly cannot be disabled if it has the CLK_IS_CRITICAL flag :D
+ .halt_reg = 0x8,
+ .clkr = {
+ .enable_reg = 0x8,
+ .enable_mask = BIT(0),
+ .hw.init = &(const struct clk_init_data) {
+ .name = "nss_cc_switch_core_clk",
+ .parent_hws = (const struct clk_hw *[]) {
+ &nss_cc_switch_core_clk_src.clkr.hw,
+ },
+ .num_parents = 1,
+ /* Can be disabled in PHY mode for power saving */
What's the "PHY mode" you're talking about?
this clock branch is necessary for the switch mode that has switch features such routing and fdb forwarding, i will remove the CLK_IS_CRITICAL from the clock that is not needed for the PHY mode, we can enable it later when configuring it as switch mode.
As for PHY mode, the device works as only PHY device, that includes 4 PHY ports, no switch functions.
Are they usecases for a device based on this SoC?
Konrad