]> git.sur5r.net Git - u-boot/blobdiff - drivers/mtd/nand/denali.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / drivers / mtd / nand / denali.c
index b116d3a17c4eb28f24513a6229e9e6b2bfe218e7..6266c8aa925476fe24cb9c173ab972e79c3922f7 100644 (file)
@@ -1,19 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2014       Panasonic Corporation
  * Copyright (C) 2013-2014, Altera Corporation <www.altera.com>
  * Copyright (C) 2009-2010, Intel Corporation and its suppliers.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
-#include <common.h>
-#include <malloc.h>
-#include <nand.h>
 #include <dm.h>
+#include <nand.h>
 #include <linux/bitfield.h>
 #include <linux/dma-direction.h>
 #include <linux/errno.h>
 #include <linux/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/rawnand.h>
 
 #include "denali.h"
 
@@ -938,7 +937,7 @@ static int denali_erase(struct mtd_info *mtd, int page)
        return irq_status & INTR__ERASE_COMP ? 0 : NAND_STATUS_FAIL;
 }
 
-static int __maybe_unused denali_setup_data_interface(struct mtd_info *mtd, int chipnr,
+static int denali_setup_data_interface(struct mtd_info *mtd, int chipnr,
                                       const struct nand_data_interface *conf)
 {
        struct denali_nand_info *denali = mtd_to_denali(mtd);
@@ -1366,29 +1365,3 @@ free_buf:
 
        return ret;
 }
-
-#ifndef CONFIG_NAND_DENALI_DT
-static int __board_nand_init(void)
-{
-       struct denali_nand_info *denali;
-
-       denali = kzalloc(sizeof(*denali), GFP_KERNEL);
-       if (!denali)
-               return -ENOMEM;
-
-       /*
-        * In the future, these base addresses should be taken from
-        * Device Tree or platform data.
-        */
-       denali->reg = (void  __iomem *)CONFIG_SYS_NAND_REGS_BASE;
-       denali->host = (void  __iomem *)CONFIG_SYS_NAND_DATA_BASE;
-
-       return denali_init(denali);
-}
-
-void board_nand_init(void)
-{
-       if (__board_nand_init() < 0)
-               pr_warn("Failed to initialize Denali NAND controller.\n");
-}
-#endif