with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_sandbox_spl_test dtv_spl_test = {
+static const struct dtd_sandbox_spl_test dtv_spl_test = {
\t.bytearray\t\t= {0x6, 0x0, 0x0},
\t.byteval\t\t= 0x5,
\t.intval\t\t\t= 0x1,
\t.platdata_size\t= sizeof(dtv_spl_test),
};
-static struct dtd_sandbox_spl_test dtv_spl_test2 = {
+static const struct dtd_sandbox_spl_test dtv_spl_test2 = {
\t.bytearray\t\t= {0x1, 0x23, 0x34},
\t.byteval\t\t= 0x8,
\t.intval\t\t\t= 0x3,
\t.platdata_size\t= sizeof(dtv_spl_test2),
};
-static struct dtd_sandbox_spl_test dtv_spl_test3 = {
+static const struct dtd_sandbox_spl_test dtv_spl_test3 = {
\t.stringarray\t\t= {"one", "", ""},
};
U_BOOT_DEVICE(spl_test3) = {
\t.platdata_size\t= sizeof(dtv_spl_test3),
};
-static struct dtd_sandbox_spl_test_2 dtv_spl_test4 = {
+static const struct dtd_sandbox_spl_test_2 dtv_spl_test4 = {
};
U_BOOT_DEVICE(spl_test4) = {
\t.name\t\t= "sandbox_spl_test_2",
\t.platdata_size\t= sizeof(dtv_spl_test4),
};
-static struct dtd_sandbox_i2c_test dtv_i2c_at_0 = {
+static const struct dtd_sandbox_i2c_test dtv_i2c_at_0 = {
};
U_BOOT_DEVICE(i2c_at_0) = {
\t.name\t\t= "sandbox_i2c_test",
\t.platdata_size\t= sizeof(dtv_i2c_at_0),
};
-static struct dtd_sandbox_pmic_test dtv_pmic_at_9 = {
+static const struct dtd_sandbox_pmic_test dtv_pmic_at_9 = {
\t.low_power\t\t= true,
\t.reg\t\t\t= {0x9, 0x0},
};
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_target dtv_phandle_target = {
+static const struct dtd_target dtv_phandle_target = {
\t.intval\t\t\t= 0x0,
};
U_BOOT_DEVICE(phandle_target) = {
\t.platdata_size\t= sizeof(dtv_phandle_target),
};
-static struct dtd_target dtv_phandle2_target = {
+static const struct dtd_target dtv_phandle2_target = {
\t.intval\t\t\t= 0x1,
};
U_BOOT_DEVICE(phandle2_target) = {
\t.platdata_size\t= sizeof(dtv_phandle2_target),
};
-static struct dtd_target dtv_phandle3_target = {
+static const struct dtd_target dtv_phandle3_target = {
\t.intval\t\t\t= 0x2,
};
U_BOOT_DEVICE(phandle3_target) = {
\t.platdata_size\t= sizeof(dtv_phandle3_target),
};
-static struct dtd_source dtv_phandle_source = {
+static const struct dtd_source dtv_phandle_source = {
\t.clocks\t\t\t= {
\t\t\t{&dtv_phandle_target, {}},
\t\t\t{&dtv_phandle2_target, {11}},
\t.platdata_size\t= sizeof(dtv_phandle_source),
};
-static struct dtd_source dtv_phandle_source2 = {
+static const struct dtd_source dtv_phandle_source2 = {
\t.clocks\t\t\t= {
\t\t\t{&dtv_phandle_target, {}},},
};
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_target dtv_phandle_target = {
+static const struct dtd_target dtv_phandle_target = {
};
U_BOOT_DEVICE(phandle_target) = {
\t.name\t\t= "target",
\t.platdata_size\t= sizeof(dtv_phandle_target),
};
-static struct dtd_source dtv_phandle_source2 = {
+static const struct dtd_source dtv_phandle_source2 = {
\t.clocks\t\t\t= {
\t\t\t{&dtv_phandle_target, {}},},
};
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_compat1 dtv_spl_test = {
+static const struct dtd_compat1 dtv_spl_test = {
\t.intval\t\t\t= 0x1,
};
U_BOOT_DEVICE(spl_test) = {
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_test1 dtv_test1 = {
+static const struct dtd_test1 dtv_test1 = {
\t.reg\t\t\t= {0x1234, 0x5678},
};
U_BOOT_DEVICE(test1) = {
\t.platdata_size\t= sizeof(dtv_test1),
};
-static struct dtd_test2 dtv_test2 = {
+static const struct dtd_test2 dtv_test2 = {
\t.reg\t\t\t= {0x1234567890123456, 0x9876543210987654},
};
U_BOOT_DEVICE(test2) = {
\t.platdata_size\t= sizeof(dtv_test2),
};
-static struct dtd_test3 dtv_test3 = {
+static const struct dtd_test3 dtv_test3 = {
\t.reg\t\t\t= {0x1234567890123456, 0x9876543210987654, 0x2, 0x3},
};
U_BOOT_DEVICE(test3) = {
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_test1 dtv_test1 = {
+static const struct dtd_test1 dtv_test1 = {
\t.reg\t\t\t= {0x1234, 0x5678},
};
U_BOOT_DEVICE(test1) = {
\t.platdata_size\t= sizeof(dtv_test1),
};
-static struct dtd_test2 dtv_test2 = {
+static const struct dtd_test2 dtv_test2 = {
\t.reg\t\t\t= {0x12345678, 0x98765432, 0x2, 0x3},
};
U_BOOT_DEVICE(test2) = {
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_test1 dtv_test1 = {
+static const struct dtd_test1 dtv_test1 = {
\t.reg\t\t\t= {0x123400000000, 0x5678},
};
U_BOOT_DEVICE(test1) = {
\t.platdata_size\t= sizeof(dtv_test1),
};
-static struct dtd_test2 dtv_test2 = {
+static const struct dtd_test2 dtv_test2 = {
\t.reg\t\t\t= {0x1234567890123456, 0x98765432},
};
U_BOOT_DEVICE(test2) = {
\t.platdata_size\t= sizeof(dtv_test2),
};
-static struct dtd_test3 dtv_test3 = {
+static const struct dtd_test3 dtv_test3 = {
\t.reg\t\t\t= {0x1234567890123456, 0x98765432, 0x2, 0x3},
};
U_BOOT_DEVICE(test3) = {
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_test1 dtv_test1 = {
+static const struct dtd_test1 dtv_test1 = {
\t.reg\t\t\t= {0x1234, 0x567800000000},
};
U_BOOT_DEVICE(test1) = {
\t.platdata_size\t= sizeof(dtv_test1),
};
-static struct dtd_test2 dtv_test2 = {
+static const struct dtd_test2 dtv_test2 = {
\t.reg\t\t\t= {0x12345678, 0x9876543210987654},
};
U_BOOT_DEVICE(test2) = {
\t.platdata_size\t= sizeof(dtv_test2),
};
-static struct dtd_test3 dtv_test3 = {
+static const struct dtd_test3 dtv_test3 = {
\t.reg\t\t\t= {0x12345678, 0x9876543210987654, 0x2, 0x3},
};
U_BOOT_DEVICE(test3) = {
with open(output) as infile:
data = infile.read()
self._CheckStrings(C_HEADER + '''
-static struct dtd_sandbox_spl_test dtv_spl_test = {
+static const struct dtd_sandbox_spl_test dtv_spl_test = {
\t.intval\t\t\t= 0x1,
};
U_BOOT_DEVICE(spl_test) = {
\t.platdata_size\t= sizeof(dtv_spl_test),
};
-static struct dtd_sandbox_spl_test dtv_spl_test2 = {
+static const struct dtd_sandbox_spl_test dtv_spl_test2 = {
\t.intarray\t\t= 0x5,
};
U_BOOT_DEVICE(spl_test2) = {