Fix TSEC driver: avoid crashes if PHY is not attached
to a TSEC (e.g. a switch is connected via RMII) or
if the PHY is defective/incorrectly configured.

Signed-off-by: Ben Warren <bwarren@qstreams.com>
diff --git a/CHANGELOG b/CHANGELOG
index 8f68b8e..9bcbcb4 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,17 +1,23 @@
+commit 2b2a40bebbf1822506e80e631d7253e60f0e0fe6
+Author: Wolfgang Denk <wd@pollux.denx.de>
+Date:	Thu Oct 26 16:24:31 2006 +0200
+
+    Code cleanup.
+
 commit 5e3b0bc19f07ed277d85324ad0427642c8981baf
 Author: Haavard Skinnemoen <hskinnemoen@atmel.com>
 Date:	Wed Oct 25 15:48:59 2006 +0200
 
     Finish up support for the ATSTK1000/ATSTK1002 boards
-    
+
     Add atstk1002_config target to Makefile and move the AVR32 section
     down below Blackfin so that it doesn't end up in the middle of
     MIPS.
-    
+
     Drop the autogenerated linker script thing for now. Will have to
     revisit how to handle chips with different flash and RAM layout
     later.
-    
+
     Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
 
 commit c76f951a747cfb87ba826ef45b5aea82d5b5dbb4
@@ -19,16 +25,16 @@
 Date:	Tue Oct 24 23:47:37 2006 -0500
 
     Added support for Multi-Image files that contain a device tree
-    
+
     If a Multi-Image file contains a third image we try to use it as a
     device tree.  The device tree image is assumed to be uncompressed in the
     image file.	 We automatically allocate space for the device tree in memory
     and provide an 8k pad to allow more than a reasonable amount of growth.
-    
+
     Additionally, a device tree that was contained in flash will now automatically
     get copied to system memory as part of boot.  Previously an error was
     reported if one tried to boot a device tree that was in flash.
-    
+
     Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
 
 commit 7c52c4b943ff52bbe8796a7e2d3e476ceaf3f512
@@ -70,20 +76,20 @@
 
     Add ATSTK1000 and ATSTK1002 board support
     Patch by Haavard Skinnemoen, 06 Sep 2006
-    
+
     This patch adds support for the ATSTK1000 with the ATSTK1002 CPU
     daughterboard.
-    
+
     ATSTK1000 is a full-featured development board for AT32AP CPUs. It
     has two ethernet ports, a high quality QVGA LCD panel, a loudspeaker,
     and connectors for USART, PS/2, VGA, USB, MMC/SD cards and
     CompactFlash cards. For more information, please see this page:
-    
+
     http://www.atmel.com/dyn/products/tools.asp?family_id=682
-    
+
     The ATSTK1002 is a daughterboard for the ATSTK1000 supporting the
     AT32AP7000 chip.
-    
+
     Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
 
 commit f93ae788c3640fcde5db383471d45548ff4060d0
@@ -92,12 +98,12 @@
 
     Add common serial driver for Atmel AT32 and AT91 chips
     Patch by Haavard Skinnemoen, 06 Sep 2006
-    
+
     This is a first attempt at creating a common serial driver for Atmel
     chips. For now, it supports the AT32AP7000 AVR32 chip, but it should
     be possible to support AT91RM9200 and other ARM-based chips with some
     minor modifications.
-    
+
     There's nothing fundamentally AVR32-specific in this driver, but it
     does use some features which are currently only defined for the
     AT32AP CPU port:
@@ -105,7 +111,7 @@
       * gd->console_uart: A "struct device" containing information about
 	register mappings, gpio resources and clocks associated with the
 	UART device.
-    
+
     For more information about these features, please see the "AT32AP
     CPU" patch.
 
@@ -115,23 +121,23 @@
 
     Add AT32AP CPU and AT32AP7000 SoC support
     Patch by Haavard Skinnemoen, 06 Sep 2006
-    
+
     This patch adds support for the AT32AP CPU family and the AT32AP7000
     chip, which is the first chip implementing the AVR32 architecture.
