Re: [U-Boot] U-Boot/IXP

2012-03-05 Thread Michael Schwingen
On Mon, Mar 05, 2012 at 02:14:56AM +0100, Marek Vasut wrote:
> Dear Michael Schwingen,
> 
> do you still intend to maintain IXP support in uboot or can all those IXP 
> boards 
> be removed? I'd be great if you helped bringing them back in-line!

I still use them and would want to keep these boards (and maintain them).

I only glimpse at the mailing list from time to time - are there any open
problems with these boards that need to be addressed?

cu
Michael
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-Boot/IXP

2012-03-05 Thread Michael Schwingen
Am 03/05/2012 12:54 PM, schrieb Marek Vasut:
> Dear Michael Schwingen,
>
>> On Mon, Mar 05, 2012 at 02:14:56AM +0100, Marek Vasut wrote:
>>> Dear Michael Schwingen,
>>>
>>> do you still intend to maintain IXP support in uboot or can all those IXP
>>> boards be removed? I'd be great if you helped bringing them back
>>> in-line!
>> I still use them and would want to keep these boards (and maintain them).
>>
>> I only glimpse at the mailing list from time to time - are there any open
>> problems with these boards that need to be addressed?
> No, I just cannot compile it with usual arm-linux-gnueabi- toolchain and that 
> puts a bleep on my bug-radar. Is that normal? Do I need a special toolchain?
>
I am using an old, locally built toolchain that identifies itself as
gcc version 4.3.4 (crosstool-NG-hg_default@1471_4a88cb9bfe8f)

I can take a look at this using a newer toolchain - however, I am in the
process of moving, so this will probably take some weeks.

What prebuilt toolchain should I try?

cu
Michael
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-Boot/IXP

2012-03-05 Thread Michael Schwingen
Am 03/05/2012 11:14 PM, schrieb Bryan Hundven:
> 1) Does usual arm-linux-gnueabi- toolchain work? (possibly if I use some 
> switch
> to toggle arm core endianness)
> No, the arm and armeb toolchains are different tuples.
>
>> 2) Do I need any special options to build the toolchain?
> You have to build an armeb toolchain with armeb as the platform in the
> tuple. I don't see one on mentorgraphic's site.
> I'm not sure if you can build a multilib arm/armeb toolchain.
>
I think I did this (quite some time ago, for a different project),
although IIRC, it required some tweaking of the multilib options when
building gcc.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] IXP: Make IXP compile with arm-linux-gnueabi- and fix it

2012-03-06 Thread Michael Schwingen

On 03/06/2012 01:18 AM, Marek Vasut wrote:

This series of patches makes ARM/IXP platform compile with usual
arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected with
gcc4.6.

Marek Vasut (6):
   Examples: Properly append LDFLAGS to LD command
   IXP: Make IXP buildable with arm-linux- toolchains
   IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
   IXP: Squash warnings in IXP NPE
   IXP: Move PDNB3 and SCPU from Makefile to boards.cfg
   IXP: Fix NAND build warning on PDNB3 and SCPU

  Makefile |   12 
  arch/arm/cpu/ixp/config.mk   |3 +++
  arch/arm/cpu/ixp/npe/IxEthAcc.c  |2 +-
  arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c |3 ---
  arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c  |3 ---
  board/actux1/actux1.c|2 --
  board/actux2/actux2.c|2 --
  board/actux3/actux3.c|2 --
  board/actux4/actux4.c|2 --
  board/dvlhost/dvlhost.c  |2 --
  board/prodrive/pdnb3/nand.c  |9 ++---
  board/prodrive/pdnb3/pdnb3.c |3 ---
  boards.cfg   |2 ++
  examples/standalone/Makefile |2 +-
  include/configs/actux1.h |2 ++
  include/configs/actux2.h |2 ++
  include/configs/actux3.h |2 ++
  include/configs/actux4.h |2 ++
  include/configs/dvlhost.h|2 ++
  include/configs/pdnb3.h  |2 ++
  20 files changed, 25 insertions(+), 36 deletions(-)

Cc: Bryan Hundven
Cc: Michael Schwingen

Can you guys please verify if after applying these patches, IXP builds with your
armeb toolchains?

Also, can you please try if binaries built with usual arm-linux-gnueabi-
toolchain (linaro, codesourcery whatever ...) now produce bootable result (this
is very important, I'd be happy if they did so we can get rid of that whole
armeb compiler stuff)?

Sure, but this might take me some weeks. Thanks for the effort!

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/6] IXP: Make IXP compile with arm-linux-gnueabi- and fix it

2012-03-06 Thread Michael Schwingen

On 03/06/2012 09:19 AM, Marek Vasut wrote:

Dear Michael Schwingen,

   

On 03/06/2012 01:18 AM, Marek Vasut wrote:
 

This series of patches makes ARM/IXP platform compile with usual
arm-linux-gnueabi- toolchain. Also, fix the IXP build errors detected
with gcc4.6.

Marek Vasut (6):
Examples: Properly append LDFLAGS to LD command
IXP: Make IXP buildable with arm-linux- toolchains
IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
IXP: Squash warnings in IXP NPE
IXP: Move PDNB3 and SCPU from Makefile to boards.cfg
IXP: Fix NAND build warning on PDNB3 and SCPU

   Makefile |   12 
   arch/arm/cpu/ixp/config.mk   |3 +++
   arch/arm/cpu/ixp/npe/IxEthAcc.c  |2 +-
   arch/arm/cpu/ixp/npe/IxEthDBAPISupport.c |3 ---
   arch/arm/cpu/ixp/npe/IxQMgrDispatcher.c  |3 ---
   board/actux1/actux1.c|2 --
   board/actux2/actux2.c|2 --
   board/actux3/actux3.c|2 --
   board/actux4/actux4.c|2 --
   board/dvlhost/dvlhost.c  |2 --
   board/prodrive/pdnb3/nand.c  |9 ++---
   board/prodrive/pdnb3/pdnb3.c |3 ---
   boards.cfg   |2 ++
   examples/standalone/Makefile |2 +-
   include/configs/actux1.h |2 ++
   include/configs/actux2.h |2 ++
   include/configs/actux3.h |2 ++
   include/configs/actux4.h |2 ++
   include/configs/dvlhost.h|2 ++
   include/configs/pdnb3.h  |2 ++
   20 files changed, 25 insertions(+), 36 deletions(-)

Cc: Bryan Hundven
Cc: Michael Schwingen
 

Can you guys please verify if after applying these patches, IXP builds
with your armeb toolchains?

Also, can you please try if binaries built with usual arm-linux-gnueabi-
toolchain (linaro, codesourcery whatever ...) now produce bootable result
(this is very important, I'd be happy if they did so we can get rid of
that whole armeb compiler stuff)?
   

Sure, but this might take me some weeks. Thanks for the effort!

cu
Michael
 

so I'll push these upstream and you'll let me know if something got broken
later, this fix is better than nothing, ok?
   

Fine with me. Is upstream master or pxa/ixp?

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] 2* Coldfire MCF5272 Evalboards - free for the shipping

2008-09-27 Thread Michael Schwingen
Hi,

I hope this is not too off-topic here.

I have two of these boards:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=M5272C3

to give away for the cost of shipping - preferrably inside the EU, because I do 
not want to deal with customs.

I salvaged them from being scrapped some years ago, and never got around to use 
them. I just tested that the dbug bootloader in flash works & is able to load 
and start a uCLinux image via net.

The boards have a BDM connector and come with a P&E parallel port BDM wiggler, 
but without any software, so you will probably need to supply your own BDM 
debugger for u-boot development.

Please reply by mail if you want one.

cu
Michael


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 03/17] trigger hardware watchdog in IXP42x serial driver

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:
 - coding style fixes
Changes for V4:
 - add changelog

 drivers/serial/serial_ixp.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c
index dd26af4..a9acd47 100644
--- a/drivers/serial/serial_ixp.c
+++ b/drivers/serial/serial_ixp.c
@@ -30,6 +30,7 @@
 
 #include 
 #include 
+#include 
 
 /*
  *   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;
 }
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 00/17] Overview

2011-04-06 Thread Michael Schwingen
Hi,

here is the fourth incarnation of the IXP patch series. This is rebased
against master (basically pulling in the __bss_end change), and it adds
separate changelogs per patch.

cu
Michael

Michael Schwingen (17):
  add XScale sub architecture (IXP/PXA) to maintainer list
  add support for IXP42x Rev. B1 and newer
  trigger hardware watchdog in IXP42x serial driver
  Fix IXP code to work after relocation was added
  fix "depend" target in npe directory
  support CONFIG_SYS_LDSCRIPT on ARM
  use -ffunction-sections / --gc-sections on IXP42x
  update/fix AcTux1 board
  update/fix AcTux2 board
  update/fix AcTux3 board
  update/fix AcTux4 board
  IXP NPE: add support for fixed-speed MII ports
  add dvlhost (dLAN 200 AV Wireless G) board
  update/fix IXDP425 / IXDPG425 boards
  update/fix PDNB3 board
  IXP42x PCI rewrite
  run arm_pci_init after relocation

 MAINTAINERS   |   45 ++-
 arch/arm/config.mk|6 +
 arch/arm/cpu/ixp/config.mk|5 +
 arch/arm/cpu/ixp/cpu.c|5 -
 arch/arm/cpu/ixp/npe/Makefile |1 +
 arch/arm/cpu/ixp/npe/npe.c|   74 +++--
 arch/arm/cpu/ixp/start.S  |   59 +---
 arch/arm/cpu/ixp/timer.c  |  124 +++---
 arch/arm/cpu/ixp/u-boot.lds   |8 +-
 arch/arm/include/asm/arch-ixp/ixp425.h|5 +-
 arch/arm/include/asm/arch-ixp/ixp425pci.h |  130 +--
 arch/arm/include/asm/global_data.h|3 +
 arch/arm/lib/board.c  |6 +-
 board/actux1/actux1.c |  111 +++---
 board/actux1/config.mk|6 -
 board/actux1/u-boot.lds   |   41 ++-
 board/actux2/actux2.c |   99 +++---
 board/actux2/config.mk|6 -
 board/actux2/u-boot.lds   |   46 ++-
 board/actux3/actux3.c |  126 +++---
 board/actux3/config.mk|6 -
 board/actux3/u-boot.lds   |   52 ++-
 board/actux4/actux4.c |  103 +++--
 board/actux4/config.mk|4 -
 board/dvlhost/Makefile|   50 +++
 board/dvlhost/dvlhost.c   |  130 ++
 board/dvlhost/dvlhost_hw.h|   47 +++
 board/dvlhost/u-boot.lds  |   87 
 board/dvlhost/watchdog.c  |   43 ++
 board/ixdp425/config.mk   |2 -
 board/ixdp425/flash.c |  427 
 board/ixdp425/ixdp425.c   |  155 +++-
 board/prodrive/pdnb3/config.mk|2 -
 boards.cfg|8 +-
 drivers/pci/pci.c |4 -
 drivers/pci/pci_indirect.c|   13 +-
 drivers/pci/pci_ixp.c |  612 ++---
 drivers/serial/serial_ixp.c   |7 +-
 include/configs/actux1.h  |   63 ++--
 include/configs/actux2.h  |   36 ++-
 include/configs/actux3.h  |   38 ++-
 include/configs/actux4.h  |   40 ++-
 include/configs/dvlhost.h |  248 
 include/configs/ixdp425.h |  196 +++---
 include/configs/ixdpg425.h|   11 +-
 include/configs/pdnb3.h   |   10 +-
 46 files changed, 1697 insertions(+), 1603 deletions(-)
 delete mode 100644 board/actux1/config.mk
 delete mode 100644 board/actux2/config.mk
 delete mode 100644 board/actux3/config.mk
 delete mode 100644 board/actux4/config.mk
 create mode 100644 board/dvlhost/Makefile
 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
 delete mode 100644 board/ixdp425/config.mk
 delete mode 100644 board/ixdp425/flash.c
 delete mode 100644 board/prodrive/pdnb3/config.mk
 create mode 100644 include/configs/dvlhost.h

-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 01/17] add XScale sub architecture (IXP/PXA) to maintainer list

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:
 - change patch description
 - drop wepep250 (should already be deleted)
Changes for V4:
 - add changelog

 MAINTAINERS |   44 ++--
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1d7e1f4..4b17b63 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -560,8 +560,8 @@ Stefano Babic 
ea20davinci
mx35pdk i.MX35
mx51evk i.MX51
-   polaris xscale
-   trizepsiv   xscale
+   polaris xscale/pxa
+   trizepsiv   xscale/pxa
vision2 i.MX51
 
 Jason Liu 
@@ -593,7 +593,7 @@ Andreas Bie
 
 Cliff Brake 
 
-   pxa255_idp  xscale
+   pxa255_idp  xscale/pxa
 
 Rick Bronson 
 
@@ -699,7 +699,7 @@ Sergey Kubushyn 
 
 Prakash Kumar 
 
-   cerf250 xscale
+   cerf250 xscale/pxa
 
 Vipin Kumar 
 
@@ -777,9 +777,9 @@ John Rigby 
 
 Stefan Roese 
 
-   ixdpg425xscale
-   pdnb3   xscale
-   scpuxscale
+   ixdpg425xscale/ixp
+   pdnb3   xscale/ixp
+   scpuxscale/ixp
 
 Alessandro Rubini 
 Nomadik Linux Team 
@@ -802,15 +802,15 @@ Heiko Schocher 
 
 Robert Schwebel 
 
-   csb226  xscale
-   innokom xscale
+   csb226  xscale/pxa
+   innokom xscale/pxa
 
 Michael Schwingen 
 
-   actux1  xscale
-   actux2  xscale
-   actux3  xscale
-   actux4  xscale
+   actux1  xscale/ixp
+   actux2  xscale/ixp
+   actux3  xscale/ixp
+   actux4  xscale/ixp
 
 Andrea Scian 
 
@@ -834,12 +834,12 @@ Greg Ungerer 
 
 Marek Vasut 
 
-   balloon3xscale
-   colibri_pxa270  xscale
-   palmld  xscale
-   palmtc  xscale
-   vpac270 xscale
-   zipitz2 xscale
+   balloon3xscale/pxa
+   colibri_pxa270  xscale/pxa
+   palmld  xscale/pxa
+   palmtc  xscale/pxa
+   vpac270 xscale/pxa
+   zipitz2 xscale/pxa
efikamx i.MX51
 
 Hugo Villeneuve 
@@ -890,9 +890,9 @@ Sughosh Ganu 
 Unknown / orphaned boards:
Board   CPU Last known maintainer / Comment
 .
-   cradle  xscale  Kyle Harris  / dead 
address
-   ixdp425 xscale  Kyle Harris  / dead 
address
-   lubbock xscale  Kyle Harris  / dead 
address
+   cradle  xscale/pxa  Kyle Harris  / 
dead address
+   ixdp425 xscale/ixp  Kyle Harris  / 
dead address
+   lubbock xscale/pxa  Kyle Harris  / 
dead address
 
imx31_phycore_eet i.MX31  Guennadi Liakhovetski  
/ resigned
mx31ads   i.MX31  Guennadi Liakhovetski  
/ resigned
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 05/17] fix "depend" target in npe directory

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:

Changes for V4:
 - add changelog

 arch/arm/cpu/ixp/npe/Makefile |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/Makefile b/arch/arm/cpu/ixp/npe/Makefile
index c756a1d..14ab3c7 100644
--- a/arch/arm/cpu/ixp/npe/Makefile
+++ b/arch/arm/cpu/ixp/npe/Makefile
@@ -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 \
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 07/17] use -ffunction-sections / --gc-sections on IXP42x

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - remove changes from config.mk and board config.h files
 - add wildcards to sections in arch/arm/cpu/ixp/u-boot.lds
Changes for V3:
 - set compiler/linker flags in arch/arm/cpu/ixp/config.mk instead of
   per-board config.mk files
Changes for V4:
 - add changelog

 arch/arm/cpu/ixp/config.mk  |5 +
 arch/arm/cpu/ixp/u-boot.lds |8 
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/ixp/config.mk b/arch/arm/cpu/ixp/config.mk
index deca3f4..5868cba 100644
--- a/arch/arm/cpu/ixp/config.mk
+++ b/arch/arm/cpu/ixp/config.mk
@@ -27,6 +27,11 @@ BIG_ENDIAN = y
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian
 
 PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100
+
+# -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker 
error
+PLATFORM_RELFLAGS += -ffunction-sections
+LDFLAGS_u-boot += --gc-sections
+
 # =
 #
 # Supply options according to compiler version
diff --git a/arch/arm/cpu/ixp/u-boot.lds b/arch/arm/cpu/ixp/u-boot.lds
index 3587f8a..7199de4 100644
--- a/arch/arm/cpu/ixp/u-boot.lds
+++ b/arch/arm/cpu/ixp/u-boot.lds
@@ -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);
@@ -67,7 +67,7 @@ SECTIONS
 
.bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
-   *(.bss)
+   *(.bss*)
 . = ALIGN(4);
__bss_end__ = .;
}
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 04/17] Fix IXP code to work after relocation was added

2011-04-06 Thread 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

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - fix patch description
Changes for V3:
 - use I/O accessors
 - move timestamp variable from BSS to global data
 - coding style fixes
Changes for V4:
 - add changelog

 arch/arm/cpu/ixp/cpu.c |5 --
 arch/arm/cpu/ixp/start.S   |   59 ++--
 arch/arm/cpu/ixp/timer.c   |  124 +++-
 arch/arm/include/asm/arch-ixp/ixp425.h |5 +-
 arch/arm/include/asm/global_data.h |3 +
 5 files changed, 68 insertions(+), 128 deletions(-)

diff --git a/arch/arm/cpu/ixp/cpu.c b/arch/arm/cpu/ixp/cpu.c
index ce275e5..942845d 100644
--- a/arch/arm/cpu/ixp/cpu.c
+++ b/arch/arm/cpu/ixp/cpu.c
@@ -36,8 +36,6 @@
 #include 
 #include 
 
-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 & 0x03f0) >> 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;
}
diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S
index 561c1f4..faa9a8f 100644
--- a/arch/arm/cpu/ixp/start.S
+++ b/arch/arm/cpu/ixp/start.S
@@ -65,7 +65,8 @@
.endm
 
 .globl _start
-_start: b  reset
+_start:
+   ldr pc, _reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
@@ -74,6 +75,7 @@ _start: b reset
ldr pc, _irq
ldr pc, _fiq
 
+_reset: .word reset
 _undefined_instruction: .word undefined_instruction
 _software_interrupt:   .word software_interrupt
 _prefetch_abort:   .word prefetch_abort
@@ -167,12 +169,6 @@ reset:
str r1, [r2]
 
/* make sure flash is visible at 0 */
-#if 0
-   ldr r2, =IXP425_EXP_CFG0
-   ldr r1, [r2]
-   orr r1, r1, #0x8000
-   str r1, [r2]
-#endif
mov r1, #CONFIG_SYS_SDR_CONFIG
ldr r2, =IXP425_SDR_CONFIG
str r1, [r2]
@@ -216,19 +212,6 @@ reset:
str r1, [r4]
DELAY_FOR 0x4000, r0
 
-   /* copy */
-   mov r0, #0
-   mov r4, r0
-   add r2, r0, #CONFIG_SYS_MONITOR_LEN
-   mov r1, #0x1000
-   mov r5, r1
-
-30:
-   ldr r3, [r0], #4
-   str r3, [r1], #4
-   cmp r0, r2
-   bne 30b
-
/* invalidate I & D caches & BTB */
mcr p15, 0, r0, c7, c7, 0
CPWAIT  r0
@@ -241,19 +224,12 @@ reset:
mcr p15, 0, r0, c7, c10, 4
CPWAIT  r0
 
-   /* move flash to 0x5000 */
+   /* remove flash mirror at 0x */
ldr r2, =IXP425_EXP_CFG0
ldr r1, [r2]
bic r1, r1, #0x8000
str r1, [r2]
 
-   nop
-   nop
-   nop
-   nop
-   nop
-   nop
-
/* invalidate I & Data TLB */
mcr p15, 0, r0, c8, c7, 0
CPWAIT r0
@@ -269,7 +245,7 @@ reset:
orr r0,r0,#0x13
msr cpsr,r0
 
-/* Set stackpointer in internal RAM to call board_init_f */
+/* Set initial stackpointer in SDRAM to call board_init_f */
 call_board_init_f:
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
@@ -580,28 +556,3 @@ reset_endless:
 
b   reset_endless
 
-#ifdef CONFIG_USE_IRQ
-
-.LC0:  .word   loops_per_jiffy
-
-/*
- * 0 <= r0 <= 2000
- */
-.globl __udelay
-__udelay:
-   mov r2, #0x6800
-   orr r2, r2, #0x00db
-   mul r0, r2, r0
-   ldr r2, .LC0
-   ldr r2, [r2]@ max = 0x0fff
-   mov r0, r0, lsr #11 @ max = 0x3fff
-   mov r2, r2, lsr #11 @ max = 0x0003
-   mul r0, r2, r0  @ max = 2^32-1
-   movsr0, r0, lsr #6
-
-delay_loop:
-   subsr0, r0, #1
-   bne delay_loop
-   mov pc, lr
-
-#endif /* CONFIG_USE_IRQ */
diff --git a/arch/arm/cpu/ixp/timer.c b/arch/arm/cpu/ixp/timer.c
index edf341f..7a44a08 100644
--- a/arch/arm/cpu/ixp/timer.c
+++ b/arch/arm/cpu/ixp/timer.c
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2010
+ * Michael Schwingen, mich...@schwingen.org
+ *
  * (C) Copyright 2006
  * Stefan Roese, DENX Software Engineering, s...@denx.de.
  *
@@ -31,105 +34,94 @@
 
 #include 
 #include 
+#include 
+#include 
 
-#ifdef CONFIG_TIMER_IRQ
-
-#define FREQ   
-#define CLOCK_TI

[U-Boot] [IXP42x PATCH series v4 11/17] update/fix AcTux4 board

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - use get_ram_size in dram_init
 - add PCI support
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
 - add CONFIG_MII_NPE0_FIXEDLINK definition
Changes for V4:
 - add changelog
 - merge __bss_end change in u-boot.lds from master

 board/actux4/actux4.c|  103 ++---
 board/actux4/config.mk   |4 --
 include/configs/actux4.h |   40 --
 3 files changed, 86 insertions(+), 61 deletions(-)
 delete mode 100644 board/actux4/config.mk

diff --git a/board/actux4/actux4.c b/board/actux4/actux4.c
index f373b58..d20d881 100644
--- a/board/actux4/actux4.c
+++ b/board/actux4/actux4.c
@@ -35,92 +35,107 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
+#ifdef CONFIG_PCI
+#include 
+#include 
+#endif
 
 #include "actux4_hw.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   writel(0xbd113c42, IXP425_EXP_CS1);
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX4;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_nPWRON);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_nPWRON);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_nPWRON);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_nPWRON);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
 
/* led not populated on board*/
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED3);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED3);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED3);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED3);
 
/* middle LED */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED2);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED2);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED2);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED2);
 
/* right LED */
/* weak pulldown = LED weak on */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_LED1);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED1);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_LED1);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED1);
 
/* Setup GPIO's for Interrupt inputs */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTA);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTB);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTC);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_RTCINT);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTA);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTB);
-
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTA);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTB);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTC);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_RTCINT);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTA);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTB);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTA);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTB);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTC);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_RTCINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTA);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTB);
+
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTA);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTB);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTC);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_RTCINT);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTA);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTB);
 
/* Setup GPIO's for 33MHz clock output */
-   *IXP425_GPIO_GPCLKR = 0x011001FF;
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-
-   *IXP425_EXP_CS1 = 0xbd113c42;
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
 
-   udelay (1);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
-   udelay (1);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   udelay (1);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
+   udelay(1);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
+   udelay(1);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   udelay(1);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
 
return 0;
 }
 
 /* Check Board Identity */
-int checkboard (void)
+int checkboard(void)
 {
-   puts ("Board: AcTux-4\n");
-   return (0);
+   puts("Board: AcTux-4\n");
+   return 0;
 }
 
-int dram_init (void)
+int dram_init(void

[U-Boot] [IXP42x PATCH series v4 17/17] run arm_pci_init after relocation

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3
Changes for V4:
 - add changelog

 arch/arm/lib/board.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index dc46e21..233dc56 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -262,9 +262,6 @@ init_fnc_t *init_sequence[] = {
init_func_i2c,
 #endif
dram_init,  /* configure available RAM banks */
-#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI)
-   arm_pci_init,
-#endif
NULL,
 };
 
@@ -529,6 +526,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
/* initialize environment */
env_relocate ();
 
+#if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI)
+   arm_pci_init();
+#endif
 #ifdef CONFIG_VFD
/* must do this after the framebuffer is allocated */
drv_vfd_init();
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 06/17] support CONFIG_SYS_LDSCRIPT on ARM

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3, replaces config.mk files in earlier patches
Changes for V4:
 - add changelog

 arch/arm/config.mk |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index a6a4742..a7c4d27 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -63,7 +63,13 @@ ifeq (,$(findstring 
arch/arm/lib/eabi_compat.o,$(PLATFORM_LIBS)))
 PLATFORM_LIBS += $(OBJTREE)/arch/arm/lib/eabi_compat.o
 endif
 endif
+
+ifdef CONFIG_SYS_LDSCRIPT
+# need to strip off double quotes
+LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
+else
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
+endif
 
 # needed for relocation
 ifndef CONFIG_NAND_SPL
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 09/17] update/fix AcTux2 board

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - use get_ram_size in dram_init
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
 - add CONFIG_MII_NPE0_FIXEDLINK definition
Changes for V4:
 - add changelog
 - merge __bss_end change in u-boot.lds from master

 board/actux2/actux2.c|   99 +++--
 board/actux2/config.mk   |6 ---
 board/actux2/u-boot.lds  |   46 +
 include/configs/actux2.h |   36 +++--
 4 files changed, 103 insertions(+), 84 deletions(-)
 delete mode 100644 board/actux2/config.mk

