Simon Glass c20ee0ed07 dtoc: Add support for 32 or 64-bit addresses
When using 32-bit addresses dtoc works correctly. For 64-bit addresses it
does not since it ignores the #address-cells and #size-cells properties.

Update the tool to use fdt64_t as the element type for reg properties when
either the address or size is larger than one cell. Use the correct value
so that C code can obtain the information from the device tree easily.

Alos create a new type, fdt_val_t, which is defined to either fdt32_t or
fdt64_t depending on the word size of the machine. This type corresponds
to fdt_addr_t and fdt_size_t. Unfortunately we cannot just use those types
since they are defined to phys_addr_t and phys_size_t which use
'unsigned long' in the 32-bit case, rather than 'unsigned int'.

Add tests for the four combinations of address and size values (32/32,
64/64, 32/64, 64/32). Also update existing uses for rk3399 and rk3368
which now need to use the new fdt_val_t type.

Signed-off-by: Simon Glass <sjg@chromium.org>

Suggested-by: Heiko Stuebner <heiko@sntech.de>
Reported-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15 05:27:38 -06:00
..
2017-07-03 17:35:28 -04:00
2017-09-11 21:43:58 -06:00
2017-08-22 09:56:09 +02:00
2016-04-01 17:18:12 -04:00
2016-12-03 13:21:21 -05:00
2017-02-07 10:54:32 -06:00
2017-02-08 15:56:28 -05:00
2016-03-24 09:47:43 +01:00
2017-06-05 11:02:29 -04:00
2016-05-25 17:52:39 +02:00
2016-05-25 17:52:39 +02:00
2016-01-20 19:06:23 -07:00
2017-09-12 17:57:59 -04:00
2016-10-19 09:01:51 +02:00
2017-08-16 08:22:18 -04:00
2017-05-11 22:21:27 -04:00
2017-07-28 23:34:39 +02:00
2017-04-13 09:41:10 -04:00
2016-02-23 16:14:45 +05:30
2017-08-17 16:59:55 +09:00
2017-05-15 20:32:12 +02:00
2016-11-14 23:24:03 +01:00
2016-05-03 17:52:11 -05:00
2016-01-28 12:22:19 -06:00
2017-08-16 08:30:24 -04:00
2017-06-03 17:55:34 -04:00
2017-06-02 10:16:46 -06:00
2017-08-22 09:56:09 +02:00
2016-01-27 15:55:54 +01:00
2016-01-19 08:31:21 -05:00
2016-12-08 10:36:22 -06:00
2017-09-03 15:30:35 -04:00
2017-09-12 17:58:02 -04:00
2017-07-23 09:24:47 -04:00
2017-06-12 08:37:55 -04:00
2017-04-14 19:38:57 -06:00
2016-06-19 17:05:55 -06:00
2016-03-08 15:01:47 -05:00
2016-08-12 11:01:22 -06:00
2016-01-20 10:19:40 -05:00
2015-11-12 08:26:58 +08:00
2017-07-11 22:41:54 -04:00
2017-07-28 12:02:47 -06:00
2016-01-21 20:42:36 -07:00
2016-02-05 12:47:21 +08:00
2017-06-12 08:37:55 -04:00
2016-03-15 15:19:23 -04:00
2017-07-03 17:35:28 -04:00
2016-01-21 20:42:34 -07:00
2017-07-28 23:34:07 +02:00
2017-04-10 10:02:03 +08:00
2017-08-17 16:59:55 +09:00
2017-08-23 10:41:58 +02:00
2017-08-16 08:22:18 -04:00
2016-08-17 10:25:35 +09:00
2017-06-01 07:03:16 -06:00
2016-05-26 20:48:31 -06:00
2016-02-26 08:53:10 -07:00
2016-09-26 13:24:43 -04:00
2017-04-12 13:28:27 -04:00
2016-05-02 18:37:09 -04:00
2017-08-24 11:00:47 +08:00
2016-10-23 18:33:48 -04:00