We want to support more than one phandle argument. It makes sense to use
an array for this rather than discrete struct members. Adjust the code to
support this. Rename the member to 'arg' instead of 'id'.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
ret = uclass_get_device(UCLASS_CLK, 0, &clk->dev);
if (ret)
return ret;
- clk->id = cells[0].id;
+ clk->id = cells[0].arg[0];
return 0;
}
#if CONFIG_IS_ENABLED(OF_PLATDATA)
struct phandle_0_arg {
const void *node;
- int id[0];
+ int arg[0];
};
struct phandle_1_arg {
const void *node;
- int id;
+ int arg[1];
};
#include <generated/dt-structs.h>
#endif
id_num = fdt_util.fdt32_to_cpu(id_cell)
target_node = self._fdt.phandle_to_node[phandle]
name = conv_name_to_c(target_node.name)
- vals.append('{&%s%s, %d}' % (VAL_PREFIX, name, id_num))
+ vals.append('{&%s%s, {%d}}' % (VAL_PREFIX, name, id_num))
for val in vals:
self.buf('\n\t\t%s,' % val)
else:
static struct dtd_source dtv_phandle_source = {
\t.clocks\t\t\t= {
-\t\t{&dtv_phandle_target, 1},},
+\t\t{&dtv_phandle_target, {1}},},
};
U_BOOT_DEVICE(phandle_source) = {
\t.name\t\t= "source",