fdt_support: Check for bank size before updating memory node
PATCH v2 1/1 fdt_support: Check for bank size before updating memory node
In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is no need to update memory node if size is zero, so check for bank size before updating.
---
Changes since v1:
- Fixed a typo in commit message.
common/fdt_support.c | 3 +++ 1 file changed, 3 insertions(+)
common/fdt_support.c +3 -0
@@ -401,6 +401,9 @@ static int fdt_pack_reg(const void *fdt, void *buf, u64 *address, u64 *size,char *p = buf;for (i =0 ; i < n; i++) { +if (size[i] ==0 ) +continue ; +if (address_cells ==2 ) *(fdt64_t *)p =cpu_to_fdt64 (address[i]);else
Signature · 1 line
2.1.4
PATCH v2 1/1 fdt_support: Check for bank size before updating memory node
Quoted 5 lines · Lokesh Vutla
In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is no need to update memory node if size is zero, so check for bank size before updating.
Quoted 8 lines
Reviewed-by Tom Rini <[email protected]>Signed-off-by Lokesh Vutla <[email protected]>---
Changes since v1:
- Fixed a typo in commit message.common/fdt_support.c | 3 +++ 1 file changed, 3 insertions(+)
PATCH v2 1/1 fdt_support: Check for bank size before updating memory node
In reply to Lokesh VutlaQuoted 8 lines · Lokesh Vutla
In case if one of the bank that is passed is of size zero, then u-boot will be updating memory node with a bank of size zero. There is no need to update memory node if size is zero, so check for bank size before updating.
Reviewed-by Tom Rini <[email protected]>Signed-off-by Lokesh Vutla <[email protected]>Acked-by Simon Glass <[email protected]>
So, I thought about this more, and looked at device trees, more, and concluded, we're stuck with the interface we have. Today there's still many boards (such as the whole Beaglebone family!) that are setting incorrect sizes in the DTS but being correctly fixed up. We'll need to continue with the other tricks that can be done to pass in more memory in the memory node.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151112/e56b1fc9/attachment.sig>