efi_loader: abort on unsupported relocation type
[platform/kernel/u-boot.git] / board / amcc / yucca / yucca.c
index e0d19bc..8ee3851 100644 (file)
@@ -2,37 +2,21 @@
  * (C) Copyright 2006
  * Wolfgang Denk, DENX Software Engineering, wd@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
- *
  * Port to AMCC-440SPE Evaluation Board SOP - April 2005
  *
  * PCIe supporting routines derived from Linux 440SPe PCIe driver.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
-#include <ppc4xx.h>
+#include <asm/ppc4xx.h>
 #include <i2c.h>
 #include <netdev.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <asm/4xx_pcie.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 
 #include "yucca.h"
 
@@ -47,9 +31,6 @@ void fpga_init (void);
 #define DEBUGF(fmt,args...)
 #endif
 
-#define FALSE  0
-#define TRUE   1
-
 int board_early_init_f (void)
 {
 /*----------------------------------------------------------------------------+
@@ -542,12 +523,13 @@ int board_early_init_f (void)
 
 int checkboard (void)
 {
-       char *s = getenv("serial#");
+       char buf[64];
+       int i = getenv_f("serial#", buf, sizeof(buf));
 
        printf("Board: Yucca - AMCC 440SPe Evaluation Board");
-       if (s != NULL) {
+       if (i > 0) {
                puts(", serial# ");
-               puts(s);
+               puts(buf);
        }
        putc('\n');
 
@@ -555,7 +537,7 @@ int checkboard (void)
 }
 
 /*
- * Override the default functions in cpu/ppc4xx/44x_spd_ddr2.c with
+ * Override the default functions in arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c with
  * board specific values.
  */
 static int ppc440spe_rev_a(void)
@@ -609,7 +591,7 @@ int board_pcie_card_present(int port)
 /*
  * For the given slot, set endpoint mode, send power to the slot,
  * turn on the green LED and turn off the yellow LED, enable the
- * clock. In end point mode reset bit is read only.
+ * clock. In endpoint mode reset bit is read only.
  */
 void board_pcie_setup_port(int port, int rootpoint)
 {
@@ -708,17 +690,6 @@ void fpga_init(void)
        return;
 }
 
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return (ctrlc());
-}
-#endif
-
 /*---------------------------------------------------------------------------+
  | onboard_pci_arbiter_selected => from EPLD
  +---------------------------------------------------------------------------*/