diff --git a/board/actux2/actux2.c b/board/actux2/actux2.c
index d6aaad6..400388c 100644
--- a/board/actux2/actux2.c
+++ b/board/actux2/actux2.c
@@ -43,50 +43,55 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   /* CS1: IPAC-X */
+   writel(0x94d10013, IXP425_EXP_CS1);
+   /* CS5: Debug port */
+   writel(0x9d520003, IXP425_EXP_CS5);
+   /* CS6: HW release register */
+   writel(0x81860001, IXP425_EXP_CS6);
+   /* CS7: LEDs */
+   writel(0x8093, IXP425_EXP_CS7);
+
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX2;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DCD);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_ETHRST);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DCD);
 
-   /* Setup GPIO's for Interrupt inputs */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT);
+   /* Setup GPIOs for Interrupt inputs */
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_DBGINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_ETHINT);
 
-   /* Setup GPIO's for 33MHz clock output */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
-   *IXP425_GPIO_GPCLKR = 0x011001FF;
+   /* Setup GPIOs for 33MHz clock output */
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
 
-   /* 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 = 0x8093;
+   udelay(533);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_ETHRST);
 
-   udelay (533);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
-
-   ACTUX2_LED1 (1);
-   ACTUX2_LED2 (0);
-   ACTUX2_LED3 (0);
-   ACTUX2_LED4 (0);
+   ACTUX2_LED1(1);
+   ACTUX2_LED2(0);
+   ACTUX2_LED3(0);
+   ACTUX2_LED4(0);
 
return 0;
 }
@@ -94,28 +99,26 @@ int board_init (void)
 /*
  * Check Board Identity
  */
-int checkboard (void)
+int checkboard(void)
 {
-   char *s = getenv ("serial#");
+   char *s = getenv("serial#");
 
-   puts ("Board: AcTux-2 rev.");
-   putc (ACTUX2_BOARDREL + 'A' - 1);
+   puts("Board: AcTux-2 rev.");
+   putc(ACTUX2_BOARDREL + 'A' - 1);
 
if (s != NULL) {
-   puts (", serial# ");
-   puts (s);
+   puts(", serial# ");
+   puts(s);
}
-   putc ('\n');
+   putc('\n');
 
-   return (0);
+   return 0;
 }
 
-int dram_init (void)
+int dram_init(void)
 {
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-   return (0);
+   gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
+   return 0;
 }
 
 /*
@@ -124,13 +127,13 @@ int dram_init (void)
  * 1 = Rev. A
  * 2 = Rev. B
  **

[U-Boot] [IXP42x PATCH series v4 12/17] IXP NPE: add support for fixed-speed MII ports

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
Changes for V3:
 - coding style / indentation cleanup
 - move config.h changes to AcTux2/AcTux3 board patches
Changes for V4:
 - add changelog

 arch/arm/cpu/ixp/npe/npe.c |   67 +++
 1 files changed, 42 insertions(+), 25 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 6d92c53..f0e02bf 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -359,36 +359,53 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
debug("%s: 1\n", __FUNCTION__);
 
-   miiphy_read (dev->name, p_npe->phy_no, MII_BMSR, ®_short);
-
-   /*
-* Wait if PHY is capable of autonegotiation and autonegotiation is not 
complete
-*/
-   if ((reg_short & BMSR_ANEGCAPABLE) && !(reg_short & BMSR_ANEGCOMPLETE)) 
{
-   puts ("Waiting for PHY auto negotiation to complete");
-   i = 0;
-   while (!(reg_short & BMSR_ANEGCOMPLETE)) {
-   /*
-* Timeout reached ?
-*/
-   if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
-   puts (" TIMEOUT !\n");
-   break;
-   }
+#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, MII_BMSR, ®_short);
+
+   /*
+* Wait if PHY is capable of autonegotiation and
+* autonegotiation is not complete
+*/
+   if ((reg_short & BMSR_ANEGCAPABLE) &&
+   !(reg_short & BMSR_ANEGCOMPLETE)) {
+   puts("Waiting for PHY auto negotiation to complete");
+   i = 0;
+   while (!(reg_short & BMSR_ANEGCOMPLETE)) {
+   /*
+* Timeout reached ?
+*/
+   if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
+   puts(" TIMEOUT !\n");
+   break;
+   }
 
-   if ((i++ % 1000) == 0) {
-   putc ('.');
-   miiphy_read (dev->name, p_npe->phy_no, 
MII_BMSR, ®_short);
+   if ((i++ % 1000) == 0) {
+   putc('.');
+   miiphy_read(dev->name, p_npe->phy_no,
+MII_BMSR, ®_short);
+   }
+   udelay(1000);   /* 1 ms */
}
-   udelay (1000);  /* 1 ms */
+   puts(" done\n");
+   /* another 500 ms (results in faster booting) */
+   udelay(50);
}
-   puts (" done\n");
-   udelay (50);/* another 500 ms (results in faster 
booting) */
+   speed = miiphy_speed(dev->name, p_npe->phy_no);
+   duplex = miiphy_duplex(dev->name, p_npe->phy_no);
}
 
-   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",
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 02/17] add support for IXP42x Rev. B1 and newer

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:
 - reformat to wrap long lines
Changes for V4:
 - add changelog

 arch/arm/cpu/ixp/npe/npe.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 857bcad..6d92c53 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -621,9 +621,12 @@ 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
-* Eth Coprocessor is available.
+* If it is B0 or newer Silicon, we
+* only enable port when its
+* corresponding Eth Coprocessor is
+* available.
 */
if 
(ixFeatureCtrlComponentCheck(IX_FEATURECTRL_ETH0) ==
IX_FEATURE_CTRL_COMPONENT_ENABLED)
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 14/17] update/fix IXDP425 / IXDPG425 boards

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3 (split from "update_fix some more IXP42x boards" in V2)
Changes for V4:
 - add changelog

 board/ixdp425/config.mk|2 -
 board/ixdp425/flash.c  |  427 
 board/ixdp425/ixdp425.c|  155 ++---
 boards.cfg |2 +-
 include/configs/ixdp425.h  |  196 ++---
 include/configs/ixdpg425.h |   11 +-
 6 files changed, 276 insertions(+), 517 deletions(-)
 delete mode 100644 board/ixdp425/config.mk
 delete mode 100644 board/ixdp425/flash.c

diff --git a/board/ixdp425/config.mk b/board/ixdp425/config.mk
deleted file mode 100644
index 509c894..000
--- a/board/ixdp425/config.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-#
-CONFIG_SYS_TEXT_BASE = 0x00f8
diff --git a/board/ixdp425/flash.c b/board/ixdp425/flash.c
deleted file mode 100644
index f1d9190..000
--- a/board/ixdp425/flash.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * (C) Copyright 2001
- * Kyle Harris, Nexus Technologies, Inc. khar...@nexus-tech.net
- *
- * (C) Copyright 2001
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * 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 
-#include 
-
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips 
   */
-
-/* Board support for 1 or 2 flash devices */
-#undef FLASH_PORT_WIDTH32
-#define FLASH_PORT_WIDTH16
-
-#ifdef FLASH_PORT_WIDTH16
-#define FLASH_PORT_WIDTH   ushort
-#define FLASH_PORT_WIDTHV  vu_short
-#define SWAP(x)x
-#else
-#define FLASH_PORT_WIDTH   ulong
-#define FLASH_PORT_WIDTHV  vu_long
-#define SWAP(x)__swab32(x)
-#endif
-
-#define FPWFLASH_PORT_WIDTH
-#define FPWV   FLASH_PORT_WIDTHV
-
-#define mb()   __asm__ __volatile__ ("" : : : "memory")
-
-/*---
- * Functions
- */
-static ulong flash_get_size (FPW * addr, flash_info_t * info);
-static int write_data (flash_info_t * info, ulong dest, FPW data);
-static void flash_get_offsets (ulong base, flash_info_t * info);
-void inline spin_wheel (void);
-
-/*---
- */
-
-unsigned long flash_init (void)
-{
-   int i;
-   ulong size = 0;
-
-   for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
-   switch (i) {
-   case 0:
-   flash_get_size ((FPW *) PHYS_FLASH_1, &flash_info[i]);
-   flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
-   break;
-   default:
-   panic ("configured too many flash banks!\n");
-   break;
-   }
-   size += flash_info[i].size;
-   }
-
-   /* Protect monitor and environment sectors
-*/
-   flash_protect (FLAG_PROTECT_SET,
-  CONFIG_SYS_FLASH_BASE,
-  CONFIG_SYS_FLASH_BASE + _bss_start - _armboot_start,
-  &flash_info[0]);
-
-   flash_protect (FLAG_PROTECT_SET,
-  CONFIG_ENV_ADDR,
-  CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
-
-   return size;
-}
-
-/*---
- */
-static void flash_get_offsets (ulong base, flash_info_t * info)
-{
-   int i;
-
-   if (info->flash_id == FLASH_UNKNOWN) {
-   return;
-   }
-
-   if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
-   for (i = 0; i < info->sector_count; i++) {
-   info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
-   info->protect[i] = 0;
-   }
-   }
-}
-
-/*---
- */
-void flash_print_info (flash_info_t * info)
-{
-   int i;
-
-   if (info->flash_id == FLASH_UNKNOWN) {
-   printf ("missing or unknown FLASH type\n");
-   return;
-   }
-
-   switch (i

[U-Boot] [IXP42x PATCH series v4 15/17] update/fix PDNB3 board

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3 (split from "update_fix some more IXP42x boards" in V2)
Changes for V4:
 - add changelog

 board/prodrive/pdnb3/config.mk |2 --
 include/configs/pdnb3.h|   10 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)
 delete mode 100644 board/prodrive/pdnb3/config.mk

diff --git a/board/prodrive/pdnb3/config.mk b/board/prodrive/pdnb3/config.mk
deleted file mode 100644
index 817541f..000
--- a/board/prodrive/pdnb3/config.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-#
-CONFIG_SYS_TEXT_BASE = 0x01f0
diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h
index 33fa6ee..7fe9e5b 100644
--- a/include/configs/pdnb3.h
+++ b/include/configs/pdnb3.h
@@ -50,9 +50,6 @@
 /*
  * Misc configuration options
  */
-#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  
*/
 
@@ -117,6 +114,7 @@
 #define CONFIG_SYS_MEMTEST_END 0x0080  /* 4 ... 8 MB in DRAM   
*/
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
+#define CONFIG_IXP425_TIMER_CLK
 #define CONFIG_SYS_HZ  1000/* decrementer freq: 1 
ms ticks */
/* valid baudrates */
 #define CONFIG_SYS_BAUDRATE_TABLE  { 9600, 19200, 38400, 57600, 115200 }
@@ -188,6 +186,7 @@
 #define PHYS_SDRAM_10x /* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE   0x0200 /* 32 MB */
 
+#define CONFIG_SYS_TEXT_BASE  0x5000
 #define CONFIG_SYS_FLASH_BASE  0x5000
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE
 #if defined(CONFIG_SCPU)
@@ -345,4 +344,9 @@
  */
 #define CONFIG_SYS_CACHELINE_SIZE  32
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_SDRAM_BASE  0x
+#define CONFIG_SYS_INIT_SP_ADDR\
+   (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif  /* __CONFIG_H */
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v4 08/17] update/fix AcTux1 board

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - add PCI clock/reset initialization
 - use get_ram_size in dram_init
 - add PCI support
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
Changes for V4:
 - add changelog
 - merge __bss_end change in u-boot.lds from master

 board/actux1/actux1.c|  111 --
 board/actux1/config.mk   |6 ---
 board/actux1/u-boot.lds  |   41 -
 boards.cfg   |5 ++-
 include/configs/actux1.h |   63 +++---
 5 files changed, 127 insertions(+), 99 deletions(-)
 delete mode 100644 board/actux1/config.mk

diff --git a/board/actux1/actux1.c b/board/actux1/actux1.c
index e73aff8..8fb8065 100644
--- a/board/actux1/actux1.c
+++ b/board/actux1/actux1.c
@@ -37,49 +37,57 @@
 #include 
 #include 
 #include 
+#ifdef CONFIG_PCI
+#include 
+#include 
+#endif
 
 #include "actux1_hw.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   /* CS5: Debug port */
+   writel(0x9d520003, IXP425_EXP_CS5);
+   /* CS6: HwRel */
+   writel(0x81860001, IXP425_EXP_CS6);
+   /* CS7: LEDs */
+   writel(0x8093, IXP425_EXP_CS7);
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX1;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
 
-   /* Setup GPIO's for PCI INTA */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI1_INTA);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI1_INTA);
+   /* Setup GPIOs for PCI INTA */
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI1_INTA);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI1_INTA);
 
-   /* Setup GPIO's for 33MHz clock output */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
-   *IXP425_GPIO_GPCLKR = 0x011001FF;
+   /* Setup GPIOs for 33MHz clock output */
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
 
-   /* CS5: Debug port */
-   *IXP425_EXP_CS5 = 0x9d520003;
-   /* CS6: HwRel */
-   *IXP425_EXP_CS6 = 0x81860001;
-   /* CS7: LEDs */
-   *IXP425_EXP_CS7 = 0x8093;
-
-   udelay (533);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
+   udelay(533);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
 
-   ACTUX1_LED1 (2);
-   ACTUX1_LED2 (2);
-   ACTUX1_LED3 (0);
-   ACTUX1_LED4 (0);
-   ACTUX1_LED5 (0);
-   ACTUX1_LED6 (0);
-   ACTUX1_LED7 (0);
+   ACTUX1_LED1(2);
+   ACTUX1_LED2(2);
+   ACTUX1_LED3(0);
+   ACTUX1_LED4(0);
+   ACTUX1_LED5(0);
+   ACTUX1_LED6(0);
+   ACTUX1_LED7(0);
 
-   ACTUX1_HS (ACTUX1_HS_DCD);
+   ACTUX1_HS(ACTUX1_HS_DCD);
 
return 0;
 }
@@ -87,20 +95,20 @@ int board_init (void)
 /*
  * Check Board Identity
  */
-int checkboard (void)
+int checkboard(void)
 {
-   char *s = getenv ("serial#");
+   char *s = getenv("serial#");
 
-   puts ("Board: AcTux-1 rev.");
-   putc (ACTUX1_BOARDREL + 'A' - 1);
+   puts("Board: AcTux-1 rev.");
+   putc(ACTUX1_BOARDREL + 'A' - 1);
 
if (s != NULL) {
-   puts (", serial# ");
-   puts (s);
+   puts(", serial# ");
+   puts(s);
}
-   putc ('\n');
+   putc('\n');
 
-   return (0);
+   return 0;
 }
 
 /*
@@ -109,39 +117,36 @@ int checkboard (void)
  * 1 = Rev. A
  * 2 = Rev. B
  */
-u32 get_board_rev (void)
+u32 get_board_rev(void)
 {
return ACTUX1_BOARDREL;
 }
 
-int dram_init (void)
+int dram_init(void)
 {
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-   return (0);
+   gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
+   return 0;
 }
 
-#if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI)
-extern struct pci_controller hose;
-extern void pci_ixp_init (struct pci_controller *hose);
 
-void pci_init_board (void)
+#ifdef CONFIG_PCI
+struct pci_controller hose;
+
+void pci_init_board(void)
 {
-   extern void pci_ixp_init (struct pci_controller *hose);
-   pci_ixp_init

[U-Boot] [IXP42x PATCH series v4 13/17] add dvlhost (dLAN 200 AV Wireless G) board

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
 - add ethprime/ethrotate to default environment
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - add PCI clock/reset initialization
 - use get_ram_size in dram_init
 - add PCI support
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
Changes for V4:
 - add changelog
 - add __bss_end to u-boot.lds

 MAINTAINERS|1 +
 board/dvlhost/Makefile |   50 +
 board/dvlhost/dvlhost.c|  130 +++
 board/dvlhost/dvlhost_hw.h |   47 +
 board/dvlhost/u-boot.lds   |   87 +++
 board/dvlhost/watchdog.c   |   43 
 boards.cfg |1 +
 include/configs/dvlhost.h  |  248 
 8 files changed, 607 insertions(+), 0 deletions(-)
 create mode 100644 board/dvlhost/Makefile
 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

diff --git a/MAINTAINERS b/MAINTAINERS
index 4b17b63..97f8a38 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -811,6 +811,7 @@ Michael Schwingen 
actux2  xscale/ixp
actux3  xscale/ixp
actux4  xscale/ixp
+   dvlhost xscale/ixp
 
 Andrea Scian 
 
diff --git a/board/dvlhost/Makefile b/board/dvlhost/Makefile
new file mode 100644
index 000..af9a644
--- /dev/null
+++ b/board/dvlhost/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := dvlhost.o watchdog.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/dvlhost/dvlhost.c b/board/dvlhost/dvlhost.c
new file mode 100644
index 000..561e47f
--- /dev/null
+++ b/board/dvlhost/dvlhost.c
@@ -0,0 +1,130 @@
+/*
+ * (C) Copyright 2009
+ * Michael Schwingen, mich...@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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#ifdef CONFIG_PCI
+#include 
+#include 
+#endif
+
+#include "dvlhost_hw.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+   /* CS1: LED Latch */
+   writel(0xBFFF0002, IXP425_EXP_CS1);
+   return 0;
+}
+
+int board_init(void)
+{
+   gd->bd->bi_arch_number = MACH_TYPE_DVLHOST;
+
+   /* adress of boot parameters */
+   gd->bd->bi_boot_params = 0x0100;
+
+   /* Setup GPIOs used as output */
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_WDGTRIGGER);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DLAN_PAIRING);
+   GPIO_OUTPUT_CLEAR(

[U-Boot] [IXP42x PATCH series v4 10/17] update/fix AcTux3 board

2011-04-06 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - use get_ram_size in dram_init
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
 - add CONFIG_MII_NPE0_FIXEDLINK definition
Changes for V4:
 - add changelog
 - merge __bss_end change in u-boot.lds from master

 board/actux3/actux3.c|  126 +++--
 board/actux3/config.mk   |6 --
 board/actux3/u-boot.lds  |   52 ---
 include/configs/actux3.h |   38 +-
 4 files changed, 120 insertions(+), 102 deletions(-)
 delete mode 100644 board/actux3/config.mk

diff --git a/board/actux3/actux3.c b/board/actux3/actux3.c
index 63bf365..bfcf508 100644
--- a/board/actux3/actux3.c
+++ b/board/actux3/actux3.c
@@ -36,72 +36,76 @@
 #include 
 #include 
 #include 
-
 #include 
-
 #include "actux3_hw.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   /* CS1: IPAC-X */
+   writel(0x94d10013, IXP425_EXP_CS1);
+   /* CS5: Debug port */
+   writel(0x9d520003, IXP425_EXP_CS5);
+   /* CS6: Release/Option register */
+   writel(0x81860001, IXP425_EXP_CS6);
+   /* CS7: LEDs */
+   writel(0x8093, IXP425_EXP_CS7);
+
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX3;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED5_GN);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_RT);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_GN);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED5_GN);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED6_RT);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED6_GN);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_ETHRST);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DCD);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED5_GN);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_RT);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_GN);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED5_GN);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED6_RT);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED6_GN);
 
/*
 * Setup GPIO's for Interrupt inputs
 */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_DBGINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_ETHINT);
 
/*
 * Setup GPIO's for 33MHz clock output
 */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-   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 = 0x8093;
-
-   udelay (533);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
-
-   ACTUX3_LED1_RT (1);
-   ACTUX3_LED1_GN (0);
-   ACTUX3_LED2_RT (0);
-   ACTUX3_LED2_GN (0);
-   ACTUX3_LED3_RT (0);
-   ACTUX3_LED3_GN (0);
-   ACTUX3_LED4_GN (0);
-   ACTUX3_LED5_RT (0);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
+
+   /* 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);
+
+   ACTUX3_LED1_RT(1);
+   ACTUX3_LED1_GN(0);
+   ACTUX3_LED2_RT(0);
+   ACTUX3_LED2_GN(0);
+   ACTUX3_LED3_RT(0);
+   ACTUX3_LED3_GN(0);
+   ACTUX3_LED4_GN(0);
+   ACTUX3_LED5_RT(0);
 
return 0;
 }
@@ -109,20 +113,20 @@ int board_init (void)
 /*
  * Check Board Identity
  */
-int checkboard (void)
+int checkboard(void)
 {
-   char *s = getenv ("serial#");
+   c

[U-Boot] [IXP42x PATCH series v4 16/17] IXP42x PCI rewrite

2011-04-06 Thread Michael Schwingen
clean up IXP PCI handling: get rid of IXP-private bus scan, BAR assign etc.
code and use u-boot's PCI infrastructure instead.  Move board-specific PCI
setup code (clock/reset) to board directory.

Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3
Changes for V4:
 - add changelog

 arch/arm/include/asm/arch-ixp/ixp425pci.h |  130 +--
 drivers/pci/pci.c |4 -
 drivers/pci/pci_indirect.c|   13 +-
 drivers/pci/pci_ixp.c |  612 ++---
 4 files changed, 210 insertions(+), 549 deletions(-)

diff --git a/arch/arm/include/asm/arch-ixp/ixp425pci.h 
b/arch/arm/include/asm/arch-ixp/ixp425pci.h
index 9ea3319..acafea7 100644
--- a/arch/arm/include/asm/arch-ixp/ixp425pci.h
+++ b/arch/arm/include/asm/arch-ixp/ixp425pci.h
@@ -22,88 +22,21 @@
  * MA 02111-1307 USA
  */
 
-#ifndef _IXP425PCI_H_
-#define _IXP425PCI_H_
+#ifndef _IXP425PCI_H
+#define _IXP425PCI_H
 
-#define TRUE   1
-#define FALSE  0
 #define OK 0
 #define ERROR  -1
-#define BOOL   int
 
-#define IXP425_PCI_MAX_BAR_PER_FUNC  6
-#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC * \
-   IXP425_PCI_MAX_FUNC_ON_BUS)
-
-enum PciBarId
-{
-   CSR_BAR=0,
-   IO_BAR,
-   SD_BAR,
-   NO_BAR
-};
-
-/*Base address register descriptor*/
-typedef struct
-{
-   unsigned int size;
-   unsigned int address;
-} PciBar;
-
-typedef struct
-{
-   unsigned int bus;
-   unsigned int device;
-   unsigned int func;
-   unsigned int irq;
-   BOOL error;
-   unsigned short vendor_id;
-   unsigned short device_id;
-   /*We need an extra entry in this array for dummy placeholder*/
-   PciBar bar[IXP425_PCI_MAX_BAR_PER_FUNC + 1];
-} PciDevice;
+struct pci_controller;
+extern void pci_ixp_init(struct pci_controller *hose);
 
 /* Mask definitions*/
-#define IXP425_PCI_TOP_WORD_OF_LONG_MASK   0x
-#define IXP425_PCI_TOP_BYTE_OF_LONG_MASK   0xff00
-#define IXP425_PCI_BOTTOM_WORD_OF_LONG_MASK0x
-#define IXP425_PCI_BOTTOM_TRIBYTES_OF_LONG_MASK 0x00ff
 #define IXP425_PCI_BOTTOM_NIBBLE_OF_LONG_MASK  0x000f
-#define IXP425_PCI_MAX_UINT32  0x
-
-
-#define IXP425_PCI_BAR_QUERY   0x
-
-#define IXP425_PCI_BAR_MEM_BASE 0x10
-#define IXP425_PCI_BAR_IO_BASE 0x00
-
-/*define the maximum number of bus segments - we support a single segment*/
-#define IXP425_PCI_MAX_BUS  1
-/*define the maximum number of cards per bus segment*/
-#define IXP425_PCI_MAX_DEV  4
-/*define the maximum number of functions per device*/
-#define IXP425_PCI_MAX_FUNC 8
-/* define the maximum number of separate functions that we can
-   potentially have on the bus*/
-#define IXP425_PCI_MAX_FUNC_ON_BUS (1+ IXP425_PCI_MAX_FUNC *   \
-   IXP425_PCI_MAX_DEV *\
-   IXP425_PCI_MAX_BUS)
-/*define the maximum number of BARs per function*/
-#define IXP425_PCI_MAX_BAR_PER_FUNC  6
-#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC *  \
-   IXP425_PCI_MAX_FUNC_ON_BUS)
 
 #define PCI_NP_CBE_BESL (4)
 #define PCI_NP_AD_FUNCSL (8)
 
-#define REG_WRITE(b,o,v) (*(volatile unsigned int*)((b+o))=(v))
-#define REG_READ(b,o,v) ((v)=(*(volatile unsigned int*)((b+o
-
-#define PCI_DELAY  500
-#define USEC_LOOP_COUNT 533
-#define PCI_SETTLE_USEC 200
-#define PCI_MIN_RESET_ASSERT_USEC 2000
-
 /*Register addressing definitions for PCI controller configuration
   and status registers*/
 
@@ -150,28 +83,6 @@ typedef struct
 #define NP_CMD_CONFIGWRITE (0xb)
 */
 
-/*define the default setting of the AHB memory base reg*/
-#define IXP425_PCI_AHBMEMBASE_DEFAULT 0x00010203
-#define IXP425_PCI_AHBIOBASE_DEFAULT  0x0
-#define IXP425_PCI_PCIMEMBASE_DEFAULT 0x0
-
-/*define the default settings for the controller's BARs*/
-#ifdef IXP425_PCI_SIMPLE_MAPPING
-#define IXP425_PCI_BAR_0_DEFAULT 0x
-#define IXP425_PCI_BAR_1_DEFAULT 0x0100
-#define IXP425_PCI_BAR_2_DEFAULT 0x0200
-#define IXP425_PCI_BAR_3_DEFAULT 0x0300
-#define IXP425_PCI_BAR_4_DEFAULT 0x
-#define IXP425_PCI_BAR_5_DEFAULT 0x
-#else
-#define IXP425_PCI_BAR_0_DEFAULT 0x4000
-#define IXP425_PCI_BAR_1_DEFAULT 0x4100
-#define IXP425_PCI_BAR_2_DEFAULT 0x4200
-#define IXP425_PCI_BAR_3_DEFAULT 0x4300
-#define IXP425_PCI_BAR_4_DEFAULT 0x
-#define IXP425_PCI_BAR_5_DEFAULT 0x
-#endif
-
 /*Configuration Port register bit definitions*/
 #define PCI_CRP_WRITE BIT(16)
 
@@ -228,17 +139,6 @@ typedef struct
 #define PCI_CFG_SPECIAL_USE0x41
 #define PCI_CFG_MODE   0x43
 
