.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005. |
---|
3 | | - * |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or |
---|
6 | | - * modify it under the terms of the GNU General Public License as |
---|
7 | | - * published by the Free Software Foundation; either version 2 of the |
---|
8 | | - * License, or (at your option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
13 | | - * General Public License for more details. |
---|
14 | | - * |
---|
15 | | - * You should have received a copy of the GNU General Public License |
---|
16 | | - * along with this program; if not, write to the Free Software |
---|
17 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
---|
18 | | - * USA |
---|
19 | 4 | */ |
---|
20 | 5 | |
---|
21 | 6 | #include "dtc.h" |
---|
.. | .. |
---|
171 | 156 | emit_offset_label(f, m->ref, m->offset); |
---|
172 | 157 | |
---|
173 | 158 | while ((d.len - off) >= sizeof(uint32_t)) { |
---|
174 | | - asm_emit_cell(e, fdt32_to_cpu(*((fdt32_t *)(d.val+off)))); |
---|
| 159 | + asm_emit_cell(e, dtb_ld32(d.val + off)); |
---|
175 | 160 | off += sizeof(uint32_t); |
---|
176 | 161 | } |
---|
177 | 162 | |
---|
.. | .. |
---|
393 | 378 | padlen = 0; |
---|
394 | 379 | if (quiet < 1) |
---|
395 | 380 | fprintf(stderr, |
---|
396 | | - "Warning: blob size %d >= minimum size %d\n", |
---|
| 381 | + "Warning: blob size %"PRIu32" >= minimum size %d\n", |
---|
397 | 382 | fdt32_to_cpu(fdt.totalsize), minsize); |
---|
398 | 383 | } |
---|
399 | 384 | } |
---|
.. | .. |
---|
525 | 510 | fprintf(f, "/* Memory reserve map from source file */\n"); |
---|
526 | 511 | |
---|
527 | 512 | /* |
---|
528 | | - * Use .long on high and low halfs of u64s to avoid .quad |
---|
| 513 | + * Use .long on high and low halves of u64s to avoid .quad |
---|
529 | 514 | * as it appears .quad isn't available in some assemblers. |
---|
530 | 515 | */ |
---|
531 | 516 | for (re = dti->reservelist; re; re = re->next) { |
---|
.. | .. |
---|
692 | 677 | |
---|
693 | 678 | val = flat_read_data(dtbuf, proplen); |
---|
694 | 679 | |
---|
695 | | - return build_property(name, val); |
---|
| 680 | + return build_property(name, val, NULL); |
---|
696 | 681 | } |
---|
697 | 682 | |
---|
698 | 683 | |
---|
.. | .. |
---|
750 | 735 | char *flatname; |
---|
751 | 736 | uint32_t val; |
---|
752 | 737 | |
---|
753 | | - node = build_node(NULL, NULL); |
---|
| 738 | + node = build_node(NULL, NULL, NULL); |
---|
754 | 739 | |
---|
755 | 740 | flatname = flat_read_string(dtbuf); |
---|
756 | 741 | |
---|