Skip to contentSkip to conversation

IXP42x patch series - 2nd attempt

U-Boot New Michael Schwingen 5 participants 40 messages Jan 3, 2011 – May 20, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

Hi,

here is my IXP42x patch series, which brings my IXP boards back to life after relocation was added. I hope I addressed all comments I got from the pervious patch.

Notes:

I added the XScale sub-architecture to the MAINTAINERS list to get a better overview which boards may still need work:
[PATCH 01/13] add XScale sub architecture (IXP/PXA) to board list

The NPE library needs a fix for B1 silicon - the special handling is only needed for Rev. A0, but the code treats everything *but* B0 as being the old A0 silicon:
[PATCH 02/13] add support for IXP42x Rev. B1 and newer

The dvlhost board has a watchdog that needs to be triggered regularly:
[PATCH 03/13] trigger hardware watchdog in IXP42x serial driver

Rework the startup and timer code:
[PATCH 04/13] Fix IXP code to work after relocation was added

make fails during depend pass in the NPE directory, due to missing include files:
[PATCH 05/13] fix "depend" target in npe directory

Board updates:
[PATCH 06/13] add wildcard to sections (for -ffunction-sections/-fdata-sections) [PATCH 07/13] update/fix AcTux1 board
[PATCH 08/13] update/fix AcTux2 board
[PATCH 09/13] update/fix AcTux3 board
[PATCH 10/13] update/fix AcTux4 board

The following changes should be OK (not sure about the environment location on IXDP425 - the old value is inside the monitor area, which seems to be wrong for this type of flash/linker script). I do not know if these should be committed, or should be left for the board maintainers:
[PATCH 11/13] update/fix some more IXP42x boards (only compile tested)

Add support for MII links that run at fixed speed, without a PHY with standard registers (ethernet switch on AcTux-2/AcTux-3, powerline modem on dvlhost):
[PATCH 12/13] IXP NPE: add support for fixed-speed MII ports

Add one new board:
[PATCH 13/13] add dvlhost (dLAN 200 AV Wireless G) board

cu
Michael

#1 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

---
 MAINTAINERS |   46 +++++++++++++++++++++++-----------------------
 1 files changed, 23 insertions(+), 23 deletions(-)
MAINTAINERS +23 -23
index ba83f71..5fc3de1 100644
@@ -552,8 +552,8 @@ Rowel Atienza <[email protected]>
 Stefano Babic <[email protected]>
 
 	ea20		davinci
-	polaris		xscale
-	trizepsiv	xscale
+	polaris		xscale/pxa
+	trizepsiv	xscale/pxa
 	mx51evk		i.MX51
  	vision2		i.MX51
 
@@ -582,7 +582,7 @@ Andreas Bie
 
 Cliff Brake <[email protected]>
 
-	pxa255_idp	xscale
+	pxa255_idp	xscale/pxa
 
 Rick Bronson <[email protected]>
 
@@ -619,7 +619,7 @@ Fabio Estevam <[email protected]>
 
 Peter Figuli <[email protected]>
 
-	wepep250	xscale
+	wepep250	xscale/pxa (removed)
 
 Daniel Gorsulowski <[email protected]>
 
@@ -687,7 +687,7 @@ Sergey Kubushyn <[email protected]>
 
 Prakash Kumar <[email protected]>
 
-	cerf250		xscale
+	cerf250		xscale/pxa
 
 Vipin Kumar <[email protected]>
 
@@ -761,9 +761,9 @@ John Rigby <[email protected]>
 
 Stefan Roese <[email protected]>
 
-	ixdpg425	xscale
-	pdnb3		xscale
-	scpu		xscale
+	ixdpg425	xscale/ixp
+	pdnb3		xscale/ixp
+	scpu		xscale/ixp
 
 Alessandro Rubini <[email protected]>
 Nomadik Linux Team <[email protected]>
@@ -786,15 +786,15 @@ Heiko Schocher <[email protected]>
 
 Robert Schwebel <[email protected]>
 
-	csb226		xscale
-	innokom		xscale
+	csb226		xscale/pxa
+	innokom		xscale/pxa
 
 Michael Schwingen <[email protected]>
 
-	actux1		xscale
-	actux2		xscale
-	actux3		xscale
-	actux4		xscale
+	actux1		xscale/ixp
+	actux2		xscale/ixp
+	actux3		xscale/ixp
+	actux4		xscale/ixp
 
 Andrea Scian <[email protected]>
 
@@ -818,12 +818,12 @@ Greg Ungerer <[email protected]>
 
 Marek Vasut <[email protected]>
 
-	balloon3	xscale
-	colibri_pxa270	xscale
-	palmld		xscale
-	palmtc		xscale
-	vpac270		xscale
-	zipitz2		xscale
+	balloon3	xscale/pxa
+	colibri_pxa270	xscale/pxa
+	palmld		xscale/pxa
+	palmtc		xscale/pxa
+	vpac270		xscale/pxa
+	zipitz2		xscale/pxa
 
 Hugo Villeneuve <[email protected]>
 
@@ -864,9 +864,9 @@ Sughosh Ganu <[email protected]>
 Unknown / orphaned boards:
  	Board		CPU	Last known maintainer / Comment
 .........................................................................
-	cradle		xscale	Kyle Harris <[email protected]> / dead address
-	ixdp425		xscale	Kyle Harris <[email protected]> / dead address
-	lubbock		xscale	Kyle Harris <[email protected]> / dead address
+	cradle		xscale/pxa	Kyle Harris <[email protected]> / dead address
+	ixdp425		xscale/ixp	Kyle Harris <[email protected]> / dead address
+	lubbock		xscale/pxa	Kyle Harris <[email protected]> / dead address
 
 	imx31_phycore_eet i.MX31  Guennadi Liakhovetski <[email protected]> / resigned
 	mx31ads		  i.MX31  Guennadi Liakhovetski <[email protected]> / resigned
Signature · 1 line
1.7.2.3
#2 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

Dear Michael Schwingen,

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

That's not a "board list", but the MAINTAINERS file (I would expect changes to boards.cfg when I read "board list").

MAINTAINERS Fabio Estevam <[email protected]> · line 622

Quoted 2 lines
MAINTAINERS +1 -1
-	wepep250	xscale
+	wepep250	xscale/pxa (removed)

What does "removed" mean? When it's removed, then please remove.

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
You Don't Have To Be 'Damned' To Work Here, But It Helps!!!
                                             - Terry Pratchett, _Eric_
#3 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

Am 01/25/2011 09:38 PM, schrieb Wolfgang Denk:

Quoted 6 lines

Dear Michael Schwingen,

Quoted 1 line · In message <[email protected]> you wrote:

That's not a "board list", but the MAINTAINERS file (I would expect changes to boards.cfg when I read "board list").

Right. Do you waht a patch with an updated comment?

Quoted 3 lines

MAINTAINERS Fabio Estevam <[email protected]> · line 622

Quoted 2 lines
MAINTAINERS +1 -1
-	wepep250	xscale
+	wepep250	xscale/pxa (removed)

What does "removed" mean? When it's removed, then please remove.

It looks like it is already removed - I could not find support for that board in the current code, but I think removing maintainers is nothing *I* should do without further discussion?

cu
Michael

#4 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

Dear Michael Schwingen,

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

That's not a "board list", but the MAINTAINERS file (I would expect changes to boards.cfg when I read "board list").

Right. Do you waht a patch with an updated comment?

Yes, please.

Quoted 6 lines
Quoted 3 lines

MAINTAINERS Fabio Estevam <[email protected]> · line 622

Quoted 2 lines
MAINTAINERS +1 -1
-	wepep250	xscale
+	wepep250	xscale/pxa (removed)

What does "removed" mean? When it's removed, then please remove.

It looks like it is already removed - I could not find support for that board in the current code, but I think removing maintainers is nothing *I* should do without further discussion?

Well, this got removed by Marek in commit 7369478.

Marek, it seems you forgot to clean up MAINTAINERS, and also to add the removed boards to the "doc/README.scrapyard" file. Can you please provide cleanup patches for these commits:

4262a7c   2010-10-22 01:38:01 +0200   PXA: Remove "xsengine" board
7369478   2010-10-22 01:38:01 +0200   PXA: Remove "wepep250" board
75e2035   2010-10-22 01:38:01 +0200   PXA: Remove "delta" board

Thanks.

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
Commitment, n.:      Commitment can be illustrated by a breakfast
of ham and eggs. The chicken was involved, the pig was committed.
#5 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

Quoted 22 lines · On Wednesday 26 January 2011 08:30:35 Wolfgang Denk wrote:

Dear Michael Schwingen,

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

That's not a "board list", but the MAINTAINERS file (I would expect changes to boards.cfg when I read "board list").

Right. Do you waht a patch with an updated comment?

Yes, please.

Quoted 8 lines
Quoted 4 lines

MAINTAINERS Fabio Estevam <[email protected]> · line 622

Quoted 2 lines
MAINTAINERS +1 -1
-	wepep250	xscale
+	wepep250	xscale/pxa (removed)

What does "removed" mean? When it's removed, then please remove.

It looks like it is already removed - I could not find support for that board in the current code, but I think removing maintainers is nothing *I* should do without further discussion?

