diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-07 21:32:06 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-07-17 14:32:24 +0800 |
commit | f02d0eb3fab332b94ebb98b73c3445f920a0c852 (patch) | |
tree | 315f7e29f04c7b1bc9caf0c59a6767d03f073d4e /tools/dtoc/test_dtoc.py | |
parent | 8d7ff12e635f255afce74767a78d7584abbbaed0 (diff) |
dtoc: Support ACPI paths in of-platdata
The start of an ACPI path typically has backslashes in it. These are not
preserved during the translation from device tree to C code, since dtc
(correctly) uses the first backslash as an escape character, and dtoc
therefore leaves it out of the C string.
Fix this with special-case handling.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/test_dtoc.py')
-rwxr-xr-x | tools/dtoc/test_dtoc.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py index 3c8e343b1f..08b02d4843 100755 --- a/tools/dtoc/test_dtoc.py +++ b/tools/dtoc/test_dtoc.py @@ -72,6 +72,7 @@ class TestDtoc(unittest.TestCase): @classmethod def setUpClass(cls): tools.PrepareOutputDir(None) + cls.maxDiff = None @classmethod def tearDownClass(cls): @@ -188,6 +189,7 @@ struct dtd_sandbox_pmic_test { \tfdt64_t\t\treg[2]; }; struct dtd_sandbox_spl_test { +\tconst char * acpi_name; \tbool\t\tboolval; \tunsigned char\tbytearray[3]; \tunsigned char\tbyteval; @@ -225,6 +227,7 @@ U_BOOT_DEVICE(spl_test) = { }; static struct dtd_sandbox_spl_test dtv_spl_test2 = { +\t.acpi_name\t\t= "\\\\_SB.GPO0", \t.bytearray\t\t= {0x1, 0x23, 0x34}, \t.byteval\t\t= 0x8, \t.intarray\t\t= {0x5, 0x0, 0x0, 0x0}, |