-    
+
     The AT32AP CPU core is a high-performance implementation featuring a
     7-stage pipeline, separate instruction- and data caches, and a MMU.
     For more information, please see the "AVR32 AP Technical Reference":
-    
+
     http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf
-    
+
     In addition to this, the AT32AP7000 chip comes with a large set of
     integrated peripherals, many of which are shared with the AT91 series
     of ARM-based microcontrollers from Atmel. Full data sheet is
     available here:
-    
+
     http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf
-    
+
     Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
 
 commit 7b64fef33c66be648826c0ff9758298ef13d0604
@@ -140,10 +146,10 @@
 
     Add AVR32 architecture support
     Patch by Haavard Skinnemoen, 6 Sep 2006 16:23:02 +0200
-    
+
     This patch adds common infrastructure code for the Atmel AVR32
     architecture. See doc/README.AVR32 for details.
-    
+
     Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
 
 commit 2da2d9a4766063b9848f3a35ad6025499cf87265
@@ -152,7 +158,7 @@
 
     Use -g instead of -gstabs in AFLAGS_DEBUG
     Patch by Haavard Skinnemoen, 30 Aug 2006
-    
+
     In config.mk, -Wa,-gstabs is unconditionally appended to AFLAGS no
     matter what the target's preferred debugging format is. This patch
     simply replaces -gstabs with -g, so that the default debugging format
@@ -176,10 +182,10 @@
 Date:	Fri Oct 20 17:16:35 2006 -0500
 
     Use generic I2C register block on 85xx and 86xx.
-    
+
     Replace private IMMAP I2C structures with generic reg block
     and allow 86xx to have multiple I2C device busses.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit f5012827df11ca0c9be1df5f8b153e188dc2fa7c
@@ -187,7 +193,7 @@
 Date:	Fri Oct 20 15:54:34 2006 -0500
 
     Fix compilation warnings on a few 85xx boards.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 2047672684cf85cb6f96a1fbc993180aaaf19a99
@@ -198,7 +204,7 @@
     Introduced COFIG_FSL_I2C to select the common FSL I2C driver.
     And removed hard i2c path from a few u-boot.lds scipts too.
     Minor whitespace cleanups along the way.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 4d45f69e362b05892c9e92a7907e5820995612aa
@@ -207,11 +213,11 @@
 
     Rewrite a series of goto statements as a sequences of
     conditional expressions instead.
-    
+
     Use consistent return code 0/-1 for good/bad indicators.
-    
+
     Include one fewer file if the driver isn't used at all.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 7237c033b02fe295880435f1eb80819a0c987532
@@ -219,10 +225,10 @@
 Date:	Thu Oct 19 11:02:16 2006 -0500
 
     Moved i2c driver out of cpu/mpc86xx/i2c.c into drivers/fsl_i2c.c
-    
+
     in an effort to begin to unify the umpteen FSL I2C drivers that
     are all otherwise very similar.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 13a7fcdf37f6ea9429ae04c9df67f893364cfe4b
@@ -230,7 +236,7 @@
 Date:	Thu Oct 19 11:33:52 2006 -0500
 
     * Fix a bunch of compiler warnings for gcc 4.0
-    
+
     Signed-off-by: Matthew McClintock <msm@freescale.com>
 
 commit af9e1f5b9e6f9ce810f5e8bf2961c9542a5865c2
@@ -246,7 +252,7 @@
 
     Fixed leading whitespace issues.
     Removed spurious LAWAR thing.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 0ee90cb77e01d6e8ccd37e1bd96678597875c391
@@ -254,7 +260,7 @@
 Date:	Thu Oct 12 10:42:36 2006 -0500
 
     Remove unneeded include files and local variable.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 1eaf3a5ff4960a46f3a9063568ba2af7883f07c5
@@ -262,13 +268,13 @@
 Date:	Tue Oct 10 00:23:32 2006 -0600
 
     Fix possible uninitialized variable compiler warning.
-    
+
     When CONFIG_OF_FLAG_TREE is set, the compiler complains that 'len' in
     do_bootm_linux() may be uninitialized.  There is no possibility in the
     current code that len will get used uninitialized, but this fix follows
     the existing convention of setting both len and data to zero at the same
     time.
