Skip to contentSkip to conversation

syscon3: changes to support FDT

PATCH New Wolfgang Denk 2 participants 5 messages May 9, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscon3: changes to support FDT

From: Sergei Poselenov <[email protected]>

---
 board/syscon3/syscon3.c   |   25 +++++++++++++++++++
 include/configs/syscon3.h |   58 +++++++++++++++++++-------------------------
 2 files changed, 50 insertions(+), 33 deletions(-)
board/syscon3/syscon3.c +25 -0
index ea33f82..b814bae 100644
@@ -33,6 +33,8 @@
 #include <asm/immap_85xx.h>
 #include <ioports.h>
 #include <flash.h>
+#include <libfdt.h>
+#include <fdt_support.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -184,3 +186,26 @@ int board_early_init_r (void)
 	return (0);
 }
 #endif /* CONFIG_BOARD_EARLY_INIT_R */
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void
+ft_board_setup(void *blob, bd_t *bd)
+{
+	u32 val[4];
+	int rc;
+
+	ft_cpu_setup(blob, bd);
+
+	/* Fixup NOR mapping */
+	val[0] = 0;				/* chip select number */
+	val[1] = 0;				/* always 0 */
+	val[2] = gd->bd->bi_flashstart;
+	val[3] = gd->bd->bi_flashsize;
+
+	rc = fdt_find_and_setprop(blob, "/localbus", "ranges",
+				  val, sizeof(val), 1);
+	if (rc)
+		printf("Unable to update property NOR mapping, err=%s\n",
+		       fdt_strerror(rc));
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
include/configs/syscon3.h +25 -33

103 lines not on this page · raw message

Signature · 1 line
1.5.4.2
#1 lore raw

PATCH 1/1 syscon3: changes to support FDT

Quoted 9 lines · Wolfgang Denk

From: Sergei Poselenov <[email protected]>

---
 board/syscon3/syscon3.c   |   25 +++++++++++++++++++
 include/configs/syscon3.h |   58

+++++++++++++++++++------------------------- 2 files changed, 50 insertions(+), 33 deletions(-)

I can't find this board support. And also no patches for it.

Please find some further comments below.

Quoted 30 lines
board/syscon3/syscon3.c +15 -0
index ea33f82..b814bae 100644
@@ -33,6 +33,8 @@
 #include <asm/immap_85xx.h>
 #include <ioports.h>
 #include <flash.h>
+#include <libfdt.h>
+#include <fdt_support.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -184,3 +186,26 @@ int board_early_init_r (void)
 	return (0);
 }
 #endif /* CONFIG_BOARD_EARLY_INIT_R */
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void
+ft_board_setup(void *blob, bd_t *bd)
+{
+	u32 val[4];
+	int rc;
+
+	ft_cpu_setup(blob, bd);
+
+	/* Fixup NOR mapping */
+	val[0] = 0;				/* chip select number */
+	val[1] = 0;				/* always 0 */

board/syscon3/syscon3.c int board_early_init_r (void) · line 211

Quoted 10 lines
board/syscon3/syscon3.c +10 -0
+	val[2] = gd->bd->bi_flashstart;
+	val[3] = gd->bd->bi_flashsize;
+
+	rc = fdt_find_and_setprop(blob, "/localbus", "ranges",
+				  val, sizeof(val), 1);
+	if (rc)
+		printf("Unable to update property NOR mapping, err=%s\n",
+		       fdt_strerror(rc));
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

This is not needed anymore. With my latest patch (available in the u-boot-ppc4xx repository, master branch for pulling):

[PATCH 2/3] ppc4xx: Add weak default ft_board_setup() routine

this board specific code is not needed in this case, since it is an exact copy of the weak default routine. Please remove it in the next version of this patch.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#2 lore raw

PATCH 1/1 syscon3: changes to support FDT

Deare Stefan,

Quoted 7 lines · in message <[email protected]> you wrote:
Quoted 5 lines
 board/syscon3/syscon3.c   |   25 +++++++++++++++++++
 include/configs/syscon3.h |   58

+++++++++++++++++++------------------------- 2 files changed, 50 insertions(+), 33 deletions(-)

I can't find this board support. And also no patches for it.

Hm... either Alzheimer or SF dropped my mails :-(

I just resent the patches. You can find the stuff also in the syscon3 branch of the u-boot-testing repo.

Quoted 3 lines
Quoted 3 lines
board/syscon3/syscon3.c +3 -0
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void
+ft_board_setup(void *blob, bd_t *bd)

...

Quoted 4 lines

This is not needed anymore. With my latest patch (available in the u-boot-ppc4xx repository, master branch for pulling):

[PATCH 2/3] ppc4xx: Add weak default ft_board_setup() routine

Oops... seems this is available for 4xx only, right?

But the syscon3 board has a MPC8548 processor...

Best regards,

Wolfgang Denk

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
#3 lore raw

PATCH 1/1 syscon3: changes to support FDT

Hi Wolfgang,

Quoted 8 lines · Wolfgang Denk
Quoted 6 lines
Quoted 4 lines
 board/syscon3/syscon3.c   |   25 +++++++++++++++++++
 include/configs/syscon3.h |   58

+++++++++++++++++++------------------------- 2 files changed, 50 insertions(+), 33 deletions(-)

I can't find this board support. And also no patches for it.

Hm... either Alzheimer

I know that I have problems remembering things (:)), but...

Quoted 1 line

or SF dropped my mails :-(

this seems more likely for me. I couldn't find anything about "syscon3" searching the internet (google and mailing list archives). And I'm not totally sure, but I think some of the messages/patches I sent lately to the list were not received via the mailing-list account. I will watch more closely in the future.

Quoted 9 lines

I just resent the patches. You can find the stuff also in the syscon3 branch of the u-boot-testing repo.

Quoted 3 lines
Quoted 3 lines
board/syscon3/syscon3.c +3 -0
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void
+ft_board_setup(void *blob, bd_t *bd)

...

Quoted 6 lines
Quoted 4 lines

This is not needed anymore. With my latest patch (available in the u-boot-ppc4xx repository, master branch for pulling):

[PATCH 2/3] ppc4xx: Add weak default ft_board_setup() routine

Oops... seems this is available for 4xx only, right?

Right.

Quoted 1 line

But the syscon3 board has a MPC8548 processor...

Ah, ok. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#4 lore raw

PATCH 1/1 syscon3: changes to support FDT

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 2 lines

Hm... either Alzheimer

I know that I have problems remembering things (:)), but...

I meant: on my side (i. e. that I forgot to send them).

But it seems SF dropped some other mails, too.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
How many Unix hacks does it take to change a light bulb?  Let's  see,
   can you use a shell script for that or does it need a C program?