pstore: Use root address-cells/size-cells as defaults for reserved-memory

u-boot adds reserve-memory node, if it's missing, with following
properties:

```
    reserved-memory {
         #address-cells = <2>;
         #size-cells = <2>;
         ranges;
    }
```

But with these default address-cells and size-cells values, pstore
isn't working on A64. Root node for A64 defines 'address-cells' and
'size-cells' as 1.

dtc complains if reserved-memory has different address-cells and
size-cells.

```
     Warning (ranges_format): /reserved-memory:ranges: empty "ranges"
     property but its #address-cells (2) differs from / (1)
```

This patch takes into account address-cells and size-cells of the root
node and uses them as values for new reserved-memory node.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
1 file changed