Well, this got removed by Marek in commit 7369478.

Quoted 7 lines

Marek, it seems you forgot to clean up MAINTAINERS, and also to add the removed boards to the "doc/README.scrapyard" file. Can you please provide cleanup patches for these commits:

4262a7c   2010-10-22 01:38:01 +0200   PXA: Remove "xsengine" board
7369478   2010-10-22 01:38:01 +0200   PXA: Remove "wepep250" board
75e2035   2010-10-22 01:38:01 +0200   PXA: Remove "delta" board

I just dug this out ... is this still relevant ?

Thanks

Quoted 6 lines

Thanks.

Best regards,

Wolfgang Denk

#6 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

Dear Marek Vasut,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 8 lines

Marek, it seems you forgot to clean up MAINTAINERS, and also to add the removed boards to the "doc/README.scrapyard" file. Can you please provide cleanup patches for these commits:

4262a7c   2010-10-22 01:38:01 +0200   PXA: Remove "xsengine" board
7369478   2010-10-22 01:38:01 +0200   PXA: Remove "wepep250" board
75e2035   2010-10-22 01:38:01 +0200   PXA: Remove "delta" board

I just dug this out ... is this still relevant ?

I think it is.

Best regards,

Wolfgang Denk

Signature · 7 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
"Obviously, a major malfunction has occurred."
              -- Steve Nesbitt, voice of Mission Control, January 28,
                 1986, as the shuttle Challenger exploded within view
                 of the grandstands.
#7 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

Quoted 11 lines · On Thursday 07 April 2011 16:58:53 Wolfgang Denk wrote:

Dear Marek Vasut,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 7 lines

Marek, it seems you forgot to clean up MAINTAINERS, and also to add the removed boards to the "doc/README.scrapyard" file. Can you please provide cleanup patches for these commits:

4262a7c   2010-10-22 01:38:01 +0200   PXA: Remove "xsengine" board
7369478   2010-10-22 01:38:01 +0200   PXA: Remove "wepep250" board
75e2035   2010-10-22 01:38:01 +0200   PXA: Remove "delta" board
Quoted 7 lines
Quoted 1 line

I just dug this out ... is this still relevant ?

I think it is.

Best regards,

Wolfgang Denk

Adding this to my todo.

#8 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

In reply to Wolfgang Denk
Quoted 11 lines · Wolfgang Denk

Dear Marek Vasut,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 7 lines

Marek, it seems you forgot to clean up MAINTAINERS, and also to add the removed boards to the "doc/README.scrapyard" file. Can you please provide cleanup patches for these commits:

4262a7c   2010-10-22 01:38:01 +0200   PXA: Remove "xsengine" board
7369478   2010-10-22 01:38:01 +0200   PXA: Remove "wepep250" board
75e2035   2010-10-22 01:38:01 +0200   PXA: Remove "delta" board
Quoted 7 lines
Quoted 1 line

I just dug this out ... is this still relevant ?

I think it is.

Best regards,

Wolfgang Denk

Hi, I believe I sent the patch finally ... I hope this can be closed then.

Damn it took so long it makes me feel embarrassed.

#9 lore raw

PATCH 1/13 add XScale sub architecture (IXP/PXA) to board list

In reply to Wolfgang Denk
Quoted 22 lines · Wolfgang Denk

Dear Michael Schwingen,

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

That's not a "board list", but the MAINTAINERS file (I would expect changes to boards.cfg when I read "board list").

Right. Do you waht a patch with an updated comment?

Yes, please.

Quoted 8 lines
Quoted 4 lines

MAINTAINERS Fabio Estevam <[email protected]> · line 622

Quoted 2 lines
MAINTAINERS +1 -1
-	wepep250	xscale
+	wepep250	xscale/pxa (removed)

What does "removed" mean? When it's removed, then please remove.

It looks like it is already removed - I could not find support for that board in the current code, but I think removing maintainers is nothing *I* should do without further discussion?

Well, this got removed by Marek in commit 7369478.

Quoted 7 lines

Marek, it seems you forgot to clean up MAINTAINERS, and also to add the removed boards to the "doc/README.scrapyard" file. Can you please provide cleanup patches for these commits:

4262a7c   2010-10-22 01:38:01 +0200   PXA: Remove "xsengine" board
7369478   2010-10-22 01:38:01 +0200   PXA: Remove "wepep250" board
75e2035   2010-10-22 01:38:01 +0200   PXA: Remove "delta" board

Damn, I'm still missing this in !

Quoted 6 lines

Thanks.

Best regards,

Wolfgang Denk

#10 lore raw

PATCH 2/13 add support for IXP42x Rev. B1 and newer

In reply to Michael Schwingen
---
 arch/arm/cpu/ixp/npe/npe.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/ixp/npe/npe.c +2 -1