-    
+
     Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
 
 commit 7376eb87aaa601f728f9b8e5e9cd2711a67f529e
@@ -276,7 +282,7 @@
 Date:	Wed Oct 11 15:13:01 2006 -0500
 
     * Fix a bunch of compiler warnings for gcc 4.0
-    
+
     Signed-off-by: Matthew McClintock <msm@freescale.com>
 
 commit bf651baa365e5447246aad6a633ccd667cf24a39
@@ -328,7 +334,7 @@
 Date:	Fri Sep 29 08:23:12 2006 +0100
 
     Fix missing tCycle/modfreq calculation.
-    
+
     Signed-off-by: John Traill <john.traill@freescale.com>
 
 commit 8272dc2f58f2473d8995fcc9b916440cfba080f0
@@ -342,7 +348,7 @@
 Date:	Wed Sep 13 10:34:18 2006 -0500
 
     Add support for eTSEC 3 & 4 on 8548 CDS
-    
+
     * Added support for using eTSEC 3 and eTSEC 4 on the 8548 CDS.
       This will only work on rev 1.3 boards (but doesn't break older boards)
     * Cleaned up some comments to reflect the expanded role of tsec
@@ -353,7 +359,7 @@
 Date:	Wed Sep 13 10:33:56 2006 -0500
 
     Added code to support 2.6.18 PCI changes in u-boot
-    
+
     * Added code to swizzle the IRQ map for the PCI
 
 commit afbdc649f8751e4f4f1a6f527edfe139773f2c15
@@ -361,7 +367,7 @@
 Date:	Tue Sep 19 09:34:10 2006 -0500
 
     Modified makefile for new build mechanism.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit d14ba6a798beb753e7a864500414fcc2d198b8bc
@@ -372,7 +378,7 @@
     Both 8641 and 8641D have SVR == 0x8090, and are distinguished
     by the byte in bits 16-23 instead.
     Thanks to Jason Jin for noticing.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 88c8f4921fc47fb0eb2384b16586f1bd7f275be7
@@ -381,7 +387,7 @@
 
     Fixed an OF-tree off-by-one bug when adding a new property name.
     This bug will cause the kernel booting to pause a long time.
-    
+
     Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
     (cherry picked from 2f15776ccc6dc32377d8ba9652b8f58059c27c6d commit)
 
@@ -409,7 +415,7 @@
 
     Fixed an OF-tree off-by-one bug when adding a new property name.
     This bug will cause the kernel booting to pause a long time.
-    
+
     Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
 
 commit 5567806b67d0ae83493aa8823ad3b6c914f581d7
@@ -418,7 +424,7 @@
 
     Change ramdiskaddr and dtbaddr
     Remove PEX fluff commands.
-    
+
     Signed-off-by: Haiying Wang <haiying.wang@freescale.com>
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
@@ -427,7 +433,7 @@
 Date:	Wed Aug 23 13:32:45 2006 -0500
 
     * Another small fix for booting with disable_of
-    
+
     Signed-off-by: Matthew McClintock <msm@freescale.com>
 
 commit 4a7cc0f21918e6ecf07ed57075d67df2c4a1299c
@@ -441,7 +447,7 @@
 Date:	Wed Aug 23 19:15:12 2006 +0800
 
     Add AHCI define and sata support for MPC8641HPCN board.
-    
+
     Signed-off-by:Jason Jin<jason.jin@freescale.com>
 
 commit 4782ac80b02f0d01afd309e2200dd3c7037f2ba4
@@ -449,10 +455,10 @@
 Date:	Wed Aug 23 19:10:44 2006 +0800
 
     Add AHCI support to u-boot
-    
+
     Add AHCI support in u-boot, enable the sata disk controllers which
     following the AHCI protocol.
-    
+
     Signed-off-by:Jason Jin<jason.jin@freescale.com>
 
 commit d8ea2acf5f137cae99417df4f573d036ee384668
@@ -460,7 +466,7 @@
 Date:	Wed Aug 23 17:54:32 2006 +0800
 
     Add dtb boot-up parameter to default boot commands.
-    
+
     Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
 
 commit b93775c2036b99baa390ea425c4771895bbc63c4
@@ -504,7 +510,7 @@
 Date:	Tue Aug 22 09:31:59 2006 -0500
 
     Fix disable_of booting
-    
+
     Signed-off-by: Matthew McClintock <msm@freescale.com>
 
 commit 87a449c8ac396420cb24260f717ea9e6faa82047
@@ -512,7 +518,7 @@
 Date:	Tue Aug 22 09:23:55 2006 -0500
 
     Support for FDT in uImage format, error when using FDT from flash
-    
+
     Signed-off-by: Matthew McClintock <msm@freescale.com>
 
 commit 75c299c38369d01addd5e054b8a16217b70f4a86
@@ -544,7 +550,7 @@
 Date:	Wed Aug 16 13:59:47 2006 -0500
 
     * Fix disable_of booting
-    
+
     Signed-off-by: Matthew McClintock <msm@freescale.com>
 
 commit 25c751e9adc86e22fe3b5b47cf2806379b575db7
@@ -552,7 +558,7 @@
 Date:	Wed Aug 16 10:54:09 2006 -0500
 
     * Support for FDT in uImage format, error when using FDT from flash
-    
+
     Signed-off-by: Matthew McClintock <msm@freescale.com>
 
 commit fecf1c7e4de1b2779edc18742b91c22bdc32b68b
@@ -560,7 +566,7 @@
 Date:	Mon Aug 14 15:33:38 2006 -0500
 
     Fix BAT0 to actually be cacheable, non-guarded as documented.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 40bc83559db5745681909fd7382ae509567e116d
@@ -570,7 +576,7 @@
     Removed MPC8641HPCN DTS source file from build.
     It is no longer linked into U-Boot; its sources are
     now located in the kernel tree.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 34c3c0e01dbf1f8cc2bd08de92f2b89ba84921eb
@@ -578,11 +584,11 @@
 Date:	Wed Jun 28 10:47:03 2006 -0500
 
     * Switched default PCI speed for 8540 ADS back to 33MHz
-    
+
     * Added comments and a printf to warn that PCI-X won't
       work at 33MHz
       Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit b6c5e1373b6ea0bb37a18e4aeecec00613d1cd39
@@ -590,7 +596,7 @@
 Date:	Wed Jun 28 10:46:35 2006 -0500
 
     * Fixed a bug where 8555 PCI code used the old variable and function names Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit bf1dfffd8c26f8ecdd630a0ae4c834e751e4e452
@@ -598,10 +604,10 @@
 Date:	Wed Jun 28 10:46:13 2006 -0500
 
     * Added VIA configuration table
-    
+
     * Added support for PCI2 on CDS
       Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit c88f9fe66b64247e5b6a38410ba315ca25596d16
@@ -609,7 +615,7 @@
 Date:	Wed Jun 28 10:45:41 2006 -0500
 
     * Fixed PCI memory definitions Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit 97074ed9655309b64231bc2cee69fe85399f8055
@@ -617,7 +623,7 @@
 Date:	Wed Jun 28 10:45:17 2006 -0500
 
     * Added support for initializing second PCI bus on 85xx Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit f0e6f57f71b3c4fdd13028eb03c3f3e91926dda2
@@ -625,7 +631,7 @@
 Date:	Wed Jun 28 10:44:49 2006 -0500
 
     * Added PCI-X #defines for PCI-X initialization Patch by Andy Fleming on 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit a4e11558b810ef2cddffdf7b9d86bc1130441960
@@ -633,7 +639,7 @@
 Date:	Wed Jun 28 10:44:23 2006 -0500
 
     * Made sure the code which disables prefetch for PCI devices sets the size of the prefetch region to 0 Patch by Andy Fleming on 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit 0e16387db1d4aacd5bf35cb6d7c1942765c0347b
@@ -641,7 +647,7 @@
 Date:	Wed Jun 28 10:43:36 2006 -0500
 
     * Add Flat Dev Tree construction for MPC85xx ADS and CDS boards Patch by Jon Loeliger 17-Jan-2006
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 855e6fb073f9d04fe4a7f06c107ecbac6344ddd4
@@ -667,7 +673,7 @@
 Date:	Wed Aug 9 14:33:50 2006 +0100
 
     Add Rapidio support for the MPC8641HPCN
-    
+
     Signed-off-by: John Traill <john.traill@freescale.com>
 
 commit 91a414c7d1fb0eac912592cd995b30c9f23045c9
@@ -675,7 +681,7 @@
 Date:	Tue Aug 8 11:32:43 2006 +0100
 
     Fix caslat calculation
-    
+
     Signed-off-by: John Traill <john.traill@freescale.com>
 
 commit 709d3073e74153278e7904a70819bbef7df50e1a
@@ -719,9 +725,9 @@
 Date:	Fri Jul 28 00:01:34 2006 +0800
 
     Fixed OF device tree of mpc86xxhpcn board.
-    
+
     The changes works in with kernel irq mapping rework.
-    
+
     Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
 
 commit bea3f28d285942bf3f7ab339ce85178ded544225
@@ -729,20 +735,20 @@
 Date:	Wed Jul 12 10:48:05 2006 -0400
 
     Add support for reading and writing mac addresses to or from ID EEPROM.
-    
+
     Added code for reading and writing Mac addresses to/from ID EEPROM(0x57).
     With attached patch, we can use command "mac/mac read/mac save/"
     to read and write EEPROM under u-boot prompt.
-    
+
     U-boot will calculate the checksum of EEPROM while bootup,
     if it is right, then u-boot will check whether the mac address
     of eTSEC0/1/2/3 is availalbe (non-zero).
-    
+
     If there is mac address availabe in EEPROM, u-boot will use it,
     otherewise, u-boot will use the mac address defined in
     MPC8641HPCN.h. This matches the requirement to set unique mac address
     for each TSEC port.
-    
+
     Signed-off-by: Haiying Wang <haiying.wang@freescale.com>
     Signed-off-by: York Sun <yorksun@freescale.com>
 
@@ -751,7 +757,7 @@
 Date:	Thu Jul 13 10:35:10 2006 -0500
 
     Fixed initrd issue by define big RAM
-    
+
     Signed-off-by:Jason Jin <Jason.jin@freescale.com>
 
 commit e6cd2a1785d74ec3d30a86f1cb360be8de478151
@@ -760,7 +766,7 @@
 
     We made a u-boot patch to fix the hang up issue
     when booting filesystem from ramdisk.
-    
+
     Signed-off-by:Jason Jin <Jason.jin@freescale.com>
 
 commit 38433ccc5850ee70549af0b2bc5b920355ef5388
@@ -771,7 +777,7 @@
     * Added comments and a printf to warn that PCI-X won't
       work at 33MHz
       Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit e4c2a0eb0c3e3ffbf824800184ee42bdc99d5b19
@@ -781,7 +787,7 @@
     * Fixed a bug where 8555 PCI code used the old variable and
       function names
       Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit cbfc7ce756b88eb26e5537bc7b625c445c6dcfac
@@ -791,7 +797,7 @@
     * Added VIA configuration table
     * Added support for PCI2 on CDS
       Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit 52c7a68b8d587ebcf5a6b051b58b3d3ffa377ddc
@@ -800,7 +806,7 @@
 
     * Fixed PCI memory definitions
       Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit 087454609e47295443af793a282cddcd91a5f49c
@@ -809,7 +815,7 @@
 
     * Added support for initializing second PCI bus on 85xx
       Patch by Andy Fleming 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit b636aaeb6fd516a442fb611bbeeddf3077a687fb
@@ -818,7 +824,7 @@
 
     * Added PCI-X #defines for PCI-X initialization
       Patch by Andy Fleming on 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit 20abbc6fffa115690107cc942c7abf84bdc03a1b
@@ -828,7 +834,7 @@
     * Made sure the code which disables prefetch for PCI devices
       sets the size of the prefetch region to 0
       Patch by Andy Fleming on 17-Mar-2006
-    
+
     Signed-off-by: Andy Fleming <afleming@freescale.com>
 
 commit 40d5fa35d02df22580593bf0039ab173367e8ef0
@@ -837,7 +843,7 @@
 
     * Add Flat Dev Tree construction for MPC85xx ADS and CDS boards
       Patch by Jon Loeliger 17-Jan-2006
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit be7e8b0cb5a0c49dc180075b96df296a893bf146
@@ -867,7 +873,7 @@
 Date:	Wed Jun 28 08:43:56 2006 -0500
 
     Change Id to symbolic name for RTL8139
-    
+
     Signed-off-by: Jason Jin <Jason.jin@freescale.com>
 
 commit bc09cf3c2bfb8d54c659cbb332f79d0950982fd0
@@ -875,7 +881,7 @@
 Date:	Tue Jun 27 18:12:10 2006 +0800
 
     Fix RTL8139 in big endian
-    
+
     signed-off-by: Jason Jin <Jason.Jin@freescale.com>
     signed-off-by: Wei Zhang <wei.zhang@freescale.com>
 
@@ -884,11 +890,11 @@
 Date:	Tue Jun 27 18:12:23 2006 +0800
 
     Fix Tsec bug when no link
-    
+
      When tftp a non-exist file from the tftp server, u-boot will check
      the link of all eth port. The original file will return wrong link
      state on the no link ports.
-    
+
     signed-off-by: Jason Jin <Jason.Jin@freescale.com>
 
 commit bd22c2b97514fbfb0e03bd9c72b3445e4dbd57e2
@@ -896,11 +902,11 @@
 Date:	Tue Jun 27 18:12:02 2006 +0800
 
     Fix bug for io_bar size during pci scan
-    
+
     During the pci scan process, Some devices return bar_reponse with the
     highest bytes 0, such as the pci bridge in uli1575 return bar_response
     with 0xffffff, So the bar_size should be manually set under 64K.
-    
+
     Signed-off-by: Jason Jin <jason.jin@freescale.com>
 
 commit fa7db9c377bc2353a17bf1d381d65a6c418728f0
@@ -908,7 +914,7 @@
 Date:	Tue Jun 27 18:11:54 2006 +0800
 
     Enable PCIE1 for MPC8641HPCN board
-    
+
     Signed-off-by: Jason Jin <Jason.jin@freescale.com>
 
 commit 684623ce92c5fd32e7db2d6e016945a67c5ffaba
@@ -916,7 +922,7 @@
 Date:	Thu Jun 22 08:51:46 2006 -0500
 
     Fix bug in 8641hpcn reset command with no args.
-    
+
     Signed-off-by: Haiying Wang <haiying.wang@freescale.com>
     Acked-by: Jon Loeliger <jdl@freescale.com>
 
@@ -932,7 +938,7 @@
 
     Do not enable address translation on secondary CPUs.
     Do not set up BATs on secondary CPUs.  Let Linux do the nasty.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 8ecc971618f56029ad99d3516f8b297a6ed58971
@@ -940,7 +946,7 @@
 Date:	Wed Jun 7 10:53:55 2006 -0500
 
     Fix a get_board_sys_clk() use-before-def warning.
-    
+
     Signed-off-by: Jon Loeliger <jdl@jdl.com>
 
 commit d9bf4858fca5aa4d651b283270f77da72ebadfd5
@@ -948,7 +954,7 @@
 Date:	Wed Jun 7 10:52:49 2006 -0500
 
     Allow DTC path to be passed in.
-    
+
     Signed-off-by: Jon Loeliger <jdl@jdl.com>
 
 commit c83ae9ea6d93abbe751bf8a3396236a084e56f87
@@ -962,7 +968,7 @@
 Date:	Wed May 31 13:55:35 2006 -0500
 
     Review cleanups.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit cb5965fb95b77a49f4e6af95248e0c849f4af03e
@@ -974,7 +980,7 @@
     Convert printf() to puts() where possible.
     Use #include "spd_sdram.h" as needed.
     Enhanced reset command usage message a bit.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 3d5c5be547445dd3bd2eb7368d80df03ea437970
@@ -982,7 +988,7 @@
 Date:	Wed May 31 11:39:34 2006 -0500
 
     Removed unneeded local_bus_init() from 8641HPCN board.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 4d3d729c16c392d2982d3266b659d333c927697d
@@ -990,7 +996,7 @@
 Date:	Wed May 31 11:24:28 2006 -0500
 
     Moved mpc8641hpcn_board_reset() out of cpu/ into board/.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit b2a941de060350ad15878d8219825f4950e9bb8e
@@ -998,7 +1004,7 @@
 Date:	Wed May 31 10:07:28 2006 -0500
 
     Remove dead debug code.
-    
+
     Signed-off-by: Jon Loeliger <jdl@jdl.com>
 
 commit 126aa70f10ba3d20e0a6f4d32328250513b77770
@@ -1006,11 +1012,11 @@
 Date:	Tue May 30 17:47:00 2006 -0500
 
     Move mpc86xx PIXIS code to board directory
-    
+
     First cut at moving the PIXIS platform code out of
     the 86xx cpu directory and into board/mpc8641hpcn
     where it belongs.
-    
+
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
 commit 38cee12dcfcc257371c901c7e13e58ecab0a35d8
@@ -1018,11 +1024,11 @@
 Date:	Tue May 30 09:10:32 2006 -0500
 
     Improve "reset" command's interaction with watchdog.
-    
+
 	"reset altbank" will reset another bank WITHOUT watch dog timer enabled
 	"reset altbank wd" will reset another bank WITH watch dog enabled
 	"diswd" will disable watch dog after u-boot boots up successfully
-    
+
     Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
 
 commit 70205e5a6ddc8528b11db9eb4d3fa0209d9fce2a
@@ -1030,10 +1036,10 @@
 Date:	Tue May 30 08:51:19 2006 -0500
 
     Fix two SDRAM setup bugs.
-    
+
 	Fix ECC setup bug.
 	Enable 1T/2T based on number of DIMMs present.
-    
+
     Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
 
 commit d11fec5015334deb2010e36ce00bb118cc5429a5
@@ -1041,7 +1047,7 @@
 Date:	Fri May 26 10:24:48 2006 -0500
 
     Add first draft of the MPC8641HPCN doc/README.
-    
+
     Signed-off-by: Jon Loeliger <jdl@jdl.com>
 
 commit ed45d6c930b5939718a87ee12e25cf9a05978d4a
@@ -1051,7 +1057,7 @@
     Added pci@8000 block.
     Updated ethernet interrupt mappings (moved up 48).
     Cleaned up a few comments.
-    
+
     Signed-off-by: Jon Loeliger <jdl@jdl.com>
 
 commit 3033ebb20fd7c372c7bca3c9955a4692bb2240b7
@@ -1059,7 +1065,7 @@
 Date:	Fri May 26 10:01:16 2006 -0500
 
     Allow args on reset command.
-    
+
     Signed-off-by: Jon Loeliger <jdl@jdl.com>
 
 commit 14e37081ff3cac7ebe6e93836523429853b6b292
@@ -1104,7 +1110,7 @@
 
     Remove unneeded INIT_RAM_LOCK cache twiddling.
     Correctly tracks r29 as global data pointer now.
-    
+
     Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
 
 commit d4dd317b58c126a2a7e73f4764ecc1a7c97f876c
@@ -1118,7 +1124,7 @@
 Date:	Tue May 9 08:23:49 2006 -0500
 
     Get MPC8641HPCN flash images working.
-    
+
 	Enable the CFI driver.
 	Remove bogus LAWBAR7 cruft.
 	Use correct TEXT_BASE, Fixup load script.
diff --git a/Makefile b/Makefile
index c871d49..62dafc5 100644
--- a/Makefile
+++ b/Makefile
@@ -330,7 +330,8 @@
 
 .PHONY : CHANGELOG
 CHANGELOG:
-	git log --no-merges U-Boot-1_1_5.. | unexpand -a > $@
+	git log --no-merges U-Boot-1_1_5.. | \
+	unexpand -a | sed -e 's/\s\s*$$//' > $@
 
 #########################################################################