-/*Specify the initial command we send to PCI devices*/
-#define INITIAL_PCI_CMD (PCI_CMD_IO_ENABLE\
-| PCI_CMD_MEM_ENABLE  \
-| PCI_CMD_MASTER_ENABLE   \
-| PCI_CMD

Re: [U-Boot] Update and Cut down mach types

2011-04-19 Thread Michael Schwingen
Am 04/19/2011 04:21 PM, schrieb Wolfgang Denk:
> Dear =?ISO-8859-1?Q?Matthias_Wei=DFer?=,
>
> In message <4dad90af.2080...@arcor.de> you wrote:
>> This will break a least jadecpu. We don't use Linux on this board. When 
>> porting I was requested to reserve an MACH_ID just in case the board 
>> will ever be used with Linux. This has not been the case for this board. 
>> But I would like to have this board in the u-boot tree. What will be the 
>> solution for ARM but non-Linux u-boot ports then? What should be passed 
>> to gd->bd->bi_arch_number?
> I think you have two options:
>
> 1) Complain with RMK about the removal of yoru MACH_ID.  Explain to
>him that you use this elsewhere and ash to re-add it.

I did that and got the following reply (without quotes due to cut-and-paste)

cu
Michael


From: Russell King - ARM Linux

To: Michael Schwingen
  
Subject: Re: [U-Boot] Update and Cut down mach types - ACTUX* and
DVLHOST  
machines
removed   

What makes it into the kernel is determined by a script which is
based 
upon a couple of simple
rules:  
   


   

1. If the entry appears in a MACHINE_START() declaration in Linus'
kernel  
   tree (evaluated on a daily basis), it is kept in the
file.  
2. If the entry was created or modified in the database within the
last
   12
months. 
 


   

(2) gives people a way to refresh their entry to ensure that it stays
in   
the list in the mainline
kernel. 
  


[...]

The normal URL which you fetch the file from (as contained within the
file)
will give you the full listing rather than the cut-down version. 
There
really is no need for uboot to go picking the copy up from the
mainline
kernel. 


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Update and Cut down mach types

2011-04-20 Thread Michael Schwingen
On 04/20/2011 10:58 AM, Igor Grinberg wrote:
> Hi Sandeep, Albert, Wolfgang,
>
> On 04/19/11 15:42, Paulraj, Sandeep wrote:
>> Wolfgang, Albert,
>>
>> Russell King sent some updates to the linux kernel for mach-types.
>>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6f82f4db80189281a8ac42f2e72396accb719b57
>>
>> He also removed a lot of entries which never made it to mainline.
> Well, as I understood from Russell, the main purpose of this "cut down"
> is to make "du -s linux/arch/arm" smaller, because there is no real need in
> all those boards listed in mach-types.h unless there is a support for them
> in mainline Linux kernel.
> Nevertheless the real ARM registry remains untouched - meaning that all
> board ids remain the same and no board is removed from the registry.
Correct.
> This is the place where U-Boot board support diverges from Linux...
>
> Are we obliged to follow the Linux mach-types.h?
> Can't we just adopt Russell's "cut down" script to boards supported by U-Boot?
> Or will it harden the mach-types.h future updates?
>
> Have you thought of getting rid of mach-types.h completely?
> Making every board define its ARM registry id can work and will
> eliminate the need for mach-types.h update every couple of months.
Also, why do we need to pull mach-types.h from Linux at all?

Why don't we pull the original master mach-types file, and generate the 
required .h file(s) during make using the same (or a similar) script 
Linux uses?


>> I have a patch and it is the branch below
>>
>> http://git.denx.de/?p=u-boot/u-boot-ti.git;a=shortlog;h=refs/heads/update-mach-types
> Have you checked that none of the removed boards are in U-Boot tree?
> Because if there are some, then their build will be broken...
It will break ACTUX1-ACTUX4 (which are in-tree, and work fine as soon as 
the relocation-breakage-patch is accepted), plus  DVLHOST, for which I 
have patches submitted to add support.

For my own boards, I can go to the ARM machine database, touch the 
entry, and wait until the define re-emerges in Linux, and await until 
that is marged back to u-boot, but this is plain silly. However, for 
DVLHOST, I am not the registered maintainer in the machine database, so 
I would have to create a duplicate entry for this to work.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Update and Cut down mach types

2011-04-20 Thread Michael Schwingen
On 04/20/2011 07:49 PM, Albert ARIBAUD wrote:
> Le 20/04/2011 19:15, Michael Schwingen a écrit :
>
>> Why don't we pull the original master mach-types file, and generate the
>> required .h file(s) during make using the same (or a similar) script
>> Linux uses?
> Hmm, because it would mean maintaining the same script as Linux uses.
> With the current solution, there's work to be done on mach-types only
> when someone needs new machine IDs.
I don't see how much maintaining the script would need - if the input 
format does not change, the script does not need changes, and if changes 
are needed, the can be copied 1:1 from the Linux version.

On the plus side: the mach-types file is much more terse than the 
generated headers, so updates that pull in new machines would generate 
diffs that are a lot smaller than they are now.


>>> Have you checked that none of the removed boards are in U-Boot tree?
>>> Because if there are some, then their build will be broken...
>> It will break ACTUX1-ACTUX4 (which are in-tree, and work fine as soon as
>> the relocation-breakage-patch is accepted), plus  DVLHOST, for which I
>> have patches submitted to add support.
>>
>> For my own boards, I can go to the ARM machine database, touch the
>> entry, and wait until the define re-emerges in Linux, and await until
>> that is marged back to u-boot, but this is plain silly. However, for
>> DVLHOST, I am not the registered maintainer in the machine database, so
>> I would have to create a duplicate entry for this to work.
> IIUC the machines that would disappear are those for which the is no
> actual mainline Linux support and which have not been touched in over a
> year, right? Do ACTUX* and DVLHOST boards fit in this description?
Yes. The ACTUX board ports are by me, while the DVLHOST machine type 
seems to be allocated by the manufacturer, Devolo, who never mainlined 
their Linux adaptions, so my goal is to get an independent port up. 
However, that means I can't update the machine type to get it back in 
mainline Linux by the 12-month-rule.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Update and Cut down mach types

2011-04-26 Thread Michael Schwingen
Am 04/21/2011 01:39 PM, schrieb Albert ARIBAUD:
> Le 20/04/2011 21:26, Michael Schwingen a écrit :
>> year, right? Do ACTUX* and DVLHOST boards fit in this description?
>> Yes. The ACTUX board ports are by me, while the DVLHOST machine type
>> seems to be allocated by the manufacturer, Devolo, who never mainlined
>> their Linux adaptions, so my goal is to get an independent port up.
>> However, that means I can't update the machine type to get it back in
>> mainline Linux by the 12-month-rule.
>>
>> cu
>> Michael
> Michael, for the time being, can you provide a patch over Sandeep's 
> update to reintroduce ACTUX* and DVLHOST? I'll consider it as a bugfix 
> and apply it before my pull request.
I guess this is not required after your NAK of the original patch?

Nevertheless, we need a method so that we no not need to patch the
mach-types.h after every cacle where the Linux version is pulled in.

cu
Michael


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Update and Cut down mach types

2011-04-27 Thread Michael Schwingen
Am 04/26/2011 11:38 PM, schrieb Reinhard Meyer:
>>
>>> So IMO, if we have mach-types in U-Boot for supporting Linux, then we
>>> should keep using a (reasonably) up-to-date Linux machine ID list just
>>> like we do now -- mach-types that disappear from the list mean Linux
>>> support has become useless for that machine in U-Boot. And if we have
>>> our own mach-type policy, different from "has linux support", then we
>>> need to specify what this policy is and how it is implemented.
>>
>> I think we should be gentle to users of existing code and avoid
>> breaking it. From now on, we could establish a policy that a mach-id
>> can only be referenced when and as long mainline Linux support for
>> this board exists.
>>
>> I'm open for suggestions.
>
>
> Hi Wolfgang, Albert,
>
> why don't we just create the #define MACH_xxx lines directly from the
> "http://www.arm.linux.org.uk/developer/machines/download.php";. We don't
> need all the *_is_* macros in u-boot anyway. Then we would have just a
> few 1000
> lines of #define MACH_*
>
I had already proposed that - after all, that is the way Linux does it
as well: the mach-types.h file is auto-generated from that list (or now
from a cut-down version of that list), so directly using the original
list to generate the .h file in u-boot would completely cut out the
middle man.

This would have multiple advantages IMHO:

 - the downloaded file is terse: only one line per machine, compared
with the current mach-types.h where one added machine generates lots of
lines (most of which we do not need at all!). Reviewing a patch that
pulls in a new upstream version would be easier with the original file
instead of the .h file.

 - Newly added machines turn up much earlier. When bringing up a new
board, you will usually work on u-boot first. Having to wait until the
machine ID trickles down into the Linux kernel, and *then* gets pulled
into u-boot at some later time, makes for a substantial delay until
board patches can be submitted to u-boot.

- It would actually save space:
138803 Apr 27 12:12 mach-types   (freshly downloaded, complete
unfiltered list)
1177444 Apr  5 20:55 ./arch/arm/include/asm/mach-types.h  (from u-boot
master, before the patch that removes boards)

- There would be no problem with removing boards that are supported in
u-boot, but not in Linux mainline - we would have the IDs for all known
boards, while still saving space.

I do think the maintenance effort when using the original mach-types
file would be lower than with the current system. However, when I
proposed this before,

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database

2011-05-05 Thread Michael Schwingen
Hi,

to conclude the discussion in the thread "Re: [U-Boot] Update and Cut down
mach types", I tried a short patch that demonstrates how to automatically
generate the mach-types.h file from a database dump (from
http://www.arm.linux.org.uk/developer/machines/?action=new).

This has multiple advantages:
 - pulling in new machine types is easier (drop in a new downloaded database
   dump), and produces a much smaller diff.
 - adding new machines is decoupled from the time they appear in Linux.
 - boards that are not in mainline Linux will not be break due to removal of
   their mach types from the Linux headers.

The AWK and Makefile fragment script is taken verbatim from Linux 2.6.38.3. 
I think the AWK script is simple enough that it will not require big
maintenance efforts (unless the machine database format changes).

The patch is edited down - I removed the diff for the deletion of the old
mach-types.h file, and shortened the new mach-types file to a few entries
just to show the concept - otherwise, the patch would be much too big for
the list.

Is this an acceptable solution? Should I go on and produce a full-fledged
patch?

cu
Michael


>From 2cb8bfd1b387a4a49d9e0cebd96824c879000420 Mon Sep 17 00:00:00 2001
From: Michael Schwingen 
Date: Thu, 5 May 2011 23:04:00 +0200
Subject: [ARM: auto-generate mach-types.h 1/1] auto-generate mach-types.h 
include file from ARM machine database dump


Signed-off-by: Michael Schwingen 
based directly on Makefile/script from Linux-2.8.38.3

---
 Makefile  |9 +-
 arch/arm/include/asm/mach-types.h |42924 -
 arch/arm/tools/gen-mach-types |   72 +
 arch/arm/tools/mach-types | 3448 +++
 4 files changed, 3527 insertions(+), 42926 deletions(-)
 delete mode 100644 arch/arm/include/asm/mach-types.h
 create mode 100644 arch/arm/tools/gen-mach-types
 create mode 100644 arch/arm/tools/mach-types

diff --git a/Makefile b/Makefile
index 384a59e..07ab7fb 100644
--- a/Makefile
+++ b/Makefile
@@ -469,7 +469,7 @@ $(obj)System.map:   $(obj)u-boot
 # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
 # the dep file is only include in this top level makefile to determine when
 # to regenerate the autoconf.mk file.
-$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
+$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h 
$(obj)include/asm/mach-types.h
@$(XECHO) Generating $@ ; \
set -e ; \
: Generate the dependancies ; \
@@ -530,13 +530,18 @@ unconfig:
$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
$(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
 
-%_config:: unconfig
+%_config:: unconfig $(obj)include/asm/mach-types.h
@$(MKCONFIG) -A $(@:_config=)
 
 sinclude $(obj).boards.depend
 $(obj).boards.depend:  boards.cfg
awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< 
> $@
 
+
+$(obj)include/asm/mach-types.h: arch/arm/tools/gen-mach-types 
arch/arm/tools/mach-types 
+   @mkdir -p $(obj)include/asm
+   awk -f $^ > $@ || { rm -f $@; /bin/false; }
+
 #
 # Functions to generate common board directory names
 #
diff --git a/arch/arm/include/asm/mach-types.h 
b/arch/arm/include/asm/mach-types.h
deleted file mode 100644


diff --git a/arch/arm/tools/gen-mach-types b/arch/arm/tools/gen-mach-types
new file mode 100644
index 000..04fef71
--- /dev/null
+++ b/arch/arm/tools/gen-mach-types
@@ -0,0 +1,72 @@
+#!/bin/awk
+#
+# Awk script to generate include/generated/mach-types.h
+#
+BEGIN  { nr = 0 }
+/^#/   { next }
+/^[]*$/ { next }
+
+NF == 4 {
+ machine_is[nr] = "machine_is_"$1;
+ config[nr] = "CONFIG_"$2;
+ mach_type[nr] = "MACH_TYPE_"$3;
+ num[nr] = $4; nr++
+   }
+
+NF == 3 {
+ machine_is[nr] = "machine_is_"$1;
+ config[nr] = "CONFIG_"$2;
+ mach_type[nr] = "MACH_TYPE_"$3;
+ num[nr] = ""; nr++
+   }
+
+
+END{
+ printf("/*\n");
+ printf(" * This was automagically generated from %s!\n", FILENAME);
+ printf(" * Do NOT edit\n");
+ printf(" */\n\n");
+ printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
+ printf("#define __ASM_ARM_MACH_TYPE_H\n\n");
+ printf("#ifndef __ASSEMBLY__\n");
+ printf("/* The type of machine we're running on */\n");
+ printf("extern unsigned int __machine_arch_type;\n");
+ printf("#endif\n\n");
+
+ printf("/* see arch/arm/kernel/arch.c for a description of these 
*/\n");
+ for (i = 0; i < nr; i++)
+   if (num[i] ~ /..*/)
+ printf("#define %-30s %d\n", mach_type[i],

Re: [U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database

2011-05-07 Thread Michael Schwingen
Am 05/06/2011 07:09 AM, schrieb Mike Frysinger:
> On Thu, May 5, 2011 at 17:48, Michael Schwingen wrote:
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -469,7 +469,7 @@ $(obj)System.map:   $(obj)u-boot
>>  # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
>>  # the dep file is only include in this top level makefile to determine when
>>  # to regenerate the autoconf.mk file.
>> -$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
>> +$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h 
>> $(obj)include/asm/mach-types.h
>>@$(XECHO) Generating $@ ; \
>>set -e ; \
>>: Generate the dependancies ; \
>> @@ -530,13 +530,18 @@ unconfig:
>>$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
>>$(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
>>
>> -%_config:: unconfig
>> +%_config:: unconfig $(obj)include/asm/mach-types.h
>>@$(MKCONFIG) -A $(@:_config=)
>>
>>  sinclude $(obj).boards.depend
>>  $(obj).boards.depend:  boards.cfg
>>awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' 
>> $< > $@
>>
>> +
>> +$(obj)include/asm/mach-types.h: arch/arm/tools/gen-mach-types 
>> arch/arm/tools/mach-types
>> +   @mkdir -p $(obj)include/asm
>> +   awk -f $^ > $@ || { rm -f $@; /bin/false; }
>> +
>>  #
>>  # Functions to generate common board directory names
>>  #
> this all belongs in arch/arm/config.mk and not the toplevel makefile
Fine with me, however, I am hitting a big problem with the Makefile
structure:

mach-types.h needs to be built before autoconf.mk can be generated, and
the rules for autoconf.mk are in the top-level Makefile.

If I put rules in arch/arm/config.mk, then the first of these rules
becomes the default rule which is executed in subdir makes (like "make
-C arch"), which breaks compilation completely, since config.mk is
included before the rules are defined in the subdir Makefiles.

It seems the current scheme allows only variable definitions in
config.mk files, which is not sufficient here.

rules.mk would be fine, however, there is no provision to include rules
from lower directories, since all the building in subdirectories is
handled by recursively calling make (this is one of the problems that
arise by recursively calling make for each directory, but that is a
different topic).

Any ideas? Using the current Makefile structure, I see no other solution
than defining the mach-types.h generation rules in the toplevel Makefile.

> also, dont hardcode full paths to things.  there's no reason for it.
Which of these can be omitted?

When putting the rules in arch/arm/config.mk, I can make them trigger
only when compiling for ARM, and I can use $(ARCH) instead of  arm/, but
apart from that, I think I need to specify the paths, no?

> might want to add an "update-mach-types" target so people can type
> `make update-mach-types` and it'll automatically wget the right file
> to the right place ...
Good idea.
I agree with Wolfgang that this is intended to be used by the maintainer
mainly, so the mach-types file should be included in the source so that
a normal user does not need to download the file.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database

2011-05-09 Thread Michael Schwingen
Am 05/09/2011 07:37 AM, schrieb Wolfgang Denk:
> Dear Michael Schwingen,
>
> In message <4dc5259c.7040...@discworld.dascon.de> you wrote:
>> If I put rules in arch/arm/config.mk, then the first of these rules
>> becomes the default rule which is executed in subdir makes (like "make
>> -C arch"), which breaks compilation completely, since config.mk is
>> included before the rules are defined in the subdir Makefiles.
> You are not suppoed to put any make rules in config.mk files.
>
>> It seems the current scheme allows only variable definitions in
>> config.mk files, which is not sufficient here.
> As the name implies, these files contain configuration (= variable)
> settings. Nothing else.
>
>> rules.mk would be fine, however, there is no provision to include rules
>> from lower directories, since all the building in subdirectories is
>> handled by recursively calling make (this is one of the problems that
>> arise by recursively calling make for each directory, but that is a
>> different topic).
> But lower level directories inherit all settings from the top level
> Makefile?
Yes.
However, the rule to generate autoconf.mk is in the toplevel Makefile,
and I need the rule to generate mach-types.h at the same level, as
autoconf.mk depends on it. The lower-level *Makefiles* are executed too
late to generate anything that is needed for autoconf.mk.

cu
Michael



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] RFC: auto-generate ARM mach-types.h file from ARM machine database

2011-05-09 Thread Michael Schwingen
Mike Frysinger wrote:
> On Saturday, May 07, 2011 06:57:32 Michael Schwingen wrote:
>   
>> mach-types.h needs to be built before autoconf.mk can be generated, and
>> the rules for autoconf.mk are in the top-level Makefile.
>>
>> If I put rules in arch/arm/config.mk, then the first of these rules
>> becomes the default rule which is executed in subdir makes (like "make
>> -C arch"), which breaks compilation completely, since config.mk is
>> included before the rules are defined in the subdir Makefiles.
>>
>> It seems the current scheme allows only variable definitions in
>> config.mk files, which is not sufficient here.
>>
>> rules.mk would be fine, however, there is no provision to include rules
>> from lower directories, since all the building in subdirectories is
>> handled by recursively calling make (this is one of the problems that
>> arise by recursively calling make for each directory, but that is a
>> different topic).
>>
>> Any ideas? Using the current Makefile structure, I see no other solution
>> than defining the mach-types.h generation rules in the toplevel Makefile.
>> 
>
> do you need the mach-types file for anything else ?  if not, dont keep that 
> in 
> git, keep the generated header.
>   
Then we are back at basically the current state.
If I do this, we need no Makefile support at all - we just need a script 
that is run by the maintainer that downloads the current mach-types from 
the web, and generates mach-types.h, which is then checked in.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [IXP42x PATCH series v4 04/17] Fix IXP code to work after relocation was added

2011-05-22 Thread Michael Schwingen
Am 05/21/2011 01:58 AM, schrieb Marek Vasut:
>
>> -int timer_init (void)
>> +unsigned long long get_ticks(void)
>>  {
>> -/* install interrupt handler for timer */
>> -irq_install_handler(IXP425_TIMER_2_IRQ, timer_isr, (void *)×tamp);
>> -
>> -/* setup the Timer counter value */
>> -*IXP425_OSRT2 = (LATCH & ~IXP425_OST_RELOAD_MASK) | IXP425_OST_ENABLE;
>> +ulong now = *IXP425_OSTS_B;
> Aren't you missing an IO accessor here ?
Oops - you are correct.


>> diff --git a/arch/arm/include/asm/arch-ixp/ixp425.h
>> b/arch/arm/include/asm/arch-ixp/ixp425.h index 2114437..5132607 100644
>> --- a/arch/arm/include/asm/arch-ixp/ixp425.h
>> +++ b/arch/arm/include/asm/arch-ixp/ixp425.h
>> @@ -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_OSRT1IXP425_TIMER_REG(IXP425_OSRT1_OFFSET)
>>  #define IXP425_OST2 IXP425_TIMER_REG(IXP425_OST2_OFFSET)
> This will eventually enjoy being converted to struct ixp_timer_regset { ... } 
> goo. If you already did it in some further patch, sorry, I didn't get there 
> yet 
> ;-)
That would probably require a major rework of all the Intel access/NPE
library code - this is not something I want to touch now.
Most of these defines are used inside the Intel code, so cleaning up
only outside of that area would not improve the code much.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [IXP42x PATCH series v4 08/17] update/fix AcTux1 board

2011-05-22 Thread Michael Schwingen
Am 05/21/2011 02:03 AM, schrieb Marek Vasut:
>
>> -int board_init (void)
>> +int board_early_init_f(void)
>> +{
>> +/* CS5: Debug port */
>> +writel(0x9d520003, IXP425_EXP_CS5);
>> +/* CS6: HwRel */
>> +writel(0x81860001, IXP425_EXP_CS6);
>> +/* CS7: LEDs */
>> +writel(0x8093, IXP425_EXP_CS7);
> Any idea what this magic means ?
Those are the parameters for the chip select timings on the expansion
bus. Since the IXP port does no supply useful defines for these bits, I
had to use magics there (however, even defines would only be readable if
you have the datasheet open at the same time).

This is basically just existing code that is moved around.


>> diff --git a/board/actux1/config.mk b/board/actux1/config.mk
>> deleted file mode 100644
>> index 88634f7..000
>> --- a/board/actux1/config.mk
>> +++ /dev/null
>> @@ -1,6 +0,0 @@
>> -CONFIG_SYS_TEXT_BASE = 0x00e0
>> -
>> -# include NPE ethernet driver
>> -BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
>> -
>> -LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
> Do you need uboot.lds at all ?
Unfortunately, yes, because the environment sector is embedded inside
the u-boot image.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [IXP42x PATCH series v4 13/17] add dvlhost (dLAN 200 AV Wireless G) board

2011-05-22 Thread Michael Schwingen
Am 05/21/2011 02:06 AM, schrieb Marek Vasut:
>
>> +/* Setup GPIO's for 33MHz clock output */
>> +GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
>> +GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
>> +writel(0x01FF01FF, IXP425_GPIO_GPCLKR);
>> +
>> +/* turn off all LEDs */
>> +writew(0x, DVLHOST_LED_LATCH);
>> +
>> +udelay(533);
> Why 533 ?
>
>> +GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_PCIRST);

Hm - that is copied from the PCI init sequence in pci_ixp.c - however,
the constant *does* look dodgy:
We need at least 100us reset pulse *after the clock is stable* -
whatever time that requires.
On the other hand, the PCI spec requires 2^25 clocks after reset before
the first configuration access, which would be around 1s - we probably
violate that, since the timing depends on what other code delays
operation until the first PCI configuration access.

Since PCI is not 100% functional (at least in my attempts), even on the
existing IXDP425 board, I would like to leave this as is for now - at
least it is consistent across all IXP boards.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [IXP42x PATCH series v4 08/17] update/fix AcTux1 board

2011-05-22 Thread Michael Schwingen
Am 05/22/2011 05:36 PM, schrieb Marek Vasut:
> On Saturday, May 21, 2011 02:03:24 AM Marek Vasut wrote:
>> On Wednesday, April 06, 2011 11:49:09 PM Michael Schwingen wrote:
>>> Signed-off-by: Michael Schwingen 
>>> ---
>>>
>>> Changes for V2:
>>>  - move -ffunction-sections/--gc-sections to board config.mk
>>>  - add wildcard to bss segment in linker script
>>>
>>> Changes for V3:
>>>  - use I/O accessors
>>>  - coding style fixes
>>>  - add PCI clock/reset initialization
>>>  - use get_ram_size in dram_init
>>>  - add PCI support
>>>  - remove config.mk
>>>  - remove unused definitions from config.h
>>>  - add CONFIG_BOARD_SIZE_LIMIT
>>>
>>> Changes for V4:
>>>  - add changelog
>>>  - merge __bss_end change in u-boot.lds from master
>>>  
>>>  board/actux1/actux1.c|  111
>>>
>>> -- board/actux1/config.mk   |
>>>
>>>   6 ---
>>>  
>>>  board/actux1/u-boot.lds  |   41 -
>>>  boards.cfg   |5 ++-
>>>  include/configs/actux1.h |   63 +++---
>>>  5 files changed, 127 insertions(+), 99 deletions(-)
>>>  delete mode 100644 board/actux1/config.mk
>>>
>>> diff --git a/board/actux1/actux1.c b/board/actux1/actux1.c
>>> index e73aff8..8fb8065 100644
>>
> btw this one doesn't apply for me. Can you please update according to u-boot-
> pxa.git ? Thanks !
>
> I applied 0001,2,3,4,5,7 so far.
I'll resend the whole series, based on u-boot-pxa.git, as "V5" - I kept
all patches and their numbering, ignore anything that is already applied.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 06/17] support CONFIG_SYS_LDSCRIPT on ARM

2011-05-22 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3, replaces config.mk files in earlier patches
Changes for V4:
 - add changelog
Changes for V5:

 arch/arm/config.mk |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index ec1b420..788d4c1 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -62,6 +62,13 @@ PLATFORM_LIBS += $(OBJTREE)/arch/arm/lib/eabi_compat.o
 endif
 endif
 
+ifdef CONFIG_SYS_LDSCRIPT
+# need to strip off double quotes
+LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
+else
+LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
+endif
+
 # needed for relocation
 ifndef CONFIG_NAND_SPL
 LDFLAGS_u-boot += -pie
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 01/17] add XScale sub architecture (IXP/PXA) to maintainer list

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:
 - change patch description
 - drop wepep250 (should already be deleted)
Changes for V4:
 - add changelog
Changes for V5:

 MAINTAINERS |   44 ++--
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5d110a8..3bbe2e7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -567,8 +567,8 @@ Stefano Babic 
ea20davinci
mx35pdk i.MX35
mx51evk i.MX51
-   polaris xscale
-   trizepsiv   xscale
+   polaris xscale/pxa
+   trizepsiv   xscale/pxa
vision2 i.MX51
 
 Jason Liu 
@@ -600,7 +600,7 @@ Andreas Bie
 
 Cliff Brake 
 
-   pxa255_idp  xscale
+   pxa255_idp  xscale/pxa
 
 Rick Bronson 
 
@@ -710,7 +710,7 @@ Sergey Kubushyn 
 
 Prakash Kumar 
 
-   cerf250 xscale
+   cerf250 xscale/pxa
 
 Vipin Kumar 
 
@@ -788,9 +788,9 @@ John Rigby 
 
 Stefan Roese 
 
-   ixdpg425xscale
-   pdnb3   xscale
-   scpuxscale
+   ixdpg425xscale/ixp
+   pdnb3   xscale/ixp
+   scpuxscale/ixp
 
 Alessandro Rubini 
 Nomadik Linux Team 
@@ -813,15 +813,15 @@ Heiko Schocher 
 
 Robert Schwebel 
 
-   csb226  xscale
-   innokom xscale
+   csb226  xscale/pxa
+   innokom xscale/pxa
 
 Michael Schwingen 
 
-   actux1  xscale
-   actux2  xscale
-   actux3  xscale
-   actux4  xscale
+   actux1  xscale/ixp
+   actux2  xscale/ixp
+   actux3  xscale/ixp
+   actux4  xscale/ixp
 
 Andrea Scian 
 
@@ -845,12 +845,12 @@ Greg Ungerer 
 
 Marek Vasut 
 
-   balloon3xscale
-   colibri_pxa270  xscale
-   palmld  xscale
-   palmtc  xscale
-   vpac270 xscale
-   zipitz2 xscale
+   balloon3xscale/pxa
+   colibri_pxa270  xscale/pxa
+   palmld  xscale/pxa
+   palmtc  xscale/pxa
+   vpac270 xscale/pxa
+   zipitz2 xscale/pxa
efikamx i.MX51
 
 Hugo Villeneuve 
@@ -901,9 +901,9 @@ Sughosh Ganu 
 Unknown / orphaned boards:
Board   CPU Last known maintainer / Comment
 .
-   cradle  xscale  Kyle Harris  / dead 
address
-   ixdp425 xscale  Kyle Harris  / dead 
address
-   lubbock xscale  Kyle Harris  / dead 
address
+   cradle  xscale/pxa  Kyle Harris  / 
dead address
+   ixdp425 xscale/ixp  Kyle Harris  / 
dead address
+   lubbock xscale/pxa  Kyle Harris  / 
dead address
 
imx31_phycore_eet i.MX31  Guennadi Liakhovetski  
/ resigned
mx31ads   i.MX31  Guennadi Liakhovetski  
/ resigned
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 15/17] update/fix PDNB3 board

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3 (split from "update_fix some more IXP42x boards" in V2)
Changes for V4:
 - add changelog
Changes for V5:

 board/prodrive/pdnb3/config.mk |2 --
 include/configs/pdnb3.h|   10 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)
 delete mode 100644 board/prodrive/pdnb3/config.mk

diff --git a/board/prodrive/pdnb3/config.mk b/board/prodrive/pdnb3/config.mk
deleted file mode 100644
index 817541f..000
--- a/board/prodrive/pdnb3/config.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-#
-CONFIG_SYS_TEXT_BASE = 0x01f0
diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h
index 33fa6ee..7fe9e5b 100644
--- a/include/configs/pdnb3.h
+++ b/include/configs/pdnb3.h
@@ -50,9 +50,6 @@
 /*
  * Misc configuration options
  */
-#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  
*/
 
@@ -117,6 +114,7 @@
 #define CONFIG_SYS_MEMTEST_END 0x0080  /* 4 ... 8 MB in DRAM   
*/
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
+#define CONFIG_IXP425_TIMER_CLK
 #define CONFIG_SYS_HZ  1000/* decrementer freq: 1 
ms ticks */
/* valid baudrates */
 #define CONFIG_SYS_BAUDRATE_TABLE  { 9600, 19200, 38400, 57600, 115200 }
@@ -188,6 +186,7 @@
 #define PHYS_SDRAM_10x /* SDRAM Bank #1 */
 #define PHYS_SDRAM_1_SIZE   0x0200 /* 32 MB */
 
+#define CONFIG_SYS_TEXT_BASE  0x5000
 #define CONFIG_SYS_FLASH_BASE  0x5000
 #define CONFIG_SYS_MONITOR_BASECONFIG_SYS_FLASH_BASE
 #if defined(CONFIG_SCPU)
@@ -345,4 +344,9 @@
  */
 #define CONFIG_SYS_CACHELINE_SIZE  32
 
+/* additions for new relocation code, must be added to all boards */
+#define CONFIG_SYS_SDRAM_BASE  0x
+#define CONFIG_SYS_INIT_SP_ADDR\
+   (CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
+
 #endif  /* __CONFIG_H */
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 05/17] fix "depend" target in npe directory

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:

Changes for V4:
 - add changelog
Changes for V5:

 arch/arm/cpu/ixp/npe/Makefile |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/Makefile b/arch/arm/cpu/ixp/npe/Makefile
index c756a1d..14ab3c7 100644
--- a/arch/arm/cpu/ixp/npe/Makefile
+++ b/arch/arm/cpu/ixp/npe/Makefile
@@ -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 \
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 12/17] IXP NPE: add support for fixed-speed MII ports

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:
Changes for V3:
 - coding style / indentation cleanup
 - move config.h changes to AcTux2/AcTux3 board patches
Changes for V4:
 - add changelog
Changes for V5:

 arch/arm/cpu/ixp/npe/npe.c |   67 +++
 1 files changed, 42 insertions(+), 25 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 6d92c53..f0e02bf 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -359,36 +359,53 @@ static int npe_init(struct eth_device *dev, bd_t * bis)
 
debug("%s: 1\n", __FUNCTION__);
 
-   miiphy_read (dev->name, p_npe->phy_no, MII_BMSR, ®_short);
-
-   /*
-* Wait if PHY is capable of autonegotiation and autonegotiation is not 
complete
-*/
-   if ((reg_short & BMSR_ANEGCAPABLE) && !(reg_short & BMSR_ANEGCOMPLETE)) 
{
-   puts ("Waiting for PHY auto negotiation to complete");
-   i = 0;
-   while (!(reg_short & BMSR_ANEGCOMPLETE)) {
-   /*
-* Timeout reached ?
-*/
-   if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
-   puts (" TIMEOUT !\n");
-   break;
-   }
+#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, MII_BMSR, ®_short);
+
+   /*
+* Wait if PHY is capable of autonegotiation and
+* autonegotiation is not complete
+*/
+   if ((reg_short & BMSR_ANEGCAPABLE) &&
+   !(reg_short & BMSR_ANEGCOMPLETE)) {
+   puts("Waiting for PHY auto negotiation to complete");
+   i = 0;
+   while (!(reg_short & BMSR_ANEGCOMPLETE)) {
+   /*
+* Timeout reached ?
+*/
+   if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
+   puts(" TIMEOUT !\n");
+   break;
+   }
 
-   if ((i++ % 1000) == 0) {
-   putc ('.');
-   miiphy_read (dev->name, p_npe->phy_no, 
MII_BMSR, ®_short);
+   if ((i++ % 1000) == 0) {
+   putc('.');
+   miiphy_read(dev->name, p_npe->phy_no,
+MII_BMSR, ®_short);
+   }
+   udelay(1000);   /* 1 ms */
}
-   udelay (1000);  /* 1 ms */
+   puts(" done\n");
+   /* another 500 ms (results in faster booting) */
+   udelay(50);
}
-   puts (" done\n");
-   udelay (50);/* another 500 ms (results in faster 
booting) */
+   speed = miiphy_speed(dev->name, p_npe->phy_no);
+   duplex = miiphy_duplex(dev->name, p_npe->phy_no);
}
 
-   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",
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 03/17] trigger hardware watchdog in IXP42x serial driver

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:
 - coding style fixes
Changes for V4:
 - add changelog
Changes for V5:

 drivers/serial/serial_ixp.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c
index dd26af4..a9acd47 100644
--- a/drivers/serial/serial_ixp.c
+++ b/drivers/serial/serial_ixp.c
@@ -30,6 +30,7 @@
 
 #include 
 #include 
+#include 
 
 /*
  *   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;
 }
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 08/17] update/fix AcTux1 board

2011-05-22 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - add PCI clock/reset initialization
 - use get_ram_size in dram_init
 - add PCI support
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
Changes for V4:
 - add changelog
 - merge __bss_end change in u-boot.lds from master
Changes for V5:

 board/actux1/actux1.c|  105 --
 board/actux1/config.mk   |4 --
 board/actux1/u-boot.lds  |   41 +-
 boards.cfg   |5 ++-
 include/configs/actux1.h |   62 ---
 5 files changed, 124 insertions(+), 93 deletions(-)
 delete mode 100644 board/actux1/config.mk

diff --git a/board/actux1/actux1.c b/board/actux1/actux1.c
index 85e3f9e..2f631b7 100644
--- a/board/actux1/actux1.c
+++ b/board/actux1/actux1.c
@@ -37,49 +37,57 @@
 #include 
 #include 
 #include 
+#ifdef CONFIG_PCI
+#include 
+#include 
+#endif
 
 #include "actux1_hw.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   /* CS5: Debug port */
+   writel(0x9d520003, IXP425_EXP_CS5);
+   /* CS6: HwRel */
+   writel(0x81860001, IXP425_EXP_CS6);
+   /* CS7: LEDs */
+   writel(0x8093, IXP425_EXP_CS7);
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX1;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
 
-   /* Setup GPIO's for PCI INTA */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI1_INTA);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI1_INTA);
+   /* Setup GPIOs for PCI INTA */
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI1_INTA);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI1_INTA);
 
