]> git.sur5r.net Git - u-boot/blobdiff - board/freescale/mpc8360erdk/nand.c
VCMA9: remove EXT2 support
[u-boot] / board / freescale / mpc8360erdk / nand.c
index 8b44a0f38c3c4b7d5eedb5406cfe7c016db4b0e1..237c0c42e096b252344a83c3b13e861dc58eded4 100644 (file)
@@ -4,10 +4,7 @@
  * Copyright (C) 2007 MontaVista Software, Inc.
  *                    Anton Vorontsov <avorontsov@ru.mvista.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.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <config.h>
@@ -18,7 +15,7 @@
 #include <linux/mtd/fsl_upm.h>
 #include <nand.h>
 
-static struct immap *im = (struct immap *)CFG_IMMR;
+static struct immap *im = (struct immap *)CONFIG_SYS_IMMR;
 
 static const u32 upm_array[] = {
        0x0ff03c30, 0x0ff03c30, 0x0ff03c34, 0x0ff33c30, /* Words  0 to  3 */
@@ -57,7 +54,7 @@ static void upm_setup(struct fsl_upm *upm)
                eieio();
 }
 
-static int dev_ready(void)
+static int dev_ready(int chip_nr)
 {
        if (in_be32(&im->qepio.ioport[4].pdat) & 0x00002000) {
                debug("nand ready\n");
@@ -70,21 +67,21 @@ static int dev_ready(void)
 
 static struct fsl_upm_nand fun = {
        .upm = {
-               .io_addr = (void *)CFG_NAND_BASE,
+               .io_addr = (void *)CONFIG_SYS_NAND_BASE,
        },
        .width = 8,
        .upm_cmd_offset = 8,
        .upm_addr_offset = 16,
        .dev_ready = dev_ready,
-       .wait_pattern = 1,
+       .wait_flags = FSL_UPM_WAIT_RUN_PATTERN,
        .chip_delay = 50,
 };
 
 int board_nand_init(struct nand_chip *nand)
 {
-       fun.upm.mxmr = &im->lbus.mamr;
-       fun.upm.mdr = &im->lbus.mdr;
-       fun.upm.mar = &im->lbus.mar;
+       fun.upm.mxmr = &im->im_lbc.mamr;
+       fun.upm.mdr = &im->im_lbc.mdr;
+       fun.upm.mar = &im->im_lbc.mar;
 
        upm_setup(&fun.upm);