]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/korat/korat.c
Merge branch 'master' of git://git.denx.de/u-boot-usb
[karo-tx-uboot.git] / board / korat / korat.c
index d5260dc232e4f9840ff606f1429fcd60df77bde3..d9ab2fd421651df92c7784424cb7dc0441835056 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007-2009
+ * (C) Copyright 2007-2010
  * Larry Johnson, lrj@acm.org
  *
  * (C) Copyright 2006-2007
@@ -9,29 +9,16 @@
  * Jacqueline Pira-Ferriol, AMCC/IBM, jpira-ferriol@fr.ibm.com
  * Alain Saurel,           AMCC/IBM, alain.saurel@fr.ibm.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>
 #include <fdt_support.h>
 #include <i2c.h>
 #include <libfdt.h>
-#include <ppc440.h>
+#include <asm/ppc440.h>
 #include <asm/bitops.h>
-#include <asm/gpio.h>
+#include <asm/ppc4xx-gpio.h>
 #include <asm/io.h>
 #include <asm/ppc4xx-uic.h>
 #include <asm/processor.h>
@@ -417,7 +404,7 @@ int misc_init_r(void)
                 * then connect the CompactFlash controller to the PowerPC USB
                 * port.
                 */
-               printf("Attaching CompactFalsh controller to PPC USB\n");
+               printf("Attaching CompactFlash controller to PPC USB\n");
                out_8((u8 *) CONFIG_SYS_CPLD_BASE + 0x02,
                      in_8((u8 *) CONFIG_SYS_CPLD_BASE + 0x02) | 0x10);
        } else {
@@ -425,7 +412,7 @@ int misc_init_r(void)
                        printf("Warning: \"korat_usbcf\" is not set to a legal "
                               "value (\"ppc\" or \"pci\")\n");
 
-               printf("Attaching CompactFalsh controller to PCI USB\n");
+               printf("Attaching CompactFlash controller to PCI USB\n");
        }
        if (act == NULL || strcmp(act, "hostdev") == 0) {
                /* SDR Setting */
@@ -553,8 +540,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);
 
        set_serial_number();
        set_mac_addresses();
@@ -623,7 +610,7 @@ void pci_target_init(struct pci_controller *hose)
 #endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
 
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
 {
        u32 val[4];
        int rc;
@@ -640,5 +627,7 @@ void ft_board_setup(void *blob, bd_t *bd)
        if (rc)
                printf("Unable to update property NOR mapping, err=%s\n",
                       fdt_strerror(rc));
+
+       return 0;
 }
 #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */