- res = fdt_setprop_u32(blob, node, "phandle", phandle);
- if (res < 0)
- return res;
-
- return phandle;
-}
-
-static int enable_by_path(void *blob, const char *fmt, ...)
-{
- va_list ap;
- int node;
-
- va_start(ap, fmt);
- node = vnode_by_path(blob, fmt, ap);
- va_end(ap);
-
- if (node < 0)
- return node;
-
- return fdt_setprop_string(blob, node, "status", "okay");
-}
-
-static bool is_topaz(int id)
-{
- return topaz && id == peridot + topaz - 1;
-}
-
-static int switch_addr(int id)
-{
- return is_topaz(id) ? 0x2 : 0x10 + id;
-}
-
-static int setup_switch(void *blob, int id)
-{
- int res, addr, i, node, phandle;
-