diff options
| author | Simon Goldschmidt <[email protected]> | 2019-01-07 20:29:26 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2019-01-15 15:28:45 -0500 |
| commit | 7d05d3a8e35f888ec3f90f66fe53a7c381c06d10 (patch) | |
| tree | ee99f1ff01145b0695abf24ea136d98f6d664853 | |
| parent | d667090999236ddbf8bbbc98dc576bf301db59d0 (diff) | |
dtoc: make generated platdata structs const
The platdata initialization structs are currently generated into .rwdata.
Make sure the are put into .rodata by generating them as const.
Signed-off-by: Simon Goldschmidt <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
| -rw-r--r-- | tools/dtoc/dtb_platdata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py index 6cb12594466..ca580b45d4a 100644 --- a/tools/dtoc/dtb_platdata.py +++ b/tools/dtoc/dtb_platdata.py @@ -461,7 +461,7 @@ class DtbPlatdata(object): """ struct_name, _ = get_compat_name(node) var_name = conv_name_to_c(node.name) - self.buf('static struct %s%s %s%s = {\n' % + self.buf('static const struct %s%s %s%s = {\n' % (STRUCT_PREFIX, struct_name, VAL_PREFIX, var_name)) for pname, prop in node.props.items(): if pname in PROP_IGNORE_LIST or pname[0] == '#': |
