dm: core: fix devfdt_remap_addr_index()
[oweals/u-boot.git] / drivers / mtd / nand / mxc_nand_spl.c
index f13d5fc58161a2bd8cb91ed87d5c1acc352a5db6..6c03db8428f65d42fad0ec88cf879212c2da7033 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2009
  * Magnus Lilja <lilja.magnus@gmail.com>
@@ -7,21 +8,6 @@
  *
  * (C) Copyright 2006-2008
  * Stefan Roese, DENX Software Engineering, sr at denx.de.
- *
- * 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 <common.h>
@@ -245,7 +231,7 @@ static int nfc_read_page(unsigned int page_address, unsigned char *buf)
        nfc_nand_read_page(page_address);
 
        if (nfc_nand_check_ecc())
-               return -1;
+               return -EBADMSG;
 
        src = (u32 *)&nfc->main_area[0][0];
        dst = (u32 *)buf;
@@ -350,7 +336,7 @@ void nand_boot(void)
        if (!nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
                        CONFIG_SYS_NAND_U_BOOT_SIZE,
                        (uchar *)CONFIG_SYS_NAND_U_BOOT_DST)) {
-               /* Copy from NAND successful, start U-boot */
+               /* Copy from NAND successful, start U-Boot */
                uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;
                uboot();
        } else {
@@ -359,3 +345,6 @@ void nand_boot(void)
        }
 }
 #endif
+
+void nand_init(void) {}
+void nand_deselect(void) {}