-   /* Setup GPIO's for 33MHz clock output */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
-   *IXP425_GPIO_GPCLKR = 0x011001FF;
+   /* Setup GPIOs for 33MHz clock output */
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
 
-   /* CS5: Debug port */
-   *IXP425_EXP_CS5 = 0x9d520003;
-   /* CS6: HwRel */
-   *IXP425_EXP_CS6 = 0x81860001;
-   /* CS7: LEDs */
-   *IXP425_EXP_CS7 = 0x8093;
-
-   udelay (533);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
+   udelay(533);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
 
-   ACTUX1_LED1 (2);
-   ACTUX1_LED2 (2);
-   ACTUX1_LED3 (0);
-   ACTUX1_LED4 (0);
-   ACTUX1_LED5 (0);
-   ACTUX1_LED6 (0);
-   ACTUX1_LED7 (0);
+   ACTUX1_LED1(2);
+   ACTUX1_LED2(2);
+   ACTUX1_LED3(0);
+   ACTUX1_LED4(0);
+   ACTUX1_LED5(0);
+   ACTUX1_LED6(0);
+   ACTUX1_LED7(0);
 
-   ACTUX1_HS (ACTUX1_HS_DCD);
+   ACTUX1_HS(ACTUX1_HS_DCD);
 
return 0;
 }
@@ -87,21 +95,21 @@ int board_init (void)
 /*
  * Check Board Identity
  */
-int checkboard (void)
+int checkboard(void)
 {
char buf[64];
int i = getenv_f("serial#", buf, sizeof(buf));
 
-   puts ("Board: AcTux-1 rev.");
-   putc (ACTUX1_BOARDREL + 'A' - 1);
+   puts("Board: AcTux-1 rev.");
+   putc(ACTUX1_BOARDREL + 'A' - 1);
 
if (i > 0) {
puts(", serial# ");
puts(buf);
}
-   putc ('\n');
+   putc('\n');
 
-   return (0);
+   return 0;
 }
 
 /*
@@ -110,39 +118,36 @@ int checkboard (void)
  * 1 = Rev. A
  * 2 = Rev. B
  */
-u32 get_board_rev (void)
+u32 get_board_rev(void)
 {
return ACTUX1_BOARDREL;
 }
 
-int dram_init (void)
+int dram_init(void)
 {
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-   return (0);
+   gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
+   return 0;
 }
 
-#if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI)
-extern struct pci_controller hose;
-extern void pci_ixp_init (struct pci_controller *hose);
 
-void pci_init_board (void)
+#ifdef CONFIG_PCI
+struct pci_controller hose;
+
+void pci_init_board(void)
 {
-   extern void pci_ixp_init (struct pci_controller *hose);
-   pci_ixp_init (&hose);
+   pci_ixp_init(&hose);
 

[U-Boot] [IXP42x PATCH series v5 02/17] add support for IXP42x Rev. B1 and newer

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:

Changes for V3:
 - reformat to wrap long lines
Changes for V4:
 - add changelog
Changes for V5:

 arch/arm/cpu/ixp/npe/npe.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 857bcad..6d92c53 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -621,9 +621,12 @@ 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
-* Eth Coprocessor is available.
+* If it is B0 or newer Silicon, we
+* only enable port when its
+* corresponding Eth Coprocessor is
+* available.
 */
if 
(ixFeatureCtrlComponentCheck(IX_FEATURECTRL_ETH0) ==
IX_FEATURE_CTRL_COMPONENT_ENABLED)
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 09/17] update/fix AcTux2 board

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - use get_ram_size in dram_init
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
 - add CONFIG_MII_NPE0_FIXEDLINK definition
Changes for V4:
 - add changelog
 - merge __bss_end change in u-boot.lds from master
Changes for V5:

 board/actux2/actux2.c|   93 +++--
 board/actux2/config.mk   |4 --
 board/actux2/u-boot.lds  |   46 ++
 include/configs/actux2.h |   35 +++--
 4 files changed, 100 insertions(+), 78 deletions(-)
 delete mode 100644 board/actux2/config.mk

diff --git a/board/actux2/actux2.c b/board/actux2/actux2.c
index 0d67f80..9040a09 100644
--- a/board/actux2/actux2.c
+++ b/board/actux2/actux2.c
@@ -43,50 +43,55 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   /* CS1: IPAC-X */
+   writel(0x94d10013, IXP425_EXP_CS1);
+   /* CS5: Debug port */
+   writel(0x9d520003, IXP425_EXP_CS5);
+   /* CS6: HW release register */
+   writel(0x81860001, IXP425_EXP_CS6);
+   /* CS7: LEDs */
+   writel(0x8093, IXP425_EXP_CS7);
+
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX2;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DCD);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_ETHRST);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DCD);
 
-   /* Setup GPIO's for Interrupt inputs */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT);
+   /* Setup GPIOs for Interrupt inputs */
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_DBGINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_ETHINT);
 
-   /* Setup GPIO's for 33MHz clock output */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
-   *IXP425_GPIO_GPCLKR = 0x011001FF;
+   /* Setup GPIOs for 33MHz clock output */
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
 
-   /* 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 = 0x8093;
+   udelay(533);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_ETHRST);
 
-   udelay (533);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
-
-   ACTUX2_LED1 (1);
-   ACTUX2_LED2 (0);
-   ACTUX2_LED3 (0);
-   ACTUX2_LED4 (0);
+   ACTUX2_LED1(1);
+   ACTUX2_LED2(0);
+   ACTUX2_LED3(0);
+   ACTUX2_LED4(0);
 
return 0;
 }
@@ -94,29 +99,27 @@ int board_init (void)
 /*
  * Check Board Identity
  */
-int checkboard (void)
+int checkboard(void)
 {
char buf[64];
int i = getenv_f("serial#", buf, sizeof(buf));
 
-   puts ("Board: AcTux-2 rev.");
-   putc (ACTUX2_BOARDREL + 'A' - 1);
+   puts("Board: AcTux-2 rev.");
+   putc(ACTUX2_BOARDREL + 'A' - 1);
 
if (i > 0) {
puts(", serial# ");
puts(buf);
}
-   putc ('\n');
+   putc('\n');
 
-   return (0);
+   return 0;
 }
 
-int dram_init (void)
+int dram_init(void)
 {
-   gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-   gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-
-   return (0);
+   gd->ram_size = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
+   return 0;
 }
 
 /*
@@ -125,13 +128,13 @@ int dram_init (void)
  * 1 = Rev. A
  * 2 = Rev. B
  */
-u32 get_board_rev (void)
+u

[U-Boot] [IXP42x PATCH series v5 10/17] update/fix AcTux3 board

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - use get_ram_size in dram_init
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
 - add CONFIG_MII_NPE0_FIXEDLINK definition
Changes for V4:
 - add changelog
 - merge __bss_end change in u-boot.lds from master
Changes for V5:

 board/actux3/actux3.c|  120 +++--
 board/actux3/config.mk   |4 --
 board/actux3/u-boot.lds  |   52 
 include/configs/actux3.h |   37 +-
 4 files changed, 117 insertions(+), 96 deletions(-)
 delete mode 100644 board/actux3/config.mk

diff --git a/board/actux3/actux3.c b/board/actux3/actux3.c
index bace254..64e5215 100644
--- a/board/actux3/actux3.c
+++ b/board/actux3/actux3.c
@@ -36,72 +36,76 @@
 #include 
 #include 
 #include 
-
 #include 
-
 #include "actux3_hw.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   /* CS1: IPAC-X */
+   writel(0x94d10013, IXP425_EXP_CS1);
+   /* CS5: Debug port */
+   writel(0x9d520003, IXP425_EXP_CS5);
+   /* CS6: Release/Option register */
+   writel(0x81860001, IXP425_EXP_CS6);
+   /* CS7: LEDs */
+   writel(0x8093, IXP425_EXP_CS7);
+
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX3;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_ETHRST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_DCD);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED5_GN);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_RT);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED6_GN);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED5_GN);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED6_RT);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED6_GN);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_ETHRST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_ETHRST);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_DSR);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_DCD);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_DSR);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DCD);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED5_GN);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_RT);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_LED6_GN);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED5_GN);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED6_RT);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_LED6_GN);
 
/*
 * Setup GPIO's for Interrupt inputs
 */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_DBGINT);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_ETHINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_DBGINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_ETHINT);
 
/*
 * Setup GPIO's for 33MHz clock output
 */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-   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 = 0x8093;
-
-   udelay (533);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_ETHRST);
-
-   ACTUX3_LED1_RT (1);
-   ACTUX3_LED1_GN (0);
-   ACTUX3_LED2_RT (0);
-   ACTUX3_LED2_GN (0);
-   ACTUX3_LED3_RT (0);
-   ACTUX3_LED3_GN (0);
-   ACTUX3_LED4_GN (0);
-   ACTUX3_LED5_RT (0);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
+
+   /* 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);
+
+   ACTUX3_LED1_RT(1);
+   ACTUX3_LED1_GN(0);
+   ACTUX3_LED2_RT(0);
+   ACTUX3_LED2_GN(0);
+   ACTUX3_LED3_RT(0);
+   ACTUX3_LED3_GN(0);
+   ACTUX3_LED4_GN(0);
+   ACTUX3_LED5_RT(0);
 
return 0;
 }
@@ -109,21 +113,21 @@ int board_init (void)
 /*
  * Check Board Identity
  */
-int checkboard (void)
+int checkboard(void)
 {
char buf[64];
int i = get

[U-Boot] [IXP42x PATCH series v5 13/17] add dvlhost (dLAN 200 AV Wireless G) board

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - move -ffunction-sections/--gc-sections to board config.mk
 - add wildcard to bss segment in linker script
 - add ethprime/ethrotate to default environment
Changes for V3:
 - use I/O accessors
 - coding style fixes
 - add PCI clock/reset initialization
 - use get_ram_size in dram_init
 - add PCI support
 - remove config.mk
 - remove unused definitions from config.h
 - add CONFIG_BOARD_SIZE_LIMIT
Changes for V4:
 - add changelog
 - add __bss_end to u-boot.lds
Changes for V5:

 MAINTAINERS|1 +
 board/dvlhost/Makefile |   50 +
 board/dvlhost/dvlhost.c|  130 +++
 board/dvlhost/dvlhost_hw.h |   47 +
 board/dvlhost/u-boot.lds   |   87 +++
 board/dvlhost/watchdog.c   |   43 
 boards.cfg |1 +
 include/configs/dvlhost.h  |  248 
 8 files changed, 607 insertions(+), 0 deletions(-)
 create mode 100644 board/dvlhost/Makefile
 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

diff --git a/MAINTAINERS b/MAINTAINERS
index 3bbe2e7..ab9906e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -822,6 +822,7 @@ Michael Schwingen 
actux2  xscale/ixp
actux3  xscale/ixp
actux4  xscale/ixp
+   dvlhost xscale/ixp
 
 Andrea Scian 
 
diff --git a/board/dvlhost/Makefile b/board/dvlhost/Makefile
new file mode 100644
index 000..af9a644
--- /dev/null
+++ b/board/dvlhost/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := dvlhost.o watchdog.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/dvlhost/dvlhost.c b/board/dvlhost/dvlhost.c
new file mode 100644
index 000..561e47f
--- /dev/null
+++ b/board/dvlhost/dvlhost.c
@@ -0,0 +1,130 @@
+/*
+ * (C) Copyright 2009
+ * Michael Schwingen, mich...@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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#ifdef CONFIG_PCI
+#include 
+#include 
+#endif
+
+#include "dvlhost_hw.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f(void)
+{
+   /* CS1: LED Latch */
+   writel(0xBFFF0002, IXP425_EXP_CS1);
+   return 0;
+}
+
+int board_init(void)
+{
+   gd->bd->bi_arch_number = MACH_TYPE_DVLHOST;
+
+   /* adress of boot parameters */
+   gd->bd->bi_boot_params = 0x0100;
+
+   /* Setup GPIOs used as output */
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_WDGTRIGGER);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_DLAN_PAIRING);
+  

[U-Boot] [IXP42x PATCH series v5 07/17] use -ffunction-sections / --gc-sections on IXP42x

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - remove changes from config.mk and board config.h files
 - add wildcards to sections in arch/arm/cpu/ixp/u-boot.lds
Changes for V3:
 - set compiler/linker flags in arch/arm/cpu/ixp/config.mk instead of
   per-board config.mk files
Changes for V4:
 - add changelog
Changes for V5:

 arch/arm/cpu/ixp/config.mk  |5 +
 arch/arm/cpu/ixp/u-boot.lds |8 
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/ixp/config.mk b/arch/arm/cpu/ixp/config.mk
index deca3f4..5868cba 100644
--- a/arch/arm/cpu/ixp/config.mk
+++ b/arch/arm/cpu/ixp/config.mk
@@ -27,6 +27,11 @@ BIG_ENDIAN = y
 PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian
 
 PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100
+
+# -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker 
error
+PLATFORM_RELFLAGS += -ffunction-sections
+LDFLAGS_u-boot += --gc-sections
+
 # =
 #
 # Supply options according to compiler version
diff --git a/arch/arm/cpu/ixp/u-boot.lds b/arch/arm/cpu/ixp/u-boot.lds
index 3587f8a..7199de4 100644
--- a/arch/arm/cpu/ixp/u-boot.lds
+++ b/arch/arm/cpu/ixp/u-boot.lds
@@ -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);
@@ -67,7 +67,7 @@ SECTIONS
 
.bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
-   *(.bss)
+   *(.bss*)
 . = ALIGN(4);
__bss_end__ = .;
}
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 00/17] Overview

2011-05-22 Thread Michael Schwingen
Hi,

this is V5 of the IXP42x patch series - it is now based on Marek's
u-boot-pxa.git, with one additional fix:
 - fix one missing I/O accessor in get_ticks() in Patch #0004

cu
Michael

Michael Schwingen (17):
  add XScale sub architecture (IXP/PXA) to maintainer list
  add support for IXP42x Rev. B1 and newer
  trigger hardware watchdog in IXP42x serial driver
  Fix IXP code to work after relocation was added
  fix "depend" target in npe directory
  support CONFIG_SYS_LDSCRIPT on ARM
  use -ffunction-sections / --gc-sections on IXP42x
  update/fix AcTux1 board
  update/fix AcTux2 board
  update/fix AcTux3 board
  update/fix AcTux4 board
  IXP NPE: add support for fixed-speed MII ports
  add dvlhost (dLAN 200 AV Wireless G) board
  update/fix IXDP425 / IXDPG425 boards
  update/fix PDNB3 board
  IXP42x PCI rewrite
  run arm_pci_init after relocation

 MAINTAINERS   |   45 ++-
 arch/arm/config.mk|7 +
 arch/arm/cpu/ixp/config.mk|5 +
 arch/arm/cpu/ixp/cpu.c|5 -
 arch/arm/cpu/ixp/npe/Makefile |1 +
 arch/arm/cpu/ixp/npe/npe.c|   74 +++--
 arch/arm/cpu/ixp/start.S  |   59 +---
 arch/arm/cpu/ixp/timer.c  |  124 +++---
 arch/arm/cpu/ixp/u-boot.lds   |8 +-
 arch/arm/include/asm/arch-ixp/ixp425.h|5 +-
 arch/arm/include/asm/arch-ixp/ixp425pci.h |  130 +--
 arch/arm/include/asm/global_data.h|3 +
 arch/arm/lib/board.c  |6 +-
 board/actux1/actux1.c |  105 +++---
 board/actux1/config.mk|4 -
 board/actux1/u-boot.lds   |   41 ++-
 board/actux2/actux2.c |   93 +++---
 board/actux2/config.mk|4 -
 board/actux2/u-boot.lds   |   46 ++-
 board/actux3/actux3.c |  120 +++---
 board/actux3/config.mk|4 -
 board/actux3/u-boot.lds   |   52 ++-
 board/actux4/actux4.c |  103 +++--
 board/actux4/config.mk|4 -
 board/dvlhost/Makefile|   50 +++
 board/dvlhost/dvlhost.c   |  130 ++
 board/dvlhost/dvlhost_hw.h|   47 +++
 board/dvlhost/u-boot.lds  |   87 
 board/dvlhost/watchdog.c  |   43 ++
 board/ixdp425/config.mk   |2 -
 board/ixdp425/flash.c |  427 
 board/ixdp425/ixdp425.c   |  155 +++-
 board/prodrive/pdnb3/config.mk|2 -
 boards.cfg|8 +-
 drivers/pci/pci.c |4 -
 drivers/pci/pci_indirect.c|   13 +-
 drivers/pci/pci_ixp.c |  612 ++---
 drivers/serial/serial_ixp.c   |7 +-
 include/configs/actux1.h  |   62 ++--
 include/configs/actux2.h  |   35 ++-
 include/configs/actux3.h  |   37 ++-
 include/configs/actux4.h  |   39 ++-
 include/configs/dvlhost.h |  248 
 include/configs/ixdp425.h |  196 +++---
 include/configs/ixdpg425.h|   11 +-
 include/configs/pdnb3.h   |   10 +-
 46 files changed, 1689 insertions(+), 1584 deletions(-)
 delete mode 100644 board/actux1/config.mk
 delete mode 100644 board/actux2/config.mk
 delete mode 100644 board/actux3/config.mk
 delete mode 100644 board/actux4/config.mk
 create mode 100644 board/dvlhost/Makefile
 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
 delete mode 100644 board/ixdp425/config.mk
 delete mode 100644 board/ixdp425/flash.c
 delete mode 100644 board/prodrive/pdnb3/config.mk
 create mode 100644 include/configs/dvlhost.h

