Loading Documentation/devicetree/bindings/arm/msm/msm_hang_detect.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ The device tree parameters for the core hang detection are: Required properties: - compatible : "qcom,core-hang-detect" - label: unique name used to created sysfs entry - qcom,threshold-arr : Array of APCS_ALIAS*_CORE_HANG_THRESHOLD register address for each core. Loading arch/arm/boot/dts/qcom/msmcobalt.dtsi +12 −4 Original line number Diff line number Diff line Loading @@ -1135,13 +1135,21 @@ qcom,firmware-name = "ipa_fws"; }; qcom,chd { qcom,chd_silver { compatible = "qcom,core-hang-detect"; label = "silver"; qcom,threshold-arr = <0x179880b0 0x179980b0 0x179a80b0 0x179b80b0 0x178880b0 0x178980b0 0x178a80b0 0x178b80b0>; 0x179a80b0 0x179b80b0>; qcom,config-arr = <0x179880b8 0x179980b8 0x179a80b8 0x179b80b8 0x178880b8 0x178980b8 0x179a80b8 0x179b80b8>; }; qcom,chd_gold { compatible = "qcom,core-hang-detect"; label = "gold"; qcom,threshold-arr = <0x178880b0 0x178980b0 0x178a80b0 0x178b80b0>; qcom,config-arr = <0x178880b8 0x178980b8 0x178a80b8 0x178b80b8>; }; Loading drivers/soc/qcom/core_hang_detect.c +20 −4 Original line number Diff line number Diff line Loading @@ -245,7 +245,9 @@ static int msm_hang_detect_probe(struct platform_device *pdev) struct device_node *node = pdev->dev.of_node; struct hang_detect *hang_det = NULL; int cpu, ret, cpu_count = 0; u32 treg[NR_CPUS], creg[NR_CPUS]; const char *name; u32 treg[NR_CPUS] = {0}, creg[NR_CPUS] = {0}; u32 num_reg = 0; if (!pdev->dev.of_node || !enable) return -ENODEV; Loading @@ -258,15 +260,28 @@ static int msm_hang_detect_probe(struct platform_device *pdev) return -ENOMEM; } name = of_get_property(node, "label", NULL); if (!name) { pr_err("Can't get label property\n"); return -EINVAL; } num_reg = of_property_count_u32_elems(node, "qcom,threshold-arr"); if (num_reg < 0) { pr_err("Can't get threshold-arr property\n"); return -EINVAL; } ret = of_property_read_u32_array(node, "qcom,threshold-arr", treg, num_possible_cpus()); treg, num_reg); if (ret) { pr_err("Can't get threshold-arr property\n"); return -EINVAL; } ret = of_property_read_u32_array(node, "qcom,config-arr", creg, num_possible_cpus()); creg, num_reg); if (ret) { pr_err("Can't get config-arr property\n"); return -EINVAL; Loading @@ -289,7 +304,8 @@ static int msm_hang_detect_probe(struct platform_device *pdev) } ret = kobject_init_and_add(&hang_det->kobj, &core_ktype, &cpu_subsys.dev_root->kobj, "%s", "hang_detect"); &cpu_subsys.dev_root->kobj, "%s_%s", "hang_detect", name); if (ret) { pr_err("%s:Error in creation kobject_add\n", __func__); goto out_put_kobj; Loading Loading
Documentation/devicetree/bindings/arm/msm/msm_hang_detect.txt +1 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ The device tree parameters for the core hang detection are: Required properties: - compatible : "qcom,core-hang-detect" - label: unique name used to created sysfs entry - qcom,threshold-arr : Array of APCS_ALIAS*_CORE_HANG_THRESHOLD register address for each core. Loading
arch/arm/boot/dts/qcom/msmcobalt.dtsi +12 −4 Original line number Diff line number Diff line Loading @@ -1135,13 +1135,21 @@ qcom,firmware-name = "ipa_fws"; }; qcom,chd { qcom,chd_silver { compatible = "qcom,core-hang-detect"; label = "silver"; qcom,threshold-arr = <0x179880b0 0x179980b0 0x179a80b0 0x179b80b0 0x178880b0 0x178980b0 0x178a80b0 0x178b80b0>; 0x179a80b0 0x179b80b0>; qcom,config-arr = <0x179880b8 0x179980b8 0x179a80b8 0x179b80b8 0x178880b8 0x178980b8 0x179a80b8 0x179b80b8>; }; qcom,chd_gold { compatible = "qcom,core-hang-detect"; label = "gold"; qcom,threshold-arr = <0x178880b0 0x178980b0 0x178a80b0 0x178b80b0>; qcom,config-arr = <0x178880b8 0x178980b8 0x178a80b8 0x178b80b8>; }; Loading
drivers/soc/qcom/core_hang_detect.c +20 −4 Original line number Diff line number Diff line Loading @@ -245,7 +245,9 @@ static int msm_hang_detect_probe(struct platform_device *pdev) struct device_node *node = pdev->dev.of_node; struct hang_detect *hang_det = NULL; int cpu, ret, cpu_count = 0; u32 treg[NR_CPUS], creg[NR_CPUS]; const char *name; u32 treg[NR_CPUS] = {0}, creg[NR_CPUS] = {0}; u32 num_reg = 0; if (!pdev->dev.of_node || !enable) return -ENODEV; Loading @@ -258,15 +260,28 @@ static int msm_hang_detect_probe(struct platform_device *pdev) return -ENOMEM; } name = of_get_property(node, "label", NULL); if (!name) { pr_err("Can't get label property\n"); return -EINVAL; } num_reg = of_property_count_u32_elems(node, "qcom,threshold-arr"); if (num_reg < 0) { pr_err("Can't get threshold-arr property\n"); return -EINVAL; } ret = of_property_read_u32_array(node, "qcom,threshold-arr", treg, num_possible_cpus()); treg, num_reg); if (ret) { pr_err("Can't get threshold-arr property\n"); return -EINVAL; } ret = of_property_read_u32_array(node, "qcom,config-arr", creg, num_possible_cpus()); creg, num_reg); if (ret) { pr_err("Can't get config-arr property\n"); return -EINVAL; Loading @@ -289,7 +304,8 @@ static int msm_hang_detect_probe(struct platform_device *pdev) } ret = kobject_init_and_add(&hang_det->kobj, &core_ktype, &cpu_subsys.dev_root->kobj, "%s", "hang_detect"); &cpu_subsys.dev_root->kobj, "%s_%s", "hang_detect", name); if (ret) { pr_err("%s:Error in creation kobject_add\n", __func__); goto out_put_kobj; Loading