static int device_bind_common(struct udevice *parent, const struct driver *drv,
const char *name, void *plat,
ulong driver_data, ofnode node,
- uint of_platdata_size, struct udevice **devp)
+ uint of_plat_size, struct udevice **devp)
{
struct udevice *dev;
struct uclass *uc;
bool alloc = !plat;
if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
- if (of_platdata_size) {
+ if (of_plat_size) {
dev->flags |= DM_FLAG_OF_PLATDATA;
- if (of_platdata_size < drv->plat_auto)
+ if (of_plat_size < drv->plat_auto)
alloc = true;
}
}
goto fail_alloc1;
}
if (CONFIG_IS_ENABLED(OF_PLATDATA) && plat) {
- memcpy(dev->plat, plat,
- of_platdata_size);
+ memcpy(dev->plat, plat, of_plat_size);
}
}
}
const struct driver_info *info, struct udevice **devp)
{
struct driver *drv;
- uint platdata_size = 0;
+ uint plat_size = 0;
int ret;
drv = lists_driver_lookup_name(info->name);
return -EPERM;
#if CONFIG_IS_ENABLED(OF_PLATDATA)
- platdata_size = info->platdata_size;
+ plat_size = info->plat_size;
#endif
ret = device_bind_common(parent, drv, info->name, (void *)info->plat, 0,
- ofnode_null(), platdata_size, devp);
+ ofnode_null(), plat_size, devp);
if (ret)
return ret;
U_BOOT_DEVICE(i2c_at_0) = {
\t.name\t\t= "sandbox_i2c_test",
\t.plat\t= &dtv_i2c_at_0,
-\t.platdata_size\t= sizeof(dtv_i2c_at_0),
+\t.plat_size\t= sizeof(dtv_i2c_at_0),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(pmic_at_9) = {
\t.name\t\t= "sandbox_pmic_test",
\t.plat\t= &dtv_pmic_at_9,
-\t.platdata_size\t= sizeof(dtv_pmic_at_9),
+\t.plat_size\t= sizeof(dtv_pmic_at_9),
\t.parent_idx\t= 0,
};
U_BOOT_DEVICE(spl_test) = {
\t.name\t\t= "sandbox_spl_test",
\t.plat\t= &dtv_spl_test,
-\t.platdata_size\t= sizeof(dtv_spl_test),
+\t.plat_size\t= sizeof(dtv_spl_test),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(spl_test2) = {
\t.name\t\t= "sandbox_spl_test",
\t.plat\t= &dtv_spl_test2,
-\t.platdata_size\t= sizeof(dtv_spl_test2),
+\t.plat_size\t= sizeof(dtv_spl_test2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(spl_test3) = {
\t.name\t\t= "sandbox_spl_test",
\t.plat\t= &dtv_spl_test3,
-\t.platdata_size\t= sizeof(dtv_spl_test3),
+\t.plat_size\t= sizeof(dtv_spl_test3),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(spl_test4) = {
\t.name\t\t= "sandbox_spl_test_2",
\t.plat\t= &dtv_spl_test4,
-\t.platdata_size\t= sizeof(dtv_spl_test4),
+\t.plat_size\t= sizeof(dtv_spl_test4),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(gpios_at_0) = {
\t.name\t\t= "sandbox_gpio",
\t.plat\t= &dtv_gpios_at_0,
-\t.platdata_size\t= sizeof(dtv_gpios_at_0),
+\t.plat_size\t= sizeof(dtv_gpios_at_0),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(spl_test) = {
\t.name\t\t= "invalid",
\t.plat\t= &dtv_spl_test,
-\t.platdata_size\t= sizeof(dtv_spl_test),
+\t.plat_size\t= sizeof(dtv_spl_test),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle2_target) = {
\t.name\t\t= "target",
\t.plat\t= &dtv_phandle2_target,
-\t.platdata_size\t= sizeof(dtv_phandle2_target),
+\t.plat_size\t= sizeof(dtv_phandle2_target),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle3_target) = {
\t.name\t\t= "target",
\t.plat\t= &dtv_phandle3_target,
-\t.platdata_size\t= sizeof(dtv_phandle3_target),
+\t.plat_size\t= sizeof(dtv_phandle3_target),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_target) = {
\t.name\t\t= "target",
\t.plat\t= &dtv_phandle_target,
-\t.platdata_size\t= sizeof(dtv_phandle_target),
+\t.plat_size\t= sizeof(dtv_phandle_target),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_source) = {
\t.name\t\t= "source",
\t.plat\t= &dtv_phandle_source,
-\t.platdata_size\t= sizeof(dtv_phandle_source),
+\t.plat_size\t= sizeof(dtv_phandle_source),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_source2) = {
\t.name\t\t= "source",
\t.plat\t= &dtv_phandle_source2,
-\t.platdata_size\t= sizeof(dtv_phandle_source2),
+\t.plat_size\t= sizeof(dtv_phandle_source2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_target) = {
\t.name\t\t= "target",
\t.plat\t= &dtv_phandle_target,
-\t.platdata_size\t= sizeof(dtv_phandle_target),
+\t.plat_size\t= sizeof(dtv_phandle_target),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_source2) = {
\t.name\t\t= "source",
\t.plat\t= &dtv_phandle_source2,
-\t.platdata_size\t= sizeof(dtv_phandle_source2),
+\t.plat_size\t= sizeof(dtv_phandle_source2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle2_target) = {
\t.name\t\t= "target",
\t.plat\t= &dtv_phandle2_target,
-\t.platdata_size\t= sizeof(dtv_phandle2_target),
+\t.plat_size\t= sizeof(dtv_phandle2_target),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle3_target) = {
\t.name\t\t= "target",
\t.plat\t= &dtv_phandle3_target,
-\t.platdata_size\t= sizeof(dtv_phandle3_target),
+\t.plat_size\t= sizeof(dtv_phandle3_target),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_target) = {
\t.name\t\t= "target",
\t.plat\t= &dtv_phandle_target,
-\t.platdata_size\t= sizeof(dtv_phandle_target),
+\t.plat_size\t= sizeof(dtv_phandle_target),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_source) = {
\t.name\t\t= "source",
\t.plat\t= &dtv_phandle_source,
-\t.platdata_size\t= sizeof(dtv_phandle_source),
+\t.plat_size\t= sizeof(dtv_phandle_source),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(phandle_source2) = {
\t.name\t\t= "source",
\t.plat\t= &dtv_phandle_source2,
-\t.platdata_size\t= sizeof(dtv_phandle_source2),
+\t.plat_size\t= sizeof(dtv_phandle_source2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test1) = {
\t.name\t\t= "test1",
\t.plat\t= &dtv_test1,
-\t.platdata_size\t= sizeof(dtv_test1),
+\t.plat_size\t= sizeof(dtv_test1),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test2) = {
\t.name\t\t= "test2",
\t.plat\t= &dtv_test2,
-\t.platdata_size\t= sizeof(dtv_test2),
+\t.plat_size\t= sizeof(dtv_test2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test3) = {
\t.name\t\t= "test3",
\t.plat\t= &dtv_test3,
-\t.platdata_size\t= sizeof(dtv_test3),
+\t.plat_size\t= sizeof(dtv_test3),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test1) = {
\t.name\t\t= "test1",
\t.plat\t= &dtv_test1,
-\t.platdata_size\t= sizeof(dtv_test1),
+\t.plat_size\t= sizeof(dtv_test1),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test2) = {
\t.name\t\t= "test2",
\t.plat\t= &dtv_test2,
-\t.platdata_size\t= sizeof(dtv_test2),
+\t.plat_size\t= sizeof(dtv_test2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test1) = {
\t.name\t\t= "test1",
\t.plat\t= &dtv_test1,
-\t.platdata_size\t= sizeof(dtv_test1),
+\t.plat_size\t= sizeof(dtv_test1),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test2) = {
\t.name\t\t= "test2",
\t.plat\t= &dtv_test2,
-\t.platdata_size\t= sizeof(dtv_test2),
+\t.plat_size\t= sizeof(dtv_test2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test3) = {
\t.name\t\t= "test3",
\t.plat\t= &dtv_test3,
-\t.platdata_size\t= sizeof(dtv_test3),
+\t.plat_size\t= sizeof(dtv_test3),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test1) = {
\t.name\t\t= "test1",
\t.plat\t= &dtv_test1,
-\t.platdata_size\t= sizeof(dtv_test1),
+\t.plat_size\t= sizeof(dtv_test1),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test2) = {
\t.name\t\t= "test2",
\t.plat\t= &dtv_test2,
-\t.platdata_size\t= sizeof(dtv_test2),
+\t.plat_size\t= sizeof(dtv_test2),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(test3) = {
\t.name\t\t= "test3",
\t.plat\t= &dtv_test3,
-\t.platdata_size\t= sizeof(dtv_test3),
+\t.plat_size\t= sizeof(dtv_test3),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(spl_test) = {
\t.name\t\t= "sandbox_spl_test",
\t.plat\t= &dtv_spl_test,
-\t.platdata_size\t= sizeof(dtv_spl_test),
+\t.plat_size\t= sizeof(dtv_spl_test),
\t.parent_idx\t= -1,
};
U_BOOT_DEVICE(spl_test2) = {
\t.name\t\t= "sandbox_spl_test",
\t.plat\t= &dtv_spl_test2,
-\t.platdata_size\t= sizeof(dtv_spl_test2),
+\t.plat_size\t= sizeof(dtv_spl_test2),
\t.parent_idx\t= -1,
};