-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 17/17] run arm_pci_init after relocation

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3
Changes for V4:
 - add changelog
Changes for V5:

 arch/arm/lib/board.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 1a784a1..99bc2c7 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -262,9 +262,6 @@ init_fnc_t *init_sequence[] = {
init_func_i2c,
 #endif
dram_init,  /* configure available RAM banks */
-#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI)
-   arm_pci_init,
-#endif
NULL,
 };
 
@@ -533,6 +530,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
/* initialize environment */
env_relocate ();
 
+#if defined(CONFIG_CMD_PCI) || defined(CONFIG_PCI)
+   arm_pci_init();
+#endif
 #ifdef CONFIG_VFD
/* must do this after the framebuffer is allocated */
drv_vfd_init();
-- 
1.7.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [IXP42x PATCH series v5 04/17] Fix IXP code to work after relocation was added

2011-05-22 Thread 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

Signed-off-by: Michael Schwingen 
---
Changes for V2:
 - fix patch description
Changes for V3:
 - use I/O accessors
 - move timestamp variable from BSS to global data
 - coding style fixes
Changes for V4:
 - add changelog
Changes for V5:
 - fix one missing I/O accessor in get_ticks()

 arch/arm/cpu/ixp/cpu.c |5 --
 arch/arm/cpu/ixp/start.S   |   59 ++--
 arch/arm/cpu/ixp/timer.c   |  124 +++-
 arch/arm/include/asm/arch-ixp/ixp425.h |5 +-
 arch/arm/include/asm/global_data.h |3 +
 5 files changed, 68 insertions(+), 128 deletions(-)

diff --git a/arch/arm/cpu/ixp/cpu.c b/arch/arm/cpu/ixp/cpu.c
index ce275e5..942845d 100644
--- a/arch/arm/cpu/ixp/cpu.c
+++ b/arch/arm/cpu/ixp/cpu.c
@@ -36,8 +36,6 @@
 #include 
 #include 
 
-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 & 0x03f0) >> 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;
}
diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S
index 561c1f4..faa9a8f 100644
--- a/arch/arm/cpu/ixp/start.S
+++ b/arch/arm/cpu/ixp/start.S
@@ -65,7 +65,8 @@
.endm
 
 .globl _start
-_start: b  reset
+_start:
+   ldr pc, _reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
@@ -74,6 +75,7 @@ _start: b reset
ldr pc, _irq
ldr pc, _fiq
 
+_reset: .word reset
 _undefined_instruction: .word undefined_instruction
 _software_interrupt:   .word software_interrupt
 _prefetch_abort:   .word prefetch_abort
@@ -167,12 +169,6 @@ reset:
str r1, [r2]
 
/* make sure flash is visible at 0 */
-#if 0
-   ldr r2, =IXP425_EXP_CFG0
-   ldr r1, [r2]
-   orr r1, r1, #0x8000
-   str r1, [r2]
-#endif
mov r1, #CONFIG_SYS_SDR_CONFIG
ldr r2, =IXP425_SDR_CONFIG
str r1, [r2]
@@ -216,19 +212,6 @@ reset:
str r1, [r4]
DELAY_FOR 0x4000, r0
 
-   /* copy */
-   mov r0, #0
-   mov r4, r0
-   add r2, r0, #CONFIG_SYS_MONITOR_LEN
-   mov r1, #0x1000
-   mov r5, r1
-
-30:
-   ldr r3, [r0], #4
-   str r3, [r1], #4
-   cmp r0, r2
-   bne 30b
-
/* invalidate I & D caches & BTB */
mcr p15, 0, r0, c7, c7, 0
CPWAIT  r0
@@ -241,19 +224,12 @@ reset:
mcr p15, 0, r0, c7, c10, 4
CPWAIT  r0
 
-   /* move flash to 0x5000 */
+   /* remove flash mirror at 0x */
ldr r2, =IXP425_EXP_CFG0
ldr r1, [r2]
bic r1, r1, #0x8000
str r1, [r2]
 
-   nop
-   nop
-   nop
-   nop
-   nop
-   nop
-
/* invalidate I & Data TLB */
mcr p15, 0, r0, c8, c7, 0
CPWAIT r0
@@ -269,7 +245,7 @@ reset:
orr r0,r0,#0x13
msr cpsr,r0
 
-/* Set stackpointer in internal RAM to call board_init_f */
+/* Set initial stackpointer in SDRAM to call board_init_f */
 call_board_init_f:
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
@@ -580,28 +556,3 @@ reset_endless:
 
b   reset_endless
 
-#ifdef CONFIG_USE_IRQ
-
-.LC0:  .word   loops_per_jiffy
-
-/*
- * 0 <= r0 <= 2000
- */
-.globl __udelay
-__udelay:
-   mov r2, #0x6800
-   orr r2, r2, #0x00db
-   mul r0, r2, r0
-   ldr r2, .LC0
-   ldr r2, [r2]@ max = 0x0fff
-   mov r0, r0, lsr #11 @ max = 0x3fff
-   mov r2, r2, lsr #11 @ max = 0x0003
-   mul r0, r2, r0  @ max = 2^32-1
-   movsr0, r0, lsr #6
-
-delay_loop:
-   subsr0, r0, #1
-   bne delay_loop
-   mov pc, lr
-
-#endif /* CONFIG_USE_IRQ */
diff --git a/arch/arm/cpu/ixp/timer.c b/arch/arm/cpu/ixp/timer.c
index edf341f..9f3ea42 100644
--- a/arch/arm/cpu/ixp/timer.c
+++ b/arch/arm/cpu/ixp/timer.c
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2010
+ * Michael Schwingen, mich...@schwingen.org
+ *
  * (C) Copyright 2006
  * Stefan Roese, DENX Software Engineering, s...@denx.de.
  *
@@ -31,105 +34,94 @@
 
 #include 
 #include 
+#include 
+#include 
 
-#ifdef CONFIG_TIMER_

[U-Boot] [IXP42x PATCH series v5 16/17] IXP42x PCI rewrite

2011-05-22 Thread Michael Schwingen
clean up IXP PCI handling: get rid of IXP-private bus scan, BAR assign etc.
code and use u-boot's PCI infrastructure instead.  Move board-specific PCI
setup code (clock/reset) to board directory.

Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3
Changes for V4:
 - add changelog
Changes for V5:

 arch/arm/include/asm/arch-ixp/ixp425pci.h |  130 +--
 drivers/pci/pci.c |4 -
 drivers/pci/pci_indirect.c|   13 +-
 drivers/pci/pci_ixp.c |  612 ++---
 4 files changed, 210 insertions(+), 549 deletions(-)

diff --git a/arch/arm/include/asm/arch-ixp/ixp425pci.h 
b/arch/arm/include/asm/arch-ixp/ixp425pci.h
index 9ea3319..acafea7 100644
--- a/arch/arm/include/asm/arch-ixp/ixp425pci.h
+++ b/arch/arm/include/asm/arch-ixp/ixp425pci.h
@@ -22,88 +22,21 @@
  * MA 02111-1307 USA
  */
 
-#ifndef _IXP425PCI_H_
-#define _IXP425PCI_H_
+#ifndef _IXP425PCI_H
+#define _IXP425PCI_H
 
-#define TRUE   1
-#define FALSE  0
 #define OK 0
 #define ERROR  -1
-#define BOOL   int
 
-#define IXP425_PCI_MAX_BAR_PER_FUNC  6
-#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC * \
-   IXP425_PCI_MAX_FUNC_ON_BUS)
-
-enum PciBarId
-{
-   CSR_BAR=0,
-   IO_BAR,
-   SD_BAR,
-   NO_BAR
-};
-
-/*Base address register descriptor*/
-typedef struct
-{
-   unsigned int size;
-   unsigned int address;
-} PciBar;
-
-typedef struct
-{
-   unsigned int bus;
-   unsigned int device;
-   unsigned int func;
-   unsigned int irq;
-   BOOL error;
-   unsigned short vendor_id;
-   unsigned short device_id;
-   /*We need an extra entry in this array for dummy placeholder*/
-   PciBar bar[IXP425_PCI_MAX_BAR_PER_FUNC + 1];
-} PciDevice;
+struct pci_controller;
+extern void pci_ixp_init(struct pci_controller *hose);
 
 /* Mask definitions*/
-#define IXP425_PCI_TOP_WORD_OF_LONG_MASK   0x
-#define IXP425_PCI_TOP_BYTE_OF_LONG_MASK   0xff00
-#define IXP425_PCI_BOTTOM_WORD_OF_LONG_MASK0x
-#define IXP425_PCI_BOTTOM_TRIBYTES_OF_LONG_MASK 0x00ff
 #define IXP425_PCI_BOTTOM_NIBBLE_OF_LONG_MASK  0x000f
-#define IXP425_PCI_MAX_UINT32  0x
-
-
-#define IXP425_PCI_BAR_QUERY   0x
-
-#define IXP425_PCI_BAR_MEM_BASE 0x10
-#define IXP425_PCI_BAR_IO_BASE 0x00
-
-/*define the maximum number of bus segments - we support a single segment*/
-#define IXP425_PCI_MAX_BUS  1
-/*define the maximum number of cards per bus segment*/
-#define IXP425_PCI_MAX_DEV  4
-/*define the maximum number of functions per device*/
-#define IXP425_PCI_MAX_FUNC 8
-/* define the maximum number of separate functions that we can
-   potentially have on the bus*/
-#define IXP425_PCI_MAX_FUNC_ON_BUS (1+ IXP425_PCI_MAX_FUNC *   \
-   IXP425_PCI_MAX_DEV *\
-   IXP425_PCI_MAX_BUS)
-/*define the maximum number of BARs per function*/
-#define IXP425_PCI_MAX_BAR_PER_FUNC  6
-#define IXP425_PCI_MAX_BAR (IXP425_PCI_MAX_BAR_PER_FUNC *  \
-   IXP425_PCI_MAX_FUNC_ON_BUS)
 
 #define PCI_NP_CBE_BESL (4)
 #define PCI_NP_AD_FUNCSL (8)
 
-#define REG_WRITE(b,o,v) (*(volatile unsigned int*)((b+o))=(v))
-#define REG_READ(b,o,v) ((v)=(*(volatile unsigned int*)((b+o
-
-#define PCI_DELAY  500
-#define USEC_LOOP_COUNT 533
-#define PCI_SETTLE_USEC 200
-#define PCI_MIN_RESET_ASSERT_USEC 2000
-
 /*Register addressing definitions for PCI controller configuration
   and status registers*/
 
@@ -150,28 +83,6 @@ typedef struct
 #define NP_CMD_CONFIGWRITE (0xb)
 */
 
-/*define the default setting of the AHB memory base reg*/
-#define IXP425_PCI_AHBMEMBASE_DEFAULT 0x00010203
-#define IXP425_PCI_AHBIOBASE_DEFAULT  0x0
-#define IXP425_PCI_PCIMEMBASE_DEFAULT 0x0
-
-/*define the default settings for the controller's BARs*/
-#ifdef IXP425_PCI_SIMPLE_MAPPING
-#define IXP425_PCI_BAR_0_DEFAULT 0x
-#define IXP425_PCI_BAR_1_DEFAULT 0x0100
-#define IXP425_PCI_BAR_2_DEFAULT 0x0200
-#define IXP425_PCI_BAR_3_DEFAULT 0x0300
-#define IXP425_PCI_BAR_4_DEFAULT 0x
-#define IXP425_PCI_BAR_5_DEFAULT 0x
-#else
-#define IXP425_PCI_BAR_0_DEFAULT 0x4000
-#define IXP425_PCI_BAR_1_DEFAULT 0x4100
-#define IXP425_PCI_BAR_2_DEFAULT 0x4200
-#define IXP425_PCI_BAR_3_DEFAULT 0x4300
-#define IXP425_PCI_BAR_4_DEFAULT 0x
-#define IXP425_PCI_BAR_5_DEFAULT 0x
-#endif
-
 /*Configuration Port register bit definitions*/
 #define PCI_CRP_WRITE BIT(16)
 
@@ -228,17 +139,6 @@ typedef struct
 #define PCI_CFG_SPECIAL_USE0x41
 #define PCI_CFG_MODE   0x43
 
-/*Specify the initial command we send to PCI devices*/
-#define INITIAL_PCI_CMD (PCI_CMD_IO_ENABLE\
-| PCI_CMD_MEM_ENABLE  \
-| PCI_CMD_MAS

[U-Boot] [IXP42x PATCH series v5 11/17] update/fix AcTux4 board

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V2:
Changes for V3:
 - coding style / indentation cleanup
 - move config.h changes to AcTux2/AcTux3 board patches
Changes for V4:
 - add changelog
Changes for V5:

 board/actux4/actux4.c|  103 ++---
 board/actux4/config.mk   |4 --
 include/configs/actux4.h |   39 -
 3 files changed, 86 insertions(+), 60 deletions(-)
 delete mode 100644 board/actux4/config.mk

diff --git a/board/actux4/actux4.c b/board/actux4/actux4.c
index f373b58..d20d881 100644
--- a/board/actux4/actux4.c
+++ b/board/actux4/actux4.c
@@ -35,92 +35,107 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
+#ifdef CONFIG_PCI
+#include 
+#include 
+#endif
 
 #include "actux4_hw.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init (void)
+int board_early_init_f(void)
+{
+   writel(0xbd113c42, IXP425_EXP_CS1);
+   return 0;
+}
+
+int board_init(void)
 {
gd->bd->bi_arch_number = MACH_TYPE_ACTUX4;
 
/* adress of boot parameters */
gd->bd->bi_boot_params = 0x0100;
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_nPWRON);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_nPWRON);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_nPWRON);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_nPWRON);
 
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_IORST);
 
/* led not populated on board*/
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED3);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED3);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED3);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED3);
 
/* middle LED */
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_LED2);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED2);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_LED2);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED2);
 
/* right LED */
/* weak pulldown = LED weak on */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_LED1);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_LED1);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_LED1);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_LED1);
 
/* Setup GPIO's for Interrupt inputs */
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTA);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTB);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_USBINTC);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_RTCINT);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTA);
-   GPIO_OUTPUT_DISABLE (CONFIG_SYS_GPIO_PCI_INTB);
-
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTA);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTB);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_USBINTC);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_RTCINT);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTA);
-   GPIO_INT_ACT_LOW_SET (CONFIG_SYS_GPIO_PCI_INTB);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTA);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTB);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_USBINTC);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_RTCINT);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTA);
+   GPIO_OUTPUT_DISABLE(CONFIG_SYS_GPIO_PCI_INTB);
+
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTA);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTB);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_USBINTC);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_RTCINT);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTA);
+   GPIO_INT_ACT_LOW_SET(CONFIG_SYS_GPIO_PCI_INTB);
 
/* Setup GPIO's for 33MHz clock output */
-   *IXP425_GPIO_GPCLKR = 0x011001FF;
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_EXTBUS_CLK);
-   GPIO_OUTPUT_ENABLE (CONFIG_SYS_GPIO_PCI_CLK);
-
-   *IXP425_EXP_CS1 = 0xbd113c42;
+   writel(0x011001FF, IXP425_GPIO_GPCLKR);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_EXTBUS_CLK);
+   GPIO_OUTPUT_ENABLE(CONFIG_SYS_GPIO_PCI_CLK);
 
-   udelay (1);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
-   udelay (1);
-   GPIO_OUTPUT_CLEAR (CONFIG_SYS_GPIO_IORST);
-   udelay (1);
-   GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
+   udelay(1);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
+   udelay(1);
+   GPIO_OUTPUT_CLEAR(CONFIG_SYS_GPIO_IORST);
+   udelay(1);
+   GPIO_OUTPUT_SET(CONFIG_SYS_GPIO_IORST);
 
return 0;
 }
 
 /* Check Board Identity */
-int checkboard (void)
+int checkboard(void)
 {
-   puts ("Board: AcTux-4\n");
-   return (0);
+   puts("Board: AcTux-4\n");
+   return 0;
 }
 
-int dram_init (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 = get_ram_size(CONFIG_SYS_SDRAM_BASE, 128<<20);
+   return 0;
+}
 
-   return (0

[U-Boot] [IXP42x PATCH series v5 14/17] update/fix IXDP425 / IXDPG425 boards

2011-05-22 Thread Michael Schwingen
Signed-off-by: Michael Schwingen 
---
Changes for V3:
 - new in V3 (split from "update_fix some more IXP42x boards" in V2)
Changes for V4:
 - add changelog
Changes for V5:

 board/ixdp425/config.mk|2 -
 board/ixdp425/flash.c  |  427 
 board/ixdp425/ixdp425.c|  155 ++---
 boards.cfg |2 +-
 include/configs/ixdp425.h  |  196 ++---
 include/configs/ixdpg425.h |   11 +-
 6 files changed, 276 insertions(+), 517 deletions(-)
 delete mode 100644 board/ixdp425/config.mk
 delete mode 100644 board/ixdp425/flash.c

diff --git a/board/ixdp425/config.mk b/board/ixdp425/config.mk
deleted file mode 100644
index 509c894..000
--- a/board/ixdp425/config.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-#
-CONFIG_SYS_TEXT_BASE = 0x00f8
diff --git a/board/ixdp425/flash.c b/board/ixdp425/flash.c
deleted file mode 100644
index f1d9190..000
--- a/board/ixdp425/flash.c
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * (C) Copyright 2001
- * Kyle Harris, Nexus Technologies, Inc. khar...@nexus-tech.net
- *
- * (C) Copyright 2001
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * 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 
-#include 
-
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];   /* info for FLASH chips 
   */
-
-/* Board support for 1 or 2 flash devices */
-#undef FLASH_PORT_WIDTH32
-#define FLASH_PORT_WIDTH16
-
-#ifdef FLASH_PORT_WIDTH16
-#define FLASH_PORT_WIDTH   ushort
-#define FLASH_PORT_WIDTHV  vu_short
-#define SWAP(x)x
-#else
-#define FLASH_PORT_WIDTH   ulong
-#define FLASH_PORT_WIDTHV  vu_long
-#define SWAP(x)__swab32(x)
-#endif
-
-#define FPWFLASH_PORT_WIDTH
-#define FPWV   FLASH_PORT_WIDTHV
-
-#define mb()   __asm__ __volatile__ ("" : : : "memory")
-
-/*---
- * Functions
- */
-static ulong flash_get_size (FPW * addr, flash_info_t * info);
-static int write_data (flash_info_t * info, ulong dest, FPW data);
-static void flash_get_offsets (ulong base, flash_info_t * info);
-void inline spin_wheel (void);
-
-/*---
- */
-
-unsigned long flash_init (void)
-{
-   int i;
-   ulong size = 0;
-
-   for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) {
-   switch (i) {
-   case 0:
-   flash_get_size ((FPW *) PHYS_FLASH_1, &flash_info[i]);
-   flash_get_offsets (PHYS_FLASH_1, &flash_info[i]);
-   break;
-   default:
-   panic ("configured too many flash banks!\n");
-   break;
-   }
-   size += flash_info[i].size;
-   }
-
-   /* Protect monitor and environment sectors
-*/
-   flash_protect (FLAG_PROTECT_SET,
-  CONFIG_SYS_FLASH_BASE,
-  CONFIG_SYS_FLASH_BASE + _bss_start - _armboot_start,
-  &flash_info[0]);
-
-   flash_protect (FLAG_PROTECT_SET,
-  CONFIG_ENV_ADDR,
-  CONFIG_ENV_ADDR + CONFIG_ENV_SIZE - 1, &flash_info[0]);
-
-   return size;
-}
-
-/*---
- */
-static void flash_get_offsets (ulong base, flash_info_t * info)
-{
-   int i;
-
-   if (info->flash_id == FLASH_UNKNOWN) {
-   return;
-   }
-
-   if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
-   for (i = 0; i < info->sector_count; i++) {
-   info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
-   info->protect[i] = 0;
-   }
-   }
-}
-
-/*---
- */
-void flash_print_info (flash_info_t * info)
-{
-   int i;
-
-   if (info->flash_id == FLASH_UNKNOWN) {
-   printf ("missing or unknown FLASH type\n");
-   return;
-   }
-
-   s

Re: [U-Boot] [IXP42x PATCH series v5 06/17] support CONFIG_SYS_LDSCRIPT on ARM

2011-05-23 Thread Michael Schwingen
Am 05/23/2011 02:42 AM, schrieb Marek Vasut:
> On Monday, May 23, 2011 12:00:02 AM Michael Schwingen wrote:
>> Signed-off-by: Michael Schwingen 
>> ---
> Honestly, I don't really understand this one ... Wolfgang, is this one OK to 
> merge ?
The idea was to be able to define the LD_SCRIPT variable in the board
config file.

However, it seems that another patch in the toplevel config.mk added the
same functionality after I wrote this, so this patch can be dropped
completely.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] v2011.06-rc3 released

2011-06-22 Thread Michael Schwingen
Am 06/22/2011 02:19 PM, schrieb Wolfgang Denk:
> Hello everybody:
>
> * U-Boot v2011.06-rc3 was released on Wed, June 22, 2011
>
> * Release "v2011.06" is scheduled in 5 days - on June 27, 2011.
>
> Please help testing, and check if all your relevant patches have been
> included.
Hi,

I think the IXP42x patches are still missing.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] [ARM] Status for last 13 unclean-building ARM boards

2011-09-19 Thread Michael Schwingen
Am 09/17/2011 10:12 AM, schrieb Albert ARIBAUD:
> (board maintainers in CC:)
>
> Hi all,
>
> There remains 13 boards listed as having warnings or errors at this
> point in a ./MAKEALL arm:
>
> - SUMMARY 
> Boards compiled: 242
> Boards with warnings or errors: 13 ( omap3_beagle actux1_4_16
> actux1_8_16 actux1_4_32 actux1_8_32 actux2 actux3 actux4 dvlhost
> ixdp425 ixdpg425 pdnb3 scpu )
> --
>
> Of these,
>
> 1. omap3_beagle has a 'simple' warning "beagle.c:532: warning:
> initialization from incompatible pointer type". Dirk, can you look
> into it?
>
> 2. ixdp425 is marked "orphaned". Stefan, I am wild-guessing that
> ixdp425 might be acquainted to the ixdpg425 that you maintain. Do you
> want to take ixdp425? If not, we should drop it.
I do have one of these @work, but rarely take it out of the closet. I
can run tests if required. but I am not sure if it is worth the effort
to keep it.

OTOH, ixdgp425 seems to be an almost exact clone of the ixdp425, with
different PCB layout, so ditching one and keeping the other makes not
much sense IMHO.

>
> 3. All others have the same issue, namely "arm-linux-ld: stubs.o:
> compiled for a big endian system and target is little endian". Seems
> for this one, I am not using the right toolchain or at least the right
> libs. Can one of the maintainers let me know how exactly they build
> their boards?
Just tried actux3 - I get only this one warning:

/usr/local/pkg/x-tools/armeb-unknown-linux-gnu/bin/.armeb-unknown-linux-gnu-ld:
warning: creating a DT_TEXTREL in object.

AFAIK, that one has been there since relocation was added.

I compile using
> export
CROSS_COMPILE=/opt/x-tools/armeb-unknown-linux-gnu/bin/armeb-unknown-linux-gnu-
> make

/opt/x-tools/armeb-unknown-linux-gnu/bin/armeb-unknown-linux-gnu-gcc -v
shows
Configured with:
/export/cgcc/b-arm-linux-gcc/targets/src/gcc-4.3.4/configure
--build=i486-build_pc-linux-gnu --host=i486-build_pc-linux-gnu
--target=armeb-unknown-linux-gnu
--prefix=/opt/x-tools/armeb-unknown-linux-gnu
--with-sysroot=/opt/x-tools/armeb-unknown-linux-gnu/armeb-unknown-linux-gnu//sys-root
--enable-languages=c,c++ --disable-multilib --with-arch=armv5te
--with-cpu=xscale --with-tune=xscale --with-float=soft
--with-pkgversion=crosstool-NG-hg_default@1471_4a88cb9bfe8f
--enable-__cxa_atexit --with-gmp=/opt/x-tools/armeb-unknown-linux-gnu
--with-mpfr=/opt/x-tools/armeb-unknown-linux-gnu
--with-local-prefix=/opt/x-tools/armeb-unknown-linux-gnu/armeb-unknown-linux-gnu//sys-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
Thread model: posix
gcc version 4.3.4 (crosstool-NG-hg_default@1471_4a88cb9bfe8f)

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] [ARM] Status for last 13 unclean-building ARM boards

2011-09-20 Thread Michael Schwingen
Am 09/20/2011 10:44 PM, schrieb Albert ARIBAUD:
> Just tried actux3 - I get only this one warning:
>>
>> /usr/local/pkg/x-tools/armeb-unknown-linux-gnu/bin/.armeb-unknown-linux-gnu-ld:
>>
>> warning: creating a DT_TEXTREL in object.
>>
>> AFAIK, that one has been there since relocation was added.
>>
>> I compile using
>>> export
>> CROSS_COMPILE=/opt/x-tools/armeb-unknown-linux-gnu/bin/armeb-unknown-linux-gnu-
>>
>>> make
>>
>> /opt/x-tools/armeb-unknown-linux-gnu/bin/armeb-unknown-linux-gnu-gcc -v
>
> Microcross X tools -- no free version apparently...
>
>> gcc version 4.3.4 (crosstool-NG-hg_default@1471_4a88cb9bfe8f)
>
> ... but it seems like it is a standard crosstool ng build. Guess I'll
> have to build my own if I want to be able to .MAKEALL these boards...
> Thanks for the info.
Um - no. These compilers were built from scratch using crosstools-ng - I
am not sure where the x-tools directory name came from, but this is
definitely a local build from free sources, not some closed binary.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Fixing IXP42x boards - some general questions