index 2e68689..9d1090e 100644
@@ -621,8 +621,9 @@ int npe_initialize(bd_t * bis)
 			if (ixFeatureCtrlDeviceRead() == IX_FEATURE_CTRL_DEVICE_TYPE_IXP42X) {
 				switch (ixFeatureCtrlProductIdRead() & IX_FEATURE_CTRL_SILICON_STEPPING_MASK) {
 				case IX_FEATURE_CTRL_SILICON_TYPE_B0:
+				default: /* newer than B0 */
 					/*
-					 * If it is B0 Silicon, we only enable port when its corresponding
+					 * If it is B0 or newer Silicon, we only enable port when its corresponding
 					 * Eth Coprocessor is available.
 					 */
 					if (ixFeatureCtrlComponentCheck(IX_FEATURECTRL_ETH0) ==
Signature · 1 line
1.7.2.3
#11 lore raw

PATCH 2/13 add support for IXP42x Rev. B1 and newer

Dear Michael Schwingen,

Quoted 11 lines · In message <[email protected]> you wrote:
---
 arch/arm/cpu/ixp/npe/npe.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/ixp/npe/npe.c +0 -0
index 2e68689..9d1090e 100644

arch/arm/cpu/ixp/npe/npe.c int npe_initialize(bd_t * bis) · line 626

Quoted 7 lines
arch/arm/cpu/ixp/npe/npe.c +2 -1
@@ -621,8 +621,9 @@ int npe_initialize(bd_t * bis)
 			if (ixFeatureCtrlDeviceRead() == IX_FEATURE_CTRL_DEVICE_TYPE_IXP42X) {
 				switch (ixFeatureCtrlProductIdRead() & IX_FEATURE_CTRL_SILICON_STEPPING_MASK) {
 				case IX_FEATURE_CTRL_SILICON_TYPE_B0:
+				default: /* newer than B0 */
 					/*
-					 * If it is B0 Silicon, we only enable port when its corresponding
+					 * If it is B0 or newer Silicon, we only enable port when its corresponding

Lines too long.

Best regards,

Wolfgang Denk

Signature · 6 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
...the increased productivity fostered by a friendly environment  and
quality  tools  is  essential  to  meet  ever  increasing demands for
software.               - M. D. McIlroy, E. N. Pinson and B. A. Tague
#12 lore raw

PATCH 3/13 trigger hardware watchdog in IXP42x serial driver

In reply to Michael Schwingen
---
 drivers/serial/serial_ixp.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/serial/serial_ixp.c +5 -2
index dd26af4..5893fd2 100644
@@ -30,6 +30,7 @@
 
 #include <common.h>
 #include <asm/arch/ixp425.h>
+#include <watchdog.h>
 
 /*
  *               14.7456 MHz
@@ -85,7 +86,8 @@ int serial_init (void)
 void serial_putc (const char c)
 {
 	/* wait for room in the tx FIFO on UART */
-	while ((LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_TEMT) == 0);
+	while ((LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_TEMT) == 0)
+		WATCHDOG_RESET ();	/* Reset HW Watchdog, if needed */
 
 	THR(CONFIG_SYS_IXP425_CONSOLE) = c;
 
@@ -111,7 +113,8 @@ int serial_tstc (void)
  */
 int serial_getc (void)
 {
-	while (!(LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_DR));
+	while (!(LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_DR))
+		WATCHDOG_RESET ();	/* Reset HW Watchdog, if needed */
 
 	return (char) RBR(CONFIG_SYS_IXP425_CONSOLE) & 0xff;
 }
Signature · 1 line
1.7.2.3
#13 lore raw

PATCH 4/13 Fix IXP code to work after relocation was added

In reply to Michael Schwingen

- jump to real flash location after reset before turning off flash mirror
- fix timer system to use HZ == 1000, remove broken interrupt-based code

---
 arch/arm/cpu/ixp/cpu.c                 |    5 --
 arch/arm/cpu/ixp/start.S               |   59 ++--------------
 arch/arm/cpu/ixp/timer.c               |  125 +++++++++++++++-----------------
 arch/arm/include/asm/arch-ixp/ixp425.h |    5 +-
 4 files changed, 66 insertions(+), 128 deletions(-)
arch/arm/cpu/ixp/cpu.c +0 -5
index ce275e5..942845d 100644
@@ -36,8 +36,6 @@
 #include <asm/arch/ixp425.h>
 #include <asm/system.h>
 
-ulong loops_per_jiffy;
-
 static void cache_flush(void);
 
 #if defined(CONFIG_DISPLAY_CPUINFO)
@@ -51,17 +49,14 @@ int print_cpuinfo (void)
 	puts("CPU:   Intel IXP425 at ");
 	switch ((id & 0x000003f0) >> 4) {
 	case 0x1c:
-		loops_per_jiffy = 887467;
 		speed = 533;
 		break;
 
 	case 0x1d:
-		loops_per_jiffy = 666016;
 		speed = 400;
 		break;
 
 	case 0x1f:
-		loops_per_jiffy = 442901;
 		speed = 266;
 		break;
 	}
arch/arm/cpu/ixp/start.S +5 -54

103 lines not on this page · raw message

arch/arm/cpu/ixp/timer.c +59 -66

168 lines not on this page · raw message

arch/arm/include/asm/arch-ixp/ixp425.h +2 -3
index 2114437..ddbf713 100644
@@ -391,9 +391,8 @@
 #define IXP425_TIMER_REG(x) (IXP425_TIMER_BASE_PHYS+(x))
 #endif
 
-#if 0 /* test-only: also defined in npe/include/... */
-#define IXP425_OSTS	IXP425_TIMER_REG(IXP425_OSTS_OFFSET)
-#endif
+/* _B to avoid collision: also defined in npe/include/... */
+#define IXP425_OSTS_B	IXP425_TIMER_REG(IXP425_OSTS_OFFSET) 
 #define IXP425_OST1	IXP425_TIMER_REG(IXP425_OST1_OFFSET)
 #define IXP425_OSRT1	IXP425_TIMER_REG(IXP425_OSRT1_OFFSET)
 #define IXP425_OST2	IXP425_TIMER_REG(IXP425_OST2_OFFSET)
Signature · 1 line
1.7.2.3
#14 lore raw

PATCH 4/13 Fix IXP code to work after relocation was added

Dear Michael Schwingen,

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

- jump to real flash location after reset before turning off flash mirror
- fix timer system to use HZ == 1000, remove broken interrupt-based code

---
 arch/arm/cpu/ixp/cpu.c                 |    5 --
 arch/arm/cpu/ixp/start.S               |   59 ++--------------
 arch/arm/cpu/ixp/timer.c               |  125 +++++++++++++++-----------------
 arch/arm/include/asm/arch-ixp/ixp425.h |    5 +-
 4 files changed, 66 insertions(+), 128 deletions(-)

...

arch/arm/cpu/ixp/timer.c line 65

Quoted 3 lines
arch/arm/cpu/ixp/timer.c +2 -1
-int timer_init (void)
+static ulong timestamp;
+static ulong lastinc;

This code is broken. You must not access any variables in BSS segment (like these two) before relocation.

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
If the facts don't fit the theory, change the facts.
                                                   -- Albert Einstein
#15 lore raw

PATCH 5/13 fix "depend" target in npe directory

In reply to Michael Schwingen
---
 arch/arm/cpu/ixp/npe/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/cpu/ixp/npe/Makefile +1 -0
index c756a1d..14ab3c7 100644
@@ -27,6 +27,7 @@ LIB := $(obj)libnpe.o
 
 LOCAL_CFLAGS  += -I$(TOPDIR)/arch/arm/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
 CFLAGS  += $(LOCAL_CFLAGS)
+CPPFLAGS  += $(LOCAL_CFLAGS) # needed for depend
 HOSTCFLAGS  += $(LOCAL_CFLAGS)
 
 COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \
Signature · 1 line
1.7.2.3
#16 lore raw

PATCH 5/13 fix "depend" target in npe directory

Dear Michael Schwingen,

Quoted 11 lines · In message <[email protected]> you wrote:
---
 arch/arm/cpu/ixp/npe/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/cpu/ixp/npe/Makefile +0 -0
index c756a1d..14ab3c7 100644

arch/arm/cpu/ixp/npe/Makefile LIB := $(obj)libnpe.o · line 31

Quoted 5 lines
arch/arm/cpu/ixp/npe/Makefile +1 -0
@@ -27,6 +27,7 @@ LIB := $(obj)libnpe.o
 
 LOCAL_CFLAGS  += -I$(TOPDIR)/arch/arm/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
 CFLAGS  += $(LOCAL_CFLAGS)
+CPPFLAGS  += $(LOCAL_CFLAGS) # needed for depend
 HOSTCFLAGS  += $(LOCAL_CFLAGS)

It should then be possible to remove the CFLAGS line, right?

Best regards,

Wolfgang Denk

Signature · 4 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
"At least they're __________EXPERIENCED incompetents"
#17 lore raw

PATCH 5/13 fix "depend" target in npe directory

Am 01/25/2011 09:42 PM, schrieb Wolfgang Denk:

Quoted 14 lines

Dear Michael Schwingen,

Quoted 11 lines · In message <[email protected]> you wrote:
---
 arch/arm/cpu/ixp/npe/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/cpu/ixp/npe/Makefile +0 -0
index c756a1d..14ab3c7 100644
@@ -27,6 +27,7 @@ LIB := $(obj)libnpe.o
 
Quoted 5 lines

arch/arm/cpu/ixp/npe/Makefile LIB := $(obj)libnpe.o · line 31

Quoted 4 lines
arch/arm/cpu/ixp/npe/Makefile +1 -0
 LOCAL_CFLAGS  += -I$(TOPDIR)/arch/arm/cpu/ixp/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
 CFLAGS  += $(LOCAL_CFLAGS)
+CPPFLAGS  += $(LOCAL_CFLAGS) # needed for depend
 HOSTCFLAGS  += $(LOCAL_CFLAGS)

It should then be possible to remove the CFLAGS line, right?

That does not seem to work - I need both. I do not have a full understanding of the Makefile structures, but I guess the inclusion of CPPFLAGS into CFLAGS happens before I can add to CPPFLAGS.

cu
Michael

#18 lore raw

PATCH 6/13 add wildcard to sections (for -ffunction-sections/-fdata-sections)

In reply to Michael Schwingen
---
 arch/arm/cpu/ixp/u-boot.lds |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/cpu/ixp/u-boot.lds +4 -4
index a55eb8a..747a7b6 100644
@@ -31,8 +31,8 @@ SECTIONS
 	. = ALIGN(4);
 	.text :
 	{
-		arch/arm/cpu/ixp/start.o(.text)
-		*(.text)
+		arch/arm/cpu/ixp/start.o(.text*)
+		*(.text*)
 	}
 
 	. = ALIGN(4);
@@ -40,7 +40,7 @@ SECTIONS
 
 	. = ALIGN(4);
 	.data : {
-		*(.data)
+		*(.data*)
 	}
 
 	. = ALIGN(4);
@@ -65,7 +65,7 @@ SECTIONS
 
 	.bss __rel_dyn_start (OVERLAY) : {
 		__bss_start = .;
-		*(.bss)
+		*(.bss*)
 		 . = ALIGN(4);
 		_end = .;
 	}
Signature · 1 line
1.7.2.3
#19 lore raw

PATCH 7/13 update/fix AcTux1 board

In reply to Michael Schwingen
---
 board/actux1/actux1.c    |   22 +++++++++++---------
 board/actux1/config.mk   |    7 +----
 board/actux1/u-boot.lds  |   42 +++++++++++++++++++++++++++------------
 boards.cfg               |    5 +++-
 include/configs/actux1.h |   48 +++++++++++++++++++++++++++------------------
 5 files changed, 76 insertions(+), 48 deletions(-)
board/actux1/actux1.c +12 -10
index 399be23..c56ec94 100644
@@ -42,6 +42,17 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int board_early_init_f (void)
+{
+	/* CS5: Debug port */
+	*IXP425_EXP_CS5 = 0x9d520003;
+	/* CS6: HwRel */
+	*IXP425_EXP_CS6 = 0x81860001;
+	/* CS7: LEDs */
+	*IXP425_EXP_CS7 = 0x80900003;
+	return 0;
+}
+
 int board_init (void)
 {
 	gd->bd->bi_arch_number = MACH_TYPE_ACTUX1;
@@ -61,13 +72,6 @@ int board_init (void)
 	GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
 	*IXP425_GPIO_GPCLKR = 0x011001FF;
 
-	/* CS5: Debug port */
-	*IXP425_EXP_CS5 = 0x9d520003;
-	/* CS6: HwRel */
-	*IXP425_EXP_CS6 = 0x81860001;
-	/* CS7: LEDs */
-	*IXP425_EXP_CS7 = 0x80900003;
-
 	udelay (533);
 	GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
 
@@ -116,9 +120,7 @@ u32 get_board_rev (void)
 
 int dram_init (void)
 {
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
 	return (0);
 }
 
board/actux1/config.mk +2 -5
index 88634f7..a370337 100644
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections
board/actux1/u-boot.lds +29 -13

61 lines not on this page · raw message

boards.cfg +4 -1
index 94b8745..695baca 100644
@@ -122,7 +122,10 @@ omap4_panda                  arm         armv7       panda               ti
 omap4_sdp4430                arm         armv7       sdp4430             ti             omap4
 s5p_goni                     arm         armv7       goni                samsung        s5pc1xx
 smdkc100                     arm         armv7       smdkc100            samsung        s5pc1xx
-actux1                       arm         ixp
+actux1_4_16                  arm         ixp         actux1              -              -           actux1:FLASH2X2
+actux1_8_16                  arm         ixp         actux1              -              -           actux1:FLASH1X8
+actux1_4_32                  arm         ixp         actux1              -              -           actux1:FLASH2X2,RAM_32MB
+actux1_8_32                  arm         ixp         actux1              -              -           actux1:FLASH1X8,RAM_32MB
 actux2                       arm         ixp
 actux3                       arm         ixp
 actux4                       arm         ixp
include/configs/actux1.h +29 -19

141 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#20 lore raw

PATCH 7/13 update/fix AcTux1 board

Dear Michael Schwingen,

Quoted 17 lines · In message <[email protected]> you wrote:
---
 board/actux1/actux1.c    |   22 +++++++++++---------
 board/actux1/config.mk   |    7 +----
 board/actux1/u-boot.lds  |   42 +++++++++++++++++++++++++++------------
 boards.cfg               |    5 +++-
 include/configs/actux1.h |   48 +++++++++++++++++++++++++++------------------
 5 files changed, 76 insertions(+), 48 deletions(-)
board/actux1/actux1.c +0 -0
index 399be23..c56ec94 100644
@@ -42,6 +42,17 @@
 
 DECLARE_GLOBAL_DATA_PTR;

board/actux1/actux1.c line 53

Quoted 10 lines
board/actux1/actux1.c +9 -0
 
+int board_early_init_f (void)
+{
+	/* CS5: Debug port */
+	*IXP425_EXP_CS5 = 0x9d520003;
+	/* CS6: HwRel */
+	*IXP425_EXP_CS6 = 0x81860001;
+	/* CS7: LEDs */
+	*IXP425_EXP_CS7 = 0x80900003;
+	return 0;

Please always use I/O accessors. Please fix globally.

board/actux1/actux1.c u32 get_board_rev (void) · line 124

Quoted 7 lines
board/actux1/actux1.c +1 -3
 int dram_init (void)
 {
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
 	return (0);

You should use get_ram_size() here.

board/actux1/config.mk line 3

Quoted 13 lines
board/actux1/config.mk +2 -5
index 88634f7..a370337 100644
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections

Can we please get rid of this file completely?

Best regards,

Wolfgang Denk

Signature · 4 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
Swap read error.  You lose your mind.
#21 lore raw

PATCH 7/13 update/fix AcTux1 board

Am 01/25/2011 09:44 PM, schrieb Wolfgang Denk:

Quoted 15 lines
Quoted 6 lines
board/actux1/config.mk +0 -0
index 88634f7..a370337 100644

board/actux1/config.mk line 3

Quoted 8 lines
board/actux1/config.mk +2 -5
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections

Can we please get rid of this file completely?

If you have a better proposal where to add -ffunction-sections and --gc-sections?

In my previous patch, I proposed a generic config switch (which added those flags in the generic Makefile) for that, but the only comment I got was from Mike Frysinger, stating that an extra config switch was unnecessary when I could simply set those variables in the board config.mk.

Those two switches make for a significant reduction in code size (~61000 bytes, nearly one flash sector!), so dropping them is no real option.

Which solution would you prefer?

cu
Michael

#22 lore raw

PATCH 7/13 update/fix AcTux1 board

Dear Michael Schwingen,

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

Am 01/25/2011 09:44 PM, schrieb Wolfgang Denk:

Quoted 15 lines
Quoted 6 lines
board/actux1/config.mk +0 -0
index 88634f7..a370337 100644

board/actux1/config.mk line 3

Quoted 8 lines
board/actux1/config.mk +2 -5
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections

Can we please get rid of this file completely?

Quoted 2 lines

If you have a better proposal where to add -ffunction-sections and --gc-sections?

These should go to arch/arm/config.mk or at least arch/arm/cpu/*/config.mk

It makes little sense to enable this on a per board level.

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
Real programmers can write assembly code in any language.   :-)
                      - Larry Wall in  <[email protected]>
#23 lore raw

PATCH 7/13 update/fix AcTux1 board

In reply to Wolfgang Denk

Am 01/25/2011 09:44 PM, schrieb Wolfgang Denk:

Quoted 16 lines
Quoted 6 lines
board/actux1/config.mk +0 -0
index 88634f7..a370337 100644

board/actux1/config.mk line 3

Quoted 8 lines
board/actux1/config.mk +2 -5
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections

Can we please get rid of this file completely?

I got out everything except the LDSCRIPT definition. However, I can't find a way to specify a board-specific linker script (which I need due to the embedded environment) without using config.mk in the board directory, since the platform sets up a non-board default in arch/arm/config.mk.

How about a
#define CONFIG_BOARD_LDSCRIPT
that is picked up by autoconf.mk and used in the Makefiles if set?

cu
Michael

#24 lore raw

PATCH 7/13 update/fix AcTux1 board

Quoted 23 lines · On Sat, 29 Jan 2011 16:57:07 +0100 Michael Schwingen…

Am 01/25/2011 09:44 PM, schrieb Wolfgang Denk:

Quoted 16 lines
Quoted 6 lines
board/actux1/config.mk +0 -0
index 88634f7..a370337 100644

board/actux1/config.mk line 3

Quoted 8 lines
board/actux1/config.mk +2 -5
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections

Can we please get rid of this file completely?

I got out everything except the LDSCRIPT definition. However, I can't find a way to specify a board-specific linker script (which I need due to the embedded environment) without using config.mk in the board directory, since the platform sets up a non-board default in arch/arm/config.mk.

Quoted 3 lines

How about a
#define CONFIG_BOARD_LDSCRIPT
that is picked up by autoconf.mk and used in the Makefiles if set?

PowerPC uses CONFIG_SYS_LDSCRIPT for this.

-Scott

#25 lore raw

PATCH 7/13 update/fix AcTux1 board

Am 01/31/2011 08:01 PM, schrieb Scott Wood:

Quoted 11 lines
Quoted 10 lines

I got out everything except the LDSCRIPT definition. However, I can't find a way to specify a board-specific linker script (which I need due to the embedded environment) without using config.mk in the board directory, since the platform sets up a non-board default in arch/arm/config.mk.

How about a
#define CONFIG_BOARD_LDSCRIPT
that is picked up by autoconf.mk and used in the Makefiles if set?

PowerPC uses CONFIG_SYS_LDSCRIPT for this.

Thanks, found it - I had only searched non-architecture Makefiles. I can copy that mechanism to ARM.

cu
Michael

#26 lore raw

PATCH 8/13 update/fix AcTux2 board

In reply to Michael Schwingen
---
 board/actux2/actux2.c    |   26 +++++++++++++-----------
 board/actux2/config.mk   |    7 +----
 board/actux2/u-boot.lds  |   47 ++++++++++++++++++++++++++++-----------------
 include/configs/actux2.h |   21 +++++++++++++++----
 4 files changed, 61 insertions(+), 40 deletions(-)
board/actux2/actux2.c +14 -12
index d6aaad6..634553f 100644
@@ -43,6 +43,19 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int board_early_init_f (void)
+{
+	/* CS1: IPAC-X */
+	*IXP425_EXP_CS1 = 0x94d10013;
+	/* CS5: Debug port */
+	*IXP425_EXP_CS5 = 0x9d520003;
+	/* CS6: HW release register */
+	*IXP425_EXP_CS6 = 0x81860001;
+	/* CS7: LEDs */
+	*IXP425_EXP_CS7 = 0x80900003;
+	return 0;
+}
+
 int board_init (void)
 {
 	gd->bd->bi_arch_number = MACH_TYPE_ACTUX2;
@@ -70,15 +83,6 @@ int board_init (void)
 	GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
 	*IXP425_GPIO_GPCLKR = 0x011001FF;
 
-	/* CS1: IPAC-X */
-	*IXP425_EXP_CS1 = 0x94d10013;
-	/* CS5: Debug port */
-	*IXP425_EXP_CS5 = 0x9d520003;
-	/* CS6: HW release register */
-	*IXP425_EXP_CS6 = 0x81860001;
-	/* CS7: LEDs */
-	*IXP425_EXP_CS7 = 0x80900003;
-
 	udelay (533);
 	GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
 	GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
@@ -112,9 +116,7 @@ int checkboard (void)
 
 int dram_init (void)
 {
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
 	return (0);
 }
 
board/actux2/config.mk +2 -5
index 88634f7..a370337 100644
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections
board/actux2/u-boot.lds +29 -18

73 lines not on this page · raw message

include/configs/actux2.h +16 -5
index 756279e..4ba3ce0 100644
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE			115200
 #define CONFIG_BOOTDELAY		5
 #define CONFIG_ZERO_BOOTDELAY_CHECK	/* check for keypress on bootdelay==0 */
+#define CONFIG_BOARD_EARLY_INIT_F	1
 
 /***************************************************************
  * U-boot generic defines start here.
@@ -45,7 +46,6 @@
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN			(CONFIG_ENV_SIZE + 128*1024)
-/* size in bytes reserved for initial data */
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
@@ -85,8 +85,9 @@
 #define CONFIG_SYS_MEMTEST_START		0x00400000
 #define CONFIG_SYS_MEMTEST_END			0x00800000
 
-/* spec says 66.666 MHz, but it appears to be 33 */
-#define CONFIG_SYS_HZ				3333333
+/* timer clock - 2* OSC_IN system clock */
+#define CONFIG_IXP425_TIMER_CLK                 66666666
+#define CONFIG_SYS_HZ				1000
 
 /* default load address */
 #define CONFIG_SYS_LOAD_ADDR			0x00010000
@@ -112,7 +113,7 @@
 /* SDRAM settings */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM_1			0x00000000
-#define CONFIG_SYS_DRAM_BASE			0x00000000
+#define CONFIG_SYS_SDRAM_BASE			0x00000000
 
 /* 16MB SDRAM */
 #define CONFIG_SYS_SDR_CONFIG			0x3A
@@ -122,6 +123,7 @@
 #define CONFIG_SYS_DRAM_SIZE			0x01000000
 
 /* FLASH organization */
+#define CONFIG_SYS_TEXT_BASE		0x50000000
 #define CONFIG_SYS_MAX_FLASH_BANKS		1
 /* max number of sectors on one chip */
 #define CONFIG_SYS_MAX_FLASH_SECT		140
@@ -184,13 +186,15 @@
 	"npe_ucode=50040000\0"						\
 	"mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
 	"kerneladdr=50050000\0"						\
+	"kernelfile=actux2/uImage\0"					\
+	"rootfile=actux2/rootfs\0"					\
 	"rootaddr=50170000\0"						\
 	"loadaddr=10000\0"						\
 	"updateboot_ser=mw.b 10000 ff 40000;"				\
 	" loady ${loadaddr};"						\
 	" run eraseboot writeboot\0"					\
 	"updateboot_net=mw.b 10000 ff 40000;"				\
-	" tftp ${loadaddr} u-boot.bin;"					\
+	" tftp ${loadaddr} actux2/u-boot.bin;"					\
 	" run eraseboot writeboot\0"					\
 	"eraseboot=protect off 50000000 50003fff;"			\
 	" protect off 50006000 5003ffff;"				\
@@ -200,6 +204,9 @@
 	" cp.b 16000 50006000 3a000\0"					\
 	"eraseenv=protect off 50004000 50005fff;"			\
 	" erase 50004000 50005fff\0"					\
+	"updateucode=loady;"						\
+	" era ${npe_ucode} +${filesize};"				\
+	" cp.b ${loadaddr} ${npe_ucode} ${filesize}\0"			\
 	"updateroot=tftp ${loadaddr} ${rootfile};"			\
 	" era ${rootaddr} +${filesize};"				\
 	" cp.b ${loadaddr} ${rootaddr} ${filesize}\0"			\
@@ -218,4 +225,8 @@
 	" tftpboot ${loadaddr} ${kernelfile};"				\
 	" bootm\0"
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_INIT_SP_ADDR        \
+	(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.2.3
#27 lore raw

PATCH 8/13 update/fix AcTux2 board

Dear Michael Schwingen,

Quoted 18 lines · In message <[email protected]> you wrote:
---
 board/actux2/actux2.c    |   26 +++++++++++++-----------
 board/actux2/config.mk   |    7 +----
 board/actux2/u-boot.lds  |   47 ++++++++++++++++++++++++++++-----------------
 include/configs/actux2.h |   21 +++++++++++++++----
 4 files changed, 61 insertions(+), 40 deletions(-)
board/actux2/actux2.c +1 -0
index d6aaad6..634553f 100644
@@ -43,6 +43,19 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int board_early_init_f (void)

board/actux2/actux2.c line 56

Quoted 10 lines
board/actux2/actux2.c +10 -0
+{
+	/* CS1: IPAC-X */
+	*IXP425_EXP_CS1 = 0x94d10013;
+	/* CS5: Debug port */
+	*IXP425_EXP_CS5 = 0x9d520003;
+	/* CS6: HW release register */
+	*IXP425_EXP_CS6 = 0x81860001;
+	/* CS7: LEDs */
+	*IXP425_EXP_CS7 = 0x80900003;
+	return 0;

Same comments as for AcTux1 apply to this patch, and to the other AcTux* patches as well.

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
"You shouldn't make my toaster angry." - Household security explained
in "Johnny Quest"
#28 lore raw

PATCH 8/13 update/fix AcTux2 board

Quoted 17 lines · Wolfgang Denk

board/actux2/actux2.c line 56

Quoted 13 lines
board/actux2/actux2.c +11 -0
+int board_early_init_f (void)
+{
+	/* CS1: IPAC-X */
+	*IXP425_EXP_CS1 = 0x94d10013;
+	/* CS5: Debug port */
+	*IXP425_EXP_CS5 = 0x9d520003;
+	/* CS6: HW release register */
+	*IXP425_EXP_CS6 = 0x81860001;
+	/* CS7: LEDs */
+	*IXP425_EXP_CS7 = 0x80900003;
+	return 0;

Same comments as for AcTux1 apply to this patch, and to the other AcTux* patches as well.

This is basically just existing code that is moved around, but I will change this globally.

cu
Michael

#29 lore raw

PATCH 9/13 update/fix AcTux3 board

In reply to Michael Schwingen
---
 board/actux3/actux3.c    |   27 ++++++++++++++-----------
 board/actux3/config.mk   |    7 +----
 board/actux3/u-boot.lds  |   47 ++++++++++++++++++++++++++++-----------------
 include/configs/actux3.h |   23 ++++++++++++++++-----
 4 files changed, 63 insertions(+), 41 deletions(-)
board/actux3/actux3.c +15 -12
index 63bf365..8875148 100644
@@ -43,6 +43,19 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int board_early_init_f (void)
+{
+	/* CS1: IPAC-X */
+	*IXP425_EXP_CS1 = 0x94d10013;
+	/* CS5: Debug port */
+	*IXP425_EXP_CS5 = 0x9d520003;
+	/* CS6: Release/Option register */
+	*IXP425_EXP_CS6 = 0x81860001;
+	/* CS7: LEDs */
+	*IXP425_EXP_CS7 = 0x80900003;
+	return 0;
+}
+
 int board_init (void)
 {
 	gd->bd->bi_arch_number = MACH_TYPE_ACTUX3;
@@ -81,15 +94,7 @@ int board_init (void)
 	GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
 	*IXP425_GPIO_GPCLKR = 0x011001FF;
 
-	/* CS1: IPAC-X */
-	*IXP425_EXP_CS1 = 0x94d10013;
-	/* CS5: Debug port */
-	*IXP425_EXP_CS5 = 0x9d520003;
-	/* CS6: Release/Option register */
-	*IXP425_EXP_CS6 = 0x81860001;
-	/* CS7: LEDs */
-	*IXP425_EXP_CS7 = 0x80900003;
-
+	/* we need a minimum PCI reset pulse width after enabling the clock */
 	udelay (533);
 	GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
 	GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
@@ -138,9 +143,7 @@ u32 get_board_rev (void)
 
 int dram_init (void)
 {
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
 	return (0);
 }
 
board/actux3/config.mk +2 -5
index 88634f7..a370337 100644
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
-
 LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections
board/actux3/u-boot.lds +29 -18

73 lines not on this page · raw message

include/configs/actux3.h +17 -6
index ad9173f..4b9b496 100644
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE			115200
 #define CONFIG_BOOTDELAY		3
 #define CONFIG_ZERO_BOOTDELAY_CHECK	/* check for keypress on bootdelay==0 */
+#define CONFIG_BOARD_EARLY_INIT_F	1
 
 /***************************************************************
  * U-boot generic defines start here.
@@ -45,7 +46,6 @@
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN			(CONFIG_ENV_SIZE + 128*1024)
-/* size in bytes reserved for initial data */
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
@@ -83,8 +83,9 @@
 #define CONFIG_SYS_MEMTEST_START		0x00400000
 #define CONFIG_SYS_MEMTEST_END			0x00800000
 
-/* spec says 66.666 MHz, but it appears to be 33 */
-#define CONFIG_SYS_HZ				3333333
+/* timer clock - 2* OSC_IN system clock */
+#define CONFIG_IXP425_TIMER_CLK                 66666666
+#define CONFIG_SYS_HZ				1000
 
 /* default load address */
 #define CONFIG_SYS_LOAD_ADDR			0x00010000
@@ -111,7 +112,7 @@
 /* SDRAM settings */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM_1			0x00000000
-#define CONFIG_SYS_DRAM_BASE			0x00000000
+#define CONFIG_SYS_SDRAM_BASE			0x00000000
 
 /* 16MB SDRAM */
 #define CONFIG_SYS_SDR_CONFIG			0x3A
@@ -121,6 +122,7 @@
 #define CONFIG_SYS_DRAM_SIZE			0x01000000
 
 /* FLASH organization */
+#define CONFIG_SYS_TEXT_BASE		0x50000000
 #define CONFIG_SYS_MAX_FLASH_BANKS		1
 /* max number of sectors on one chip */
 #define CONFIG_SYS_MAX_FLASH_SECT		140
@@ -184,13 +186,15 @@
 	"npe_ucode=50040000\0"						\
 	"mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
 	"kerneladdr=50050000\0"						\
+	"kernelfile=actux3/uImage\0"					\
+	"rootfile=actux3/rootfs\0"					\
 	"rootaddr=50170000\0"						\
 	"loadaddr=10000\0"						\
 	"updateboot_ser=mw.b 10000 ff 40000;"				\
 	" loady ${loadaddr};"						\
 	" run eraseboot writeboot\0"					\
 	"updateboot_net=mw.b 10000 ff 40000;"				\
-	" tftp ${loadaddr} u-boot.bin;"					\
+	" tftp ${loadaddr} actux3/u-boot.bin;"				\
 	" run eraseboot writeboot\0"					\
 	"eraseboot=protect off 50000000 50003fff;"			\
 	" protect off 50006000 5003ffff;"				\
@@ -200,6 +204,9 @@
 	" cp.b 16000 50006000 3a000\0"					\
 	"eraseenv=protect off 50004000 50005fff;"			\
 	" erase 50004000 50005fff\0"					\
+	"updateucode=loady;"						\
+	" era ${npe_ucode} +${filesize};"				\
+	" cp.b ${loadaddr} ${npe_ucode} ${filesize}\0"			\
 	"updateroot=tftp ${loadaddr} ${rootfile};"			\
 	" era ${rootaddr} +${filesize};"				\
 	" cp.b ${loadaddr} ${rootaddr} ${filesize}\0"			\
@@ -210,7 +217,7 @@
 	" rootfstype=squashfs,jffs2 init=/etc/preinit\0"		\
 	"netargs=setenv bootargs mtdparts=${mtd} root=/dev/mtdblock3"	\
 	" rootfstype=squashfs,jffs2 init=/etc/preinit\0"		\
-	"addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0" \
+	"addtty=setenv bootargs ${bootargs} console=ttyS1,${baudrate}\0" \
 	"addeth=setenv bootargs ${bootargs} ethaddr=${ethaddr}\0"	\
 	"boot_flash=run flashargs addtty addeth;"			\
 	" bootm ${kerneladdr}\0"					\
@@ -218,4 +225,8 @@
 	" tftpboot ${loadaddr} ${kernelfile};"				\
 	" bootm\0"
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_INIT_SP_ADDR        \
+	(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.2.3
#30 lore raw

PATCH 10/13 update/fix AcTux4 board

In reply to Michael Schwingen
---
 board/actux4/actux4.c    |   12 +++++++-----
 board/actux4/config.mk   |    6 ++----
 include/configs/actux4.h |   22 +++++++++++++++++-----
 3 files changed, 26 insertions(+), 14 deletions(-)
board/actux4/actux4.c +7 -5
index f373b58..f66acd8 100644
@@ -42,6 +42,12 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+int board_early_init_f (void)
+{
+	*IXP425_EXP_CS1 = 0xbd113c42;
+	return 0;
+}
+
 int board_init (void)
 {
 	gd->bd->bi_arch_number = MACH_TYPE_ACTUX4;
@@ -88,8 +94,6 @@ int board_init (void)
 	GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
 	GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
 
-	*IXP425_EXP_CS1 = 0xbd113c42;
-
 	udelay (10000);
 	GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
 	udelay (10000);
@@ -109,9 +113,7 @@ int checkboard (void)
 
 int dram_init (void)
 {
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
 	return (0);
 }
 
board/actux4/config.mk +2 -4
index 9cb838b..be871c1 100644
@@ -1,4 +1,2 @@
-CONFIG_SYS_TEXT_BASE = 0x00e00000
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
+PLATFORM_RELFLAGS += -ffunction-sections 
+PLATFORM_LDFLAGS += --gc-sections
include/configs/actux4.h +17 -5
index 04145c3..ac7d1ba 100644
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE			115200
 #define CONFIG_BOOTDELAY		3
 #define CONFIG_ZERO_BOOTDELAY_CHECK	/* check for keypress on bootdelay==0 */
+#define CONFIG_BOARD_EARLY_INIT_F	1
 
 /***************************************************************
  * U-boot generic defines start here.
@@ -45,7 +46,6 @@
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN			(CONFIG_ENV_SIZE + 128*1024)
-/* size in bytes reserved for initial data */
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
@@ -82,8 +82,9 @@
 #define CONFIG_SYS_MEMTEST_START		0x00400000
 #define CONFIG_SYS_MEMTEST_END			0x00800000
 
-/* spec says 66.666 MHz, but it appears to be 33 */
-#define CONFIG_SYS_HZ				3333333
+/* timer clock - 2* OSC_IN system clock */
+#define CONFIG_IXP425_TIMER_CLK                 66000000
+#define CONFIG_SYS_HZ				1000
 
 /* default load address */
 #define CONFIG_SYS_LOAD_ADDR			0x00010000
@@ -109,7 +110,7 @@
 /* SDRAM settings */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM_1			0x00000000
-#define CONFIG_SYS_DRAM_BASE			0x00000000
+#define CONFIG_SYS_SDRAM_BASE			0x00000000
 
 /* 32MB SDRAM */
 #define CONFIG_SYS_SDR_CONFIG			0x18
@@ -119,6 +120,7 @@
 #define CONFIG_SYS_DRAM_SIZE			0x02000000
 
 /* FLASH organization */
+#define CONFIG_SYS_TEXT_BASE		0x50000000
 #define CONFIG_SYS_MAX_FLASH_BANKS		2
 /* max # of sectors per chip */
 #define CONFIG_SYS_MAX_FLASH_SECT		70
@@ -153,6 +155,7 @@
 #define	CONFIG_PHY_ADDR			0x1C
 /* MII PHY management */
 #define CONFIG_MII			1
+
 /* Number of ethernet rx buffers & descriptors */
 #define CONFIG_SYS_RX_ETH_BUFFER		16
 
@@ -181,19 +184,24 @@
 	"mtd=IXP4XX-Flash.0:252k(uboot),4k(uboot_env);"			\
 	"IXP4XX-Flash.1:128k(ucode),1280k(linux),-(root)\0"		\
 	"kerneladdr=51020000\0"						\
+	"kernelfile=actux4/uImage\0"					\
+	"rootfile=actux4/rootfs\0"					\
 	"rootaddr=51160000\0"						\
 	"loadaddr=10000\0"						\
 	"updateboot_ser=mw.b 10000 ff 40000;"				\
 	" loady ${loadaddr};"						\
 	" run eraseboot writeboot\0"					\
 	"updateboot_net=mw.b 10000 ff 40000;"				\
-	" tftp ${loadaddr} u-boot.bin;"					\
+	" tftp ${loadaddr} actux4/u-boot.bin;"					\
 	" run eraseboot writeboot\0"					\
 	"eraseboot=protect off 50000000 5003efff;"			\
 	" erase 50000000 +${filesize}\0"				\
 	"writeboot=cp.b 10000 50000000 ${filesize}\0"			\
 	"eraseenv=protect off 5003f000 5003ffff;"			\
 	" erase 5003f000 5003ffff\0"					\
+	"updateucode=loady;"						\
+	" era ${npe_ucode} +${filesize};"				\
+	" cp.b ${loadaddr} ${npe_ucode} ${filesize}\0"			\
 	"updateroot=tftp ${loadaddr} ${rootfile};"			\
 	" era ${rootaddr} +${filesize};"				\
 	" cp.b ${loadaddr} ${rootaddr} ${filesize}\0"			\
@@ -212,4 +220,8 @@
 	" tftpboot ${loadaddr} ${kernelfile};"				\
 	" bootm\0"
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_INIT_SP_ADDR        \
+	(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif /* __CONFIG_H */
Signature · 1 line
1.7.2.3
#31 lore raw

PATCH 11/13 update/fix some more IXP42x boards (only compile tested)

In reply to Michael Schwingen
---
 board/ixdp425/config.mk        |    3 ++-
 board/prodrive/pdnb3/config.mk |    2 +-
 boards.cfg                     |    2 +-
 include/configs/ixdp425.h      |   13 ++++++++++---
 include/configs/ixdpg425.h     |    9 ++++++---
 include/configs/pdnb3.h        |    6 ++++++
 6 files changed, 26 insertions(+), 9 deletions(-)
board/ixdp425/config.mk +2 -1
index 509c894..5d6f708 100644
@@ -1,2 +1,3 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x00f80000
+CONFIG_SYS_TEXT_BASE = 0x50000000
+
board/prodrive/pdnb3/config.mk +1 -1
index 817541f..b5e6a4e 100644
@@ -1,2 +1,2 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x01f00000
+CONFIG_SYS_TEXT_BASE = 0x50000000
boards.cfg +1 -1
index 695baca..b0fc38a 100644
@@ -130,7 +130,7 @@ actux2                       arm         ixp
 actux3                       arm         ixp
 actux4                       arm         ixp
 ixdp425                      arm         ixp
-ixdpg425                     arm         ixp
+ixdpg425                     arm         ixp         ixdp425
 lpd7a400                     arm         lh7a40x     lpd7a40x
 lpd7a404                     arm         lh7a40x     lpd7a40x
 balloon3                     arm         pxa
include/configs/ixdp425.h +10 -3
index 28d41e2..81288b7 100644
@@ -105,8 +105,10 @@
 
 #define CONFIG_SYS_LOAD_ADDR           0x00010000      /* default load address */
 
-#define CONFIG_SYS_HZ                  3333333         /* spec says 66.666 MHz, but it appears to be 33 */
-						/* valid baudrates */
+/* timer clock - 2* OSC_IN system clock */
+#define CONFIG_IXP425_TIMER_CLK                 66666666
+#define CONFIG_SYS_HZ				1000
+
 #define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
 
 /*
@@ -193,7 +195,12 @@
 #define CONFIG_SYS_FLASH_EMPTY_INFO		/* print 'E' for empty sector on flinfo */
 
 #define CONFIG_ENV_SECT_SIZE	0x20000	/* size of one complete sector	*/
-#define CONFIG_ENV_ADDR		(PHYS_FLASH_1 + 0x20000)
+#define CONFIG_ENV_ADDR		(PHYS_FLASH_1 + 0x40000)
 #define	CONFIG_ENV_SIZE		0x2000	/* Total Size of Environment Sector	*/
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_SDRAM_BASE 0
+#define CONFIG_SYS_INIT_SP_ADDR						\
+	(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif  /* __CONFIG_H */
include/configs/ixdpg425.h +6 -3
index 637fd7d..60a2371 100644
@@ -53,9 +53,6 @@
 /*
  * Misc configuration options
  */
-#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
-#define CONFIG_USE_IRQ          1	/* we need IRQ stuff for timer	*/
-#define CONFIG_TIMER_IRQ
 
 #define CONFIG_BOOTCOUNT_LIMIT		/* support for bootcount limit	*/
 #define CONFIG_SYS_BOOTCOUNT_ADDR	0x60003000 /* inside qmrg sram		*/
@@ -115,6 +112,7 @@
 #define CONFIG_SYS_MEMTEST_END         0x00800000      /* 4 ... 8 MB in DRAM   */
 #define CONFIG_SYS_LOAD_ADDR           0x00010000      /* default load address */
 
+#define CONFIG_IXP425_TIMER_CLK		66666666
 #define CONFIG_SYS_HZ			1000		/* decrementer freq: 1 ms ticks */
 
 						/* valid baudrates */
@@ -248,4 +246,9 @@
  */
 #define CONFIG_SYS_CACHELINE_SIZE	32
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_SDRAM_BASE 0
+#define CONFIG_SYS_INIT_SP_ADDR						\
+	(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif  /* __CONFIG_H */
include/configs/pdnb3.h +6 -0
index 33fa6ee..9acb018 100644
@@ -117,6 +117,7 @@
 #define CONFIG_SYS_MEMTEST_END         0x00800000      /* 4 ... 8 MB in DRAM   */
 #define CONFIG_SYS_LOAD_ADDR           0x00010000      /* default load address */
 
+#define CONFIG_IXP425_TIMER_CLK		66666666
 #define CONFIG_SYS_HZ			1000		/* decrementer freq: 1 ms ticks */
 						/* valid baudrates */
 #define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
@@ -345,4 +346,9 @@
  */
 #define CONFIG_SYS_CACHELINE_SIZE	32
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_SDRAM_BASE		0x00000000
+#define CONFIG_SYS_INIT_SP_ADDR        \
+	(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif  /* __CONFIG_H */
Signature · 1 line
1.7.2.3
#32 lore raw

PATCH 11/13 update/fix some more IXP42x boards (only compile tested)

Dear Michael Schwingen,

Quoted 16 lines · In message <[email protected]> you wrote:
---
 board/ixdp425/config.mk        |    3 ++-
 board/prodrive/pdnb3/config.mk |    2 +-
 boards.cfg                     |    2 +-
 include/configs/ixdp425.h      |   13 ++++++++++---
 include/configs/ixdpg425.h     |    9 ++++++---
 include/configs/pdnb3.h        |    6 ++++++
 6 files changed, 26 insertions(+), 9 deletions(-)
board/ixdp425/config.mk +0 -0
index 509c894..5d6f708 100644

board/ixdp425/config.mk line 2

Quoted 3 lines
board/ixdp425/config.mk +1 -1
@@ -1,2 +1,3 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x00f80000
+CONFIG_SYS_TEXT_BASE = 0x50000000

Please move to board config file and remove board/ixdp425/config.mk

board/prodrive/pdnb3/config.mk line 2

Quoted 8 lines
board/prodrive/pdnb3/config.mk +1 -1
index 817541f..b5e6a4e 100644
@@ -1,2 +1,2 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x01f00000
+CONFIG_SYS_TEXT_BASE = 0x50000000

Ditto.

Best regards,

Wolfgang Denk

Signature · 6 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
I will also, for an appropriate fee, certify that  your  keyboard  is
object-oriented,  and  that  the bits on your hard disk are template-
compatible.            - Jeffrey S. Haemer in <[email protected]>
#33 lore raw

PATCH 11/13 update/fix some more IXP42x boards (only compile tested)

Am 01/25/2011 09:47 PM, schrieb Wolfgang Denk:

Quoted 23 lines

Dear Michael Schwingen,

Quoted 15 lines · In message <[email protected]> you wrote:
---
 board/ixdp425/config.mk        |    3 ++-
 board/prodrive/pdnb3/config.mk |    2 +-
 boards.cfg                     |    2 +-
 include/configs/ixdp425.h      |   13 ++++++++++---
 include/configs/ixdpg425.h     |    9 ++++++---
 include/configs/pdnb3.h        |    6 ++++++
 6 files changed, 26 insertions(+), 9 deletions(-)
board/ixdp425/config.mk +0 -0
index 509c894..5d6f708 100644

board/ixdp425/config.mk line 2

Quoted 3 lines
board/ixdp425/config.mk +1 -1
@@ -1,2 +1,3 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x00f80000
+CONFIG_SYS_TEXT_BASE = 0x50000000

Please move to board config file and remove board/ixdp425/config.mk

Quoted 10 lines

board/prodrive/pdnb3/config.mk line 2

Quoted 8 lines
board/prodrive/pdnb3/config.mk +1 -1
index 817541f..b5e6a4e 100644
@@ -1,2 +1,2 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x01f00000
+CONFIG_SYS_TEXT_BASE = 0x50000000

Ditto.

Since I am not the maintainer of these boards, I tried to keep the changes minimal.
I can go ahread if noone protests, but I can only test IXDP425 (we have one at work), and I can't guarantee compatibility with old u-boot versions.

cu
Michael

#34 lore raw

PATCH 11/13 update/fix some more IXP42x boards (only compile tested)

Dear Michael Schwingen,

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

Since I am not the maintainer of these boards, I tried to keep the changes minimal.
I can go ahread if noone protests, but I can only test IXDP425 (we have one at work), and I can't guarantee compatibility with old u-boot versions.

Please make sure to add the board maintainers on Cc:

Best regards,

Wolfgang Denk

Signature · 4 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
When all is said and done, more is said than done.
#35 lore raw

PATCH 12/13 IXP NPE: add support for fixed-speed MII ports

In reply to Michael Schwingen

add support for MII ports that lack a PHY with standard PHY registers

---
 arch/arm/cpu/ixp/npe/npe.c |   18 +++++++++++++++++-
 include/configs/actux2.h   |    5 +++++
 include/configs/actux3.h   |    5 +++++
 3 files changed, 27 insertions(+), 1 deletions(-)
arch/arm/cpu/ixp/npe/npe.c +17 -1
index 9d1090e..87f4600 100644
@@ -359,6 +359,21 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
 	debug("%s: 1\n", __FUNCTION__);
 
+#ifdef CONFIG_MII_NPE0_FIXEDLINK
+	if (0 == p_npe->eth_id) {
+		speed = CONFIG_MII_NPE0_SPEED;
+		duplex = CONFIG_MII_NPE0_FULLDUPLEX ? FULL : HALF;
+	}
+	else
+#endif
+#ifdef CONFIG_MII_NPE1_FIXEDLINK
+	if (1 == p_npe->eth_id) {
+		speed = CONFIG_MII_NPE1_SPEED;
+		duplex = CONFIG_MII_NPE1_FULLDUPLEX ? FULL : HALF;
+	}
+	else
+#endif
+	{
 	miiphy_read (dev->name, p_npe->phy_no, PHY_BMSR, &reg_short);
 
 	/*
@@ -388,7 +403,8 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
 	speed = miiphy_speed (dev->name, p_npe->phy_no);
 	duplex = miiphy_duplex (dev->name, p_npe->phy_no);
-
+	}
+	
 	if (p_npe->print_speed) {
 		p_npe->print_speed = 0;
 		printf ("ENET Speed is %d Mbps - %s duplex connection\n",
include/configs/actux2.h +5 -0
index 4ba3ce0..fc0af32 100644
@@ -152,6 +152,11 @@
 #define	CONFIG_PHY_ADDR			0x00
 /* MII PHY management */
 #define CONFIG_MII			1
+/* fixed-speed switch without standard PHY registers on MII */
+#define CONFIG_MII_NPE0_FIXEDLINK       1
+#define CONFIG_MII_NPE0_SPEED           100
+#define CONFIG_MII_NPE0_FULLDUPLEX      1
+
 /* Number of ethernet rx buffers & descriptors */
 #define CONFIG_SYS_RX_ETH_BUFFER		16
 #define CONFIG_RESET_PHY_R		1
include/configs/actux3.h +5 -0
index 4b9b496..01b5d12 100644
@@ -152,6 +152,11 @@
 #define	CONFIG_PHY_ADDR			0x10
 /* MII PHY management */
 #define CONFIG_MII			1
+/* fixed-speed switch without standard PHY registers on MII */
+#define CONFIG_MII_NPE0_FIXEDLINK       1
+#define CONFIG_MII_NPE0_SPEED           100
+#define CONFIG_MII_NPE0_FULLDUPLEX      1
+
 /* Number of ethernet rx buffers & descriptors */
 #define CONFIG_SYS_RX_ETH_BUFFER		16
 #define CONFIG_RESET_PHY_R		1
Signature · 1 line
1.7.2.3
#36 lore raw

PATCH 12/13 IXP NPE: add support for fixed-speed MII ports

Dear Michael Schwingen,

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

add support for MII ports that lack a PHY with standard PHY registers

---
 arch/arm/cpu/ixp/npe/npe.c |   18 +++++++++++++++++-
 include/configs/actux2.h   |    5 +++++
 include/configs/actux3.h   |    5 +++++
 3 files changed, 27 insertions(+), 1 deletions(-)
arch/arm/cpu/ixp/npe/npe.c +6 -0
index 9d1090e..87f4600 100644
@@ -359,6 +359,21 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
 	debug("%s: 1\n", __FUNCTION__);
 
+#ifdef CONFIG_MII_NPE0_FIXEDLINK
+	if (0 == p_npe->eth_id) {
+		speed = CONFIG_MII_NPE0_SPEED;
+		duplex = CONFIG_MII_NPE0_FULLDUPLEX ? FULL : HALF;
+	}
+	else

arch/arm/cpu/ixp/npe/npe.c static int npe_init(struct eth_device *dev, bd_t * bis) · line 377

Quoted 10 lines
arch/arm/cpu/ixp/npe/npe.c +9 -0
+#endif
+#ifdef CONFIG_MII_NPE1_FIXEDLINK
+	if (1 == p_npe->eth_id) {
+		speed = CONFIG_MII_NPE1_SPEED;
+		duplex = CONFIG_MII_NPE1_FULLDUPLEX ? FULL : HALF;
+	}
+	else
+#endif
+	{
 	miiphy_read (dev->name, p_npe->phy_no, PHY_BMSR, &reg_short);

Incorrect indentation staring here...

arch/arm/cpu/ixp/npe/npe.c static int npe_init(struct eth_device *dev, bd_t * bis) · line 406

Quoted 7 lines
arch/arm/cpu/ixp/npe/npe.c +1 -1
 	/*
@@ -388,7 +403,8 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
 	speed = miiphy_speed (dev->name, p_npe->phy_no);
 	duplex = miiphy_duplex (dev->name, p_npe->phy_no);
-
+	}

...and ending here.

Best regards,

Wolfgang Denk

Signature · 7 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
A student of  probability  soon  realizes  that  by  its  nature  the
billion-to-one  chance  crops  up nine times out of ten, and that the
greatest odds boil down to a double-sided statement: it will  happen,
or it will not.         - Terry Pratchett, _The Dark Side of the Sun_
#37 lore raw

PATCH 13/13 add dvlhost (dLAN 200 AV Wireless G) board

In reply to Michael Schwingen
---
 MAINTAINERS                |    1 +
 board/dvlhost/Makefile     |   50 +++++++++
 board/dvlhost/config.mk    |    3 +
 board/dvlhost/dvlhost.c    |  118 +++++++++++++++++++++
 board/dvlhost/dvlhost_hw.h |   47 +++++++++
 board/dvlhost/u-boot.lds   |   86 +++++++++++++++
 board/dvlhost/watchdog.c   |   40 +++++++
 boards.cfg                 |    1 +
 include/configs/dvlhost.h  |  248 ++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 594 insertions(+), 0 deletions(-)
 create mode 100644 board/dvlhost/Makefile
 create mode 100644 board/dvlhost/config.mk
 create mode 100644 board/dvlhost/dvlhost.c
 create mode 100644 board/dvlhost/dvlhost_hw.h
 create mode 100644 board/dvlhost/u-boot.lds
 create mode 100644 board/dvlhost/watchdog.c
 create mode 100644 include/configs/dvlhost.h
MAINTAINERS +1 -0
index 5fc3de1..7b1c707 100644
@@ -795,6 +795,7 @@ Michael Schwingen <[email protected]>
 	actux2		xscale/ixp
 	actux3		xscale/ixp
 	actux4		xscale/ixp
+	dvlhost		xscale/ixp
 
 Andrea Scian <[email protected]>
 
board/dvlhost/Makefile new file +50 -0

50 lines not on this page · raw message

board/dvlhost/config.mk new file +3 -0
new file mode 100644
index 0000000..a370337
@@ -0,0 +1,3 @@
+LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections
board/dvlhost/dvlhost.c new file +118 -0

118 lines not on this page · raw message

board/dvlhost/dvlhost_hw.h new file +47 -0

47 lines not on this page · raw message

board/dvlhost/u-boot.lds new file +86 -0

86 lines not on this page · raw message

board/dvlhost/watchdog.c new file +40 -0
new file mode 100644
index 0000000..10ec821
@@ -0,0 +1,40 @@
+/*
+ * (C) Copyright 2009
+ * Michael Schwingen, michael at schwingen.org
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <config.h>
+
+#include "dvlhost_hw.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_HW_WATCHDOG
+#include <watchdog.h>
+#include <asm/arch/ixp425.h>
+
+void hw_watchdog_reset(void)
+{
+	*IXP425_GPIO_GPOUTR ^= (1 << (CONFIG_SYS_GPIO_WDGTRIGGER));
+}
+
+#endif /* CONFIG_HW_WATCHDOG */
boards.cfg +1 -0
index b0fc38a..3612d61 100644
@@ -129,6 +129,7 @@ actux1_8_32                  arm         ixp         actux1              -
 actux2                       arm         ixp
 actux3                       arm         ixp
 actux4                       arm         ixp
+dvlhost                      arm         ixp
 ixdp425                      arm         ixp
 ixdpg425                     arm         ixp         ixdp425
 lpd7a400                     arm         lh7a40x     lpd7a40x
include/configs/dvlhost.h new file +248 -0

248 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#38 lore raw

PATCH 13/13 add dvlhost (dLAN 200 AV Wireless G) board

Dear Michael Schwingen,

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

...

board/dvlhost/config.mk line 3

Quoted 9 lines
board/dvlhost/config.mk new file +3 -0
new file mode 100644
index 0000000..a370337
@@ -0,0 +1,3 @@
+LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections

Please drop that file, it should not be needed.

...

Quoted 4 lines
board/dvlhost/config.mk new file +4 -0
+int board_init (void)
+{
+	gd->bd->bi_arch_number = MACH_TYPE_DVLHOST;
+

board/dvlhost/config.mk

Quoted 10 lines
board/dvlhost/config.mk new file +10 -0
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = 0x00000100;
+
+	/* Setup GPIOs used as output */
+	GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_WDGTRIGGER);
+	GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DLAN_PAIRING);
+	GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_PCIRST);
+
+	/* LED latch enable and watchdog enable are tied to the same GPIO,
+	   so we need to trigger the watchdog if we want to enable the LEDs. */

Incorrect multiline comment style, please fix globally.

board/dvlhost/config.mk

Quoted 4 lines
board/dvlhost/config.mk new file +4 -0
+int dram_init (void)
+{
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
+	return (0);

You should use get_ram_size() here.

board/dvlhost/u-boot.lds

Quoted 5 lines
board/dvlhost/u-boot.lds new file +0 -0
new file mode 100644
index 0000000..606a46f

Do you really need a board specific linker script? It looks pretty much generic to me.

board/dvlhost/u-boot.lds

Quoted 3 lines
board/dvlhost/u-boot.lds new file +3 -0
+void hw_watchdog_reset(void)
+{
+	*IXP425_GPIO_GPOUTR ^= (1 << (CONFIG_SYS_GPIO_WDGTRIGGER));

Please always use I/O accessors. Please fix globally.

...

board/dvlhost/u-boot.lds

Quoted 2 lines
board/dvlhost/u-boot.lds new file +2 -0
+
+#undef CONFIG_HW_WATCHDOG		/* HW Watchdog, board specific	*/

Please do not undef what is not defined anyway. Please fix globally.

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
By the way, ALL software projects are done by iterative  prototyping.
Some companies call their prototypes "releases", that's all.
#39 lore raw

PATCH 13/13 add dvlhost (dLAN 200 AV Wireless G) board

Am 01/25/2011 09:36 PM, schrieb Wolfgang Denk:

Quoted 5 lines

Dear Michael Schwingen,

Quoted 1 line · In message <[email protected]> you wrote:

...

Quoted 10 lines

board/dvlhost/config.mk line 3

Quoted 9 lines
board/dvlhost/config.mk new file +3 -0
new file mode 100644
index 0000000..a370337
@@ -0,0 +1,3 @@
+LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections

Please drop that file, it should not be needed.

Same as the other AcTux boards: where should I move these compiler/linker flags?

cu
Michael