could not get #clock-cells for

 

 

[    0.431010] OF: tracing soc __of_get_address  1
[    0.447918] OF:  timer0: could not get #clock-cells for clk@1
[    0.461946] OF: watchdog0: could not get #clock-cells for clk@1
[    0.471398] OF: soc/ethernet0: could not get #clock-cells for clk@1

 

 

int of_phandle_iterator_next(struct of_phandle_iterator *it)
{
        uint32_t count = 0;

        if (it->node) {
                of_node_put(it->node);
                it->node = NULL;
        }

        if (!it->cur || it->phandle_end >= it->list_end)
                return -ENOENT;

        it->cur = it->phandle_end;

        /* If phandle is 0, then it is an empty entry with no arguments. */
        it->phandle = be32_to_cpup(it->cur++);

        if (it->phandle) {

                /*
                 * Find the provider node and parse the #*-cells property to
                 * determine the argument length.
                 */
                it->node = of_find_node_by_phandle(it->phandle);

                if (it->cells_name) {
                        if (!it->node) {
                                pr_err("%pOF: could not find phandle %d\n",
                                       it->parent, it->phandle);
                                goto err;
                        }

                        if (of_property_read_u32(it->node, it->cells_name,
                                                 &count)) {
                                /*
                                 * If both cell_count and cells_name is given,
                                 * fall back to cell_count in absence
                                 * of the cells_name property
                                 */
                                if (it->cell_count >= 0) {
                                        count = it->cell_count;
                                } else {
                                        pr_err("%pOF: could not get %s for %pOF\n",
                                               it->parent,
                                               it->cells_name,
                                               it->node);
                                        goto err;
                                }
                        }
                } else {
                        count = it->cell_count;
                }

 

加上#clock-cells = <0>;

      timclk2: clk@2 {
                        compatible = "fixed-clock";
                        #clock-cells = <0>;
                        clock-frequency = <48000000>;
                        clock-output-names = "timer2";
                };

 

posted on 2021-11-16 15:50  tycoon3  阅读(507)  评论(0编辑  收藏  举报

导航