if reg.type != fdt.Type.INT:
raise ValueError("Node '%s' reg property is not an int" %
node.name)
+ if not isinstance(reg.value, list):
+ reg.value = [reg.value]
if len(reg.value) % total:
raise ValueError(
"Node '%s' reg property has %d cells "
(node.name, len(reg.value), num_addr, num_size))
reg.num_addr = num_addr
reg.num_size = num_size
- if num_addr != 1 or num_size != 1:
+ if num_addr > 1 or num_size > 1:
reg.type = fdt.Type.INT64
i = 0
new_value = []
val = reg.value
- if not isinstance(val, list):
- val = [val]
while i < len(val):
addr = fdt_util.fdt_cells_to_cpu(val[i:], reg.num_addr)
i += num_addr
};
struct dtd_sandbox_pmic {
\tbool\t\tlow_power;
-\tfdt64_t\t\treg[2];
+\tfdt32_t\t\treg[1];
};
struct dtd_sandbox_spl_test {
\tconst char * acpi_name;
*/
static struct dtd_sandbox_pmic dtv_pmic_at_9 = {
\t.low_power\t\t= true,
-\t.reg\t\t\t= {0x9, 0x0},
+\t.reg\t\t\t= {0x9},
};
U_BOOT_DRVINFO(pmic_at_9) = {
\t.name\t\t= "sandbox_pmic",
\t.dtplat = {
\t\t.ping_add\t\t= 0x5,
\t\t.ping_expect\t\t= 0x5,
-\t\t.reg\t\t\t= {0x5, 0x0},
+\t\t.reg\t\t\t= {0x5},
\t},
};
#include <dm/test.h>