2010-12-23 Thread Michael Schwingen
Hi,

I am in the process of fixing the actux-* boards, which were broken by
the introduction of ARM relocation.

However, it seems the IPX platform is broken beyond those problems
introduced by relocation support, so I have some general questions on
how things are supposed to work. I have a working set of patches for
actux-3, but I want to make sure I use the right approach before fixing
the other boards and submitting patches.

Startup code. Is the following correct?
 - code starts from flash, with TEXT_BASE = start of flash, ie. the code
is linked to flash addresses.
 - DATA/BSS are behind the text segment in flash, so the code may not
write RAM variables until relocation
 - code in flash sets up RAM, copies + relocates u-boot to RAM, and
continues there

Timer system.
 - For IXP, there are two variants of the timer system - one using
interrupts, and one without interrupts. Both do not work currently.
I have patches that fix the non-interrupt version, changing
CONFIG_SYS_HZ from  to 1000, bringing it in line with what most
other ARM platforms do.
What is the preferred way of handling timers? Should CONFIG_SYS_HZ be
1000 or rather the timer clock?
What about interrupts? Use them or avoid them?

What about the Intel reference board (IXDP425)? Previously, I used that
one as a reference on how things should be done, but it looks broken, too.
I can prepare patches for IXDP425, but I can't currently test them (we
should have one at work, but that might take some time).

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Fixing IXP42x boards - some general questions

2010-12-23 Thread Michael Schwingen
Am 12/23/2010 11:20 AM, schrieb Albert ARIBAUD:
> Hi Michael,
>
> Answering as the brand new ARM custodian :) :
>
> Le 23/12/2010 10:33, Michael Schwingen a écrit :
>
>> Startup code. Is the following correct?
>>   - code starts from flash, with TEXT_BASE = start of flash, ie. the code
>> is linked to flash addresses.
> Correct.  The goal of ELF relocation is to allow moving the code from 
> FLASH to any place in RAM (actually the highest possible location) by 
> correctly relocating it without developers having to fix or code 
> anything manually.
Thanks. That means the code in the IXP startup code that copies flash to
RAM (before calling board_init_f, and long before relocation code does a
second copy) is really not needed, and can be removed if the branch to
the reset code is replaced by an absolute jump to the real
(not-aliased-to zero) flash location.


>>   - DATA/BSS are behind the text segment in flash, so the code may not
>> write RAM variables until relocation
> Actually in FLASH there is no BSS at all -- you cannot use BSS until 
> after relocation (this was already a constraint in u-boot, even though 
> before ELF relocation ARM architecture did not make it impossible.
I am asking because there *was* code in print_cpuinfo which writes
global variables, and which is called before relocation.
So that is definitely broken (and easy to fix).


> Correct. Rule of thumb is init_board_f() runs in Flash, and
> init_board_r() runs in RAM.
Fine. It seems some initialization order was changed - I had to
introduce a board_init_early_f function and move the localbus chip
select set-up there.

>> Timer system.
>>   - For IXP, there are two variants of the timer system - one using
>> interrupts, and one without interrupts. Both do not work currently.
>> I have patches that fix the non-interrupt version, changing
>> CONFIG_SYS_HZ from  to 1000, bringing it in line with what most
>> other ARM platforms do.
>> What is the preferred way of handling timers? Should CONFIG_SYS_HZ be
>> 1000 or rather the timer clock?
>> What about interrupts? Use them or avoid them?
> I say in any case don't use them before running from RAM; and if you can 
> avoid them in u-boot without incurring a huge performance penalty, I 
> would suggest avoiding them altogether.
Fine with me. I got the non-interrupt code running, and will simply
leave the (broken) interrupt code as is if that is OK.

cu
Michael


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Fixing IXP42x boards - some general questions

2010-12-23 Thread Michael Schwingen
Am 12/23/2010 12:28 PM, schrieb Albert ARIBAUD:
>> Thanks. That means the code in the IXP startup code that copies flash to
>> RAM (before calling board_init_f, and long before relocation code does a
>> second copy) is really not needed, and can be removed if the branch to
>> the reset code is replaced by an absolute jump to the real
>> (not-aliased-to zero) flash location.
> As for the additional copy, yes, it is uneeded -- look at some 
> ARM-based archs or boards which support ELF relocation (such as arm926ejs).
>
> As for the jump, 'b' instruction is relative, and there is no need to 
> make an absolute jump -- unless you boot in a weird mode where FLASH 
> mirrors all over the memory space (and over RAM) and you need to jump to 
> the 'real', not 'mirrored', FLASH?
This is the case on IXP: the boot flash is located at 0x5000 on the
expansion bus.
At reset, the flash is mirrored to 0x, and the code starts
there. Later, the startup code removes that mirror so that the SDRAM is
at 0x.

Currently, this works because the code copies u-boot from flash to
0x before disabling the mirror. However, a simple jump to
0x5000 + offset works just as well (and is easier, because debug
symbols match execution).


 What about interrupts? Use them or avoid them?
>>> I say in any case don't use them before running from RAM; and if you can
>>> avoid them in u-boot without incurring a huge performance penalty, I
>>> would suggest avoiding them altogether.
>> Fine with me. I got the non-interrupt code running, and will simply
>> leave the (broken) interrupt code as is if that is OK.
> Maybe it would be better to remove it. If someone really feels the need 
> to revive it, they can copy back it from a previous commit where it 
> still exists.
Fine with me. I don't really see why interrupts should be needed inside
u-boot on IXP425.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Fixing IXP42x boards - some general questions

2010-12-23 Thread Michael Schwingen
Am 12/23/2010 11:10 AM, schrieb Wolfgang Denk:
>
>> Timer system.
>>  - For IXP, there are two variants of the timer system - one using
>> interrupts, and one without interrupts. Both do not work currently.
>> I have patches that fix the non-interrupt version, changing
>> CONFIG_SYS_HZ from  to 1000, bringing it in line with what most
>> other ARM platforms do.
> I cannot nomment on this.  Marek?
>
>> What is the preferred way of handling timers? Should CONFIG_SYS_HZ be
>> 1000 or rather the timer clock?
> CONFIG_SYS_HZ must always be defiend as 1000.
Thanks - no problem for IXP42x.

There are a few non-IXP42x boards that have different values:

include/configs/lart.h:110:#defineCONFIG_SYS_HZ   
3686400/* incrementer freq: 3.6864 MHz */
include/configs/dvlhost.h:91:#define CONFIG_SYS_HZ333
include/configs/impa7.h:112:#defineCONFIG_SYS_HZ2000   
/* decrementer freq: 2 kHz */
include/configs/SMN42.h:143:#defineCONFIG_SYS_HZ2048   
/* decrementer freq in Hz */
include/configs/colibri_pxa270.h:141:#defineCONFIG_SYS_HZ   
325/* Timer @ 325 Hz */
include/configs/lpc2292sodimm.h:110:#defineCONFIG_SYS_HZ   
2048/* decrementer freq in Hz */
include/configs/mx1fs2.h:80:#define CONFIG_SYS_HZ3686400   
 /* incrementer freq: 3.6864 MHz */
include/configs/scb9328.h:87:#define CONFIG_SYS_HZ3686400   
 /* incrementer freq: 3.6864 MHz */
include/configs/mx1ads.h:134:#define CONFIG_SYS_HZ3686400
include/configs/modnet50.h:116:#defineCONFIG_SYS_HZ   
900/* decrementer freq: 2 kHz */
include/configs/armadillo.h:111:#defineCONFIG_SYS_HZ   
2000/* decrementer freq: 2 kHz */
include/configs/assabet.h:113:#define CONFIG_SYS_HZ   
3686400/* incrementer freq: 3.6864 MHz */
include/configs/lpd7a404-10.h:37:#define CONFIG_SYS_HZ(508469)
include/configs/palmtc.h:132:#defineCONFIG_SYS_HZ   
3686400/* Timer @ 3686400 Hz */
include/configs/idmr.h:148:#define CONFIG_SYS_HZ(5000 / 64)
include/configs/KAREF.h:303:#define CONFIG_SYS_HZ  100   
 /* decr freq: 1 ms ticks*/
include/configs/gcplus.h:125:#defineCONFIG_SYS_HZ   
3686400/* incrementer freq: 3.6864 MHz */
include/configs/ep7312.h:113:#defineCONFIG_SYS_HZ2000   
/* decrementer freq: 2 kHz */
include/configs/lpd7a400-10.h:37:#define CONFIG_SYS_HZ(508469)
include/configs/shannon.h:111:#defineCONFIG_SYS_HZ   
3686400/* incrementer freq: 3.6864 MHz */
include/configs/METROBOX.h:368:#define CONFIG_SYS_HZ  100   
 /* decr freq: 1 ms ticks*/
include/configs/palmld.h:131:#defineCONFIG_SYS_HZ   
325/* Timer @ 325 Hz */
include/configs/dnp1110.h:116:#defineCONFIG_SYS_HZ   
3686400/* incrementer freq: 3.6864 MHz */
include/configs/zipitz2.h:152:#defineCONFIG_SYS_HZ   
325/* Timer @ 325 Hz */
include/configs/balloon3.h:103:#defineCONFIG_SYS_HZ   
325/* Timer @ 325 Hz */
include/configs/VCMA9.h:179:#defineCONFIG_SYS_HZ1562500


>
>> What about the Intel reference board (IXDP425)? Previously, I used that
>> one as a reference on how things should be done, but it looks broken, too.
>> I can prepare patches for IXDP425, but I can't currently test them (we
>> should have one at work, but that might take some time).
> I cannot help with that either.  Marek?
If noone else steps up and the board would be removed from u-boot, you
can list me as maintainer, but I can't test too often.

cu
Michael


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Fixing IXP42x boards - some general questions

2010-12-23 Thread Michael Schwingen
On Thu, Dec 23, 2010 at 11:55:01AM +0100, Marek Vasut wrote:
> On Thursday 23 December 2010 11:10:37 Wolfgang Denk wrote:
> > 
> > > Timer system.
> > > 
> > >  - For IXP, there are two variants of the timer system - one using
> > > 
> > > interrupts, and one without interrupts. Both do not work currently.
> > > I have patches that fix the non-interrupt version, changing
> > > CONFIG_SYS_HZ from  to 1000, bringing it in line with what most
> > > other ARM platforms do.
> > 
> > I cannot nomment on this.  Marek?
> 
> http://download.intel.com/design/network/manuals/25248006.pdf page 411 or so.
> 
> What's the second variant ? Either way -- you should use the non-interrupt 
> version. Remember, you're writing a bootloader, use the KISS principle ; you 
> generally use the timer only to implement *delay() functions.
> 
> Therefore, as Wolfgang said, you use 1000 ticks per second in uboot's 
> internal 
> counting, but "convert" it from/to your real timer's ticks in timer.c
> 
> What problem do you have there? Also, can you please let us see the patches?

I don't have any problems - I just want to know what the preferred way is in
doing this, before I spend time touching multiple boards.

Patch for the timer part is attached - note that this is work-in-progress
and probably needs some cleanup before submission.

cu
Michael



diff --git a/arch/arm/cpu/ixp/timer.c b/arch/arm/cpu/ixp/timer.c
index edf341f..9715eab 100644
--- a/arch/arm/cpu/ixp/timer.c
+++ b/arch/arm/cpu/ixp/timer.c
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2010
+ * Michael Schwingen, mich...@schwingen.org
+ *
  * (C) Copyright 2006
  * Stefan Roese, DENX Software Engineering, s...@denx.de.
  *
@@ -31,11 +34,11 @@
 
 #include 
 #include 
+#include 
 
 #ifdef CONFIG_TIMER_IRQ
 
-#define FREQ   
-#define CLOCK_TICK_RATE(((FREQ / CONFIG_SYS_HZ & 
~IXP425_OST_RELOAD_MASK) + 1) * CONFIG_SYS_HZ)
+#define CLOCK_TICK_RATE(((CONFIG_IXP425_TIMER_CLK / CONFIG_SYS_HZ & 
~IXP425_OST_RELOAD_MASK) + 1) * CONFIG_SYS_HZ)
 #define LATCH  ((CLOCK_TICK_RATE + CONFIG_SYS_HZ/2) / CONFIG_SYS_HZ)   
/* For divider */
 
 /*
@@ -79,57 +82,98 @@ int timer_init (void)
 
return 0;
 }
-#else
-ulong get_timer (ulong base)
+
+#else /* not CONFIG_TIMER_IRQ */
+
+/*
+ * The IXP42x time-stamp timer runs at 2*OSC_IN (66.666MHz when using a
+ * 33.333MHz crystal).
+ */
+static inline unsigned long long tick_to_time(unsigned long long tick)
 {
-   return get_timer_masked () - base;
+   tick *= CONFIG_SYS_HZ;
+   do_div(tick, CONFIG_IXP425_TIMER_CLK);
+   return tick;
 }
 
-void ixp425_udelay(unsigned long usec)
+static inline unsigned long long time_to_tick(unsigned long long time)
 {
-   /*
-* This function has a max usec, but since it is called from udelay
-* we should not have to worry... be happy
-*/
-   unsigned long usecs = CONFIG_SYS_HZ/100L & ~IXP425_OST_RELOAD_MASK;
+   time *= CONFIG_IXP425_TIMER_CLK;
+   do_div(time, CONFIG_SYS_HZ);
+   return time;
+}
 
-   *IXP425_OSST = IXP425_OSST_TIMER_1_PEND;
-   usecs |= IXP425_OST_ONE_SHOT | IXP425_OST_ENABLE;
-   *IXP425_OSRT1 = usecs;
-   while (!(*IXP425_OSST & IXP425_OSST_TIMER_1_PEND));
+static inline unsigned long long us_to_tick(unsigned long long us)
+{
+   us = us * CONFIG_IXP425_TIMER_CLK + 99;
+   do_div(us, 100);
+   return us;
 }
 
-void __udelay (unsigned long usec)
+static ulong timestamp;
+static ulong lastinc;
+
+unsigned long long get_ticks (void)
 {
-   while (usec--) ixp425_udelay(1);
+   ulong now = *IXP425_OSTS_B;
+
+   if (*IXP425_OSST & IXP425_OSST_TIMER_TS_PEND) {
+   /* rollover of timestamp timer register */
+   timestamp += (0x - lastinc) + now + 1;
+   *IXP425_OSST = IXP425_OSST_TIMER_TS_PEND;
+   }
+   else {
+   /* move stamp forward with absolut diff ticks */
+   timestamp += (now - lastinc);
+   }
+   lastinc = now;
+   return timestamp;
 }
 
-static ulong reload_constant = 0xfff0;
 
 void reset_timer_masked (void)
 {
-   ulong reload = reload_constant | IXP425_OST_ONE_SHOT | 
IXP425_OST_ENABLE;
+   /* reset time */
+   lastinc = *IXP425_OSTS_B; /* capture current timestamp counter */
+   timestamp = 0;  /* start "advancing" time stamp from 0 */
+}
 
-   *IXP425_OSST = IXP425_OSST_TIMER_1_PEND;
-   *IXP425_OSRT1 = reload;
+void reset_timer(void)
+{
+   reset_timer_masked();
 }
 
 ulong get_timer_masked (void)
 {
-   /*
-* Note that it is possible for this to wrap!
-* In this case we return max.
-*/
-   ulong current = *IXP425_OST1;
-   if (*IXP425_OSST & IXP425_OSST_TIMER_1_PEND)

Re: [U-Boot] Fixing IXP42x boards - some general questions

2010-12-23 Thread Michael Schwingen
Am 12/23/2010 12:28 PM, schrieb Albert ARIBAUD:
>
>
 What about interrupts? Use them or avoid them?
>>> I say in any case don't use them before running from RAM; and if you can
>>> avoid them in u-boot without incurring a huge performance penalty, I
>>> would suggest avoiding them altogether.
>> Fine with me. I got the non-interrupt code running, and will simply
>> leave the (broken) interrupt code as is if that is OK.
> Maybe it would be better to remove it. If someone really feels the need 
> to revive it, they can copy back it from a previous commit where it 
> still exists.
OK. It seems the interrupt code is more broken than I thought - the
udelay implementation relies on a variable that is set *before*
relocation - in BSS.

Rather than trying to fix this, I will remove the broken parts.

I'll do some more cleanup next week, test all boards I have here, and
post patches for review.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Fixing IXP42x boards - some general questions

2010-12-23 Thread Michael Schwingen
Am 12/23/2010 07:47 PM, schrieb Albert ARIBAUD:
> Le 23/12/2010 19:25, Michael Schwingen a écrit :
>
>> OK. It seems the interrupt code is more broken than I thought - the
>> udelay implementation relies on a variable that is set *before*
>> relocation - in BSS.
> And the non-interrupt code does not?
No. After the rewrite, the code does delay-to-timer-tic conversion and
uses the timebase counter in the IXP (which always counts up, with a
fixed rate, and has an overflow flag) to do the timing.

cu
Michael


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] IXP42x patch series

2010-12-28 Thread Michael Schwingen
Hi,

here is my IXP42x patch series, which brings my IXP boards back to life
after relocation was added.

Some comments:

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] update/fix AcTux1 board
[PATCH 07/13] update/fix AcTux2 board
[PATCH 08/13] update/fix AcTux3 board
[PATCH 09/13] update/fix AcTux4 board

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

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

Add support for -ffunction-sections / --gc-sections. This cuts the size of
u-boot.bin from 288548 bytes down to 226820 bytes on AcTux-3, probably in
part due to unused code in the Intel NPE library.  I found no way to
implement this in board-specific parts, so I added a global option to enable
this:
[PATCH 12/13] add support for function-sections

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 13/13] add support for fixed-speed MII ports (no standard PHY registers)

cu
Michael
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 11/13] add dvlhost (dLAN 200 AV Wireless G) board

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 MAINTAINERS|1 +
 board/dvlhost/Makefile |   50 +
 board/dvlhost/config.mk|5 +
 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, 596 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

diff --git a/MAINTAINERS b/MAINTAINERS
index 5fc3de1..7b1c707 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -795,6 +795,7 @@ Michael Schwingen 
actux2  xscale/ixp
actux3  xscale/ixp
actux4  xscale/ixp
+   dvlhost xscale/ixp
 
 Andrea Scian 
 
diff --git a/board/dvlhost/Makefile b/board/dvlhost/Makefile
new file mode 100644
index 000..af9a644
--- /dev/null
+++ b/board/dvlhost/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := dvlhost.o watchdog.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/dvlhost/config.mk b/board/dvlhost/config.mk
new file mode 100644
index 000..6b249bb
--- /dev/null
+++ b/board/dvlhost/config.mk
@@ -0,0 +1,5 @@
+# include NPE ethernet driver
+BOARDLIBS = cpu/ixp/npe/libnpe.a
+
+LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+
diff --git a/board/dvlhost/dvlhost.c b/board/dvlhost/dvlhost.c
new file mode 100644
index 000..33a74a4
--- /dev/null
+++ b/board/dvlhost/dvlhost.c
@@ -0,0 +1,118 @@
+/*
+ * (C) Copyright 2009
+ * Michael Schwingen, mich...@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 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "dvlhost_hw.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f (void)
+{
+   /* CS1: LED Latch */
+   *IXP425_EXP_CS1 = 0xBFFF0002;
+   return 0;
+}
+
+int board_init (void)
+{
+   gd->bd->bi_arch_number = MACH_TYPE_DVLHOST;
+
+   /* adress of boot parameters */
+   gd->bd->bi_boot_params = 0x0100;
+
+   /* 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 enabl

[U-Boot] [PATCH 02/13] add support for IXP42x Rev. B1 and newer

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 arch/arm/cpu/ixp/npe/npe.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 2e68689..9d1090e 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -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) ==
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 12/13] add support for function-sections

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 config.mk|6 ++
 include/configs/actux1.h |1 +
 include/configs/actux2.h |1 +
 include/configs/actux3.h |1 +
 include/configs/actux4.h |1 +
 5 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index 66f8fe6..f7c7760 100644
--- a/config.mk
+++ b/config.mk
@@ -152,6 +152,9 @@ endif
 RELFLAGS= $(PLATFORM_RELFLAGS)
 DBGFLAGS= -g # -DDEBUG
 OPTFLAGS= -Os #-fomit-frame-pointer
+ifeq ($(CONFIG_USE_FUNCTION_SECTIONS),y)
+OPTFLAGS += -ffunction-sections
+endif
 ifndef LDSCRIPT
 #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
 ifeq ($(CONFIG_NAND_U_BOOT),y)
@@ -205,6 +208,9 @@ endif
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
 LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
+ifeq ($(CONFIG_USE_FUNCTION_SECTIONS),y)
+LDFLAGS += --gc-sections
+endif
 ifneq ($(CONFIG_SYS_TEXT_BASE),)
 LDFLAGS += -Ttext $(CONFIG_SYS_TEXT_BASE)
 endif
diff --git a/include/configs/actux1.h b/include/configs/actux1.h
index 2ffedf1..e4f7358 100644
--- a/include/configs/actux1.h
+++ b/include/configs/actux1.h
@@ -28,6 +28,7 @@
 
 #define CONFIG_IXP425  1
 #define CONFIG_ACTUX1  1
+#define CONFIG_USE_FUNCTION_SECTIONS1
 
 #define CONFIG_DISPLAY_CPUINFO 1
 #define CONFIG_DISPLAY_BOARDINFO   1
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index 4ba3ce0..bef5bc0 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -28,6 +28,7 @@
 
 #define CONFIG_IXP425  1
 #define CONFIG_ACTUX2  1
+#define CONFIG_USE_FUNCTION_SECTIONS1
 
 #define CONFIG_DISPLAY_CPUINFO 1
 #define CONFIG_DISPLAY_BOARDINFO   1
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index 4b9b496..33d2db1 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -28,6 +28,7 @@
 
 #define CONFIG_IXP425  1
 #define CONFIG_ACTUX3  1
+#define CONFIG_USE_FUNCTION_SECTIONS1
 
 #define CONFIG_DISPLAY_CPUINFO 1
 #define CONFIG_DISPLAY_BOARDINFO   1
diff --git a/include/configs/actux4.h b/include/configs/actux4.h
index ac7d1ba..ed68302 100644
--- a/include/configs/actux4.h
+++ b/include/configs/actux4.h
@@ -28,6 +28,7 @@
 
 #define CONFIG_IXP425  1
 #define CONFIG_ACTUX4  1
+#define CONFIG_USE_FUNCTION_SECTIONS1
 
 #define CONFIG_DISPLAY_CPUINFO 1
 #define CONFIG_DISPLAY_BOARDINFO   1
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 09/13] update/fix AcTux4 board

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 board/actux4/actux4.c|   12 +++-
 board/actux4/config.mk   |4 
 include/configs/actux4.h |   22 +-
 3 files changed, 24 insertions(+), 14 deletions(-)
 delete mode 100644 board/actux4/config.mk

diff --git a/board/actux4/actux4.c b/board/actux4/actux4.c
index f373b58..f66acd8 100644
--- a/board/actux4/actux4.c
+++ b/board/actux4/actux4.c
@@ -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 (1);
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
udelay (1);
@@ -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);
 }
 
diff --git a/board/actux4/config.mk b/board/actux4/config.mk
deleted file mode 100644
index 9cb838b..000
--- a/board/actux4/config.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
diff --git a/include/configs/actux4.h b/include/configs/actux4.h
index 04145c3..ac7d1ba 100644
--- a/include/configs/actux4.h
+++ b/include/configs/actux4.h
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE115200
 #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   0x0040
 #define CONFIG_SYS_MEMTEST_END 0x0080
 
-/* spec says 66.666 MHz, but it appears to be 33 */
-#define CONFIG_SYS_HZ  333
+/* timer clock - 2* OSC_IN system clock */
+#define CONFIG_IXP425_TIMER_CLK 6600
+#define CONFIG_SYS_HZ  1000
 
 /* default load address */
 #define CONFIG_SYS_LOAD_ADDR   0x0001
@@ -109,7 +110,7 @@
 /* SDRAM settings */
 #define CONFIG_NR_DRAM_BANKS   1
 #define PHYS_SDRAM_1   0x
-#define CONFIG_SYS_DRAM_BASE   0x
+#define CONFIG_SYS_SDRAM_BASE  0x
 
 /* 32MB SDRAM */
 #define CONFIG_SYS_SDR_CONFIG  0x18
@@ -119,6 +120,7 @@
 #define CONFIG_SYS_DRAM_SIZE   0x0200
 
 /* FLASH organization */
+#define CONFIG_SYS_TEXT_BASE   0x5000
 #define CONFIG_SYS_MAX_FLASH_BANKS 2
 /* max # of sectors per chip */
 #define CONFIG_SYS_MAX_FLASH_SECT  70
@@ -153,6 +155,7 @@
 #defineCONFIG_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=5102\0" \
+   "kernelfile=actux4/uImage\0"\
+   "rootfile=actux4/rootfs\0"  \
"rootaddr=5116\0"   \
"loadaddr=1\0"  \
"updateboot_ser=mw.b 1 ff 4;"   \
" loady ${loadaddr};"   \
" run eraseboot writeboot\0"\
"updateboot_net=mw.b 1 ff 4;"   \
-   " tftp ${loadaddr} u-boot.bin;" \
+   " tftp ${loadaddr} actux4/u-boot.bin;"  
\
" run eraseboot writeboot\0"\
"eraseboot=protect off 5000 5003efff;"  \
" erase 5000 +${filesize}\0"

[U-Boot] [PATCH 05/13] fix "depend" target in npe directory

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 arch/arm/cpu/ixp/npe/Makefile |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/Makefile b/arch/arm/cpu/ixp/npe/Makefile
index c756a1d..14ab3c7 100644
--- a/arch/arm/cpu/ixp/npe/Makefile
+++ b/arch/arm/cpu/ixp/npe/Makefile
@@ -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 \
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 10/13] update/fix some more IXP42x boards (only compile tested)

