diff options
Diffstat (limited to 'tools/dtoc/test_dtoc.py')
-rwxr-xr-x | tools/dtoc/test_dtoc.py | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py index a5836e04b7..4913d95021 100755 --- a/tools/dtoc/test_dtoc.py +++ b/tools/dtoc/test_dtoc.py @@ -134,13 +134,13 @@ class TestDtoc(unittest.TestCase): def test_get_value(self): """Test operation of get_value() function""" self.assertEqual('0x45', - get_value(fdt.TYPE_INT, struct.pack('>I', 0x45))) + get_value(fdt.Type.INT, struct.pack('>I', 0x45))) self.assertEqual('0x45', - get_value(fdt.TYPE_BYTE, struct.pack('<I', 0x45))) + get_value(fdt.Type.BYTE, struct.pack('<I', 0x45))) self.assertEqual('0x0', - get_value(fdt.TYPE_BYTE, struct.pack('>I', 0x45))) - self.assertEqual('"test"', get_value(fdt.TYPE_STRING, 'test')) - self.assertEqual('true', get_value(fdt.TYPE_BOOL, None)) + get_value(fdt.Type.BYTE, struct.pack('>I', 0x45))) + self.assertEqual('"test"', get_value(fdt.Type.STRING, 'test')) + self.assertEqual('true', get_value(fdt.Type.BOOL, None)) def test_get_compat_name(self): """Test operation of get_compat_name() function""" @@ -217,8 +217,8 @@ static struct dtd_sandbox_i2c_test dtv_i2c_at_0 = { }; U_BOOT_DEVICE(i2c_at_0) = { \t.name\t\t= "sandbox_i2c_test", -\t.platdata\t= &dtv_i2c_at_0, -\t.platdata_size\t= sizeof(dtv_i2c_at_0), +\t.plat\t= &dtv_i2c_at_0, +\t.plat_size\t= sizeof(dtv_i2c_at_0), \t.parent_idx\t= -1, }; @@ -229,8 +229,8 @@ static struct dtd_sandbox_pmic_test dtv_pmic_at_9 = { }; U_BOOT_DEVICE(pmic_at_9) = { \t.name\t\t= "sandbox_pmic_test", -\t.platdata\t= &dtv_pmic_at_9, -\t.platdata_size\t= sizeof(dtv_pmic_at_9), +\t.plat\t= &dtv_pmic_at_9, +\t.plat_size\t= sizeof(dtv_pmic_at_9), \t.parent_idx\t= 0, }; @@ -249,8 +249,8 @@ static struct dtd_sandbox_spl_test dtv_spl_test = { }; U_BOOT_DEVICE(spl_test) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test, -\t.platdata_size\t= sizeof(dtv_spl_test), +\t.plat\t= &dtv_spl_test, +\t.plat_size\t= sizeof(dtv_spl_test), \t.parent_idx\t= -1, }; @@ -268,8 +268,8 @@ static struct dtd_sandbox_spl_test dtv_spl_test2 = { }; U_BOOT_DEVICE(spl_test2) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test2, -\t.platdata_size\t= sizeof(dtv_spl_test2), +\t.plat\t= &dtv_spl_test2, +\t.plat_size\t= sizeof(dtv_spl_test2), \t.parent_idx\t= -1, }; @@ -281,8 +281,8 @@ static struct dtd_sandbox_spl_test dtv_spl_test3 = { }; U_BOOT_DEVICE(spl_test3) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test3, -\t.platdata_size\t= sizeof(dtv_spl_test3), +\t.plat\t= &dtv_spl_test3, +\t.plat_size\t= sizeof(dtv_spl_test3), \t.parent_idx\t= -1, }; @@ -291,8 +291,8 @@ static struct dtd_sandbox_spl_test_2 dtv_spl_test4 = { }; U_BOOT_DEVICE(spl_test4) = { \t.name\t\t= "sandbox_spl_test_2", -\t.platdata\t= &dtv_spl_test4, -\t.platdata_size\t= sizeof(dtv_spl_test4), +\t.plat\t= &dtv_spl_test4, +\t.plat_size\t= sizeof(dtv_spl_test4), \t.parent_idx\t= -1, }; @@ -325,8 +325,8 @@ static struct dtd_sandbox_gpio dtv_gpios_at_0 = { }; U_BOOT_DEVICE(gpios_at_0) = { \t.name\t\t= "sandbox_gpio", -\t.platdata\t= &dtv_gpios_at_0, -\t.platdata_size\t= sizeof(dtv_gpios_at_0), +\t.plat\t= &dtv_gpios_at_0, +\t.plat_size\t= sizeof(dtv_gpios_at_0), \t.parent_idx\t= -1, }; @@ -357,8 +357,8 @@ static struct dtd_invalid dtv_spl_test = { }; U_BOOT_DEVICE(spl_test) = { \t.name\t\t= "invalid", -\t.platdata\t= &dtv_spl_test, -\t.platdata_size\t= sizeof(dtv_spl_test), +\t.plat\t= &dtv_spl_test, +\t.plat_size\t= sizeof(dtv_spl_test), \t.parent_idx\t= -1, }; @@ -392,8 +392,8 @@ static struct dtd_target dtv_phandle2_target = { }; U_BOOT_DEVICE(phandle2_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle2_target, -\t.platdata_size\t= sizeof(dtv_phandle2_target), +\t.plat\t= &dtv_phandle2_target, +\t.plat_size\t= sizeof(dtv_phandle2_target), \t.parent_idx\t= -1, }; @@ -403,8 +403,8 @@ static struct dtd_target dtv_phandle3_target = { }; U_BOOT_DEVICE(phandle3_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle3_target, -\t.platdata_size\t= sizeof(dtv_phandle3_target), +\t.plat\t= &dtv_phandle3_target, +\t.plat_size\t= sizeof(dtv_phandle3_target), \t.parent_idx\t= -1, }; @@ -414,8 +414,8 @@ static struct dtd_target dtv_phandle_target = { }; U_BOOT_DEVICE(phandle_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle_target, -\t.platdata_size\t= sizeof(dtv_phandle_target), +\t.plat\t= &dtv_phandle_target, +\t.plat_size\t= sizeof(dtv_phandle_target), \t.parent_idx\t= -1, }; @@ -429,8 +429,8 @@ static struct dtd_source dtv_phandle_source = { }; U_BOOT_DEVICE(phandle_source) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source, -\t.platdata_size\t= sizeof(dtv_phandle_source), +\t.plat\t= &dtv_phandle_source, +\t.plat_size\t= sizeof(dtv_phandle_source), \t.parent_idx\t= -1, }; @@ -441,8 +441,8 @@ static struct dtd_source dtv_phandle_source2 = { }; U_BOOT_DEVICE(phandle_source2) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source2, -\t.platdata_size\t= sizeof(dtv_phandle_source2), +\t.plat\t= &dtv_phandle_source2, +\t.plat_size\t= sizeof(dtv_phandle_source2), \t.parent_idx\t= -1, }; @@ -479,8 +479,8 @@ static struct dtd_target dtv_phandle_target = { }; U_BOOT_DEVICE(phandle_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle_target, -\t.platdata_size\t= sizeof(dtv_phandle_target), +\t.plat\t= &dtv_phandle_target, +\t.plat_size\t= sizeof(dtv_phandle_target), \t.parent_idx\t= -1, }; @@ -491,8 +491,8 @@ static struct dtd_source dtv_phandle_source2 = { }; U_BOOT_DEVICE(phandle_source2) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source2, -\t.platdata_size\t= sizeof(dtv_phandle_source2), +\t.plat\t= &dtv_phandle_source2, +\t.plat_size\t= sizeof(dtv_phandle_source2), \t.parent_idx\t= -1, }; @@ -514,8 +514,8 @@ static struct dtd_target dtv_phandle2_target = { }; U_BOOT_DEVICE(phandle2_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle2_target, -\t.platdata_size\t= sizeof(dtv_phandle2_target), +\t.plat\t= &dtv_phandle2_target, +\t.plat_size\t= sizeof(dtv_phandle2_target), \t.parent_idx\t= -1, }; @@ -525,8 +525,8 @@ static struct dtd_target dtv_phandle3_target = { }; U_BOOT_DEVICE(phandle3_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle3_target, -\t.platdata_size\t= sizeof(dtv_phandle3_target), +\t.plat\t= &dtv_phandle3_target, +\t.plat_size\t= sizeof(dtv_phandle3_target), \t.parent_idx\t= -1, }; @@ -536,8 +536,8 @@ static struct dtd_target dtv_phandle_target = { }; U_BOOT_DEVICE(phandle_target) = { \t.name\t\t= "target", -\t.platdata\t= &dtv_phandle_target, -\t.platdata_size\t= sizeof(dtv_phandle_target), +\t.plat\t= &dtv_phandle_target, +\t.plat_size\t= sizeof(dtv_phandle_target), \t.parent_idx\t= -1, }; @@ -551,8 +551,8 @@ static struct dtd_source dtv_phandle_source = { }; U_BOOT_DEVICE(phandle_source) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source, -\t.platdata_size\t= sizeof(dtv_phandle_source), +\t.plat\t= &dtv_phandle_source, +\t.plat_size\t= sizeof(dtv_phandle_source), \t.parent_idx\t= -1, }; @@ -563,8 +563,8 @@ static struct dtd_source dtv_phandle_source2 = { }; U_BOOT_DEVICE(phandle_source2) = { \t.name\t\t= "source", -\t.platdata\t= &dtv_phandle_source2, -\t.platdata_size\t= sizeof(dtv_phandle_source2), +\t.plat\t= &dtv_phandle_source2, +\t.plat_size\t= sizeof(dtv_phandle_source2), \t.parent_idx\t= -1, }; @@ -621,8 +621,8 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, -\t.platdata_size\t= sizeof(dtv_test1), +\t.plat\t= &dtv_test1, +\t.plat_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -632,8 +632,8 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, -\t.platdata_size\t= sizeof(dtv_test2), +\t.plat\t= &dtv_test2, +\t.plat_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -643,8 +643,8 @@ static struct dtd_test3 dtv_test3 = { }; U_BOOT_DEVICE(test3) = { \t.name\t\t= "test3", -\t.platdata\t= &dtv_test3, -\t.platdata_size\t= sizeof(dtv_test3), +\t.plat\t= &dtv_test3, +\t.plat_size\t= sizeof(dtv_test3), \t.parent_idx\t= -1, }; @@ -676,8 +676,8 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, -\t.platdata_size\t= sizeof(dtv_test1), +\t.plat\t= &dtv_test1, +\t.plat_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -687,8 +687,8 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, -\t.platdata_size\t= sizeof(dtv_test2), +\t.plat\t= &dtv_test2, +\t.plat_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -723,8 +723,8 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, -\t.platdata_size\t= sizeof(dtv_test1), +\t.plat\t= &dtv_test1, +\t.plat_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -734,8 +734,8 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, -\t.platdata_size\t= sizeof(dtv_test2), +\t.plat\t= &dtv_test2, +\t.plat_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -745,8 +745,8 @@ static struct dtd_test3 dtv_test3 = { }; U_BOOT_DEVICE(test3) = { \t.name\t\t= "test3", -\t.platdata\t= &dtv_test3, -\t.platdata_size\t= sizeof(dtv_test3), +\t.plat\t= &dtv_test3, +\t.plat_size\t= sizeof(dtv_test3), \t.parent_idx\t= -1, }; @@ -781,8 +781,8 @@ static struct dtd_test1 dtv_test1 = { }; U_BOOT_DEVICE(test1) = { \t.name\t\t= "test1", -\t.platdata\t= &dtv_test1, -\t.platdata_size\t= sizeof(dtv_test1), +\t.plat\t= &dtv_test1, +\t.plat_size\t= sizeof(dtv_test1), \t.parent_idx\t= -1, }; @@ -792,8 +792,8 @@ static struct dtd_test2 dtv_test2 = { }; U_BOOT_DEVICE(test2) = { \t.name\t\t= "test2", -\t.platdata\t= &dtv_test2, -\t.platdata_size\t= sizeof(dtv_test2), +\t.plat\t= &dtv_test2, +\t.plat_size\t= sizeof(dtv_test2), \t.parent_idx\t= -1, }; @@ -803,8 +803,8 @@ static struct dtd_test3 dtv_test3 = { }; U_BOOT_DEVICE(test3) = { \t.name\t\t= "test3", -\t.platdata\t= &dtv_test3, -\t.platdata_size\t= sizeof(dtv_test3), +\t.plat\t= &dtv_test3, +\t.plat_size\t= sizeof(dtv_test3), \t.parent_idx\t= -1, }; @@ -854,8 +854,8 @@ static struct dtd_sandbox_spl_test dtv_spl_test = { }; U_BOOT_DEVICE(spl_test) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test, -\t.platdata_size\t= sizeof(dtv_spl_test), +\t.plat\t= &dtv_spl_test, +\t.plat_size\t= sizeof(dtv_spl_test), \t.parent_idx\t= -1, }; @@ -865,8 +865,8 @@ static struct dtd_sandbox_spl_test dtv_spl_test2 = { }; U_BOOT_DEVICE(spl_test2) = { \t.name\t\t= "sandbox_spl_test", -\t.platdata\t= &dtv_spl_test2, -\t.platdata_size\t= sizeof(dtv_spl_test2), +\t.plat\t= &dtv_spl_test2, +\t.plat_size\t= sizeof(dtv_spl_test2), \t.parent_idx\t= -1, }; |