- if (clk_enable(clk_dev, clk_id))
- printf("failed to enable clock (dev=%s, id=%d)\n",
- clk_dev->name, clk_id);
+ if (clk_enable(&clk))
+ printf("failed to enable clock %d\n", i);
+ clk_free(&clk);
+ }
+
+ for (i = 0; ; i++) {
+ struct reset_ctl reset;
+ int ret;
+
+ ret = reset_get_by_index(dev, i, &reset);
+ if (ret < 0)
+ break;
+ if (reset_deassert(&reset))
+ printf("failed to deassert reset %d\n", i);
+ reset_free(&reset);