Skip to content

Commit

Permalink
[debug] added some debug-infos for wifi-crash @ init-reset
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Wunderlich <[email protected]>
  • Loading branch information
frank-w committed May 15, 2018
1 parent b65262d commit 3605bc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/mt7623.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@
<GIC_SPI 163 IRQ_TYPE_LEVEL_LOW>; /* WDT_EINT */
resets = <&watchdog MT2701_TOPRGU_CONN_MCU_RST>;
reset-names = "connsys";
#reset-cells = <1>;
status="disabled";
};

Expand Down
8 changes: 8 additions & 0 deletions drivers/reset/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
*/
int reset_controller_register(struct reset_controller_dev *rcdev)
{
printk(KERN_WARNING "%s: (%s:%i) of_node=%s", __FUNCTION__, __FILE__, __LINE__, rcdev->of_node ? rcdev->of_node->name : "<NULL>");
if (!rcdev->of_xlate) {
rcdev->of_reset_n_cells = 1;
rcdev->of_xlate = of_reset_simple_xlate;
Expand Down Expand Up @@ -438,13 +439,15 @@ struct reset_control *__of_reset_control_get(struct device_node *node,
struct of_phandle_args args;
int rstc_id;
int ret;
printk(KERN_WARNING "%s: (%s:%i) node=%s", __FUNCTION__, __FILE__, __LINE__, node->name);

if (!node)
return ERR_PTR(-EINVAL);

if (id) {
index = of_property_match_string(node,
"reset-names", id);
printk(KERN_WARNING "%s: (%s:%i) index = %i", __FUNCTION__, __FILE__, __LINE__, index);
if (index == -EILSEQ)
return ERR_PTR(index);
if (index < 0)
Expand All @@ -453,6 +456,7 @@ struct reset_control *__of_reset_control_get(struct device_node *node,

ret = of_parse_phandle_with_args(node, "resets", "#reset-cells",
index, &args);
printk(KERN_WARNING "%s: (%s:%i) ret = %p", __FUNCTION__, __FILE__, __LINE__, (void*)ret);
if (ret == -EINVAL)
return ERR_PTR(ret);
if (ret)
Expand All @@ -461,6 +465,8 @@ struct reset_control *__of_reset_control_get(struct device_node *node,
mutex_lock(&reset_list_mutex);
rcdev = NULL;
list_for_each_entry(r, &reset_controller_list, list) {
// printk(KERN_WARNING "%s: (%s:%i) %p == %p", __FUNCTION__, __FILE__, __LINE__, (void*)args.np, (void*)r->of_node);
printk(KERN_WARNING "%s: (%s:%i) %s == %s", __FUNCTION__, __FILE__, __LINE__, args.np ? args.np->name : "<NULL>", r->of_node ? r->of_node->name : "<NULL>");
if (args.np == r->of_node) {
rcdev = r;
break;
Expand All @@ -470,6 +476,7 @@ struct reset_control *__of_reset_control_get(struct device_node *node,

if (!rcdev) {
mutex_unlock(&reset_list_mutex);
printk(KERN_WARNING "%s: (%s:%i) !rcdev, returning -EPROBE_DEFER", __FUNCTION__, __FILE__, __LINE__);
return ERR_PTR(-EPROBE_DEFER);
}

Expand All @@ -489,6 +496,7 @@ struct reset_control *__of_reset_control_get(struct device_node *node,

mutex_unlock(&reset_list_mutex);

printk(KERN_WARNING "%s: (%s:%i) rstc = %p", __FUNCTION__, __FILE__, __LINE__, (void*)rstc);
return rstc;
}
EXPORT_SYMBOL_GPL(__of_reset_control_get);
Expand Down

0 comments on commit 3605bc5

Please sign in to comment.