Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
[platform/kernel/u-boot.git] / board / esd / du440 / du440.c
index ba3c97c..b168b24 100644 (file)
@@ -2,20 +2,7 @@
  * (C) Copyright 2008
  * Matthias Fuchs, esd gmbh, matthias.fuchs@esd-electronics.com
  *
- * 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
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -24,7 +11,7 @@
 #include <asm/bitops.h>
 #include <command.h>
 #include <i2c.h>
-#include <ppc440.h>
+#include <asm/ppc440.h>
 #include "du440.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -265,8 +252,8 @@ int misc_init_r(void)
         * This fix will make the MAL burst disabling patch for the Linux
         * EMAC driver obsolete.
         */
-       reg = mfdcr(PLB4_ACR) & ~PLB4_ACR_WRP;
-       mtdcr(PLB4_ACR, reg);
+       reg = mfdcr(PLB4A0_ACR) & ~PLB4Ax_ACR_WRP_MASK;
+       mtdcr(PLB4A0_ACR, reg);
 
        /*
         * release IO-RST#
@@ -350,7 +337,7 @@ int checkboard(void)
 
        puts("Board: DU440");
 
-       if (getenv_r("serial#", serno, sizeof(serno)) > 0) {
+       if (getenv_f("serial#", serno, sizeof(serno)) > 0) {
                puts(", serial# ");
                puts(serno);
        }
@@ -385,7 +372,6 @@ int last_stage_init(void)
        return 0;
 }
 
-#if defined(CONFIG_I2C_MULTI_BUS)
 /*
  * read field strength from I2C ADC
  */
@@ -500,7 +486,6 @@ U_BOOT_CMD(
        "Initialize USB hub",
        ""
 );
-#endif /* CONFIG_I2C_MULTI_BUS */
 
 #define CONFIG_SYS_BOOT_EEPROM_PAGE_WRITE_BITS 3
 int boot_eeprom_write (unsigned dev_addr,
@@ -831,7 +816,7 @@ int do_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        *d = '\0';
 
        start = get_ticks();
-       ret = run_command (cmd, 0);
+       ret = run_command(cmd, 0);
        end = get_ticks();
 
        printf("ticks=%ld\n", (ulong)(end - start));