Skip to contentSkip to conversation

mpc8641: fix address-cells default in old .dts detection

PATCH New Becky Bruce 2 participants 2 messages Nov 11, 2008 – Nov 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpc8641: fix address-cells default in old .dts detection

address-cells defaults to 2, not 1; so in the unlikely event that it isn't specified, this patch is required for correct operation.

---
 board/freescale/mpc8641hpcn/mpc8641hpcn.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
board/freescale/mpc8641hpcn/mpc8641hpcn.c +3 -3
index 1f9f2a3..110bae1 100644
@@ -278,10 +278,10 @@ ft_board_setup(void *blob, bd_t *bd)
 
 	if (tmp) {
 		u64 addr;
-		if (addrcells && (*addrcells == 2))
-			addr = *tmp;
-		else
+		if (addrcells && (*addrcells == 1))
 			addr = *(u32 *)tmp;
+		else
+			addr = *tmp;
 
 		if (addr != CONFIG_SYS_CCSRBAR_PHYS)
 			printf("WARNING: The CCSRBAR address in your .dts "
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 mpc8641: fix address-cells default in old .dts detection

Quoted 6 lines · Becky Bruce

address-cells defaults to 2, not 1; so in the unlikely event that it isn't specified, this patch is required for correct operation.

---

Applied and pushed out.

Wolfgang,

I added this to my custodian repo, so it will be present in the pull-request I sent out a few days ago.

Thanks,
jdl