2010-12-28 Thread Michael Schwingen

Signed-off-by: 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(-)

diff --git a/board/ixdp425/config.mk b/board/ixdp425/config.mk
index 509c894..5d6f708 100644
--- a/board/ixdp425/config.mk
+++ b/board/ixdp425/config.mk
@@ -1,2 +1,3 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x00f8
+CONFIG_SYS_TEXT_BASE = 0x5000
+
diff --git a/board/prodrive/pdnb3/config.mk b/board/prodrive/pdnb3/config.mk
index 817541f..b5e6a4e 100644
--- a/board/prodrive/pdnb3/config.mk
+++ b/board/prodrive/pdnb3/config.mk
@@ -1,2 +1,2 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x01f0
+CONFIG_SYS_TEXT_BASE = 0x5000
diff --git a/boards.cfg b/boards.cfg
index 695baca..b0fc38a 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -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
diff --git a/include/configs/ixdp425.h b/include/configs/ixdp425.h
index 28d41e2..81288b7 100644
--- a/include/configs/ixdp425.h
+++ b/include/configs/ixdp425.h
@@ -105,8 +105,10 @@
 
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
-#define CONFIG_SYS_HZ  333 /* 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 
+#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   0x2 /* size of one complete sector  */
-#define CONFIG_ENV_ADDR(PHYS_FLASH_1 + 0x2)
+#define CONFIG_ENV_ADDR(PHYS_FLASH_1 + 0x4)
 #defineCONFIG_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 */
diff --git a/include/configs/ixdpg425.h b/include/configs/ixdpg425.h
index 637fd7d..60a2371 100644
--- a/include/configs/ixdpg425.h
+++ b/include/configs/ixdpg425.h
@@ -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 0x0080  /* 4 ... 8 MB in DRAM   
*/
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
+#define CONFIG_IXP425_TIMER_CLK
 #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 */
diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h
index 33fa6ee..9acb018 100644
--- a/include/configs/pdnb3.h
+++ b/include/configs/pdnb3.h
@@ -117,6 +117,7 @@
 #define CONFIG_SYS_MEMTEST_END 0x0080  /* 4 ... 8 MB in DRAM   
*/
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
+#define CONFIG_IXP425_TIMER_CLK
 #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

[U-Boot] [PATCH 08/13] update/fix AcTux3 board

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 board/actux3/actux3.c|   27 +++
 board/actux3/config.mk   |2 --
 board/actux3/u-boot.lds  |   45 -
 include/configs/actux3.h |   23 +--
 4 files changed, 60 insertions(+), 37 deletions(-)

diff --git a/board/actux3/actux3.c b/board/actux3/actux3.c
index 63bf365..8875148 100644
--- a/board/actux3/actux3.c
+++ b/board/actux3/actux3.c
@@ -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 = 0x8093;
+   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 = 0x8093;
-
+   /* 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);
 }
 
diff --git a/board/actux3/config.mk b/board/actux3/config.mk
index 88634f7..b98b909 100644
--- a/board/actux3/config.mk
+++ b/board/actux3/config.mk
@@ -1,5 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
 # include NPE ethernet driver
 BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
 
diff --git a/board/actux3/u-boot.lds b/board/actux3/u-boot.lds
index 497ab97..d2176ad 100644
--- a/board/actux3/u-boot.lds
+++ b/board/actux3/u-boot.lds
@@ -30,34 +30,29 @@ SECTIONS
 
. = ALIGN (4);
.text : {
-   arch/arm/cpu/ixp/start.o (.text)
-   lib/string.o (.text)
-   lib/vsprintf.o (.text)
-   arch/arm/lib/board.o (.text)
-   common/dlmalloc.o (.text)
-   arch/arm/cpu/ixp/cpu.o (.text)
+   arch/arm/cpu/ixp/start.o(.text*)
+   net/libnet.o(.text*)
+   board/actux3/libactux3.o(.text*)
+   arch/arm/cpu/ixp/libixp.o(.text*)
+   drivers/serial/libserial.o(.text*)
 
. = env_offset;
-   common/env_embedded.o (.ppcenv)
-
-   * (.text)
+   common/env_embedded.o(.ppcenv)
+   *(.text*)
}
 
. = ALIGN (4);
.rodata : {
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
}
-
. = ALIGN (4);
.data : {
-   *(.data)
+   *(.data*)
}
-
. = ALIGN (4);
.got : {
*(.got)
}
-
. =.;
__u_boot_cmd_start =.;
.u_boot_cmd : {
@@ -66,10 +61,26 @@ SECTIONS
__u_boot_cmd_end =.;
 
. = ALIGN (4);
-   __bss_start =.;
-   .bss (NOLOAD): {
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   }
+
+   .dynsym : {
+   __dynsym_start = .;
+   *(.dynsym)
+   }
+
+   .bss __rel_dyn_start (OVERLAY) : {
+   __bss_start = .;
*(.bss)
-   . = ALIGN(4);
+. = ALIGN(4);
+   _end = .;
}
-   _end =.;
+   /DISCARD/ : { *(.dynstr*) }
+   /DISCARD/ : { *(.dynamic*) }
+   /DISCARD/ : { *(.plt*) }
+   /DISCARD/ : { *(.interp*) }
+   /DISCARD/ : { *(.gnu*) }
 }
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index ad9173f..4b9b496 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE115200
 #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   0x0040
 #define CONFIG_SYS_MEMTEST_END 

[U-Boot] [PATCH 04/13] Fix IXP code to work after relocation was added: - jump to real flash location after reset before turning off flash mirror - fix timer system to use HZ == 1000, remove broken in

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 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(-)

diff --git a/arch/arm/cpu/ixp/cpu.c b/arch/arm/cpu/ixp/cpu.c
index ce275e5..942845d 100644
--- a/arch/arm/cpu/ixp/cpu.c
+++ b/arch/arm/cpu/ixp/cpu.c
@@ -36,8 +36,6 @@
 #include 
 #include 
 
-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 & 0x03f0) >> 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;
}
diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S
index 9f8c15b..2c49aa4 100644
--- a/arch/arm/cpu/ixp/start.S
+++ b/arch/arm/cpu/ixp/start.S
@@ -65,7 +65,8 @@
.endm
 
 .globl _start
-_start: b  reset
+_start:
+   ldr pc, _reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
@@ -74,6 +75,7 @@ _start: b reset
ldr pc, _irq
ldr pc, _fiq
 
+_reset: .word reset
 _undefined_instruction: .word undefined_instruction
 _software_interrupt:   .word software_interrupt
 _prefetch_abort:   .word prefetch_abort
@@ -163,12 +165,6 @@ reset:
str r1, [r2]
 
/* make sure flash is visible at 0 */
-#if 0
-   ldr r2, =IXP425_EXP_CFG0
-   ldr r1, [r2]
-   orr r1, r1, #0x8000
-   str r1, [r2]
-#endif
mov r1, #CONFIG_SYS_SDR_CONFIG
ldr r2, =IXP425_SDR_CONFIG
str r1, [r2]
@@ -212,19 +208,6 @@ reset:
str r1, [r4]
DELAY_FOR 0x4000, r0
 
-   /* copy */
-   mov r0, #0
-   mov r4, r0
-   add r2, r0, #CONFIG_SYS_MONITOR_LEN
-   mov r1, #0x1000
-   mov r5, r1
-
-30:
-   ldr r3, [r0], #4
-   str r3, [r1], #4
-   cmp r0, r2
-   bne 30b
-
/* invalidate I & D caches & BTB */
mcr p15, 0, r0, c7, c7, 0
CPWAIT  r0
@@ -237,19 +220,12 @@ reset:
mcr p15, 0, r0, c7, c10, 4
CPWAIT  r0
 
-   /* move flash to 0x5000 */
+   /* remove flash mirror at 0x */
ldr r2, =IXP425_EXP_CFG0
ldr r1, [r2]
bic r1, r1, #0x8000
str r1, [r2]
 
-   nop
-   nop
-   nop
-   nop
-   nop
-   nop
-
/* invalidate I & Data TLB */
mcr p15, 0, r0, c8, c7, 0
CPWAIT r0
@@ -265,7 +241,7 @@ reset:
orr r0,r0,#0x13
msr cpsr,r0
 
-/* Set stackpointer in internal RAM to call board_init_f */
+/* Set initial stackpointer in SDRAM to call board_init_f */
 call_board_init_f:
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
@@ -578,28 +554,3 @@ reset_endless:
 
b   reset_endless
 
-#ifdef CONFIG_USE_IRQ
-
-.LC0:  .word   loops_per_jiffy
-
-/*
- * 0 <= r0 <= 2000
- */
-.globl __udelay
-__udelay:
-   mov r2, #0x6800
-   orr r2, r2, #0x00db
-   mul r0, r2, r0
-   ldr r2, .LC0
-   ldr r2, [r2]@ max = 0x0fff
-   mov r0, r0, lsr #11 @ max = 0x3fff
-   mov r2, r2, lsr #11 @ max = 0x0003
-   mul r0, r2, r0  @ max = 2^32-1
-   movsr0, r0, lsr #6
-
-delay_loop:
-   subsr0, r0, #1
-   bne delay_loop
-   mov pc, lr
-
-#endif /* CONFIG_USE_IRQ */
diff --git a/arch/arm/cpu/ixp/timer.c b/arch/arm/cpu/ixp/timer.c
index edf341f..54a7a55 100644
--- a/arch/arm/cpu/ixp/timer.c
+++ b/arch/arm/cpu/ixp/timer.c
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2010
+ * Michael Schwingen, mich...@schwingen.org
+ *
  * (C) Copyright 2006
  * Stefan Roese, DENX Software Engineering, s...@denx.de.
  *
@@ -31,105 +34,95 @@
 
 #include 
 #include 
-
-#ifdef CONFIG_TIMER_IRQ
-
-#define FREQ   
-#define CLOCK_TICK_RATE(((FREQ / CONFIG_SYS_HZ & 
~IXP425_OST_RELOAD_MASK) + 1) * CONFIG_SYS_HZ)
-#define LATCH  ((CLOCK_TICK_RATE + CONFIG_SYS_HZ/2) / CONFIG_SYS_HZ)   
/* For divider */
+#include 
 
 /*
- * When interrupts are enabled, use timer 2 for time/delay generation...
+ * The IXP42x time-stamp timer runs at 2*OSC_IN (66.666MHz when using a
+ * 33.333MHz crystal).
  */
-
-static volatile ulong time

[U-Boot] [PATCH 03/13] trigger hardware watchdog in IXP42x serial driver

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 drivers/serial/serial_ixp.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c
index dd26af4..5893fd2 100644
--- a/drivers/serial/serial_ixp.c
+++ b/drivers/serial/serial_ixp.c
@@ -30,6 +30,7 @@
 
 #include 
 #include 
+#include 
 
 /*
  *   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;
 }
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 13/13] add support for fixed-speed MII ports (no standard PHY registers)

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 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(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 9d1090e..87f4600 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -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, ®_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",
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index bef5bc0..fa9e20a 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -153,6 +153,11 @@
 #defineCONFIG_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
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index 33d2db1..1a3b2cf 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -153,6 +153,11 @@
 #defineCONFIG_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
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 07/13] update/fix AcTux2 board

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 board/actux2/actux2.c|   26 ++
 board/actux2/config.mk   |2 --
 board/actux2/u-boot.lds  |   45 -
 include/configs/actux2.h |   21 -
 4 files changed, 58 insertions(+), 36 deletions(-)

diff --git a/board/actux2/actux2.c b/board/actux2/actux2.c
index d6aaad6..634553f 100644
--- a/board/actux2/actux2.c
+++ b/board/actux2/actux2.c
@@ -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 = 0x8093;
+   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 = 0x8093;
-
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);
 }
 
diff --git a/board/actux2/config.mk b/board/actux2/config.mk
index 88634f7..b98b909 100644
--- a/board/actux2/config.mk
+++ b/board/actux2/config.mk
@@ -1,5 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
 # include NPE ethernet driver
 BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
 
diff --git a/board/actux2/u-boot.lds b/board/actux2/u-boot.lds
index 707c027..5f289a1 100644
--- a/board/actux2/u-boot.lds
+++ b/board/actux2/u-boot.lds
@@ -30,34 +30,29 @@ SECTIONS
 
. = ALIGN (4);
.text : {
-   arch/arm/cpu/ixp/start.o(.text)
-   lib/string.o(.text)
-   lib/vsprintf.o(.text)
-   arch/arm/lib/board.o(.text)
-   common/dlmalloc.o(.text)
-   arch/arm/cpu/ixp/cpu.o(.text)
+   arch/arm/cpu/ixp/start.o(.text*)
+   net/libnet.o(.text*)
+   board/actux2/libactux2.o(.text*)
+   arch/arm/cpu/ixp/libixp.o(.text*)
+   drivers/serial/libserial.o(.text*)
 
. = env_offset;
-   common/env_embedded.o (.ppcenv)
-
-   * (.text)
+   common/env_embedded.o(.ppcenv)
+   *(.text*)
}
 
. = ALIGN (4);
.rodata : {
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
}
-
. = ALIGN (4);
.data : {
-   *(.data)
+   *(.data*)
}
-
. = ALIGN (4);
.got : {
*(.got)
}
-
. =.;
__u_boot_cmd_start =.;
.u_boot_cmd : {
@@ -66,10 +61,26 @@ SECTIONS
__u_boot_cmd_end =.;
 
. = ALIGN (4);
-   __bss_start =.;
-   .bss (NOLOAD): {
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   }
+
+   .dynsym : {
+   __dynsym_start = .;
+   *(.dynsym)
+   }
+
+   .bss __rel_dyn_start (OVERLAY) : {
+   __bss_start = .;
*(.bss)
-   . = ALIGN(4);
+. = ALIGN(4);
+   _end = .;
}
-   _end =.;
+   /DISCARD/ : { *(.dynstr*) }
+   /DISCARD/ : { *(.dynamic*) }
+   /DISCARD/ : { *(.plt*) }
+   /DISCARD/ : { *(.interp*) }
+   /DISCARD/ : { *(.gnu*) }
 }
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index 756279e..4ba3ce0 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE115200
 #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   0x0040
 #define CONFIG_SYS_MEMTEST_END 0x0080
 
-/* spec says 66.666 MHz, but it appears to be 33 */
-#define CONFIG_SYS_HZ

[U-Boot] [PATCH 01/13] add XScale sub architecture (IXP/PXA) to board list

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 MAINTAINERS |   46 +++---
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ba83f71..5fc3de1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -552,8 +552,8 @@ Rowel Atienza 
 Stefano Babic 
 
ea20davinci
-   polaris xscale
-   trizepsiv   xscale
+   polaris xscale/pxa
+   trizepsiv   xscale/pxa
mx51evk i.MX51
vision2 i.MX51
 
@@ -582,7 +582,7 @@ Andreas Bie
 
 Cliff Brake 
 
-   pxa255_idp  xscale
+   pxa255_idp  xscale/pxa
 
 Rick Bronson 
 
@@ -619,7 +619,7 @@ Fabio Estevam 
 
 Peter Figuli 
 
-   wepep250xscale
+   wepep250xscale/pxa (removed)
 
 Daniel Gorsulowski 
 
@@ -687,7 +687,7 @@ Sergey Kubushyn 
 
 Prakash Kumar 
 
-   cerf250 xscale
+   cerf250 xscale/pxa
 
 Vipin Kumar 
 
@@ -761,9 +761,9 @@ John Rigby 
 
 Stefan Roese 
 
-   ixdpg425xscale
-   pdnb3   xscale
-   scpuxscale
+   ixdpg425xscale/ixp
+   pdnb3   xscale/ixp
+   scpuxscale/ixp
 
 Alessandro Rubini 
 Nomadik Linux Team 
@@ -786,15 +786,15 @@ Heiko Schocher 
 
 Robert Schwebel 
 
-   csb226  xscale
-   innokom xscale
+   csb226  xscale/pxa
+   innokom xscale/pxa
 
 Michael Schwingen 
 
-   actux1  xscale
-   actux2  xscale
-   actux3  xscale
-   actux4  xscale
+   actux1  xscale/ixp
+   actux2  xscale/ixp
+   actux3  xscale/ixp
+   actux4  xscale/ixp
 
 Andrea Scian 
 
@@ -818,12 +818,12 @@ Greg Ungerer 
 
 Marek Vasut 
 
-   balloon3xscale
-   colibri_pxa270  xscale
-   palmld  xscale
-   palmtc  xscale
-   vpac270 xscale
-   zipitz2 xscale
+   balloon3xscale/pxa
+   colibri_pxa270  xscale/pxa
+   palmld  xscale/pxa
+   palmtc  xscale/pxa
+   vpac270 xscale/pxa
+   zipitz2 xscale/pxa
 
 Hugo Villeneuve 
 
@@ -864,9 +864,9 @@ Sughosh Ganu 
 Unknown / orphaned boards:
Board   CPU Last known maintainer / Comment
 .
-   cradle  xscale  Kyle Harris  / dead 
address
-   ixdp425 xscale  Kyle Harris  / dead 
address
-   lubbock xscale  Kyle Harris  / dead 
address
+   cradle  xscale/pxa  Kyle Harris  / 
dead address
+   ixdp425 xscale/ixp  Kyle Harris  / 
dead address
+   lubbock xscale/pxa  Kyle Harris  / 
dead address
 
imx31_phycore_eet i.MX31  Guennadi Liakhovetski  
/ resigned
mx31ads   i.MX31  Guennadi Liakhovetski  
/ resigned
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 06/13] update/fix AcTux1 board

2010-12-28 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 board/actux1/actux1.c|   22 +++-
 board/actux1/config.mk   |2 -
 board/actux1/u-boot.lds  |   40 ++---
 boards.cfg   |5 +++-
 include/configs/actux1.h |   48 +++--
 5 files changed, 73 insertions(+), 44 deletions(-)

diff --git a/board/actux1/actux1.c b/board/actux1/actux1.c
index 399be23..c56ec94 100644
--- a/board/actux1/actux1.c
+++ b/board/actux1/actux1.c
@@ -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 = 0x8093;
+   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 = 0x8093;
-
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);
 }
 
diff --git a/board/actux1/config.mk b/board/actux1/config.mk
index 88634f7..b98b909 100644
--- a/board/actux1/config.mk
+++ b/board/actux1/config.mk
@@ -1,5 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
 # include NPE ethernet driver
 BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
 
diff --git a/board/actux1/u-boot.lds b/board/actux1/u-boot.lds
index 5c1ece7..8898c30 100644
--- a/board/actux1/u-boot.lds
+++ b/board/actux1/u-boot.lds
@@ -30,15 +30,15 @@ SECTIONS
 
. = ALIGN (4);
.text : {
-   arch/arm/cpu/ixp/start.o(.text)
-   lib/string.o(.text)
-   lib/vsprintf.o(.text)
-   arch/arm/lib/board.o(.text)
-   common/dlmalloc.o(.text)
-   arch/arm/cpu/ixp/cpu.o(.text)
+   arch/arm/cpu/ixp/start.o(.text*)
+   net/libnet.o(.text*)
+   board/actux1/libactux1.o(.text*)
+   arch/arm/cpu/ixp/libixp.o(.text*)
+   drivers/serial/libserial.o(.text*)
+
. = env_offset;
common/env_embedded.o(.ppcenv)
-   * (.text)
+   *(.text*)
}
 
. = ALIGN (4);
@@ -47,7 +47,7 @@ SECTIONS
}
. = ALIGN (4);
.data : {
-   *(.data)
+   *(.data*)
}
. = ALIGN (4);
.got : {
@@ -61,10 +61,26 @@ SECTIONS
__u_boot_cmd_end =.;
 
. = ALIGN (4);
-   __bss_start =.;
-   .bss (NOLOAD): {
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   }
+
+   .dynsym : {
+   __dynsym_start = .;
+   *(.dynsym)
+   }
+
+   .bss __rel_dyn_start (OVERLAY) : {
+   __bss_start = .;
*(.bss)
-   . = ALIGN(4);
+. = ALIGN(4);
+   _end = .;
}
-   _end =.;
+   /DISCARD/ : { *(.dynstr*) }
+   /DISCARD/ : { *(.dynamic*) }
+   /DISCARD/ : { *(.plt*) }
+   /DISCARD/ : { *(.interp*) }
+   /DISCARD/ : { *(.gnu*) }
 }
diff --git a/boards.cfg b/boards.cfg
index 94b8745..695baca 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -122,7 +122,10 @@ omap4_panda  arm armv7   panda 
  ti
 omap4_sdp4430arm armv7   sdp4430 ti
 omap4
 s5p_goni arm armv7   goni
samsungs5pc1xx
 smdkc100 arm armv7   smdkc100
samsungs5pc1xx
-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
diff --git a/include/configs/actux1.h b/include/configs/actux1.h
index 8886eff..2ffedf1 100644
--- a/include/configs/actux1.h
+++ b/include/configs/actux1.h
@@ -26,13 +26,6 @

Re: [U-Boot] [PATCH 12/13] add support for function-sections

2010-12-29 Thread Michael Schwingen
Am 12/29/2010 05:47 AM, schrieb Mike Frysinger:
> On Tuesday, December 28, 2010 07:43:30 Michael Schwingen wrote:
>> Signed-off-by: Michael Schwingen 
>> ---
>>  config.mk|6 ++
>>  include/configs/actux1.h |1 +
>>  include/configs/actux2.h |1 +
>>  include/configs/actux3.h |1 +
>>  include/configs/actux4.h |1 +
>>  5 files changed, 10 insertions(+), 0 deletions(-)
>>
>> diff --git a/config.mk b/config.mk
>> index 66f8fe6..f7c7760 100644
>> --- a/config.mk
>> +++ b/config.mk
>> @@ -152,6 +152,9 @@ endif
>>  RELFLAGS= $(PLATFORM_RELFLAGS)
>>  DBGFLAGS= -g # -DDEBUG
>>  OPTFLAGS= -Os #-fomit-frame-pointer
>> +ifeq ($(CONFIG_USE_FUNCTION_SECTIONS),y)
>> +OPTFLAGS += -ffunction-sections
>> +endif
> you can already do this with board config.mk and PLATFORM_RELFLAGS.  no need 
> to introduce some random new config name for a random compiler flag.
OK, I had not seen that possibility.
Setting a platform variable in a board-dependant way sounds a bit wrong,
but it works.

cu
Michael

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 05/13] fix "depend" target in npe directory

2011-01-03 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 arch/arm/cpu/ixp/npe/Makefile |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/Makefile b/arch/arm/cpu/ixp/npe/Makefile
index c756a1d..14ab3c7 100644
--- a/arch/arm/cpu/ixp/npe/Makefile
+++ b/arch/arm/cpu/ixp/npe/Makefile
@@ -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 \
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 09/13] update/fix AcTux3 board

2011-01-03 Thread Michael Schwingen

Signed-off-by: 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(-)

