]> git.sur5r.net Git - u-boot/blobdiff - board/freescale/m5329evb/nand.c
pinctrl: renesas: Add PORT_GP_11 helper macro
[u-boot] / board / freescale / m5329evb / nand.c
index 8d88bc03c014f3141b2df2b167fb39207ae55d9d..58b8ee51d37802f8bd40fdb5a44ca4cd2e5ef8a3 100644 (file)
@@ -1,11 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2000-2003
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
  * Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <config.h>
@@ -13,8 +12,6 @@
 #include <asm/io.h>
 #include <asm/immap.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #if defined(CONFIG_CMD_NAND)
 #include <nand.h>
 #include <linux/mtd/mtd.h>
@@ -24,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static void nand_hwcontrol(struct mtd_info *mtdinfo, int cmd, unsigned int ctrl)
 {
-       struct nand_chip *this = mtdinfo->priv;
+       struct nand_chip *this = mtd_to_nand(mtdinfo);
        volatile u16 *nCE = (u16 *) CONFIG_SYS_LATCH_ADDR;
 
        if (ctrl & NAND_CTRL_CHANGE) {