Loading Documentation/devicetree/bindings/arm/msm/msm_bus_adhoc.txt +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ node-gdsc-supply: Optional node device parameter that is a reference to a GDSC s that is needed before node-clock operations. qcom,enable-only-clk: Optional property that is represents if the clock doesn't support the clk_set_rate API and should only be enabled/disabled. qcom,setrate-only-clk: Optional property that is indicates that bus driver should only set a rate on a clock handle and not call the enable/disable clock API. clock-names: Optional property that represents the clock name associated with the device "bus_clk", "bus_a_clk"; clocks: Property pair that represents the clock controller and the clock Loading drivers/platform/msm/msm_bus/msm_bus_core.h +1 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ struct nodeclk { uint64_t rate; bool dirty; bool enable_only_clk; bool setrate_only_clk; bool enable; char reg_name[MAX_REG_NAME]; }; Loading drivers/platform/msm/msm_bus/msm_bus_fabric_adhoc.c +8 −2 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ static int enable_nodeclk(struct nodeclk *nclk, struct device *dev) { int ret = 0; if (!nclk->enable) { if (!nclk->enable && !nclk->setrate_only_clk) { if (dev && strlen(nclk->reg_name)) { if (IS_ERR_OR_NULL(nclk->reg)) { ret = bus_get_reg(nclk, dev); Loading Loading @@ -214,7 +214,7 @@ static int disable_nodeclk(struct nodeclk *nclk) { int ret = 0; if (nclk->enable) { if (nclk->enable && !nclk->setrate_only_clk) { clk_disable_unprepare(nclk->clk); nclk->enable = false; bus_disable_reg(nclk); Loading Loading @@ -725,6 +725,8 @@ static int msm_bus_init_clk(struct device *bus_dev, node_dev->clk[ctx].clk = pdata->clk[ctx].clk; node_dev->clk[ctx].enable_only_clk = pdata->clk[ctx].enable_only_clk; node_dev->clk[ctx].setrate_only_clk = pdata->clk[ctx].setrate_only_clk; node_dev->clk[ctx].enable = false; node_dev->clk[ctx].dirty = false; strlcpy(node_dev->clk[ctx].reg_name, Loading @@ -740,6 +742,8 @@ static int msm_bus_init_clk(struct device *bus_dev, node_dev->bus_qos_clk.clk = pdata->bus_qos_clk.clk; node_dev->bus_qos_clk.enable_only_clk = pdata->bus_qos_clk.enable_only_clk; node_dev->bus_qos_clk.setrate_only_clk = pdata->bus_qos_clk.setrate_only_clk; node_dev->bus_qos_clk.enable = false; strlcpy(node_dev->bus_qos_clk.reg_name, pdata->bus_qos_clk.reg_name, MAX_REG_NAME); Loading @@ -763,6 +767,8 @@ static int msm_bus_init_clk(struct device *bus_dev, pdata->node_qos_clks[i].clk; node_dev->node_qos_clks[i].enable_only_clk = pdata->node_qos_clks[i].enable_only_clk; node_dev->node_qos_clks[i].setrate_only_clk = pdata->node_qos_clks[i].setrate_only_clk; node_dev->node_qos_clks[i].enable = false; strlcpy(node_dev->node_qos_clks[i].reg_name, pdata->node_qos_clks[i].reg_name, MAX_REG_NAME); Loading drivers/platform/msm/msm_bus/msm_bus_of_adhoc.c +27 −0 Original line number Diff line number Diff line Loading @@ -490,6 +490,7 @@ static int get_bus_node_device_data( struct msm_bus_node_device_type * const node_device) { bool enable_only; bool setrate_only; node_device->node_info = get_node_info_data(dev_node, pdev); if (IS_ERR_OR_NULL(node_device->node_info)) { Loading Loading @@ -519,6 +520,19 @@ static int get_bus_node_device_data( node_device->clk[DUAL_CTX].enable_only_clk = enable_only; node_device->clk[ACTIVE_CTX].enable_only_clk = enable_only; /* * Doesn't make sense to have a clk handle you can't enable or * set rate on. */ if (!enable_only) { setrate_only = of_property_read_bool(dev_node, "qcom,setrate-only-clk"); node_device->clk[DUAL_CTX].setrate_only_clk = setrate_only; node_device->clk[ACTIVE_CTX].setrate_only_clk = setrate_only; } node_device->clk[DUAL_CTX].clk = of_clk_get_by_name(dev_node, "bus_clk"); Loading Loading @@ -613,6 +627,19 @@ static int get_bus_node_device_data( node_device->clk[DUAL_CTX].enable_only_clk = enable_only; node_device->bus_qos_clk.enable_only_clk = enable_only; /* * Doesn't make sense to have a clk handle you can't enable or * set rate on. */ if (!enable_only) { setrate_only = of_property_read_bool(dev_node, "qcom,setrate-only-clk"); node_device->clk[DUAL_CTX].setrate_only_clk = setrate_only; node_device->clk[ACTIVE_CTX].setrate_only_clk = setrate_only; } node_device->clk[DUAL_CTX].clk = of_clk_get_by_name(dev_node, "node_clk"); Loading Loading
Documentation/devicetree/bindings/arm/msm/msm_bus_adhoc.txt +3 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,9 @@ node-gdsc-supply: Optional node device parameter that is a reference to a GDSC s that is needed before node-clock operations. qcom,enable-only-clk: Optional property that is represents if the clock doesn't support the clk_set_rate API and should only be enabled/disabled. qcom,setrate-only-clk: Optional property that is indicates that bus driver should only set a rate on a clock handle and not call the enable/disable clock API. clock-names: Optional property that represents the clock name associated with the device "bus_clk", "bus_a_clk"; clocks: Property pair that represents the clock controller and the clock Loading
drivers/platform/msm/msm_bus/msm_bus_core.h +1 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ struct nodeclk { uint64_t rate; bool dirty; bool enable_only_clk; bool setrate_only_clk; bool enable; char reg_name[MAX_REG_NAME]; }; Loading
drivers/platform/msm/msm_bus/msm_bus_fabric_adhoc.c +8 −2 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ static int enable_nodeclk(struct nodeclk *nclk, struct device *dev) { int ret = 0; if (!nclk->enable) { if (!nclk->enable && !nclk->setrate_only_clk) { if (dev && strlen(nclk->reg_name)) { if (IS_ERR_OR_NULL(nclk->reg)) { ret = bus_get_reg(nclk, dev); Loading Loading @@ -214,7 +214,7 @@ static int disable_nodeclk(struct nodeclk *nclk) { int ret = 0; if (nclk->enable) { if (nclk->enable && !nclk->setrate_only_clk) { clk_disable_unprepare(nclk->clk); nclk->enable = false; bus_disable_reg(nclk); Loading Loading @@ -725,6 +725,8 @@ static int msm_bus_init_clk(struct device *bus_dev, node_dev->clk[ctx].clk = pdata->clk[ctx].clk; node_dev->clk[ctx].enable_only_clk = pdata->clk[ctx].enable_only_clk; node_dev->clk[ctx].setrate_only_clk = pdata->clk[ctx].setrate_only_clk; node_dev->clk[ctx].enable = false; node_dev->clk[ctx].dirty = false; strlcpy(node_dev->clk[ctx].reg_name, Loading @@ -740,6 +742,8 @@ static int msm_bus_init_clk(struct device *bus_dev, node_dev->bus_qos_clk.clk = pdata->bus_qos_clk.clk; node_dev->bus_qos_clk.enable_only_clk = pdata->bus_qos_clk.enable_only_clk; node_dev->bus_qos_clk.setrate_only_clk = pdata->bus_qos_clk.setrate_only_clk; node_dev->bus_qos_clk.enable = false; strlcpy(node_dev->bus_qos_clk.reg_name, pdata->bus_qos_clk.reg_name, MAX_REG_NAME); Loading @@ -763,6 +767,8 @@ static int msm_bus_init_clk(struct device *bus_dev, pdata->node_qos_clks[i].clk; node_dev->node_qos_clks[i].enable_only_clk = pdata->node_qos_clks[i].enable_only_clk; node_dev->node_qos_clks[i].setrate_only_clk = pdata->node_qos_clks[i].setrate_only_clk; node_dev->node_qos_clks[i].enable = false; strlcpy(node_dev->node_qos_clks[i].reg_name, pdata->node_qos_clks[i].reg_name, MAX_REG_NAME); Loading
drivers/platform/msm/msm_bus/msm_bus_of_adhoc.c +27 −0 Original line number Diff line number Diff line Loading @@ -490,6 +490,7 @@ static int get_bus_node_device_data( struct msm_bus_node_device_type * const node_device) { bool enable_only; bool setrate_only; node_device->node_info = get_node_info_data(dev_node, pdev); if (IS_ERR_OR_NULL(node_device->node_info)) { Loading Loading @@ -519,6 +520,19 @@ static int get_bus_node_device_data( node_device->clk[DUAL_CTX].enable_only_clk = enable_only; node_device->clk[ACTIVE_CTX].enable_only_clk = enable_only; /* * Doesn't make sense to have a clk handle you can't enable or * set rate on. */ if (!enable_only) { setrate_only = of_property_read_bool(dev_node, "qcom,setrate-only-clk"); node_device->clk[DUAL_CTX].setrate_only_clk = setrate_only; node_device->clk[ACTIVE_CTX].setrate_only_clk = setrate_only; } node_device->clk[DUAL_CTX].clk = of_clk_get_by_name(dev_node, "bus_clk"); Loading Loading @@ -613,6 +627,19 @@ static int get_bus_node_device_data( node_device->clk[DUAL_CTX].enable_only_clk = enable_only; node_device->bus_qos_clk.enable_only_clk = enable_only; /* * Doesn't make sense to have a clk handle you can't enable or * set rate on. */ if (!enable_only) { setrate_only = of_property_read_bool(dev_node, "qcom,setrate-only-clk"); node_device->clk[DUAL_CTX].setrate_only_clk = setrate_only; node_device->clk[ACTIVE_CTX].setrate_only_clk = setrate_only; } node_device->clk[DUAL_CTX].clk = of_clk_get_by_name(dev_node, "node_clk"); Loading