@@ -84,6 +84,7 @@ static int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
8484 */
8585int reset_controller_register (struct reset_controller_dev * rcdev )
8686{
87+ printk (KERN_WARNING "%s: (%s:%i) of_node=%s" , __FUNCTION__ , __FILE__ , __LINE__ , rcdev -> of_node ? rcdev -> of_node -> name : "<NULL>" );
8788 if (!rcdev -> of_xlate ) {
8889 rcdev -> of_reset_n_cells = 1 ;
8990 rcdev -> of_xlate = of_reset_simple_xlate ;
@@ -438,13 +439,15 @@ struct reset_control *__of_reset_control_get(struct device_node *node,
438439 struct of_phandle_args args ;
439440 int rstc_id ;
440441 int ret ;
442+ printk (KERN_WARNING "%s: (%s:%i) node=%s" , __FUNCTION__ , __FILE__ , __LINE__ , node -> name );
441443
442444 if (!node )
443445 return ERR_PTR (- EINVAL );
444446
445447 if (id ) {
446448 index = of_property_match_string (node ,
447449 "reset-names" , id );
450+ printk (KERN_WARNING "%s: (%s:%i) index = %i" , __FUNCTION__ , __FILE__ , __LINE__ , index );
448451 if (index == - EILSEQ )
449452 return ERR_PTR (index );
450453 if (index < 0 )
@@ -453,6 +456,7 @@ struct reset_control *__of_reset_control_get(struct device_node *node,
453456
454457 ret = of_parse_phandle_with_args (node , "resets" , "#reset-cells" ,
455458 index , & args );
459+ printk (KERN_WARNING "%s: (%s:%i) ret = %p" , __FUNCTION__ , __FILE__ , __LINE__ , (void * )ret );
456460 if (ret == - EINVAL )
457461 return ERR_PTR (ret );
458462 if (ret )
@@ -461,6 +465,8 @@ struct reset_control *__of_reset_control_get(struct device_node *node,
461465 mutex_lock (& reset_list_mutex );
462466 rcdev = NULL ;
463467 list_for_each_entry (r , & reset_controller_list , list ) {
468+ // printk(KERN_WARNING "%s: (%s:%i) %p == %p", __FUNCTION__, __FILE__, __LINE__, (void*)args.np, (void*)r->of_node);
469+ 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>" );
464470 if (args .np == r -> of_node ) {
465471 rcdev = r ;
466472 break ;
@@ -470,6 +476,7 @@ struct reset_control *__of_reset_control_get(struct device_node *node,
470476
471477 if (!rcdev ) {
472478 mutex_unlock (& reset_list_mutex );
479+ printk (KERN_WARNING "%s: (%s:%i) !rcdev, returning -EPROBE_DEFER" , __FUNCTION__ , __FILE__ , __LINE__ );
473480 return ERR_PTR (- EPROBE_DEFER );
474481 }
475482
@@ -489,6 +496,7 @@ struct reset_control *__of_reset_control_get(struct device_node *node,
489496
490497 mutex_unlock (& reset_list_mutex );
491498
499+ printk (KERN_WARNING "%s: (%s:%i) rstc = %p" , __FUNCTION__ , __FILE__ , __LINE__ , (void * )rstc );
492500 return rstc ;
493501}
494502EXPORT_SYMBOL_GPL (__of_reset_control_get );
0 commit comments