diff --git a/board/actux3/actux3.c b/board/actux3/actux3.c
index 63bf365..8875148 100644
--- a/board/actux3/actux3.c
+++ b/board/actux3/actux3.c
@@ -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 = 0x8093;
+   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 = 0x8093;
-
+   /* 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);
 }
 
diff --git a/board/actux3/config.mk b/board/actux3/config.mk
index 88634f7..a370337 100644
--- a/board/actux3/config.mk
+++ b/board/actux3/config.mk
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
-# 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
diff --git a/board/actux3/u-boot.lds b/board/actux3/u-boot.lds
index 497ab97..d4f6960 100644
--- a/board/actux3/u-boot.lds
+++ b/board/actux3/u-boot.lds
@@ -30,34 +30,29 @@ SECTIONS
 
. = ALIGN (4);
.text : {
-   arch/arm/cpu/ixp/start.o (.text)
-   lib/string.o (.text)
-   lib/vsprintf.o (.text)
-   arch/arm/lib/board.o (.text)
-   common/dlmalloc.o (.text)
-   arch/arm/cpu/ixp/cpu.o (.text)
+   arch/arm/cpu/ixp/start.o(.text*)
+   net/libnet.o(.text*)
+   board/actux3/libactux3.o(.text*)
+   arch/arm/cpu/ixp/libixp.o(.text*)
+   drivers/serial/libserial.o(.text*)
 
. = env_offset;
-   common/env_embedded.o (.ppcenv)
-
-   * (.text)
+   common/env_embedded.o(.ppcenv)
+   *(.text*)
}
 
. = ALIGN (4);
.rodata : {
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
}
-
. = ALIGN (4);
.data : {
-   *(.data)
+   *(.data*)
}
-
. = ALIGN (4);
.got : {
*(.got)
}
-
. =.;
__u_boot_cmd_start =.;
.u_boot_cmd : {
@@ -66,10 +61,26 @@ SECTIONS
__u_boot_cmd_end =.;
 
. = ALIGN (4);
-   __bss_start =.;
-   .bss (NOLOAD): {
-   *(.bss)
-   . = ALIGN(4);
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   }
+
+   .dynsym : {
+   __dynsym_start = .;
+   *(.dynsym)
+   }
+
+   .bss __rel_dyn_start (OVERLAY) : {
+   __bss_start = .;
+   *(.bss*)
+. = ALIGN(4);
+   _end = .;
}
-   _end =.;
+   /DISCARD/ : { *(.dynstr*) }
+   /DISCARD/ : { *(.dynamic*) }
+   /DISCARD/ : { *(.plt*) }
+   /DISCARD/ : { *(.interp*) }
+   /DISCARD/ : { *(.gnu*) }
 }
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index ad9173f..4b9b496 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE115200
 #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 an

[U-Boot] [PATCH 12/13] IXP NPE: add support for fixed-speed MII ports

2011-01-03 Thread Michael Schwingen
add support for MII ports that lack a PHY with standard PHY registers

Signed-off-by: Michael Schwingen 
---
 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(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 9d1090e..87f4600 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -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, ®_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",
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index 4ba3ce0..fc0af32 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -152,6 +152,11 @@
 #defineCONFIG_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
diff --git a/include/configs/actux3.h b/include/configs/actux3.h
index 4b9b496..01b5d12 100644
--- a/include/configs/actux3.h
+++ b/include/configs/actux3.h
@@ -152,6 +152,11 @@
 #defineCONFIG_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
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 01/13] add XScale sub architecture (IXP/PXA) to board list

2011-01-03 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 MAINTAINERS |   46 +++---
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ba83f71..5fc3de1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -552,8 +552,8 @@ Rowel Atienza 
 Stefano Babic 
 
ea20davinci
-   polaris xscale
-   trizepsiv   xscale
+   polaris xscale/pxa
+   trizepsiv   xscale/pxa
mx51evk i.MX51
vision2 i.MX51
 
@@ -582,7 +582,7 @@ Andreas Bie
 
 Cliff Brake 
 
-   pxa255_idp  xscale
+   pxa255_idp  xscale/pxa
 
 Rick Bronson 
 
@@ -619,7 +619,7 @@ Fabio Estevam 
 
 Peter Figuli 
 
-   wepep250xscale
+   wepep250xscale/pxa (removed)
 
 Daniel Gorsulowski 
 
@@ -687,7 +687,7 @@ Sergey Kubushyn 
 
 Prakash Kumar 
 
-   cerf250 xscale
+   cerf250 xscale/pxa
 
 Vipin Kumar 
 
@@ -761,9 +761,9 @@ John Rigby 
 
 Stefan Roese 
 
-   ixdpg425xscale
-   pdnb3   xscale
-   scpuxscale
+   ixdpg425xscale/ixp
+   pdnb3   xscale/ixp
+   scpuxscale/ixp
 
 Alessandro Rubini 
 Nomadik Linux Team 
@@ -786,15 +786,15 @@ Heiko Schocher 
 
 Robert Schwebel 
 
-   csb226  xscale
-   innokom xscale
+   csb226  xscale/pxa
+   innokom xscale/pxa
 
 Michael Schwingen 
 
-   actux1  xscale
-   actux2  xscale
-   actux3  xscale
-   actux4  xscale
+   actux1  xscale/ixp
+   actux2  xscale/ixp
+   actux3  xscale/ixp
+   actux4  xscale/ixp
 
 Andrea Scian 
 
@@ -818,12 +818,12 @@ Greg Ungerer 
 
 Marek Vasut 
 
-   balloon3xscale
-   colibri_pxa270  xscale
-   palmld  xscale
-   palmtc  xscale
-   vpac270 xscale
-   zipitz2 xscale
+   balloon3xscale/pxa
+   colibri_pxa270  xscale/pxa
+   palmld  xscale/pxa
+   palmtc  xscale/pxa
+   vpac270 xscale/pxa
+   zipitz2 xscale/pxa
 
 Hugo Villeneuve 
 
@@ -864,9 +864,9 @@ Sughosh Ganu 
 Unknown / orphaned boards:
Board   CPU Last known maintainer / Comment
 .
-   cradle  xscale  Kyle Harris  / dead 
address
-   ixdp425 xscale  Kyle Harris  / dead 
address
-   lubbock xscale  Kyle Harris  / dead 
address
+   cradle  xscale/pxa  Kyle Harris  / 
dead address
+   ixdp425 xscale/ixp  Kyle Harris  / 
dead address
+   lubbock xscale/pxa  Kyle Harris  / 
dead address
 
imx31_phycore_eet i.MX31  Guennadi Liakhovetski  
/ resigned
mx31ads   i.MX31  Guennadi Liakhovetski  
/ resigned
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 11/13] update/fix some more IXP42x boards (only compile tested)

2011-01-03 Thread Michael Schwingen

Signed-off-by: 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(-)

diff --git a/board/ixdp425/config.mk b/board/ixdp425/config.mk
index 509c894..5d6f708 100644
--- a/board/ixdp425/config.mk
+++ b/board/ixdp425/config.mk
@@ -1,2 +1,3 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x00f8
+CONFIG_SYS_TEXT_BASE = 0x5000
+
diff --git a/board/prodrive/pdnb3/config.mk b/board/prodrive/pdnb3/config.mk
index 817541f..b5e6a4e 100644
--- a/board/prodrive/pdnb3/config.mk
+++ b/board/prodrive/pdnb3/config.mk
@@ -1,2 +1,2 @@
 #
-CONFIG_SYS_TEXT_BASE = 0x01f0
+CONFIG_SYS_TEXT_BASE = 0x5000
diff --git a/boards.cfg b/boards.cfg
index 695baca..b0fc38a 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -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
diff --git a/include/configs/ixdp425.h b/include/configs/ixdp425.h
index 28d41e2..81288b7 100644
--- a/include/configs/ixdp425.h
+++ b/include/configs/ixdp425.h
@@ -105,8 +105,10 @@
 
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
-#define CONFIG_SYS_HZ  333 /* 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 
+#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   0x2 /* size of one complete sector  */
-#define CONFIG_ENV_ADDR(PHYS_FLASH_1 + 0x2)
+#define CONFIG_ENV_ADDR(PHYS_FLASH_1 + 0x4)
 #defineCONFIG_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 */
diff --git a/include/configs/ixdpg425.h b/include/configs/ixdpg425.h
index 637fd7d..60a2371 100644
--- a/include/configs/ixdpg425.h
+++ b/include/configs/ixdpg425.h
@@ -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 0x0080  /* 4 ... 8 MB in DRAM   
*/
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
+#define CONFIG_IXP425_TIMER_CLK
 #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 */
diff --git a/include/configs/pdnb3.h b/include/configs/pdnb3.h
index 33fa6ee..9acb018 100644
--- a/include/configs/pdnb3.h
+++ b/include/configs/pdnb3.h
@@ -117,6 +117,7 @@
 #define CONFIG_SYS_MEMTEST_END 0x0080  /* 4 ... 8 MB in DRAM   
*/
 #define CONFIG_SYS_LOAD_ADDR   0x0001  /* default load address 
*/
 
+#define CONFIG_IXP425_TIMER_CLK
 #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

[U-Boot] [PATCH 08/13] update/fix AcTux2 board

2011-01-03 Thread Michael Schwingen

Signed-off-by: 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(-)

diff --git a/board/actux2/actux2.c b/board/actux2/actux2.c
index d6aaad6..634553f 100644
--- a/board/actux2/actux2.c
+++ b/board/actux2/actux2.c
@@ -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 = 0x8093;
+   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 = 0x8093;
-
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);
 }
 
diff --git a/board/actux2/config.mk b/board/actux2/config.mk
index 88634f7..a370337 100644
--- a/board/actux2/config.mk
+++ b/board/actux2/config.mk
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
-# 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
diff --git a/board/actux2/u-boot.lds b/board/actux2/u-boot.lds
index 707c027..f3473a3 100644
--- a/board/actux2/u-boot.lds
+++ b/board/actux2/u-boot.lds
@@ -30,34 +30,29 @@ SECTIONS
 
. = ALIGN (4);
.text : {
-   arch/arm/cpu/ixp/start.o(.text)
-   lib/string.o(.text)
-   lib/vsprintf.o(.text)
-   arch/arm/lib/board.o(.text)
-   common/dlmalloc.o(.text)
-   arch/arm/cpu/ixp/cpu.o(.text)
+   arch/arm/cpu/ixp/start.o(.text*)
+   net/libnet.o(.text*)
+   board/actux2/libactux2.o(.text*)
+   arch/arm/cpu/ixp/libixp.o(.text*)
+   drivers/serial/libserial.o(.text*)
 
. = env_offset;
-   common/env_embedded.o (.ppcenv)
-
-   * (.text)
+   common/env_embedded.o(.ppcenv)
+   *(.text*)
}
 
. = ALIGN (4);
.rodata : {
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
}
-
. = ALIGN (4);
.data : {
-   *(.data)
+   *(.data*)
}
-
. = ALIGN (4);
.got : {
*(.got)
}
-
. =.;
__u_boot_cmd_start =.;
.u_boot_cmd : {
@@ -66,10 +61,26 @@ SECTIONS
__u_boot_cmd_end =.;
 
. = ALIGN (4);
-   __bss_start =.;
-   .bss (NOLOAD): {
-   *(.bss)
-   . = ALIGN(4);
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   }
+
+   .dynsym : {
+   __dynsym_start = .;
+   *(.dynsym)
+   }
+
+   .bss __rel_dyn_start (OVERLAY) : {
+   __bss_start = .;
+   *(.bss*)
+. = ALIGN(4);
+   _end = .;
}
-   _end =.;
+   /DISCARD/ : { *(.dynstr*) }
+   /DISCARD/ : { *(.dynamic*) }
+   /DISCARD/ : { *(.plt*) }
+   /DISCARD/ : { *(.interp*) }
+   /DISCARD/ : { *(.gnu*) }
 }
diff --git a/include/configs/actux2.h b/include/configs/actux2.h
index 756279e..4ba3ce0 100644
--- a/include/configs/actux2.h
+++ b/include/configs/actux2.h
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE115200
 #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

[U-Boot] IXP42x patch series - 2nd attempt

2011-01-03 Thread Michael Schwingen
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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 07/13] update/fix AcTux1 board

2011-01-03 Thread Michael Schwingen

Signed-off-by: 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(-)

diff --git a/board/actux1/actux1.c b/board/actux1/actux1.c
index 399be23..c56ec94 100644
--- a/board/actux1/actux1.c
+++ b/board/actux1/actux1.c
@@ -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 = 0x8093;
+   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 = 0x8093;
-
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);
 }
 
diff --git a/board/actux1/config.mk b/board/actux1/config.mk
index 88634f7..a370337 100644
--- a/board/actux1/config.mk
+++ b/board/actux1/config.mk
@@ -1,6 +1,3 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
-# 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
diff --git a/board/actux1/u-boot.lds b/board/actux1/u-boot.lds
index 5c1ece7..6809ef7 100644
--- a/board/actux1/u-boot.lds
+++ b/board/actux1/u-boot.lds
@@ -30,15 +30,15 @@ SECTIONS
 
. = ALIGN (4);
.text : {
-   arch/arm/cpu/ixp/start.o(.text)
-   lib/string.o(.text)
-   lib/vsprintf.o(.text)
-   arch/arm/lib/board.o(.text)
-   common/dlmalloc.o(.text)
-   arch/arm/cpu/ixp/cpu.o(.text)
+   arch/arm/cpu/ixp/start.o(.text*)
+   net/libnet.o(.text*)
+   board/actux1/libactux1.o(.text*)
+   arch/arm/cpu/ixp/libixp.o(.text*)
+   drivers/serial/libserial.o(.text*)
+
. = env_offset;
common/env_embedded.o(.ppcenv)
-   * (.text)
+   *(.text*)
}
 
. = ALIGN (4);
@@ -47,7 +47,7 @@ SECTIONS
}
. = ALIGN (4);
.data : {
-   *(.data)
+   *(.data*)
}
. = ALIGN (4);
.got : {
@@ -61,10 +61,26 @@ SECTIONS
__u_boot_cmd_end =.;
 
. = ALIGN (4);
-   __bss_start =.;
-   .bss (NOLOAD): {
-   *(.bss)
-   . = ALIGN(4);
+   .rel.dyn : {
+   __rel_dyn_start = .;
+   *(.rel*)
+   __rel_dyn_end = .;
+   }
+
+   .dynsym : {
+   __dynsym_start = .;
+   *(.dynsym)
+   }
+
+   .bss __rel_dyn_start (OVERLAY) : {
+   __bss_start = .;
+   *(.bss*)
+. = ALIGN(4);
+   _end = .;
}
-   _end =.;
+   /DISCARD/ : { *(.dynstr*) }
+   /DISCARD/ : { *(.dynamic*) }
+   /DISCARD/ : { *(.plt*) }
+   /DISCARD/ : { *(.interp*) }
+   /DISCARD/ : { *(.gnu*) }
 }
diff --git a/boards.cfg b/boards.cfg
index 94b8745..695baca 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -122,7 +122,10 @@ omap4_panda  arm armv7   panda 
  ti
 omap4_sdp4430arm armv7   sdp4430 ti
 omap4
 s5p_goni arm armv7   goni
samsungs5pc1xx
 smdkc100 arm armv7   smdkc100
samsungs5pc1xx
-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

[U-Boot] [PATCH 06/13] add wildcard to sections (for -ffunction-sections/-fdata-sections)

2011-01-03 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 arch/arm/cpu/ixp/u-boot.lds |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/ixp/u-boot.lds b/arch/arm/cpu/ixp/u-boot.lds
index a55eb8a..747a7b6 100644
--- a/arch/arm/cpu/ixp/u-boot.lds
+++ b/arch/arm/cpu/ixp/u-boot.lds
@@ -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 = .;
}
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 02/13] add support for IXP42x Rev. B1 and newer

2011-01-03 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 arch/arm/cpu/ixp/npe/npe.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/ixp/npe/npe.c b/arch/arm/cpu/ixp/npe/npe.c
index 2e68689..9d1090e 100644
--- a/arch/arm/cpu/ixp/npe/npe.c
+++ b/arch/arm/cpu/ixp/npe/npe.c
@@ -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) ==
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 10/13] update/fix AcTux4 board

2011-01-03 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 board/actux4/actux4.c|   12 +++-
 board/actux4/config.mk   |6 ++
 include/configs/actux4.h |   22 +-
 3 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/board/actux4/actux4.c b/board/actux4/actux4.c
index f373b58..f66acd8 100644
--- a/board/actux4/actux4.c
+++ b/board/actux4/actux4.c
@@ -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 (1);
GPIO_OUTPUT_SET (CONFIG_SYS_GPIO_IORST);
udelay (1);
@@ -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);
 }
 
diff --git a/board/actux4/config.mk b/board/actux4/config.mk
index 9cb838b..be871c1 100644
--- a/board/actux4/config.mk
+++ b/board/actux4/config.mk
@@ -1,4 +1,2 @@
-CONFIG_SYS_TEXT_BASE = 0x00e0
-
-# include NPE ethernet driver
-BOARDLIBS = arch/arm/cpu/ixp/npe/libnpe.o
+PLATFORM_RELFLAGS += -ffunction-sections 
+PLATFORM_LDFLAGS += --gc-sections
diff --git a/include/configs/actux4.h b/include/configs/actux4.h
index 04145c3..ac7d1ba 100644
--- a/include/configs/actux4.h
+++ b/include/configs/actux4.h
@@ -37,6 +37,7 @@
 #define CONFIG_BAUDRATE115200
 #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   0x0040
 #define CONFIG_SYS_MEMTEST_END 0x0080
 
-/* spec says 66.666 MHz, but it appears to be 33 */
-#define CONFIG_SYS_HZ  333
+/* timer clock - 2* OSC_IN system clock */
+#define CONFIG_IXP425_TIMER_CLK 6600
+#define CONFIG_SYS_HZ  1000
 
 /* default load address */
 #define CONFIG_SYS_LOAD_ADDR   0x0001
@@ -109,7 +110,7 @@
 /* SDRAM settings */
 #define CONFIG_NR_DRAM_BANKS   1
 #define PHYS_SDRAM_1   0x
-#define CONFIG_SYS_DRAM_BASE   0x
+#define CONFIG_SYS_SDRAM_BASE  0x
 
 /* 32MB SDRAM */
 #define CONFIG_SYS_SDR_CONFIG  0x18
@@ -119,6 +120,7 @@
 #define CONFIG_SYS_DRAM_SIZE   0x0200
 
 /* FLASH organization */
+#define CONFIG_SYS_TEXT_BASE   0x5000
 #define CONFIG_SYS_MAX_FLASH_BANKS 2
 /* max # of sectors per chip */
 #define CONFIG_SYS_MAX_FLASH_SECT  70
@@ -153,6 +155,7 @@
 #defineCONFIG_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=5102\0" \
+   "kernelfile=actux4/uImage\0"\
+   "rootfile=actux4/rootfs\0"  \
"rootaddr=5116\0"   \
"loadaddr=1\0"  \
"updateboot_ser=mw.b 1 ff 4;"   \
" loady ${loadaddr};"   \
" run eraseboot writeboot\0"\
"updateboot_net=mw.b 1 ff 4;"   \
-   " tftp ${loadaddr} u-boot.bin;" \
+   " tftp ${loadaddr} actux4/u-boot.bin;"  
\
" run eraseboot writeboot\0"\
"eraseboot=protect off 5000 5003efff;"  \
" erase 5000 +${filesize}\0"

[U-Boot] [PATCH 03/13] trigger hardware watchdog in IXP42x serial driver

2011-01-03 Thread Michael Schwingen

Signed-off-by: Michael Schwingen 
---
 drivers/serial/serial_ixp.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c
index dd26af4..5893fd2 100644
--- a/drivers/serial/serial_ixp.c
+++ b/drivers/serial/serial_ixp.c
@@ -30,6 +30,7 @@
 
 #include 
 #include 
+#include 
 
 /*
  *   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;
 }
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 04/13] Fix IXP code to work after relocation was added

2011-01-03 Thread 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

Signed-off-by: Michael Schwingen 
---
 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(-)

diff --git a/arch/arm/cpu/ixp/cpu.c b/arch/arm/cpu/ixp/cpu.c
index ce275e5..942845d 100644
--- a/arch/arm/cpu/ixp/cpu.c
+++ b/arch/arm/cpu/ixp/cpu.c
@@ -36,8 +36,6 @@
 #include 
 #include 
 
-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 & 0x03f0) >> 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;
}
diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S
index 9f8c15b..2c49aa4 100644
--- a/arch/arm/cpu/ixp/start.S
+++ b/arch/arm/cpu/ixp/start.S
@@ -65,7 +65,8 @@
.endm
 
 .globl _start
-_start: b  reset
+_start:
+   ldr pc, _reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
ldr pc, _prefetch_abort
@@ -74,6 +75,7 @@ _start: b reset
ldr pc, _irq
ldr pc, _fiq
 
+_reset: .word reset
 _undefined_instruction: .word undefined_instruction
 _software_interrupt:   .word software_interrupt
 _prefetch_abort:   .word prefetch_abort
@@ -163,12 +165,6 @@ reset:
str r1, [r2]
 
/* make sure flash is visible at 0 */
-#if 0
-   ldr r2, =IXP425_EXP_CFG0
-   ldr r1, [r2]
-   orr r1, r1, #0x8000
-   str r1, [r2]
-#endif
mov r1, #CONFIG_SYS_SDR_CONFIG
ldr r2, =IXP425_SDR_CONFIG
str r1, [r2]
@@ -212,19 +208,6 @@ reset:
str r1, [r4]
DELAY_FOR 0x4000, r0
 
-   /* copy */
-   mov r0, #0
-   mov r4, r0
-   add r2, r0, #CONFIG_SYS_MONITOR_LEN
-   mov r1, #0x1000
-   mov r5, r1
-
-30:
-   ldr r3, [r0], #4
-   str r3, [r1], #4
-   cmp r0, r2
-   bne 30b
-
/* invalidate I & D caches & BTB */
mcr p15, 0, r0, c7, c7, 0
CPWAIT  r0
@@ -237,19 +220,12 @@ reset:
mcr p15, 0, r0, c7, c10, 4
CPWAIT  r0
 
-   /* move flash to 0x5000 */
+   /* remove flash mirror at 0x */
ldr r2, =IXP425_EXP_CFG0
ldr r1, [r2]
bic r1, r1, #0x8000
str r1, [r2]
 
-   nop
-   nop
-   nop
-   nop
-   nop
-   nop
-
/* invalidate I & Data TLB */
mcr p15, 0, r0, c8, c7, 0
CPWAIT r0
@@ -265,7 +241,7 @@ reset:
orr r0,r0,#0x13
msr cpsr,r0
 
-/* Set stackpointer in internal RAM to call board_init_f */
+/* Set initial stackpointer in SDRAM to call board_init_f */
 call_board_init_f:
ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
@@ -578,28 +554,3 @@ reset_endless:
 
b   reset_endless
 
-#ifdef CONFIG_USE_IRQ
-
-.LC0:  .word   loops_per_jiffy
-
-/*
- * 0 <= r0 <= 2000
- */
-.globl __udelay
-__udelay:
-   mov r2, #0x6800
-   orr r2, r2, #0x00db
-   mul r0, r2, r0
-   ldr r2, .LC0
-   ldr r2, [r2]@ max = 0x0fff
-   mov r0, r0, lsr #11 @ max = 0x3fff
-   mov r2, r2, lsr #11 @ max = 0x0003
-   mul r0, r2, r0  @ max = 2^32-1
-   movsr0, r0, lsr #6
-
-delay_loop:
-   subsr0, r0, #1
-   bne delay_loop
-   mov pc, lr
-
-#endif /* CONFIG_USE_IRQ */
diff --git a/arch/arm/cpu/ixp/timer.c b/arch/arm/cpu/ixp/timer.c
index edf341f..54a7a55 100644
--- a/arch/arm/cpu/ixp/timer.c
+++ b/arch/arm/cpu/ixp/timer.c
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2010
+ * Michael Schwingen, mich...@schwingen.org
+ *
  * (C) Copyright 2006
  * Stefan Roese, DENX Software Engineering, s...@denx.de.
  *
@@ -31,105 +34,95 @@
 
 #include 
 #include 
-
-#ifdef CONFIG_TIMER_IRQ
-
-#define FREQ   
-#define CLOCK_TICK_RATE(((FREQ / CONFIG_SYS_HZ & 
~IXP425_OST_RELOAD_MASK) + 1) * CONFIG_SYS_HZ)
-#define LATCH  ((CLOCK_TICK_RATE + CONFIG_SYS_HZ/2) / CONFIG_SYS_HZ)   
/* For divider */
+#include 
 
 /*
- * When interrupts are enabled, use timer 2 for time/del

[U-Boot] [PATCH 13/13] add dvlhost (dLAN 200 AV Wireless G) board

2011-01-03 Thread Michael Schwingen

Signed-off-by: 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

diff --git a/MAINTAINERS b/MAINTAINERS
index 5fc3de1..7b1c707 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -795,6 +795,7 @@ Michael Schwingen 
actux2  xscale/ixp
actux3  xscale/ixp
actux4  xscale/ixp
+   dvlhost xscale/ixp
 
 Andrea Scian 
 
diff --git a/board/dvlhost/Makefile b/board/dvlhost/Makefile
new file mode 100644
index 000..af9a644
--- /dev/null
+++ b/board/dvlhost/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := dvlhost.o watchdog.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/dvlhost/config.mk b/board/dvlhost/config.mk
new file mode 100644
index 000..a370337
--- /dev/null
+++ b/board/dvlhost/config.mk
@@ -0,0 +1,3 @@
+LDSCRIPT := $(SRCTREE)/board/$(BOARDDIR)/u-boot.lds
+PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+PLATFORM_LDFLAGS += --gc-sections
diff --git a/board/dvlhost/dvlhost.c b/board/dvlhost/dvlhost.c
new file mode 100644
index 000..33a74a4
--- /dev/null
+++ b/board/dvlhost/dvlhost.c
@@ -0,0 +1,118 @@
+/*
+ * (C) Copyright 2009
+ * Michael Schwingen, mich...@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 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include "dvlhost_hw.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_early_init_f (void)
+{
+   /* CS1: LED Latch */
+   *IXP425_EXP_CS1 = 0xBFFF0002;
+   return 0;
+}
+
+int board_init (void)
+{
+   gd->bd->bi_arch_number = MACH_TYPE_DVLHOST;
+
+   /* adress of boot parameters */
+   gd->bd->bi_boot_params = 0x0100;
+
+   /* 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

Re: [U-Boot] [PATCH 01/13] add XScale sub architecture (IXP/PXA) to board list

2011-01-25 Thread Michael Schwingen
Am 01/25/2011 09:38 PM, schrieb Wolfgang Denk:
> Dear Michael Schwingen,
>
> In message <1294062338-21084-2-git-send-email-mich...@schwingen.org> you 
> wrote:
>> Signed-off-by: Michael Schwingen 
> 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?

>> -wepep250xscale
>> +wepep250xscale/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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 07/13] update/fix AcTux1 board

2011-01-25 Thread Michael Schwingen
Am 01/25/2011 09:44 PM, schrieb Wolfgang Denk:
>
>> diff --git a/board/actux1/config.mk b/board/actux1/config.mk
>> index 88634f7..a370337 100644
>> --- a/board/actux1/config.mk
>> +++ b/board/actux1/config.mk
>> @@ -1,6 +1,3 @@
>> -CONFIG_SYS_TEXT_BASE = 0x00e0
>> -
>> -# 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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 13/13] add dvlhost (dLAN 200 AV Wireless G) board

2011-01-25 Thread Michael Schwingen
Am 01/25/2011 09:36 PM, schrieb Wolfgang Denk:
> Dear Michael Schwingen,
>
> In message <1294062338-21084-14-git-send-email-mich...@schwingen.org> you 
> wrote:
>> Signed-off-by: Michael Schwingen 
> ...
>> diff --git a/board/dvlhost/config.mk b/board/dvlhost/config.mk
>> new file mode 100644
>> index 000..a370337
>> --- /dev/null
>> +++ b/board/dvlhost/config.mk
>> @@ -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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/13] update/fix some more IXP42x boards (only compile tested)

2011-01-25 Thread Michael Schwingen
Am 01/25/2011 09:47 PM, schrieb Wolfgang Denk:
> Dear Michael Schwingen,
>
> In message <1294062338-21084-12-git-send-email-mich...@schwingen.org> you 
> wrote:
>> Signed-off-by: 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(-)
>>
>> diff --git a/board/ixdp425/config.mk b/board/ixdp425/config.mk
>> index 509c894..5d6f708 100644
>> --- a/board/ixdp425/config.mk
>> +++ b/board/ixdp425/config.mk
>> @@ -1,2 +1,3 @@
>>  #
>> -CONFIG_SYS_TEXT_BASE = 0x00f8
>> +CONFIG_SYS_TEXT_BASE = 0x5000
> Please move to board config file and remove board/ixdp425/config.mk
>
>> diff --git a/board/prodrive/pdnb3/config.mk b/board/prodrive/pdnb3/config.mk
>> index 817541f..b5e6a4e 100644
>> --- a/board/prodrive/pdnb3/config.mk
>> +++ b/board/prodrive/pdnb3/config.mk
>> @@ -1,2 +1,2 @@
>>  #
>> -CONFIG_SYS_TEXT_BASE = 0x01f0
>> +CONFIG_SYS_TEXT_BASE = 0x5000
> 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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 08/13] update/fix AcTux2 board

2011-01-26 Thread Michael Schwingen
Wolfgang Denk wrote:
>>  
>> +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 = 0x8093;
>> +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

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   >