All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-07 20:18 ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Hi,

After the addition of the NAND framework ->exec_op() interface (see [1]
for the series preparing it and [2] for the last version of the
core-side implementation of ->exec_op() itself), this series replaces
the current Marvell NAND controller driver pxa3xx_nand.c with a rework
called marvell_nand.c.

Aside the fact that it drops the big state machine, improves the overall
speed and implements raw accesses, it is the first driver-side
implementation of the ->exec_op() interface and may be used as reference
for latter reworks of the same type.

One may find more detail about why a completely new driver is needed in
the commit log of:

    "mtd: nand: add reworked Marvell NAND controller driver"

The series also changes the device tree NAND node definition for all
platforms referring to the Marvell driver to use the new bindings. They
are more hierarchical and fit the real organization of the hardware, by
having NAND partitions that are part of NAND chip nodes, themselves part
of the NAND controller node.

These changes have been tested on:
   - PXA3xx platform with a CM-X300 board (2kiB page NAND, 1b/512B
     strength, Hamming ECC engine) [32 bits]
   - Armada 385 DB AP (4kiB page NAND, 4b/512B, BCH ECC engine) [32 bits]
   - Armada 398 DB (4kiB page NAND, 8b/512B, BCH ECC engine using a layout
     with a last chunk different than the others) [32 bits]
   - Armada 7040 DB and Armada 8040 DB (4kiB page NAND, 4b/512B, BCH ECC
     engine) [64 bits]

Robert, it would be great if you could also do more testing on PXA and
validate this driver. If needed, a branch ready to be tested is
available at [3]. It is based on nand/next and has all the changes
brought by the previously mentionned series as well as this one.

Thank you,
Miquèl


[1] https://www.spinics.net/lists/arm-kernel/msg619633.html
[2] http://lists.infradead.org/pipermail/linux-mtd/2017-December/077965.html
[3] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc-rework

Miquel Raynal (12):
  dt-bindings: mtd: add Marvell NAND controller documentation
  mtd: nand: add reworked Marvell NAND controller driver
  mtd: nand: replace pxa3xx_nand driver by its rework called
    marvell_nand
  dt-bindings: mtd: remove pxa3xx NAND controller documentation
  mtd: nand: remove useless fields from pxa3xx NAND platform data
  ARM: dts: armada-370-xp: use reworked NAND controller driver
  ARM: dts: armada-375: use reworked NAND controller driver
  ARM: dts: armada-38x: use reworked NAND controller driver
  ARM: dts: armada-39x: use reworked NAND controller driver
  ARM: dts: pxa: use reworked NAND controller driver
  ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
  ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K

 .../devicetree/bindings/mtd/marvell-nand.txt       |   84 +
 .../devicetree/bindings/mtd/pxa3xx-nand.txt        |   50 -
 arch/arm/boot/dts/armada-370-db.dts                |   57 +-
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts     |  120 +-
 arch/arm/boot/dts/armada-370-mirabox.dts           |   51 +-
 arch/arm/boot/dts/armada-370-netgear-rn102.dts     |   90 +-
 arch/arm/boot/dts/armada-370-netgear-rn104.dts     |   90 +-
 arch/arm/boot/dts/armada-370-rd.dts                |   52 +-
 arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |   64 +-
 arch/arm/boot/dts/armada-370-xp.dtsi               |    6 +-
 arch/arm/boot/dts/armada-375-db.dts                |   50 +-
 arch/arm/boot/dts/armada-375.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-385-db-ap.dts             |   69 +-
 arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  129 +-
 arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  129 +-
 arch/arm/boot/dts/armada-385-linksys-rango.dts     |  141 +-
 arch/arm/boot/dts/armada-385-linksys-shelby.dts    |  129 +-
 arch/arm/boot/dts/armada-385-linksys.dtsi          |   16 +-
 arch/arm/boot/dts/armada-388-db.dts                |   55 +-
 arch/arm/boot/dts/armada-38x.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-390-db.dts                |   66 +-
 arch/arm/boot/dts/armada-395-gp.dts                |   74 +-
 arch/arm/boot/dts/armada-398-db.dts                |   60 +-
 arch/arm/boot/dts/armada-39x.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |    2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |    2 +-
 arch/arm/boot/dts/armada-xp-db.dts                 |    2 +-
 arch/arm/boot/dts/armada-xp-gp.dts                 |    2 +-
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |    2 +-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts      |  156 +-
 arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |   90 +-
 arch/arm/boot/dts/pxa3xx.dtsi                      |    6 +-
 arch/arm/configs/cm_x300_defconfig                 |    2 +-
 arch/arm/configs/mvebu_v7_defconfig                |    2 +-
 arch/arm/configs/pxa3xx_defconfig                  |    3 +-
 arch/arm/configs/pxa_defconfig                     |    2 +-
 arch/arm/configs/raumfeld_defconfig                |    2 +-
 arch/arm/mach-mmp/ttc_dkb.c                        |    4 +-
 arch/arm/mach-pxa/cm-x300.c                        |    8 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c                 |    8 +-
 arch/arm/mach-pxa/colibri.h                        |    2 +-
 arch/arm/mach-pxa/littleton.c                      |   10 +-
 arch/arm/mach-pxa/mxm8x10.c                        |   10 +-
 arch/arm/mach-pxa/raumfeld.c                       |    6 +-
 arch/arm/mach-pxa/zylonite.c                       |   10 +-
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     |   52 +-
 arch/arm64/boot/dts/marvell/armada-8040-db.dts     |   46 +-
 .../boot/dts/marvell/armada-cp110-master.dtsi      |    8 +-
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi |   10 +-
 drivers/mtd/nand/Kconfig                           |   12 +
 drivers/mtd/nand/Makefile                          |    2 +-
 drivers/mtd/nand/marvell_nand.c                    | 2950 ++++++++++++++++++++
 drivers/mtd/nand/pxa3xx_nand.c                     | 2104 --------------
 include/linux/platform_data/mtd-nand-pxa3xx.h      |   43 +-
 54 files changed, 4093 insertions(+), 3065 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
 delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
 create mode 100644 drivers/mtd/nand/marvell_nand.c
 delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-07 20:18 ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Hi,

After the addition of the NAND framework ->exec_op() interface (see [1]
for the series preparing it and [2] for the last version of the
core-side implementation of ->exec_op() itself), this series replaces
the current Marvell NAND controller driver pxa3xx_nand.c with a rework
called marvell_nand.c.

Aside the fact that it drops the big state machine, improves the overall
speed and implements raw accesses, it is the first driver-side
implementation of the ->exec_op() interface and may be used as reference
for latter reworks of the same type.

One may find more detail about why a completely new driver is needed in
the commit log of:

    "mtd: nand: add reworked Marvell NAND controller driver"

The series also changes the device tree NAND node definition for all
platforms referring to the Marvell driver to use the new bindings. They
are more hierarchical and fit the real organization of the hardware, by
having NAND partitions that are part of NAND chip nodes, themselves part
of the NAND controller node.

These changes have been tested on:
   - PXA3xx platform with a CM-X300 board (2kiB page NAND, 1b/512B
     strength, Hamming ECC engine) [32 bits]
   - Armada 385 DB AP (4kiB page NAND, 4b/512B, BCH ECC engine) [32 bits]
   - Armada 398 DB (4kiB page NAND, 8b/512B, BCH ECC engine using a layout
     with a last chunk different than the others) [32 bits]
   - Armada 7040 DB and Armada 8040 DB (4kiB page NAND, 4b/512B, BCH ECC
     engine) [64 bits]

Robert, it would be great if you could also do more testing on PXA and
validate this driver. If needed, a branch ready to be tested is
available at [3]. It is based on nand/next and has all the changes
brought by the previously mentionned series as well as this one.

Thank you,
Miquèl


[1] https://www.spinics.net/lists/arm-kernel/msg619633.html
[2] http://lists.infradead.org/pipermail/linux-mtd/2017-December/077965.html
[3] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc-rework

Miquel Raynal (12):
  dt-bindings: mtd: add Marvell NAND controller documentation
  mtd: nand: add reworked Marvell NAND controller driver
  mtd: nand: replace pxa3xx_nand driver by its rework called
    marvell_nand
  dt-bindings: mtd: remove pxa3xx NAND controller documentation
  mtd: nand: remove useless fields from pxa3xx NAND platform data
  ARM: dts: armada-370-xp: use reworked NAND controller driver
  ARM: dts: armada-375: use reworked NAND controller driver
  ARM: dts: armada-38x: use reworked NAND controller driver
  ARM: dts: armada-39x: use reworked NAND controller driver
  ARM: dts: pxa: use reworked NAND controller driver
  ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
  ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K

 .../devicetree/bindings/mtd/marvell-nand.txt       |   84 +
 .../devicetree/bindings/mtd/pxa3xx-nand.txt        |   50 -
 arch/arm/boot/dts/armada-370-db.dts                |   57 +-
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts     |  120 +-
 arch/arm/boot/dts/armada-370-mirabox.dts           |   51 +-
 arch/arm/boot/dts/armada-370-netgear-rn102.dts     |   90 +-
 arch/arm/boot/dts/armada-370-netgear-rn104.dts     |   90 +-
 arch/arm/boot/dts/armada-370-rd.dts                |   52 +-
 arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |   64 +-
 arch/arm/boot/dts/armada-370-xp.dtsi               |    6 +-
 arch/arm/boot/dts/armada-375-db.dts                |   50 +-
 arch/arm/boot/dts/armada-375.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-385-db-ap.dts             |   69 +-
 arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  129 +-
 arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  129 +-
 arch/arm/boot/dts/armada-385-linksys-rango.dts     |  141 +-
 arch/arm/boot/dts/armada-385-linksys-shelby.dts    |  129 +-
 arch/arm/boot/dts/armada-385-linksys.dtsi          |   16 +-
 arch/arm/boot/dts/armada-388-db.dts                |   55 +-
 arch/arm/boot/dts/armada-38x.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-390-db.dts                |   66 +-
 arch/arm/boot/dts/armada-395-gp.dts                |   74 +-
 arch/arm/boot/dts/armada-398-db.dts                |   60 +-
 arch/arm/boot/dts/armada-39x.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |    2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |    2 +-
 arch/arm/boot/dts/armada-xp-db.dts                 |    2 +-
 arch/arm/boot/dts/armada-xp-gp.dts                 |    2 +-
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |    2 +-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts      |  156 +-
 arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |   90 +-
 arch/arm/boot/dts/pxa3xx.dtsi                      |    6 +-
 arch/arm/configs/cm_x300_defconfig                 |    2 +-
 arch/arm/configs/mvebu_v7_defconfig                |    2 +-
 arch/arm/configs/pxa3xx_defconfig                  |    3 +-
 arch/arm/configs/pxa_defconfig                     |    2 +-
 arch/arm/configs/raumfeld_defconfig                |    2 +-
 arch/arm/mach-mmp/ttc_dkb.c                        |    4 +-
 arch/arm/mach-pxa/cm-x300.c                        |    8 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c                 |    8 +-
 arch/arm/mach-pxa/colibri.h                        |    2 +-
 arch/arm/mach-pxa/littleton.c                      |   10 +-
 arch/arm/mach-pxa/mxm8x10.c                        |   10 +-
 arch/arm/mach-pxa/raumfeld.c                       |    6 +-
 arch/arm/mach-pxa/zylonite.c                       |   10 +-
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     |   52 +-
 arch/arm64/boot/dts/marvell/armada-8040-db.dts     |   46 +-
 .../boot/dts/marvell/armada-cp110-master.dtsi      |    8 +-
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi |   10 +-
 drivers/mtd/nand/Kconfig                           |   12 +
 drivers/mtd/nand/Makefile                          |    2 +-
 drivers/mtd/nand/marvell_nand.c                    | 2950 ++++++++++++++++++++
 drivers/mtd/nand/pxa3xx_nand.c                     | 2104 --------------
 include/linux/platform_data/mtd-nand-pxa3xx.h      |   43 +-
 54 files changed, 4093 insertions(+), 3065 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
 delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
 create mode 100644 drivers/mtd/nand/marvell_nand.c
 delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c

-- 
2.11.0

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-07 20:18 ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

After the addition of the NAND framework ->exec_op() interface (see [1]
for the series preparing it and [2] for the last version of the
core-side implementation of ->exec_op() itself), this series replaces
the current Marvell NAND controller driver pxa3xx_nand.c with a rework
called marvell_nand.c.

Aside the fact that it drops the big state machine, improves the overall
speed and implements raw accesses, it is the first driver-side
implementation of the ->exec_op() interface and may be used as reference
for latter reworks of the same type.

One may find more detail about why a completely new driver is needed in
the commit log of:

    "mtd: nand: add reworked Marvell NAND controller driver"

The series also changes the device tree NAND node definition for all
platforms referring to the Marvell driver to use the new bindings. They
are more hierarchical and fit the real organization of the hardware, by
having NAND partitions that are part of NAND chip nodes, themselves part
of the NAND controller node.

These changes have been tested on:
   - PXA3xx platform with a CM-X300 board (2kiB page NAND, 1b/512B
     strength, Hamming ECC engine) [32 bits]
   - Armada 385 DB AP (4kiB page NAND, 4b/512B, BCH ECC engine) [32 bits]
   - Armada 398 DB (4kiB page NAND, 8b/512B, BCH ECC engine using a layout
     with a last chunk different than the others) [32 bits]
   - Armada 7040 DB and Armada 8040 DB (4kiB page NAND, 4b/512B, BCH ECC
     engine) [64 bits]

Robert, it would be great if you could also do more testing on PXA and
validate this driver. If needed, a branch ready to be tested is
available at [3]. It is based on nand/next and has all the changes
brought by the previously mentionned series as well as this one.

Thank you,
Miqu?l


[1] https://www.spinics.net/lists/arm-kernel/msg619633.html
[2] http://lists.infradead.org/pipermail/linux-mtd/2017-December/077965.html
[3] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc-rework

Miquel Raynal (12):
  dt-bindings: mtd: add Marvell NAND controller documentation
  mtd: nand: add reworked Marvell NAND controller driver
  mtd: nand: replace pxa3xx_nand driver by its rework called
    marvell_nand
  dt-bindings: mtd: remove pxa3xx NAND controller documentation
  mtd: nand: remove useless fields from pxa3xx NAND platform data
  ARM: dts: armada-370-xp: use reworked NAND controller driver
  ARM: dts: armada-375: use reworked NAND controller driver
  ARM: dts: armada-38x: use reworked NAND controller driver
  ARM: dts: armada-39x: use reworked NAND controller driver
  ARM: dts: pxa: use reworked NAND controller driver
  ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
  ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K

 .../devicetree/bindings/mtd/marvell-nand.txt       |   84 +
 .../devicetree/bindings/mtd/pxa3xx-nand.txt        |   50 -
 arch/arm/boot/dts/armada-370-db.dts                |   57 +-
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts     |  120 +-
 arch/arm/boot/dts/armada-370-mirabox.dts           |   51 +-
 arch/arm/boot/dts/armada-370-netgear-rn102.dts     |   90 +-
 arch/arm/boot/dts/armada-370-netgear-rn104.dts     |   90 +-
 arch/arm/boot/dts/armada-370-rd.dts                |   52 +-
 arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |   64 +-
 arch/arm/boot/dts/armada-370-xp.dtsi               |    6 +-
 arch/arm/boot/dts/armada-375-db.dts                |   50 +-
 arch/arm/boot/dts/armada-375.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-385-db-ap.dts             |   69 +-
 arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  129 +-
 arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  129 +-
 arch/arm/boot/dts/armada-385-linksys-rango.dts     |  141 +-
 arch/arm/boot/dts/armada-385-linksys-shelby.dts    |  129 +-
 arch/arm/boot/dts/armada-385-linksys.dtsi          |   16 +-
 arch/arm/boot/dts/armada-388-db.dts                |   55 +-
 arch/arm/boot/dts/armada-38x.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-390-db.dts                |   66 +-
 arch/arm/boot/dts/armada-395-gp.dts                |   74 +-
 arch/arm/boot/dts/armada-398-db.dts                |   60 +-
 arch/arm/boot/dts/armada-39x.dtsi                  |    6 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |    2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |    2 +-
 arch/arm/boot/dts/armada-xp-db.dts                 |    2 +-
 arch/arm/boot/dts/armada-xp-gp.dts                 |    2 +-
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |    2 +-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts      |  156 +-
 arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |   90 +-
 arch/arm/boot/dts/pxa3xx.dtsi                      |    6 +-
 arch/arm/configs/cm_x300_defconfig                 |    2 +-
 arch/arm/configs/mvebu_v7_defconfig                |    2 +-
 arch/arm/configs/pxa3xx_defconfig                  |    3 +-
 arch/arm/configs/pxa_defconfig                     |    2 +-
 arch/arm/configs/raumfeld_defconfig                |    2 +-
 arch/arm/mach-mmp/ttc_dkb.c                        |    4 +-
 arch/arm/mach-pxa/cm-x300.c                        |    8 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c                 |    8 +-
 arch/arm/mach-pxa/colibri.h                        |    2 +-
 arch/arm/mach-pxa/littleton.c                      |   10 +-
 arch/arm/mach-pxa/mxm8x10.c                        |   10 +-
 arch/arm/mach-pxa/raumfeld.c                       |    6 +-
 arch/arm/mach-pxa/zylonite.c                       |   10 +-
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     |   52 +-
 arch/arm64/boot/dts/marvell/armada-8040-db.dts     |   46 +-
 .../boot/dts/marvell/armada-cp110-master.dtsi      |    8 +-
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi |   10 +-
 drivers/mtd/nand/Kconfig                           |   12 +
 drivers/mtd/nand/Makefile                          |    2 +-
 drivers/mtd/nand/marvell_nand.c                    | 2950 ++++++++++++++++++++
 drivers/mtd/nand/pxa3xx_nand.c                     | 2104 --------------
 include/linux/platform_data/mtd-nand-pxa3xx.h      |   43 +-
 54 files changed, 4093 insertions(+), 3065 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
 delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
 create mode 100644 drivers/mtd/nand/marvell_nand.c
 delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c

-- 
2.11.0

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Document the legacy and the new bindings for Marvell NAND controller.

The pxa3xx_nand.c driver does only support legacy bindings, which are
incomplete and inaccurate. A rework of this controller (called
marvell_nand.c) does support both.

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 .../devicetree/bindings/mtd/marvell-nand.txt       | 84 ++++++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt

diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
new file mode 100644
index 000000000000..0b3d5e0bab83
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
@@ -0,0 +1,84 @@
+Marvell NAND Flash Controller (NFC)
+
+Required properties:
+- compatible: can be one of the following:
+    * "marvell,armada-8k-nand-controller"
+    * "marvell,armada370-nand-controller"
+    * "marvell,pxa3xx-nand-controller"
+    * "marvell,armada-8k-nand" (deprecated)
+    * "marvell,armada370-nand" (deprecated)
+    * "marvell,pxa3xx-nand" (deprecated)
+- reg: NAND flash controller memory area.
+- #address-cells: shall be set to 1. Encode the NAND CS.
+- #size-cells: shall be set to 0.
+- interrupts: shall define the NAND controller interrupt.
+- clocks: shall reference the NAND controller clock.
+- marvell,system-controller: Set to retrieve the syscon node that handles
+  NAND controller related registers (only required with the
+  "marvell,armada-8k-nand[-controller]" compatibles).
+
+Optional properties:
+- label: see partition.txt. New platforms shall omit this property.
+- dmas: shall reference DMA channel associated to the NAND controller.
+- dma-names: shall be "rxtx".
+
+Optional children nodes:
+Children nodes represent the available NAND chips.
+
+Required properties:
+- reg: shall contain the native Chip Select ids (0-3)
+- marvell,rb: shall contain the native Ready/Busy ids (0-1)
+
+Optional properties:
+- marvell,nand-keep-config: orders the driver not to take the timings
+  from the core and leaving them completely untouched. Bootloader
+  timings will then be used.
+- nand-on-flash-bbt: see nand.txt.
+- nand-ecc-mode: see nand.txt. Will use hardware ECC if not specified.
+- nand-ecc-algo: see nand.txt. This property may be added when using
+  hardware ECC for clarification but will be ignored by the driver
+  because ECC mode is chosen depending on the page size and the strength
+  required by the NAND chip. This value may be overwritten with
+  nand-ecc-strength property.
+- nand-ecc-strength: see nand.txt.
+- nand-ecc-step-size: see nand.txt. This has no effect and will be
+  ignored by the driver when using hardware ECC because Marvell's NAND
+  flash controller does use fixed strength (1-bit for Hamming, 16-bit
+  for BCH), so the step size will shrink or grow in order to fit the
+  required strength. Step sizes are not completely random for all and
+  follow certain patterns described in AN-379, "Marvell SoC NFC ECC".
+
+See Documentation/devicetree/bindings/mtd/nand.txt for more details on
+generic bindings.
+
+
+Example:
+nand_controller: nand-controller@d0000 {
+	compatible = "marvell,armada370-nand-controller";
+	reg = <0xd0000 0x54>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+	clocks = <&coredivclk 0>;
+
+	nand@0 {
+		reg = <0>;
+		marvell,rb = <0>;
+		nand-ecc-mode = "hw";
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "Rootfs";
+				reg = <0x00000000 0x40000000>;
+			};
+		};
+	};
+};
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Document the legacy and the new bindings for Marvell NAND controller.

The pxa3xx_nand.c driver does only support legacy bindings, which are
incomplete and inaccurate. A rework of this controller (called
marvell_nand.c) does support both.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 .../devicetree/bindings/mtd/marvell-nand.txt       | 84 ++++++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt

diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
new file mode 100644
index 000000000000..0b3d5e0bab83
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
@@ -0,0 +1,84 @@
+Marvell NAND Flash Controller (NFC)
+
+Required properties:
+- compatible: can be one of the following:
+    * "marvell,armada-8k-nand-controller"
+    * "marvell,armada370-nand-controller"
+    * "marvell,pxa3xx-nand-controller"
+    * "marvell,armada-8k-nand" (deprecated)
+    * "marvell,armada370-nand" (deprecated)
+    * "marvell,pxa3xx-nand" (deprecated)
+- reg: NAND flash controller memory area.
+- #address-cells: shall be set to 1. Encode the NAND CS.
+- #size-cells: shall be set to 0.
+- interrupts: shall define the NAND controller interrupt.
+- clocks: shall reference the NAND controller clock.
+- marvell,system-controller: Set to retrieve the syscon node that handles
+  NAND controller related registers (only required with the
+  "marvell,armada-8k-nand[-controller]" compatibles).
+
+Optional properties:
+- label: see partition.txt. New platforms shall omit this property.
+- dmas: shall reference DMA channel associated to the NAND controller.
+- dma-names: shall be "rxtx".
+
+Optional children nodes:
+Children nodes represent the available NAND chips.
+
+Required properties:
+- reg: shall contain the native Chip Select ids (0-3)
+- marvell,rb: shall contain the native Ready/Busy ids (0-1)
+
+Optional properties:
+- marvell,nand-keep-config: orders the driver not to take the timings
+  from the core and leaving them completely untouched. Bootloader
+  timings will then be used.
+- nand-on-flash-bbt: see nand.txt.
+- nand-ecc-mode: see nand.txt. Will use hardware ECC if not specified.
+- nand-ecc-algo: see nand.txt. This property may be added when using
+  hardware ECC for clarification but will be ignored by the driver
+  because ECC mode is chosen depending on the page size and the strength
+  required by the NAND chip. This value may be overwritten with
+  nand-ecc-strength property.
+- nand-ecc-strength: see nand.txt.
+- nand-ecc-step-size: see nand.txt. This has no effect and will be
+  ignored by the driver when using hardware ECC because Marvell's NAND
+  flash controller does use fixed strength (1-bit for Hamming, 16-bit
+  for BCH), so the step size will shrink or grow in order to fit the
+  required strength. Step sizes are not completely random for all and
+  follow certain patterns described in AN-379, "Marvell SoC NFC ECC".
+
+See Documentation/devicetree/bindings/mtd/nand.txt for more details on
+generic bindings.
+
+
+Example:
+nand_controller: nand-controller@d0000 {
+	compatible = "marvell,armada370-nand-controller";
+	reg = <0xd0000 0x54>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+	clocks = <&coredivclk 0>;
+
+	nand@0 {
+		reg = <0>;
+		marvell,rb = <0>;
+		nand-ecc-mode = "hw";
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "Rootfs";
+				reg = <0x00000000 0x40000000>;
+			};
+		};
+	};
+};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Document the legacy and the new bindings for Marvell NAND controller.

The pxa3xx_nand.c driver does only support legacy bindings, which are
incomplete and inaccurate. A rework of this controller (called
marvell_nand.c) does support both.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 .../devicetree/bindings/mtd/marvell-nand.txt       | 84 ++++++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt

diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
new file mode 100644
index 000000000000..0b3d5e0bab83
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
@@ -0,0 +1,84 @@
+Marvell NAND Flash Controller (NFC)
+
+Required properties:
+- compatible: can be one of the following:
+    * "marvell,armada-8k-nand-controller"
+    * "marvell,armada370-nand-controller"
+    * "marvell,pxa3xx-nand-controller"
+    * "marvell,armada-8k-nand" (deprecated)
+    * "marvell,armada370-nand" (deprecated)
+    * "marvell,pxa3xx-nand" (deprecated)
+- reg: NAND flash controller memory area.
+- #address-cells: shall be set to 1. Encode the NAND CS.
+- #size-cells: shall be set to 0.
+- interrupts: shall define the NAND controller interrupt.
+- clocks: shall reference the NAND controller clock.
+- marvell,system-controller: Set to retrieve the syscon node that handles
+  NAND controller related registers (only required with the
+  "marvell,armada-8k-nand[-controller]" compatibles).
+
+Optional properties:
+- label: see partition.txt. New platforms shall omit this property.
+- dmas: shall reference DMA channel associated to the NAND controller.
+- dma-names: shall be "rxtx".
+
+Optional children nodes:
+Children nodes represent the available NAND chips.
+
+Required properties:
+- reg: shall contain the native Chip Select ids (0-3)
+- marvell,rb: shall contain the native Ready/Busy ids (0-1)
+
+Optional properties:
+- marvell,nand-keep-config: orders the driver not to take the timings
+  from the core and leaving them completely untouched. Bootloader
+  timings will then be used.
+- nand-on-flash-bbt: see nand.txt.
+- nand-ecc-mode: see nand.txt. Will use hardware ECC if not specified.
+- nand-ecc-algo: see nand.txt. This property may be added when using
+  hardware ECC for clarification but will be ignored by the driver
+  because ECC mode is chosen depending on the page size and the strength
+  required by the NAND chip. This value may be overwritten with
+  nand-ecc-strength property.
+- nand-ecc-strength: see nand.txt.
+- nand-ecc-step-size: see nand.txt. This has no effect and will be
+  ignored by the driver when using hardware ECC because Marvell's NAND
+  flash controller does use fixed strength (1-bit for Hamming, 16-bit
+  for BCH), so the step size will shrink or grow in order to fit the
+  required strength. Step sizes are not completely random for all and
+  follow certain patterns described in AN-379, "Marvell SoC NFC ECC".
+
+See Documentation/devicetree/bindings/mtd/nand.txt for more details on
+generic bindings.
+
+
+Example:
+nand_controller: nand-controller at d0000 {
+	compatible = "marvell,armada370-nand-controller";
+	reg = <0xd0000 0x54>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
+	clocks = <&coredivclk 0>;
+
+	nand at 0 {
+		reg = <0>;
+		marvell,rb = <0>;
+		nand-ecc-mode = "hw";
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "Rootfs";
+				reg = <0x00000000 0x40000000>;
+			};
+		};
+	};
+};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Add marvell_nand driver which aims at replacing the existing pxa3xx_nand
driver.

The new driver intends to be easier to understand and follows the brand
new NAND framework rules by implementing hooks for every pattern the
controller might support and referencing them inside a parser object
that will be given to the core at each ->exec_op() call.

Raw accessors are implemented, useful to test/debug memory/filesystem
corruptions. Userspace binaries contained in the mtd-utils package may
now be used and their output trusted.

Timings may not be kept from the bootloader anymore, the timings used
for instance in U-Boot were not optimal and it supposed to have NAND
support (and initialized) in the bootloader.

Thanks to the improved timings, implementation of ONFI mode 5 support
(with EDO managed by adding a delay on data sampling), merging the
commands together and optimizing writes in the command registers, the
new driver may achieve faster throughputs in both directions.
Measurements show an improvement of about +23% read throughput and +24%
write throughput. These measurements have been done with an
Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH ECC
correction) using the userspace tool 'flash_speed' from the MTD test
suite.

Besides these important topics, the new driver addresses several
unsolved known issues in the old driver which:
- did not work with ECC soft neither with ECC none ;
- relied on naked read/write (which is unchanged) while the NFCv1
  embedded in the pxa3xx platforms do not implement it, so several
  NAND commands did not actually ever work without any notice (like
  reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
- wrote the OOB data correctly, but was not able to read it correctly
  past the first OOB data chunk ;
- did not displayed ECC bytes ;
- used device tree bindings that did not allow more than one NAND chip,
  and did not allow to choose the correct chip select if not
  incrementing from 0. Plus, the Ready/Busy line used had to be 0.

Old device tree bindings are still supported but deprecated. A more
hierarchical view has to be used to keep the controller and the NAND
chip structures clearly separated both inside the device tree and also
in the driver code.

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 drivers/mtd/nand/Kconfig        |   12 +
 drivers/mtd/nand/Makefile       |    1 +
 drivers/mtd/nand/marvell_nand.c | 2951 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 2964 insertions(+)
 create mode 100644 drivers/mtd/nand/marvell_nand.c

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 859eb7790c46..9e141e03f5c2 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -323,6 +323,18 @@ config MTD_NAND_PXA3xx
 	  platforms (XP, 370, 375, 38x, 39x) and 64-bit Armada
 	  platforms (7K, 8K) (NFCv2).
 
+config MTD_NAND_MARVELL
+	tristate "NAND controller support on Marvell boards"
+	depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
+		   COMPILE_TEST
+	depends on HAS_IOMEM
+	help
+	  This enables the NAND flash controller driver for Marvell boards,
+	  including:
+	  - PXA3xx processors (NFCv1)
+	  - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
+	  - 64-bit Aramda platforms (7k, 8k) (NFCv2)
+
 config MTD_NAND_SLC_LPC32XX
 	tristate "NXP LPC32xx SLC Controller"
 	depends on ARCH_LPC32XX
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 118a1349aad3..921634ba400c 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_MTD_NAND_OMAP2) 		+= omap2_nand.o
 obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)	+= omap_elm.o
 obj-$(CONFIG_MTD_NAND_CM_X270)		+= cmx270_nand.o
 obj-$(CONFIG_MTD_NAND_PXA3xx)		+= pxa3xx_nand.o
+obj-$(CONFIG_MTD_NAND_MARVELL)		+= marvell_nand.o
 obj-$(CONFIG_MTD_NAND_TMIO)		+= tmio_nand.o
 obj-$(CONFIG_MTD_NAND_PLATFORM)		+= plat_nand.o
 obj-$(CONFIG_MTD_NAND_PASEMI)		+= pasemi_nand.o
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
new file mode 100644
index 000000000000..2525d9b2f4fa
--- /dev/null
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -0,0 +1,2951 @@
+/*
+ * Marvell NAND flash controller driver
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Copyright (C) 2017 Marvell
+ * Author: Miquel RAYNAL <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
+ */
+
+#include <linux/module.h>
+#include <linux/clk.h>
+#include <linux/mtd/rawnand.h>
+#include <linux/of_platform.h>
+#include <linux/iopoll.h>
+#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include <asm/unaligned.h>
+
+#include <linux/dmaengine.h>
+#include <linux/dma-mapping.h>
+#include <linux/dma/pxa-dma.h>
+#include <linux/platform_data/mtd-nand-pxa3xx.h>
+
+/* Data FIFO granularity, FIFO reads/writes must be a multiple of this length */
+#define FIFO_DEPTH		8
+#define FIFO_REP(x)		(x / sizeof(u32))
+#define BCH_SEQ_READS		(32 / FIFO_DEPTH)
+/* NFC does not support transfers of larger chunks at a time */
+#define MAX_CHUNK_SIZE		2112
+/* NFCv1 cannot read more that 7 bytes of ID */
+#define NFCV1_READID_LEN	7
+/* Polling is done at a pace of POLL_PERIOD us until POLL_TIMEOUT is reached */
+#define POLL_PERIOD		0
+#define POLL_TIMEOUT		100000
+/* Interrupt maximum wait period in ms */
+#define IRQ_TIMEOUT		1000
+/* Latency in clock cycles between SoC pins and NFC logic */
+#define MIN_RD_DEL_CNT		3
+/* Maximum number of contiguous address cycles */
+#define MAX_ADDRESS_CYC_NFCV1	5
+#define MAX_ADDRESS_CYC_NFCV2	7
+/* System control registers/bits to enable the NAND controller on some SoCs */
+#define GENCONF_SOC_DEVICE_MUX	0x208
+#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
+#define GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST BIT(20)
+#define GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST BIT(21)
+#define GENCONF_SOC_DEVICE_MUX_NFC_INT_EN BIT(25)
+#define GENCONF_CLK_GATING_CTRL	0x220
+#define GENCONF_CLK_GATING_CTRL_ND_GATE BIT(2)
+#define GENCONF_ND_CLK_CTRL	0x700
+#define GENCONF_ND_CLK_CTRL_EN	BIT(0)
+
+/* NAND controller data flash control register */
+#define NDCR			0x00
+/* NAND interface timing parameter 0 register */
+#define NDTR0			0x04
+/* NAND interface timing parameter 1 register */
+#define NDTR1			0x0C
+/* NAND controller status register */
+#define NDSR			0x14
+/* NAND ECC control register */
+#define NDECCCTRL		0x28
+/* NAND controller data buffer register */
+#define NDDB			0x40
+/* NAND controller command buffer 0 register */
+#define NDCB0			0x48
+/* NAND controller command buffer 1 register */
+#define NDCB1			0x4C
+/* NAND controller command buffer 2 register */
+#define NDCB2			0x50
+/* NAND controller command buffer 3 register */
+#define NDCB3			0x54
+
+/* Data flash control register bitfields */
+#define NDCR_ALL_INT		GENMASK(11, 0)
+#define NDCR_CS1_CMDDM		BIT(7)
+#define NDCR_CS0_CMDDM		BIT(8)
+#define NDCR_RDYM		BIT(11)
+#define NDCR_ND_ARB_EN		BIT(12)
+#define NDCR_RA_START		BIT(15)
+#define NDCR_RD_ID_CNT(x)	(min_t(unsigned int, x, 0x7) << 16)
+#define NDCR_PAGE_SZ(x)		(x >= 2048 ? BIT(24) : 0)
+#define NDCR_DWIDTH_M		BIT(26)
+#define NDCR_DWIDTH_C		BIT(27)
+#define NDCR_ND_RUN		BIT(28)
+#define NDCR_DMA_EN		BIT(29)
+#define NDCR_ECC_EN		BIT(30)
+#define NDCR_SPARE_EN		BIT(31)
+
+/* NAND interface timing parameter registers bitfields */
+#define NDTR0_TRP(x)		((min_t(unsigned int, x, 0xF) & 0x7) << 0)
+#define NDTR0_TRH(x)		(min_t(unsigned int, x, 0x7) << 3)
+#define NDTR0_ETRP(x)		((min_t(unsigned int, x, 0xF) & 0x8) << 3)
+#define NDTR0_SEL_NRE_EDGE	BIT(7)
+#define NDTR0_TWP(x)		(min_t(unsigned int, x, 0x7) << 8)
+#define NDTR0_TWH(x)		(min_t(unsigned int, x, 0x7) << 11)
+#define NDTR0_TCS(x)		(min_t(unsigned int, x, 0x7) << 16)
+#define NDTR0_TCH(x)		(min_t(unsigned int, x, 0x7) << 19)
+#define NDTR0_RD_CNT_DEL(x)	(min_t(unsigned int, x, 0xF) << 22)
+#define NDTR0_SELCNTR		BIT(26)
+#define NDTR0_TADL(x)		(min_t(unsigned int, x, 0x1F) << 27)
+
+#define NDTR1_TAR(x)		(min_t(unsigned int, x, 0xF) << 0)
+#define NDTR1_TWHR(x)		(min_t(unsigned int, x, 0xF) << 4)
+#define NDTR1_TRHW(x)		(min_t(unsigned int, x / 16, 0x3) << 8)
+#define NDTR1_PRESCALE		BIT(14)
+#define NDTR1_WAIT_MODE		BIT(15)
+#define NDTR1_TR(x)		(min_t(unsigned int, x, 0xFFFF) << 16)
+
+/* NAND controller status register bitfields */
+#define NDSR_WRCMDREQ		BIT(0)
+#define NDSR_RDDREQ		BIT(1)
+#define NDSR_WRDREQ		BIT(2)
+#define NDSR_CORERR		BIT(3)
+#define NDSR_UNCERR		BIT(4)
+#define NDSR_CMDD(cs)		BIT(8 - cs)
+#define NDSR_RDY(rb)		BIT(11 + rb)
+#define NDSR_ERRCNT(x)		((x >> 16) & 0x1F)
+
+/* NAND ECC control register bitfields */
+#define NDECCTRL_BCH_EN		BIT(0)
+
+/* NAND controller command buffer registers bitfields */
+#define NDCB0_CMD1(x)		((x & 0xFF) << 0)
+#define NDCB0_CMD2(x)		((x & 0xFF) << 8)
+#define NDCB0_ADDR_CYC(x)	((x & 0x7) << 16)
+#define NDCB0_DBC		BIT(19)
+#define NDCB0_CMD_TYPE(x)	((x & 0x7) << 21)
+#define NDCB0_CSEL		BIT(24)
+#define NDCB0_RDY_BYP		BIT(27)
+#define NDCB0_LEN_OVRD		BIT(28)
+#define NDCB0_CMD_XTYPE(x)	((x & 0x7) << 29)
+
+#define NDCB1_COLS(x)		((x & 0xFFFF) << 0)
+#define NDCB1_ADDRS(x)		(x << 16)
+
+#define NDCB2_ADDR5(x)		(((x >> 16) & 0xFF) << 0)
+
+#define NDCB3_ADDR6(x)		((x & 0xFF) << 16)
+#define NDCB3_ADDR7(x)		((x & 0xFF) << 24)
+
+/* NAND controller command buffer 0 register 'type' and 'xtype' fields */
+#define TYPE_READ		0
+#define TYPE_WRITE		1
+#define TYPE_ERASE		2
+#define TYPE_READ_ID		3
+#define TYPE_STATUS		4
+#define TYPE_RESET		5
+#define TYPE_NAKED_CMD		6
+#define TYPE_NAKED_ADDR		7
+#define TYPE_MASK		7
+#define XTYPE_MONOLITHIC_RW	0
+#define XTYPE_LAST_NAKED_RW	1
+#define XTYPE_FINAL_COMMAND	3
+#define XTYPE_READ		4
+#define XTYPE_WRITE_DISPATCH	4
+#define XTYPE_NAKED_RW		5
+#define XTYPE_COMMAND_DISPATCH	6
+#define XTYPE_MASK		7
+
+/*
+ * Marvell ECC engine works differently than the others, in order to limit the
+ * size of the IP, hardware engineers choose to set a fixed strength at 16 bits
+ * per subpage, and depending on a the desired strength needed by the NAND chip,
+ * a particular layout mixing data/spare/ecc is defined, with a possible last
+ * chunk smaller that the others.
+ *
+ * @writesize:		Full page size on which the layout applies
+ * @chunk:		Desired ECC chunk size on which the layout applies
+ * @strength:		Desired ECC strength (per chunk size bytes) on which the
+ *			layout applies
+ * @full_chunk_cnt:	Number of full-sized chunks, which is the number of
+ *			repetitions of the pattern:
+ *			(data_bytes + spare_bytes + ecc_bytes).
+ * @data_bytes:		Number of data bytes per chunk
+ * @spare_bytes:	Number of spare bytes per chunk
+ * @ecc_bytes:		Number of ecc bytes per chunk
+ * @last_chunk_cnt:	If there is a last chunk with a different size than
+ *			the first ones, the next fields may not be empty
+ * @last_data_bytes:	Number of data bytes in the last chunk
+ * @last_spare_bytes:	Number of spare bytes in the last chunk
+ * @last_ecc_bytes:	Number of ecc bytes in the last chunk
+ */
+struct marvell_hw_ecc_layout {
+	/* Constraints */
+	int writesize;
+	int chunk;
+	int strength;
+	/* Corresponding layout */
+	int full_chunk_cnt;
+	int data_bytes;
+	int spare_bytes;
+	int ecc_bytes;
+	int last_chunk_cnt;
+	int last_data_bytes;
+	int last_spare_bytes;
+	int last_ecc_bytes;
+};
+
+#define MARVELL_LAYOUT(ws, dc, ds, fcc, db, sb, eb, lcc, ldb, lsb, leb) \
+	{								\
+		.writesize = ws,					\
+		.chunk = dc,						\
+		.strength = ds,						\
+		.full_chunk_cnt = fcc,					\
+		.data_bytes = db,					\
+		.spare_bytes = sb,					\
+		.ecc_bytes = eb,					\
+		.last_chunk_cnt = lcc,					\
+		.last_data_bytes = ldb,					\
+		.last_spare_bytes = lsb,				\
+		.last_ecc_bytes = leb,					\
+	}
+
+/* Layouts explained in AN-379_Marvell_SoC_NFC_ECC */
+static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {
+	MARVELL_LAYOUT(  512,   512,  1,  1,  512,  8,  8,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 2048,   512,  1,  1, 2048, 40, 24,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 2048,   512,  4,  1, 2048, 32, 30,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 4096,   512,  4,  2, 2048, 32, 30,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 4096,   512,  8,  4, 1024,  0, 30,  1,  0, 64, 30),
+};
+
+/*
+ * The Nand Flash Controller has up to 4 CE and 2 RB pins. The CE selection
+ * is made by a field in NDCB0 register, and in another field in NDCB2 register.
+ * The datasheet describes the logic with an error: ADDR5 field is once
+ * declared at the beginning of NDCB2, and another time at its end. Because the
+ * ADDR5 field of NDCB2 may be used by other bytes, it would be more logical
+ * to use the last bit of this field instead of the first ones.
+ *
+ * @cs:			Wanted CE lane.
+ * @ndcb0_csel:		Value of the NDCB0 register with or without the flag
+ *			selecting the wanted CE lane. This is set once when
+ *			the Device Tree is probed.
+ * @rb:			Ready/Busy pin for the flash chip
+ */
+struct marvell_nand_chip_sel {
+	unsigned int cs;
+	u32 ndcb0_csel;
+	unsigned int rb;
+};
+
+/*
+ * NAND chip structure: stores NAND chip device related information
+ *
+ * @chip:		Base NAND chip structure
+ * @node:		Used to store NAND chips into a list
+ * @layout		NAND layout when using hardware ECC
+ * @ndtr0		Timing registers 0 value for this NAND chip
+ * @ndtr1		Timing registers 1 value for this NAND chip
+ * @selected_die:	Current active CS
+ * @nsels:		Number of CS lines required by the NAND chip
+ * @sels:		Array of CS lines descriptions
+ */
+struct marvell_nand_chip {
+	struct nand_chip chip;
+	struct list_head node;
+	const struct marvell_hw_ecc_layout *layout;
+	u32 ndtr0;
+	u32 ndtr1;
+	int addr_cyc;
+	int selected_die;
+	unsigned int nsels;
+	struct marvell_nand_chip_sel sels[0];
+};
+
+static inline struct marvell_nand_chip *to_marvell_nand(struct nand_chip *chip)
+{
+	return container_of(chip, struct marvell_nand_chip, chip);
+}
+
+static inline struct marvell_nand_chip_sel *to_nand_sel(struct marvell_nand_chip
+							*nand)
+{
+	return &nand->sels[nand->selected_die];
+}
+
+/*
+ * NAND controller capabilities for distinction between compatible strings
+ *
+ * @max_cs_nb:		Number of Chip Select lines available
+ * @max_rb_nb:		Number of Ready/Busy lines available
+ * @need_system_controller: Indicates if the SoC needs to have access to the
+ *                      system controller (ie. to enable the NAND controller)
+ * @legacy_of_bindings:	Indicates if DT parsing must be done using the old
+ *			fashion way
+ * @is_nfcv2:		NFCv2 has numerous enhancements compared to NFCv1, ie.
+ *			BCH error detection and correction algorithm,
+ *			NDCB3 register has been added
+ * @use_dma:		Use dma for data transfers
+ */
+struct marvell_nfc_caps {
+	unsigned int max_cs_nb;
+	unsigned int max_rb_nb;
+	bool need_system_controller;
+	bool legacy_of_bindings;
+	bool is_nfcv2;
+	bool use_dma;
+};
+
+/*
+ * NAND controller structure: stores Marvell NAND controller information
+ *
+ * @controller:		Base controller structure
+ * @dev:		Parent device (used to print error messages)
+ * @regs:		NAND controller registers
+ * @ecc_clk:		ECC block clock, two times the NAND controller clock
+ * @complete:		Completion object to wait for NAND controller events
+ * @assigned_cs:	Bitmask describing already assigned CS lines
+ * @chips:		List containing all the NAND chips attached to
+ *			this NAND controller
+ * @caps:		NAND controller capabilities for each compatible string
+ * @buf:		Controller local buffer to store a part of the read
+ *			buffer when the read operation was not 8 bytes aligned
+ *			as is the FIFO.
+ * @buf_pos:		Position in the 'buf' buffer
+ * @dma_chan:		DMA channel (NFCv1 only)
+ * @dma_buf:		32-bit aligned buffer for DMA transfers (NFCv1 only)
+ */
+struct marvell_nfc {
+	struct nand_hw_control controller;
+	struct device *dev;
+	void __iomem *regs;
+	struct clk *ecc_clk;
+	struct completion complete;
+	unsigned long assigned_cs;
+	struct list_head chips;
+	struct nand_chip *selected_chip;
+	const struct marvell_nfc_caps *caps;
+
+	/*
+	 * Buffer handling: @buf will be accessed byte-per-byter but also
+	 * int-per-int when exchanging data with the NAND controller FIFO,
+	 * 32-bit alignment is then required.
+	 */
+	u8 buf[FIFO_DEPTH] __aligned(sizeof(u32));
+	int buf_pos;
+
+	/* DMA (NFCv1 only) */
+	bool use_dma;
+	struct dma_chan *dma_chan;
+	u8 *dma_buf;
+};
+
+static inline struct marvell_nfc *to_marvell_nfc(struct nand_hw_control *ctrl)
+{
+	return container_of(ctrl, struct marvell_nfc, controller);
+}
+
+/*
+ * NAND controller timings expressed in NAND Controller clock cycles
+ *
+ * @tRP:		ND_nRE pulse width
+ * @tRH:		ND_nRE high duration
+ * @tWP:		ND_nWE pulse time
+ * @tWH:		ND_nWE high duration
+ * @tCS:		Enable signal setup time
+ * @tCH:		Enable signal hold time
+ * @tADL:		Address to write data delay
+ * @tAR:		ND_ALE low to ND_nRE low delay
+ * @tWHR:		ND_nWE high to ND_nRE low for status read
+ * @tRHW:		ND_nRE high duration, read to write delay
+ * @tR:			ND_nWE high to ND_nRE low for read
+ */
+struct marvell_nfc_timings {
+	/* NDTR0 fields */
+	unsigned int tRP;
+	unsigned int tRH;
+	unsigned int tWP;
+	unsigned int tWH;
+	unsigned int tCS;
+	unsigned int tCH;
+	unsigned int tADL;
+	/* NDTR1 fields */
+	unsigned int tAR;
+	unsigned int tWHR;
+	unsigned int tRHW;
+	unsigned int tR;
+};
+
+/*
+ * Derives a duration in numbers of clock cycles.
+ *
+ * @ps: Duration in pico-seconds
+ * @period_ns:  Clock period in nano-seconds
+ *
+ * Convert the duration in nano-seconds, then divide by the period and
+ * return the number of clock periods.
+ */
+#define TO_CYCLES(ps, period_ns) (DIV_ROUND_UP(ps / 1000, period_ns))
+
+/*
+ * NAND driver structure filled during the parsing of the ->exec_op() subop
+ * subset of instructions.
+ *
+ * @ndcb:		Array for the values of the NDCBx registers
+ * @cle_ale_delay_ns:	Optional delay after the last CMD or ADDR cycle
+ * @rdy_timeout_ms:	Timeout for waits on Ready/Busy pin
+ * @rdy_delay_ns:	Optional delay after waiting for the RB pin
+ * @data_delay_ns:	Optional delay after the data xfer
+ * @data_instr_idx:	Index of the data instruction in the subop
+ * @data_instr:		Pointer to the data instruction in the subop
+ */
+struct marvell_nfc_op {
+	u32 ndcb[4];
+	unsigned int cle_ale_delay_ns;
+	unsigned int rdy_timeout_ms;
+	unsigned int rdy_delay_ns;
+	unsigned int data_delay_ns;
+	unsigned int data_instr_idx;
+	const struct nand_op_instr *data_instr;
+};
+
+/*
+ * Internal helper to conditionnally apply a delay (from the above structure,
+ * most of the time).
+ */
+static void cond_delay(unsigned int ns)
+{
+	if (!ns)
+		return;
+
+	if (ns < 10000)
+		ndelay(ns);
+	else
+		udelay(DIV_ROUND_UP(ns, 1000));
+}
+
+/*
+ * Internal helper to mimic core functions whithout having to distinguish if
+ * this is the first read operation on the page or not and hence choose the
+ * right function.
+ */
+int read_page_data(struct nand_chip *chip, unsigned int page,
+		   unsigned int column, void *buf, unsigned int len)
+{
+	if (!column)
+		return nand_read_page_op(chip, page, column, buf, len);
+	else
+		return nand_change_read_column_op(chip, column, buf, len,
+						  false);
+}
+
+/*
+ * The controller has many flags that could generate interrupts, most of them
+ * are disabled and polling is used. For the very slow signals, using interrupts
+ * may relax the CPU charge.
+ */
+static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	u32 reg;
+
+	/* Writing 1 disables the interrupt */
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg | int_mask, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	u32 reg;
+
+	/* Writing 0 enables the interrupt */
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg & ~int_mask, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	writel_relaxed(int_mask, nfc->regs + NDSR);
+}
+
+/*
+ * The core may ask the controller to use only 8-bit accesses while usually
+ * using 16-bit accesses. Later function may blindly call this one with a
+ * boolean to indicate if 8-bit accesses must be enabled of disabled without
+ * knowing if 16-bit accesses are actually in use.
+ */
+static void marvell_nfc_force_byte_access(struct nand_chip *chip,
+					  bool force_8bit)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr;
+
+	if (!(chip->options & NAND_BUSWIDTH_16))
+		return;
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (force_8bit)
+		ndcr &= ~(NDCR_DWIDTH_M | NDCR_DWIDTH_C);
+	else
+		ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
+
+	writel_relaxed(ndcr, nfc->regs + NDCR);
+}
+
+static int marvell_nfc_wait_ndrun(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 val;
+	int ret;
+
+	/*
+	 * The command is being processed, wait for the ND_RUN bit to be
+	 * cleared by the NFC. If not, we must clear it by hand.
+	 */
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDCR, val,
+					 (val & NDCR_ND_RUN) == 0,
+					 POLL_PERIOD, POLL_TIMEOUT);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on NAND controller run mode\n");
+		writel_relaxed(readl_relaxed(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+		return ret;
+	}
+
+	return 0;
+}
+
+/*
+ * Any time a command has to be sent to the controller, the following sequence
+ * has to be followed:
+ * - call marvell_nfc_prepare_cmd()
+ *      -> activate the ND_RUN bit that will kind of 'start a job'
+ *      -> wait the signal indicating the NFC is waiting for a command
+ * - send the command (cmd and address cycles)
+ * - enventually send or receive the data
+ * - call marvell_nfc_end_cmd() with the corresponding flag
+ *      -> wait the flag to be triggered or cancel the job with a timeout
+ *
+ * The following functions are helpers to do this job and keep in the
+ * specialized functions the code that really does the operations.
+ */
+static int marvell_nfc_prepare_cmd(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr, val;
+	int ret;
+
+	/* Poll ND_RUN and clear NDSR before issuing any command */
+	ret = marvell_nfc_wait_ndrun(chip);
+	if (ret) {
+		dev_err(nfc->dev, "Last operation did not suceed\n");
+		return ret;
+	}
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(readl_relaxed(nfc->regs + NDSR), nfc->regs + NDSR);
+
+	/* Assert ND_RUN bit and wait the NFC to be ready */
+	writel_relaxed(ndcr | NDCR_ND_RUN, nfc->regs + NDCR);
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
+					 val & NDSR_WRCMDREQ,
+					 POLL_PERIOD, POLL_TIMEOUT);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on WRCMDRE\n");
+		return -ETIMEDOUT;
+	}
+
+	/* Command may be written, clear WRCMDREQ status bit */
+	writel_relaxed(NDSR_WRCMDREQ, nfc->regs + NDSR);
+
+	return 0;
+}
+
+static void marvell_nfc_send_cmd(struct nand_chip *chip,
+				 struct marvell_nfc_op *nfc_op)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+	dev_dbg(nfc->dev,
+		"NDCB0: 0x%08x\nNDCB1: 0x%08x\nNDCB2: 0x%08x\nNDCB3: 0x%08x\n",
+		nfc_op->ndcb[0], nfc_op->ndcb[1], nfc_op->ndcb[2],
+		nfc_op->ndcb[3]);
+
+	writel_relaxed(to_nand_sel(marvell_nand)->ndcb0_csel | nfc_op->ndcb[0],
+		       nfc->regs + NDCB0);
+	writel_relaxed(nfc_op->ndcb[1], nfc->regs + NDCB0);
+	writel(nfc_op->ndcb[2], nfc->regs + NDCB0);
+
+	/*
+	 * Write NDCB0 four times only if LEN_OVRD is set or if ADDR6 or ADDR7
+	 * fields are used (only available on NFCv2).
+	 */
+	if (nfc_op->ndcb[0] & NDCB0_LEN_OVRD ||
+	    (nfc_op->ndcb[0] & NDCB0_ADDR_CYC(6)) == NDCB0_ADDR_CYC(6)) {
+		if (nfc->caps->is_nfcv2)
+			writel(nfc_op->ndcb[3], nfc->regs + NDCB0);
+		else
+			dev_err(nfc->dev,
+				"NDCB3 does not exist on NFCv1 and should not be written\n");
+	}
+}
+
+static int marvell_nfc_end_cmd(struct nand_chip *chip, int flag,
+			       const char *label)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 val;
+	int ret;
+
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
+					 val & flag,
+					 POLL_PERIOD, POLL_TIMEOUT);
+
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on %s (NDSR: 0x%08x)\n",
+			label, val);
+		if (nfc->dma_chan)
+			dmaengine_terminate_all(nfc->dma_chan);
+		return ret;
+	}
+
+	/*
+	 * DMA function uses this helper to poll on CMDD bits without wanting
+	 * them to be bleared.
+	 */
+	if (nfc->use_dma && (readl(nfc->regs + NDCR) & NDCR_DMA_EN))
+		return 0;
+
+	writel_relaxed(flag, nfc->regs + NDSR);
+
+	return 0;
+}
+
+static int marvell_nfc_wait_cmdd(struct nand_chip *chip)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	int cs_flag = NDSR_CMDD(to_nand_sel(marvell_nand)->ndcb0_csel);
+
+	return marvell_nfc_end_cmd(chip, cs_flag, "CMDD");
+}
+
+static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int ret;
+
+	/* Timeout is expressed in ms */
+	if (!timeout_ms)
+		timeout_ms = IRQ_TIMEOUT;
+
+	init_completion(&nfc->complete);
+
+	marvell_nfc_enable_int(nfc, NDCR_RDYM);
+	ret = wait_for_completion_timeout(&nfc->complete,
+					  msecs_to_jiffies(timeout_ms));
+	marvell_nfc_disable_int(nfc, NDCR_RDYM);
+	marvell_nfc_clear_int(nfc, NDSR_RDY(0) | NDSR_RDY(1));
+	if (!ret) {
+		dev_err(nfc->dev, "Timeout waiting for RB signal\n");
+		return -ETIMEDOUT;
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_select_chip(struct mtd_info *mtd, int die_nr)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr;
+
+	if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
+		return;
+
+	if (die_nr < 0 || die_nr >= marvell_nand->nsels) {
+		nfc->selected_chip = NULL;
+		marvell_nand->selected_die = -1;
+		return;
+	}
+
+	/*
+	 * Do not change the timing registers when using the DT property
+	 * marvell,nand-keep-config; in that case ->ndtr0 and ->ndtr1 from the
+	 * marvell_nand structure are supposedly empty.
+	 */
+	if (marvell_nand->ndtr0 && marvell_nand->ndtr1) {
+		writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
+		writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
+	}
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	/* Ensure controller is not blocked; also clear some fields */
+	ndcr &= ~(NDCR_ND_RUN | NDCR_DWIDTH_M | NDCR_DWIDTH_C |
+		  NDCR_PAGE_SZ(2048));
+
+	/* Adapt bus width */
+	if (chip->options & NAND_BUSWIDTH_16)
+		ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
+
+	/* Page size as seen by the controller, either 512B or 2kiB */
+	ndcr |= NDCR_PAGE_SZ(mtd->writesize);
+
+	/* Update the control register */
+	writel_relaxed(ndcr,  nfc->regs + NDCR);
+
+	/* Also reset the interrupt status register */
+	marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
+
+	nfc->selected_chip = chip;
+	marvell_nand->selected_die = die_nr;
+}
+
+static irqreturn_t marvell_nfc_isr(int irq, void *dev_id)
+{
+	struct marvell_nfc *nfc = dev_id;
+	u32 st = readl_relaxed(nfc->regs + NDSR);
+	u32 ien = (~readl_relaxed(nfc->regs + NDCR)) & NDCR_ALL_INT;
+
+	/*
+	 * RDY interrupt mask is one bit in NDCR while there are two status
+	 * bit in NDSR (RDY[cs0/cs2] and RDY[cs1/cs3]).
+	 */
+	if (st & NDSR_RDY(1))
+		st |= NDSR_RDY(0);
+
+	if (!(st & ien))
+		return IRQ_NONE;
+
+	marvell_nfc_disable_int(nfc, st & NDCR_ALL_INT);
+
+	if (!(st & (NDSR_RDDREQ | NDSR_WRDREQ | NDSR_WRCMDREQ)))
+		complete(&nfc->complete);
+
+	return IRQ_HANDLED;
+}
+
+/* HW ECC related functions */
+static void marvell_nfc_enable_hw_ecc(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (!(ndcr & NDCR_ECC_EN)) {
+		writel(ndcr | NDCR_ECC_EN, nfc->regs + NDCR);
+
+		/*
+		 * When enabling BCH, set threshold to 0 to always know the
+		 * number of corrected bitflips.
+		 */
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			writel(NDECCTRL_BCH_EN, nfc->regs + NDECCCTRL);
+	}
+}
+
+static void marvell_nfc_disable_hw_ecc(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (ndcr & NDCR_ECC_EN) {
+		writel_relaxed(ndcr & ~NDCR_ECC_EN, nfc->regs + NDCR);
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			writel_relaxed(0, nfc->regs + NDECCCTRL);
+	}
+}
+
+/*
+ * Enable/disable spare area
+ *
+ * NFCv1 needs it (see Hamming related functions). NFCv2 uses LEN_OVRD and thus
+ * does not need this bit to be set.
+ */
+static void marvell_nfc_enable_spare(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (!(ndcr & NDCR_SPARE_EN))
+		writel(ndcr | NDCR_SPARE_EN, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_disable_spare(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (ndcr & NDCR_SPARE_EN)
+		writel_relaxed(ndcr & ~NDCR_SPARE_EN, nfc->regs + NDCR);
+}
+
+/* DMA related helpers */
+static void marvell_nfc_enable_dma(struct marvell_nfc *nfc)
+{
+	u32 reg;
+
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg | NDCR_DMA_EN, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_disable_dma(struct marvell_nfc *nfc)
+{
+	u32 reg;
+
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg & ~NDCR_DMA_EN, nfc->regs + NDCR);
+}
+
+/* Read/write PIO/DMA accessors */
+static int marvell_nfc_xfer_data_dma(struct marvell_nfc *nfc,
+				     enum dma_data_direction direction,
+				     unsigned int len)
+{
+	unsigned int dma_len = min_t(int, ALIGN(len, 32), MAX_CHUNK_SIZE);
+	struct dma_async_tx_descriptor *tx;
+	struct scatterlist sg;
+	dma_cookie_t cookie;
+	int ret;
+
+	marvell_nfc_enable_dma(nfc);
+	/* Prepare the DMA transfer */
+	sg_init_one(&sg, nfc->dma_buf, dma_len);
+	dma_map_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
+	tx = dmaengine_prep_slave_sg(nfc->dma_chan, &sg, 1,
+				     direction == DMA_FROM_DEVICE ?
+				     DMA_DEV_TO_MEM : DMA_MEM_TO_DEV,
+				     DMA_PREP_INTERRUPT);
+	if (!tx) {
+		dev_err(nfc->dev, "Could not prepare DMA S/G list\n");
+		return -ENXIO;
+	}
+
+	/* Do the task and wait for it to finish */
+	cookie = dmaengine_submit(tx);
+	ret = dma_submit_error(cookie);
+	if (ret)
+		return -EIO;
+
+	dma_async_issue_pending(nfc->dma_chan);
+	ret = marvell_nfc_wait_cmdd(nfc->selected_chip);
+	dma_unmap_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
+	marvell_nfc_disable_dma(nfc);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout waiting for DMA (status: %d)\n",
+			dmaengine_tx_status(nfc->dma_chan, cookie, NULL));
+		dmaengine_terminate_all(nfc->dma_chan);
+		return -ETIMEDOUT;
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_xfer_data_in_pio(struct marvell_nfc *nfc, u8 *in,
+					unsigned int len)
+{
+	unsigned int last_len = len % FIFO_DEPTH;
+	unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
+	int i;
+
+	for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
+		ioread32_rep(nfc->regs + NDDB, in + i, FIFO_REP(FIFO_DEPTH));
+
+	if (last_len) {
+		ioread32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
+		memcpy(in + last_full_offset, nfc->buf, last_len);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_xfer_data_out_pio(struct marvell_nfc *nfc, const u8 *out,
+					 unsigned int len)
+{
+	unsigned int last_len = len % FIFO_DEPTH;
+	unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
+	int i;
+
+	for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
+		iowrite32_rep(nfc->regs + NDDB, out + i, FIFO_REP(FIFO_DEPTH));
+
+	if (last_len) {
+		memcpy(nfc->buf, out + last_full_offset, last_len);
+		iowrite32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_hw_ecc_correct(struct nand_chip *chip,
+				       u8 *data, int data_len,
+				       u8 *oob, int oob_len,
+				       unsigned int *max_bitflips)
+{
+	struct mtd_info *mtd = nand_to_mtd(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int bf = 0;
+	u32 ndsr;
+
+	ndsr = readl_relaxed(nfc->regs + NDSR);
+
+	/* Check uncorrectable error flag */
+	if (ndsr & NDSR_UNCERR) {
+		writel_relaxed(ndsr, nfc->regs + NDSR);
+
+		/*
+		 * Blank pages (all 0xFF) with no ECC are recognized as bad
+		 * because hardware ECC engine expects non-empty ECC values
+		 * in that case, so whenever an uncorrectable error occurs,
+		 * check if the page is actually blank or not.
+		 *
+		 * It is important to check the emptyness only on oob_len,
+		 * which only covers the spare bytes because after a read with
+		 * ECC enabled, the ECC bytes in the buffer have been set by the
+		 * ECC engine, so they are not 0xFF.
+		 */
+		if (!data)
+			data_len = 0;
+		if (!oob)
+			oob_len = 0;
+		bf = nand_check_erased_ecc_chunk(data, data_len, NULL, 0,
+						 oob, oob_len,
+						 chip->ecc.strength);
+		if (bf < 0) {
+			mtd->ecc_stats.failed++;
+			return;
+		}
+	}
+
+	/* Check correctable error flag */
+	if (ndsr & NDSR_CORERR) {
+		writel_relaxed(ndsr, nfc->regs + NDSR);
+
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			bf = NDSR_ERRCNT(ndsr);
+		else
+			bf = 1;
+	}
+
+	/*
+	 * Derive max_bitflips either from the number of bitflips detected by
+	 * the hardware ECC engine or by nand_check_erased_ecc_chunk().
+	 */
+	mtd->ecc_stats.corrected += bf;
+	*max_bitflips = max_t(unsigned int, *max_bitflips, bf);
+}
+
+/* Hamming read helpers */
+static int marvell_nfc_hw_ecc_hmg_do_read_page(struct nand_chip *chip, u8 *buf,
+					       bool oob_required, bool raw,
+					       int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_DBC |
+			   NDCB0_CMD1(NAND_CMD_READ0) |
+			   NDCB0_CMD2(NAND_CMD_READSTART),
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+	unsigned int oob_bytes = 0;
+	int ret;
+
+	/* NFCv2 needs more information about the operation being executed */
+	if (nfc->caps->is_nfcv2)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required) {
+		marvell_nfc_enable_spare(chip);
+		oob_bytes = lt->spare_bytes;
+		if (raw)
+			oob_bytes += lt->ecc_bytes;
+	}
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while draining FIFO (data/oob)");
+	if (ret)
+		return ret;
+
+	/* Read the page then the OOB area */
+	if (nfc->use_dma) {
+		marvell_nfc_xfer_data_dma(nfc, DMA_FROM_DEVICE,
+					  lt->data_bytes + oob_bytes);
+		memcpy(buf, nfc->dma_buf, lt->data_bytes);
+		memcpy(chip->oob_poi + (raw ? 0 : lt->ecc_bytes),
+		       nfc->dma_buf + lt->data_bytes, oob_bytes);
+	} else {
+		marvell_nfc_xfer_data_in_pio(nfc, buf, lt->data_bytes);
+		marvell_nfc_xfer_data_in_pio(nfc, chip->oob_poi, oob_bytes);
+	}
+
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required)
+		marvell_nfc_disable_spare(chip);
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_hmg_read_page_raw(struct mtd_info *mtd,
+						struct nand_chip *chip, u8 *buf,
+						int oob_required, int page)
+{
+	return marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, oob_required,
+						   true, page);
+}
+
+static int marvell_nfc_hw_ecc_hmg_read_page(struct mtd_info *mtd,
+					    struct nand_chip *chip,
+					    u8 *buf, int oob_required,
+					    int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int max_bf = 0;
+
+	/*
+	 * Reading/Writing a given page must always be performed with the same
+	 * configuration regarding the state of the SPARE_EN bit or ECC bytes
+	 * will not be present at the same location (writing only data, without
+	 * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
+	 * while writing with the SPARE_EN bit (hence, also writing free OOB
+	 * bytes) will put first the spare bytes then, at the end of the OOB
+	 * area, the ECC bytes. Choices has been made to always read/write OOB
+	 * area (padding with 0xFF is handled by the core for writes).
+	 */
+
+	marvell_nfc_enable_hw_ecc(chip);
+	marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, true, false, page);
+	marvell_nfc_hw_ecc_correct(chip, buf, lt->data_bytes, NULL, 0, &max_bf);
+	marvell_nfc_disable_hw_ecc(chip);
+
+	/*
+	 * Re-read the OOB area in raw mode to get the ECC bytes if the OOB area
+	 * is needed.
+	 */
+	if (oob_required)
+		chip->ecc.read_oob_raw(mtd, chip, page);
+
+	return max_bf;
+}
+
+/*
+ * Spare area in Hamming layouts is not protected by the ECC engine (even if
+ * it appears before the ECC bytes when reading), the ->read_oob_raw() function
+ * also stands for ->read_oob().
+ */
+static int marvell_nfc_hw_ecc_hmg_read_oob_raw(struct mtd_info *mtd,
+					       struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return marvell_nfc_hw_ecc_hmg_do_read_page(chip, chip->data_buf, true,
+						   true, page);
+}
+
+/* Hamming write helpers */
+static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
+						const u8 *buf,
+						bool oob_required, bool raw,
+						int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_CMD1(NAND_CMD_SEQIN) |
+			   NDCB0_CMD2(NAND_CMD_PAGEPROG) |
+			   NDCB0_DBC,
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+	int oob_bytes = 0;
+	int ret;
+
+	/* NFCv2 needs more information about the operation being executed */
+	if (nfc->caps->is_nfcv2)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required) {
+		marvell_nfc_enable_spare(chip);
+		oob_bytes = lt->spare_bytes;
+		if (raw)
+			oob_bytes += lt->ecc_bytes;
+	}
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
+				  "WRDREQ while loading FIFO (data)");
+	if (ret)
+		return ret;
+
+	/* Write the page then the OOB area */
+	if (nfc->use_dma) {
+		memcpy(nfc->dma_buf, buf, lt->data_bytes);
+		if (oob_required)
+			memcpy(nfc->dma_buf + lt->data_bytes, chip->oob_poi,
+			       oob_bytes);
+		marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
+					  lt->ecc_bytes + lt->spare_bytes);
+	} else {
+		marvell_nfc_xfer_data_out_pio(nfc, buf, lt->data_bytes);
+		if (oob_required)
+			marvell_nfc_xfer_data_out_pio(nfc, chip->oob_poi,
+						      oob_bytes);
+	}
+
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	ret = marvell_nfc_wait_op(chip,
+				  chip->data_interface.timings.sdr.tPROG_max);
+	if (ret)
+		return ret;
+
+	if (oob_required)
+		marvell_nfc_disable_spare(chip);
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_hmg_write_page_raw(struct mtd_info *mtd,
+						 struct nand_chip *chip,
+						 const u8 *buf,
+						 int oob_required, int page)
+{
+	return marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, oob_required,
+						    true, page);
+}
+
+static int marvell_nfc_hw_ecc_hmg_write_page(struct mtd_info *mtd,
+					     struct nand_chip *chip,
+					     const u8 *buf,
+					     int oob_required, int page)
+{
+	int ret;
+
+	/*
+	 * Reading/Writing a given page must always be performed with the same
+	 * configuration regarding the state of the SPARE_EN bit or ECC bytes
+	 * will not be present at the same location (writing only data, without
+	 * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
+	 * while writing with the SPARE_EN bit (hence, also writing free OOB
+	 * bytes) will put first the spare bytes then, at the end of the OOB
+	 * area, the ECC bytes. Choices has been made to always read/write OOB
+	 * area (padding with 0xFF is handled by the core for writes).
+	 */
+
+	marvell_nfc_enable_hw_ecc(chip);
+	ret = marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, true, false,
+						   page);
+	marvell_nfc_disable_hw_ecc(chip);
+
+	return ret;
+}
+
+/*
+ * Spare area in Hamming layouts is not protected by the ECC engine (even if
+ * it appears before the ECC bytes when reading), the ->write_oob_raw() function
+ * also stands for ->write_oob().
+ */
+static int marvell_nfc_hw_ecc_hmg_write_oob_raw(struct mtd_info *mtd,
+						struct nand_chip *chip,
+						int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return marvell_nfc_hw_ecc_hmg_do_write_page(chip, chip->data_buf, true,
+						    true, page);
+}
+
+/* BCH read helpers */
+static int marvell_nfc_hw_ecc_bch_read_page_raw(struct mtd_info *mtd,
+						struct nand_chip *chip, u8 *buf,
+						int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	u8 *oob = chip->oob_poi;
+	int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
+	int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int ecc_len = lt->ecc_bytes;
+	int chunk;
+
+	if (oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	nand_read_page_op(chip, page, 0, NULL, 0);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		int offset_in_page = chunk * chunk_size;
+
+		/* Update last chunk length */
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+			ecc_len = lt->last_ecc_bytes;
+		}
+
+		nand_change_read_column_op(chip, offset_in_page, buf,
+					   lt->data_bytes, false);
+		buf += lt->data_bytes;
+
+		if (!oob_required)
+			continue;
+
+		offset_in_page += data_len;
+		nand_change_read_column_op(chip, offset_in_page,
+					   oob + (lt->spare_bytes * chunk),
+					   spare_len, false);
+
+		offset_in_page += spare_len;
+		nand_change_read_column_op(chip, offset_in_page,
+					   oob + ecc_offset +
+					   (ALIGN(lt->ecc_bytes, 32) * chunk),
+					   ecc_len, false);
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
+					      u8 *data, unsigned int data_len,
+					      u8 *spare, unsigned int spare_len,
+					      int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int i, ret;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_LEN_OVRD,
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+
+	/*
+	 * Reading spare area is mandatory when using HW ECC or read operation
+	 * will trigger uncorrectable ECC errors, but do not read ECC here.
+	 */
+	nfc_op.ndcb[3] = data_len + spare_len;
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return;
+
+	if (chunk == 0)
+		nfc_op.ndcb[0] |= NDCB0_DBC |
+				  NDCB0_CMD1(NAND_CMD_READ0) |
+				  NDCB0_CMD2(NAND_CMD_READSTART);
+
+	/*
+	 * Trigger the naked read operation only on the last chunk.
+	 * Otherwise, use monolithic read.
+	 */
+	if (chunk < nchunks - 1)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+	else
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+
+	/*
+	 * According to the datasheet, when reading from NDDB
+	 * with BCH enabled, after each 32 bytes reads, we
+	 * have to make sure that the NDSR.RDDREQ bit is set.
+	 *
+	 * Drain the FIFO, 8 32-bit reads at a time, and skip
+	 * the polling on the last read.
+	 *
+	 * Length is a multiple of 32 bytes, hence it is a multiple of 8 too.
+	 *
+	 */
+
+	for (i = 0; i < data_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
+		marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				    "RDDREQ while draining FIFO (data)");
+		marvell_nfc_xfer_data_in_pio(nfc, data,
+					     FIFO_DEPTH * BCH_SEQ_READS);
+		data += FIFO_DEPTH * BCH_SEQ_READS;
+	}
+
+	for (i = 0; i < spare_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
+		marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				    "RDDREQ while draining FIFO (OOB)");
+		marvell_nfc_xfer_data_in_pio(nfc, spare,
+					     FIFO_DEPTH * BCH_SEQ_READS);
+		spare += FIFO_DEPTH * BCH_SEQ_READS;
+	}
+}
+
+static int marvell_nfc_hw_ecc_bch_read_page(struct mtd_info *mtd,
+					    struct nand_chip *chip,
+					    u8 *buf, int oob_required,
+					    int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	u8 *data = buf;
+	u8 *spare = chip->oob_poi;
+	int max_bitflips = 0;
+	int chunk, ecc_offset_in_page, ecc_offset_in_oob_buf, ecc_len;
+
+	/*
+	 * With BCH, OOB is not fully used (and thus not read entirely), not
+	 * expected bytes could show up at the end of the OOB buffer if not
+	 * explicitly erased.
+	 */
+	if (oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	marvell_nfc_enable_hw_ecc(chip);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		/* Update length for the last chunk */
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+		}
+
+		/* Read the chunk and detect number of bitflips */
+		marvell_nfc_hw_ecc_bch_read_chunk(chip, chunk, data, data_len,
+						  spare, spare_len, page);
+		marvell_nfc_hw_ecc_correct(chip, data, data_len,
+					   spare, spare_len, &max_bitflips);
+
+		data += data_len;
+		spare += spare_len;
+	}
+
+	marvell_nfc_disable_hw_ecc(chip);
+
+	if (!oob_required)
+		return max_bitflips;
+
+	/*
+	 * Re-read ECC bytes without ECC enabled, else it is garbage and it
+	 * fails the ->correct() call.
+	 */
+	ecc_len = lt->ecc_bytes;
+	ecc_offset_in_oob_buf =
+		(lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	ecc_offset_in_page = lt->data_bytes + lt->spare_bytes;
+
+	for (chunk = 0; chunk < nchunks;) {
+		/* Do the actual raw read of the ECC bytes */
+		nand_change_read_column_op(chip, ecc_offset_in_page,
+					   chip->oob_poi + ecc_offset_in_oob_buf,
+					   ecc_len, false);
+
+		chunk++;
+
+		/* When using a "last chunk", the ECC size might vary */
+		if (chunk >= lt->full_chunk_cnt)
+			ecc_len = lt->last_ecc_bytes;
+
+		/* Increment the offsets where ECC will be read and written */
+		ecc_offset_in_oob_buf += ALIGN(lt->ecc_bytes, 32);
+		ecc_offset_in_page += lt->ecc_bytes;
+		if (chunk < lt->full_chunk_cnt)
+			ecc_offset_in_page += lt->data_bytes + lt->spare_bytes;
+		else
+			ecc_offset_in_page += lt->last_data_bytes +
+				lt->last_spare_bytes;
+	}
+
+	return max_bitflips;
+}
+
+static int marvell_nfc_hw_ecc_bch_read_oob_raw(struct mtd_info *mtd,
+					       struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return chip->ecc.read_page_raw(mtd, chip, chip->data_buf, true, page);
+}
+
+static int marvell_nfc_hw_ecc_bch_read_oob(struct mtd_info *mtd,
+					   struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return chip->ecc.read_page(mtd, chip, chip->data_buf, true, page);
+}
+
+/* BCH write helpers */
+static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
+						 struct nand_chip *chip,
+						 const u8 *buf,
+						 int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int ecc_len = lt->ecc_bytes;
+	int oob_len = spare_len + ecc_len;
+	int spare_offset = 0;
+	int ecc_offset =
+		(lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	int chunk;
+
+	nand_prog_page_begin_op(chip, page, 0, NULL, 0);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+			ecc_len = lt->last_ecc_bytes;
+			oob_len = spare_len + ecc_len;
+		}
+
+		/* Point to the column of the next chunk */
+		nand_change_write_column_op(chip, chunk * full_chunk_size,
+					    NULL, 0, false);
+
+		/* Write the data */
+		nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
+				   data_len, false);
+
+		if (!oob_required)
+			continue;
+
+		/* Write the spare bytes */
+		if (spare_len)
+			nand_write_data_op(chip, chip->oob_poi + spare_offset,
+					   spare_len, false);
+
+		/* Write the ECC bytes */
+		if (ecc_len)
+			nand_write_data_op(chip, chip->oob_poi + ecc_offset,
+					   ecc_len, false);
+
+		spare_offset += spare_len;
+		ecc_offset += ALIGN(ecc_len, 32);
+	}
+
+	return nand_prog_page_end_op(chip);
+}
+
+static int
+marvell_nfc_hw_ecc_bch_write_chunk(struct nand_chip *chip, int chunk,
+				   const u8 *data, unsigned int data_len,
+				   const u8 *spare, unsigned int spare_len,
+				   int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int ret;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) | NDCB0_LEN_OVRD,
+		.ndcb[3] = data_len + spare_len,
+	};
+
+	/*
+	 * First operation dispatches the CMD_SEQIN command, issue the address
+	 * cycles and asks for the first chunk of data.
+	 * All operations in the middle (if any) will issue a naked write and
+	 * also ask for data.
+	 * Last operation dispatches the PAGEPROG command and also asks for the
+	 * last chunk of data.
+	 */
+	if (chunk == 0) {
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_WRITE_DISPATCH) |
+				  NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+				  NDCB0_CMD1(NAND_CMD_SEQIN);
+		nfc_op.ndcb[1] |= NDCB1_ADDRS(page);
+		nfc_op.ndcb[2] |= NDCB2_ADDR5(page);
+	} else if (chunk < nchunks - 1) {
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_NAKED_RW);
+	} else {
+		nfc_op.ndcb[0] |= NDCB0_CMD2(NAND_CMD_PAGEPROG) | NDCB0_DBC |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+	}
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
+				  "WRDREQ while loading FIFO (data)");
+	if (ret)
+		return ret;
+
+	/* Transfer the contents */
+	iowrite32_rep(nfc->regs + NDDB, data, FIFO_REP(data_len));
+	iowrite32_rep(nfc->regs + NDDB, spare, FIFO_REP(spare_len));
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_bch_write_page(struct mtd_info *mtd,
+					     struct nand_chip *chip,
+					     const u8 *buf,
+					     int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	const u8 *data = buf;
+	const u8 *spare = chip->oob_poi;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int chunk, ret;
+
+	/* Spare data will be written anyway, so clear it to avoid garbage */
+	if (!oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	marvell_nfc_enable_hw_ecc(chip);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+		}
+
+		marvell_nfc_hw_ecc_bch_write_chunk(chip, chunk, data, data_len,
+						   spare, spare_len, page);
+		data += data_len;
+		spare += spare_len;
+
+		/*
+		 * Waiting only for CMDD or PAGED is not enough, ECC are
+		 * partially written. No flag is set once the operation is
+		 * really finished but the ND_RUN bit is cleared, so wait for it
+		 * before stepping into the next command.
+		 */
+		marvell_nfc_wait_ndrun(chip);
+	}
+
+	ret = marvell_nfc_wait_op(chip,
+				  chip->data_interface.timings.sdr.tPROG_max);
+
+	marvell_nfc_disable_hw_ecc(chip);
+
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_bch_write_oob_raw(struct mtd_info *mtd,
+						struct nand_chip *chip,
+						int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return chip->ecc.write_page_raw(mtd, chip, chip->data_buf, true, page);
+}
+
+static int marvell_nfc_hw_ecc_bch_write_oob(struct mtd_info *mtd,
+					    struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return chip->ecc.write_page(mtd, chip, chip->data_buf, true, page);
+}
+
+/* NAND framework ->exec_op() hooks and related helpers */
+static void marvell_nfc_parse_instructions(struct nand_chip *chip,
+					   const struct nand_subop *subop,
+					   struct marvell_nfc_op *nfc_op)
+{
+	const struct nand_op_instr *instr = NULL;
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	bool first_cmd = true;
+	unsigned int op_id;
+	int i;
+
+	/* Reset the input structure as most of its fields will be OR'ed */
+	memset(nfc_op, 0, sizeof(struct marvell_nfc_op));
+
+	for (op_id = 0; op_id < subop->ninstrs; op_id++) {
+		unsigned int offset, naddrs;
+		const u8 *addrs;
+		int len = nand_subop_get_data_len(subop, op_id);
+
+		instr = &subop->instrs[op_id];
+
+		switch (instr->type) {
+		case NAND_OP_CMD_INSTR:
+			if (first_cmd)
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD1(instr->ctx.cmd.opcode);
+			else
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD2(instr->ctx.cmd.opcode) |
+					NDCB0_DBC;
+
+			nfc_op->cle_ale_delay_ns = instr->delay_ns;
+			first_cmd = false;
+			break;
+
+		case NAND_OP_ADDR_INSTR:
+			offset = nand_subop_get_addr_start_off(subop, op_id);
+			naddrs = nand_subop_get_num_addr_cyc(subop, op_id);
+			addrs = &instr->ctx.addr.addrs[offset];
+
+			nfc_op->ndcb[0] |= NDCB0_ADDR_CYC(naddrs);
+
+			for (i = 0; i < min_t(unsigned int, 4, naddrs); i++)
+				nfc_op->ndcb[1] |= addrs[i] << (8 * i);
+
+			if (naddrs >= 5)
+				nfc_op->ndcb[2] |= NDCB2_ADDR5(addrs[5]);
+			if (naddrs >= 6)
+				nfc_op->ndcb[3] |= NDCB3_ADDR6(addrs[6]);
+			if (naddrs == 7)
+				nfc_op->ndcb[3] |= NDCB3_ADDR7(addrs[7]);
+
+			nfc_op->cle_ale_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_DATA_IN_INSTR:
+			nfc_op->data_instr = instr;
+			nfc_op->data_instr_idx = op_id;
+			nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ);
+			if (nfc->caps->is_nfcv2) {
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
+					NDCB0_LEN_OVRD;
+				nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
+			}
+			nfc_op->data_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_DATA_OUT_INSTR:
+			nfc_op->data_instr = instr;
+			nfc_op->data_instr_idx = op_id;
+			nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE);
+			if (nfc->caps->is_nfcv2) {
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
+					NDCB0_LEN_OVRD;
+				nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
+			}
+			nfc_op->data_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_WAITRDY_INSTR:
+			nfc_op->rdy_timeout_ms = instr->ctx.waitrdy.timeout_ms;
+			nfc_op->rdy_delay_ns = instr->delay_ns;
+			break;
+		}
+	}
+}
+
+static int marvell_nfc_xfer_data_pio(struct nand_chip *chip,
+				     const struct nand_subop *subop,
+				     struct marvell_nfc_op *nfc_op)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct nand_op_instr *instr = nfc_op->data_instr;
+	unsigned int op_id = nfc_op->data_instr_idx;
+	unsigned int len = nand_subop_get_data_len(subop, op_id);
+	unsigned int offset = nand_subop_get_data_start_off(subop, op_id);
+	bool reading = (instr->type == NAND_OP_DATA_IN_INSTR);
+	int ret;
+
+	if (instr->ctx.data.force_8bit)
+		marvell_nfc_force_byte_access(chip, true);
+
+	if (reading) {
+		u8 *in = instr->ctx.data.buf.in + offset;
+
+		ret = marvell_nfc_xfer_data_in_pio(nfc, in, len);
+	} else {
+		const u8 *out = instr->ctx.data.buf.out + offset;
+
+		ret = marvell_nfc_xfer_data_out_pio(nfc, out, len);
+	}
+
+	if (instr->ctx.data.force_8bit)
+		marvell_nfc_force_byte_access(chip, false);
+
+	return ret;
+}
+
+static int marvell_nfc_monolithic_access_exec(struct nand_chip *chip,
+					      const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	bool reading;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	reading = (nfc_op.data_instr->type == NAND_OP_DATA_IN_INSTR);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
+				  "RDDREQ/WRDREQ while draining raw data");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (reading) {
+		if (nfc_op.rdy_timeout_ms) {
+			ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+			if (ret)
+				return ret;
+		}
+
+		cond_delay(nfc_op.rdy_delay_ns);
+	}
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	if (!reading) {
+		if (nfc_op.rdy_timeout_ms) {
+			ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+			if (ret)
+				return ret;
+		}
+
+		cond_delay(nfc_op.rdy_delay_ns);
+	}
+
+	/*
+	 * NDCR ND_RUN bit should be cleared automatically at the end of each
+	 * operation but experience shows that the behavior is buggy when it
+	 * comes to writes (with LEN_OVRD). Clear it by hand in this case.
+	 */
+	if (!reading) {
+		struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+		writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_naked_access_exec(struct nand_chip *chip,
+					 const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+
+	/*
+	 * Naked access are different in that they need to be flagged as naked
+	 * by the controller. Reset the controller registers fields that inform
+	 * on the type and refill them according to the ongoing operation.
+	 */
+	nfc_op.ndcb[0] &= ~(NDCB0_CMD_TYPE(TYPE_MASK) |
+			    NDCB0_CMD_XTYPE(XTYPE_MASK));
+	switch (subop->instrs[0].type) {
+	case NAND_OP_CMD_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_CMD);
+		break;
+	case NAND_OP_ADDR_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_ADDR);
+		break;
+	case NAND_OP_DATA_IN_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ) |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+		break;
+	case NAND_OP_DATA_OUT_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE) |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+		break;
+	default:
+		/* This should never happen */
+		break;
+	}
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+
+	if (!nfc_op.data_instr) {
+		ret = marvell_nfc_wait_cmdd(chip);
+		cond_delay(nfc_op.cle_ale_delay_ns);
+		return ret;
+	}
+
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
+				  "RDDREQ/WRDREQ while draining raw data");
+	if (ret)
+		return ret;
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	/*
+	 * NDCR ND_RUN bit should be cleared automatically at the end of each
+	 * operation but experience shows that the behavior is buggy when it
+	 * comes to writes (with LEN_OVRD). Clear it by hand in this case.
+	 */
+	if (subop->instrs[0].type == NAND_OP_DATA_OUT_INSTR) {
+		struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+		writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_naked_waitrdy_exec(struct nand_chip *chip,
+					  const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return ret;
+}
+
+static int marvell_nfc_read_id_type_exec(struct nand_chip *chip,
+					 const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ_ID);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while reading ID");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (nfc_op.rdy_timeout_ms) {
+		ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+		if (ret)
+			return ret;
+	}
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_read_status_exec(struct nand_chip *chip,
+					const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_STATUS);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while reading status");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (nfc_op.rdy_timeout_ms) {
+		ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+		if (ret)
+			return ret;
+	}
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_reset_cmd_type_exec(struct nand_chip *chip,
+					   const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_RESET);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_erase_cmd_type_exec(struct nand_chip *chip,
+					   const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_ERASE);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return 0;
+}
+
+static const struct nand_op_parser marvell_nfcv2_op_parser = NAND_OP_PARSER(
+	/* Monolithic reads/writes */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_monolithic_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(true, MAX_ADDRESS_CYC_NFCV2),
+		NAND_OP_PARSER_PAT_CMD_ELEM(true),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(true),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_monolithic_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2),
+		NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE),
+		NAND_OP_PARSER_PAT_CMD_ELEM(true),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(true)),
+	/* Naked commands */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_waitrdy_exec,
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	);
+
+static const struct nand_op_parser marvell_nfcv1_op_parser = NAND_OP_PARSER(
+	/* Naked commands not supported, use a function for each pattern */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_read_id_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 8)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_erase_cmd_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_read_status_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 1)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_reset_cmd_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_waitrdy_exec,
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	);
+
+static int marvell_nfc_exec_op(struct nand_chip *chip,
+			       const struct nand_operation *op,
+			       bool check_only)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+	if (nfc->caps->is_nfcv2)
+		return nand_op_parser_exec_op(chip, &marvell_nfcv2_op_parser,
+					      op, check_only);
+	else
+		return nand_op_parser_exec_op(chip, &marvell_nfcv1_op_parser,
+					      op, check_only);
+}
+
+/*
+ * HW ECC layouts, identical to old pxa3xx_nand driver,
+ * to be fully backward compatible.
+ */
+static int marvell_nand_ooblayout_ecc(struct mtd_info *mtd, int section,
+				      struct mtd_oob_region *oobregion)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt;
+
+	if (section >= nchunks)
+		return -ERANGE;
+
+	oobregion->offset = ((lt->spare_bytes + lt->ecc_bytes) * section) +
+		lt->spare_bytes;
+	oobregion->length = lt->ecc_bytes;
+
+	return 0;
+}
+
+static int marvell_nand_ooblayout_free(struct mtd_info *mtd, int section,
+				       struct mtd_oob_region *oobregion)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt;
+
+	if (section >= nchunks)
+		return -ERANGE;
+
+	if (!lt->spare_bytes)
+		return 0;
+
+	oobregion->offset = section * (lt->spare_bytes + lt->ecc_bytes);
+	oobregion->length = lt->spare_bytes;
+	if (!section) {
+		/*
+		 * Bootrom looks in bytes 0 & 5 for bad blocks for the
+		 * 4KB page / 4bit BCH combination.
+		 */
+		if (mtd->writesize == 4096 && lt->data_bytes == 2048) {
+			oobregion->offset += 6;
+			oobregion->length -= 6;
+		} else {
+			oobregion->offset += 2;
+			oobregion->length -= 2;
+		}
+	}
+
+	return 0;
+}
+
+static const struct mtd_ooblayout_ops marvell_nand_ooblayout_ops = {
+	.ecc = marvell_nand_ooblayout_ecc,
+	.free = marvell_nand_ooblayout_free,
+};
+
+static int marvell_nand_hw_ecc_ctrl_init(struct mtd_info *mtd,
+					 struct nand_ecc_ctrl *ecc)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *l;
+	int i;
+
+	if (!nfc->caps->is_nfcv2 &&
+	    (mtd->writesize + mtd->oobsize > MAX_CHUNK_SIZE)) {
+		dev_err(nfc->dev,
+			"NFCv1: writesize (%d) cannot be bigger than a chunk (%d)\n",
+			mtd->writesize, MAX_CHUNK_SIZE - mtd->oobsize);
+		return -ENOTSUPP;
+	}
+
+	to_marvell_nand(chip)->layout = NULL;
+	for (i = 0; i < ARRAY_SIZE(marvell_nfc_layouts); i++) {
+		l = &marvell_nfc_layouts[i];
+		if (mtd->writesize == l->writesize &&
+		    ecc->size == l->chunk && ecc->strength == l->strength) {
+			to_marvell_nand(chip)->layout = l;
+			break;
+		}
+	}
+
+	if (!to_marvell_nand(chip)->layout ||
+	    (!nfc->caps->is_nfcv2 && ecc->strength > 1)) {
+		dev_err(nfc->dev,
+			"ECC strength %d at page size %d is not supported\n",
+			ecc->strength, mtd->writesize);
+		return -ENOTSUPP;
+	}
+
+	mtd_set_ooblayout(mtd, &marvell_nand_ooblayout_ops);
+	ecc->steps = l->full_chunk_cnt + l->last_chunk_cnt;
+	ecc->size = l->data_bytes;
+
+	if (ecc->strength == 1) {
+		chip->ecc.algo = NAND_ECC_HAMMING;
+		ecc->read_page_raw = marvell_nfc_hw_ecc_hmg_read_page_raw;
+		ecc->read_page = marvell_nfc_hw_ecc_hmg_read_page;
+		ecc->read_oob_raw = marvell_nfc_hw_ecc_hmg_read_oob_raw;
+		ecc->read_oob = ecc->read_oob_raw;
+		ecc->write_page_raw = marvell_nfc_hw_ecc_hmg_write_page_raw;
+		ecc->write_page = marvell_nfc_hw_ecc_hmg_write_page;
+		ecc->write_oob_raw = marvell_nfc_hw_ecc_hmg_write_oob_raw;
+		ecc->write_oob = ecc->write_oob_raw;
+	} else {
+		chip->ecc.algo = NAND_ECC_BCH;
+		ecc->strength = 16;
+		ecc->read_page_raw = marvell_nfc_hw_ecc_bch_read_page_raw;
+		ecc->read_page = marvell_nfc_hw_ecc_bch_read_page;
+		ecc->read_oob_raw = marvell_nfc_hw_ecc_bch_read_oob_raw;
+		ecc->read_oob = marvell_nfc_hw_ecc_bch_read_oob;
+		ecc->write_page_raw = marvell_nfc_hw_ecc_bch_write_page_raw;
+		ecc->write_page = marvell_nfc_hw_ecc_bch_write_page;
+		ecc->write_oob_raw = marvell_nfc_hw_ecc_bch_write_oob_raw;
+		ecc->write_oob = marvell_nfc_hw_ecc_bch_write_oob;
+	}
+
+	return 0;
+}
+
+static int marvell_nand_ecc_init(struct mtd_info *mtd,
+				 struct nand_ecc_ctrl *ecc)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int ret;
+
+	if ((ecc->mode != NAND_ECC_NONE) && (!ecc->size || !ecc->strength)) {
+		if (chip->ecc_step_ds && chip->ecc_strength_ds) {
+			ecc->size = chip->ecc_step_ds;
+			ecc->strength = chip->ecc_strength_ds;
+		} else {
+			dev_info(nfc->dev,
+				 "No minimum ECC strength, using 1b/512B\n");
+			ecc->size = 512;
+			ecc->strength = 1;
+		}
+	}
+
+	switch (ecc->mode) {
+	case NAND_ECC_HW:
+		ret = marvell_nand_hw_ecc_ctrl_init(mtd, ecc);
+		if (ret)
+			return ret;
+		break;
+	case NAND_ECC_NONE:
+		chip->ecc.algo = 0;
+	case NAND_ECC_SOFT:
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
+static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
+
+static struct nand_bbt_descr bbt_main_descr = {
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
+		   NAND_BBT_2BIT | NAND_BBT_VERSION,
+	.offs =	8,
+	.len = 6,
+	.veroffs = 14,
+	.maxblocks = 8,	/* Last 8 blocks in each chip */
+	.pattern = bbt_pattern
+};
+
+static struct nand_bbt_descr bbt_mirror_descr = {
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
+		   NAND_BBT_2BIT | NAND_BBT_VERSION,
+	.offs =	8,
+	.len = 6,
+	.veroffs = 14,
+	.maxblocks = 8,	/* Last 8 blocks in each chip */
+	.pattern = bbt_mirror_pattern
+};
+
+static int marvell_nfc_setup_data_interface(struct mtd_info *mtd, int chipnr,
+					    const struct nand_data_interface
+					    *conf)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	unsigned int period_ns = 1000000000 / clk_get_rate(nfc->ecc_clk) * 2;
+	const struct nand_sdr_timings *sdr;
+	struct marvell_nfc_timings nfc_tmg;
+	int read_delay;
+
+	sdr = nand_get_sdr_timings(conf);
+	if (IS_ERR(sdr))
+		return PTR_ERR(sdr);
+
+	/*
+	 * SDR timings are given in pico-seconds while NFC timings must be
+	 * expressed in NAND controller clock cycles, which is half of the
+	 * frequency of the accessible ECC clock retrieved by clk_get_rate().
+	 * This is not written anywhere in the datasheet but was observed
+	 * with an oscilloscope.
+	 *
+	 * NFC datasheet gives equations from which thoses calculations
+	 * are derived, they tend to be slightly more restrictives than the
+	 * given core timings and may improve the overall speed.
+	 */
+	nfc_tmg.tRP = TO_CYCLES(DIV_ROUND_UP(sdr->tRC_min, 2), period_ns) - 1;
+	nfc_tmg.tRH = nfc_tmg.tRP;
+	nfc_tmg.tWP = TO_CYCLES(DIV_ROUND_UP(sdr->tWC_min, 2), period_ns) - 1;
+	nfc_tmg.tWH = nfc_tmg.tWP;
+	nfc_tmg.tCS = TO_CYCLES(sdr->tCS_min, period_ns);
+	nfc_tmg.tCH = TO_CYCLES(sdr->tCH_min, period_ns) - 1;
+	nfc_tmg.tADL = TO_CYCLES(sdr->tADL_min, period_ns);
+	/*
+	 * Read delay is the time of propagation from SoC pins to NFC internal
+	 * logic. With non-EDO timings, this is MIN_RD_DEL_CNT clock cycles. In
+	 * EDO mode, an additional delay of tRH must be taken into account so
+	 * the data is sampled on the falling edge instead of the rising edge.
+	 */
+	read_delay = sdr->tRC_min >= 30000 ?
+		MIN_RD_DEL_CNT : MIN_RD_DEL_CNT + nfc_tmg.tRH;
+
+	nfc_tmg.tAR = TO_CYCLES(sdr->tAR_min, period_ns);
+	/*
+	 * tWHR and tRHW are supposed to be read to write delays (and vice
+	 * versa) but in some cases, ie. when doing a change column, they must
+	 * be greater than that to be sure tCCS delay is respected.
+	 */
+	nfc_tmg.tWHR = TO_CYCLES(max_t(int, sdr->tWHR_min, sdr->tCCS_min),
+				 period_ns) - 2,
+	nfc_tmg.tRHW = TO_CYCLES(max_t(int, sdr->tRHW_min, sdr->tCCS_min),
+				 period_ns);
+
+	/* Use WAIT_MODE (wait for RB line) instead of only relying on delays */
+	nfc_tmg.tR = TO_CYCLES(sdr->tWB_max, period_ns);
+
+	if (chipnr < 0)
+		return 0;
+
+	marvell_nand->ndtr0 =
+		NDTR0_TRP(nfc_tmg.tRP) |
+		NDTR0_TRH(nfc_tmg.tRH) |
+		NDTR0_ETRP(nfc_tmg.tRP) |
+		NDTR0_TWP(nfc_tmg.tWP) |
+		NDTR0_TWH(nfc_tmg.tWH) |
+		NDTR0_TCS(nfc_tmg.tCS) |
+		NDTR0_TCH(nfc_tmg.tCH) |
+		NDTR0_RD_CNT_DEL(read_delay) |
+		NDTR0_SELCNTR |
+		NDTR0_TADL(nfc_tmg.tADL);
+
+	marvell_nand->ndtr1 =
+		NDTR1_TAR(nfc_tmg.tAR) |
+		NDTR1_TWHR(nfc_tmg.tWHR) |
+		NDTR1_TRHW(nfc_tmg.tRHW) |
+		NDTR1_WAIT_MODE |
+		NDTR1_TR(nfc_tmg.tR);
+
+	writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
+	writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
+
+	return 0;
+}
+
+static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
+				  struct device_node *np)
+{
+	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(dev);
+	struct marvell_nand_chip *marvell_nand;
+	struct mtd_info *mtd;
+	struct nand_chip *chip;
+	int nsels, ret, i;
+	u32 cs, rb;
+
+	/*
+	 * The legacy "num-cs" property indicates the number of CS on the only
+	 * chip connected to the controller (legacy bindings does not support
+	 * more than one chip). CS are only incremented one by one while the RB
+	 * pin is always the #0.
+	 *
+	 * When not using legacy bindings, a couple of "reg" and "marvell,rb"
+	 * properties must be filled. For each chip, expressed as a subnode,
+	 * "reg" points to the CS lines and "marvell,rb" to the RB line.
+	 */
+	if (pdata) {
+		nsels = 1;
+	} else if (nfc->caps->legacy_of_bindings) {
+		if (!of_get_property(np, "num-cs", &nsels)) {
+			dev_err(dev, "missing num-cs property\n");
+			return -EINVAL;
+		}
+	} else {
+		if (!of_get_property(np, "reg", &nsels)) {
+			dev_err(dev, "missing reg property\n");
+			return -EINVAL;
+		}
+	}
+
+	if (!pdata)
+		nsels /= sizeof(u32);
+	if (!nsels) {
+		dev_err(dev, "invalid reg property size\n");
+		return -EINVAL;
+	}
+
+	/* Alloc the nand chip structure */
+	marvell_nand = devm_kzalloc(dev, sizeof(*marvell_nand) +
+				    (nsels *
+				     sizeof(struct marvell_nand_chip_sel)),
+				    GFP_KERNEL);
+	if (!marvell_nand) {
+		dev_err(dev, "could not allocate chip structure\n");
+		return -ENOMEM;
+	}
+
+	marvell_nand->nsels = nsels;
+	marvell_nand->selected_die = -1;
+
+	for (i = 0; i < nsels; i++) {
+		if (pdata || nfc->caps->legacy_of_bindings) {
+			/*
+			 * Legacy bindings use the CS lines in natural
+			 * order (0, 1, ...)
+			 */
+			cs = i;
+		} else {
+			/* Retrieve CS id */
+			ret = of_property_read_u32_index(np, "reg", i, &cs);
+			if (ret) {
+				dev_err(dev, "could not retrieve reg property: %d\n",
+					ret);
+				return ret;
+			}
+		}
+
+		if (cs >= nfc->caps->max_cs_nb) {
+			dev_err(dev, "invalid reg value: %u (max CS = %d)\n",
+				cs, nfc->caps->max_cs_nb);
+			return -EINVAL;
+		}
+
+		if (test_and_set_bit(cs, &nfc->assigned_cs)) {
+			dev_err(dev, "CS %d already assigned\n", cs);
+			return -EINVAL;
+		}
+
+		/*
+		 * The cs variable represents the chip select id, which must be
+		 * converted in bit fields for NDCB0 and NDCB2 to select the
+		 * right chip. Unfortunately, due to a lack of information on
+		 * the subject and incoherent documentation, the user should not
+		 * use CS1 and CS3 at all as asserting them is not supported in
+		 * a reliable way (due to multiplexing inside ADDR5 field).
+		 */
+		marvell_nand->sels[i].cs = cs;
+		switch (cs) {
+		case 0:
+		case 2:
+			marvell_nand->sels[i].ndcb0_csel = 0;
+			break;
+		case 1:
+		case 3:
+			marvell_nand->sels[i].ndcb0_csel = NDCB0_CSEL;
+			break;
+		default:
+			return -EINVAL;
+		}
+
+		/* Retrieve RB id */
+		if (pdata || nfc->caps->legacy_of_bindings) {
+			/* Legacy bindings always use RB #0 */
+			rb = 0;
+		} else {
+			ret = of_property_read_u32_index(np, "marvell,rb", i,
+							 &rb);
+			if (ret) {
+				dev_err(dev,
+					"could not retrieve RB property: %d\n",
+					ret);
+				return ret;
+			}
+		}
+
+		if (rb >= nfc->caps->max_rb_nb) {
+			dev_err(dev, "invalid reg value: %u (max RB = %d)\n",
+				rb, nfc->caps->max_rb_nb);
+			return -EINVAL;
+		}
+
+		marvell_nand->sels[i].rb = rb;
+	}
+
+	chip = &marvell_nand->chip;
+	chip->controller = &nfc->controller;
+	nand_set_flash_node(chip, np);
+
+	chip->exec_op = marvell_nfc_exec_op;
+	chip->select_chip = marvell_nfc_select_chip;
+	if (nfc->caps->is_nfcv2 &&
+	    !of_property_read_bool(np, "marvell,nand-keep-config"))
+		chip->setup_data_interface = marvell_nfc_setup_data_interface;
+
+	mtd = nand_to_mtd(chip);
+	mtd->dev.parent = dev;
+
+	/*
+	 * Default to HW ECC engine mode. If the nand-ecc-mode property is given
+	 * in the DT node, this entry will be overwritten in nand_scan_ident().
+	 */
+	chip->ecc.mode = NAND_ECC_HW;
+
+	ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
+	if (ret) {
+		dev_err(dev, "could not identify the nand chip\n");
+		return ret;
+	}
+
+	if (pdata && pdata->flash_bbt)
+		chip->bbt_options |= NAND_BBT_USE_FLASH;
+
+	if (chip->bbt_options & NAND_BBT_USE_FLASH) {
+		/*
+		 * We'll use a bad block table stored in-flash and don't
+		 * allow writing the bad block marker to the flash.
+		 */
+		chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
+		chip->bbt_td = &bbt_main_descr;
+		chip->bbt_md = &bbt_mirror_descr;
+	}
+
+	/*
+	 * With RA_START bit set in NDCR, columns takes two address cycles. This
+	 * means addressing a chip with more than 256 pages needs a fifth
+	 * address cycle. Addressing a chip using CS 2 or 3 should also needs
+	 * this additional cycle but due to insistance in the documentation and
+	 * lack of hardware to test this situation, this case has been dropped
+	 * and is not supported by this driver.
+	 */
+	marvell_nand->addr_cyc = 4;
+	if (chip->options & NAND_ROW_ADDR_3)
+		marvell_nand->addr_cyc = 5;
+
+	if (pdata) {
+		chip->ecc.size = pdata->ecc_step_size;
+		chip->ecc.strength = pdata->ecc_strength;
+	}
+
+	ret = marvell_nand_ecc_init(mtd, &chip->ecc);
+	if (ret) {
+		dev_err(dev, "ECC init failed: %d\n", ret);
+		return ret;
+	}
+
+	if (chip->ecc.mode == NAND_ECC_HW) {
+		/*
+		 * Subpage write not available with hardware ECC, prohibit also
+		 * subpage read as in userspace subpage acces would still be
+		 * allowed and subpage write, if used, would lead to numerous
+		 * uncorrectable ECC errors.
+		 */
+		chip->options |= NAND_NO_SUBPAGE_WRITE;
+	}
+
+	if (pdata || nfc->caps->legacy_of_bindings) {
+		/*
+		 * We keep the MTD name unchanged to avoid breaking platforms
+		 * where the MTD cmdline parser is used and the bootloader
+		 * has not been updated to use the new naming scheme.
+		 */
+		mtd->name = "pxa3xx_nand-0";
+	} else if (!mtd->name) {
+		/*
+		 * If the new bindings are used and the bootloader has not been
+		 * updated to pass a new mtdparts parameter on the cmdline, you
+		 * should define the following property in your NAND node, ie:
+		 *
+		 *	label = "main-storage";
+		 *
+		 * This way, mtd->name will be set by the core when
+		 * nand_set_flash_node() is called.
+		 */
+		mtd->name = devm_kasprintf(nfc->dev, GFP_KERNEL,
+					   "%s:nand.%d", dev_name(nfc->dev),
+					   marvell_nand->sels[0].cs);
+		if (!mtd->name) {
+			dev_err(nfc->dev, "Failed to allocate mtd->name\n");
+			return -ENOMEM;
+		}
+	}
+
+	ret = nand_scan_tail(mtd);
+	if (ret) {
+		dev_err(dev, "nand_scan_tail failed: %d\n", ret);
+		return ret;
+	}
+
+	if (pdata)
+		/* Legacy bindings support only one chip */
+		ret = mtd_device_register(mtd, pdata->parts[0],
+					  pdata->nr_parts[0]);
+	else
+		ret = mtd_device_register(mtd, NULL, 0);
+	if (ret) {
+		dev_err(dev, "failed to register mtd device: %d\n", ret);
+		nand_release(mtd);
+		return ret;
+	}
+
+	list_add_tail(&marvell_nand->node, &nfc->chips);
+
+	return 0;
+}
+
+static int marvell_nand_chips_init(struct device *dev, struct marvell_nfc *nfc)
+{
+	struct device_node *np = dev->of_node;
+	struct device_node *nand_np;
+	int max_cs = nfc->caps->max_cs_nb;
+	int nchips;
+	int ret;
+
+	if (!np)
+		nchips = 1;
+	else
+		nchips = of_get_child_count(np);
+
+	if (nchips > max_cs) {
+		dev_err(dev, "too many NAND chips: %d (max = %d CS)\n", nchips,
+			max_cs);
+		return -EINVAL;
+	}
+
+	/*
+	 * Legacy bindings do not use child nodes to exhibit NAND chip
+	 * properties and layout. Instead, NAND properties are mixed with the
+	 * controller's and a single subnode presents the memory layout.
+	 */
+	if (nfc->caps->legacy_of_bindings) {
+		ret = marvell_nand_chip_init(dev, nfc, np);
+		return ret;
+	}
+
+	for_each_child_of_node(np, nand_np) {
+		ret = marvell_nand_chip_init(dev, nfc, nand_np);
+		if (ret) {
+			of_node_put(nand_np);
+			return ret;
+		}
+	}
+
+	return 0;
+}
+
+static void marvell_nand_chips_cleanup(struct marvell_nfc *nfc)
+{
+	struct marvell_nand_chip *entry, *temp;
+
+	list_for_each_entry_safe(entry, temp, &nfc->chips, node) {
+		nand_release(nand_to_mtd(&entry->chip));
+		list_del(&entry->node);
+	}
+}
+
+static int marvell_nfc_init_dma(struct marvell_nfc *nfc)
+{
+	struct platform_device *pdev = container_of(nfc->dev,
+						    struct platform_device,
+						    dev);
+	struct dma_slave_config config = {};
+	struct resource *r;
+	dma_cap_mask_t mask;
+	struct pxad_param param;
+	int ret;
+
+	if (!IS_ENABLED(CONFIG_PXA_DMA)) {
+		dev_warn(nfc->dev,
+			 "DMA not enabled in configuration\n");
+		return -ENOTSUPP;
+	}
+
+	ret = dma_set_mask_and_coherent(nfc->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
+
+	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+	if (!r) {
+		dev_err(nfc->dev, "No resource defined for data DMA\n");
+		return -ENXIO;
+	}
+
+	param.drcmr = r->start;
+	param.prio = PXAD_PRIO_LOWEST;
+	dma_cap_zero(mask);
+	dma_cap_set(DMA_SLAVE, mask);
+	nfc->dma_chan =
+		dma_request_slave_channel_compat(mask, pxad_filter_fn,
+						 &param, nfc->dev,
+						 "data");
+	if (!nfc->dma_chan) {
+		dev_err(nfc->dev,
+			"Unable to request data DMA channel\n");
+		return -ENODEV;
+	}
+
+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!r)
+		return -ENXIO;
+
+	config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+	config.src_addr = r->start + NDDB;
+	config.dst_addr = r->start + NDDB;
+	config.src_maxburst = 32;
+	config.dst_maxburst = 32;
+	ret = dmaengine_slave_config(nfc->dma_chan, &config);
+	if (ret < 0) {
+		dev_err(nfc->dev, "Failed to configure DMA channel\n");
+		return ret;
+	}
+
+	/*
+	 * DMA must act on length multiple of 32 and this length may be
+	 * bigger than the destination buffer. Use this buffer instead
+	 * for DMA transfers and then copy the desired amount of data to
+	 * the provided buffer.
+	 */
+	nfc->dma_buf = kmalloc(MAX_CHUNK_SIZE, GFP_DMA);
+	if (!nfc->dma_buf)
+		return -ENOMEM;
+
+	nfc->use_dma = true;
+
+	return 0;
+}
+
+static int marvell_nfc_init(struct marvell_nfc *nfc)
+{
+	struct device_node *np = nfc->dev->of_node;
+
+	/*
+	 * Some SoCs like A7k/A8k need to enable manually the NAND
+	 * controller, gated clocks and reset bits to avoid being bootloader
+	 * dependent. This is done through the use of the System Functions
+	 * registers.
+	 */
+	if (nfc->caps->need_system_controller) {
+		struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
+			np, "marvell,system-controller");
+		u32 reg;
+
+		if (IS_ERR(sysctrl_base))
+			return PTR_ERR(sysctrl_base);
+
+		reg = GENCONF_SOC_DEVICE_MUX_NFC_EN |
+			GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST |
+			GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST |
+			GENCONF_SOC_DEVICE_MUX_NFC_INT_EN;
+		regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
+
+		regmap_read(sysctrl_base, GENCONF_CLK_GATING_CTRL, &reg);
+		reg |= GENCONF_CLK_GATING_CTRL_ND_GATE;
+		regmap_write(sysctrl_base, GENCONF_CLK_GATING_CTRL, reg);
+
+		regmap_read(sysctrl_base, GENCONF_ND_CLK_CTRL, &reg);
+		reg |= GENCONF_ND_CLK_CTRL_EN;
+		regmap_write(sysctrl_base, GENCONF_ND_CLK_CTRL, reg);
+	}
+
+	/* Configure the DMA if appropriate */
+	if (!nfc->caps->is_nfcv2)
+		marvell_nfc_init_dma(nfc);
+
+	/*
+	 * ECC operations and interruptions are only enabled when specifically
+	 * needed. ECC shall not be activated in the early stages (fails probe).
+	 * Arbiter flag, even if marked as "reserved", must be set (empirical).
+	 */
+	writel_relaxed(NDCR_RA_START | NDCR_ALL_INT | NDCR_ND_ARB_EN |
+		       (nfc->caps->is_nfcv2 ?
+			0 : NDCR_RD_ID_CNT(NFCV1_READID_LEN)),
+		       nfc->regs + NDCR);
+	writel_relaxed(0xFFFFFFFF, nfc->regs + NDSR);
+	writel_relaxed(0, nfc->regs + NDECCCTRL);
+
+	return 0;
+}
+
+static int marvell_nfc_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct resource *r;
+	struct marvell_nfc *nfc;
+	int ret;
+	int irq;
+
+	nfc = devm_kzalloc(&pdev->dev, sizeof(struct marvell_nfc),
+			   GFP_KERNEL);
+	if (!nfc)
+		return -ENOMEM;
+
+	nfc->dev = dev;
+	nand_hw_control_init(&nfc->controller);
+	INIT_LIST_HEAD(&nfc->chips);
+
+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	nfc->regs = devm_ioremap_resource(dev, r);
+	if (IS_ERR(nfc->regs))
+		return PTR_ERR(nfc->regs);
+
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
+		dev_err(dev, "failed to retrieve irq\n");
+		return irq;
+	}
+
+	nfc->ecc_clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(nfc->ecc_clk))
+		return PTR_ERR(nfc->ecc_clk);
+
+	ret = clk_prepare_enable(nfc->ecc_clk);
+	if (ret)
+		return ret;
+
+	marvell_nfc_disable_int(nfc, NDCR_ALL_INT);
+	marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
+	ret = devm_request_irq(dev, irq, marvell_nfc_isr,
+			       0, "marvell-nfc", nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	/* Get NAND controller capabilities */
+	if (pdev->id_entry)
+		nfc->caps = (void *)pdev->id_entry->driver_data;
+	else
+		nfc->caps = of_device_get_match_data(&pdev->dev);
+
+	if (!nfc->caps) {
+		dev_err(dev, "Could not retrieve NFC caps\n");
+		ret = -EINVAL;
+		goto unprepare_clk;
+	}
+
+	/* Init the controller and then probe the chips */
+	ret = marvell_nfc_init(nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	platform_set_drvdata(pdev, nfc);
+
+	ret = marvell_nand_chips_init(dev, nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	return 0;
+
+unprepare_clk:
+	clk_disable_unprepare(nfc->ecc_clk);
+
+	return ret;
+}
+
+static int marvell_nfc_remove(struct platform_device *pdev)
+{
+	struct marvell_nfc *nfc = platform_get_drvdata(pdev);
+
+	marvell_nand_chips_cleanup(nfc);
+
+	if (nfc->use_dma) {
+		dmaengine_terminate_all(nfc->dma_chan);
+		dma_release_channel(nfc->dma_chan);
+	}
+
+	clk_disable_unprepare(nfc->ecc_clk);
+
+	return 0;
+}
+
+static const struct marvell_nfc_caps marvell_armada_8k_nfc_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.need_system_controller = true,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada370_nfc_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_pxa3xx_nfc_caps = {
+	.max_cs_nb = 2,
+	.max_rb_nb = 1,
+	.use_dma = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada_8k_nfc_legacy_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.need_system_controller = true,
+	.legacy_of_bindings = true,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada370_nfc_legacy_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.legacy_of_bindings = true,
+};
+
+static const struct marvell_nfc_caps marvell_pxa3xx_nfc_legacy_caps = {
+	.max_cs_nb = 2,
+	.max_rb_nb = 1,
+	.legacy_of_bindings = true,
+};
+
+static const struct platform_device_id marvell_nfc_platform_ids[] = {
+	{
+		.name = "pxa3xx-nand",
+		.driver_data = (kernel_ulong_t)&marvell_pxa3xx_nfc_legacy_caps,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(platform, marvell_nfc_platform_ids);
+
+static const struct of_device_id marvell_nfc_of_ids[] = {
+	{
+		.compatible = "marvell,armada-8k-nand-controller",
+		.data = &marvell_armada_8k_nfc_caps,
+	},
+	{
+		.compatible = "marvell,armada370-nand-controller",
+		.data = &marvell_armada370_nfc_caps,
+	},
+	{
+		.compatible = "marvell,pxa3xx-nand-controller",
+		.data = &marvell_pxa3xx_nfc_caps,
+	},
+	/* Support for old/deprecated bindings: */
+	{
+		.compatible = "marvell,armada-8k-nand",
+		.data = &marvell_armada_8k_nfc_legacy_caps,
+	},
+	{
+		.compatible = "marvell,armada370-nand",
+		.data = &marvell_armada370_nfc_legacy_caps,
+	},
+	{
+		.compatible = "marvell,pxa3xx-nand",
+		.data = &marvell_pxa3xx_nfc_legacy_caps,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, marvell_nfc_of_ids);
+
+static struct platform_driver marvell_nfc_driver = {
+	.driver	= {
+		.name		= "marvell-nfc",
+		.of_match_table = marvell_nfc_of_ids,
+	},
+	.id_table = marvell_nfc_platform_ids,
+	.probe = marvell_nfc_probe,
+	.remove	= marvell_nfc_remove,
+};
+module_platform_driver(marvell_nfc_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Marvell NAND controller driver");
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Add marvell_nand driver which aims at replacing the existing pxa3xx_nand
driver.

The new driver intends to be easier to understand and follows the brand
new NAND framework rules by implementing hooks for every pattern the
controller might support and referencing them inside a parser object
that will be given to the core at each ->exec_op() call.

Raw accessors are implemented, useful to test/debug memory/filesystem
corruptions. Userspace binaries contained in the mtd-utils package may
now be used and their output trusted.

Timings may not be kept from the bootloader anymore, the timings used
for instance in U-Boot were not optimal and it supposed to have NAND
support (and initialized) in the bootloader.

Thanks to the improved timings, implementation of ONFI mode 5 support
(with EDO managed by adding a delay on data sampling), merging the
commands together and optimizing writes in the command registers, the
new driver may achieve faster throughputs in both directions.
Measurements show an improvement of about +23% read throughput and +24%
write throughput. These measurements have been done with an
Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH ECC
correction) using the userspace tool 'flash_speed' from the MTD test
suite.

Besides these important topics, the new driver addresses several
unsolved known issues in the old driver which:
- did not work with ECC soft neither with ECC none ;
- relied on naked read/write (which is unchanged) while the NFCv1
  embedded in the pxa3xx platforms do not implement it, so several
  NAND commands did not actually ever work without any notice (like
  reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
- wrote the OOB data correctly, but was not able to read it correctly
  past the first OOB data chunk ;
- did not displayed ECC bytes ;
- used device tree bindings that did not allow more than one NAND chip,
  and did not allow to choose the correct chip select if not
  incrementing from 0. Plus, the Ready/Busy line used had to be 0.

Old device tree bindings are still supported but deprecated. A more
hierarchical view has to be used to keep the controller and the NAND
chip structures clearly separated both inside the device tree and also
in the driver code.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 drivers/mtd/nand/Kconfig        |   12 +
 drivers/mtd/nand/Makefile       |    1 +
 drivers/mtd/nand/marvell_nand.c | 2951 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 2964 insertions(+)
 create mode 100644 drivers/mtd/nand/marvell_nand.c

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 859eb7790c46..9e141e03f5c2 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -323,6 +323,18 @@ config MTD_NAND_PXA3xx
 	  platforms (XP, 370, 375, 38x, 39x) and 64-bit Armada
 	  platforms (7K, 8K) (NFCv2).
 
+config MTD_NAND_MARVELL
+	tristate "NAND controller support on Marvell boards"
+	depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
+		   COMPILE_TEST
+	depends on HAS_IOMEM
+	help
+	  This enables the NAND flash controller driver for Marvell boards,
+	  including:
+	  - PXA3xx processors (NFCv1)
+	  - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
+	  - 64-bit Aramda platforms (7k, 8k) (NFCv2)
+
 config MTD_NAND_SLC_LPC32XX
 	tristate "NXP LPC32xx SLC Controller"
 	depends on ARCH_LPC32XX
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 118a1349aad3..921634ba400c 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_MTD_NAND_OMAP2) 		+= omap2_nand.o
 obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)	+= omap_elm.o
 obj-$(CONFIG_MTD_NAND_CM_X270)		+= cmx270_nand.o
 obj-$(CONFIG_MTD_NAND_PXA3xx)		+= pxa3xx_nand.o
+obj-$(CONFIG_MTD_NAND_MARVELL)		+= marvell_nand.o
 obj-$(CONFIG_MTD_NAND_TMIO)		+= tmio_nand.o
 obj-$(CONFIG_MTD_NAND_PLATFORM)		+= plat_nand.o
 obj-$(CONFIG_MTD_NAND_PASEMI)		+= pasemi_nand.o
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
new file mode 100644
index 000000000000..2525d9b2f4fa
--- /dev/null
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -0,0 +1,2951 @@
+/*
+ * Marvell NAND flash controller driver
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Copyright (C) 2017 Marvell
+ * Author: Miquel RAYNAL <miquel.raynal@free-electrons.com>
+ */
+
+#include <linux/module.h>
+#include <linux/clk.h>
+#include <linux/mtd/rawnand.h>
+#include <linux/of_platform.h>
+#include <linux/iopoll.h>
+#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include <asm/unaligned.h>
+
+#include <linux/dmaengine.h>
+#include <linux/dma-mapping.h>
+#include <linux/dma/pxa-dma.h>
+#include <linux/platform_data/mtd-nand-pxa3xx.h>
+
+/* Data FIFO granularity, FIFO reads/writes must be a multiple of this length */
+#define FIFO_DEPTH		8
+#define FIFO_REP(x)		(x / sizeof(u32))
+#define BCH_SEQ_READS		(32 / FIFO_DEPTH)
+/* NFC does not support transfers of larger chunks at a time */
+#define MAX_CHUNK_SIZE		2112
+/* NFCv1 cannot read more that 7 bytes of ID */
+#define NFCV1_READID_LEN	7
+/* Polling is done at a pace of POLL_PERIOD us until POLL_TIMEOUT is reached */
+#define POLL_PERIOD		0
+#define POLL_TIMEOUT		100000
+/* Interrupt maximum wait period in ms */
+#define IRQ_TIMEOUT		1000
+/* Latency in clock cycles between SoC pins and NFC logic */
+#define MIN_RD_DEL_CNT		3
+/* Maximum number of contiguous address cycles */
+#define MAX_ADDRESS_CYC_NFCV1	5
+#define MAX_ADDRESS_CYC_NFCV2	7
+/* System control registers/bits to enable the NAND controller on some SoCs */
+#define GENCONF_SOC_DEVICE_MUX	0x208
+#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
+#define GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST BIT(20)
+#define GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST BIT(21)
+#define GENCONF_SOC_DEVICE_MUX_NFC_INT_EN BIT(25)
+#define GENCONF_CLK_GATING_CTRL	0x220
+#define GENCONF_CLK_GATING_CTRL_ND_GATE BIT(2)
+#define GENCONF_ND_CLK_CTRL	0x700
+#define GENCONF_ND_CLK_CTRL_EN	BIT(0)
+
+/* NAND controller data flash control register */
+#define NDCR			0x00
+/* NAND interface timing parameter 0 register */
+#define NDTR0			0x04
+/* NAND interface timing parameter 1 register */
+#define NDTR1			0x0C
+/* NAND controller status register */
+#define NDSR			0x14
+/* NAND ECC control register */
+#define NDECCCTRL		0x28
+/* NAND controller data buffer register */
+#define NDDB			0x40
+/* NAND controller command buffer 0 register */
+#define NDCB0			0x48
+/* NAND controller command buffer 1 register */
+#define NDCB1			0x4C
+/* NAND controller command buffer 2 register */
+#define NDCB2			0x50
+/* NAND controller command buffer 3 register */
+#define NDCB3			0x54
+
+/* Data flash control register bitfields */
+#define NDCR_ALL_INT		GENMASK(11, 0)
+#define NDCR_CS1_CMDDM		BIT(7)
+#define NDCR_CS0_CMDDM		BIT(8)
+#define NDCR_RDYM		BIT(11)
+#define NDCR_ND_ARB_EN		BIT(12)
+#define NDCR_RA_START		BIT(15)
+#define NDCR_RD_ID_CNT(x)	(min_t(unsigned int, x, 0x7) << 16)
+#define NDCR_PAGE_SZ(x)		(x >= 2048 ? BIT(24) : 0)
+#define NDCR_DWIDTH_M		BIT(26)
+#define NDCR_DWIDTH_C		BIT(27)
+#define NDCR_ND_RUN		BIT(28)
+#define NDCR_DMA_EN		BIT(29)
+#define NDCR_ECC_EN		BIT(30)
+#define NDCR_SPARE_EN		BIT(31)
+
+/* NAND interface timing parameter registers bitfields */
+#define NDTR0_TRP(x)		((min_t(unsigned int, x, 0xF) & 0x7) << 0)
+#define NDTR0_TRH(x)		(min_t(unsigned int, x, 0x7) << 3)
+#define NDTR0_ETRP(x)		((min_t(unsigned int, x, 0xF) & 0x8) << 3)
+#define NDTR0_SEL_NRE_EDGE	BIT(7)
+#define NDTR0_TWP(x)		(min_t(unsigned int, x, 0x7) << 8)
+#define NDTR0_TWH(x)		(min_t(unsigned int, x, 0x7) << 11)
+#define NDTR0_TCS(x)		(min_t(unsigned int, x, 0x7) << 16)
+#define NDTR0_TCH(x)		(min_t(unsigned int, x, 0x7) << 19)
+#define NDTR0_RD_CNT_DEL(x)	(min_t(unsigned int, x, 0xF) << 22)
+#define NDTR0_SELCNTR		BIT(26)
+#define NDTR0_TADL(x)		(min_t(unsigned int, x, 0x1F) << 27)
+
+#define NDTR1_TAR(x)		(min_t(unsigned int, x, 0xF) << 0)
+#define NDTR1_TWHR(x)		(min_t(unsigned int, x, 0xF) << 4)
+#define NDTR1_TRHW(x)		(min_t(unsigned int, x / 16, 0x3) << 8)
+#define NDTR1_PRESCALE		BIT(14)
+#define NDTR1_WAIT_MODE		BIT(15)
+#define NDTR1_TR(x)		(min_t(unsigned int, x, 0xFFFF) << 16)
+
+/* NAND controller status register bitfields */
+#define NDSR_WRCMDREQ		BIT(0)
+#define NDSR_RDDREQ		BIT(1)
+#define NDSR_WRDREQ		BIT(2)
+#define NDSR_CORERR		BIT(3)
+#define NDSR_UNCERR		BIT(4)
+#define NDSR_CMDD(cs)		BIT(8 - cs)
+#define NDSR_RDY(rb)		BIT(11 + rb)
+#define NDSR_ERRCNT(x)		((x >> 16) & 0x1F)
+
+/* NAND ECC control register bitfields */
+#define NDECCTRL_BCH_EN		BIT(0)
+
+/* NAND controller command buffer registers bitfields */
+#define NDCB0_CMD1(x)		((x & 0xFF) << 0)
+#define NDCB0_CMD2(x)		((x & 0xFF) << 8)
+#define NDCB0_ADDR_CYC(x)	((x & 0x7) << 16)
+#define NDCB0_DBC		BIT(19)
+#define NDCB0_CMD_TYPE(x)	((x & 0x7) << 21)
+#define NDCB0_CSEL		BIT(24)
+#define NDCB0_RDY_BYP		BIT(27)
+#define NDCB0_LEN_OVRD		BIT(28)
+#define NDCB0_CMD_XTYPE(x)	((x & 0x7) << 29)
+
+#define NDCB1_COLS(x)		((x & 0xFFFF) << 0)
+#define NDCB1_ADDRS(x)		(x << 16)
+
+#define NDCB2_ADDR5(x)		(((x >> 16) & 0xFF) << 0)
+
+#define NDCB3_ADDR6(x)		((x & 0xFF) << 16)
+#define NDCB3_ADDR7(x)		((x & 0xFF) << 24)
+
+/* NAND controller command buffer 0 register 'type' and 'xtype' fields */
+#define TYPE_READ		0
+#define TYPE_WRITE		1
+#define TYPE_ERASE		2
+#define TYPE_READ_ID		3
+#define TYPE_STATUS		4
+#define TYPE_RESET		5
+#define TYPE_NAKED_CMD		6
+#define TYPE_NAKED_ADDR		7
+#define TYPE_MASK		7
+#define XTYPE_MONOLITHIC_RW	0
+#define XTYPE_LAST_NAKED_RW	1
+#define XTYPE_FINAL_COMMAND	3
+#define XTYPE_READ		4
+#define XTYPE_WRITE_DISPATCH	4
+#define XTYPE_NAKED_RW		5
+#define XTYPE_COMMAND_DISPATCH	6
+#define XTYPE_MASK		7
+
+/*
+ * Marvell ECC engine works differently than the others, in order to limit the
+ * size of the IP, hardware engineers choose to set a fixed strength at 16 bits
+ * per subpage, and depending on a the desired strength needed by the NAND chip,
+ * a particular layout mixing data/spare/ecc is defined, with a possible last
+ * chunk smaller that the others.
+ *
+ * @writesize:		Full page size on which the layout applies
+ * @chunk:		Desired ECC chunk size on which the layout applies
+ * @strength:		Desired ECC strength (per chunk size bytes) on which the
+ *			layout applies
+ * @full_chunk_cnt:	Number of full-sized chunks, which is the number of
+ *			repetitions of the pattern:
+ *			(data_bytes + spare_bytes + ecc_bytes).
+ * @data_bytes:		Number of data bytes per chunk
+ * @spare_bytes:	Number of spare bytes per chunk
+ * @ecc_bytes:		Number of ecc bytes per chunk
+ * @last_chunk_cnt:	If there is a last chunk with a different size than
+ *			the first ones, the next fields may not be empty
+ * @last_data_bytes:	Number of data bytes in the last chunk
+ * @last_spare_bytes:	Number of spare bytes in the last chunk
+ * @last_ecc_bytes:	Number of ecc bytes in the last chunk
+ */
+struct marvell_hw_ecc_layout {
+	/* Constraints */
+	int writesize;
+	int chunk;
+	int strength;
+	/* Corresponding layout */
+	int full_chunk_cnt;
+	int data_bytes;
+	int spare_bytes;
+	int ecc_bytes;
+	int last_chunk_cnt;
+	int last_data_bytes;
+	int last_spare_bytes;
+	int last_ecc_bytes;
+};
+
+#define MARVELL_LAYOUT(ws, dc, ds, fcc, db, sb, eb, lcc, ldb, lsb, leb) \
+	{								\
+		.writesize = ws,					\
+		.chunk = dc,						\
+		.strength = ds,						\
+		.full_chunk_cnt = fcc,					\
+		.data_bytes = db,					\
+		.spare_bytes = sb,					\
+		.ecc_bytes = eb,					\
+		.last_chunk_cnt = lcc,					\
+		.last_data_bytes = ldb,					\
+		.last_spare_bytes = lsb,				\
+		.last_ecc_bytes = leb,					\
+	}
+
+/* Layouts explained in AN-379_Marvell_SoC_NFC_ECC */
+static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {
+	MARVELL_LAYOUT(  512,   512,  1,  1,  512,  8,  8,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 2048,   512,  1,  1, 2048, 40, 24,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 2048,   512,  4,  1, 2048, 32, 30,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 4096,   512,  4,  2, 2048, 32, 30,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 4096,   512,  8,  4, 1024,  0, 30,  1,  0, 64, 30),
+};
+
+/*
+ * The Nand Flash Controller has up to 4 CE and 2 RB pins. The CE selection
+ * is made by a field in NDCB0 register, and in another field in NDCB2 register.
+ * The datasheet describes the logic with an error: ADDR5 field is once
+ * declared at the beginning of NDCB2, and another time at its end. Because the
+ * ADDR5 field of NDCB2 may be used by other bytes, it would be more logical
+ * to use the last bit of this field instead of the first ones.
+ *
+ * @cs:			Wanted CE lane.
+ * @ndcb0_csel:		Value of the NDCB0 register with or without the flag
+ *			selecting the wanted CE lane. This is set once when
+ *			the Device Tree is probed.
+ * @rb:			Ready/Busy pin for the flash chip
+ */
+struct marvell_nand_chip_sel {
+	unsigned int cs;
+	u32 ndcb0_csel;
+	unsigned int rb;
+};
+
+/*
+ * NAND chip structure: stores NAND chip device related information
+ *
+ * @chip:		Base NAND chip structure
+ * @node:		Used to store NAND chips into a list
+ * @layout		NAND layout when using hardware ECC
+ * @ndtr0		Timing registers 0 value for this NAND chip
+ * @ndtr1		Timing registers 1 value for this NAND chip
+ * @selected_die:	Current active CS
+ * @nsels:		Number of CS lines required by the NAND chip
+ * @sels:		Array of CS lines descriptions
+ */
+struct marvell_nand_chip {
+	struct nand_chip chip;
+	struct list_head node;
+	const struct marvell_hw_ecc_layout *layout;
+	u32 ndtr0;
+	u32 ndtr1;
+	int addr_cyc;
+	int selected_die;
+	unsigned int nsels;
+	struct marvell_nand_chip_sel sels[0];
+};
+
+static inline struct marvell_nand_chip *to_marvell_nand(struct nand_chip *chip)
+{
+	return container_of(chip, struct marvell_nand_chip, chip);
+}
+
+static inline struct marvell_nand_chip_sel *to_nand_sel(struct marvell_nand_chip
+							*nand)
+{
+	return &nand->sels[nand->selected_die];
+}
+
+/*
+ * NAND controller capabilities for distinction between compatible strings
+ *
+ * @max_cs_nb:		Number of Chip Select lines available
+ * @max_rb_nb:		Number of Ready/Busy lines available
+ * @need_system_controller: Indicates if the SoC needs to have access to the
+ *                      system controller (ie. to enable the NAND controller)
+ * @legacy_of_bindings:	Indicates if DT parsing must be done using the old
+ *			fashion way
+ * @is_nfcv2:		NFCv2 has numerous enhancements compared to NFCv1, ie.
+ *			BCH error detection and correction algorithm,
+ *			NDCB3 register has been added
+ * @use_dma:		Use dma for data transfers
+ */
+struct marvell_nfc_caps {
+	unsigned int max_cs_nb;
+	unsigned int max_rb_nb;
+	bool need_system_controller;
+	bool legacy_of_bindings;
+	bool is_nfcv2;
+	bool use_dma;
+};
+
+/*
+ * NAND controller structure: stores Marvell NAND controller information
+ *
+ * @controller:		Base controller structure
+ * @dev:		Parent device (used to print error messages)
+ * @regs:		NAND controller registers
+ * @ecc_clk:		ECC block clock, two times the NAND controller clock
+ * @complete:		Completion object to wait for NAND controller events
+ * @assigned_cs:	Bitmask describing already assigned CS lines
+ * @chips:		List containing all the NAND chips attached to
+ *			this NAND controller
+ * @caps:		NAND controller capabilities for each compatible string
+ * @buf:		Controller local buffer to store a part of the read
+ *			buffer when the read operation was not 8 bytes aligned
+ *			as is the FIFO.
+ * @buf_pos:		Position in the 'buf' buffer
+ * @dma_chan:		DMA channel (NFCv1 only)
+ * @dma_buf:		32-bit aligned buffer for DMA transfers (NFCv1 only)
+ */
+struct marvell_nfc {
+	struct nand_hw_control controller;
+	struct device *dev;
+	void __iomem *regs;
+	struct clk *ecc_clk;
+	struct completion complete;
+	unsigned long assigned_cs;
+	struct list_head chips;
+	struct nand_chip *selected_chip;
+	const struct marvell_nfc_caps *caps;
+
+	/*
+	 * Buffer handling: @buf will be accessed byte-per-byter but also
+	 * int-per-int when exchanging data with the NAND controller FIFO,
+	 * 32-bit alignment is then required.
+	 */
+	u8 buf[FIFO_DEPTH] __aligned(sizeof(u32));
+	int buf_pos;
+
+	/* DMA (NFCv1 only) */
+	bool use_dma;
+	struct dma_chan *dma_chan;
+	u8 *dma_buf;
+};
+
+static inline struct marvell_nfc *to_marvell_nfc(struct nand_hw_control *ctrl)
+{
+	return container_of(ctrl, struct marvell_nfc, controller);
+}
+
+/*
+ * NAND controller timings expressed in NAND Controller clock cycles
+ *
+ * @tRP:		ND_nRE pulse width
+ * @tRH:		ND_nRE high duration
+ * @tWP:		ND_nWE pulse time
+ * @tWH:		ND_nWE high duration
+ * @tCS:		Enable signal setup time
+ * @tCH:		Enable signal hold time
+ * @tADL:		Address to write data delay
+ * @tAR:		ND_ALE low to ND_nRE low delay
+ * @tWHR:		ND_nWE high to ND_nRE low for status read
+ * @tRHW:		ND_nRE high duration, read to write delay
+ * @tR:			ND_nWE high to ND_nRE low for read
+ */
+struct marvell_nfc_timings {
+	/* NDTR0 fields */
+	unsigned int tRP;
+	unsigned int tRH;
+	unsigned int tWP;
+	unsigned int tWH;
+	unsigned int tCS;
+	unsigned int tCH;
+	unsigned int tADL;
+	/* NDTR1 fields */
+	unsigned int tAR;
+	unsigned int tWHR;
+	unsigned int tRHW;
+	unsigned int tR;
+};
+
+/*
+ * Derives a duration in numbers of clock cycles.
+ *
+ * @ps: Duration in pico-seconds
+ * @period_ns:  Clock period in nano-seconds
+ *
+ * Convert the duration in nano-seconds, then divide by the period and
+ * return the number of clock periods.
+ */
+#define TO_CYCLES(ps, period_ns) (DIV_ROUND_UP(ps / 1000, period_ns))
+
+/*
+ * NAND driver structure filled during the parsing of the ->exec_op() subop
+ * subset of instructions.
+ *
+ * @ndcb:		Array for the values of the NDCBx registers
+ * @cle_ale_delay_ns:	Optional delay after the last CMD or ADDR cycle
+ * @rdy_timeout_ms:	Timeout for waits on Ready/Busy pin
+ * @rdy_delay_ns:	Optional delay after waiting for the RB pin
+ * @data_delay_ns:	Optional delay after the data xfer
+ * @data_instr_idx:	Index of the data instruction in the subop
+ * @data_instr:		Pointer to the data instruction in the subop
+ */
+struct marvell_nfc_op {
+	u32 ndcb[4];
+	unsigned int cle_ale_delay_ns;
+	unsigned int rdy_timeout_ms;
+	unsigned int rdy_delay_ns;
+	unsigned int data_delay_ns;
+	unsigned int data_instr_idx;
+	const struct nand_op_instr *data_instr;
+};
+
+/*
+ * Internal helper to conditionnally apply a delay (from the above structure,
+ * most of the time).
+ */
+static void cond_delay(unsigned int ns)
+{
+	if (!ns)
+		return;
+
+	if (ns < 10000)
+		ndelay(ns);
+	else
+		udelay(DIV_ROUND_UP(ns, 1000));
+}
+
+/*
+ * Internal helper to mimic core functions whithout having to distinguish if
+ * this is the first read operation on the page or not and hence choose the
+ * right function.
+ */
+int read_page_data(struct nand_chip *chip, unsigned int page,
+		   unsigned int column, void *buf, unsigned int len)
+{
+	if (!column)
+		return nand_read_page_op(chip, page, column, buf, len);
+	else
+		return nand_change_read_column_op(chip, column, buf, len,
+						  false);
+}
+
+/*
+ * The controller has many flags that could generate interrupts, most of them
+ * are disabled and polling is used. For the very slow signals, using interrupts
+ * may relax the CPU charge.
+ */
+static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	u32 reg;
+
+	/* Writing 1 disables the interrupt */
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg | int_mask, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	u32 reg;
+
+	/* Writing 0 enables the interrupt */
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg & ~int_mask, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	writel_relaxed(int_mask, nfc->regs + NDSR);
+}
+
+/*
+ * The core may ask the controller to use only 8-bit accesses while usually
+ * using 16-bit accesses. Later function may blindly call this one with a
+ * boolean to indicate if 8-bit accesses must be enabled of disabled without
+ * knowing if 16-bit accesses are actually in use.
+ */
+static void marvell_nfc_force_byte_access(struct nand_chip *chip,
+					  bool force_8bit)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr;
+
+	if (!(chip->options & NAND_BUSWIDTH_16))
+		return;
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (force_8bit)
+		ndcr &= ~(NDCR_DWIDTH_M | NDCR_DWIDTH_C);
+	else
+		ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
+
+	writel_relaxed(ndcr, nfc->regs + NDCR);
+}
+
+static int marvell_nfc_wait_ndrun(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 val;
+	int ret;
+
+	/*
+	 * The command is being processed, wait for the ND_RUN bit to be
+	 * cleared by the NFC. If not, we must clear it by hand.
+	 */
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDCR, val,
+					 (val & NDCR_ND_RUN) == 0,
+					 POLL_PERIOD, POLL_TIMEOUT);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on NAND controller run mode\n");
+		writel_relaxed(readl_relaxed(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+		return ret;
+	}
+
+	return 0;
+}
+
+/*
+ * Any time a command has to be sent to the controller, the following sequence
+ * has to be followed:
+ * - call marvell_nfc_prepare_cmd()
+ *      -> activate the ND_RUN bit that will kind of 'start a job'
+ *      -> wait the signal indicating the NFC is waiting for a command
+ * - send the command (cmd and address cycles)
+ * - enventually send or receive the data
+ * - call marvell_nfc_end_cmd() with the corresponding flag
+ *      -> wait the flag to be triggered or cancel the job with a timeout
+ *
+ * The following functions are helpers to do this job and keep in the
+ * specialized functions the code that really does the operations.
+ */
+static int marvell_nfc_prepare_cmd(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr, val;
+	int ret;
+
+	/* Poll ND_RUN and clear NDSR before issuing any command */
+	ret = marvell_nfc_wait_ndrun(chip);
+	if (ret) {
+		dev_err(nfc->dev, "Last operation did not suceed\n");
+		return ret;
+	}
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(readl_relaxed(nfc->regs + NDSR), nfc->regs + NDSR);
+
+	/* Assert ND_RUN bit and wait the NFC to be ready */
+	writel_relaxed(ndcr | NDCR_ND_RUN, nfc->regs + NDCR);
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
+					 val & NDSR_WRCMDREQ,
+					 POLL_PERIOD, POLL_TIMEOUT);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on WRCMDRE\n");
+		return -ETIMEDOUT;
+	}
+
+	/* Command may be written, clear WRCMDREQ status bit */
+	writel_relaxed(NDSR_WRCMDREQ, nfc->regs + NDSR);
+
+	return 0;
+}
+
+static void marvell_nfc_send_cmd(struct nand_chip *chip,
+				 struct marvell_nfc_op *nfc_op)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+	dev_dbg(nfc->dev,
+		"NDCB0: 0x%08x\nNDCB1: 0x%08x\nNDCB2: 0x%08x\nNDCB3: 0x%08x\n",
+		nfc_op->ndcb[0], nfc_op->ndcb[1], nfc_op->ndcb[2],
+		nfc_op->ndcb[3]);
+
+	writel_relaxed(to_nand_sel(marvell_nand)->ndcb0_csel | nfc_op->ndcb[0],
+		       nfc->regs + NDCB0);
+	writel_relaxed(nfc_op->ndcb[1], nfc->regs + NDCB0);
+	writel(nfc_op->ndcb[2], nfc->regs + NDCB0);
+
+	/*
+	 * Write NDCB0 four times only if LEN_OVRD is set or if ADDR6 or ADDR7
+	 * fields are used (only available on NFCv2).
+	 */
+	if (nfc_op->ndcb[0] & NDCB0_LEN_OVRD ||
+	    (nfc_op->ndcb[0] & NDCB0_ADDR_CYC(6)) == NDCB0_ADDR_CYC(6)) {
+		if (nfc->caps->is_nfcv2)
+			writel(nfc_op->ndcb[3], nfc->regs + NDCB0);
+		else
+			dev_err(nfc->dev,
+				"NDCB3 does not exist on NFCv1 and should not be written\n");
+	}
+}
+
+static int marvell_nfc_end_cmd(struct nand_chip *chip, int flag,
+			       const char *label)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 val;
+	int ret;
+
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
+					 val & flag,
+					 POLL_PERIOD, POLL_TIMEOUT);
+
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on %s (NDSR: 0x%08x)\n",
+			label, val);
+		if (nfc->dma_chan)
+			dmaengine_terminate_all(nfc->dma_chan);
+		return ret;
+	}
+
+	/*
+	 * DMA function uses this helper to poll on CMDD bits without wanting
+	 * them to be bleared.
+	 */
+	if (nfc->use_dma && (readl(nfc->regs + NDCR) & NDCR_DMA_EN))
+		return 0;
+
+	writel_relaxed(flag, nfc->regs + NDSR);
+
+	return 0;
+}
+
+static int marvell_nfc_wait_cmdd(struct nand_chip *chip)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	int cs_flag = NDSR_CMDD(to_nand_sel(marvell_nand)->ndcb0_csel);
+
+	return marvell_nfc_end_cmd(chip, cs_flag, "CMDD");
+}
+
+static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int ret;
+
+	/* Timeout is expressed in ms */
+	if (!timeout_ms)
+		timeout_ms = IRQ_TIMEOUT;
+
+	init_completion(&nfc->complete);
+
+	marvell_nfc_enable_int(nfc, NDCR_RDYM);
+	ret = wait_for_completion_timeout(&nfc->complete,
+					  msecs_to_jiffies(timeout_ms));
+	marvell_nfc_disable_int(nfc, NDCR_RDYM);
+	marvell_nfc_clear_int(nfc, NDSR_RDY(0) | NDSR_RDY(1));
+	if (!ret) {
+		dev_err(nfc->dev, "Timeout waiting for RB signal\n");
+		return -ETIMEDOUT;
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_select_chip(struct mtd_info *mtd, int die_nr)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr;
+
+	if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
+		return;
+
+	if (die_nr < 0 || die_nr >= marvell_nand->nsels) {
+		nfc->selected_chip = NULL;
+		marvell_nand->selected_die = -1;
+		return;
+	}
+
+	/*
+	 * Do not change the timing registers when using the DT property
+	 * marvell,nand-keep-config; in that case ->ndtr0 and ->ndtr1 from the
+	 * marvell_nand structure are supposedly empty.
+	 */
+	if (marvell_nand->ndtr0 && marvell_nand->ndtr1) {
+		writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
+		writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
+	}
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	/* Ensure controller is not blocked; also clear some fields */
+	ndcr &= ~(NDCR_ND_RUN | NDCR_DWIDTH_M | NDCR_DWIDTH_C |
+		  NDCR_PAGE_SZ(2048));
+
+	/* Adapt bus width */
+	if (chip->options & NAND_BUSWIDTH_16)
+		ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
+
+	/* Page size as seen by the controller, either 512B or 2kiB */
+	ndcr |= NDCR_PAGE_SZ(mtd->writesize);
+
+	/* Update the control register */
+	writel_relaxed(ndcr,  nfc->regs + NDCR);
+
+	/* Also reset the interrupt status register */
+	marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
+
+	nfc->selected_chip = chip;
+	marvell_nand->selected_die = die_nr;
+}
+
+static irqreturn_t marvell_nfc_isr(int irq, void *dev_id)
+{
+	struct marvell_nfc *nfc = dev_id;
+	u32 st = readl_relaxed(nfc->regs + NDSR);
+	u32 ien = (~readl_relaxed(nfc->regs + NDCR)) & NDCR_ALL_INT;
+
+	/*
+	 * RDY interrupt mask is one bit in NDCR while there are two status
+	 * bit in NDSR (RDY[cs0/cs2] and RDY[cs1/cs3]).
+	 */
+	if (st & NDSR_RDY(1))
+		st |= NDSR_RDY(0);
+
+	if (!(st & ien))
+		return IRQ_NONE;
+
+	marvell_nfc_disable_int(nfc, st & NDCR_ALL_INT);
+
+	if (!(st & (NDSR_RDDREQ | NDSR_WRDREQ | NDSR_WRCMDREQ)))
+		complete(&nfc->complete);
+
+	return IRQ_HANDLED;
+}
+
+/* HW ECC related functions */
+static void marvell_nfc_enable_hw_ecc(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (!(ndcr & NDCR_ECC_EN)) {
+		writel(ndcr | NDCR_ECC_EN, nfc->regs + NDCR);
+
+		/*
+		 * When enabling BCH, set threshold to 0 to always know the
+		 * number of corrected bitflips.
+		 */
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			writel(NDECCTRL_BCH_EN, nfc->regs + NDECCCTRL);
+	}
+}
+
+static void marvell_nfc_disable_hw_ecc(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (ndcr & NDCR_ECC_EN) {
+		writel_relaxed(ndcr & ~NDCR_ECC_EN, nfc->regs + NDCR);
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			writel_relaxed(0, nfc->regs + NDECCCTRL);
+	}
+}
+
+/*
+ * Enable/disable spare area
+ *
+ * NFCv1 needs it (see Hamming related functions). NFCv2 uses LEN_OVRD and thus
+ * does not need this bit to be set.
+ */
+static void marvell_nfc_enable_spare(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (!(ndcr & NDCR_SPARE_EN))
+		writel(ndcr | NDCR_SPARE_EN, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_disable_spare(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (ndcr & NDCR_SPARE_EN)
+		writel_relaxed(ndcr & ~NDCR_SPARE_EN, nfc->regs + NDCR);
+}
+
+/* DMA related helpers */
+static void marvell_nfc_enable_dma(struct marvell_nfc *nfc)
+{
+	u32 reg;
+
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg | NDCR_DMA_EN, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_disable_dma(struct marvell_nfc *nfc)
+{
+	u32 reg;
+
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg & ~NDCR_DMA_EN, nfc->regs + NDCR);
+}
+
+/* Read/write PIO/DMA accessors */
+static int marvell_nfc_xfer_data_dma(struct marvell_nfc *nfc,
+				     enum dma_data_direction direction,
+				     unsigned int len)
+{
+	unsigned int dma_len = min_t(int, ALIGN(len, 32), MAX_CHUNK_SIZE);
+	struct dma_async_tx_descriptor *tx;
+	struct scatterlist sg;
+	dma_cookie_t cookie;
+	int ret;
+
+	marvell_nfc_enable_dma(nfc);
+	/* Prepare the DMA transfer */
+	sg_init_one(&sg, nfc->dma_buf, dma_len);
+	dma_map_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
+	tx = dmaengine_prep_slave_sg(nfc->dma_chan, &sg, 1,
+				     direction == DMA_FROM_DEVICE ?
+				     DMA_DEV_TO_MEM : DMA_MEM_TO_DEV,
+				     DMA_PREP_INTERRUPT);
+	if (!tx) {
+		dev_err(nfc->dev, "Could not prepare DMA S/G list\n");
+		return -ENXIO;
+	}
+
+	/* Do the task and wait for it to finish */
+	cookie = dmaengine_submit(tx);
+	ret = dma_submit_error(cookie);
+	if (ret)
+		return -EIO;
+
+	dma_async_issue_pending(nfc->dma_chan);
+	ret = marvell_nfc_wait_cmdd(nfc->selected_chip);
+	dma_unmap_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
+	marvell_nfc_disable_dma(nfc);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout waiting for DMA (status: %d)\n",
+			dmaengine_tx_status(nfc->dma_chan, cookie, NULL));
+		dmaengine_terminate_all(nfc->dma_chan);
+		return -ETIMEDOUT;
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_xfer_data_in_pio(struct marvell_nfc *nfc, u8 *in,
+					unsigned int len)
+{
+	unsigned int last_len = len % FIFO_DEPTH;
+	unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
+	int i;
+
+	for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
+		ioread32_rep(nfc->regs + NDDB, in + i, FIFO_REP(FIFO_DEPTH));
+
+	if (last_len) {
+		ioread32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
+		memcpy(in + last_full_offset, nfc->buf, last_len);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_xfer_data_out_pio(struct marvell_nfc *nfc, const u8 *out,
+					 unsigned int len)
+{
+	unsigned int last_len = len % FIFO_DEPTH;
+	unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
+	int i;
+
+	for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
+		iowrite32_rep(nfc->regs + NDDB, out + i, FIFO_REP(FIFO_DEPTH));
+
+	if (last_len) {
+		memcpy(nfc->buf, out + last_full_offset, last_len);
+		iowrite32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_hw_ecc_correct(struct nand_chip *chip,
+				       u8 *data, int data_len,
+				       u8 *oob, int oob_len,
+				       unsigned int *max_bitflips)
+{
+	struct mtd_info *mtd = nand_to_mtd(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int bf = 0;
+	u32 ndsr;
+
+	ndsr = readl_relaxed(nfc->regs + NDSR);
+
+	/* Check uncorrectable error flag */
+	if (ndsr & NDSR_UNCERR) {
+		writel_relaxed(ndsr, nfc->regs + NDSR);
+
+		/*
+		 * Blank pages (all 0xFF) with no ECC are recognized as bad
+		 * because hardware ECC engine expects non-empty ECC values
+		 * in that case, so whenever an uncorrectable error occurs,
+		 * check if the page is actually blank or not.
+		 *
+		 * It is important to check the emptyness only on oob_len,
+		 * which only covers the spare bytes because after a read with
+		 * ECC enabled, the ECC bytes in the buffer have been set by the
+		 * ECC engine, so they are not 0xFF.
+		 */
+		if (!data)
+			data_len = 0;
+		if (!oob)
+			oob_len = 0;
+		bf = nand_check_erased_ecc_chunk(data, data_len, NULL, 0,
+						 oob, oob_len,
+						 chip->ecc.strength);
+		if (bf < 0) {
+			mtd->ecc_stats.failed++;
+			return;
+		}
+	}
+
+	/* Check correctable error flag */
+	if (ndsr & NDSR_CORERR) {
+		writel_relaxed(ndsr, nfc->regs + NDSR);
+
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			bf = NDSR_ERRCNT(ndsr);
+		else
+			bf = 1;
+	}
+
+	/*
+	 * Derive max_bitflips either from the number of bitflips detected by
+	 * the hardware ECC engine or by nand_check_erased_ecc_chunk().
+	 */
+	mtd->ecc_stats.corrected += bf;
+	*max_bitflips = max_t(unsigned int, *max_bitflips, bf);
+}
+
+/* Hamming read helpers */
+static int marvell_nfc_hw_ecc_hmg_do_read_page(struct nand_chip *chip, u8 *buf,
+					       bool oob_required, bool raw,
+					       int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_DBC |
+			   NDCB0_CMD1(NAND_CMD_READ0) |
+			   NDCB0_CMD2(NAND_CMD_READSTART),
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+	unsigned int oob_bytes = 0;
+	int ret;
+
+	/* NFCv2 needs more information about the operation being executed */
+	if (nfc->caps->is_nfcv2)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required) {
+		marvell_nfc_enable_spare(chip);
+		oob_bytes = lt->spare_bytes;
+		if (raw)
+			oob_bytes += lt->ecc_bytes;
+	}
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while draining FIFO (data/oob)");
+	if (ret)
+		return ret;
+
+	/* Read the page then the OOB area */
+	if (nfc->use_dma) {
+		marvell_nfc_xfer_data_dma(nfc, DMA_FROM_DEVICE,
+					  lt->data_bytes + oob_bytes);
+		memcpy(buf, nfc->dma_buf, lt->data_bytes);
+		memcpy(chip->oob_poi + (raw ? 0 : lt->ecc_bytes),
+		       nfc->dma_buf + lt->data_bytes, oob_bytes);
+	} else {
+		marvell_nfc_xfer_data_in_pio(nfc, buf, lt->data_bytes);
+		marvell_nfc_xfer_data_in_pio(nfc, chip->oob_poi, oob_bytes);
+	}
+
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required)
+		marvell_nfc_disable_spare(chip);
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_hmg_read_page_raw(struct mtd_info *mtd,
+						struct nand_chip *chip, u8 *buf,
+						int oob_required, int page)
+{
+	return marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, oob_required,
+						   true, page);
+}
+
+static int marvell_nfc_hw_ecc_hmg_read_page(struct mtd_info *mtd,
+					    struct nand_chip *chip,
+					    u8 *buf, int oob_required,
+					    int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int max_bf = 0;
+
+	/*
+	 * Reading/Writing a given page must always be performed with the same
+	 * configuration regarding the state of the SPARE_EN bit or ECC bytes
+	 * will not be present at the same location (writing only data, without
+	 * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
+	 * while writing with the SPARE_EN bit (hence, also writing free OOB
+	 * bytes) will put first the spare bytes then, at the end of the OOB
+	 * area, the ECC bytes. Choices has been made to always read/write OOB
+	 * area (padding with 0xFF is handled by the core for writes).
+	 */
+
+	marvell_nfc_enable_hw_ecc(chip);
+	marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, true, false, page);
+	marvell_nfc_hw_ecc_correct(chip, buf, lt->data_bytes, NULL, 0, &max_bf);
+	marvell_nfc_disable_hw_ecc(chip);
+
+	/*
+	 * Re-read the OOB area in raw mode to get the ECC bytes if the OOB area
+	 * is needed.
+	 */
+	if (oob_required)
+		chip->ecc.read_oob_raw(mtd, chip, page);
+
+	return max_bf;
+}
+
+/*
+ * Spare area in Hamming layouts is not protected by the ECC engine (even if
+ * it appears before the ECC bytes when reading), the ->read_oob_raw() function
+ * also stands for ->read_oob().
+ */
+static int marvell_nfc_hw_ecc_hmg_read_oob_raw(struct mtd_info *mtd,
+					       struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return marvell_nfc_hw_ecc_hmg_do_read_page(chip, chip->data_buf, true,
+						   true, page);
+}
+
+/* Hamming write helpers */
+static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
+						const u8 *buf,
+						bool oob_required, bool raw,
+						int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_CMD1(NAND_CMD_SEQIN) |
+			   NDCB0_CMD2(NAND_CMD_PAGEPROG) |
+			   NDCB0_DBC,
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+	int oob_bytes = 0;
+	int ret;
+
+	/* NFCv2 needs more information about the operation being executed */
+	if (nfc->caps->is_nfcv2)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required) {
+		marvell_nfc_enable_spare(chip);
+		oob_bytes = lt->spare_bytes;
+		if (raw)
+			oob_bytes += lt->ecc_bytes;
+	}
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
+				  "WRDREQ while loading FIFO (data)");
+	if (ret)
+		return ret;
+
+	/* Write the page then the OOB area */
+	if (nfc->use_dma) {
+		memcpy(nfc->dma_buf, buf, lt->data_bytes);
+		if (oob_required)
+			memcpy(nfc->dma_buf + lt->data_bytes, chip->oob_poi,
+			       oob_bytes);
+		marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
+					  lt->ecc_bytes + lt->spare_bytes);
+	} else {
+		marvell_nfc_xfer_data_out_pio(nfc, buf, lt->data_bytes);
+		if (oob_required)
+			marvell_nfc_xfer_data_out_pio(nfc, chip->oob_poi,
+						      oob_bytes);
+	}
+
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	ret = marvell_nfc_wait_op(chip,
+				  chip->data_interface.timings.sdr.tPROG_max);
+	if (ret)
+		return ret;
+
+	if (oob_required)
+		marvell_nfc_disable_spare(chip);
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_hmg_write_page_raw(struct mtd_info *mtd,
+						 struct nand_chip *chip,
+						 const u8 *buf,
+						 int oob_required, int page)
+{
+	return marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, oob_required,
+						    true, page);
+}
+
+static int marvell_nfc_hw_ecc_hmg_write_page(struct mtd_info *mtd,
+					     struct nand_chip *chip,
+					     const u8 *buf,
+					     int oob_required, int page)
+{
+	int ret;
+
+	/*
+	 * Reading/Writing a given page must always be performed with the same
+	 * configuration regarding the state of the SPARE_EN bit or ECC bytes
+	 * will not be present at the same location (writing only data, without
+	 * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
+	 * while writing with the SPARE_EN bit (hence, also writing free OOB
+	 * bytes) will put first the spare bytes then, at the end of the OOB
+	 * area, the ECC bytes. Choices has been made to always read/write OOB
+	 * area (padding with 0xFF is handled by the core for writes).
+	 */
+
+	marvell_nfc_enable_hw_ecc(chip);
+	ret = marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, true, false,
+						   page);
+	marvell_nfc_disable_hw_ecc(chip);
+
+	return ret;
+}
+
+/*
+ * Spare area in Hamming layouts is not protected by the ECC engine (even if
+ * it appears before the ECC bytes when reading), the ->write_oob_raw() function
+ * also stands for ->write_oob().
+ */
+static int marvell_nfc_hw_ecc_hmg_write_oob_raw(struct mtd_info *mtd,
+						struct nand_chip *chip,
+						int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return marvell_nfc_hw_ecc_hmg_do_write_page(chip, chip->data_buf, true,
+						    true, page);
+}
+
+/* BCH read helpers */
+static int marvell_nfc_hw_ecc_bch_read_page_raw(struct mtd_info *mtd,
+						struct nand_chip *chip, u8 *buf,
+						int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	u8 *oob = chip->oob_poi;
+	int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
+	int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int ecc_len = lt->ecc_bytes;
+	int chunk;
+
+	if (oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	nand_read_page_op(chip, page, 0, NULL, 0);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		int offset_in_page = chunk * chunk_size;
+
+		/* Update last chunk length */
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+			ecc_len = lt->last_ecc_bytes;
+		}
+
+		nand_change_read_column_op(chip, offset_in_page, buf,
+					   lt->data_bytes, false);
+		buf += lt->data_bytes;
+
+		if (!oob_required)
+			continue;
+
+		offset_in_page += data_len;
+		nand_change_read_column_op(chip, offset_in_page,
+					   oob + (lt->spare_bytes * chunk),
+					   spare_len, false);
+
+		offset_in_page += spare_len;
+		nand_change_read_column_op(chip, offset_in_page,
+					   oob + ecc_offset +
+					   (ALIGN(lt->ecc_bytes, 32) * chunk),
+					   ecc_len, false);
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
+					      u8 *data, unsigned int data_len,
+					      u8 *spare, unsigned int spare_len,
+					      int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int i, ret;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_LEN_OVRD,
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+
+	/*
+	 * Reading spare area is mandatory when using HW ECC or read operation
+	 * will trigger uncorrectable ECC errors, but do not read ECC here.
+	 */
+	nfc_op.ndcb[3] = data_len + spare_len;
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return;
+
+	if (chunk == 0)
+		nfc_op.ndcb[0] |= NDCB0_DBC |
+				  NDCB0_CMD1(NAND_CMD_READ0) |
+				  NDCB0_CMD2(NAND_CMD_READSTART);
+
+	/*
+	 * Trigger the naked read operation only on the last chunk.
+	 * Otherwise, use monolithic read.
+	 */
+	if (chunk < nchunks - 1)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+	else
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+
+	/*
+	 * According to the datasheet, when reading from NDDB
+	 * with BCH enabled, after each 32 bytes reads, we
+	 * have to make sure that the NDSR.RDDREQ bit is set.
+	 *
+	 * Drain the FIFO, 8 32-bit reads at a time, and skip
+	 * the polling on the last read.
+	 *
+	 * Length is a multiple of 32 bytes, hence it is a multiple of 8 too.
+	 *
+	 */
+
+	for (i = 0; i < data_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
+		marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				    "RDDREQ while draining FIFO (data)");
+		marvell_nfc_xfer_data_in_pio(nfc, data,
+					     FIFO_DEPTH * BCH_SEQ_READS);
+		data += FIFO_DEPTH * BCH_SEQ_READS;
+	}
+
+	for (i = 0; i < spare_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
+		marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				    "RDDREQ while draining FIFO (OOB)");
+		marvell_nfc_xfer_data_in_pio(nfc, spare,
+					     FIFO_DEPTH * BCH_SEQ_READS);
+		spare += FIFO_DEPTH * BCH_SEQ_READS;
+	}
+}
+
+static int marvell_nfc_hw_ecc_bch_read_page(struct mtd_info *mtd,
+					    struct nand_chip *chip,
+					    u8 *buf, int oob_required,
+					    int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	u8 *data = buf;
+	u8 *spare = chip->oob_poi;
+	int max_bitflips = 0;
+	int chunk, ecc_offset_in_page, ecc_offset_in_oob_buf, ecc_len;
+
+	/*
+	 * With BCH, OOB is not fully used (and thus not read entirely), not
+	 * expected bytes could show up at the end of the OOB buffer if not
+	 * explicitly erased.
+	 */
+	if (oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	marvell_nfc_enable_hw_ecc(chip);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		/* Update length for the last chunk */
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+		}
+
+		/* Read the chunk and detect number of bitflips */
+		marvell_nfc_hw_ecc_bch_read_chunk(chip, chunk, data, data_len,
+						  spare, spare_len, page);
+		marvell_nfc_hw_ecc_correct(chip, data, data_len,
+					   spare, spare_len, &max_bitflips);
+
+		data += data_len;
+		spare += spare_len;
+	}
+
+	marvell_nfc_disable_hw_ecc(chip);
+
+	if (!oob_required)
+		return max_bitflips;
+
+	/*
+	 * Re-read ECC bytes without ECC enabled, else it is garbage and it
+	 * fails the ->correct() call.
+	 */
+	ecc_len = lt->ecc_bytes;
+	ecc_offset_in_oob_buf =
+		(lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	ecc_offset_in_page = lt->data_bytes + lt->spare_bytes;
+
+	for (chunk = 0; chunk < nchunks;) {
+		/* Do the actual raw read of the ECC bytes */
+		nand_change_read_column_op(chip, ecc_offset_in_page,
+					   chip->oob_poi + ecc_offset_in_oob_buf,
+					   ecc_len, false);
+
+		chunk++;
+
+		/* When using a "last chunk", the ECC size might vary */
+		if (chunk >= lt->full_chunk_cnt)
+			ecc_len = lt->last_ecc_bytes;
+
+		/* Increment the offsets where ECC will be read and written */
+		ecc_offset_in_oob_buf += ALIGN(lt->ecc_bytes, 32);
+		ecc_offset_in_page += lt->ecc_bytes;
+		if (chunk < lt->full_chunk_cnt)
+			ecc_offset_in_page += lt->data_bytes + lt->spare_bytes;
+		else
+			ecc_offset_in_page += lt->last_data_bytes +
+				lt->last_spare_bytes;
+	}
+
+	return max_bitflips;
+}
+
+static int marvell_nfc_hw_ecc_bch_read_oob_raw(struct mtd_info *mtd,
+					       struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return chip->ecc.read_page_raw(mtd, chip, chip->data_buf, true, page);
+}
+
+static int marvell_nfc_hw_ecc_bch_read_oob(struct mtd_info *mtd,
+					   struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return chip->ecc.read_page(mtd, chip, chip->data_buf, true, page);
+}
+
+/* BCH write helpers */
+static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
+						 struct nand_chip *chip,
+						 const u8 *buf,
+						 int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int ecc_len = lt->ecc_bytes;
+	int oob_len = spare_len + ecc_len;
+	int spare_offset = 0;
+	int ecc_offset =
+		(lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	int chunk;
+
+	nand_prog_page_begin_op(chip, page, 0, NULL, 0);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+			ecc_len = lt->last_ecc_bytes;
+			oob_len = spare_len + ecc_len;
+		}
+
+		/* Point to the column of the next chunk */
+		nand_change_write_column_op(chip, chunk * full_chunk_size,
+					    NULL, 0, false);
+
+		/* Write the data */
+		nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
+				   data_len, false);
+
+		if (!oob_required)
+			continue;
+
+		/* Write the spare bytes */
+		if (spare_len)
+			nand_write_data_op(chip, chip->oob_poi + spare_offset,
+					   spare_len, false);
+
+		/* Write the ECC bytes */
+		if (ecc_len)
+			nand_write_data_op(chip, chip->oob_poi + ecc_offset,
+					   ecc_len, false);
+
+		spare_offset += spare_len;
+		ecc_offset += ALIGN(ecc_len, 32);
+	}
+
+	return nand_prog_page_end_op(chip);
+}
+
+static int
+marvell_nfc_hw_ecc_bch_write_chunk(struct nand_chip *chip, int chunk,
+				   const u8 *data, unsigned int data_len,
+				   const u8 *spare, unsigned int spare_len,
+				   int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int ret;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) | NDCB0_LEN_OVRD,
+		.ndcb[3] = data_len + spare_len,
+	};
+
+	/*
+	 * First operation dispatches the CMD_SEQIN command, issue the address
+	 * cycles and asks for the first chunk of data.
+	 * All operations in the middle (if any) will issue a naked write and
+	 * also ask for data.
+	 * Last operation dispatches the PAGEPROG command and also asks for the
+	 * last chunk of data.
+	 */
+	if (chunk == 0) {
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_WRITE_DISPATCH) |
+				  NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+				  NDCB0_CMD1(NAND_CMD_SEQIN);
+		nfc_op.ndcb[1] |= NDCB1_ADDRS(page);
+		nfc_op.ndcb[2] |= NDCB2_ADDR5(page);
+	} else if (chunk < nchunks - 1) {
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_NAKED_RW);
+	} else {
+		nfc_op.ndcb[0] |= NDCB0_CMD2(NAND_CMD_PAGEPROG) | NDCB0_DBC |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+	}
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
+				  "WRDREQ while loading FIFO (data)");
+	if (ret)
+		return ret;
+
+	/* Transfer the contents */
+	iowrite32_rep(nfc->regs + NDDB, data, FIFO_REP(data_len));
+	iowrite32_rep(nfc->regs + NDDB, spare, FIFO_REP(spare_len));
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_bch_write_page(struct mtd_info *mtd,
+					     struct nand_chip *chip,
+					     const u8 *buf,
+					     int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	const u8 *data = buf;
+	const u8 *spare = chip->oob_poi;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int chunk, ret;
+
+	/* Spare data will be written anyway, so clear it to avoid garbage */
+	if (!oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	marvell_nfc_enable_hw_ecc(chip);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+		}
+
+		marvell_nfc_hw_ecc_bch_write_chunk(chip, chunk, data, data_len,
+						   spare, spare_len, page);
+		data += data_len;
+		spare += spare_len;
+
+		/*
+		 * Waiting only for CMDD or PAGED is not enough, ECC are
+		 * partially written. No flag is set once the operation is
+		 * really finished but the ND_RUN bit is cleared, so wait for it
+		 * before stepping into the next command.
+		 */
+		marvell_nfc_wait_ndrun(chip);
+	}
+
+	ret = marvell_nfc_wait_op(chip,
+				  chip->data_interface.timings.sdr.tPROG_max);
+
+	marvell_nfc_disable_hw_ecc(chip);
+
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_bch_write_oob_raw(struct mtd_info *mtd,
+						struct nand_chip *chip,
+						int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return chip->ecc.write_page_raw(mtd, chip, chip->data_buf, true, page);
+}
+
+static int marvell_nfc_hw_ecc_bch_write_oob(struct mtd_info *mtd,
+					    struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return chip->ecc.write_page(mtd, chip, chip->data_buf, true, page);
+}
+
+/* NAND framework ->exec_op() hooks and related helpers */
+static void marvell_nfc_parse_instructions(struct nand_chip *chip,
+					   const struct nand_subop *subop,
+					   struct marvell_nfc_op *nfc_op)
+{
+	const struct nand_op_instr *instr = NULL;
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	bool first_cmd = true;
+	unsigned int op_id;
+	int i;
+
+	/* Reset the input structure as most of its fields will be OR'ed */
+	memset(nfc_op, 0, sizeof(struct marvell_nfc_op));
+
+	for (op_id = 0; op_id < subop->ninstrs; op_id++) {
+		unsigned int offset, naddrs;
+		const u8 *addrs;
+		int len = nand_subop_get_data_len(subop, op_id);
+
+		instr = &subop->instrs[op_id];
+
+		switch (instr->type) {
+		case NAND_OP_CMD_INSTR:
+			if (first_cmd)
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD1(instr->ctx.cmd.opcode);
+			else
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD2(instr->ctx.cmd.opcode) |
+					NDCB0_DBC;
+
+			nfc_op->cle_ale_delay_ns = instr->delay_ns;
+			first_cmd = false;
+			break;
+
+		case NAND_OP_ADDR_INSTR:
+			offset = nand_subop_get_addr_start_off(subop, op_id);
+			naddrs = nand_subop_get_num_addr_cyc(subop, op_id);
+			addrs = &instr->ctx.addr.addrs[offset];
+
+			nfc_op->ndcb[0] |= NDCB0_ADDR_CYC(naddrs);
+
+			for (i = 0; i < min_t(unsigned int, 4, naddrs); i++)
+				nfc_op->ndcb[1] |= addrs[i] << (8 * i);
+
+			if (naddrs >= 5)
+				nfc_op->ndcb[2] |= NDCB2_ADDR5(addrs[5]);
+			if (naddrs >= 6)
+				nfc_op->ndcb[3] |= NDCB3_ADDR6(addrs[6]);
+			if (naddrs == 7)
+				nfc_op->ndcb[3] |= NDCB3_ADDR7(addrs[7]);
+
+			nfc_op->cle_ale_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_DATA_IN_INSTR:
+			nfc_op->data_instr = instr;
+			nfc_op->data_instr_idx = op_id;
+			nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ);
+			if (nfc->caps->is_nfcv2) {
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
+					NDCB0_LEN_OVRD;
+				nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
+			}
+			nfc_op->data_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_DATA_OUT_INSTR:
+			nfc_op->data_instr = instr;
+			nfc_op->data_instr_idx = op_id;
+			nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE);
+			if (nfc->caps->is_nfcv2) {
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
+					NDCB0_LEN_OVRD;
+				nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
+			}
+			nfc_op->data_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_WAITRDY_INSTR:
+			nfc_op->rdy_timeout_ms = instr->ctx.waitrdy.timeout_ms;
+			nfc_op->rdy_delay_ns = instr->delay_ns;
+			break;
+		}
+	}
+}
+
+static int marvell_nfc_xfer_data_pio(struct nand_chip *chip,
+				     const struct nand_subop *subop,
+				     struct marvell_nfc_op *nfc_op)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct nand_op_instr *instr = nfc_op->data_instr;
+	unsigned int op_id = nfc_op->data_instr_idx;
+	unsigned int len = nand_subop_get_data_len(subop, op_id);
+	unsigned int offset = nand_subop_get_data_start_off(subop, op_id);
+	bool reading = (instr->type == NAND_OP_DATA_IN_INSTR);
+	int ret;
+
+	if (instr->ctx.data.force_8bit)
+		marvell_nfc_force_byte_access(chip, true);
+
+	if (reading) {
+		u8 *in = instr->ctx.data.buf.in + offset;
+
+		ret = marvell_nfc_xfer_data_in_pio(nfc, in, len);
+	} else {
+		const u8 *out = instr->ctx.data.buf.out + offset;
+
+		ret = marvell_nfc_xfer_data_out_pio(nfc, out, len);
+	}
+
+	if (instr->ctx.data.force_8bit)
+		marvell_nfc_force_byte_access(chip, false);
+
+	return ret;
+}
+
+static int marvell_nfc_monolithic_access_exec(struct nand_chip *chip,
+					      const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	bool reading;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	reading = (nfc_op.data_instr->type == NAND_OP_DATA_IN_INSTR);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
+				  "RDDREQ/WRDREQ while draining raw data");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (reading) {
+		if (nfc_op.rdy_timeout_ms) {
+			ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+			if (ret)
+				return ret;
+		}
+
+		cond_delay(nfc_op.rdy_delay_ns);
+	}
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	if (!reading) {
+		if (nfc_op.rdy_timeout_ms) {
+			ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+			if (ret)
+				return ret;
+		}
+
+		cond_delay(nfc_op.rdy_delay_ns);
+	}
+
+	/*
+	 * NDCR ND_RUN bit should be cleared automatically at the end of each
+	 * operation but experience shows that the behavior is buggy when it
+	 * comes to writes (with LEN_OVRD). Clear it by hand in this case.
+	 */
+	if (!reading) {
+		struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+		writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_naked_access_exec(struct nand_chip *chip,
+					 const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+
+	/*
+	 * Naked access are different in that they need to be flagged as naked
+	 * by the controller. Reset the controller registers fields that inform
+	 * on the type and refill them according to the ongoing operation.
+	 */
+	nfc_op.ndcb[0] &= ~(NDCB0_CMD_TYPE(TYPE_MASK) |
+			    NDCB0_CMD_XTYPE(XTYPE_MASK));
+	switch (subop->instrs[0].type) {
+	case NAND_OP_CMD_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_CMD);
+		break;
+	case NAND_OP_ADDR_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_ADDR);
+		break;
+	case NAND_OP_DATA_IN_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ) |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+		break;
+	case NAND_OP_DATA_OUT_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE) |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+		break;
+	default:
+		/* This should never happen */
+		break;
+	}
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+
+	if (!nfc_op.data_instr) {
+		ret = marvell_nfc_wait_cmdd(chip);
+		cond_delay(nfc_op.cle_ale_delay_ns);
+		return ret;
+	}
+
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
+				  "RDDREQ/WRDREQ while draining raw data");
+	if (ret)
+		return ret;
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	/*
+	 * NDCR ND_RUN bit should be cleared automatically at the end of each
+	 * operation but experience shows that the behavior is buggy when it
+	 * comes to writes (with LEN_OVRD). Clear it by hand in this case.
+	 */
+	if (subop->instrs[0].type == NAND_OP_DATA_OUT_INSTR) {
+		struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+		writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_naked_waitrdy_exec(struct nand_chip *chip,
+					  const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return ret;
+}
+
+static int marvell_nfc_read_id_type_exec(struct nand_chip *chip,
+					 const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ_ID);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while reading ID");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (nfc_op.rdy_timeout_ms) {
+		ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+		if (ret)
+			return ret;
+	}
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_read_status_exec(struct nand_chip *chip,
+					const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_STATUS);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while reading status");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (nfc_op.rdy_timeout_ms) {
+		ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+		if (ret)
+			return ret;
+	}
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_reset_cmd_type_exec(struct nand_chip *chip,
+					   const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_RESET);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_erase_cmd_type_exec(struct nand_chip *chip,
+					   const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_ERASE);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return 0;
+}
+
+static const struct nand_op_parser marvell_nfcv2_op_parser = NAND_OP_PARSER(
+	/* Monolithic reads/writes */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_monolithic_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(true, MAX_ADDRESS_CYC_NFCV2),
+		NAND_OP_PARSER_PAT_CMD_ELEM(true),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(true),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_monolithic_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2),
+		NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE),
+		NAND_OP_PARSER_PAT_CMD_ELEM(true),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(true)),
+	/* Naked commands */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_waitrdy_exec,
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	);
+
+static const struct nand_op_parser marvell_nfcv1_op_parser = NAND_OP_PARSER(
+	/* Naked commands not supported, use a function for each pattern */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_read_id_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 8)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_erase_cmd_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_read_status_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 1)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_reset_cmd_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_waitrdy_exec,
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	);
+
+static int marvell_nfc_exec_op(struct nand_chip *chip,
+			       const struct nand_operation *op,
+			       bool check_only)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+	if (nfc->caps->is_nfcv2)
+		return nand_op_parser_exec_op(chip, &marvell_nfcv2_op_parser,
+					      op, check_only);
+	else
+		return nand_op_parser_exec_op(chip, &marvell_nfcv1_op_parser,
+					      op, check_only);
+}
+
+/*
+ * HW ECC layouts, identical to old pxa3xx_nand driver,
+ * to be fully backward compatible.
+ */
+static int marvell_nand_ooblayout_ecc(struct mtd_info *mtd, int section,
+				      struct mtd_oob_region *oobregion)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt;
+
+	if (section >= nchunks)
+		return -ERANGE;
+
+	oobregion->offset = ((lt->spare_bytes + lt->ecc_bytes) * section) +
+		lt->spare_bytes;
+	oobregion->length = lt->ecc_bytes;
+
+	return 0;
+}
+
+static int marvell_nand_ooblayout_free(struct mtd_info *mtd, int section,
+				       struct mtd_oob_region *oobregion)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt;
+
+	if (section >= nchunks)
+		return -ERANGE;
+
+	if (!lt->spare_bytes)
+		return 0;
+
+	oobregion->offset = section * (lt->spare_bytes + lt->ecc_bytes);
+	oobregion->length = lt->spare_bytes;
+	if (!section) {
+		/*
+		 * Bootrom looks in bytes 0 & 5 for bad blocks for the
+		 * 4KB page / 4bit BCH combination.
+		 */
+		if (mtd->writesize == 4096 && lt->data_bytes == 2048) {
+			oobregion->offset += 6;
+			oobregion->length -= 6;
+		} else {
+			oobregion->offset += 2;
+			oobregion->length -= 2;
+		}
+	}
+
+	return 0;
+}
+
+static const struct mtd_ooblayout_ops marvell_nand_ooblayout_ops = {
+	.ecc = marvell_nand_ooblayout_ecc,
+	.free = marvell_nand_ooblayout_free,
+};
+
+static int marvell_nand_hw_ecc_ctrl_init(struct mtd_info *mtd,
+					 struct nand_ecc_ctrl *ecc)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *l;
+	int i;
+
+	if (!nfc->caps->is_nfcv2 &&
+	    (mtd->writesize + mtd->oobsize > MAX_CHUNK_SIZE)) {
+		dev_err(nfc->dev,
+			"NFCv1: writesize (%d) cannot be bigger than a chunk (%d)\n",
+			mtd->writesize, MAX_CHUNK_SIZE - mtd->oobsize);
+		return -ENOTSUPP;
+	}
+
+	to_marvell_nand(chip)->layout = NULL;
+	for (i = 0; i < ARRAY_SIZE(marvell_nfc_layouts); i++) {
+		l = &marvell_nfc_layouts[i];
+		if (mtd->writesize == l->writesize &&
+		    ecc->size == l->chunk && ecc->strength == l->strength) {
+			to_marvell_nand(chip)->layout = l;
+			break;
+		}
+	}
+
+	if (!to_marvell_nand(chip)->layout ||
+	    (!nfc->caps->is_nfcv2 && ecc->strength > 1)) {
+		dev_err(nfc->dev,
+			"ECC strength %d at page size %d is not supported\n",
+			ecc->strength, mtd->writesize);
+		return -ENOTSUPP;
+	}
+
+	mtd_set_ooblayout(mtd, &marvell_nand_ooblayout_ops);
+	ecc->steps = l->full_chunk_cnt + l->last_chunk_cnt;
+	ecc->size = l->data_bytes;
+
+	if (ecc->strength == 1) {
+		chip->ecc.algo = NAND_ECC_HAMMING;
+		ecc->read_page_raw = marvell_nfc_hw_ecc_hmg_read_page_raw;
+		ecc->read_page = marvell_nfc_hw_ecc_hmg_read_page;
+		ecc->read_oob_raw = marvell_nfc_hw_ecc_hmg_read_oob_raw;
+		ecc->read_oob = ecc->read_oob_raw;
+		ecc->write_page_raw = marvell_nfc_hw_ecc_hmg_write_page_raw;
+		ecc->write_page = marvell_nfc_hw_ecc_hmg_write_page;
+		ecc->write_oob_raw = marvell_nfc_hw_ecc_hmg_write_oob_raw;
+		ecc->write_oob = ecc->write_oob_raw;
+	} else {
+		chip->ecc.algo = NAND_ECC_BCH;
+		ecc->strength = 16;
+		ecc->read_page_raw = marvell_nfc_hw_ecc_bch_read_page_raw;
+		ecc->read_page = marvell_nfc_hw_ecc_bch_read_page;
+		ecc->read_oob_raw = marvell_nfc_hw_ecc_bch_read_oob_raw;
+		ecc->read_oob = marvell_nfc_hw_ecc_bch_read_oob;
+		ecc->write_page_raw = marvell_nfc_hw_ecc_bch_write_page_raw;
+		ecc->write_page = marvell_nfc_hw_ecc_bch_write_page;
+		ecc->write_oob_raw = marvell_nfc_hw_ecc_bch_write_oob_raw;
+		ecc->write_oob = marvell_nfc_hw_ecc_bch_write_oob;
+	}
+
+	return 0;
+}
+
+static int marvell_nand_ecc_init(struct mtd_info *mtd,
+				 struct nand_ecc_ctrl *ecc)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int ret;
+
+	if ((ecc->mode != NAND_ECC_NONE) && (!ecc->size || !ecc->strength)) {
+		if (chip->ecc_step_ds && chip->ecc_strength_ds) {
+			ecc->size = chip->ecc_step_ds;
+			ecc->strength = chip->ecc_strength_ds;
+		} else {
+			dev_info(nfc->dev,
+				 "No minimum ECC strength, using 1b/512B\n");
+			ecc->size = 512;
+			ecc->strength = 1;
+		}
+	}
+
+	switch (ecc->mode) {
+	case NAND_ECC_HW:
+		ret = marvell_nand_hw_ecc_ctrl_init(mtd, ecc);
+		if (ret)
+			return ret;
+		break;
+	case NAND_ECC_NONE:
+		chip->ecc.algo = 0;
+	case NAND_ECC_SOFT:
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
+static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
+
+static struct nand_bbt_descr bbt_main_descr = {
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
+		   NAND_BBT_2BIT | NAND_BBT_VERSION,
+	.offs =	8,
+	.len = 6,
+	.veroffs = 14,
+	.maxblocks = 8,	/* Last 8 blocks in each chip */
+	.pattern = bbt_pattern
+};
+
+static struct nand_bbt_descr bbt_mirror_descr = {
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
+		   NAND_BBT_2BIT | NAND_BBT_VERSION,
+	.offs =	8,
+	.len = 6,
+	.veroffs = 14,
+	.maxblocks = 8,	/* Last 8 blocks in each chip */
+	.pattern = bbt_mirror_pattern
+};
+
+static int marvell_nfc_setup_data_interface(struct mtd_info *mtd, int chipnr,
+					    const struct nand_data_interface
+					    *conf)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	unsigned int period_ns = 1000000000 / clk_get_rate(nfc->ecc_clk) * 2;
+	const struct nand_sdr_timings *sdr;
+	struct marvell_nfc_timings nfc_tmg;
+	int read_delay;
+
+	sdr = nand_get_sdr_timings(conf);
+	if (IS_ERR(sdr))
+		return PTR_ERR(sdr);
+
+	/*
+	 * SDR timings are given in pico-seconds while NFC timings must be
+	 * expressed in NAND controller clock cycles, which is half of the
+	 * frequency of the accessible ECC clock retrieved by clk_get_rate().
+	 * This is not written anywhere in the datasheet but was observed
+	 * with an oscilloscope.
+	 *
+	 * NFC datasheet gives equations from which thoses calculations
+	 * are derived, they tend to be slightly more restrictives than the
+	 * given core timings and may improve the overall speed.
+	 */
+	nfc_tmg.tRP = TO_CYCLES(DIV_ROUND_UP(sdr->tRC_min, 2), period_ns) - 1;
+	nfc_tmg.tRH = nfc_tmg.tRP;
+	nfc_tmg.tWP = TO_CYCLES(DIV_ROUND_UP(sdr->tWC_min, 2), period_ns) - 1;
+	nfc_tmg.tWH = nfc_tmg.tWP;
+	nfc_tmg.tCS = TO_CYCLES(sdr->tCS_min, period_ns);
+	nfc_tmg.tCH = TO_CYCLES(sdr->tCH_min, period_ns) - 1;
+	nfc_tmg.tADL = TO_CYCLES(sdr->tADL_min, period_ns);
+	/*
+	 * Read delay is the time of propagation from SoC pins to NFC internal
+	 * logic. With non-EDO timings, this is MIN_RD_DEL_CNT clock cycles. In
+	 * EDO mode, an additional delay of tRH must be taken into account so
+	 * the data is sampled on the falling edge instead of the rising edge.
+	 */
+	read_delay = sdr->tRC_min >= 30000 ?
+		MIN_RD_DEL_CNT : MIN_RD_DEL_CNT + nfc_tmg.tRH;
+
+	nfc_tmg.tAR = TO_CYCLES(sdr->tAR_min, period_ns);
+	/*
+	 * tWHR and tRHW are supposed to be read to write delays (and vice
+	 * versa) but in some cases, ie. when doing a change column, they must
+	 * be greater than that to be sure tCCS delay is respected.
+	 */
+	nfc_tmg.tWHR = TO_CYCLES(max_t(int, sdr->tWHR_min, sdr->tCCS_min),
+				 period_ns) - 2,
+	nfc_tmg.tRHW = TO_CYCLES(max_t(int, sdr->tRHW_min, sdr->tCCS_min),
+				 period_ns);
+
+	/* Use WAIT_MODE (wait for RB line) instead of only relying on delays */
+	nfc_tmg.tR = TO_CYCLES(sdr->tWB_max, period_ns);
+
+	if (chipnr < 0)
+		return 0;
+
+	marvell_nand->ndtr0 =
+		NDTR0_TRP(nfc_tmg.tRP) |
+		NDTR0_TRH(nfc_tmg.tRH) |
+		NDTR0_ETRP(nfc_tmg.tRP) |
+		NDTR0_TWP(nfc_tmg.tWP) |
+		NDTR0_TWH(nfc_tmg.tWH) |
+		NDTR0_TCS(nfc_tmg.tCS) |
+		NDTR0_TCH(nfc_tmg.tCH) |
+		NDTR0_RD_CNT_DEL(read_delay) |
+		NDTR0_SELCNTR |
+		NDTR0_TADL(nfc_tmg.tADL);
+
+	marvell_nand->ndtr1 =
+		NDTR1_TAR(nfc_tmg.tAR) |
+		NDTR1_TWHR(nfc_tmg.tWHR) |
+		NDTR1_TRHW(nfc_tmg.tRHW) |
+		NDTR1_WAIT_MODE |
+		NDTR1_TR(nfc_tmg.tR);
+
+	writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
+	writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
+
+	return 0;
+}
+
+static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
+				  struct device_node *np)
+{
+	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(dev);
+	struct marvell_nand_chip *marvell_nand;
+	struct mtd_info *mtd;
+	struct nand_chip *chip;
+	int nsels, ret, i;
+	u32 cs, rb;
+
+	/*
+	 * The legacy "num-cs" property indicates the number of CS on the only
+	 * chip connected to the controller (legacy bindings does not support
+	 * more than one chip). CS are only incremented one by one while the RB
+	 * pin is always the #0.
+	 *
+	 * When not using legacy bindings, a couple of "reg" and "marvell,rb"
+	 * properties must be filled. For each chip, expressed as a subnode,
+	 * "reg" points to the CS lines and "marvell,rb" to the RB line.
+	 */
+	if (pdata) {
+		nsels = 1;
+	} else if (nfc->caps->legacy_of_bindings) {
+		if (!of_get_property(np, "num-cs", &nsels)) {
+			dev_err(dev, "missing num-cs property\n");
+			return -EINVAL;
+		}
+	} else {
+		if (!of_get_property(np, "reg", &nsels)) {
+			dev_err(dev, "missing reg property\n");
+			return -EINVAL;
+		}
+	}
+
+	if (!pdata)
+		nsels /= sizeof(u32);
+	if (!nsels) {
+		dev_err(dev, "invalid reg property size\n");
+		return -EINVAL;
+	}
+
+	/* Alloc the nand chip structure */
+	marvell_nand = devm_kzalloc(dev, sizeof(*marvell_nand) +
+				    (nsels *
+				     sizeof(struct marvell_nand_chip_sel)),
+				    GFP_KERNEL);
+	if (!marvell_nand) {
+		dev_err(dev, "could not allocate chip structure\n");
+		return -ENOMEM;
+	}
+
+	marvell_nand->nsels = nsels;
+	marvell_nand->selected_die = -1;
+
+	for (i = 0; i < nsels; i++) {
+		if (pdata || nfc->caps->legacy_of_bindings) {
+			/*
+			 * Legacy bindings use the CS lines in natural
+			 * order (0, 1, ...)
+			 */
+			cs = i;
+		} else {
+			/* Retrieve CS id */
+			ret = of_property_read_u32_index(np, "reg", i, &cs);
+			if (ret) {
+				dev_err(dev, "could not retrieve reg property: %d\n",
+					ret);
+				return ret;
+			}
+		}
+
+		if (cs >= nfc->caps->max_cs_nb) {
+			dev_err(dev, "invalid reg value: %u (max CS = %d)\n",
+				cs, nfc->caps->max_cs_nb);
+			return -EINVAL;
+		}
+
+		if (test_and_set_bit(cs, &nfc->assigned_cs)) {
+			dev_err(dev, "CS %d already assigned\n", cs);
+			return -EINVAL;
+		}
+
+		/*
+		 * The cs variable represents the chip select id, which must be
+		 * converted in bit fields for NDCB0 and NDCB2 to select the
+		 * right chip. Unfortunately, due to a lack of information on
+		 * the subject and incoherent documentation, the user should not
+		 * use CS1 and CS3 at all as asserting them is not supported in
+		 * a reliable way (due to multiplexing inside ADDR5 field).
+		 */
+		marvell_nand->sels[i].cs = cs;
+		switch (cs) {
+		case 0:
+		case 2:
+			marvell_nand->sels[i].ndcb0_csel = 0;
+			break;
+		case 1:
+		case 3:
+			marvell_nand->sels[i].ndcb0_csel = NDCB0_CSEL;
+			break;
+		default:
+			return -EINVAL;
+		}
+
+		/* Retrieve RB id */
+		if (pdata || nfc->caps->legacy_of_bindings) {
+			/* Legacy bindings always use RB #0 */
+			rb = 0;
+		} else {
+			ret = of_property_read_u32_index(np, "marvell,rb", i,
+							 &rb);
+			if (ret) {
+				dev_err(dev,
+					"could not retrieve RB property: %d\n",
+					ret);
+				return ret;
+			}
+		}
+
+		if (rb >= nfc->caps->max_rb_nb) {
+			dev_err(dev, "invalid reg value: %u (max RB = %d)\n",
+				rb, nfc->caps->max_rb_nb);
+			return -EINVAL;
+		}
+
+		marvell_nand->sels[i].rb = rb;
+	}
+
+	chip = &marvell_nand->chip;
+	chip->controller = &nfc->controller;
+	nand_set_flash_node(chip, np);
+
+	chip->exec_op = marvell_nfc_exec_op;
+	chip->select_chip = marvell_nfc_select_chip;
+	if (nfc->caps->is_nfcv2 &&
+	    !of_property_read_bool(np, "marvell,nand-keep-config"))
+		chip->setup_data_interface = marvell_nfc_setup_data_interface;
+
+	mtd = nand_to_mtd(chip);
+	mtd->dev.parent = dev;
+
+	/*
+	 * Default to HW ECC engine mode. If the nand-ecc-mode property is given
+	 * in the DT node, this entry will be overwritten in nand_scan_ident().
+	 */
+	chip->ecc.mode = NAND_ECC_HW;
+
+	ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
+	if (ret) {
+		dev_err(dev, "could not identify the nand chip\n");
+		return ret;
+	}
+
+	if (pdata && pdata->flash_bbt)
+		chip->bbt_options |= NAND_BBT_USE_FLASH;
+
+	if (chip->bbt_options & NAND_BBT_USE_FLASH) {
+		/*
+		 * We'll use a bad block table stored in-flash and don't
+		 * allow writing the bad block marker to the flash.
+		 */
+		chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
+		chip->bbt_td = &bbt_main_descr;
+		chip->bbt_md = &bbt_mirror_descr;
+	}
+
+	/*
+	 * With RA_START bit set in NDCR, columns takes two address cycles. This
+	 * means addressing a chip with more than 256 pages needs a fifth
+	 * address cycle. Addressing a chip using CS 2 or 3 should also needs
+	 * this additional cycle but due to insistance in the documentation and
+	 * lack of hardware to test this situation, this case has been dropped
+	 * and is not supported by this driver.
+	 */
+	marvell_nand->addr_cyc = 4;
+	if (chip->options & NAND_ROW_ADDR_3)
+		marvell_nand->addr_cyc = 5;
+
+	if (pdata) {
+		chip->ecc.size = pdata->ecc_step_size;
+		chip->ecc.strength = pdata->ecc_strength;
+	}
+
+	ret = marvell_nand_ecc_init(mtd, &chip->ecc);
+	if (ret) {
+		dev_err(dev, "ECC init failed: %d\n", ret);
+		return ret;
+	}
+
+	if (chip->ecc.mode == NAND_ECC_HW) {
+		/*
+		 * Subpage write not available with hardware ECC, prohibit also
+		 * subpage read as in userspace subpage acces would still be
+		 * allowed and subpage write, if used, would lead to numerous
+		 * uncorrectable ECC errors.
+		 */
+		chip->options |= NAND_NO_SUBPAGE_WRITE;
+	}
+
+	if (pdata || nfc->caps->legacy_of_bindings) {
+		/*
+		 * We keep the MTD name unchanged to avoid breaking platforms
+		 * where the MTD cmdline parser is used and the bootloader
+		 * has not been updated to use the new naming scheme.
+		 */
+		mtd->name = "pxa3xx_nand-0";
+	} else if (!mtd->name) {
+		/*
+		 * If the new bindings are used and the bootloader has not been
+		 * updated to pass a new mtdparts parameter on the cmdline, you
+		 * should define the following property in your NAND node, ie:
+		 *
+		 *	label = "main-storage";
+		 *
+		 * This way, mtd->name will be set by the core when
+		 * nand_set_flash_node() is called.
+		 */
+		mtd->name = devm_kasprintf(nfc->dev, GFP_KERNEL,
+					   "%s:nand.%d", dev_name(nfc->dev),
+					   marvell_nand->sels[0].cs);
+		if (!mtd->name) {
+			dev_err(nfc->dev, "Failed to allocate mtd->name\n");
+			return -ENOMEM;
+		}
+	}
+
+	ret = nand_scan_tail(mtd);
+	if (ret) {
+		dev_err(dev, "nand_scan_tail failed: %d\n", ret);
+		return ret;
+	}
+
+	if (pdata)
+		/* Legacy bindings support only one chip */
+		ret = mtd_device_register(mtd, pdata->parts[0],
+					  pdata->nr_parts[0]);
+	else
+		ret = mtd_device_register(mtd, NULL, 0);
+	if (ret) {
+		dev_err(dev, "failed to register mtd device: %d\n", ret);
+		nand_release(mtd);
+		return ret;
+	}
+
+	list_add_tail(&marvell_nand->node, &nfc->chips);
+
+	return 0;
+}
+
+static int marvell_nand_chips_init(struct device *dev, struct marvell_nfc *nfc)
+{
+	struct device_node *np = dev->of_node;
+	struct device_node *nand_np;
+	int max_cs = nfc->caps->max_cs_nb;
+	int nchips;
+	int ret;
+
+	if (!np)
+		nchips = 1;
+	else
+		nchips = of_get_child_count(np);
+
+	if (nchips > max_cs) {
+		dev_err(dev, "too many NAND chips: %d (max = %d CS)\n", nchips,
+			max_cs);
+		return -EINVAL;
+	}
+
+	/*
+	 * Legacy bindings do not use child nodes to exhibit NAND chip
+	 * properties and layout. Instead, NAND properties are mixed with the
+	 * controller's and a single subnode presents the memory layout.
+	 */
+	if (nfc->caps->legacy_of_bindings) {
+		ret = marvell_nand_chip_init(dev, nfc, np);
+		return ret;
+	}
+
+	for_each_child_of_node(np, nand_np) {
+		ret = marvell_nand_chip_init(dev, nfc, nand_np);
+		if (ret) {
+			of_node_put(nand_np);
+			return ret;
+		}
+	}
+
+	return 0;
+}
+
+static void marvell_nand_chips_cleanup(struct marvell_nfc *nfc)
+{
+	struct marvell_nand_chip *entry, *temp;
+
+	list_for_each_entry_safe(entry, temp, &nfc->chips, node) {
+		nand_release(nand_to_mtd(&entry->chip));
+		list_del(&entry->node);
+	}
+}
+
+static int marvell_nfc_init_dma(struct marvell_nfc *nfc)
+{
+	struct platform_device *pdev = container_of(nfc->dev,
+						    struct platform_device,
+						    dev);
+	struct dma_slave_config config = {};
+	struct resource *r;
+	dma_cap_mask_t mask;
+	struct pxad_param param;
+	int ret;
+
+	if (!IS_ENABLED(CONFIG_PXA_DMA)) {
+		dev_warn(nfc->dev,
+			 "DMA not enabled in configuration\n");
+		return -ENOTSUPP;
+	}
+
+	ret = dma_set_mask_and_coherent(nfc->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
+
+	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+	if (!r) {
+		dev_err(nfc->dev, "No resource defined for data DMA\n");
+		return -ENXIO;
+	}
+
+	param.drcmr = r->start;
+	param.prio = PXAD_PRIO_LOWEST;
+	dma_cap_zero(mask);
+	dma_cap_set(DMA_SLAVE, mask);
+	nfc->dma_chan =
+		dma_request_slave_channel_compat(mask, pxad_filter_fn,
+						 &param, nfc->dev,
+						 "data");
+	if (!nfc->dma_chan) {
+		dev_err(nfc->dev,
+			"Unable to request data DMA channel\n");
+		return -ENODEV;
+	}
+
+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!r)
+		return -ENXIO;
+
+	config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+	config.src_addr = r->start + NDDB;
+	config.dst_addr = r->start + NDDB;
+	config.src_maxburst = 32;
+	config.dst_maxburst = 32;
+	ret = dmaengine_slave_config(nfc->dma_chan, &config);
+	if (ret < 0) {
+		dev_err(nfc->dev, "Failed to configure DMA channel\n");
+		return ret;
+	}
+
+	/*
+	 * DMA must act on length multiple of 32 and this length may be
+	 * bigger than the destination buffer. Use this buffer instead
+	 * for DMA transfers and then copy the desired amount of data to
+	 * the provided buffer.
+	 */
+	nfc->dma_buf = kmalloc(MAX_CHUNK_SIZE, GFP_DMA);
+	if (!nfc->dma_buf)
+		return -ENOMEM;
+
+	nfc->use_dma = true;
+
+	return 0;
+}
+
+static int marvell_nfc_init(struct marvell_nfc *nfc)
+{
+	struct device_node *np = nfc->dev->of_node;
+
+	/*
+	 * Some SoCs like A7k/A8k need to enable manually the NAND
+	 * controller, gated clocks and reset bits to avoid being bootloader
+	 * dependent. This is done through the use of the System Functions
+	 * registers.
+	 */
+	if (nfc->caps->need_system_controller) {
+		struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
+			np, "marvell,system-controller");
+		u32 reg;
+
+		if (IS_ERR(sysctrl_base))
+			return PTR_ERR(sysctrl_base);
+
+		reg = GENCONF_SOC_DEVICE_MUX_NFC_EN |
+			GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST |
+			GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST |
+			GENCONF_SOC_DEVICE_MUX_NFC_INT_EN;
+		regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
+
+		regmap_read(sysctrl_base, GENCONF_CLK_GATING_CTRL, &reg);
+		reg |= GENCONF_CLK_GATING_CTRL_ND_GATE;
+		regmap_write(sysctrl_base, GENCONF_CLK_GATING_CTRL, reg);
+
+		regmap_read(sysctrl_base, GENCONF_ND_CLK_CTRL, &reg);
+		reg |= GENCONF_ND_CLK_CTRL_EN;
+		regmap_write(sysctrl_base, GENCONF_ND_CLK_CTRL, reg);
+	}
+
+	/* Configure the DMA if appropriate */
+	if (!nfc->caps->is_nfcv2)
+		marvell_nfc_init_dma(nfc);
+
+	/*
+	 * ECC operations and interruptions are only enabled when specifically
+	 * needed. ECC shall not be activated in the early stages (fails probe).
+	 * Arbiter flag, even if marked as "reserved", must be set (empirical).
+	 */
+	writel_relaxed(NDCR_RA_START | NDCR_ALL_INT | NDCR_ND_ARB_EN |
+		       (nfc->caps->is_nfcv2 ?
+			0 : NDCR_RD_ID_CNT(NFCV1_READID_LEN)),
+		       nfc->regs + NDCR);
+	writel_relaxed(0xFFFFFFFF, nfc->regs + NDSR);
+	writel_relaxed(0, nfc->regs + NDECCCTRL);
+
+	return 0;
+}
+
+static int marvell_nfc_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct resource *r;
+	struct marvell_nfc *nfc;
+	int ret;
+	int irq;
+
+	nfc = devm_kzalloc(&pdev->dev, sizeof(struct marvell_nfc),
+			   GFP_KERNEL);
+	if (!nfc)
+		return -ENOMEM;
+
+	nfc->dev = dev;
+	nand_hw_control_init(&nfc->controller);
+	INIT_LIST_HEAD(&nfc->chips);
+
+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	nfc->regs = devm_ioremap_resource(dev, r);
+	if (IS_ERR(nfc->regs))
+		return PTR_ERR(nfc->regs);
+
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
+		dev_err(dev, "failed to retrieve irq\n");
+		return irq;
+	}
+
+	nfc->ecc_clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(nfc->ecc_clk))
+		return PTR_ERR(nfc->ecc_clk);
+
+	ret = clk_prepare_enable(nfc->ecc_clk);
+	if (ret)
+		return ret;
+
+	marvell_nfc_disable_int(nfc, NDCR_ALL_INT);
+	marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
+	ret = devm_request_irq(dev, irq, marvell_nfc_isr,
+			       0, "marvell-nfc", nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	/* Get NAND controller capabilities */
+	if (pdev->id_entry)
+		nfc->caps = (void *)pdev->id_entry->driver_data;
+	else
+		nfc->caps = of_device_get_match_data(&pdev->dev);
+
+	if (!nfc->caps) {
+		dev_err(dev, "Could not retrieve NFC caps\n");
+		ret = -EINVAL;
+		goto unprepare_clk;
+	}
+
+	/* Init the controller and then probe the chips */
+	ret = marvell_nfc_init(nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	platform_set_drvdata(pdev, nfc);
+
+	ret = marvell_nand_chips_init(dev, nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	return 0;
+
+unprepare_clk:
+	clk_disable_unprepare(nfc->ecc_clk);
+
+	return ret;
+}
+
+static int marvell_nfc_remove(struct platform_device *pdev)
+{
+	struct marvell_nfc *nfc = platform_get_drvdata(pdev);
+
+	marvell_nand_chips_cleanup(nfc);
+
+	if (nfc->use_dma) {
+		dmaengine_terminate_all(nfc->dma_chan);
+		dma_release_channel(nfc->dma_chan);
+	}
+
+	clk_disable_unprepare(nfc->ecc_clk);
+
+	return 0;
+}
+
+static const struct marvell_nfc_caps marvell_armada_8k_nfc_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.need_system_controller = true,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada370_nfc_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_pxa3xx_nfc_caps = {
+	.max_cs_nb = 2,
+	.max_rb_nb = 1,
+	.use_dma = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada_8k_nfc_legacy_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.need_system_controller = true,
+	.legacy_of_bindings = true,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada370_nfc_legacy_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.legacy_of_bindings = true,
+};
+
+static const struct marvell_nfc_caps marvell_pxa3xx_nfc_legacy_caps = {
+	.max_cs_nb = 2,
+	.max_rb_nb = 1,
+	.legacy_of_bindings = true,
+};
+
+static const struct platform_device_id marvell_nfc_platform_ids[] = {
+	{
+		.name = "pxa3xx-nand",
+		.driver_data = (kernel_ulong_t)&marvell_pxa3xx_nfc_legacy_caps,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(platform, marvell_nfc_platform_ids);
+
+static const struct of_device_id marvell_nfc_of_ids[] = {
+	{
+		.compatible = "marvell,armada-8k-nand-controller",
+		.data = &marvell_armada_8k_nfc_caps,
+	},
+	{
+		.compatible = "marvell,armada370-nand-controller",
+		.data = &marvell_armada370_nfc_caps,
+	},
+	{
+		.compatible = "marvell,pxa3xx-nand-controller",
+		.data = &marvell_pxa3xx_nfc_caps,
+	},
+	/* Support for old/deprecated bindings: */
+	{
+		.compatible = "marvell,armada-8k-nand",
+		.data = &marvell_armada_8k_nfc_legacy_caps,
+	},
+	{
+		.compatible = "marvell,armada370-nand",
+		.data = &marvell_armada370_nfc_legacy_caps,
+	},
+	{
+		.compatible = "marvell,pxa3xx-nand",
+		.data = &marvell_pxa3xx_nfc_legacy_caps,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, marvell_nfc_of_ids);
+
+static struct platform_driver marvell_nfc_driver = {
+	.driver	= {
+		.name		= "marvell-nfc",
+		.of_match_table = marvell_nfc_of_ids,
+	},
+	.id_table = marvell_nfc_platform_ids,
+	.probe = marvell_nfc_probe,
+	.remove	= marvell_nfc_remove,
+};
+module_platform_driver(marvell_nfc_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Marvell NAND controller driver");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Add marvell_nand driver which aims at replacing the existing pxa3xx_nand
driver.

The new driver intends to be easier to understand and follows the brand
new NAND framework rules by implementing hooks for every pattern the
controller might support and referencing them inside a parser object
that will be given to the core at each ->exec_op() call.

Raw accessors are implemented, useful to test/debug memory/filesystem
corruptions. Userspace binaries contained in the mtd-utils package may
now be used and their output trusted.

Timings may not be kept from the bootloader anymore, the timings used
for instance in U-Boot were not optimal and it supposed to have NAND
support (and initialized) in the bootloader.

Thanks to the improved timings, implementation of ONFI mode 5 support
(with EDO managed by adding a delay on data sampling), merging the
commands together and optimizing writes in the command registers, the
new driver may achieve faster throughputs in both directions.
Measurements show an improvement of about +23% read throughput and +24%
write throughput. These measurements have been done with an
Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH ECC
correction) using the userspace tool 'flash_speed' from the MTD test
suite.

Besides these important topics, the new driver addresses several
unsolved known issues in the old driver which:
- did not work with ECC soft neither with ECC none ;
- relied on naked read/write (which is unchanged) while the NFCv1
  embedded in the pxa3xx platforms do not implement it, so several
  NAND commands did not actually ever work without any notice (like
  reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
- wrote the OOB data correctly, but was not able to read it correctly
  past the first OOB data chunk ;
- did not displayed ECC bytes ;
- used device tree bindings that did not allow more than one NAND chip,
  and did not allow to choose the correct chip select if not
  incrementing from 0. Plus, the Ready/Busy line used had to be 0.

Old device tree bindings are still supported but deprecated. A more
hierarchical view has to be used to keep the controller and the NAND
chip structures clearly separated both inside the device tree and also
in the driver code.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 drivers/mtd/nand/Kconfig        |   12 +
 drivers/mtd/nand/Makefile       |    1 +
 drivers/mtd/nand/marvell_nand.c | 2951 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 2964 insertions(+)
 create mode 100644 drivers/mtd/nand/marvell_nand.c

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 859eb7790c46..9e141e03f5c2 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -323,6 +323,18 @@ config MTD_NAND_PXA3xx
 	  platforms (XP, 370, 375, 38x, 39x) and 64-bit Armada
 	  platforms (7K, 8K) (NFCv2).
 
+config MTD_NAND_MARVELL
+	tristate "NAND controller support on Marvell boards"
+	depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
+		   COMPILE_TEST
+	depends on HAS_IOMEM
+	help
+	  This enables the NAND flash controller driver for Marvell boards,
+	  including:
+	  - PXA3xx processors (NFCv1)
+	  - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
+	  - 64-bit Aramda platforms (7k, 8k) (NFCv2)
+
 config MTD_NAND_SLC_LPC32XX
 	tristate "NXP LPC32xx SLC Controller"
 	depends on ARCH_LPC32XX
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 118a1349aad3..921634ba400c 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_MTD_NAND_OMAP2) 		+= omap2_nand.o
 obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)	+= omap_elm.o
 obj-$(CONFIG_MTD_NAND_CM_X270)		+= cmx270_nand.o
 obj-$(CONFIG_MTD_NAND_PXA3xx)		+= pxa3xx_nand.o
+obj-$(CONFIG_MTD_NAND_MARVELL)		+= marvell_nand.o
 obj-$(CONFIG_MTD_NAND_TMIO)		+= tmio_nand.o
 obj-$(CONFIG_MTD_NAND_PLATFORM)		+= plat_nand.o
 obj-$(CONFIG_MTD_NAND_PASEMI)		+= pasemi_nand.o
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
new file mode 100644
index 000000000000..2525d9b2f4fa
--- /dev/null
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -0,0 +1,2951 @@
+/*
+ * Marvell NAND flash controller driver
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Copyright (C) 2017 Marvell
+ * Author: Miquel RAYNAL <miquel.raynal@free-electrons.com>
+ */
+
+#include <linux/module.h>
+#include <linux/clk.h>
+#include <linux/mtd/rawnand.h>
+#include <linux/of_platform.h>
+#include <linux/iopoll.h>
+#include <linux/interrupt.h>
+#include <linux/slab.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+#include <asm/unaligned.h>
+
+#include <linux/dmaengine.h>
+#include <linux/dma-mapping.h>
+#include <linux/dma/pxa-dma.h>
+#include <linux/platform_data/mtd-nand-pxa3xx.h>
+
+/* Data FIFO granularity, FIFO reads/writes must be a multiple of this length */
+#define FIFO_DEPTH		8
+#define FIFO_REP(x)		(x / sizeof(u32))
+#define BCH_SEQ_READS		(32 / FIFO_DEPTH)
+/* NFC does not support transfers of larger chunks at a time */
+#define MAX_CHUNK_SIZE		2112
+/* NFCv1 cannot read more that 7 bytes of ID */
+#define NFCV1_READID_LEN	7
+/* Polling is done at a pace of POLL_PERIOD us until POLL_TIMEOUT is reached */
+#define POLL_PERIOD		0
+#define POLL_TIMEOUT		100000
+/* Interrupt maximum wait period in ms */
+#define IRQ_TIMEOUT		1000
+/* Latency in clock cycles between SoC pins and NFC logic */
+#define MIN_RD_DEL_CNT		3
+/* Maximum number of contiguous address cycles */
+#define MAX_ADDRESS_CYC_NFCV1	5
+#define MAX_ADDRESS_CYC_NFCV2	7
+/* System control registers/bits to enable the NAND controller on some SoCs */
+#define GENCONF_SOC_DEVICE_MUX	0x208
+#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
+#define GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST BIT(20)
+#define GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST BIT(21)
+#define GENCONF_SOC_DEVICE_MUX_NFC_INT_EN BIT(25)
+#define GENCONF_CLK_GATING_CTRL	0x220
+#define GENCONF_CLK_GATING_CTRL_ND_GATE BIT(2)
+#define GENCONF_ND_CLK_CTRL	0x700
+#define GENCONF_ND_CLK_CTRL_EN	BIT(0)
+
+/* NAND controller data flash control register */
+#define NDCR			0x00
+/* NAND interface timing parameter 0 register */
+#define NDTR0			0x04
+/* NAND interface timing parameter 1 register */
+#define NDTR1			0x0C
+/* NAND controller status register */
+#define NDSR			0x14
+/* NAND ECC control register */
+#define NDECCCTRL		0x28
+/* NAND controller data buffer register */
+#define NDDB			0x40
+/* NAND controller command buffer 0 register */
+#define NDCB0			0x48
+/* NAND controller command buffer 1 register */
+#define NDCB1			0x4C
+/* NAND controller command buffer 2 register */
+#define NDCB2			0x50
+/* NAND controller command buffer 3 register */
+#define NDCB3			0x54
+
+/* Data flash control register bitfields */
+#define NDCR_ALL_INT		GENMASK(11, 0)
+#define NDCR_CS1_CMDDM		BIT(7)
+#define NDCR_CS0_CMDDM		BIT(8)
+#define NDCR_RDYM		BIT(11)
+#define NDCR_ND_ARB_EN		BIT(12)
+#define NDCR_RA_START		BIT(15)
+#define NDCR_RD_ID_CNT(x)	(min_t(unsigned int, x, 0x7) << 16)
+#define NDCR_PAGE_SZ(x)		(x >= 2048 ? BIT(24) : 0)
+#define NDCR_DWIDTH_M		BIT(26)
+#define NDCR_DWIDTH_C		BIT(27)
+#define NDCR_ND_RUN		BIT(28)
+#define NDCR_DMA_EN		BIT(29)
+#define NDCR_ECC_EN		BIT(30)
+#define NDCR_SPARE_EN		BIT(31)
+
+/* NAND interface timing parameter registers bitfields */
+#define NDTR0_TRP(x)		((min_t(unsigned int, x, 0xF) & 0x7) << 0)
+#define NDTR0_TRH(x)		(min_t(unsigned int, x, 0x7) << 3)
+#define NDTR0_ETRP(x)		((min_t(unsigned int, x, 0xF) & 0x8) << 3)
+#define NDTR0_SEL_NRE_EDGE	BIT(7)
+#define NDTR0_TWP(x)		(min_t(unsigned int, x, 0x7) << 8)
+#define NDTR0_TWH(x)		(min_t(unsigned int, x, 0x7) << 11)
+#define NDTR0_TCS(x)		(min_t(unsigned int, x, 0x7) << 16)
+#define NDTR0_TCH(x)		(min_t(unsigned int, x, 0x7) << 19)
+#define NDTR0_RD_CNT_DEL(x)	(min_t(unsigned int, x, 0xF) << 22)
+#define NDTR0_SELCNTR		BIT(26)
+#define NDTR0_TADL(x)		(min_t(unsigned int, x, 0x1F) << 27)
+
+#define NDTR1_TAR(x)		(min_t(unsigned int, x, 0xF) << 0)
+#define NDTR1_TWHR(x)		(min_t(unsigned int, x, 0xF) << 4)
+#define NDTR1_TRHW(x)		(min_t(unsigned int, x / 16, 0x3) << 8)
+#define NDTR1_PRESCALE		BIT(14)
+#define NDTR1_WAIT_MODE		BIT(15)
+#define NDTR1_TR(x)		(min_t(unsigned int, x, 0xFFFF) << 16)
+
+/* NAND controller status register bitfields */
+#define NDSR_WRCMDREQ		BIT(0)
+#define NDSR_RDDREQ		BIT(1)
+#define NDSR_WRDREQ		BIT(2)
+#define NDSR_CORERR		BIT(3)
+#define NDSR_UNCERR		BIT(4)
+#define NDSR_CMDD(cs)		BIT(8 - cs)
+#define NDSR_RDY(rb)		BIT(11 + rb)
+#define NDSR_ERRCNT(x)		((x >> 16) & 0x1F)
+
+/* NAND ECC control register bitfields */
+#define NDECCTRL_BCH_EN		BIT(0)
+
+/* NAND controller command buffer registers bitfields */
+#define NDCB0_CMD1(x)		((x & 0xFF) << 0)
+#define NDCB0_CMD2(x)		((x & 0xFF) << 8)
+#define NDCB0_ADDR_CYC(x)	((x & 0x7) << 16)
+#define NDCB0_DBC		BIT(19)
+#define NDCB0_CMD_TYPE(x)	((x & 0x7) << 21)
+#define NDCB0_CSEL		BIT(24)
+#define NDCB0_RDY_BYP		BIT(27)
+#define NDCB0_LEN_OVRD		BIT(28)
+#define NDCB0_CMD_XTYPE(x)	((x & 0x7) << 29)
+
+#define NDCB1_COLS(x)		((x & 0xFFFF) << 0)
+#define NDCB1_ADDRS(x)		(x << 16)
+
+#define NDCB2_ADDR5(x)		(((x >> 16) & 0xFF) << 0)
+
+#define NDCB3_ADDR6(x)		((x & 0xFF) << 16)
+#define NDCB3_ADDR7(x)		((x & 0xFF) << 24)
+
+/* NAND controller command buffer 0 register 'type' and 'xtype' fields */
+#define TYPE_READ		0
+#define TYPE_WRITE		1
+#define TYPE_ERASE		2
+#define TYPE_READ_ID		3
+#define TYPE_STATUS		4
+#define TYPE_RESET		5
+#define TYPE_NAKED_CMD		6
+#define TYPE_NAKED_ADDR		7
+#define TYPE_MASK		7
+#define XTYPE_MONOLITHIC_RW	0
+#define XTYPE_LAST_NAKED_RW	1
+#define XTYPE_FINAL_COMMAND	3
+#define XTYPE_READ		4
+#define XTYPE_WRITE_DISPATCH	4
+#define XTYPE_NAKED_RW		5
+#define XTYPE_COMMAND_DISPATCH	6
+#define XTYPE_MASK		7
+
+/*
+ * Marvell ECC engine works differently than the others, in order to limit the
+ * size of the IP, hardware engineers choose to set a fixed strength at 16 bits
+ * per subpage, and depending on a the desired strength needed by the NAND chip,
+ * a particular layout mixing data/spare/ecc is defined, with a possible last
+ * chunk smaller that the others.
+ *
+ * @writesize:		Full page size on which the layout applies
+ * @chunk:		Desired ECC chunk size on which the layout applies
+ * @strength:		Desired ECC strength (per chunk size bytes) on which the
+ *			layout applies
+ * @full_chunk_cnt:	Number of full-sized chunks, which is the number of
+ *			repetitions of the pattern:
+ *			(data_bytes + spare_bytes + ecc_bytes).
+ * @data_bytes:		Number of data bytes per chunk
+ * @spare_bytes:	Number of spare bytes per chunk
+ * @ecc_bytes:		Number of ecc bytes per chunk
+ * @last_chunk_cnt:	If there is a last chunk with a different size than
+ *			the first ones, the next fields may not be empty
+ * @last_data_bytes:	Number of data bytes in the last chunk
+ * @last_spare_bytes:	Number of spare bytes in the last chunk
+ * @last_ecc_bytes:	Number of ecc bytes in the last chunk
+ */
+struct marvell_hw_ecc_layout {
+	/* Constraints */
+	int writesize;
+	int chunk;
+	int strength;
+	/* Corresponding layout */
+	int full_chunk_cnt;
+	int data_bytes;
+	int spare_bytes;
+	int ecc_bytes;
+	int last_chunk_cnt;
+	int last_data_bytes;
+	int last_spare_bytes;
+	int last_ecc_bytes;
+};
+
+#define MARVELL_LAYOUT(ws, dc, ds, fcc, db, sb, eb, lcc, ldb, lsb, leb) \
+	{								\
+		.writesize = ws,					\
+		.chunk = dc,						\
+		.strength = ds,						\
+		.full_chunk_cnt = fcc,					\
+		.data_bytes = db,					\
+		.spare_bytes = sb,					\
+		.ecc_bytes = eb,					\
+		.last_chunk_cnt = lcc,					\
+		.last_data_bytes = ldb,					\
+		.last_spare_bytes = lsb,				\
+		.last_ecc_bytes = leb,					\
+	}
+
+/* Layouts explained in AN-379_Marvell_SoC_NFC_ECC */
+static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {
+	MARVELL_LAYOUT(  512,   512,  1,  1,  512,  8,  8,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 2048,   512,  1,  1, 2048, 40, 24,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 2048,   512,  4,  1, 2048, 32, 30,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 4096,   512,  4,  2, 2048, 32, 30,  0,  0,  0,  0),
+	MARVELL_LAYOUT( 4096,   512,  8,  4, 1024,  0, 30,  1,  0, 64, 30),
+};
+
+/*
+ * The Nand Flash Controller has up to 4 CE and 2 RB pins. The CE selection
+ * is made by a field in NDCB0 register, and in another field in NDCB2 register.
+ * The datasheet describes the logic with an error: ADDR5 field is once
+ * declared at the beginning of NDCB2, and another time@its end. Because the
+ * ADDR5 field of NDCB2 may be used by other bytes, it would be more logical
+ * to use the last bit of this field instead of the first ones.
+ *
+ * @cs:			Wanted CE lane.
+ * @ndcb0_csel:		Value of the NDCB0 register with or without the flag
+ *			selecting the wanted CE lane. This is set once when
+ *			the Device Tree is probed.
+ * @rb:			Ready/Busy pin for the flash chip
+ */
+struct marvell_nand_chip_sel {
+	unsigned int cs;
+	u32 ndcb0_csel;
+	unsigned int rb;
+};
+
+/*
+ * NAND chip structure: stores NAND chip device related information
+ *
+ * @chip:		Base NAND chip structure
+ * @node:		Used to store NAND chips into a list
+ * @layout		NAND layout when using hardware ECC
+ * @ndtr0		Timing registers 0 value for this NAND chip
+ * @ndtr1		Timing registers 1 value for this NAND chip
+ * @selected_die:	Current active CS
+ * @nsels:		Number of CS lines required by the NAND chip
+ * @sels:		Array of CS lines descriptions
+ */
+struct marvell_nand_chip {
+	struct nand_chip chip;
+	struct list_head node;
+	const struct marvell_hw_ecc_layout *layout;
+	u32 ndtr0;
+	u32 ndtr1;
+	int addr_cyc;
+	int selected_die;
+	unsigned int nsels;
+	struct marvell_nand_chip_sel sels[0];
+};
+
+static inline struct marvell_nand_chip *to_marvell_nand(struct nand_chip *chip)
+{
+	return container_of(chip, struct marvell_nand_chip, chip);
+}
+
+static inline struct marvell_nand_chip_sel *to_nand_sel(struct marvell_nand_chip
+							*nand)
+{
+	return &nand->sels[nand->selected_die];
+}
+
+/*
+ * NAND controller capabilities for distinction between compatible strings
+ *
+ * @max_cs_nb:		Number of Chip Select lines available
+ * @max_rb_nb:		Number of Ready/Busy lines available
+ * @need_system_controller: Indicates if the SoC needs to have access to the
+ *                      system controller (ie. to enable the NAND controller)
+ * @legacy_of_bindings:	Indicates if DT parsing must be done using the old
+ *			fashion way
+ * @is_nfcv2:		NFCv2 has numerous enhancements compared to NFCv1, ie.
+ *			BCH error detection and correction algorithm,
+ *			NDCB3 register has been added
+ * @use_dma:		Use dma for data transfers
+ */
+struct marvell_nfc_caps {
+	unsigned int max_cs_nb;
+	unsigned int max_rb_nb;
+	bool need_system_controller;
+	bool legacy_of_bindings;
+	bool is_nfcv2;
+	bool use_dma;
+};
+
+/*
+ * NAND controller structure: stores Marvell NAND controller information
+ *
+ * @controller:		Base controller structure
+ * @dev:		Parent device (used to print error messages)
+ * @regs:		NAND controller registers
+ * @ecc_clk:		ECC block clock, two times the NAND controller clock
+ * @complete:		Completion object to wait for NAND controller events
+ * @assigned_cs:	Bitmask describing already assigned CS lines
+ * @chips:		List containing all the NAND chips attached to
+ *			this NAND controller
+ * @caps:		NAND controller capabilities for each compatible string
+ * @buf:		Controller local buffer to store a part of the read
+ *			buffer when the read operation was not 8 bytes aligned
+ *			as is the FIFO.
+ * @buf_pos:		Position in the 'buf' buffer
+ * @dma_chan:		DMA channel (NFCv1 only)
+ * @dma_buf:		32-bit aligned buffer for DMA transfers (NFCv1 only)
+ */
+struct marvell_nfc {
+	struct nand_hw_control controller;
+	struct device *dev;
+	void __iomem *regs;
+	struct clk *ecc_clk;
+	struct completion complete;
+	unsigned long assigned_cs;
+	struct list_head chips;
+	struct nand_chip *selected_chip;
+	const struct marvell_nfc_caps *caps;
+
+	/*
+	 * Buffer handling: @buf will be accessed byte-per-byter but also
+	 * int-per-int when exchanging data with the NAND controller FIFO,
+	 * 32-bit alignment is then required.
+	 */
+	u8 buf[FIFO_DEPTH] __aligned(sizeof(u32));
+	int buf_pos;
+
+	/* DMA (NFCv1 only) */
+	bool use_dma;
+	struct dma_chan *dma_chan;
+	u8 *dma_buf;
+};
+
+static inline struct marvell_nfc *to_marvell_nfc(struct nand_hw_control *ctrl)
+{
+	return container_of(ctrl, struct marvell_nfc, controller);
+}
+
+/*
+ * NAND controller timings expressed in NAND Controller clock cycles
+ *
+ * @tRP:		ND_nRE pulse width
+ * @tRH:		ND_nRE high duration
+ * @tWP:		ND_nWE pulse time
+ * @tWH:		ND_nWE high duration
+ * @tCS:		Enable signal setup time
+ * @tCH:		Enable signal hold time
+ * @tADL:		Address to write data delay
+ * @tAR:		ND_ALE low to ND_nRE low delay
+ * @tWHR:		ND_nWE high to ND_nRE low for status read
+ * @tRHW:		ND_nRE high duration, read to write delay
+ * @tR:			ND_nWE high to ND_nRE low for read
+ */
+struct marvell_nfc_timings {
+	/* NDTR0 fields */
+	unsigned int tRP;
+	unsigned int tRH;
+	unsigned int tWP;
+	unsigned int tWH;
+	unsigned int tCS;
+	unsigned int tCH;
+	unsigned int tADL;
+	/* NDTR1 fields */
+	unsigned int tAR;
+	unsigned int tWHR;
+	unsigned int tRHW;
+	unsigned int tR;
+};
+
+/*
+ * Derives a duration in numbers of clock cycles.
+ *
+ * @ps: Duration in pico-seconds
+ * @period_ns:  Clock period in nano-seconds
+ *
+ * Convert the duration in nano-seconds, then divide by the period and
+ * return the number of clock periods.
+ */
+#define TO_CYCLES(ps, period_ns) (DIV_ROUND_UP(ps / 1000, period_ns))
+
+/*
+ * NAND driver structure filled during the parsing of the ->exec_op() subop
+ * subset of instructions.
+ *
+ * @ndcb:		Array for the values of the NDCBx registers
+ * @cle_ale_delay_ns:	Optional delay after the last CMD or ADDR cycle
+ * @rdy_timeout_ms:	Timeout for waits on Ready/Busy pin
+ * @rdy_delay_ns:	Optional delay after waiting for the RB pin
+ * @data_delay_ns:	Optional delay after the data xfer
+ * @data_instr_idx:	Index of the data instruction in the subop
+ * @data_instr:		Pointer to the data instruction in the subop
+ */
+struct marvell_nfc_op {
+	u32 ndcb[4];
+	unsigned int cle_ale_delay_ns;
+	unsigned int rdy_timeout_ms;
+	unsigned int rdy_delay_ns;
+	unsigned int data_delay_ns;
+	unsigned int data_instr_idx;
+	const struct nand_op_instr *data_instr;
+};
+
+/*
+ * Internal helper to conditionnally apply a delay (from the above structure,
+ * most of the time).
+ */
+static void cond_delay(unsigned int ns)
+{
+	if (!ns)
+		return;
+
+	if (ns < 10000)
+		ndelay(ns);
+	else
+		udelay(DIV_ROUND_UP(ns, 1000));
+}
+
+/*
+ * Internal helper to mimic core functions whithout having to distinguish if
+ * this is the first read operation on the page or not and hence choose the
+ * right function.
+ */
+int read_page_data(struct nand_chip *chip, unsigned int page,
+		   unsigned int column, void *buf, unsigned int len)
+{
+	if (!column)
+		return nand_read_page_op(chip, page, column, buf, len);
+	else
+		return nand_change_read_column_op(chip, column, buf, len,
+						  false);
+}
+
+/*
+ * The controller has many flags that could generate interrupts, most of them
+ * are disabled and polling is used. For the very slow signals, using interrupts
+ * may relax the CPU charge.
+ */
+static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	u32 reg;
+
+	/* Writing 1 disables the interrupt */
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg | int_mask, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	u32 reg;
+
+	/* Writing 0 enables the interrupt */
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg & ~int_mask, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask)
+{
+	writel_relaxed(int_mask, nfc->regs + NDSR);
+}
+
+/*
+ * The core may ask the controller to use only 8-bit accesses while usually
+ * using 16-bit accesses. Later function may blindly call this one with a
+ * boolean to indicate if 8-bit accesses must be enabled of disabled without
+ * knowing if 16-bit accesses are actually in use.
+ */
+static void marvell_nfc_force_byte_access(struct nand_chip *chip,
+					  bool force_8bit)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr;
+
+	if (!(chip->options & NAND_BUSWIDTH_16))
+		return;
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (force_8bit)
+		ndcr &= ~(NDCR_DWIDTH_M | NDCR_DWIDTH_C);
+	else
+		ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
+
+	writel_relaxed(ndcr, nfc->regs + NDCR);
+}
+
+static int marvell_nfc_wait_ndrun(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 val;
+	int ret;
+
+	/*
+	 * The command is being processed, wait for the ND_RUN bit to be
+	 * cleared by the NFC. If not, we must clear it by hand.
+	 */
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDCR, val,
+					 (val & NDCR_ND_RUN) == 0,
+					 POLL_PERIOD, POLL_TIMEOUT);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on NAND controller run mode\n");
+		writel_relaxed(readl_relaxed(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+		return ret;
+	}
+
+	return 0;
+}
+
+/*
+ * Any time a command has to be sent to the controller, the following sequence
+ * has to be followed:
+ * - call marvell_nfc_prepare_cmd()
+ *      -> activate the ND_RUN bit that will kind of 'start a job'
+ *      -> wait the signal indicating the NFC is waiting for a command
+ * - send the command (cmd and address cycles)
+ * - enventually send or receive the data
+ * - call marvell_nfc_end_cmd() with the corresponding flag
+ *      -> wait the flag to be triggered or cancel the job with a timeout
+ *
+ * The following functions are helpers to do this job and keep in the
+ * specialized functions the code that really does the operations.
+ */
+static int marvell_nfc_prepare_cmd(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr, val;
+	int ret;
+
+	/* Poll ND_RUN and clear NDSR before issuing any command */
+	ret = marvell_nfc_wait_ndrun(chip);
+	if (ret) {
+		dev_err(nfc->dev, "Last operation did not suceed\n");
+		return ret;
+	}
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(readl_relaxed(nfc->regs + NDSR), nfc->regs + NDSR);
+
+	/* Assert ND_RUN bit and wait the NFC to be ready */
+	writel_relaxed(ndcr | NDCR_ND_RUN, nfc->regs + NDCR);
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
+					 val & NDSR_WRCMDREQ,
+					 POLL_PERIOD, POLL_TIMEOUT);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on WRCMDRE\n");
+		return -ETIMEDOUT;
+	}
+
+	/* Command may be written, clear WRCMDREQ status bit */
+	writel_relaxed(NDSR_WRCMDREQ, nfc->regs + NDSR);
+
+	return 0;
+}
+
+static void marvell_nfc_send_cmd(struct nand_chip *chip,
+				 struct marvell_nfc_op *nfc_op)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+	dev_dbg(nfc->dev,
+		"NDCB0: 0x%08x\nNDCB1: 0x%08x\nNDCB2: 0x%08x\nNDCB3: 0x%08x\n",
+		nfc_op->ndcb[0], nfc_op->ndcb[1], nfc_op->ndcb[2],
+		nfc_op->ndcb[3]);
+
+	writel_relaxed(to_nand_sel(marvell_nand)->ndcb0_csel | nfc_op->ndcb[0],
+		       nfc->regs + NDCB0);
+	writel_relaxed(nfc_op->ndcb[1], nfc->regs + NDCB0);
+	writel(nfc_op->ndcb[2], nfc->regs + NDCB0);
+
+	/*
+	 * Write NDCB0 four times only if LEN_OVRD is set or if ADDR6 or ADDR7
+	 * fields are used (only available on NFCv2).
+	 */
+	if (nfc_op->ndcb[0] & NDCB0_LEN_OVRD ||
+	    (nfc_op->ndcb[0] & NDCB0_ADDR_CYC(6)) == NDCB0_ADDR_CYC(6)) {
+		if (nfc->caps->is_nfcv2)
+			writel(nfc_op->ndcb[3], nfc->regs + NDCB0);
+		else
+			dev_err(nfc->dev,
+				"NDCB3 does not exist on NFCv1 and should not be written\n");
+	}
+}
+
+static int marvell_nfc_end_cmd(struct nand_chip *chip, int flag,
+			       const char *label)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 val;
+	int ret;
+
+	ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
+					 val & flag,
+					 POLL_PERIOD, POLL_TIMEOUT);
+
+	if (ret) {
+		dev_err(nfc->dev, "Timeout on %s (NDSR: 0x%08x)\n",
+			label, val);
+		if (nfc->dma_chan)
+			dmaengine_terminate_all(nfc->dma_chan);
+		return ret;
+	}
+
+	/*
+	 * DMA function uses this helper to poll on CMDD bits without wanting
+	 * them to be bleared.
+	 */
+	if (nfc->use_dma && (readl(nfc->regs + NDCR) & NDCR_DMA_EN))
+		return 0;
+
+	writel_relaxed(flag, nfc->regs + NDSR);
+
+	return 0;
+}
+
+static int marvell_nfc_wait_cmdd(struct nand_chip *chip)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	int cs_flag = NDSR_CMDD(to_nand_sel(marvell_nand)->ndcb0_csel);
+
+	return marvell_nfc_end_cmd(chip, cs_flag, "CMDD");
+}
+
+static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int ret;
+
+	/* Timeout is expressed in ms */
+	if (!timeout_ms)
+		timeout_ms = IRQ_TIMEOUT;
+
+	init_completion(&nfc->complete);
+
+	marvell_nfc_enable_int(nfc, NDCR_RDYM);
+	ret = wait_for_completion_timeout(&nfc->complete,
+					  msecs_to_jiffies(timeout_ms));
+	marvell_nfc_disable_int(nfc, NDCR_RDYM);
+	marvell_nfc_clear_int(nfc, NDSR_RDY(0) | NDSR_RDY(1));
+	if (!ret) {
+		dev_err(nfc->dev, "Timeout waiting for RB signal\n");
+		return -ETIMEDOUT;
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_select_chip(struct mtd_info *mtd, int die_nr)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr;
+
+	if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
+		return;
+
+	if (die_nr < 0 || die_nr >= marvell_nand->nsels) {
+		nfc->selected_chip = NULL;
+		marvell_nand->selected_die = -1;
+		return;
+	}
+
+	/*
+	 * Do not change the timing registers when using the DT property
+	 * marvell,nand-keep-config; in that case ->ndtr0 and ->ndtr1 from the
+	 * marvell_nand structure are supposedly empty.
+	 */
+	if (marvell_nand->ndtr0 && marvell_nand->ndtr1) {
+		writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
+		writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
+	}
+
+	ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	/* Ensure controller is not blocked; also clear some fields */
+	ndcr &= ~(NDCR_ND_RUN | NDCR_DWIDTH_M | NDCR_DWIDTH_C |
+		  NDCR_PAGE_SZ(2048));
+
+	/* Adapt bus width */
+	if (chip->options & NAND_BUSWIDTH_16)
+		ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
+
+	/* Page size as seen by the controller, either 512B or 2kiB */
+	ndcr |= NDCR_PAGE_SZ(mtd->writesize);
+
+	/* Update the control register */
+	writel_relaxed(ndcr,  nfc->regs + NDCR);
+
+	/* Also reset the interrupt status register */
+	marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
+
+	nfc->selected_chip = chip;
+	marvell_nand->selected_die = die_nr;
+}
+
+static irqreturn_t marvell_nfc_isr(int irq, void *dev_id)
+{
+	struct marvell_nfc *nfc = dev_id;
+	u32 st = readl_relaxed(nfc->regs + NDSR);
+	u32 ien = (~readl_relaxed(nfc->regs + NDCR)) & NDCR_ALL_INT;
+
+	/*
+	 * RDY interrupt mask is one bit in NDCR while there are two status
+	 * bit in NDSR (RDY[cs0/cs2] and RDY[cs1/cs3]).
+	 */
+	if (st & NDSR_RDY(1))
+		st |= NDSR_RDY(0);
+
+	if (!(st & ien))
+		return IRQ_NONE;
+
+	marvell_nfc_disable_int(nfc, st & NDCR_ALL_INT);
+
+	if (!(st & (NDSR_RDDREQ | NDSR_WRDREQ | NDSR_WRCMDREQ)))
+		complete(&nfc->complete);
+
+	return IRQ_HANDLED;
+}
+
+/* HW ECC related functions */
+static void marvell_nfc_enable_hw_ecc(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (!(ndcr & NDCR_ECC_EN)) {
+		writel(ndcr | NDCR_ECC_EN, nfc->regs + NDCR);
+
+		/*
+		 * When enabling BCH, set threshold to 0 to always know the
+		 * number of corrected bitflips.
+		 */
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			writel(NDECCTRL_BCH_EN, nfc->regs + NDECCCTRL);
+	}
+}
+
+static void marvell_nfc_disable_hw_ecc(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (ndcr & NDCR_ECC_EN) {
+		writel_relaxed(ndcr & ~NDCR_ECC_EN, nfc->regs + NDCR);
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			writel_relaxed(0, nfc->regs + NDECCCTRL);
+	}
+}
+
+/*
+ * Enable/disable spare area
+ *
+ * NFCv1 needs it (see Hamming related functions). NFCv2 uses LEN_OVRD and thus
+ * does not need this bit to be set.
+ */
+static void marvell_nfc_enable_spare(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (!(ndcr & NDCR_SPARE_EN))
+		writel(ndcr | NDCR_SPARE_EN, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_disable_spare(struct nand_chip *chip)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	u32 ndcr = readl_relaxed(nfc->regs + NDCR);
+
+	if (ndcr & NDCR_SPARE_EN)
+		writel_relaxed(ndcr & ~NDCR_SPARE_EN, nfc->regs + NDCR);
+}
+
+/* DMA related helpers */
+static void marvell_nfc_enable_dma(struct marvell_nfc *nfc)
+{
+	u32 reg;
+
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg | NDCR_DMA_EN, nfc->regs + NDCR);
+}
+
+static void marvell_nfc_disable_dma(struct marvell_nfc *nfc)
+{
+	u32 reg;
+
+	reg = readl_relaxed(nfc->regs + NDCR);
+	writel_relaxed(reg & ~NDCR_DMA_EN, nfc->regs + NDCR);
+}
+
+/* Read/write PIO/DMA accessors */
+static int marvell_nfc_xfer_data_dma(struct marvell_nfc *nfc,
+				     enum dma_data_direction direction,
+				     unsigned int len)
+{
+	unsigned int dma_len = min_t(int, ALIGN(len, 32), MAX_CHUNK_SIZE);
+	struct dma_async_tx_descriptor *tx;
+	struct scatterlist sg;
+	dma_cookie_t cookie;
+	int ret;
+
+	marvell_nfc_enable_dma(nfc);
+	/* Prepare the DMA transfer */
+	sg_init_one(&sg, nfc->dma_buf, dma_len);
+	dma_map_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
+	tx = dmaengine_prep_slave_sg(nfc->dma_chan, &sg, 1,
+				     direction == DMA_FROM_DEVICE ?
+				     DMA_DEV_TO_MEM : DMA_MEM_TO_DEV,
+				     DMA_PREP_INTERRUPT);
+	if (!tx) {
+		dev_err(nfc->dev, "Could not prepare DMA S/G list\n");
+		return -ENXIO;
+	}
+
+	/* Do the task and wait for it to finish */
+	cookie = dmaengine_submit(tx);
+	ret = dma_submit_error(cookie);
+	if (ret)
+		return -EIO;
+
+	dma_async_issue_pending(nfc->dma_chan);
+	ret = marvell_nfc_wait_cmdd(nfc->selected_chip);
+	dma_unmap_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
+	marvell_nfc_disable_dma(nfc);
+	if (ret) {
+		dev_err(nfc->dev, "Timeout waiting for DMA (status: %d)\n",
+			dmaengine_tx_status(nfc->dma_chan, cookie, NULL));
+		dmaengine_terminate_all(nfc->dma_chan);
+		return -ETIMEDOUT;
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_xfer_data_in_pio(struct marvell_nfc *nfc, u8 *in,
+					unsigned int len)
+{
+	unsigned int last_len = len % FIFO_DEPTH;
+	unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
+	int i;
+
+	for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
+		ioread32_rep(nfc->regs + NDDB, in + i, FIFO_REP(FIFO_DEPTH));
+
+	if (last_len) {
+		ioread32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
+		memcpy(in + last_full_offset, nfc->buf, last_len);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_xfer_data_out_pio(struct marvell_nfc *nfc, const u8 *out,
+					 unsigned int len)
+{
+	unsigned int last_len = len % FIFO_DEPTH;
+	unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
+	int i;
+
+	for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
+		iowrite32_rep(nfc->regs + NDDB, out + i, FIFO_REP(FIFO_DEPTH));
+
+	if (last_len) {
+		memcpy(nfc->buf, out + last_full_offset, last_len);
+		iowrite32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_hw_ecc_correct(struct nand_chip *chip,
+				       u8 *data, int data_len,
+				       u8 *oob, int oob_len,
+				       unsigned int *max_bitflips)
+{
+	struct mtd_info *mtd = nand_to_mtd(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int bf = 0;
+	u32 ndsr;
+
+	ndsr = readl_relaxed(nfc->regs + NDSR);
+
+	/* Check uncorrectable error flag */
+	if (ndsr & NDSR_UNCERR) {
+		writel_relaxed(ndsr, nfc->regs + NDSR);
+
+		/*
+		 * Blank pages (all 0xFF) with no ECC are recognized as bad
+		 * because hardware ECC engine expects non-empty ECC values
+		 * in that case, so whenever an uncorrectable error occurs,
+		 * check if the page is actually blank or not.
+		 *
+		 * It is important to check the emptyness only on oob_len,
+		 * which only covers the spare bytes because after a read with
+		 * ECC enabled, the ECC bytes in the buffer have been set by the
+		 * ECC engine, so they are not 0xFF.
+		 */
+		if (!data)
+			data_len = 0;
+		if (!oob)
+			oob_len = 0;
+		bf = nand_check_erased_ecc_chunk(data, data_len, NULL, 0,
+						 oob, oob_len,
+						 chip->ecc.strength);
+		if (bf < 0) {
+			mtd->ecc_stats.failed++;
+			return;
+		}
+	}
+
+	/* Check correctable error flag */
+	if (ndsr & NDSR_CORERR) {
+		writel_relaxed(ndsr, nfc->regs + NDSR);
+
+		if (chip->ecc.algo == NAND_ECC_BCH)
+			bf = NDSR_ERRCNT(ndsr);
+		else
+			bf = 1;
+	}
+
+	/*
+	 * Derive max_bitflips either from the number of bitflips detected by
+	 * the hardware ECC engine or by nand_check_erased_ecc_chunk().
+	 */
+	mtd->ecc_stats.corrected += bf;
+	*max_bitflips = max_t(unsigned int, *max_bitflips, bf);
+}
+
+/* Hamming read helpers */
+static int marvell_nfc_hw_ecc_hmg_do_read_page(struct nand_chip *chip, u8 *buf,
+					       bool oob_required, bool raw,
+					       int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_DBC |
+			   NDCB0_CMD1(NAND_CMD_READ0) |
+			   NDCB0_CMD2(NAND_CMD_READSTART),
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+	unsigned int oob_bytes = 0;
+	int ret;
+
+	/* NFCv2 needs more information about the operation being executed */
+	if (nfc->caps->is_nfcv2)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required) {
+		marvell_nfc_enable_spare(chip);
+		oob_bytes = lt->spare_bytes;
+		if (raw)
+			oob_bytes += lt->ecc_bytes;
+	}
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while draining FIFO (data/oob)");
+	if (ret)
+		return ret;
+
+	/* Read the page then the OOB area */
+	if (nfc->use_dma) {
+		marvell_nfc_xfer_data_dma(nfc, DMA_FROM_DEVICE,
+					  lt->data_bytes + oob_bytes);
+		memcpy(buf, nfc->dma_buf, lt->data_bytes);
+		memcpy(chip->oob_poi + (raw ? 0 : lt->ecc_bytes),
+		       nfc->dma_buf + lt->data_bytes, oob_bytes);
+	} else {
+		marvell_nfc_xfer_data_in_pio(nfc, buf, lt->data_bytes);
+		marvell_nfc_xfer_data_in_pio(nfc, chip->oob_poi, oob_bytes);
+	}
+
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required)
+		marvell_nfc_disable_spare(chip);
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_hmg_read_page_raw(struct mtd_info *mtd,
+						struct nand_chip *chip, u8 *buf,
+						int oob_required, int page)
+{
+	return marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, oob_required,
+						   true, page);
+}
+
+static int marvell_nfc_hw_ecc_hmg_read_page(struct mtd_info *mtd,
+					    struct nand_chip *chip,
+					    u8 *buf, int oob_required,
+					    int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int max_bf = 0;
+
+	/*
+	 * Reading/Writing a given page must always be performed with the same
+	 * configuration regarding the state of the SPARE_EN bit or ECC bytes
+	 * will not be present at the same location (writing only data, without
+	 * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
+	 * while writing with the SPARE_EN bit (hence, also writing free OOB
+	 * bytes) will put first the spare bytes then, at the end of the OOB
+	 * area, the ECC bytes. Choices has been made to always read/write OOB
+	 * area (padding with 0xFF is handled by the core for writes).
+	 */
+
+	marvell_nfc_enable_hw_ecc(chip);
+	marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, true, false, page);
+	marvell_nfc_hw_ecc_correct(chip, buf, lt->data_bytes, NULL, 0, &max_bf);
+	marvell_nfc_disable_hw_ecc(chip);
+
+	/*
+	 * Re-read the OOB area in raw mode to get the ECC bytes if the OOB area
+	 * is needed.
+	 */
+	if (oob_required)
+		chip->ecc.read_oob_raw(mtd, chip, page);
+
+	return max_bf;
+}
+
+/*
+ * Spare area in Hamming layouts is not protected by the ECC engine (even if
+ * it appears before the ECC bytes when reading), the ->read_oob_raw() function
+ * also stands for ->read_oob().
+ */
+static int marvell_nfc_hw_ecc_hmg_read_oob_raw(struct mtd_info *mtd,
+					       struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return marvell_nfc_hw_ecc_hmg_do_read_page(chip, chip->data_buf, true,
+						   true, page);
+}
+
+/* Hamming write helpers */
+static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
+						const u8 *buf,
+						bool oob_required, bool raw,
+						int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_CMD1(NAND_CMD_SEQIN) |
+			   NDCB0_CMD2(NAND_CMD_PAGEPROG) |
+			   NDCB0_DBC,
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+	int oob_bytes = 0;
+	int ret;
+
+	/* NFCv2 needs more information about the operation being executed */
+	if (nfc->caps->is_nfcv2)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	if (oob_required) {
+		marvell_nfc_enable_spare(chip);
+		oob_bytes = lt->spare_bytes;
+		if (raw)
+			oob_bytes += lt->ecc_bytes;
+	}
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
+				  "WRDREQ while loading FIFO (data)");
+	if (ret)
+		return ret;
+
+	/* Write the page then the OOB area */
+	if (nfc->use_dma) {
+		memcpy(nfc->dma_buf, buf, lt->data_bytes);
+		if (oob_required)
+			memcpy(nfc->dma_buf + lt->data_bytes, chip->oob_poi,
+			       oob_bytes);
+		marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
+					  lt->ecc_bytes + lt->spare_bytes);
+	} else {
+		marvell_nfc_xfer_data_out_pio(nfc, buf, lt->data_bytes);
+		if (oob_required)
+			marvell_nfc_xfer_data_out_pio(nfc, chip->oob_poi,
+						      oob_bytes);
+	}
+
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	ret = marvell_nfc_wait_op(chip,
+				  chip->data_interface.timings.sdr.tPROG_max);
+	if (ret)
+		return ret;
+
+	if (oob_required)
+		marvell_nfc_disable_spare(chip);
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_hmg_write_page_raw(struct mtd_info *mtd,
+						 struct nand_chip *chip,
+						 const u8 *buf,
+						 int oob_required, int page)
+{
+	return marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, oob_required,
+						    true, page);
+}
+
+static int marvell_nfc_hw_ecc_hmg_write_page(struct mtd_info *mtd,
+					     struct nand_chip *chip,
+					     const u8 *buf,
+					     int oob_required, int page)
+{
+	int ret;
+
+	/*
+	 * Reading/Writing a given page must always be performed with the same
+	 * configuration regarding the state of the SPARE_EN bit or ECC bytes
+	 * will not be present at the same location (writing only data, without
+	 * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
+	 * while writing with the SPARE_EN bit (hence, also writing free OOB
+	 * bytes) will put first the spare bytes then, at the end of the OOB
+	 * area, the ECC bytes. Choices has been made to always read/write OOB
+	 * area (padding with 0xFF is handled by the core for writes).
+	 */
+
+	marvell_nfc_enable_hw_ecc(chip);
+	ret = marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, true, false,
+						   page);
+	marvell_nfc_disable_hw_ecc(chip);
+
+	return ret;
+}
+
+/*
+ * Spare area in Hamming layouts is not protected by the ECC engine (even if
+ * it appears before the ECC bytes when reading), the ->write_oob_raw() function
+ * also stands for ->write_oob().
+ */
+static int marvell_nfc_hw_ecc_hmg_write_oob_raw(struct mtd_info *mtd,
+						struct nand_chip *chip,
+						int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return marvell_nfc_hw_ecc_hmg_do_write_page(chip, chip->data_buf, true,
+						    true, page);
+}
+
+/* BCH read helpers */
+static int marvell_nfc_hw_ecc_bch_read_page_raw(struct mtd_info *mtd,
+						struct nand_chip *chip, u8 *buf,
+						int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	u8 *oob = chip->oob_poi;
+	int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
+	int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int ecc_len = lt->ecc_bytes;
+	int chunk;
+
+	if (oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	nand_read_page_op(chip, page, 0, NULL, 0);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		int offset_in_page = chunk * chunk_size;
+
+		/* Update last chunk length */
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+			ecc_len = lt->last_ecc_bytes;
+		}
+
+		nand_change_read_column_op(chip, offset_in_page, buf,
+					   lt->data_bytes, false);
+		buf += lt->data_bytes;
+
+		if (!oob_required)
+			continue;
+
+		offset_in_page += data_len;
+		nand_change_read_column_op(chip, offset_in_page,
+					   oob + (lt->spare_bytes * chunk),
+					   spare_len, false);
+
+		offset_in_page += spare_len;
+		nand_change_read_column_op(chip, offset_in_page,
+					   oob + ecc_offset +
+					   (ALIGN(lt->ecc_bytes, 32) * chunk),
+					   ecc_len, false);
+	}
+
+	return 0;
+}
+
+static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
+					      u8 *data, unsigned int data_len,
+					      u8 *spare, unsigned int spare_len,
+					      int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int i, ret;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
+			   NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+			   NDCB0_LEN_OVRD,
+		.ndcb[1] = NDCB1_ADDRS(page),
+		.ndcb[2] = NDCB2_ADDR5(page),
+	};
+
+	/*
+	 * Reading spare area is mandatory when using HW ECC or read operation
+	 * will trigger uncorrectable ECC errors, but do not read ECC here.
+	 */
+	nfc_op.ndcb[3] = data_len + spare_len;
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return;
+
+	if (chunk == 0)
+		nfc_op.ndcb[0] |= NDCB0_DBC |
+				  NDCB0_CMD1(NAND_CMD_READ0) |
+				  NDCB0_CMD2(NAND_CMD_READSTART);
+
+	/*
+	 * Trigger the naked read operation only on the last chunk.
+	 * Otherwise, use monolithic read.
+	 */
+	if (chunk < nchunks - 1)
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
+	else
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+
+	/*
+	 * According to the datasheet, when reading from NDDB
+	 * with BCH enabled, after each 32 bytes reads, we
+	 * have to make sure that the NDSR.RDDREQ bit is set.
+	 *
+	 * Drain the FIFO, 8 32-bit reads@a time, and skip
+	 * the polling on the last read.
+	 *
+	 * Length is a multiple of 32 bytes, hence it is a multiple of 8 too.
+	 *
+	 */
+
+	for (i = 0; i < data_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
+		marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				    "RDDREQ while draining FIFO (data)");
+		marvell_nfc_xfer_data_in_pio(nfc, data,
+					     FIFO_DEPTH * BCH_SEQ_READS);
+		data += FIFO_DEPTH * BCH_SEQ_READS;
+	}
+
+	for (i = 0; i < spare_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
+		marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				    "RDDREQ while draining FIFO (OOB)");
+		marvell_nfc_xfer_data_in_pio(nfc, spare,
+					     FIFO_DEPTH * BCH_SEQ_READS);
+		spare += FIFO_DEPTH * BCH_SEQ_READS;
+	}
+}
+
+static int marvell_nfc_hw_ecc_bch_read_page(struct mtd_info *mtd,
+					    struct nand_chip *chip,
+					    u8 *buf, int oob_required,
+					    int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	u8 *data = buf;
+	u8 *spare = chip->oob_poi;
+	int max_bitflips = 0;
+	int chunk, ecc_offset_in_page, ecc_offset_in_oob_buf, ecc_len;
+
+	/*
+	 * With BCH, OOB is not fully used (and thus not read entirely), not
+	 * expected bytes could show up at the end of the OOB buffer if not
+	 * explicitly erased.
+	 */
+	if (oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	marvell_nfc_enable_hw_ecc(chip);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		/* Update length for the last chunk */
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+		}
+
+		/* Read the chunk and detect number of bitflips */
+		marvell_nfc_hw_ecc_bch_read_chunk(chip, chunk, data, data_len,
+						  spare, spare_len, page);
+		marvell_nfc_hw_ecc_correct(chip, data, data_len,
+					   spare, spare_len, &max_bitflips);
+
+		data += data_len;
+		spare += spare_len;
+	}
+
+	marvell_nfc_disable_hw_ecc(chip);
+
+	if (!oob_required)
+		return max_bitflips;
+
+	/*
+	 * Re-read ECC bytes without ECC enabled, else it is garbage and it
+	 * fails the ->correct() call.
+	 */
+	ecc_len = lt->ecc_bytes;
+	ecc_offset_in_oob_buf =
+		(lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	ecc_offset_in_page = lt->data_bytes + lt->spare_bytes;
+
+	for (chunk = 0; chunk < nchunks;) {
+		/* Do the actual raw read of the ECC bytes */
+		nand_change_read_column_op(chip, ecc_offset_in_page,
+					   chip->oob_poi + ecc_offset_in_oob_buf,
+					   ecc_len, false);
+
+		chunk++;
+
+		/* When using a "last chunk", the ECC size might vary */
+		if (chunk >= lt->full_chunk_cnt)
+			ecc_len = lt->last_ecc_bytes;
+
+		/* Increment the offsets where ECC will be read and written */
+		ecc_offset_in_oob_buf += ALIGN(lt->ecc_bytes, 32);
+		ecc_offset_in_page += lt->ecc_bytes;
+		if (chunk < lt->full_chunk_cnt)
+			ecc_offset_in_page += lt->data_bytes + lt->spare_bytes;
+		else
+			ecc_offset_in_page += lt->last_data_bytes +
+				lt->last_spare_bytes;
+	}
+
+	return max_bitflips;
+}
+
+static int marvell_nfc_hw_ecc_bch_read_oob_raw(struct mtd_info *mtd,
+					       struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return chip->ecc.read_page_raw(mtd, chip, chip->data_buf, true, page);
+}
+
+static int marvell_nfc_hw_ecc_bch_read_oob(struct mtd_info *mtd,
+					   struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	return chip->ecc.read_page(mtd, chip, chip->data_buf, true, page);
+}
+
+/* BCH write helpers */
+static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
+						 struct nand_chip *chip,
+						 const u8 *buf,
+						 int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int ecc_len = lt->ecc_bytes;
+	int oob_len = spare_len + ecc_len;
+	int spare_offset = 0;
+	int ecc_offset =
+		(lt->full_chunk_cnt * lt->spare_bytes) +
+		(lt->last_chunk_cnt * lt->last_spare_bytes);
+	int chunk;
+
+	nand_prog_page_begin_op(chip, page, 0, NULL, 0);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+			ecc_len = lt->last_ecc_bytes;
+			oob_len = spare_len + ecc_len;
+		}
+
+		/* Point to the column of the next chunk */
+		nand_change_write_column_op(chip, chunk * full_chunk_size,
+					    NULL, 0, false);
+
+		/* Write the data */
+		nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
+				   data_len, false);
+
+		if (!oob_required)
+			continue;
+
+		/* Write the spare bytes */
+		if (spare_len)
+			nand_write_data_op(chip, chip->oob_poi + spare_offset,
+					   spare_len, false);
+
+		/* Write the ECC bytes */
+		if (ecc_len)
+			nand_write_data_op(chip, chip->oob_poi + ecc_offset,
+					   ecc_len, false);
+
+		spare_offset += spare_len;
+		ecc_offset += ALIGN(ecc_len, 32);
+	}
+
+	return nand_prog_page_end_op(chip);
+}
+
+static int
+marvell_nfc_hw_ecc_bch_write_chunk(struct nand_chip *chip, int chunk,
+				   const u8 *data, unsigned int data_len,
+				   const u8 *spare, unsigned int spare_len,
+				   int page)
+{
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	int ret;
+	struct marvell_nfc_op nfc_op = {
+		.ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) | NDCB0_LEN_OVRD,
+		.ndcb[3] = data_len + spare_len,
+	};
+
+	/*
+	 * First operation dispatches the CMD_SEQIN command, issue the address
+	 * cycles and asks for the first chunk of data.
+	 * All operations in the middle (if any) will issue a naked write and
+	 * also ask for data.
+	 * Last operation dispatches the PAGEPROG command and also asks for the
+	 * last chunk of data.
+	 */
+	if (chunk == 0) {
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_WRITE_DISPATCH) |
+				  NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
+				  NDCB0_CMD1(NAND_CMD_SEQIN);
+		nfc_op.ndcb[1] |= NDCB1_ADDRS(page);
+		nfc_op.ndcb[2] |= NDCB2_ADDR5(page);
+	} else if (chunk < nchunks - 1) {
+		nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_NAKED_RW);
+	} else {
+		nfc_op.ndcb[0] |= NDCB0_CMD2(NAND_CMD_PAGEPROG) | NDCB0_DBC |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+	}
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
+				  "WRDREQ while loading FIFO (data)");
+	if (ret)
+		return ret;
+
+	/* Transfer the contents */
+	iowrite32_rep(nfc->regs + NDDB, data, FIFO_REP(data_len));
+	iowrite32_rep(nfc->regs + NDDB, spare, FIFO_REP(spare_len));
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_bch_write_page(struct mtd_info *mtd,
+					     struct nand_chip *chip,
+					     const u8 *buf,
+					     int oob_required, int page)
+{
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
+	const u8 *data = buf;
+	const u8 *spare = chip->oob_poi;
+	int data_len = lt->data_bytes;
+	int spare_len = lt->spare_bytes;
+	int chunk, ret;
+
+	/* Spare data will be written anyway, so clear it to avoid garbage */
+	if (!oob_required)
+		memset(chip->oob_poi, 0xFF, mtd->oobsize);
+
+	marvell_nfc_enable_hw_ecc(chip);
+
+	for (chunk = 0; chunk < nchunks; chunk++) {
+		if (chunk >= lt->full_chunk_cnt) {
+			data_len = lt->last_data_bytes;
+			spare_len = lt->last_spare_bytes;
+		}
+
+		marvell_nfc_hw_ecc_bch_write_chunk(chip, chunk, data, data_len,
+						   spare, spare_len, page);
+		data += data_len;
+		spare += spare_len;
+
+		/*
+		 * Waiting only for CMDD or PAGED is not enough, ECC are
+		 * partially written. No flag is set once the operation is
+		 * really finished but the ND_RUN bit is cleared, so wait for it
+		 * before stepping into the next command.
+		 */
+		marvell_nfc_wait_ndrun(chip);
+	}
+
+	ret = marvell_nfc_wait_op(chip,
+				  chip->data_interface.timings.sdr.tPROG_max);
+
+	marvell_nfc_disable_hw_ecc(chip);
+
+	if (ret)
+		return ret;
+
+	return 0;
+}
+
+static int marvell_nfc_hw_ecc_bch_write_oob_raw(struct mtd_info *mtd,
+						struct nand_chip *chip,
+						int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return chip->ecc.write_page_raw(mtd, chip, chip->data_buf, true, page);
+}
+
+static int marvell_nfc_hw_ecc_bch_write_oob(struct mtd_info *mtd,
+					    struct nand_chip *chip, int page)
+{
+	/* Invalidate page cache */
+	chip->pagebuf = -1;
+
+	memset(chip->data_buf, 0xFF, mtd->writesize);
+
+	return chip->ecc.write_page(mtd, chip, chip->data_buf, true, page);
+}
+
+/* NAND framework ->exec_op() hooks and related helpers */
+static void marvell_nfc_parse_instructions(struct nand_chip *chip,
+					   const struct nand_subop *subop,
+					   struct marvell_nfc_op *nfc_op)
+{
+	const struct nand_op_instr *instr = NULL;
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	bool first_cmd = true;
+	unsigned int op_id;
+	int i;
+
+	/* Reset the input structure as most of its fields will be OR'ed */
+	memset(nfc_op, 0, sizeof(struct marvell_nfc_op));
+
+	for (op_id = 0; op_id < subop->ninstrs; op_id++) {
+		unsigned int offset, naddrs;
+		const u8 *addrs;
+		int len = nand_subop_get_data_len(subop, op_id);
+
+		instr = &subop->instrs[op_id];
+
+		switch (instr->type) {
+		case NAND_OP_CMD_INSTR:
+			if (first_cmd)
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD1(instr->ctx.cmd.opcode);
+			else
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD2(instr->ctx.cmd.opcode) |
+					NDCB0_DBC;
+
+			nfc_op->cle_ale_delay_ns = instr->delay_ns;
+			first_cmd = false;
+			break;
+
+		case NAND_OP_ADDR_INSTR:
+			offset = nand_subop_get_addr_start_off(subop, op_id);
+			naddrs = nand_subop_get_num_addr_cyc(subop, op_id);
+			addrs = &instr->ctx.addr.addrs[offset];
+
+			nfc_op->ndcb[0] |= NDCB0_ADDR_CYC(naddrs);
+
+			for (i = 0; i < min_t(unsigned int, 4, naddrs); i++)
+				nfc_op->ndcb[1] |= addrs[i] << (8 * i);
+
+			if (naddrs >= 5)
+				nfc_op->ndcb[2] |= NDCB2_ADDR5(addrs[5]);
+			if (naddrs >= 6)
+				nfc_op->ndcb[3] |= NDCB3_ADDR6(addrs[6]);
+			if (naddrs == 7)
+				nfc_op->ndcb[3] |= NDCB3_ADDR7(addrs[7]);
+
+			nfc_op->cle_ale_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_DATA_IN_INSTR:
+			nfc_op->data_instr = instr;
+			nfc_op->data_instr_idx = op_id;
+			nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ);
+			if (nfc->caps->is_nfcv2) {
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
+					NDCB0_LEN_OVRD;
+				nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
+			}
+			nfc_op->data_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_DATA_OUT_INSTR:
+			nfc_op->data_instr = instr;
+			nfc_op->data_instr_idx = op_id;
+			nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE);
+			if (nfc->caps->is_nfcv2) {
+				nfc_op->ndcb[0] |=
+					NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
+					NDCB0_LEN_OVRD;
+				nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
+			}
+			nfc_op->data_delay_ns = instr->delay_ns;
+			break;
+
+		case NAND_OP_WAITRDY_INSTR:
+			nfc_op->rdy_timeout_ms = instr->ctx.waitrdy.timeout_ms;
+			nfc_op->rdy_delay_ns = instr->delay_ns;
+			break;
+		}
+	}
+}
+
+static int marvell_nfc_xfer_data_pio(struct nand_chip *chip,
+				     const struct nand_subop *subop,
+				     struct marvell_nfc_op *nfc_op)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct nand_op_instr *instr = nfc_op->data_instr;
+	unsigned int op_id = nfc_op->data_instr_idx;
+	unsigned int len = nand_subop_get_data_len(subop, op_id);
+	unsigned int offset = nand_subop_get_data_start_off(subop, op_id);
+	bool reading = (instr->type == NAND_OP_DATA_IN_INSTR);
+	int ret;
+
+	if (instr->ctx.data.force_8bit)
+		marvell_nfc_force_byte_access(chip, true);
+
+	if (reading) {
+		u8 *in = instr->ctx.data.buf.in + offset;
+
+		ret = marvell_nfc_xfer_data_in_pio(nfc, in, len);
+	} else {
+		const u8 *out = instr->ctx.data.buf.out + offset;
+
+		ret = marvell_nfc_xfer_data_out_pio(nfc, out, len);
+	}
+
+	if (instr->ctx.data.force_8bit)
+		marvell_nfc_force_byte_access(chip, false);
+
+	return ret;
+}
+
+static int marvell_nfc_monolithic_access_exec(struct nand_chip *chip,
+					      const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	bool reading;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	reading = (nfc_op.data_instr->type == NAND_OP_DATA_IN_INSTR);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
+				  "RDDREQ/WRDREQ while draining raw data");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (reading) {
+		if (nfc_op.rdy_timeout_ms) {
+			ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+			if (ret)
+				return ret;
+		}
+
+		cond_delay(nfc_op.rdy_delay_ns);
+	}
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	if (!reading) {
+		if (nfc_op.rdy_timeout_ms) {
+			ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+			if (ret)
+				return ret;
+		}
+
+		cond_delay(nfc_op.rdy_delay_ns);
+	}
+
+	/*
+	 * NDCR ND_RUN bit should be cleared automatically at the end of each
+	 * operation but experience shows that the behavior is buggy when it
+	 * comes to writes (with LEN_OVRD). Clear it by hand in this case.
+	 */
+	if (!reading) {
+		struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+		writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_naked_access_exec(struct nand_chip *chip,
+					 const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+
+	/*
+	 * Naked access are different in that they need to be flagged as naked
+	 * by the controller. Reset the controller registers fields that inform
+	 * on the type and refill them according to the ongoing operation.
+	 */
+	nfc_op.ndcb[0] &= ~(NDCB0_CMD_TYPE(TYPE_MASK) |
+			    NDCB0_CMD_XTYPE(XTYPE_MASK));
+	switch (subop->instrs[0].type) {
+	case NAND_OP_CMD_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_CMD);
+		break;
+	case NAND_OP_ADDR_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_ADDR);
+		break;
+	case NAND_OP_DATA_IN_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ) |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+		break;
+	case NAND_OP_DATA_OUT_INSTR:
+		nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE) |
+				  NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
+		break;
+	default:
+		/* This should never happen */
+		break;
+	}
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+
+	if (!nfc_op.data_instr) {
+		ret = marvell_nfc_wait_cmdd(chip);
+		cond_delay(nfc_op.cle_ale_delay_ns);
+		return ret;
+	}
+
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
+				  "RDDREQ/WRDREQ while draining raw data");
+	if (ret)
+		return ret;
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	/*
+	 * NDCR ND_RUN bit should be cleared automatically at the end of each
+	 * operation but experience shows that the behavior is buggy when it
+	 * comes to writes (with LEN_OVRD). Clear it by hand in this case.
+	 */
+	if (subop->instrs[0].type == NAND_OP_DATA_OUT_INSTR) {
+		struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+		writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
+			       nfc->regs + NDCR);
+	}
+
+	return 0;
+}
+
+static int marvell_nfc_naked_waitrdy_exec(struct nand_chip *chip,
+					  const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return ret;
+}
+
+static int marvell_nfc_read_id_type_exec(struct nand_chip *chip,
+					 const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ_ID);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while reading ID");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (nfc_op.rdy_timeout_ms) {
+		ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+		if (ret)
+			return ret;
+	}
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_read_status_exec(struct nand_chip *chip,
+					const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_STATUS);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
+				  "RDDREQ while reading status");
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	if (nfc_op.rdy_timeout_ms) {
+		ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+		if (ret)
+			return ret;
+	}
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.data_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_reset_cmd_type_exec(struct nand_chip *chip,
+					   const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_RESET);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return 0;
+}
+
+static int marvell_nfc_erase_cmd_type_exec(struct nand_chip *chip,
+					   const struct nand_subop *subop)
+{
+	struct marvell_nfc_op nfc_op;
+	int ret;
+
+	marvell_nfc_parse_instructions(chip, subop, &nfc_op);
+	nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_ERASE);
+
+	ret = marvell_nfc_prepare_cmd(chip);
+	if (ret)
+		return ret;
+
+	marvell_nfc_send_cmd(chip, &nfc_op);
+	ret = marvell_nfc_wait_cmdd(chip);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.cle_ale_delay_ns);
+
+	ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
+	if (ret)
+		return ret;
+
+	cond_delay(nfc_op.rdy_delay_ns);
+
+	return 0;
+}
+
+static const struct nand_op_parser marvell_nfcv2_op_parser = NAND_OP_PARSER(
+	/* Monolithic reads/writes */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_monolithic_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(true, MAX_ADDRESS_CYC_NFCV2),
+		NAND_OP_PARSER_PAT_CMD_ELEM(true),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(true),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_monolithic_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2),
+		NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE),
+		NAND_OP_PARSER_PAT_CMD_ELEM(true),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(true)),
+	/* Naked commands */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_access_exec,
+		NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_waitrdy_exec,
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	);
+
+static const struct nand_op_parser marvell_nfcv1_op_parser = NAND_OP_PARSER(
+	/* Naked commands not supported, use a function for each pattern */
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_read_id_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 8)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_erase_cmd_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_read_status_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 1)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_reset_cmd_type_exec,
+		NAND_OP_PARSER_PAT_CMD_ELEM(false),
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	NAND_OP_PARSER_PATTERN(
+		marvell_nfc_naked_waitrdy_exec,
+		NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
+	);
+
+static int marvell_nfc_exec_op(struct nand_chip *chip,
+			       const struct nand_operation *op,
+			       bool check_only)
+{
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+
+	if (nfc->caps->is_nfcv2)
+		return nand_op_parser_exec_op(chip, &marvell_nfcv2_op_parser,
+					      op, check_only);
+	else
+		return nand_op_parser_exec_op(chip, &marvell_nfcv1_op_parser,
+					      op, check_only);
+}
+
+/*
+ * HW ECC layouts, identical to old pxa3xx_nand driver,
+ * to be fully backward compatible.
+ */
+static int marvell_nand_ooblayout_ecc(struct mtd_info *mtd, int section,
+				      struct mtd_oob_region *oobregion)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt;
+
+	if (section >= nchunks)
+		return -ERANGE;
+
+	oobregion->offset = ((lt->spare_bytes + lt->ecc_bytes) * section) +
+		lt->spare_bytes;
+	oobregion->length = lt->ecc_bytes;
+
+	return 0;
+}
+
+static int marvell_nand_ooblayout_free(struct mtd_info *mtd, int section,
+				       struct mtd_oob_region *oobregion)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
+	int nchunks = lt->full_chunk_cnt;
+
+	if (section >= nchunks)
+		return -ERANGE;
+
+	if (!lt->spare_bytes)
+		return 0;
+
+	oobregion->offset = section * (lt->spare_bytes + lt->ecc_bytes);
+	oobregion->length = lt->spare_bytes;
+	if (!section) {
+		/*
+		 * Bootrom looks in bytes 0 & 5 for bad blocks for the
+		 * 4KB page / 4bit BCH combination.
+		 */
+		if (mtd->writesize == 4096 && lt->data_bytes == 2048) {
+			oobregion->offset += 6;
+			oobregion->length -= 6;
+		} else {
+			oobregion->offset += 2;
+			oobregion->length -= 2;
+		}
+	}
+
+	return 0;
+}
+
+static const struct mtd_ooblayout_ops marvell_nand_ooblayout_ops = {
+	.ecc = marvell_nand_ooblayout_ecc,
+	.free = marvell_nand_ooblayout_free,
+};
+
+static int marvell_nand_hw_ecc_ctrl_init(struct mtd_info *mtd,
+					 struct nand_ecc_ctrl *ecc)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	const struct marvell_hw_ecc_layout *l;
+	int i;
+
+	if (!nfc->caps->is_nfcv2 &&
+	    (mtd->writesize + mtd->oobsize > MAX_CHUNK_SIZE)) {
+		dev_err(nfc->dev,
+			"NFCv1: writesize (%d) cannot be bigger than a chunk (%d)\n",
+			mtd->writesize, MAX_CHUNK_SIZE - mtd->oobsize);
+		return -ENOTSUPP;
+	}
+
+	to_marvell_nand(chip)->layout = NULL;
+	for (i = 0; i < ARRAY_SIZE(marvell_nfc_layouts); i++) {
+		l = &marvell_nfc_layouts[i];
+		if (mtd->writesize == l->writesize &&
+		    ecc->size == l->chunk && ecc->strength == l->strength) {
+			to_marvell_nand(chip)->layout = l;
+			break;
+		}
+	}
+
+	if (!to_marvell_nand(chip)->layout ||
+	    (!nfc->caps->is_nfcv2 && ecc->strength > 1)) {
+		dev_err(nfc->dev,
+			"ECC strength %d at page size %d is not supported\n",
+			ecc->strength, mtd->writesize);
+		return -ENOTSUPP;
+	}
+
+	mtd_set_ooblayout(mtd, &marvell_nand_ooblayout_ops);
+	ecc->steps = l->full_chunk_cnt + l->last_chunk_cnt;
+	ecc->size = l->data_bytes;
+
+	if (ecc->strength == 1) {
+		chip->ecc.algo = NAND_ECC_HAMMING;
+		ecc->read_page_raw = marvell_nfc_hw_ecc_hmg_read_page_raw;
+		ecc->read_page = marvell_nfc_hw_ecc_hmg_read_page;
+		ecc->read_oob_raw = marvell_nfc_hw_ecc_hmg_read_oob_raw;
+		ecc->read_oob = ecc->read_oob_raw;
+		ecc->write_page_raw = marvell_nfc_hw_ecc_hmg_write_page_raw;
+		ecc->write_page = marvell_nfc_hw_ecc_hmg_write_page;
+		ecc->write_oob_raw = marvell_nfc_hw_ecc_hmg_write_oob_raw;
+		ecc->write_oob = ecc->write_oob_raw;
+	} else {
+		chip->ecc.algo = NAND_ECC_BCH;
+		ecc->strength = 16;
+		ecc->read_page_raw = marvell_nfc_hw_ecc_bch_read_page_raw;
+		ecc->read_page = marvell_nfc_hw_ecc_bch_read_page;
+		ecc->read_oob_raw = marvell_nfc_hw_ecc_bch_read_oob_raw;
+		ecc->read_oob = marvell_nfc_hw_ecc_bch_read_oob;
+		ecc->write_page_raw = marvell_nfc_hw_ecc_bch_write_page_raw;
+		ecc->write_page = marvell_nfc_hw_ecc_bch_write_page;
+		ecc->write_oob_raw = marvell_nfc_hw_ecc_bch_write_oob_raw;
+		ecc->write_oob = marvell_nfc_hw_ecc_bch_write_oob;
+	}
+
+	return 0;
+}
+
+static int marvell_nand_ecc_init(struct mtd_info *mtd,
+				 struct nand_ecc_ctrl *ecc)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	int ret;
+
+	if ((ecc->mode != NAND_ECC_NONE) && (!ecc->size || !ecc->strength)) {
+		if (chip->ecc_step_ds && chip->ecc_strength_ds) {
+			ecc->size = chip->ecc_step_ds;
+			ecc->strength = chip->ecc_strength_ds;
+		} else {
+			dev_info(nfc->dev,
+				 "No minimum ECC strength, using 1b/512B\n");
+			ecc->size = 512;
+			ecc->strength = 1;
+		}
+	}
+
+	switch (ecc->mode) {
+	case NAND_ECC_HW:
+		ret = marvell_nand_hw_ecc_ctrl_init(mtd, ecc);
+		if (ret)
+			return ret;
+		break;
+	case NAND_ECC_NONE:
+		chip->ecc.algo = 0;
+	case NAND_ECC_SOFT:
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
+static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
+
+static struct nand_bbt_descr bbt_main_descr = {
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
+		   NAND_BBT_2BIT | NAND_BBT_VERSION,
+	.offs =	8,
+	.len = 6,
+	.veroffs = 14,
+	.maxblocks = 8,	/* Last 8 blocks in each chip */
+	.pattern = bbt_pattern
+};
+
+static struct nand_bbt_descr bbt_mirror_descr = {
+	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
+		   NAND_BBT_2BIT | NAND_BBT_VERSION,
+	.offs =	8,
+	.len = 6,
+	.veroffs = 14,
+	.maxblocks = 8,	/* Last 8 blocks in each chip */
+	.pattern = bbt_mirror_pattern
+};
+
+static int marvell_nfc_setup_data_interface(struct mtd_info *mtd, int chipnr,
+					    const struct nand_data_interface
+					    *conf)
+{
+	struct nand_chip *chip = mtd_to_nand(mtd);
+	struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
+	struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
+	unsigned int period_ns = 1000000000 / clk_get_rate(nfc->ecc_clk) * 2;
+	const struct nand_sdr_timings *sdr;
+	struct marvell_nfc_timings nfc_tmg;
+	int read_delay;
+
+	sdr = nand_get_sdr_timings(conf);
+	if (IS_ERR(sdr))
+		return PTR_ERR(sdr);
+
+	/*
+	 * SDR timings are given in pico-seconds while NFC timings must be
+	 * expressed in NAND controller clock cycles, which is half of the
+	 * frequency of the accessible ECC clock retrieved by clk_get_rate().
+	 * This is not written anywhere in the datasheet but was observed
+	 * with an oscilloscope.
+	 *
+	 * NFC datasheet gives equations from which thoses calculations
+	 * are derived, they tend to be slightly more restrictives than the
+	 * given core timings and may improve the overall speed.
+	 */
+	nfc_tmg.tRP = TO_CYCLES(DIV_ROUND_UP(sdr->tRC_min, 2), period_ns) - 1;
+	nfc_tmg.tRH = nfc_tmg.tRP;
+	nfc_tmg.tWP = TO_CYCLES(DIV_ROUND_UP(sdr->tWC_min, 2), period_ns) - 1;
+	nfc_tmg.tWH = nfc_tmg.tWP;
+	nfc_tmg.tCS = TO_CYCLES(sdr->tCS_min, period_ns);
+	nfc_tmg.tCH = TO_CYCLES(sdr->tCH_min, period_ns) - 1;
+	nfc_tmg.tADL = TO_CYCLES(sdr->tADL_min, period_ns);
+	/*
+	 * Read delay is the time of propagation from SoC pins to NFC internal
+	 * logic. With non-EDO timings, this is MIN_RD_DEL_CNT clock cycles. In
+	 * EDO mode, an additional delay of tRH must be taken into account so
+	 * the data is sampled on the falling edge instead of the rising edge.
+	 */
+	read_delay = sdr->tRC_min >= 30000 ?
+		MIN_RD_DEL_CNT : MIN_RD_DEL_CNT + nfc_tmg.tRH;
+
+	nfc_tmg.tAR = TO_CYCLES(sdr->tAR_min, period_ns);
+	/*
+	 * tWHR and tRHW are supposed to be read to write delays (and vice
+	 * versa) but in some cases, ie. when doing a change column, they must
+	 * be greater than that to be sure tCCS delay is respected.
+	 */
+	nfc_tmg.tWHR = TO_CYCLES(max_t(int, sdr->tWHR_min, sdr->tCCS_min),
+				 period_ns) - 2,
+	nfc_tmg.tRHW = TO_CYCLES(max_t(int, sdr->tRHW_min, sdr->tCCS_min),
+				 period_ns);
+
+	/* Use WAIT_MODE (wait for RB line) instead of only relying on delays */
+	nfc_tmg.tR = TO_CYCLES(sdr->tWB_max, period_ns);
+
+	if (chipnr < 0)
+		return 0;
+
+	marvell_nand->ndtr0 =
+		NDTR0_TRP(nfc_tmg.tRP) |
+		NDTR0_TRH(nfc_tmg.tRH) |
+		NDTR0_ETRP(nfc_tmg.tRP) |
+		NDTR0_TWP(nfc_tmg.tWP) |
+		NDTR0_TWH(nfc_tmg.tWH) |
+		NDTR0_TCS(nfc_tmg.tCS) |
+		NDTR0_TCH(nfc_tmg.tCH) |
+		NDTR0_RD_CNT_DEL(read_delay) |
+		NDTR0_SELCNTR |
+		NDTR0_TADL(nfc_tmg.tADL);
+
+	marvell_nand->ndtr1 =
+		NDTR1_TAR(nfc_tmg.tAR) |
+		NDTR1_TWHR(nfc_tmg.tWHR) |
+		NDTR1_TRHW(nfc_tmg.tRHW) |
+		NDTR1_WAIT_MODE |
+		NDTR1_TR(nfc_tmg.tR);
+
+	writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
+	writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
+
+	return 0;
+}
+
+static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
+				  struct device_node *np)
+{
+	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(dev);
+	struct marvell_nand_chip *marvell_nand;
+	struct mtd_info *mtd;
+	struct nand_chip *chip;
+	int nsels, ret, i;
+	u32 cs, rb;
+
+	/*
+	 * The legacy "num-cs" property indicates the number of CS on the only
+	 * chip connected to the controller (legacy bindings does not support
+	 * more than one chip). CS are only incremented one by one while the RB
+	 * pin is always the #0.
+	 *
+	 * When not using legacy bindings, a couple of "reg" and "marvell,rb"
+	 * properties must be filled. For each chip, expressed as a subnode,
+	 * "reg" points to the CS lines and "marvell,rb" to the RB line.
+	 */
+	if (pdata) {
+		nsels = 1;
+	} else if (nfc->caps->legacy_of_bindings) {
+		if (!of_get_property(np, "num-cs", &nsels)) {
+			dev_err(dev, "missing num-cs property\n");
+			return -EINVAL;
+		}
+	} else {
+		if (!of_get_property(np, "reg", &nsels)) {
+			dev_err(dev, "missing reg property\n");
+			return -EINVAL;
+		}
+	}
+
+	if (!pdata)
+		nsels /= sizeof(u32);
+	if (!nsels) {
+		dev_err(dev, "invalid reg property size\n");
+		return -EINVAL;
+	}
+
+	/* Alloc the nand chip structure */
+	marvell_nand = devm_kzalloc(dev, sizeof(*marvell_nand) +
+				    (nsels *
+				     sizeof(struct marvell_nand_chip_sel)),
+				    GFP_KERNEL);
+	if (!marvell_nand) {
+		dev_err(dev, "could not allocate chip structure\n");
+		return -ENOMEM;
+	}
+
+	marvell_nand->nsels = nsels;
+	marvell_nand->selected_die = -1;
+
+	for (i = 0; i < nsels; i++) {
+		if (pdata || nfc->caps->legacy_of_bindings) {
+			/*
+			 * Legacy bindings use the CS lines in natural
+			 * order (0, 1, ...)
+			 */
+			cs = i;
+		} else {
+			/* Retrieve CS id */
+			ret = of_property_read_u32_index(np, "reg", i, &cs);
+			if (ret) {
+				dev_err(dev, "could not retrieve reg property: %d\n",
+					ret);
+				return ret;
+			}
+		}
+
+		if (cs >= nfc->caps->max_cs_nb) {
+			dev_err(dev, "invalid reg value: %u (max CS = %d)\n",
+				cs, nfc->caps->max_cs_nb);
+			return -EINVAL;
+		}
+
+		if (test_and_set_bit(cs, &nfc->assigned_cs)) {
+			dev_err(dev, "CS %d already assigned\n", cs);
+			return -EINVAL;
+		}
+
+		/*
+		 * The cs variable represents the chip select id, which must be
+		 * converted in bit fields for NDCB0 and NDCB2 to select the
+		 * right chip. Unfortunately, due to a lack of information on
+		 * the subject and incoherent documentation, the user should not
+		 * use CS1 and CS3 at all as asserting them is not supported in
+		 * a reliable way (due to multiplexing inside ADDR5 field).
+		 */
+		marvell_nand->sels[i].cs = cs;
+		switch (cs) {
+		case 0:
+		case 2:
+			marvell_nand->sels[i].ndcb0_csel = 0;
+			break;
+		case 1:
+		case 3:
+			marvell_nand->sels[i].ndcb0_csel = NDCB0_CSEL;
+			break;
+		default:
+			return -EINVAL;
+		}
+
+		/* Retrieve RB id */
+		if (pdata || nfc->caps->legacy_of_bindings) {
+			/* Legacy bindings always use RB #0 */
+			rb = 0;
+		} else {
+			ret = of_property_read_u32_index(np, "marvell,rb", i,
+							 &rb);
+			if (ret) {
+				dev_err(dev,
+					"could not retrieve RB property: %d\n",
+					ret);
+				return ret;
+			}
+		}
+
+		if (rb >= nfc->caps->max_rb_nb) {
+			dev_err(dev, "invalid reg value: %u (max RB = %d)\n",
+				rb, nfc->caps->max_rb_nb);
+			return -EINVAL;
+		}
+
+		marvell_nand->sels[i].rb = rb;
+	}
+
+	chip = &marvell_nand->chip;
+	chip->controller = &nfc->controller;
+	nand_set_flash_node(chip, np);
+
+	chip->exec_op = marvell_nfc_exec_op;
+	chip->select_chip = marvell_nfc_select_chip;
+	if (nfc->caps->is_nfcv2 &&
+	    !of_property_read_bool(np, "marvell,nand-keep-config"))
+		chip->setup_data_interface = marvell_nfc_setup_data_interface;
+
+	mtd = nand_to_mtd(chip);
+	mtd->dev.parent = dev;
+
+	/*
+	 * Default to HW ECC engine mode. If the nand-ecc-mode property is given
+	 * in the DT node, this entry will be overwritten in nand_scan_ident().
+	 */
+	chip->ecc.mode = NAND_ECC_HW;
+
+	ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
+	if (ret) {
+		dev_err(dev, "could not identify the nand chip\n");
+		return ret;
+	}
+
+	if (pdata && pdata->flash_bbt)
+		chip->bbt_options |= NAND_BBT_USE_FLASH;
+
+	if (chip->bbt_options & NAND_BBT_USE_FLASH) {
+		/*
+		 * We'll use a bad block table stored in-flash and don't
+		 * allow writing the bad block marker to the flash.
+		 */
+		chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
+		chip->bbt_td = &bbt_main_descr;
+		chip->bbt_md = &bbt_mirror_descr;
+	}
+
+	/*
+	 * With RA_START bit set in NDCR, columns takes two address cycles. This
+	 * means addressing a chip with more than 256 pages needs a fifth
+	 * address cycle. Addressing a chip using CS 2 or 3 should also needs
+	 * this additional cycle but due to insistance in the documentation and
+	 * lack of hardware to test this situation, this case has been dropped
+	 * and is not supported by this driver.
+	 */
+	marvell_nand->addr_cyc = 4;
+	if (chip->options & NAND_ROW_ADDR_3)
+		marvell_nand->addr_cyc = 5;
+
+	if (pdata) {
+		chip->ecc.size = pdata->ecc_step_size;
+		chip->ecc.strength = pdata->ecc_strength;
+	}
+
+	ret = marvell_nand_ecc_init(mtd, &chip->ecc);
+	if (ret) {
+		dev_err(dev, "ECC init failed: %d\n", ret);
+		return ret;
+	}
+
+	if (chip->ecc.mode == NAND_ECC_HW) {
+		/*
+		 * Subpage write not available with hardware ECC, prohibit also
+		 * subpage read as in userspace subpage acces would still be
+		 * allowed and subpage write, if used, would lead to numerous
+		 * uncorrectable ECC errors.
+		 */
+		chip->options |= NAND_NO_SUBPAGE_WRITE;
+	}
+
+	if (pdata || nfc->caps->legacy_of_bindings) {
+		/*
+		 * We keep the MTD name unchanged to avoid breaking platforms
+		 * where the MTD cmdline parser is used and the bootloader
+		 * has not been updated to use the new naming scheme.
+		 */
+		mtd->name = "pxa3xx_nand-0";
+	} else if (!mtd->name) {
+		/*
+		 * If the new bindings are used and the bootloader has not been
+		 * updated to pass a new mtdparts parameter on the cmdline, you
+		 * should define the following property in your NAND node, ie:
+		 *
+		 *	label = "main-storage";
+		 *
+		 * This way, mtd->name will be set by the core when
+		 * nand_set_flash_node() is called.
+		 */
+		mtd->name = devm_kasprintf(nfc->dev, GFP_KERNEL,
+					   "%s:nand.%d", dev_name(nfc->dev),
+					   marvell_nand->sels[0].cs);
+		if (!mtd->name) {
+			dev_err(nfc->dev, "Failed to allocate mtd->name\n");
+			return -ENOMEM;
+		}
+	}
+
+	ret = nand_scan_tail(mtd);
+	if (ret) {
+		dev_err(dev, "nand_scan_tail failed: %d\n", ret);
+		return ret;
+	}
+
+	if (pdata)
+		/* Legacy bindings support only one chip */
+		ret = mtd_device_register(mtd, pdata->parts[0],
+					  pdata->nr_parts[0]);
+	else
+		ret = mtd_device_register(mtd, NULL, 0);
+	if (ret) {
+		dev_err(dev, "failed to register mtd device: %d\n", ret);
+		nand_release(mtd);
+		return ret;
+	}
+
+	list_add_tail(&marvell_nand->node, &nfc->chips);
+
+	return 0;
+}
+
+static int marvell_nand_chips_init(struct device *dev, struct marvell_nfc *nfc)
+{
+	struct device_node *np = dev->of_node;
+	struct device_node *nand_np;
+	int max_cs = nfc->caps->max_cs_nb;
+	int nchips;
+	int ret;
+
+	if (!np)
+		nchips = 1;
+	else
+		nchips = of_get_child_count(np);
+
+	if (nchips > max_cs) {
+		dev_err(dev, "too many NAND chips: %d (max = %d CS)\n", nchips,
+			max_cs);
+		return -EINVAL;
+	}
+
+	/*
+	 * Legacy bindings do not use child nodes to exhibit NAND chip
+	 * properties and layout. Instead, NAND properties are mixed with the
+	 * controller's and a single subnode presents the memory layout.
+	 */
+	if (nfc->caps->legacy_of_bindings) {
+		ret = marvell_nand_chip_init(dev, nfc, np);
+		return ret;
+	}
+
+	for_each_child_of_node(np, nand_np) {
+		ret = marvell_nand_chip_init(dev, nfc, nand_np);
+		if (ret) {
+			of_node_put(nand_np);
+			return ret;
+		}
+	}
+
+	return 0;
+}
+
+static void marvell_nand_chips_cleanup(struct marvell_nfc *nfc)
+{
+	struct marvell_nand_chip *entry, *temp;
+
+	list_for_each_entry_safe(entry, temp, &nfc->chips, node) {
+		nand_release(nand_to_mtd(&entry->chip));
+		list_del(&entry->node);
+	}
+}
+
+static int marvell_nfc_init_dma(struct marvell_nfc *nfc)
+{
+	struct platform_device *pdev = container_of(nfc->dev,
+						    struct platform_device,
+						    dev);
+	struct dma_slave_config config = {};
+	struct resource *r;
+	dma_cap_mask_t mask;
+	struct pxad_param param;
+	int ret;
+
+	if (!IS_ENABLED(CONFIG_PXA_DMA)) {
+		dev_warn(nfc->dev,
+			 "DMA not enabled in configuration\n");
+		return -ENOTSUPP;
+	}
+
+	ret = dma_set_mask_and_coherent(nfc->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
+
+	r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
+	if (!r) {
+		dev_err(nfc->dev, "No resource defined for data DMA\n");
+		return -ENXIO;
+	}
+
+	param.drcmr = r->start;
+	param.prio = PXAD_PRIO_LOWEST;
+	dma_cap_zero(mask);
+	dma_cap_set(DMA_SLAVE, mask);
+	nfc->dma_chan =
+		dma_request_slave_channel_compat(mask, pxad_filter_fn,
+						 &param, nfc->dev,
+						 "data");
+	if (!nfc->dma_chan) {
+		dev_err(nfc->dev,
+			"Unable to request data DMA channel\n");
+		return -ENODEV;
+	}
+
+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!r)
+		return -ENXIO;
+
+	config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
+	config.src_addr = r->start + NDDB;
+	config.dst_addr = r->start + NDDB;
+	config.src_maxburst = 32;
+	config.dst_maxburst = 32;
+	ret = dmaengine_slave_config(nfc->dma_chan, &config);
+	if (ret < 0) {
+		dev_err(nfc->dev, "Failed to configure DMA channel\n");
+		return ret;
+	}
+
+	/*
+	 * DMA must act on length multiple of 32 and this length may be
+	 * bigger than the destination buffer. Use this buffer instead
+	 * for DMA transfers and then copy the desired amount of data to
+	 * the provided buffer.
+	 */
+	nfc->dma_buf = kmalloc(MAX_CHUNK_SIZE, GFP_DMA);
+	if (!nfc->dma_buf)
+		return -ENOMEM;
+
+	nfc->use_dma = true;
+
+	return 0;
+}
+
+static int marvell_nfc_init(struct marvell_nfc *nfc)
+{
+	struct device_node *np = nfc->dev->of_node;
+
+	/*
+	 * Some SoCs like A7k/A8k need to enable manually the NAND
+	 * controller, gated clocks and reset bits to avoid being bootloader
+	 * dependent. This is done through the use of the System Functions
+	 * registers.
+	 */
+	if (nfc->caps->need_system_controller) {
+		struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
+			np, "marvell,system-controller");
+		u32 reg;
+
+		if (IS_ERR(sysctrl_base))
+			return PTR_ERR(sysctrl_base);
+
+		reg = GENCONF_SOC_DEVICE_MUX_NFC_EN |
+			GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST |
+			GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST |
+			GENCONF_SOC_DEVICE_MUX_NFC_INT_EN;
+		regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
+
+		regmap_read(sysctrl_base, GENCONF_CLK_GATING_CTRL, &reg);
+		reg |= GENCONF_CLK_GATING_CTRL_ND_GATE;
+		regmap_write(sysctrl_base, GENCONF_CLK_GATING_CTRL, reg);
+
+		regmap_read(sysctrl_base, GENCONF_ND_CLK_CTRL, &reg);
+		reg |= GENCONF_ND_CLK_CTRL_EN;
+		regmap_write(sysctrl_base, GENCONF_ND_CLK_CTRL, reg);
+	}
+
+	/* Configure the DMA if appropriate */
+	if (!nfc->caps->is_nfcv2)
+		marvell_nfc_init_dma(nfc);
+
+	/*
+	 * ECC operations and interruptions are only enabled when specifically
+	 * needed. ECC shall not be activated in the early stages (fails probe).
+	 * Arbiter flag, even if marked as "reserved", must be set (empirical).
+	 */
+	writel_relaxed(NDCR_RA_START | NDCR_ALL_INT | NDCR_ND_ARB_EN |
+		       (nfc->caps->is_nfcv2 ?
+			0 : NDCR_RD_ID_CNT(NFCV1_READID_LEN)),
+		       nfc->regs + NDCR);
+	writel_relaxed(0xFFFFFFFF, nfc->regs + NDSR);
+	writel_relaxed(0, nfc->regs + NDECCCTRL);
+
+	return 0;
+}
+
+static int marvell_nfc_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct resource *r;
+	struct marvell_nfc *nfc;
+	int ret;
+	int irq;
+
+	nfc = devm_kzalloc(&pdev->dev, sizeof(struct marvell_nfc),
+			   GFP_KERNEL);
+	if (!nfc)
+		return -ENOMEM;
+
+	nfc->dev = dev;
+	nand_hw_control_init(&nfc->controller);
+	INIT_LIST_HEAD(&nfc->chips);
+
+	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	nfc->regs = devm_ioremap_resource(dev, r);
+	if (IS_ERR(nfc->regs))
+		return PTR_ERR(nfc->regs);
+
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
+		dev_err(dev, "failed to retrieve irq\n");
+		return irq;
+	}
+
+	nfc->ecc_clk = devm_clk_get(&pdev->dev, NULL);
+	if (IS_ERR(nfc->ecc_clk))
+		return PTR_ERR(nfc->ecc_clk);
+
+	ret = clk_prepare_enable(nfc->ecc_clk);
+	if (ret)
+		return ret;
+
+	marvell_nfc_disable_int(nfc, NDCR_ALL_INT);
+	marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
+	ret = devm_request_irq(dev, irq, marvell_nfc_isr,
+			       0, "marvell-nfc", nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	/* Get NAND controller capabilities */
+	if (pdev->id_entry)
+		nfc->caps = (void *)pdev->id_entry->driver_data;
+	else
+		nfc->caps = of_device_get_match_data(&pdev->dev);
+
+	if (!nfc->caps) {
+		dev_err(dev, "Could not retrieve NFC caps\n");
+		ret = -EINVAL;
+		goto unprepare_clk;
+	}
+
+	/* Init the controller and then probe the chips */
+	ret = marvell_nfc_init(nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	platform_set_drvdata(pdev, nfc);
+
+	ret = marvell_nand_chips_init(dev, nfc);
+	if (ret)
+		goto unprepare_clk;
+
+	return 0;
+
+unprepare_clk:
+	clk_disable_unprepare(nfc->ecc_clk);
+
+	return ret;
+}
+
+static int marvell_nfc_remove(struct platform_device *pdev)
+{
+	struct marvell_nfc *nfc = platform_get_drvdata(pdev);
+
+	marvell_nand_chips_cleanup(nfc);
+
+	if (nfc->use_dma) {
+		dmaengine_terminate_all(nfc->dma_chan);
+		dma_release_channel(nfc->dma_chan);
+	}
+
+	clk_disable_unprepare(nfc->ecc_clk);
+
+	return 0;
+}
+
+static const struct marvell_nfc_caps marvell_armada_8k_nfc_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.need_system_controller = true,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada370_nfc_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_pxa3xx_nfc_caps = {
+	.max_cs_nb = 2,
+	.max_rb_nb = 1,
+	.use_dma = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada_8k_nfc_legacy_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.need_system_controller = true,
+	.legacy_of_bindings = true,
+	.is_nfcv2 = true,
+};
+
+static const struct marvell_nfc_caps marvell_armada370_nfc_legacy_caps = {
+	.max_cs_nb = 4,
+	.max_rb_nb = 2,
+	.legacy_of_bindings = true,
+};
+
+static const struct marvell_nfc_caps marvell_pxa3xx_nfc_legacy_caps = {
+	.max_cs_nb = 2,
+	.max_rb_nb = 1,
+	.legacy_of_bindings = true,
+};
+
+static const struct platform_device_id marvell_nfc_platform_ids[] = {
+	{
+		.name = "pxa3xx-nand",
+		.driver_data = (kernel_ulong_t)&marvell_pxa3xx_nfc_legacy_caps,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(platform, marvell_nfc_platform_ids);
+
+static const struct of_device_id marvell_nfc_of_ids[] = {
+	{
+		.compatible = "marvell,armada-8k-nand-controller",
+		.data = &marvell_armada_8k_nfc_caps,
+	},
+	{
+		.compatible = "marvell,armada370-nand-controller",
+		.data = &marvell_armada370_nfc_caps,
+	},
+	{
+		.compatible = "marvell,pxa3xx-nand-controller",
+		.data = &marvell_pxa3xx_nfc_caps,
+	},
+	/* Support for old/deprecated bindings: */
+	{
+		.compatible = "marvell,armada-8k-nand",
+		.data = &marvell_armada_8k_nfc_legacy_caps,
+	},
+	{
+		.compatible = "marvell,armada370-nand",
+		.data = &marvell_armada370_nfc_legacy_caps,
+	},
+	{
+		.compatible = "marvell,pxa3xx-nand",
+		.data = &marvell_pxa3xx_nfc_legacy_caps,
+	},
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, marvell_nfc_of_ids);
+
+static struct platform_driver marvell_nfc_driver = {
+	.driver	= {
+		.name		= "marvell-nfc",
+		.of_match_table = marvell_nfc_of_ids,
+	},
+	.id_table = marvell_nfc_platform_ids,
+	.probe = marvell_nfc_probe,
+	.remove	= marvell_nfc_remove,
+};
+module_platform_driver(marvell_nfc_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Marvell NAND controller driver");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 03/12] mtd: nand: replace pxa3xx_nand driver by its rework called marvell_nand
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Actually remove pxa3xx_nand.c to let marvell_nand.c be compiled instead.
Also change the defconfig files using it as well as some board files
depending on CONFIG_MTD_NAND_PXA3xx.

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm/configs/cm_x300_defconfig  |    2 +-
 arch/arm/configs/mvebu_v7_defconfig |    2 +-
 arch/arm/configs/pxa3xx_defconfig   |    3 +-
 arch/arm/configs/pxa_defconfig      |    2 +-
 arch/arm/configs/raumfeld_defconfig |    2 +-
 arch/arm/mach-mmp/ttc_dkb.c         |    4 +-
 arch/arm/mach-pxa/cm-x300.c         |    2 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c  |    2 +-
 arch/arm/mach-pxa/colibri.h         |    2 +-
 arch/arm/mach-pxa/littleton.c       |    4 +-
 arch/arm/mach-pxa/mxm8x10.c         |    4 +-
 arch/arm/mach-pxa/zylonite.c        |    4 +-
 drivers/mtd/nand/Makefile           |    1 -
 drivers/mtd/nand/pxa3xx_nand.c      | 2104 -----------------------------------
 14 files changed, 16 insertions(+), 2122 deletions(-)
 delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c

diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig
index c0418e03d180..5e349c625b71 100644
--- a/arch/arm/configs/cm_x300_defconfig
+++ b/arch/arm/configs/cm_x300_defconfig
@@ -49,7 +49,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_MTD=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index 69553704f2dc..4b6e4fd47e5d 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -57,7 +57,7 @@ CONFIG_MTD_CFI_STAA=y
 CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_SRAM=y
 CONFIG_MTD_UBI=y
diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig
index bfea6874b0a1..3e0de035ab77 100644
--- a/arch/arm/configs/pxa3xx_defconfig
+++ b/arch/arm/configs/pxa3xx_defconfig
@@ -32,8 +32,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_MTD=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
-CONFIG_MTD_NAND_PXA3xx_BUILTIN=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 CONFIG_MTD_ONENAND_GENERIC=y
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig
index 830e817a028a..934af8601f7d 100644
--- a/arch/arm/configs/pxa_defconfig
+++ b/arch/arm/configs/pxa_defconfig
@@ -198,7 +198,7 @@ CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x4000000
 CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=y
 CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
 CONFIG_MTD_NAND_SHARPSL=m
-CONFIG_MTD_NAND_PXA3xx=m
+CONFIG_MTD_NAND_MARVELL=m
 CONFIG_MTD_NAND_CM_X270=m
 CONFIG_MTD_NAND_TMIO=m
 CONFIG_MTD_NAND_BRCMNAND=m
diff --git a/arch/arm/configs/raumfeld_defconfig b/arch/arm/configs/raumfeld_defconfig
index 77a56c23c6ef..2dd56e9a484e 100644
--- a/arch/arm/configs/raumfeld_defconfig
+++ b/arch/arm/configs/raumfeld_defconfig
@@ -33,7 +33,7 @@ CONFIG_NFTL=y
 CONFIG_NFTL_RW=y
 CONFIG_MTD_BLOCK2MTD=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_ISL29003=y
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index d90c74fa614d..e0b6073c61a7 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -178,7 +178,7 @@ static struct mv_usb_platform_data ttc_usb_pdata = {
 #endif
 #endif
 
-#if IS_ENABLED(CONFIG_MTD_NAND_PXA3xx)
+#if IS_ENABLED(CONFIG_MTD_NAND_MARVELL)
 static struct pxa3xx_nand_platform_data dkb_nand_info = {
 	.enable_arbiter = 1,
 	.num_cs = 1,
@@ -275,7 +275,7 @@ static void __init ttc_dkb_init(void)
 
 	/* on-chip devices */
 	pxa910_add_uart(1);
-#if IS_ENABLED(CONFIG_MTD_NAND_PXA3xx)
+#if IS_ENABLED(CONFIG_MTD_NAND_MARVELL)
 	pxa910_add_nand(&dkb_nand_info);
 #endif
 
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 868448d2cd82..89326378dabf 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -391,7 +391,7 @@ static void __init cm_x300_init_ac97(void)
 static inline void cm_x300_init_ac97(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition cm_x300_nand_partitions[] = {
 	[0] = {
 		.name        = "OBM",
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index b04431bb4ba7..c9c36f707555 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -110,7 +110,7 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin)
 }
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition colibri_nand_partitions[] = {
 	{
 		.name        = "bootloader",
diff --git a/arch/arm/mach-pxa/colibri.h b/arch/arm/mach-pxa/colibri.h
index 673a131da875..d5ba74831916 100644
--- a/arch/arm/mach-pxa/colibri.h
+++ b/arch/arm/mach-pxa/colibri.h
@@ -46,7 +46,7 @@ static inline void colibri_pxa3xx_init_lcd(int bl_pin) {}
 extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data);
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 extern void colibri_pxa3xx_init_nand(void);
 #else
 static inline void colibri_pxa3xx_init_nand(void) {}
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index fae38fdc8d8e..898961be36db 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -290,7 +290,7 @@ static void __init littleton_init_mmc(void)
 static inline void littleton_init_mmc(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition littleton_nand_partitions[] = {
 	[0] = {
 		.name        = "Bootloader",
@@ -340,7 +340,7 @@ static void __init littleton_init_nand(void)
 }
 #else
 static inline void littleton_init_nand(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
 static struct led_info littleton_da9034_leds[] = {
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c
index 9a22ae0ad8c9..7d7aab20b70a 100644
--- a/arch/arm/mach-pxa/mxm8x10.c
+++ b/arch/arm/mach-pxa/mxm8x10.c
@@ -359,7 +359,7 @@ void __init mxm_8x10_ac97_init(void)
 }
 
 /* NAND flash Support */
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 #define NAND_BLOCK_SIZE SZ_128K
 #define NB(x)           (NAND_BLOCK_SIZE * (x))
 static struct mtd_partition mxm_8x10_nand_partitions[] = {
@@ -402,7 +402,7 @@ static void __init mxm_8x10_nand_init(void)
 }
 #else
 static inline void mxm_8x10_nand_init(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 /* Ethernet support: Davicom DM9000 */
 static struct resource dm9k_resources[] = {
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 4268552d600d..a4577118d518 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -338,7 +338,7 @@ static void __init zylonite_init_keypad(void)
 static inline void zylonite_init_keypad(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition zylonite_nand_partitions[] = {
 	[0] = {
 		.name        = "Bootloader",
@@ -388,7 +388,7 @@ static void __init zylonite_init_nand(void)
 }
 #else
 static inline void zylonite_init_nand(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
 static struct pxaohci_platform_data zylonite_ohci_info = {
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 921634ba400c..c882d5ef192a 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -31,7 +31,6 @@ omap2_nand-objs := omap2.o
 obj-$(CONFIG_MTD_NAND_OMAP2) 		+= omap2_nand.o
 obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)	+= omap_elm.o
 obj-$(CONFIG_MTD_NAND_CM_X270)		+= cmx270_nand.o
-obj-$(CONFIG_MTD_NAND_PXA3xx)		+= pxa3xx_nand.o
 obj-$(CONFIG_MTD_NAND_MARVELL)		+= marvell_nand.o
 obj-$(CONFIG_MTD_NAND_TMIO)		+= tmio_nand.o
 obj-$(CONFIG_MTD_NAND_PLATFORM)		+= plat_nand.o
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
deleted file mode 100644
index 021374fe59dc..000000000000
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ /dev/null
@@ -1,2104 +0,0 @@
-/*
- * drivers/mtd/nand/pxa3xx_nand.c
- *
- * Copyright © 2005 Intel Corporation
- * Copyright © 2006 Marvell International Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * See Documentation/mtd/nand/pxa3xx-nand.txt for more details.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/dmaengine.h>
-#include <linux/dma-mapping.h>
-#include <linux/dma/pxa-dma.h>
-#include <linux/delay.h>
-#include <linux/clk.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
-#include <linux/io.h>
-#include <linux/iopoll.h>
-#include <linux/irq.h>
-#include <linux/slab.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
-#include <linux/platform_data/mtd-nand-pxa3xx.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
-
-#define	CHIP_DELAY_TIMEOUT	msecs_to_jiffies(200)
-#define NAND_STOP_DELAY		msecs_to_jiffies(40)
-#define PAGE_CHUNK_SIZE		(2048)
-
-/*
- * Define a buffer size for the initial command that detects the flash device:
- * STATUS, READID and PARAM.
- * ONFI param page is 256 bytes, and there are three redundant copies
- * to be read. JEDEC param page is 512 bytes, and there are also three
- * redundant copies to be read.
- * Hence this buffer should be at least 512 x 3. Let's pick 2048.
- */
-#define INIT_BUFFER_SIZE	2048
-
-/* System control register and bit to enable NAND on some SoCs */
-#define GENCONF_SOC_DEVICE_MUX	0x208
-#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
-
-/* registers and bit definitions */
-#define NDCR		(0x00) /* Control register */
-#define NDTR0CS0	(0x04) /* Timing Parameter 0 for CS0 */
-#define NDTR1CS0	(0x0C) /* Timing Parameter 1 for CS0 */
-#define NDSR		(0x14) /* Status Register */
-#define NDPCR		(0x18) /* Page Count Register */
-#define NDBDR0		(0x1C) /* Bad Block Register 0 */
-#define NDBDR1		(0x20) /* Bad Block Register 1 */
-#define NDECCCTRL	(0x28) /* ECC control */
-#define NDDB		(0x40) /* Data Buffer */
-#define NDCB0		(0x48) /* Command Buffer0 */
-#define NDCB1		(0x4C) /* Command Buffer1 */
-#define NDCB2		(0x50) /* Command Buffer2 */
-
-#define NDCR_SPARE_EN		(0x1 << 31)
-#define NDCR_ECC_EN		(0x1 << 30)
-#define NDCR_DMA_EN		(0x1 << 29)
-#define NDCR_ND_RUN		(0x1 << 28)
-#define NDCR_DWIDTH_C		(0x1 << 27)
-#define NDCR_DWIDTH_M		(0x1 << 26)
-#define NDCR_PAGE_SZ		(0x1 << 24)
-#define NDCR_NCSX		(0x1 << 23)
-#define NDCR_ND_MODE		(0x3 << 21)
-#define NDCR_NAND_MODE   	(0x0)
-#define NDCR_CLR_PG_CNT		(0x1 << 20)
-#define NFCV1_NDCR_ARB_CNTL	(0x1 << 19)
-#define NFCV2_NDCR_STOP_ON_UNCOR	(0x1 << 19)
-#define NDCR_RD_ID_CNT_MASK	(0x7 << 16)
-#define NDCR_RD_ID_CNT(x)	(((x) << 16) & NDCR_RD_ID_CNT_MASK)
-
-#define NDCR_RA_START		(0x1 << 15)
-#define NDCR_PG_PER_BLK		(0x1 << 14)
-#define NDCR_ND_ARB_EN		(0x1 << 12)
-#define NDCR_INT_MASK           (0xFFF)
-
-#define NDSR_MASK		(0xfff)
-#define NDSR_ERR_CNT_OFF	(16)
-#define NDSR_ERR_CNT_MASK       (0x1f)
-#define NDSR_ERR_CNT(sr)	((sr >> NDSR_ERR_CNT_OFF) & NDSR_ERR_CNT_MASK)
-#define NDSR_RDY                (0x1 << 12)
-#define NDSR_FLASH_RDY          (0x1 << 11)
-#define NDSR_CS0_PAGED		(0x1 << 10)
-#define NDSR_CS1_PAGED		(0x1 << 9)
-#define NDSR_CS0_CMDD		(0x1 << 8)
-#define NDSR_CS1_CMDD		(0x1 << 7)
-#define NDSR_CS0_BBD		(0x1 << 6)
-#define NDSR_CS1_BBD		(0x1 << 5)
-#define NDSR_UNCORERR		(0x1 << 4)
-#define NDSR_CORERR		(0x1 << 3)
-#define NDSR_WRDREQ		(0x1 << 2)
-#define NDSR_RDDREQ		(0x1 << 1)
-#define NDSR_WRCMDREQ		(0x1)
-
-#define NDCB0_LEN_OVRD		(0x1 << 28)
-#define NDCB0_ST_ROW_EN         (0x1 << 26)
-#define NDCB0_AUTO_RS		(0x1 << 25)
-#define NDCB0_CSEL		(0x1 << 24)
-#define NDCB0_EXT_CMD_TYPE_MASK	(0x7 << 29)
-#define NDCB0_EXT_CMD_TYPE(x)	(((x) << 29) & NDCB0_EXT_CMD_TYPE_MASK)
-#define NDCB0_CMD_TYPE_MASK	(0x7 << 21)
-#define NDCB0_CMD_TYPE(x)	(((x) << 21) & NDCB0_CMD_TYPE_MASK)
-#define NDCB0_NC		(0x1 << 20)
-#define NDCB0_DBC		(0x1 << 19)
-#define NDCB0_ADDR_CYC_MASK	(0x7 << 16)
-#define NDCB0_ADDR_CYC(x)	(((x) << 16) & NDCB0_ADDR_CYC_MASK)
-#define NDCB0_CMD2_MASK		(0xff << 8)
-#define NDCB0_CMD1_MASK		(0xff)
-#define NDCB0_ADDR_CYC_SHIFT	(16)
-
-#define EXT_CMD_TYPE_DISPATCH	6 /* Command dispatch */
-#define EXT_CMD_TYPE_NAKED_RW	5 /* Naked read or Naked write */
-#define EXT_CMD_TYPE_READ	4 /* Read */
-#define EXT_CMD_TYPE_DISP_WR	4 /* Command dispatch with write */
-#define EXT_CMD_TYPE_FINAL	3 /* Final command */
-#define EXT_CMD_TYPE_LAST_RW	1 /* Last naked read/write */
-#define EXT_CMD_TYPE_MONO	0 /* Monolithic read/write */
-
-/*
- * This should be large enough to read 'ONFI' and 'JEDEC'.
- * Let's use 7 bytes, which is the maximum ID count supported
- * by the controller (see NDCR_RD_ID_CNT_MASK).
- */
-#define READ_ID_BYTES		7
-
-/* macros for registers read/write */
-#define nand_writel(info, off, val)					\
-	do {								\
-		dev_vdbg(&info->pdev->dev,				\
-			 "%s():%d nand_writel(0x%x, 0x%04x)\n",		\
-			 __func__, __LINE__, (val), (off));		\
-		writel_relaxed((val), (info)->mmio_base + (off));	\
-	} while (0)
-
-#define nand_readl(info, off)						\
-	({								\
-		unsigned int _v;					\
-		_v = readl_relaxed((info)->mmio_base + (off));		\
-		dev_vdbg(&info->pdev->dev,				\
-			 "%s():%d nand_readl(0x%04x) = 0x%x\n",		\
-			 __func__, __LINE__, (off), _v);		\
-		_v;							\
-	})
-
-/* error code and state */
-enum {
-	ERR_NONE	= 0,
-	ERR_DMABUSERR	= -1,
-	ERR_SENDCMD	= -2,
-	ERR_UNCORERR	= -3,
-	ERR_BBERR	= -4,
-	ERR_CORERR	= -5,
-};
-
-enum {
-	STATE_IDLE = 0,
-	STATE_PREPARED,
-	STATE_CMD_HANDLE,
-	STATE_DMA_READING,
-	STATE_DMA_WRITING,
-	STATE_DMA_DONE,
-	STATE_PIO_READING,
-	STATE_PIO_WRITING,
-	STATE_CMD_DONE,
-	STATE_READY,
-};
-
-enum pxa3xx_nand_variant {
-	PXA3XX_NAND_VARIANT_PXA,
-	PXA3XX_NAND_VARIANT_ARMADA370,
-	PXA3XX_NAND_VARIANT_ARMADA_8K,
-};
-
-struct pxa3xx_nand_host {
-	struct nand_chip	chip;
-	void			*info_data;
-
-	/* page size of attached chip */
-	int			use_ecc;
-	int			cs;
-
-	/* calculated from pxa3xx_nand_flash data */
-	unsigned int		col_addr_cycles;
-	unsigned int		row_addr_cycles;
-};
-
-struct pxa3xx_nand_info {
-	struct nand_hw_control	controller;
-	struct platform_device	 *pdev;
-
-	struct clk		*clk;
-	void __iomem		*mmio_base;
-	unsigned long		mmio_phys;
-	struct completion	cmd_complete, dev_ready;
-
-	unsigned int 		buf_start;
-	unsigned int		buf_count;
-	unsigned int		buf_size;
-	unsigned int		data_buff_pos;
-	unsigned int		oob_buff_pos;
-
-	/* DMA information */
-	struct scatterlist	sg;
-	enum dma_data_direction	dma_dir;
-	struct dma_chan		*dma_chan;
-	dma_cookie_t		dma_cookie;
-	int			drcmr_dat;
-
-	unsigned char		*data_buff;
-	unsigned char		*oob_buff;
-	dma_addr_t 		data_buff_phys;
-	int 			data_dma_ch;
-
-	struct pxa3xx_nand_host *host[NUM_CHIP_SELECT];
-	unsigned int		state;
-
-	/*
-	 * This driver supports NFCv1 (as found in PXA SoC)
-	 * and NFCv2 (as found in Armada 370/XP SoC).
-	 */
-	enum pxa3xx_nand_variant variant;
-
-	int			cs;
-	int			use_ecc;	/* use HW ECC ? */
-	int			ecc_bch;	/* using BCH ECC? */
-	int			use_dma;	/* use DMA ? */
-	int			use_spare;	/* use spare ? */
-	int			need_wait;
-
-	/* Amount of real data per full chunk */
-	unsigned int		chunk_size;
-
-	/* Amount of spare data per full chunk */
-	unsigned int		spare_size;
-
-	/* Number of full chunks (i.e chunk_size + spare_size) */
-	unsigned int            nfullchunks;
-
-	/*
-	 * Total number of chunks. If equal to nfullchunks, then there
-	 * are only full chunks. Otherwise, there is one last chunk of
-	 * size (last_chunk_size + last_spare_size)
-	 */
-	unsigned int            ntotalchunks;
-
-	/* Amount of real data in the last chunk */
-	unsigned int		last_chunk_size;
-
-	/* Amount of spare data in the last chunk */
-	unsigned int		last_spare_size;
-
-	unsigned int		ecc_size;
-	unsigned int		ecc_err_cnt;
-	unsigned int		max_bitflips;
-	int 			retcode;
-
-	/*
-	 * Variables only valid during command
-	 * execution. step_chunk_size and step_spare_size is the
-	 * amount of real data and spare data in the current
-	 * chunk. cur_chunk is the current chunk being
-	 * read/programmed.
-	 */
-	unsigned int		step_chunk_size;
-	unsigned int		step_spare_size;
-	unsigned int            cur_chunk;
-
-	/* cached register value */
-	uint32_t		reg_ndcr;
-	uint32_t		ndtr0cs0;
-	uint32_t		ndtr1cs0;
-
-	/* generated NDCBx register values */
-	uint32_t		ndcb0;
-	uint32_t		ndcb1;
-	uint32_t		ndcb2;
-	uint32_t		ndcb3;
-};
-
-static bool use_dma = 1;
-module_param(use_dma, bool, 0444);
-MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW");
-
-struct pxa3xx_nand_timing {
-	unsigned int	tCH;  /* Enable signal hold time */
-	unsigned int	tCS;  /* Enable signal setup time */
-	unsigned int	tWH;  /* ND_nWE high duration */
-	unsigned int	tWP;  /* ND_nWE pulse time */
-	unsigned int	tRH;  /* ND_nRE high duration */
-	unsigned int	tRP;  /* ND_nRE pulse width */
-	unsigned int	tR;   /* ND_nWE high to ND_nRE low for read */
-	unsigned int	tWHR; /* ND_nWE high to ND_nRE low for status read */
-	unsigned int	tAR;  /* ND_ALE low to ND_nRE low delay */
-};
-
-struct pxa3xx_nand_flash {
-	uint32_t	chip_id;
-	unsigned int	flash_width;	/* Width of Flash memory (DWIDTH_M) */
-	unsigned int	dfc_width;	/* Width of flash controller(DWIDTH_C) */
-	struct pxa3xx_nand_timing *timing;	/* NAND Flash timing */
-};
-
-static struct pxa3xx_nand_timing timing[] = {
-	{ 40, 80, 60, 100, 80, 100, 90000, 400, 40, },
-	{ 10,  0, 20,  40, 30,  40, 11123, 110, 10, },
-	{ 10, 25, 15,  25, 15,  30, 25000,  60, 10, },
-	{ 10, 35, 15,  25, 15,  25, 25000,  60, 10, },
-};
-
-static struct pxa3xx_nand_flash builtin_flash_types[] = {
-	{ 0x46ec, 16, 16, &timing[1] },
-	{ 0xdaec,  8,  8, &timing[1] },
-	{ 0xd7ec,  8,  8, &timing[1] },
-	{ 0xa12c,  8,  8, &timing[2] },
-	{ 0xb12c, 16, 16, &timing[2] },
-	{ 0xdc2c,  8,  8, &timing[2] },
-	{ 0xcc2c, 16, 16, &timing[2] },
-	{ 0xba20, 16, 16, &timing[3] },
-};
-
-static int pxa3xx_ooblayout_ecc(struct mtd_info *mtd, int section,
-				struct mtd_oob_region *oobregion)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int nchunks = mtd->writesize / info->chunk_size;
-
-	if (section >= nchunks)
-		return -ERANGE;
-
-	oobregion->offset = ((info->ecc_size + info->spare_size) * section) +
-			    info->spare_size;
-	oobregion->length = info->ecc_size;
-
-	return 0;
-}
-
-static int pxa3xx_ooblayout_free(struct mtd_info *mtd, int section,
-				 struct mtd_oob_region *oobregion)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int nchunks = mtd->writesize / info->chunk_size;
-
-	if (section >= nchunks)
-		return -ERANGE;
-
-	if (!info->spare_size)
-		return 0;
-
-	oobregion->offset = section * (info->ecc_size + info->spare_size);
-	oobregion->length = info->spare_size;
-	if (!section) {
-		/*
-		 * Bootrom looks in bytes 0 & 5 for bad blocks for the
-		 * 4KB page / 4bit BCH combination.
-		 */
-		if (mtd->writesize == 4096 && info->chunk_size == 2048) {
-			oobregion->offset += 6;
-			oobregion->length -= 6;
-		} else {
-			oobregion->offset += 2;
-			oobregion->length -= 2;
-		}
-	}
-
-	return 0;
-}
-
-static const struct mtd_ooblayout_ops pxa3xx_ooblayout_ops = {
-	.ecc = pxa3xx_ooblayout_ecc,
-	.free = pxa3xx_ooblayout_free,
-};
-
-static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
-static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
-
-static struct nand_bbt_descr bbt_main_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
-		| NAND_BBT_2BIT | NAND_BBT_VERSION,
-	.offs =	8,
-	.len = 6,
-	.veroffs = 14,
-	.maxblocks = 8,		/* Last 8 blocks in each chip */
-	.pattern = bbt_pattern
-};
-
-static struct nand_bbt_descr bbt_mirror_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
-		| NAND_BBT_2BIT | NAND_BBT_VERSION,
-	.offs =	8,
-	.len = 6,
-	.veroffs = 14,
-	.maxblocks = 8,		/* Last 8 blocks in each chip */
-	.pattern = bbt_mirror_pattern
-};
-
-#define NDTR0_tCH(c)	(min((c), 7) << 19)
-#define NDTR0_tCS(c)	(min((c), 7) << 16)
-#define NDTR0_tWH(c)	(min((c), 7) << 11)
-#define NDTR0_tWP(c)	(min((c), 7) << 8)
-#define NDTR0_tRH(c)	(min((c), 7) << 3)
-#define NDTR0_tRP(c)	(min((c), 7) << 0)
-
-#define NDTR1_tR(c)	(min((c), 65535) << 16)
-#define NDTR1_tWHR(c)	(min((c), 15) << 4)
-#define NDTR1_tAR(c)	(min((c), 15) << 0)
-
-/* convert nano-seconds to nand flash controller clock cycles */
-#define ns2cycle(ns, clk)	(int)((ns) * (clk / 1000000) / 1000)
-
-static const struct of_device_id pxa3xx_nand_dt_ids[] = {
-	{
-		.compatible = "marvell,pxa3xx-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_PXA,
-	},
-	{
-		.compatible = "marvell,armada370-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_ARMADA370,
-	},
-	{
-		.compatible = "marvell,armada-8k-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_ARMADA_8K,
-	},
-	{}
-};
-MODULE_DEVICE_TABLE(of, pxa3xx_nand_dt_ids);
-
-static enum pxa3xx_nand_variant
-pxa3xx_nand_get_variant(struct platform_device *pdev)
-{
-	const struct of_device_id *of_id =
-			of_match_device(pxa3xx_nand_dt_ids, &pdev->dev);
-	if (!of_id)
-		return PXA3XX_NAND_VARIANT_PXA;
-	return (enum pxa3xx_nand_variant)of_id->data;
-}
-
-static void pxa3xx_nand_set_timing(struct pxa3xx_nand_host *host,
-				   const struct pxa3xx_nand_timing *t)
-{
-	struct pxa3xx_nand_info *info = host->info_data;
-	unsigned long nand_clk = clk_get_rate(info->clk);
-	uint32_t ndtr0, ndtr1;
-
-	ndtr0 = NDTR0_tCH(ns2cycle(t->tCH, nand_clk)) |
-		NDTR0_tCS(ns2cycle(t->tCS, nand_clk)) |
-		NDTR0_tWH(ns2cycle(t->tWH, nand_clk)) |
-		NDTR0_tWP(ns2cycle(t->tWP, nand_clk)) |
-		NDTR0_tRH(ns2cycle(t->tRH, nand_clk)) |
-		NDTR0_tRP(ns2cycle(t->tRP, nand_clk));
-
-	ndtr1 = NDTR1_tR(ns2cycle(t->tR, nand_clk)) |
-		NDTR1_tWHR(ns2cycle(t->tWHR, nand_clk)) |
-		NDTR1_tAR(ns2cycle(t->tAR, nand_clk));
-
-	info->ndtr0cs0 = ndtr0;
-	info->ndtr1cs0 = ndtr1;
-	nand_writel(info, NDTR0CS0, ndtr0);
-	nand_writel(info, NDTR1CS0, ndtr1);
-}
-
-static void pxa3xx_nand_set_sdr_timing(struct pxa3xx_nand_host *host,
-				       const struct nand_sdr_timings *t)
-{
-	struct pxa3xx_nand_info *info = host->info_data;
-	struct nand_chip *chip = &host->chip;
-	unsigned long nand_clk = clk_get_rate(info->clk);
-	uint32_t ndtr0, ndtr1;
-
-	u32 tCH_min = DIV_ROUND_UP(t->tCH_min, 1000);
-	u32 tCS_min = DIV_ROUND_UP(t->tCS_min, 1000);
-	u32 tWH_min = DIV_ROUND_UP(t->tWH_min, 1000);
-	u32 tWP_min = DIV_ROUND_UP(t->tWC_min - t->tWH_min, 1000);
-	u32 tREH_min = DIV_ROUND_UP(t->tREH_min, 1000);
-	u32 tRP_min = DIV_ROUND_UP(t->tRC_min - t->tREH_min, 1000);
-	u32 tR = chip->chip_delay * 1000;
-	u32 tWHR_min = DIV_ROUND_UP(t->tWHR_min, 1000);
-	u32 tAR_min = DIV_ROUND_UP(t->tAR_min, 1000);
-
-	/* fallback to a default value if tR = 0 */
-	if (!tR)
-		tR = 20000;
-
-	ndtr0 = NDTR0_tCH(ns2cycle(tCH_min, nand_clk)) |
-		NDTR0_tCS(ns2cycle(tCS_min, nand_clk)) |
-		NDTR0_tWH(ns2cycle(tWH_min, nand_clk)) |
-		NDTR0_tWP(ns2cycle(tWP_min, nand_clk)) |
-		NDTR0_tRH(ns2cycle(tREH_min, nand_clk)) |
-		NDTR0_tRP(ns2cycle(tRP_min, nand_clk));
-
-	ndtr1 = NDTR1_tR(ns2cycle(tR, nand_clk)) |
-		NDTR1_tWHR(ns2cycle(tWHR_min, nand_clk)) |
-		NDTR1_tAR(ns2cycle(tAR_min, nand_clk));
-
-	info->ndtr0cs0 = ndtr0;
-	info->ndtr1cs0 = ndtr1;
-	nand_writel(info, NDTR0CS0, ndtr0);
-	nand_writel(info, NDTR1CS0, ndtr1);
-}
-
-static int pxa3xx_nand_init_timings_compat(struct pxa3xx_nand_host *host,
-					   unsigned int *flash_width,
-					   unsigned int *dfc_width)
-{
-	struct nand_chip *chip = &host->chip;
-	struct pxa3xx_nand_info *info = host->info_data;
-	const struct pxa3xx_nand_flash *f = NULL;
-	int i, id, ntypes;
-	u8 idbuf[2];
-
-	ntypes = ARRAY_SIZE(builtin_flash_types);
-
-	nand_readid_op(chip, 0, idbuf, sizeof(idbuf));
-	id = idbuf[0] | (idbuf[1] << 8);
-
-	for (i = 0; i < ntypes; i++) {
-		f = &builtin_flash_types[i];
-
-		if (f->chip_id == id)
-			break;
-	}
-
-	if (i == ntypes) {
-		dev_err(&info->pdev->dev, "Error: timings not found\n");
-		return -EINVAL;
-	}
-
-	pxa3xx_nand_set_timing(host, f->timing);
-
-	*flash_width = f->flash_width;
-	*dfc_width = f->dfc_width;
-
-	return 0;
-}
-
-static int pxa3xx_nand_init_timings_onfi(struct pxa3xx_nand_host *host,
-					 int mode)
-{
-	const struct nand_sdr_timings *timings;
-
-	mode = fls(mode) - 1;
-	if (mode < 0)
-		mode = 0;
-
-	timings = onfi_async_timing_mode_to_sdr_timings(mode);
-	if (IS_ERR(timings))
-		return PTR_ERR(timings);
-
-	pxa3xx_nand_set_sdr_timing(host, timings);
-
-	return 0;
-}
-
-static int pxa3xx_nand_init(struct pxa3xx_nand_host *host)
-{
-	struct nand_chip *chip = &host->chip;
-	struct pxa3xx_nand_info *info = host->info_data;
-	unsigned int flash_width = 0, dfc_width = 0;
-	int mode, err;
-
-	mode = onfi_get_async_timing_mode(chip);
-	if (mode == ONFI_TIMING_MODE_UNKNOWN) {
-		err = pxa3xx_nand_init_timings_compat(host, &flash_width,
-						      &dfc_width);
-		if (err)
-			return err;
-
-		if (flash_width == 16) {
-			info->reg_ndcr |= NDCR_DWIDTH_M;
-			chip->options |= NAND_BUSWIDTH_16;
-		}
-
-		info->reg_ndcr |= (dfc_width == 16) ? NDCR_DWIDTH_C : 0;
-	} else {
-		err = pxa3xx_nand_init_timings_onfi(host, mode);
-		if (err)
-			return err;
-	}
-
-	return 0;
-}
-
-/**
- * NOTE: it is a must to set ND_RUN firstly, then write
- * command buffer, otherwise, it does not work.
- * We enable all the interrupt at the same time, and
- * let pxa3xx_nand_irq to handle all logic.
- */
-static void pxa3xx_nand_start(struct pxa3xx_nand_info *info)
-{
-	uint32_t ndcr;
-
-	ndcr = info->reg_ndcr;
-
-	if (info->use_ecc) {
-		ndcr |= NDCR_ECC_EN;
-		if (info->ecc_bch)
-			nand_writel(info, NDECCCTRL, 0x1);
-	} else {
-		ndcr &= ~NDCR_ECC_EN;
-		if (info->ecc_bch)
-			nand_writel(info, NDECCCTRL, 0x0);
-	}
-
-	if (info->use_dma)
-		ndcr |= NDCR_DMA_EN;
-	else
-		ndcr &= ~NDCR_DMA_EN;
-
-	if (info->use_spare)
-		ndcr |= NDCR_SPARE_EN;
-	else
-		ndcr &= ~NDCR_SPARE_EN;
-
-	ndcr |= NDCR_ND_RUN;
-
-	/* clear status bits and run */
-	nand_writel(info, NDSR, NDSR_MASK);
-	nand_writel(info, NDCR, 0);
-	nand_writel(info, NDCR, ndcr);
-}
-
-static void pxa3xx_nand_stop(struct pxa3xx_nand_info *info)
-{
-	uint32_t ndcr;
-	int timeout = NAND_STOP_DELAY;
-
-	/* wait RUN bit in NDCR become 0 */
-	ndcr = nand_readl(info, NDCR);
-	while ((ndcr & NDCR_ND_RUN) && (timeout-- > 0)) {
-		ndcr = nand_readl(info, NDCR);
-		udelay(1);
-	}
-
-	if (timeout <= 0) {
-		ndcr &= ~NDCR_ND_RUN;
-		nand_writel(info, NDCR, ndcr);
-	}
-	if (info->dma_chan)
-		dmaengine_terminate_all(info->dma_chan);
-
-	/* clear status bits */
-	nand_writel(info, NDSR, NDSR_MASK);
-}
-
-static void __maybe_unused
-enable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
-{
-	uint32_t ndcr;
-
-	ndcr = nand_readl(info, NDCR);
-	nand_writel(info, NDCR, ndcr & ~int_mask);
-}
-
-static void disable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
-{
-	uint32_t ndcr;
-
-	ndcr = nand_readl(info, NDCR);
-	nand_writel(info, NDCR, ndcr | int_mask);
-}
-
-static void drain_fifo(struct pxa3xx_nand_info *info, void *data, int len)
-{
-	if (info->ecc_bch) {
-		u32 val;
-		int ret;
-
-		/*
-		 * According to the datasheet, when reading from NDDB
-		 * with BCH enabled, after each 32 bytes reads, we
-		 * have to make sure that the NDSR.RDDREQ bit is set.
-		 *
-		 * Drain the FIFO 8 32 bits reads at a time, and skip
-		 * the polling on the last read.
-		 */
-		while (len > 8) {
-			ioread32_rep(info->mmio_base + NDDB, data, 8);
-
-			ret = readl_relaxed_poll_timeout(info->mmio_base + NDSR, val,
-							 val & NDSR_RDDREQ, 1000, 5000);
-			if (ret) {
-				dev_err(&info->pdev->dev,
-					"Timeout on RDDREQ while draining the FIFO\n");
-				return;
-			}
-
-			data += 32;
-			len -= 8;
-		}
-	}
-
-	ioread32_rep(info->mmio_base + NDDB, data, len);
-}
-
-static void handle_data_pio(struct pxa3xx_nand_info *info)
-{
-	switch (info->state) {
-	case STATE_PIO_WRITING:
-		if (info->step_chunk_size)
-			writesl(info->mmio_base + NDDB,
-				info->data_buff + info->data_buff_pos,
-				DIV_ROUND_UP(info->step_chunk_size, 4));
-
-		if (info->step_spare_size)
-			writesl(info->mmio_base + NDDB,
-				info->oob_buff + info->oob_buff_pos,
-				DIV_ROUND_UP(info->step_spare_size, 4));
-		break;
-	case STATE_PIO_READING:
-		if (info->step_chunk_size)
-			drain_fifo(info,
-				   info->data_buff + info->data_buff_pos,
-				   DIV_ROUND_UP(info->step_chunk_size, 4));
-
-		if (info->step_spare_size)
-			drain_fifo(info,
-				   info->oob_buff + info->oob_buff_pos,
-				   DIV_ROUND_UP(info->step_spare_size, 4));
-		break;
-	default:
-		dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
-				info->state);
-		BUG();
-	}
-
-	/* Update buffer pointers for multi-page read/write */
-	info->data_buff_pos += info->step_chunk_size;
-	info->oob_buff_pos += info->step_spare_size;
-}
-
-static void pxa3xx_nand_data_dma_irq(void *data)
-{
-	struct pxa3xx_nand_info *info = data;
-	struct dma_tx_state state;
-	enum dma_status status;
-
-	status = dmaengine_tx_status(info->dma_chan, info->dma_cookie, &state);
-	if (likely(status == DMA_COMPLETE)) {
-		info->state = STATE_DMA_DONE;
-	} else {
-		dev_err(&info->pdev->dev, "DMA error on data channel\n");
-		info->retcode = ERR_DMABUSERR;
-	}
-	dma_unmap_sg(info->dma_chan->device->dev, &info->sg, 1, info->dma_dir);
-
-	nand_writel(info, NDSR, NDSR_WRDREQ | NDSR_RDDREQ);
-	enable_int(info, NDCR_INT_MASK);
-}
-
-static void start_data_dma(struct pxa3xx_nand_info *info)
-{
-	enum dma_transfer_direction direction;
-	struct dma_async_tx_descriptor *tx;
-
-	switch (info->state) {
-	case STATE_DMA_WRITING:
-		info->dma_dir = DMA_TO_DEVICE;
-		direction = DMA_MEM_TO_DEV;
-		break;
-	case STATE_DMA_READING:
-		info->dma_dir = DMA_FROM_DEVICE;
-		direction = DMA_DEV_TO_MEM;
-		break;
-	default:
-		dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
-				info->state);
-		BUG();
-	}
-	info->sg.length = info->chunk_size;
-	if (info->use_spare)
-		info->sg.length += info->spare_size + info->ecc_size;
-	dma_map_sg(info->dma_chan->device->dev, &info->sg, 1, info->dma_dir);
-
-	tx = dmaengine_prep_slave_sg(info->dma_chan, &info->sg, 1, direction,
-				     DMA_PREP_INTERRUPT);
-	if (!tx) {
-		dev_err(&info->pdev->dev, "prep_slave_sg() failed\n");
-		return;
-	}
-	tx->callback = pxa3xx_nand_data_dma_irq;
-	tx->callback_param = info;
-	info->dma_cookie = dmaengine_submit(tx);
-	dma_async_issue_pending(info->dma_chan);
-	dev_dbg(&info->pdev->dev, "%s(dir=%d cookie=%x size=%u)\n",
-		__func__, direction, info->dma_cookie, info->sg.length);
-}
-
-static irqreturn_t pxa3xx_nand_irq_thread(int irq, void *data)
-{
-	struct pxa3xx_nand_info *info = data;
-
-	handle_data_pio(info);
-
-	info->state = STATE_CMD_DONE;
-	nand_writel(info, NDSR, NDSR_WRDREQ | NDSR_RDDREQ);
-
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t pxa3xx_nand_irq(int irq, void *devid)
-{
-	struct pxa3xx_nand_info *info = devid;
-	unsigned int status, is_completed = 0, is_ready = 0;
-	unsigned int ready, cmd_done;
-	irqreturn_t ret = IRQ_HANDLED;
-
-	if (info->cs == 0) {
-		ready           = NDSR_FLASH_RDY;
-		cmd_done        = NDSR_CS0_CMDD;
-	} else {
-		ready           = NDSR_RDY;
-		cmd_done        = NDSR_CS1_CMDD;
-	}
-
-	status = nand_readl(info, NDSR);
-
-	if (status & NDSR_UNCORERR)
-		info->retcode = ERR_UNCORERR;
-	if (status & NDSR_CORERR) {
-		info->retcode = ERR_CORERR;
-		if ((info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		     info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K) &&
-		    info->ecc_bch)
-			info->ecc_err_cnt = NDSR_ERR_CNT(status);
-		else
-			info->ecc_err_cnt = 1;
-
-		/*
-		 * Each chunk composing a page is corrected independently,
-		 * and we need to store maximum number of corrected bitflips
-		 * to return it to the MTD layer in ecc.read_page().
-		 */
-		info->max_bitflips = max_t(unsigned int,
-					   info->max_bitflips,
-					   info->ecc_err_cnt);
-	}
-	if (status & (NDSR_RDDREQ | NDSR_WRDREQ)) {
-		/* whether use dma to transfer data */
-		if (info->use_dma) {
-			disable_int(info, NDCR_INT_MASK);
-			info->state = (status & NDSR_RDDREQ) ?
-				      STATE_DMA_READING : STATE_DMA_WRITING;
-			start_data_dma(info);
-			goto NORMAL_IRQ_EXIT;
-		} else {
-			info->state = (status & NDSR_RDDREQ) ?
-				      STATE_PIO_READING : STATE_PIO_WRITING;
-			ret = IRQ_WAKE_THREAD;
-			goto NORMAL_IRQ_EXIT;
-		}
-	}
-	if (status & cmd_done) {
-		info->state = STATE_CMD_DONE;
-		is_completed = 1;
-	}
-	if (status & ready) {
-		info->state = STATE_READY;
-		is_ready = 1;
-	}
-
-	/*
-	 * Clear all status bit before issuing the next command, which
-	 * can and will alter the status bits and will deserve a new
-	 * interrupt on its own. This lets the controller exit the IRQ
-	 */
-	nand_writel(info, NDSR, status);
-
-	if (status & NDSR_WRCMDREQ) {
-		status &= ~NDSR_WRCMDREQ;
-		info->state = STATE_CMD_HANDLE;
-
-		/*
-		 * Command buffer registers NDCB{0-2} (and optionally NDCB3)
-		 * must be loaded by writing directly either 12 or 16
-		 * bytes directly to NDCB0, four bytes at a time.
-		 *
-		 * Direct write access to NDCB1, NDCB2 and NDCB3 is ignored
-		 * but each NDCBx register can be read.
-		 */
-		nand_writel(info, NDCB0, info->ndcb0);
-		nand_writel(info, NDCB0, info->ndcb1);
-		nand_writel(info, NDCB0, info->ndcb2);
-
-		/* NDCB3 register is available in NFCv2 (Armada 370/XP SoC) */
-		if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K)
-			nand_writel(info, NDCB0, info->ndcb3);
-	}
-
-	if (is_completed)
-		complete(&info->cmd_complete);
-	if (is_ready)
-		complete(&info->dev_ready);
-NORMAL_IRQ_EXIT:
-	return ret;
-}
-
-static inline int is_buf_blank(uint8_t *buf, size_t len)
-{
-	for (; len > 0; len--)
-		if (*buf++ != 0xff)
-			return 0;
-	return 1;
-}
-
-static void set_command_address(struct pxa3xx_nand_info *info,
-		unsigned int page_size, uint16_t column, int page_addr)
-{
-	/* small page addr setting */
-	if (page_size < PAGE_CHUNK_SIZE) {
-		info->ndcb1 = ((page_addr & 0xFFFFFF) << 8)
-				| (column & 0xFF);
-
-		info->ndcb2 = 0;
-	} else {
-		info->ndcb1 = ((page_addr & 0xFFFF) << 16)
-				| (column & 0xFFFF);
-
-		if (page_addr & 0xFF0000)
-			info->ndcb2 = (page_addr & 0xFF0000) >> 16;
-		else
-			info->ndcb2 = 0;
-	}
-}
-
-static void prepare_start_command(struct pxa3xx_nand_info *info, int command)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct mtd_info *mtd = nand_to_mtd(&host->chip);
-
-	/* reset data and oob column point to handle data */
-	info->buf_start		= 0;
-	info->buf_count		= 0;
-	info->data_buff_pos	= 0;
-	info->oob_buff_pos	= 0;
-	info->step_chunk_size   = 0;
-	info->step_spare_size   = 0;
-	info->cur_chunk         = 0;
-	info->use_ecc		= 0;
-	info->use_spare		= 1;
-	info->retcode		= ERR_NONE;
-	info->ecc_err_cnt	= 0;
-	info->ndcb3		= 0;
-	info->need_wait		= 0;
-
-	switch (command) {
-	case NAND_CMD_READ0:
-	case NAND_CMD_PAGEPROG:
-		info->use_ecc = 1;
-		break;
-	case NAND_CMD_PARAM:
-		info->use_spare = 0;
-		break;
-	default:
-		info->ndcb1 = 0;
-		info->ndcb2 = 0;
-		break;
-	}
-
-	/*
-	 * If we are about to issue a read command, or about to set
-	 * the write address, then clean the data buffer.
-	 */
-	if (command == NAND_CMD_READ0 ||
-	    command == NAND_CMD_READOOB ||
-	    command == NAND_CMD_SEQIN) {
-
-		info->buf_count = mtd->writesize + mtd->oobsize;
-		memset(info->data_buff, 0xFF, info->buf_count);
-	}
-
-}
-
-static int prepare_set_command(struct pxa3xx_nand_info *info, int command,
-		int ext_cmd_type, uint16_t column, int page_addr)
-{
-	int addr_cycle, exec_cmd;
-	struct pxa3xx_nand_host *host;
-	struct mtd_info *mtd;
-
-	host = info->host[info->cs];
-	mtd = nand_to_mtd(&host->chip);
-	addr_cycle = 0;
-	exec_cmd = 1;
-
-	if (info->cs != 0)
-		info->ndcb0 = NDCB0_CSEL;
-	else
-		info->ndcb0 = 0;
-
-	if (command == NAND_CMD_SEQIN)
-		exec_cmd = 0;
-
-	addr_cycle = NDCB0_ADDR_CYC(host->row_addr_cycles
-				    + host->col_addr_cycles);
-
-	switch (command) {
-	case NAND_CMD_READOOB:
-	case NAND_CMD_READ0:
-		info->buf_start = column;
-		info->ndcb0 |= NDCB0_CMD_TYPE(0)
-				| addr_cycle
-				| NAND_CMD_READ0;
-
-		if (command == NAND_CMD_READOOB)
-			info->buf_start += mtd->writesize;
-
-		if (info->cur_chunk < info->nfullchunks) {
-			info->step_chunk_size = info->chunk_size;
-			info->step_spare_size = info->spare_size;
-		} else {
-			info->step_chunk_size = info->last_chunk_size;
-			info->step_spare_size = info->last_spare_size;
-		}
-
-		/*
-		 * Multiple page read needs an 'extended command type' field,
-		 * which is either naked-read or last-read according to the
-		 * state.
-		 */
-		if (mtd->writesize == PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_DBC | (NAND_CMD_READSTART << 8);
-		} else if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_DBC | (NAND_CMD_READSTART << 8)
-					| NDCB0_LEN_OVRD
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type);
-			info->ndcb3 = info->step_chunk_size +
-				info->step_spare_size;
-		}
-
-		set_command_address(info, mtd->writesize, column, page_addr);
-		break;
-
-	case NAND_CMD_SEQIN:
-
-		info->buf_start = column;
-		set_command_address(info, mtd->writesize, 0, page_addr);
-
-		/*
-		 * Multiple page programming needs to execute the initial
-		 * SEQIN command that sets the page address.
-		 */
-		if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-				| NDCB0_EXT_CMD_TYPE(ext_cmd_type)
-				| addr_cycle
-				| command;
-			exec_cmd = 1;
-		}
-		break;
-
-	case NAND_CMD_PAGEPROG:
-		if (is_buf_blank(info->data_buff,
-					(mtd->writesize + mtd->oobsize))) {
-			exec_cmd = 0;
-			break;
-		}
-
-		if (info->cur_chunk < info->nfullchunks) {
-			info->step_chunk_size = info->chunk_size;
-			info->step_spare_size = info->spare_size;
-		} else {
-			info->step_chunk_size = info->last_chunk_size;
-			info->step_spare_size = info->last_spare_size;
-		}
-
-		/* Second command setting for large pages */
-		if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			/*
-			 * Multiple page write uses the 'extended command'
-			 * field. This can be used to issue a command dispatch
-			 * or a naked-write depending on the current stage.
-			 */
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-					| NDCB0_LEN_OVRD
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type);
-			info->ndcb3 = info->step_chunk_size +
-				      info->step_spare_size;
-
-			/*
-			 * This is the command dispatch that completes a chunked
-			 * page program operation.
-			 */
-			if (info->cur_chunk == info->ntotalchunks) {
-				info->ndcb0 = NDCB0_CMD_TYPE(0x1)
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type)
-					| command;
-				info->ndcb1 = 0;
-				info->ndcb2 = 0;
-				info->ndcb3 = 0;
-			}
-		} else {
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-					| NDCB0_AUTO_RS
-					| NDCB0_ST_ROW_EN
-					| NDCB0_DBC
-					| (NAND_CMD_PAGEPROG << 8)
-					| NAND_CMD_SEQIN
-					| addr_cycle;
-		}
-		break;
-
-	case NAND_CMD_PARAM:
-		info->buf_count = INIT_BUFFER_SIZE;
-		info->ndcb0 |= NDCB0_CMD_TYPE(0)
-				| NDCB0_ADDR_CYC(1)
-				| NDCB0_LEN_OVRD
-				| command;
-		info->ndcb1 = (column & 0xFF);
-		info->ndcb3 = INIT_BUFFER_SIZE;
-		info->step_chunk_size = INIT_BUFFER_SIZE;
-		break;
-
-	case NAND_CMD_READID:
-		info->buf_count = READ_ID_BYTES;
-		info->ndcb0 |= NDCB0_CMD_TYPE(3)
-				| NDCB0_ADDR_CYC(1)
-				| command;
-		info->ndcb1 = (column & 0xFF);
-
-		info->step_chunk_size = 8;
-		break;
-	case NAND_CMD_STATUS:
-		info->buf_count = 1;
-		info->ndcb0 |= NDCB0_CMD_TYPE(4)
-				| NDCB0_ADDR_CYC(1)
-				| command;
-
-		info->step_chunk_size = 8;
-		break;
-
-	case NAND_CMD_ERASE1:
-		info->ndcb0 |= NDCB0_CMD_TYPE(2)
-				| NDCB0_AUTO_RS
-				| NDCB0_ADDR_CYC(3)
-				| NDCB0_DBC
-				| (NAND_CMD_ERASE2 << 8)
-				| NAND_CMD_ERASE1;
-		info->ndcb1 = page_addr;
-		info->ndcb2 = 0;
-
-		break;
-	case NAND_CMD_RESET:
-		info->ndcb0 |= NDCB0_CMD_TYPE(5)
-				| command;
-
-		break;
-
-	case NAND_CMD_ERASE2:
-		exec_cmd = 0;
-		break;
-
-	default:
-		exec_cmd = 0;
-		dev_err(&info->pdev->dev, "non-supported command %x\n",
-				command);
-		break;
-	}
-
-	return exec_cmd;
-}
-
-static void nand_cmdfunc(struct mtd_info *mtd, unsigned command,
-			 int column, int page_addr)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int exec_cmd;
-
-	/*
-	 * if this is a x16 device ,then convert the input
-	 * "byte" address into a "word" address appropriate
-	 * for indexing a word-oriented device
-	 */
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		column /= 2;
-
-	/*
-	 * There may be different NAND chip hooked to
-	 * different chip select, so check whether
-	 * chip select has been changed, if yes, reset the timing
-	 */
-	if (info->cs != host->cs) {
-		info->cs = host->cs;
-		nand_writel(info, NDTR0CS0, info->ndtr0cs0);
-		nand_writel(info, NDTR1CS0, info->ndtr1cs0);
-	}
-
-	prepare_start_command(info, command);
-
-	info->state = STATE_PREPARED;
-	exec_cmd = prepare_set_command(info, command, 0, column, page_addr);
-
-	if (exec_cmd) {
-		init_completion(&info->cmd_complete);
-		init_completion(&info->dev_ready);
-		info->need_wait = 1;
-		pxa3xx_nand_start(info);
-
-		if (!wait_for_completion_timeout(&info->cmd_complete,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Wait time out!!!\n");
-			/* Stop State Machine for next command cycle */
-			pxa3xx_nand_stop(info);
-		}
-	}
-	info->state = STATE_IDLE;
-}
-
-static void nand_cmdfunc_extended(struct mtd_info *mtd,
-				  const unsigned command,
-				  int column, int page_addr)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int exec_cmd, ext_cmd_type;
-
-	/*
-	 * if this is a x16 device then convert the input
-	 * "byte" address into a "word" address appropriate
-	 * for indexing a word-oriented device
-	 */
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		column /= 2;
-
-	/*
-	 * There may be different NAND chip hooked to
-	 * different chip select, so check whether
-	 * chip select has been changed, if yes, reset the timing
-	 */
-	if (info->cs != host->cs) {
-		info->cs = host->cs;
-		nand_writel(info, NDTR0CS0, info->ndtr0cs0);
-		nand_writel(info, NDTR1CS0, info->ndtr1cs0);
-	}
-
-	/* Select the extended command for the first command */
-	switch (command) {
-	case NAND_CMD_READ0:
-	case NAND_CMD_READOOB:
-		ext_cmd_type = EXT_CMD_TYPE_MONO;
-		break;
-	case NAND_CMD_SEQIN:
-		ext_cmd_type = EXT_CMD_TYPE_DISPATCH;
-		break;
-	case NAND_CMD_PAGEPROG:
-		ext_cmd_type = EXT_CMD_TYPE_NAKED_RW;
-		break;
-	default:
-		ext_cmd_type = 0;
-		break;
-	}
-
-	prepare_start_command(info, command);
-
-	/*
-	 * Prepare the "is ready" completion before starting a command
-	 * transaction sequence. If the command is not executed the
-	 * completion will be completed, see below.
-	 *
-	 * We can do that inside the loop because the command variable
-	 * is invariant and thus so is the exec_cmd.
-	 */
-	info->need_wait = 1;
-	init_completion(&info->dev_ready);
-	do {
-		info->state = STATE_PREPARED;
-
-		exec_cmd = prepare_set_command(info, command, ext_cmd_type,
-					       column, page_addr);
-		if (!exec_cmd) {
-			info->need_wait = 0;
-			complete(&info->dev_ready);
-			break;
-		}
-
-		init_completion(&info->cmd_complete);
-		pxa3xx_nand_start(info);
-
-		if (!wait_for_completion_timeout(&info->cmd_complete,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Wait time out!!!\n");
-			/* Stop State Machine for next command cycle */
-			pxa3xx_nand_stop(info);
-			break;
-		}
-
-		/* Only a few commands need several steps */
-		if (command != NAND_CMD_PAGEPROG &&
-		    command != NAND_CMD_READ0    &&
-		    command != NAND_CMD_READOOB)
-			break;
-
-		info->cur_chunk++;
-
-		/* Check if the sequence is complete */
-		if (info->cur_chunk == info->ntotalchunks && command != NAND_CMD_PAGEPROG)
-			break;
-
-		/*
-		 * After a splitted program command sequence has issued
-		 * the command dispatch, the command sequence is complete.
-		 */
-		if (info->cur_chunk == (info->ntotalchunks + 1) &&
-		    command == NAND_CMD_PAGEPROG &&
-		    ext_cmd_type == EXT_CMD_TYPE_DISPATCH)
-			break;
-
-		if (command == NAND_CMD_READ0 || command == NAND_CMD_READOOB) {
-			/* Last read: issue a 'last naked read' */
-			if (info->cur_chunk == info->ntotalchunks - 1)
-				ext_cmd_type = EXT_CMD_TYPE_LAST_RW;
-			else
-				ext_cmd_type = EXT_CMD_TYPE_NAKED_RW;
-
-		/*
-		 * If a splitted program command has no more data to transfer,
-		 * the command dispatch must be issued to complete.
-		 */
-		} else if (command == NAND_CMD_PAGEPROG &&
-			   info->cur_chunk == info->ntotalchunks) {
-				ext_cmd_type = EXT_CMD_TYPE_DISPATCH;
-		}
-	} while (1);
-
-	info->state = STATE_IDLE;
-}
-
-static int pxa3xx_nand_write_page_hwecc(struct mtd_info *mtd,
-		struct nand_chip *chip, const uint8_t *buf, int oob_required,
-		int page)
-{
-	nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize);
-	chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
-
-	return nand_prog_page_end_op(chip);
-}
-
-static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd,
-		struct nand_chip *chip, uint8_t *buf, int oob_required,
-		int page)
-{
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-
-	nand_read_page_op(chip, page, 0, buf, mtd->writesize);
-	chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
-
-	if (info->retcode == ERR_CORERR && info->use_ecc) {
-		mtd->ecc_stats.corrected += info->ecc_err_cnt;
-
-	} else if (info->retcode == ERR_UNCORERR) {
-		/*
-		 * for blank page (all 0xff), HW will calculate its ECC as
-		 * 0, which is different from the ECC information within
-		 * OOB, ignore such uncorrectable errors
-		 */
-		if (is_buf_blank(buf, mtd->writesize))
-			info->retcode = ERR_NONE;
-		else
-			mtd->ecc_stats.failed++;
-	}
-
-	return info->max_bitflips;
-}
-
-static uint8_t pxa3xx_nand_read_byte(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	char retval = 0xFF;
-
-	if (info->buf_start < info->buf_count)
-		/* Has just send a new command? */
-		retval = info->data_buff[info->buf_start++];
-
-	return retval;
-}
-
-static u16 pxa3xx_nand_read_word(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	u16 retval = 0xFFFF;
-
-	if (!(info->buf_start & 0x01) && info->buf_start < info->buf_count) {
-		retval = *((u16 *)(info->data_buff+info->buf_start));
-		info->buf_start += 2;
-	}
-	return retval;
-}
-
-static void pxa3xx_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int real_len = min_t(size_t, len, info->buf_count - info->buf_start);
-
-	memcpy(buf, info->data_buff + info->buf_start, real_len);
-	info->buf_start += real_len;
-}
-
-static void pxa3xx_nand_write_buf(struct mtd_info *mtd,
-		const uint8_t *buf, int len)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int real_len = min_t(size_t, len, info->buf_count - info->buf_start);
-
-	memcpy(info->data_buff + info->buf_start, buf, real_len);
-	info->buf_start += real_len;
-}
-
-static void pxa3xx_nand_select_chip(struct mtd_info *mtd, int chip)
-{
-	return;
-}
-
-static int pxa3xx_nand_waitfunc(struct mtd_info *mtd, struct nand_chip *this)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-
-	if (info->need_wait) {
-		info->need_wait = 0;
-		if (!wait_for_completion_timeout(&info->dev_ready,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Ready time out!!!\n");
-			return NAND_STATUS_FAIL;
-		}
-	}
-
-	/* pxa3xx_nand_send_command has waited for command complete */
-	if (this->state == FL_WRITING || this->state == FL_ERASING) {
-		if (info->retcode == ERR_NONE)
-			return 0;
-		else
-			return NAND_STATUS_FAIL;
-	}
-
-	return NAND_STATUS_READY;
-}
-
-static int pxa3xx_nand_config_ident(struct pxa3xx_nand_info *info)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	const struct nand_sdr_timings *timings;
-
-	/* Configure default flash values */
-	info->chunk_size = PAGE_CHUNK_SIZE;
-	info->reg_ndcr = 0x0; /* enable all interrupts */
-	info->reg_ndcr |= (pdata->enable_arbiter) ? NDCR_ND_ARB_EN : 0;
-	info->reg_ndcr |= NDCR_RD_ID_CNT(READ_ID_BYTES);
-	info->reg_ndcr |= NDCR_SPARE_EN;
-
-	/* use the common timing to make a try */
-	timings = onfi_async_timing_mode_to_sdr_timings(0);
-	if (IS_ERR(timings))
-		return PTR_ERR(timings);
-
-	pxa3xx_nand_set_sdr_timing(host, timings);
-	return 0;
-}
-
-static void pxa3xx_nand_config_tail(struct pxa3xx_nand_info *info)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct nand_chip *chip = &host->chip;
-	struct mtd_info *mtd = nand_to_mtd(chip);
-
-	info->reg_ndcr |= (host->col_addr_cycles == 2) ? NDCR_RA_START : 0;
-	info->reg_ndcr |= (chip->page_shift == 6) ? NDCR_PG_PER_BLK : 0;
-	info->reg_ndcr |= (mtd->writesize == 2048) ? NDCR_PAGE_SZ : 0;
-}
-
-static void pxa3xx_nand_detect_config(struct pxa3xx_nand_info *info)
-{
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	uint32_t ndcr = nand_readl(info, NDCR);
-
-	/* Set an initial chunk size */
-	info->chunk_size = ndcr & NDCR_PAGE_SZ ? 2048 : 512;
-	info->reg_ndcr = ndcr &
-		~(NDCR_INT_MASK | NDCR_ND_ARB_EN | NFCV1_NDCR_ARB_CNTL);
-	info->reg_ndcr |= (pdata->enable_arbiter) ? NDCR_ND_ARB_EN : 0;
-	info->ndtr0cs0 = nand_readl(info, NDTR0CS0);
-	info->ndtr1cs0 = nand_readl(info, NDTR1CS0);
-}
-
-static int pxa3xx_nand_init_buff(struct pxa3xx_nand_info *info)
-{
-	struct platform_device *pdev = info->pdev;
-	struct dma_slave_config	config;
-	dma_cap_mask_t mask;
-	struct pxad_param param;
-	int ret;
-
-	info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
-	if (info->data_buff == NULL)
-		return -ENOMEM;
-	if (use_dma == 0)
-		return 0;
-
-	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
-	if (ret)
-		return ret;
-
-	sg_init_one(&info->sg, info->data_buff, info->buf_size);
-	dma_cap_zero(mask);
-	dma_cap_set(DMA_SLAVE, mask);
-	param.prio = PXAD_PRIO_LOWEST;
-	param.drcmr = info->drcmr_dat;
-	info->dma_chan = dma_request_slave_channel_compat(mask, pxad_filter_fn,
-							  &param, &pdev->dev,
-							  "data");
-	if (!info->dma_chan) {
-		dev_err(&pdev->dev, "unable to request data dma channel\n");
-		return -ENODEV;
-	}
-
-	memset(&config, 0, sizeof(config));
-	config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-	config.src_addr = info->mmio_phys + NDDB;
-	config.dst_addr = info->mmio_phys + NDDB;
-	config.src_maxburst = 32;
-	config.dst_maxburst = 32;
-	ret = dmaengine_slave_config(info->dma_chan, &config);
-	if (ret < 0) {
-		dev_err(&info->pdev->dev,
-			"dma channel configuration failed: %d\n",
-			ret);
-		return ret;
-	}
-
-	/*
-	 * Now that DMA buffers are allocated we turn on
-	 * DMA proper for I/O operations.
-	 */
-	info->use_dma = 1;
-	return 0;
-}
-
-static void pxa3xx_nand_free_buff(struct pxa3xx_nand_info *info)
-{
-	if (info->use_dma) {
-		dmaengine_terminate_all(info->dma_chan);
-		dma_release_channel(info->dma_chan);
-	}
-	kfree(info->data_buff);
-}
-
-static int pxa_ecc_init(struct pxa3xx_nand_info *info,
-			struct mtd_info *mtd,
-			int strength, int ecc_stepsize, int page_size)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct nand_ecc_ctrl *ecc = &chip->ecc;
-
-	if (strength == 1 && ecc_stepsize == 512 && page_size == 2048) {
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 2048;
-		info->spare_size = 40;
-		info->ecc_size = 24;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = 512;
-		ecc->strength = 1;
-
-	} else if (strength == 1 && ecc_stepsize == 512 && page_size == 512) {
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 512;
-		info->spare_size = 8;
-		info->ecc_size = 8;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = 512;
-		ecc->strength = 1;
-
-	/*
-	 * Required ECC: 4-bit correction per 512 bytes
-	 * Select: 16-bit correction per 2048 bytes
-	 */
-	} else if (strength == 4 && ecc_stepsize == 512 && page_size == 2048) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 2048;
-		info->spare_size = 32;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-
-	} else if (strength == 4 && ecc_stepsize == 512 && page_size == 4096) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 2;
-		info->ntotalchunks = 2;
-		info->chunk_size = 2048;
-		info->spare_size = 32;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-
-	/*
-	 * Required ECC: 8-bit correction per 512 bytes
-	 * Select: 16-bit correction per 1024 bytes
-	 */
-	} else if (strength == 8 && ecc_stepsize == 512 && page_size == 4096) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 4;
-		info->ntotalchunks = 5;
-		info->chunk_size = 1024;
-		info->spare_size = 0;
-		info->last_chunk_size = 0;
-		info->last_spare_size = 64;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-	} else {
-		dev_err(&info->pdev->dev,
-			"ECC strength %d at page size %d is not supported\n",
-			strength, page_size);
-		return -ENODEV;
-	}
-
-	dev_info(&info->pdev->dev, "ECC strength %d, ECC step size %d\n",
-		 ecc->strength, ecc->size);
-	return 0;
-}
-
-static int pxa3xx_nand_scan(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	int ret;
-	uint16_t ecc_strength, ecc_step;
-
-	if (pdata->keep_config) {
-		pxa3xx_nand_detect_config(info);
-	} else {
-		ret = pxa3xx_nand_config_ident(info);
-		if (ret)
-			return ret;
-	}
-
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		chip->options |= NAND_BUSWIDTH_16;
-
-	/* Device detection must be done with ECC disabled */
-	if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-	    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K)
-		nand_writel(info, NDECCCTRL, 0x0);
-
-	if (pdata->flash_bbt)
-		chip->bbt_options |= NAND_BBT_USE_FLASH;
-
-	chip->ecc.strength = pdata->ecc_strength;
-	chip->ecc.size = pdata->ecc_step_size;
-
-	ret = nand_scan_ident(mtd, 1, NULL);
-	if (ret)
-		return ret;
-
-	if (!pdata->keep_config) {
-		ret = pxa3xx_nand_init(host);
-		if (ret) {
-			dev_err(&info->pdev->dev, "Failed to init nand: %d\n",
-				ret);
-			return ret;
-		}
-	}
-
-	if (chip->bbt_options & NAND_BBT_USE_FLASH) {
-		/*
-		 * We'll use a bad block table stored in-flash and don't
-		 * allow writing the bad block marker to the flash.
-		 */
-		chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
-		chip->bbt_td = &bbt_main_descr;
-		chip->bbt_md = &bbt_mirror_descr;
-	}
-
-	/*
-	 * If the page size is bigger than the FIFO size, let's check
-	 * we are given the right variant and then switch to the extended
-	 * (aka splitted) command handling,
-	 */
-	if (mtd->writesize > PAGE_CHUNK_SIZE) {
-		if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K) {
-			chip->cmdfunc = nand_cmdfunc_extended;
-		} else {
-			dev_err(&info->pdev->dev,
-				"unsupported page size on this variant\n");
-			return -ENODEV;
-		}
-	}
-
-	ecc_strength = chip->ecc.strength;
-	ecc_step = chip->ecc.size;
-	if (!ecc_strength || !ecc_step) {
-		ecc_strength = chip->ecc_strength_ds;
-		ecc_step = chip->ecc_step_ds;
-	}
-
-	/* Set default ECC strength requirements on non-ONFI devices */
-	if (ecc_strength < 1 && ecc_step < 1) {
-		ecc_strength = 1;
-		ecc_step = 512;
-	}
-
-	ret = pxa_ecc_init(info, mtd, ecc_strength,
-			   ecc_step, mtd->writesize);
-	if (ret)
-		return ret;
-
-	/* calculate addressing information */
-	if (mtd->writesize >= 2048)
-		host->col_addr_cycles = 2;
-	else
-		host->col_addr_cycles = 1;
-
-	/* release the initial buffer */
-	kfree(info->data_buff);
-
-	/* allocate the real data + oob buffer */
-	info->buf_size = mtd->writesize + mtd->oobsize;
-	ret = pxa3xx_nand_init_buff(info);
-	if (ret)
-		return ret;
-	info->oob_buff = info->data_buff + mtd->writesize;
-
-	if ((mtd->size >> chip->page_shift) > 65536)
-		host->row_addr_cycles = 3;
-	else
-		host->row_addr_cycles = 2;
-
-	if (!pdata->keep_config)
-		pxa3xx_nand_config_tail(info);
-
-	return nand_scan_tail(mtd);
-}
-
-static int alloc_nand_resource(struct platform_device *pdev)
-{
-	struct device_node *np = pdev->dev.of_node;
-	struct pxa3xx_nand_platform_data *pdata;
-	struct pxa3xx_nand_info *info;
-	struct pxa3xx_nand_host *host;
-	struct nand_chip *chip = NULL;
-	struct mtd_info *mtd;
-	struct resource *r;
-	int ret, irq, cs;
-
-	pdata = dev_get_platdata(&pdev->dev);
-	if (pdata->num_cs <= 0) {
-		dev_err(&pdev->dev, "invalid number of chip selects\n");
-		return -ENODEV;
-	}
-
-	info = devm_kzalloc(&pdev->dev,
-			    sizeof(*info) + sizeof(*host) * pdata->num_cs,
-			    GFP_KERNEL);
-	if (!info)
-		return -ENOMEM;
-
-	info->pdev = pdev;
-	info->variant = pxa3xx_nand_get_variant(pdev);
-	for (cs = 0; cs < pdata->num_cs; cs++) {
-		host = (void *)&info[1] + sizeof(*host) * cs;
-		chip = &host->chip;
-		nand_set_controller_data(chip, host);
-		mtd = nand_to_mtd(chip);
-		info->host[cs] = host;
-		host->cs = cs;
-		host->info_data = info;
-		mtd->dev.parent = &pdev->dev;
-		/* FIXME: all chips use the same device tree partitions */
-		nand_set_flash_node(chip, np);
-
-		nand_set_controller_data(chip, host);
-		chip->ecc.read_page	= pxa3xx_nand_read_page_hwecc;
-		chip->ecc.write_page	= pxa3xx_nand_write_page_hwecc;
-		chip->controller        = &info->controller;
-		chip->waitfunc		= pxa3xx_nand_waitfunc;
-		chip->select_chip	= pxa3xx_nand_select_chip;
-		chip->read_word		= pxa3xx_nand_read_word;
-		chip->read_byte		= pxa3xx_nand_read_byte;
-		chip->read_buf		= pxa3xx_nand_read_buf;
-		chip->write_buf		= pxa3xx_nand_write_buf;
-		chip->options		|= NAND_NO_SUBPAGE_WRITE;
-		chip->cmdfunc		= nand_cmdfunc;
-		chip->onfi_set_features	= nand_onfi_get_set_features_notsupp;
-		chip->onfi_get_features	= nand_onfi_get_set_features_notsupp;
-	}
-
-	nand_hw_control_init(chip->controller);
-	info->clk = devm_clk_get(&pdev->dev, NULL);
-	if (IS_ERR(info->clk)) {
-		ret = PTR_ERR(info->clk);
-		dev_err(&pdev->dev, "failed to get nand clock: %d\n", ret);
-		return ret;
-	}
-	ret = clk_prepare_enable(info->clk);
-	if (ret < 0)
-		return ret;
-
-	if (!np && use_dma) {
-		r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-		if (r == NULL) {
-			dev_err(&pdev->dev,
-				"no resource defined for data DMA\n");
-			ret = -ENXIO;
-			goto fail_disable_clk;
-		}
-		info->drcmr_dat = r->start;
-	}
-
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "no IRQ resource defined\n");
-		ret = -ENXIO;
-		goto fail_disable_clk;
-	}
-
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	info->mmio_base = devm_ioremap_resource(&pdev->dev, r);
-	if (IS_ERR(info->mmio_base)) {
-		ret = PTR_ERR(info->mmio_base);
-		dev_err(&pdev->dev, "failed to map register space: %d\n", ret);
-		goto fail_disable_clk;
-	}
-	info->mmio_phys = r->start;
-
-	/* Allocate a buffer to allow flash detection */
-	info->buf_size = INIT_BUFFER_SIZE;
-	info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
-	if (info->data_buff == NULL) {
-		ret = -ENOMEM;
-		goto fail_disable_clk;
-	}
-
-	/* initialize all interrupts to be disabled */
-	disable_int(info, NDSR_MASK);
-
-	ret = request_threaded_irq(irq, pxa3xx_nand_irq,
-				   pxa3xx_nand_irq_thread, IRQF_ONESHOT,
-				   pdev->name, info);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to request IRQ: %d\n", ret);
-		goto fail_free_buf;
-	}
-
-	platform_set_drvdata(pdev, info);
-
-	return 0;
-
-fail_free_buf:
-	free_irq(irq, info);
-	kfree(info->data_buff);
-fail_disable_clk:
-	clk_disable_unprepare(info->clk);
-	return ret;
-}
-
-static int pxa3xx_nand_remove(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_info *info = platform_get_drvdata(pdev);
-	struct pxa3xx_nand_platform_data *pdata;
-	int irq, cs;
-
-	if (!info)
-		return 0;
-
-	pdata = dev_get_platdata(&pdev->dev);
-
-	irq = platform_get_irq(pdev, 0);
-	if (irq >= 0)
-		free_irq(irq, info);
-	pxa3xx_nand_free_buff(info);
-
-	/*
-	 * In the pxa3xx case, the DFI bus is shared between the SMC and NFC.
-	 * In order to prevent a lockup of the system bus, the DFI bus
-	 * arbitration is granted to SMC upon driver removal. This is done by
-	 * setting the x_ARB_CNTL bit, which also prevents the NAND to have
-	 * access to the bus anymore.
-	 */
-	nand_writel(info, NDCR,
-		    (nand_readl(info, NDCR) & ~NDCR_ND_ARB_EN) |
-		    NFCV1_NDCR_ARB_CNTL);
-	clk_disable_unprepare(info->clk);
-
-	for (cs = 0; cs < pdata->num_cs; cs++)
-		nand_release(nand_to_mtd(&info->host[cs]->chip));
-	return 0;
-}
-
-static int pxa3xx_nand_probe_dt(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_platform_data *pdata;
-	struct device_node *np = pdev->dev.of_node;
-	const struct of_device_id *of_id =
-			of_match_device(pxa3xx_nand_dt_ids, &pdev->dev);
-
-	if (!of_id)
-		return 0;
-
-	/*
-	 * Some SoCs like A7k/A8k need to enable manually the NAND
-	 * controller to avoid being bootloader dependent. This is done
-	 * through the use of a single bit in the System Functions registers.
-	 */
-	if (pxa3xx_nand_get_variant(pdev) == PXA3XX_NAND_VARIANT_ARMADA_8K) {
-		struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
-			pdev->dev.of_node, "marvell,system-controller");
-		u32 reg;
-
-		if (IS_ERR(sysctrl_base))
-			return PTR_ERR(sysctrl_base);
-
-		regmap_read(sysctrl_base, GENCONF_SOC_DEVICE_MUX, &reg);
-		reg |= GENCONF_SOC_DEVICE_MUX_NFC_EN;
-		regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
-	}
-
-	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-	if (!pdata)
-		return -ENOMEM;
-
-	if (of_get_property(np, "marvell,nand-enable-arbiter", NULL))
-		pdata->enable_arbiter = 1;
-	if (of_get_property(np, "marvell,nand-keep-config", NULL))
-		pdata->keep_config = 1;
-	of_property_read_u32(np, "num-cs", &pdata->num_cs);
-
-	pdev->dev.platform_data = pdata;
-
-	return 0;
-}
-
-static int pxa3xx_nand_probe(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_platform_data *pdata;
-	struct pxa3xx_nand_info *info;
-	int ret, cs, probe_success, dma_available;
-
-	dma_available = IS_ENABLED(CONFIG_ARM) &&
-		(IS_ENABLED(CONFIG_ARCH_PXA) || IS_ENABLED(CONFIG_ARCH_MMP));
-	if (use_dma && !dma_available) {
-		use_dma = 0;
-		dev_warn(&pdev->dev,
-			 "This platform can't do DMA on this device\n");
-	}
-
-	ret = pxa3xx_nand_probe_dt(pdev);
-	if (ret)
-		return ret;
-
-	pdata = dev_get_platdata(&pdev->dev);
-	if (!pdata) {
-		dev_err(&pdev->dev, "no platform data defined\n");
-		return -ENODEV;
-	}
-
-	ret = alloc_nand_resource(pdev);
-	if (ret)
-		return ret;
-
-	info = platform_get_drvdata(pdev);
-	probe_success = 0;
-	for (cs = 0; cs < pdata->num_cs; cs++) {
-		struct mtd_info *mtd = nand_to_mtd(&info->host[cs]->chip);
-
-		/*
-		 * The mtd name matches the one used in 'mtdparts' kernel
-		 * parameter. This name cannot be changed or otherwise
-		 * user's mtd partitions configuration would get broken.
-		 */
-		mtd->name = "pxa3xx_nand-0";
-		info->cs = cs;
-		ret = pxa3xx_nand_scan(mtd);
-		if (ret) {
-			dev_warn(&pdev->dev, "failed to scan nand at cs %d\n",
-				cs);
-			continue;
-		}
-
-		ret = mtd_device_register(mtd, pdata->parts[cs],
-					  pdata->nr_parts[cs]);
-		if (!ret)
-			probe_success = 1;
-	}
-
-	if (!probe_success) {
-		pxa3xx_nand_remove(pdev);
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-#ifdef CONFIG_PM
-static int pxa3xx_nand_suspend(struct device *dev)
-{
-	struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
-
-	if (info->state) {
-		dev_err(dev, "driver busy, state = %d\n", info->state);
-		return -EAGAIN;
-	}
-
-	clk_disable(info->clk);
-	return 0;
-}
-
-static int pxa3xx_nand_resume(struct device *dev)
-{
-	struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
-	int ret;
-
-	ret = clk_enable(info->clk);
-	if (ret < 0)
-		return ret;
-
-	/* We don't want to handle interrupt without calling mtd routine */
-	disable_int(info, NDCR_INT_MASK);
-
-	/*
-	 * Directly set the chip select to a invalid value,
-	 * then the driver would reset the timing according
-	 * to current chip select at the beginning of cmdfunc
-	 */
-	info->cs = 0xff;
-
-	/*
-	 * As the spec says, the NDSR would be updated to 0x1800 when
-	 * doing the nand_clk disable/enable.
-	 * To prevent it damaging state machine of the driver, clear
-	 * all status before resume
-	 */
-	nand_writel(info, NDSR, NDSR_MASK);
-
-	return 0;
-}
-#else
-#define pxa3xx_nand_suspend	NULL
-#define pxa3xx_nand_resume	NULL
-#endif
-
-static const struct dev_pm_ops pxa3xx_nand_pm_ops = {
-	.suspend	= pxa3xx_nand_suspend,
-	.resume		= pxa3xx_nand_resume,
-};
-
-static struct platform_driver pxa3xx_nand_driver = {
-	.driver = {
-		.name	= "pxa3xx-nand",
-		.of_match_table = pxa3xx_nand_dt_ids,
-		.pm	= &pxa3xx_nand_pm_ops,
-	},
-	.probe		= pxa3xx_nand_probe,
-	.remove		= pxa3xx_nand_remove,
-};
-
-module_platform_driver(pxa3xx_nand_driver);
-
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("PXA3xx NAND controller driver");
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 03/12] mtd: nand: replace pxa3xx_nand driver by its rework called marvell_nand
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Actually remove pxa3xx_nand.c to let marvell_nand.c be compiled instead.
Also change the defconfig files using it as well as some board files
depending on CONFIG_MTD_NAND_PXA3xx.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/configs/cm_x300_defconfig  |    2 +-
 arch/arm/configs/mvebu_v7_defconfig |    2 +-
 arch/arm/configs/pxa3xx_defconfig   |    3 +-
 arch/arm/configs/pxa_defconfig      |    2 +-
 arch/arm/configs/raumfeld_defconfig |    2 +-
 arch/arm/mach-mmp/ttc_dkb.c         |    4 +-
 arch/arm/mach-pxa/cm-x300.c         |    2 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c  |    2 +-
 arch/arm/mach-pxa/colibri.h         |    2 +-
 arch/arm/mach-pxa/littleton.c       |    4 +-
 arch/arm/mach-pxa/mxm8x10.c         |    4 +-
 arch/arm/mach-pxa/zylonite.c        |    4 +-
 drivers/mtd/nand/Makefile           |    1 -
 drivers/mtd/nand/pxa3xx_nand.c      | 2104 -----------------------------------
 14 files changed, 16 insertions(+), 2122 deletions(-)
 delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c

diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig
index c0418e03d180..5e349c625b71 100644
--- a/arch/arm/configs/cm_x300_defconfig
+++ b/arch/arm/configs/cm_x300_defconfig
@@ -49,7 +49,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_MTD=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index 69553704f2dc..4b6e4fd47e5d 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -57,7 +57,7 @@ CONFIG_MTD_CFI_STAA=y
 CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_SRAM=y
 CONFIG_MTD_UBI=y
diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig
index bfea6874b0a1..3e0de035ab77 100644
--- a/arch/arm/configs/pxa3xx_defconfig
+++ b/arch/arm/configs/pxa3xx_defconfig
@@ -32,8 +32,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_MTD=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
-CONFIG_MTD_NAND_PXA3xx_BUILTIN=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 CONFIG_MTD_ONENAND_GENERIC=y
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig
index 830e817a028a..934af8601f7d 100644
--- a/arch/arm/configs/pxa_defconfig
+++ b/arch/arm/configs/pxa_defconfig
@@ -198,7 +198,7 @@ CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x4000000
 CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=y
 CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
 CONFIG_MTD_NAND_SHARPSL=m
-CONFIG_MTD_NAND_PXA3xx=m
+CONFIG_MTD_NAND_MARVELL=m
 CONFIG_MTD_NAND_CM_X270=m
 CONFIG_MTD_NAND_TMIO=m
 CONFIG_MTD_NAND_BRCMNAND=m
diff --git a/arch/arm/configs/raumfeld_defconfig b/arch/arm/configs/raumfeld_defconfig
index 77a56c23c6ef..2dd56e9a484e 100644
--- a/arch/arm/configs/raumfeld_defconfig
+++ b/arch/arm/configs/raumfeld_defconfig
@@ -33,7 +33,7 @@ CONFIG_NFTL=y
 CONFIG_NFTL_RW=y
 CONFIG_MTD_BLOCK2MTD=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_ISL29003=y
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index d90c74fa614d..e0b6073c61a7 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -178,7 +178,7 @@ static struct mv_usb_platform_data ttc_usb_pdata = {
 #endif
 #endif
 
-#if IS_ENABLED(CONFIG_MTD_NAND_PXA3xx)
+#if IS_ENABLED(CONFIG_MTD_NAND_MARVELL)
 static struct pxa3xx_nand_platform_data dkb_nand_info = {
 	.enable_arbiter = 1,
 	.num_cs = 1,
@@ -275,7 +275,7 @@ static void __init ttc_dkb_init(void)
 
 	/* on-chip devices */
 	pxa910_add_uart(1);
-#if IS_ENABLED(CONFIG_MTD_NAND_PXA3xx)
+#if IS_ENABLED(CONFIG_MTD_NAND_MARVELL)
 	pxa910_add_nand(&dkb_nand_info);
 #endif
 
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 868448d2cd82..89326378dabf 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -391,7 +391,7 @@ static void __init cm_x300_init_ac97(void)
 static inline void cm_x300_init_ac97(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition cm_x300_nand_partitions[] = {
 	[0] = {
 		.name        = "OBM",
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index b04431bb4ba7..c9c36f707555 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -110,7 +110,7 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin)
 }
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition colibri_nand_partitions[] = {
 	{
 		.name        = "bootloader",
diff --git a/arch/arm/mach-pxa/colibri.h b/arch/arm/mach-pxa/colibri.h
index 673a131da875..d5ba74831916 100644
--- a/arch/arm/mach-pxa/colibri.h
+++ b/arch/arm/mach-pxa/colibri.h
@@ -46,7 +46,7 @@ static inline void colibri_pxa3xx_init_lcd(int bl_pin) {}
 extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data);
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 extern void colibri_pxa3xx_init_nand(void);
 #else
 static inline void colibri_pxa3xx_init_nand(void) {}
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index fae38fdc8d8e..898961be36db 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -290,7 +290,7 @@ static void __init littleton_init_mmc(void)
 static inline void littleton_init_mmc(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition littleton_nand_partitions[] = {
 	[0] = {
 		.name        = "Bootloader",
@@ -340,7 +340,7 @@ static void __init littleton_init_nand(void)
 }
 #else
 static inline void littleton_init_nand(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
 static struct led_info littleton_da9034_leds[] = {
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c
index 9a22ae0ad8c9..7d7aab20b70a 100644
--- a/arch/arm/mach-pxa/mxm8x10.c
+++ b/arch/arm/mach-pxa/mxm8x10.c
@@ -359,7 +359,7 @@ void __init mxm_8x10_ac97_init(void)
 }
 
 /* NAND flash Support */
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 #define NAND_BLOCK_SIZE SZ_128K
 #define NB(x)           (NAND_BLOCK_SIZE * (x))
 static struct mtd_partition mxm_8x10_nand_partitions[] = {
@@ -402,7 +402,7 @@ static void __init mxm_8x10_nand_init(void)
 }
 #else
 static inline void mxm_8x10_nand_init(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 /* Ethernet support: Davicom DM9000 */
 static struct resource dm9k_resources[] = {
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 4268552d600d..a4577118d518 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -338,7 +338,7 @@ static void __init zylonite_init_keypad(void)
 static inline void zylonite_init_keypad(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition zylonite_nand_partitions[] = {
 	[0] = {
 		.name        = "Bootloader",
@@ -388,7 +388,7 @@ static void __init zylonite_init_nand(void)
 }
 #else
 static inline void zylonite_init_nand(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
 static struct pxaohci_platform_data zylonite_ohci_info = {
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 921634ba400c..c882d5ef192a 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -31,7 +31,6 @@ omap2_nand-objs := omap2.o
 obj-$(CONFIG_MTD_NAND_OMAP2) 		+= omap2_nand.o
 obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)	+= omap_elm.o
 obj-$(CONFIG_MTD_NAND_CM_X270)		+= cmx270_nand.o
-obj-$(CONFIG_MTD_NAND_PXA3xx)		+= pxa3xx_nand.o
 obj-$(CONFIG_MTD_NAND_MARVELL)		+= marvell_nand.o
 obj-$(CONFIG_MTD_NAND_TMIO)		+= tmio_nand.o
 obj-$(CONFIG_MTD_NAND_PLATFORM)		+= plat_nand.o
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
deleted file mode 100644
index 021374fe59dc..000000000000
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ /dev/null
@@ -1,2104 +0,0 @@
-/*
- * drivers/mtd/nand/pxa3xx_nand.c
- *
- * Copyright © 2005 Intel Corporation
- * Copyright © 2006 Marvell International Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * See Documentation/mtd/nand/pxa3xx-nand.txt for more details.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/dmaengine.h>
-#include <linux/dma-mapping.h>
-#include <linux/dma/pxa-dma.h>
-#include <linux/delay.h>
-#include <linux/clk.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
-#include <linux/io.h>
-#include <linux/iopoll.h>
-#include <linux/irq.h>
-#include <linux/slab.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
-#include <linux/platform_data/mtd-nand-pxa3xx.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
-
-#define	CHIP_DELAY_TIMEOUT	msecs_to_jiffies(200)
-#define NAND_STOP_DELAY		msecs_to_jiffies(40)
-#define PAGE_CHUNK_SIZE		(2048)
-
-/*
- * Define a buffer size for the initial command that detects the flash device:
- * STATUS, READID and PARAM.
- * ONFI param page is 256 bytes, and there are three redundant copies
- * to be read. JEDEC param page is 512 bytes, and there are also three
- * redundant copies to be read.
- * Hence this buffer should be at least 512 x 3. Let's pick 2048.
- */
-#define INIT_BUFFER_SIZE	2048
-
-/* System control register and bit to enable NAND on some SoCs */
-#define GENCONF_SOC_DEVICE_MUX	0x208
-#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
-
-/* registers and bit definitions */
-#define NDCR		(0x00) /* Control register */
-#define NDTR0CS0	(0x04) /* Timing Parameter 0 for CS0 */
-#define NDTR1CS0	(0x0C) /* Timing Parameter 1 for CS0 */
-#define NDSR		(0x14) /* Status Register */
-#define NDPCR		(0x18) /* Page Count Register */
-#define NDBDR0		(0x1C) /* Bad Block Register 0 */
-#define NDBDR1		(0x20) /* Bad Block Register 1 */
-#define NDECCCTRL	(0x28) /* ECC control */
-#define NDDB		(0x40) /* Data Buffer */
-#define NDCB0		(0x48) /* Command Buffer0 */
-#define NDCB1		(0x4C) /* Command Buffer1 */
-#define NDCB2		(0x50) /* Command Buffer2 */
-
-#define NDCR_SPARE_EN		(0x1 << 31)
-#define NDCR_ECC_EN		(0x1 << 30)
-#define NDCR_DMA_EN		(0x1 << 29)
-#define NDCR_ND_RUN		(0x1 << 28)
-#define NDCR_DWIDTH_C		(0x1 << 27)
-#define NDCR_DWIDTH_M		(0x1 << 26)
-#define NDCR_PAGE_SZ		(0x1 << 24)
-#define NDCR_NCSX		(0x1 << 23)
-#define NDCR_ND_MODE		(0x3 << 21)
-#define NDCR_NAND_MODE   	(0x0)
-#define NDCR_CLR_PG_CNT		(0x1 << 20)
-#define NFCV1_NDCR_ARB_CNTL	(0x1 << 19)
-#define NFCV2_NDCR_STOP_ON_UNCOR	(0x1 << 19)
-#define NDCR_RD_ID_CNT_MASK	(0x7 << 16)
-#define NDCR_RD_ID_CNT(x)	(((x) << 16) & NDCR_RD_ID_CNT_MASK)
-
-#define NDCR_RA_START		(0x1 << 15)
-#define NDCR_PG_PER_BLK		(0x1 << 14)
-#define NDCR_ND_ARB_EN		(0x1 << 12)
-#define NDCR_INT_MASK           (0xFFF)
-
-#define NDSR_MASK		(0xfff)
-#define NDSR_ERR_CNT_OFF	(16)
-#define NDSR_ERR_CNT_MASK       (0x1f)
-#define NDSR_ERR_CNT(sr)	((sr >> NDSR_ERR_CNT_OFF) & NDSR_ERR_CNT_MASK)
-#define NDSR_RDY                (0x1 << 12)
-#define NDSR_FLASH_RDY          (0x1 << 11)
-#define NDSR_CS0_PAGED		(0x1 << 10)
-#define NDSR_CS1_PAGED		(0x1 << 9)
-#define NDSR_CS0_CMDD		(0x1 << 8)
-#define NDSR_CS1_CMDD		(0x1 << 7)
-#define NDSR_CS0_BBD		(0x1 << 6)
-#define NDSR_CS1_BBD		(0x1 << 5)
-#define NDSR_UNCORERR		(0x1 << 4)
-#define NDSR_CORERR		(0x1 << 3)
-#define NDSR_WRDREQ		(0x1 << 2)
-#define NDSR_RDDREQ		(0x1 << 1)
-#define NDSR_WRCMDREQ		(0x1)
-
-#define NDCB0_LEN_OVRD		(0x1 << 28)
-#define NDCB0_ST_ROW_EN         (0x1 << 26)
-#define NDCB0_AUTO_RS		(0x1 << 25)
-#define NDCB0_CSEL		(0x1 << 24)
-#define NDCB0_EXT_CMD_TYPE_MASK	(0x7 << 29)
-#define NDCB0_EXT_CMD_TYPE(x)	(((x) << 29) & NDCB0_EXT_CMD_TYPE_MASK)
-#define NDCB0_CMD_TYPE_MASK	(0x7 << 21)
-#define NDCB0_CMD_TYPE(x)	(((x) << 21) & NDCB0_CMD_TYPE_MASK)
-#define NDCB0_NC		(0x1 << 20)
-#define NDCB0_DBC		(0x1 << 19)
-#define NDCB0_ADDR_CYC_MASK	(0x7 << 16)
-#define NDCB0_ADDR_CYC(x)	(((x) << 16) & NDCB0_ADDR_CYC_MASK)
-#define NDCB0_CMD2_MASK		(0xff << 8)
-#define NDCB0_CMD1_MASK		(0xff)
-#define NDCB0_ADDR_CYC_SHIFT	(16)
-
-#define EXT_CMD_TYPE_DISPATCH	6 /* Command dispatch */
-#define EXT_CMD_TYPE_NAKED_RW	5 /* Naked read or Naked write */
-#define EXT_CMD_TYPE_READ	4 /* Read */
-#define EXT_CMD_TYPE_DISP_WR	4 /* Command dispatch with write */
-#define EXT_CMD_TYPE_FINAL	3 /* Final command */
-#define EXT_CMD_TYPE_LAST_RW	1 /* Last naked read/write */
-#define EXT_CMD_TYPE_MONO	0 /* Monolithic read/write */
-
-/*
- * This should be large enough to read 'ONFI' and 'JEDEC'.
- * Let's use 7 bytes, which is the maximum ID count supported
- * by the controller (see NDCR_RD_ID_CNT_MASK).
- */
-#define READ_ID_BYTES		7
-
-/* macros for registers read/write */
-#define nand_writel(info, off, val)					\
-	do {								\
-		dev_vdbg(&info->pdev->dev,				\
-			 "%s():%d nand_writel(0x%x, 0x%04x)\n",		\
-			 __func__, __LINE__, (val), (off));		\
-		writel_relaxed((val), (info)->mmio_base + (off));	\
-	} while (0)
-
-#define nand_readl(info, off)						\
-	({								\
-		unsigned int _v;					\
-		_v = readl_relaxed((info)->mmio_base + (off));		\
-		dev_vdbg(&info->pdev->dev,				\
-			 "%s():%d nand_readl(0x%04x) = 0x%x\n",		\
-			 __func__, __LINE__, (off), _v);		\
-		_v;							\
-	})
-
-/* error code and state */
-enum {
-	ERR_NONE	= 0,
-	ERR_DMABUSERR	= -1,
-	ERR_SENDCMD	= -2,
-	ERR_UNCORERR	= -3,
-	ERR_BBERR	= -4,
-	ERR_CORERR	= -5,
-};
-
-enum {
-	STATE_IDLE = 0,
-	STATE_PREPARED,
-	STATE_CMD_HANDLE,
-	STATE_DMA_READING,
-	STATE_DMA_WRITING,
-	STATE_DMA_DONE,
-	STATE_PIO_READING,
-	STATE_PIO_WRITING,
-	STATE_CMD_DONE,
-	STATE_READY,
-};
-
-enum pxa3xx_nand_variant {
-	PXA3XX_NAND_VARIANT_PXA,
-	PXA3XX_NAND_VARIANT_ARMADA370,
-	PXA3XX_NAND_VARIANT_ARMADA_8K,
-};
-
-struct pxa3xx_nand_host {
-	struct nand_chip	chip;
-	void			*info_data;
-
-	/* page size of attached chip */
-	int			use_ecc;
-	int			cs;
-
-	/* calculated from pxa3xx_nand_flash data */
-	unsigned int		col_addr_cycles;
-	unsigned int		row_addr_cycles;
-};
-
-struct pxa3xx_nand_info {
-	struct nand_hw_control	controller;
-	struct platform_device	 *pdev;
-
-	struct clk		*clk;
-	void __iomem		*mmio_base;
-	unsigned long		mmio_phys;
-	struct completion	cmd_complete, dev_ready;
-
-	unsigned int 		buf_start;
-	unsigned int		buf_count;
-	unsigned int		buf_size;
-	unsigned int		data_buff_pos;
-	unsigned int		oob_buff_pos;
-
-	/* DMA information */
-	struct scatterlist	sg;
-	enum dma_data_direction	dma_dir;
-	struct dma_chan		*dma_chan;
-	dma_cookie_t		dma_cookie;
-	int			drcmr_dat;
-
-	unsigned char		*data_buff;
-	unsigned char		*oob_buff;
-	dma_addr_t 		data_buff_phys;
-	int 			data_dma_ch;
-
-	struct pxa3xx_nand_host *host[NUM_CHIP_SELECT];
-	unsigned int		state;
-
-	/*
-	 * This driver supports NFCv1 (as found in PXA SoC)
-	 * and NFCv2 (as found in Armada 370/XP SoC).
-	 */
-	enum pxa3xx_nand_variant variant;
-
-	int			cs;
-	int			use_ecc;	/* use HW ECC ? */
-	int			ecc_bch;	/* using BCH ECC? */
-	int			use_dma;	/* use DMA ? */
-	int			use_spare;	/* use spare ? */
-	int			need_wait;
-
-	/* Amount of real data per full chunk */
-	unsigned int		chunk_size;
-
-	/* Amount of spare data per full chunk */
-	unsigned int		spare_size;
-
-	/* Number of full chunks (i.e chunk_size + spare_size) */
-	unsigned int            nfullchunks;
-
-	/*
-	 * Total number of chunks. If equal to nfullchunks, then there
-	 * are only full chunks. Otherwise, there is one last chunk of
-	 * size (last_chunk_size + last_spare_size)
-	 */
-	unsigned int            ntotalchunks;
-
-	/* Amount of real data in the last chunk */
-	unsigned int		last_chunk_size;
-
-	/* Amount of spare data in the last chunk */
-	unsigned int		last_spare_size;
-
-	unsigned int		ecc_size;
-	unsigned int		ecc_err_cnt;
-	unsigned int		max_bitflips;
-	int 			retcode;
-
-	/*
-	 * Variables only valid during command
-	 * execution. step_chunk_size and step_spare_size is the
-	 * amount of real data and spare data in the current
-	 * chunk. cur_chunk is the current chunk being
-	 * read/programmed.
-	 */
-	unsigned int		step_chunk_size;
-	unsigned int		step_spare_size;
-	unsigned int            cur_chunk;
-
-	/* cached register value */
-	uint32_t		reg_ndcr;
-	uint32_t		ndtr0cs0;
-	uint32_t		ndtr1cs0;
-
-	/* generated NDCBx register values */
-	uint32_t		ndcb0;
-	uint32_t		ndcb1;
-	uint32_t		ndcb2;
-	uint32_t		ndcb3;
-};
-
-static bool use_dma = 1;
-module_param(use_dma, bool, 0444);
-MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW");
-
-struct pxa3xx_nand_timing {
-	unsigned int	tCH;  /* Enable signal hold time */
-	unsigned int	tCS;  /* Enable signal setup time */
-	unsigned int	tWH;  /* ND_nWE high duration */
-	unsigned int	tWP;  /* ND_nWE pulse time */
-	unsigned int	tRH;  /* ND_nRE high duration */
-	unsigned int	tRP;  /* ND_nRE pulse width */
-	unsigned int	tR;   /* ND_nWE high to ND_nRE low for read */
-	unsigned int	tWHR; /* ND_nWE high to ND_nRE low for status read */
-	unsigned int	tAR;  /* ND_ALE low to ND_nRE low delay */
-};
-
-struct pxa3xx_nand_flash {
-	uint32_t	chip_id;
-	unsigned int	flash_width;	/* Width of Flash memory (DWIDTH_M) */
-	unsigned int	dfc_width;	/* Width of flash controller(DWIDTH_C) */
-	struct pxa3xx_nand_timing *timing;	/* NAND Flash timing */
-};
-
-static struct pxa3xx_nand_timing timing[] = {
-	{ 40, 80, 60, 100, 80, 100, 90000, 400, 40, },
-	{ 10,  0, 20,  40, 30,  40, 11123, 110, 10, },
-	{ 10, 25, 15,  25, 15,  30, 25000,  60, 10, },
-	{ 10, 35, 15,  25, 15,  25, 25000,  60, 10, },
-};
-
-static struct pxa3xx_nand_flash builtin_flash_types[] = {
-	{ 0x46ec, 16, 16, &timing[1] },
-	{ 0xdaec,  8,  8, &timing[1] },
-	{ 0xd7ec,  8,  8, &timing[1] },
-	{ 0xa12c,  8,  8, &timing[2] },
-	{ 0xb12c, 16, 16, &timing[2] },
-	{ 0xdc2c,  8,  8, &timing[2] },
-	{ 0xcc2c, 16, 16, &timing[2] },
-	{ 0xba20, 16, 16, &timing[3] },
-};
-
-static int pxa3xx_ooblayout_ecc(struct mtd_info *mtd, int section,
-				struct mtd_oob_region *oobregion)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int nchunks = mtd->writesize / info->chunk_size;
-
-	if (section >= nchunks)
-		return -ERANGE;
-
-	oobregion->offset = ((info->ecc_size + info->spare_size) * section) +
-			    info->spare_size;
-	oobregion->length = info->ecc_size;
-
-	return 0;
-}
-
-static int pxa3xx_ooblayout_free(struct mtd_info *mtd, int section,
-				 struct mtd_oob_region *oobregion)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int nchunks = mtd->writesize / info->chunk_size;
-
-	if (section >= nchunks)
-		return -ERANGE;
-
-	if (!info->spare_size)
-		return 0;
-
-	oobregion->offset = section * (info->ecc_size + info->spare_size);
-	oobregion->length = info->spare_size;
-	if (!section) {
-		/*
-		 * Bootrom looks in bytes 0 & 5 for bad blocks for the
-		 * 4KB page / 4bit BCH combination.
-		 */
-		if (mtd->writesize == 4096 && info->chunk_size == 2048) {
-			oobregion->offset += 6;
-			oobregion->length -= 6;
-		} else {
-			oobregion->offset += 2;
-			oobregion->length -= 2;
-		}
-	}
-
-	return 0;
-}
-
-static const struct mtd_ooblayout_ops pxa3xx_ooblayout_ops = {
-	.ecc = pxa3xx_ooblayout_ecc,
-	.free = pxa3xx_ooblayout_free,
-};
-
-static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
-static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
-
-static struct nand_bbt_descr bbt_main_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
-		| NAND_BBT_2BIT | NAND_BBT_VERSION,
-	.offs =	8,
-	.len = 6,
-	.veroffs = 14,
-	.maxblocks = 8,		/* Last 8 blocks in each chip */
-	.pattern = bbt_pattern
-};
-
-static struct nand_bbt_descr bbt_mirror_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
-		| NAND_BBT_2BIT | NAND_BBT_VERSION,
-	.offs =	8,
-	.len = 6,
-	.veroffs = 14,
-	.maxblocks = 8,		/* Last 8 blocks in each chip */
-	.pattern = bbt_mirror_pattern
-};
-
-#define NDTR0_tCH(c)	(min((c), 7) << 19)
-#define NDTR0_tCS(c)	(min((c), 7) << 16)
-#define NDTR0_tWH(c)	(min((c), 7) << 11)
-#define NDTR0_tWP(c)	(min((c), 7) << 8)
-#define NDTR0_tRH(c)	(min((c), 7) << 3)
-#define NDTR0_tRP(c)	(min((c), 7) << 0)
-
-#define NDTR1_tR(c)	(min((c), 65535) << 16)
-#define NDTR1_tWHR(c)	(min((c), 15) << 4)
-#define NDTR1_tAR(c)	(min((c), 15) << 0)
-
-/* convert nano-seconds to nand flash controller clock cycles */
-#define ns2cycle(ns, clk)	(int)((ns) * (clk / 1000000) / 1000)
-
-static const struct of_device_id pxa3xx_nand_dt_ids[] = {
-	{
-		.compatible = "marvell,pxa3xx-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_PXA,
-	},
-	{
-		.compatible = "marvell,armada370-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_ARMADA370,
-	},
-	{
-		.compatible = "marvell,armada-8k-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_ARMADA_8K,
-	},
-	{}
-};
-MODULE_DEVICE_TABLE(of, pxa3xx_nand_dt_ids);
-
-static enum pxa3xx_nand_variant
-pxa3xx_nand_get_variant(struct platform_device *pdev)
-{
-	const struct of_device_id *of_id =
-			of_match_device(pxa3xx_nand_dt_ids, &pdev->dev);
-	if (!of_id)
-		return PXA3XX_NAND_VARIANT_PXA;
-	return (enum pxa3xx_nand_variant)of_id->data;
-}
-
-static void pxa3xx_nand_set_timing(struct pxa3xx_nand_host *host,
-				   const struct pxa3xx_nand_timing *t)
-{
-	struct pxa3xx_nand_info *info = host->info_data;
-	unsigned long nand_clk = clk_get_rate(info->clk);
-	uint32_t ndtr0, ndtr1;
-
-	ndtr0 = NDTR0_tCH(ns2cycle(t->tCH, nand_clk)) |
-		NDTR0_tCS(ns2cycle(t->tCS, nand_clk)) |
-		NDTR0_tWH(ns2cycle(t->tWH, nand_clk)) |
-		NDTR0_tWP(ns2cycle(t->tWP, nand_clk)) |
-		NDTR0_tRH(ns2cycle(t->tRH, nand_clk)) |
-		NDTR0_tRP(ns2cycle(t->tRP, nand_clk));
-
-	ndtr1 = NDTR1_tR(ns2cycle(t->tR, nand_clk)) |
-		NDTR1_tWHR(ns2cycle(t->tWHR, nand_clk)) |
-		NDTR1_tAR(ns2cycle(t->tAR, nand_clk));
-
-	info->ndtr0cs0 = ndtr0;
-	info->ndtr1cs0 = ndtr1;
-	nand_writel(info, NDTR0CS0, ndtr0);
-	nand_writel(info, NDTR1CS0, ndtr1);
-}
-
-static void pxa3xx_nand_set_sdr_timing(struct pxa3xx_nand_host *host,
-				       const struct nand_sdr_timings *t)
-{
-	struct pxa3xx_nand_info *info = host->info_data;
-	struct nand_chip *chip = &host->chip;
-	unsigned long nand_clk = clk_get_rate(info->clk);
-	uint32_t ndtr0, ndtr1;
-
-	u32 tCH_min = DIV_ROUND_UP(t->tCH_min, 1000);
-	u32 tCS_min = DIV_ROUND_UP(t->tCS_min, 1000);
-	u32 tWH_min = DIV_ROUND_UP(t->tWH_min, 1000);
-	u32 tWP_min = DIV_ROUND_UP(t->tWC_min - t->tWH_min, 1000);
-	u32 tREH_min = DIV_ROUND_UP(t->tREH_min, 1000);
-	u32 tRP_min = DIV_ROUND_UP(t->tRC_min - t->tREH_min, 1000);
-	u32 tR = chip->chip_delay * 1000;
-	u32 tWHR_min = DIV_ROUND_UP(t->tWHR_min, 1000);
-	u32 tAR_min = DIV_ROUND_UP(t->tAR_min, 1000);
-
-	/* fallback to a default value if tR = 0 */
-	if (!tR)
-		tR = 20000;
-
-	ndtr0 = NDTR0_tCH(ns2cycle(tCH_min, nand_clk)) |
-		NDTR0_tCS(ns2cycle(tCS_min, nand_clk)) |
-		NDTR0_tWH(ns2cycle(tWH_min, nand_clk)) |
-		NDTR0_tWP(ns2cycle(tWP_min, nand_clk)) |
-		NDTR0_tRH(ns2cycle(tREH_min, nand_clk)) |
-		NDTR0_tRP(ns2cycle(tRP_min, nand_clk));
-
-	ndtr1 = NDTR1_tR(ns2cycle(tR, nand_clk)) |
-		NDTR1_tWHR(ns2cycle(tWHR_min, nand_clk)) |
-		NDTR1_tAR(ns2cycle(tAR_min, nand_clk));
-
-	info->ndtr0cs0 = ndtr0;
-	info->ndtr1cs0 = ndtr1;
-	nand_writel(info, NDTR0CS0, ndtr0);
-	nand_writel(info, NDTR1CS0, ndtr1);
-}
-
-static int pxa3xx_nand_init_timings_compat(struct pxa3xx_nand_host *host,
-					   unsigned int *flash_width,
-					   unsigned int *dfc_width)
-{
-	struct nand_chip *chip = &host->chip;
-	struct pxa3xx_nand_info *info = host->info_data;
-	const struct pxa3xx_nand_flash *f = NULL;
-	int i, id, ntypes;
-	u8 idbuf[2];
-
-	ntypes = ARRAY_SIZE(builtin_flash_types);
-
-	nand_readid_op(chip, 0, idbuf, sizeof(idbuf));
-	id = idbuf[0] | (idbuf[1] << 8);
-
-	for (i = 0; i < ntypes; i++) {
-		f = &builtin_flash_types[i];
-
-		if (f->chip_id == id)
-			break;
-	}
-
-	if (i == ntypes) {
-		dev_err(&info->pdev->dev, "Error: timings not found\n");
-		return -EINVAL;
-	}
-
-	pxa3xx_nand_set_timing(host, f->timing);
-
-	*flash_width = f->flash_width;
-	*dfc_width = f->dfc_width;
-
-	return 0;
-}
-
-static int pxa3xx_nand_init_timings_onfi(struct pxa3xx_nand_host *host,
-					 int mode)
-{
-	const struct nand_sdr_timings *timings;
-
-	mode = fls(mode) - 1;
-	if (mode < 0)
-		mode = 0;
-
-	timings = onfi_async_timing_mode_to_sdr_timings(mode);
-	if (IS_ERR(timings))
-		return PTR_ERR(timings);
-
-	pxa3xx_nand_set_sdr_timing(host, timings);
-
-	return 0;
-}
-
-static int pxa3xx_nand_init(struct pxa3xx_nand_host *host)
-{
-	struct nand_chip *chip = &host->chip;
-	struct pxa3xx_nand_info *info = host->info_data;
-	unsigned int flash_width = 0, dfc_width = 0;
-	int mode, err;
-
-	mode = onfi_get_async_timing_mode(chip);
-	if (mode == ONFI_TIMING_MODE_UNKNOWN) {
-		err = pxa3xx_nand_init_timings_compat(host, &flash_width,
-						      &dfc_width);
-		if (err)
-			return err;
-
-		if (flash_width == 16) {
-			info->reg_ndcr |= NDCR_DWIDTH_M;
-			chip->options |= NAND_BUSWIDTH_16;
-		}
-
-		info->reg_ndcr |= (dfc_width == 16) ? NDCR_DWIDTH_C : 0;
-	} else {
-		err = pxa3xx_nand_init_timings_onfi(host, mode);
-		if (err)
-			return err;
-	}
-
-	return 0;
-}
-
-/**
- * NOTE: it is a must to set ND_RUN firstly, then write
- * command buffer, otherwise, it does not work.
- * We enable all the interrupt at the same time, and
- * let pxa3xx_nand_irq to handle all logic.
- */
-static void pxa3xx_nand_start(struct pxa3xx_nand_info *info)
-{
-	uint32_t ndcr;
-
-	ndcr = info->reg_ndcr;
-
-	if (info->use_ecc) {
-		ndcr |= NDCR_ECC_EN;
-		if (info->ecc_bch)
-			nand_writel(info, NDECCCTRL, 0x1);
-	} else {
-		ndcr &= ~NDCR_ECC_EN;
-		if (info->ecc_bch)
-			nand_writel(info, NDECCCTRL, 0x0);
-	}
-
-	if (info->use_dma)
-		ndcr |= NDCR_DMA_EN;
-	else
-		ndcr &= ~NDCR_DMA_EN;
-
-	if (info->use_spare)
-		ndcr |= NDCR_SPARE_EN;
-	else
-		ndcr &= ~NDCR_SPARE_EN;
-
-	ndcr |= NDCR_ND_RUN;
-
-	/* clear status bits and run */
-	nand_writel(info, NDSR, NDSR_MASK);
-	nand_writel(info, NDCR, 0);
-	nand_writel(info, NDCR, ndcr);
-}
-
-static void pxa3xx_nand_stop(struct pxa3xx_nand_info *info)
-{
-	uint32_t ndcr;
-	int timeout = NAND_STOP_DELAY;
-
-	/* wait RUN bit in NDCR become 0 */
-	ndcr = nand_readl(info, NDCR);
-	while ((ndcr & NDCR_ND_RUN) && (timeout-- > 0)) {
-		ndcr = nand_readl(info, NDCR);
-		udelay(1);
-	}
-
-	if (timeout <= 0) {
-		ndcr &= ~NDCR_ND_RUN;
-		nand_writel(info, NDCR, ndcr);
-	}
-	if (info->dma_chan)
-		dmaengine_terminate_all(info->dma_chan);
-
-	/* clear status bits */
-	nand_writel(info, NDSR, NDSR_MASK);
-}
-
-static void __maybe_unused
-enable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
-{
-	uint32_t ndcr;
-
-	ndcr = nand_readl(info, NDCR);
-	nand_writel(info, NDCR, ndcr & ~int_mask);
-}
-
-static void disable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
-{
-	uint32_t ndcr;
-
-	ndcr = nand_readl(info, NDCR);
-	nand_writel(info, NDCR, ndcr | int_mask);
-}
-
-static void drain_fifo(struct pxa3xx_nand_info *info, void *data, int len)
-{
-	if (info->ecc_bch) {
-		u32 val;
-		int ret;
-
-		/*
-		 * According to the datasheet, when reading from NDDB
-		 * with BCH enabled, after each 32 bytes reads, we
-		 * have to make sure that the NDSR.RDDREQ bit is set.
-		 *
-		 * Drain the FIFO 8 32 bits reads at a time, and skip
-		 * the polling on the last read.
-		 */
-		while (len > 8) {
-			ioread32_rep(info->mmio_base + NDDB, data, 8);
-
-			ret = readl_relaxed_poll_timeout(info->mmio_base + NDSR, val,
-							 val & NDSR_RDDREQ, 1000, 5000);
-			if (ret) {
-				dev_err(&info->pdev->dev,
-					"Timeout on RDDREQ while draining the FIFO\n");
-				return;
-			}
-
-			data += 32;
-			len -= 8;
-		}
-	}
-
-	ioread32_rep(info->mmio_base + NDDB, data, len);
-}
-
-static void handle_data_pio(struct pxa3xx_nand_info *info)
-{
-	switch (info->state) {
-	case STATE_PIO_WRITING:
-		if (info->step_chunk_size)
-			writesl(info->mmio_base + NDDB,
-				info->data_buff + info->data_buff_pos,
-				DIV_ROUND_UP(info->step_chunk_size, 4));
-
-		if (info->step_spare_size)
-			writesl(info->mmio_base + NDDB,
-				info->oob_buff + info->oob_buff_pos,
-				DIV_ROUND_UP(info->step_spare_size, 4));
-		break;
-	case STATE_PIO_READING:
-		if (info->step_chunk_size)
-			drain_fifo(info,
-				   info->data_buff + info->data_buff_pos,
-				   DIV_ROUND_UP(info->step_chunk_size, 4));
-
-		if (info->step_spare_size)
-			drain_fifo(info,
-				   info->oob_buff + info->oob_buff_pos,
-				   DIV_ROUND_UP(info->step_spare_size, 4));
-		break;
-	default:
-		dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
-				info->state);
-		BUG();
-	}
-
-	/* Update buffer pointers for multi-page read/write */
-	info->data_buff_pos += info->step_chunk_size;
-	info->oob_buff_pos += info->step_spare_size;
-}
-
-static void pxa3xx_nand_data_dma_irq(void *data)
-{
-	struct pxa3xx_nand_info *info = data;
-	struct dma_tx_state state;
-	enum dma_status status;
-
-	status = dmaengine_tx_status(info->dma_chan, info->dma_cookie, &state);
-	if (likely(status == DMA_COMPLETE)) {
-		info->state = STATE_DMA_DONE;
-	} else {
-		dev_err(&info->pdev->dev, "DMA error on data channel\n");
-		info->retcode = ERR_DMABUSERR;
-	}
-	dma_unmap_sg(info->dma_chan->device->dev, &info->sg, 1, info->dma_dir);
-
-	nand_writel(info, NDSR, NDSR_WRDREQ | NDSR_RDDREQ);
-	enable_int(info, NDCR_INT_MASK);
-}
-
-static void start_data_dma(struct pxa3xx_nand_info *info)
-{
-	enum dma_transfer_direction direction;
-	struct dma_async_tx_descriptor *tx;
-
-	switch (info->state) {
-	case STATE_DMA_WRITING:
-		info->dma_dir = DMA_TO_DEVICE;
-		direction = DMA_MEM_TO_DEV;
-		break;
-	case STATE_DMA_READING:
-		info->dma_dir = DMA_FROM_DEVICE;
-		direction = DMA_DEV_TO_MEM;
-		break;
-	default:
-		dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
-				info->state);
-		BUG();
-	}
-	info->sg.length = info->chunk_size;
-	if (info->use_spare)
-		info->sg.length += info->spare_size + info->ecc_size;
-	dma_map_sg(info->dma_chan->device->dev, &info->sg, 1, info->dma_dir);
-
-	tx = dmaengine_prep_slave_sg(info->dma_chan, &info->sg, 1, direction,
-				     DMA_PREP_INTERRUPT);
-	if (!tx) {
-		dev_err(&info->pdev->dev, "prep_slave_sg() failed\n");
-		return;
-	}
-	tx->callback = pxa3xx_nand_data_dma_irq;
-	tx->callback_param = info;
-	info->dma_cookie = dmaengine_submit(tx);
-	dma_async_issue_pending(info->dma_chan);
-	dev_dbg(&info->pdev->dev, "%s(dir=%d cookie=%x size=%u)\n",
-		__func__, direction, info->dma_cookie, info->sg.length);
-}
-
-static irqreturn_t pxa3xx_nand_irq_thread(int irq, void *data)
-{
-	struct pxa3xx_nand_info *info = data;
-
-	handle_data_pio(info);
-
-	info->state = STATE_CMD_DONE;
-	nand_writel(info, NDSR, NDSR_WRDREQ | NDSR_RDDREQ);
-
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t pxa3xx_nand_irq(int irq, void *devid)
-{
-	struct pxa3xx_nand_info *info = devid;
-	unsigned int status, is_completed = 0, is_ready = 0;
-	unsigned int ready, cmd_done;
-	irqreturn_t ret = IRQ_HANDLED;
-
-	if (info->cs == 0) {
-		ready           = NDSR_FLASH_RDY;
-		cmd_done        = NDSR_CS0_CMDD;
-	} else {
-		ready           = NDSR_RDY;
-		cmd_done        = NDSR_CS1_CMDD;
-	}
-
-	status = nand_readl(info, NDSR);
-
-	if (status & NDSR_UNCORERR)
-		info->retcode = ERR_UNCORERR;
-	if (status & NDSR_CORERR) {
-		info->retcode = ERR_CORERR;
-		if ((info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		     info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K) &&
-		    info->ecc_bch)
-			info->ecc_err_cnt = NDSR_ERR_CNT(status);
-		else
-			info->ecc_err_cnt = 1;
-
-		/*
-		 * Each chunk composing a page is corrected independently,
-		 * and we need to store maximum number of corrected bitflips
-		 * to return it to the MTD layer in ecc.read_page().
-		 */
-		info->max_bitflips = max_t(unsigned int,
-					   info->max_bitflips,
-					   info->ecc_err_cnt);
-	}
-	if (status & (NDSR_RDDREQ | NDSR_WRDREQ)) {
-		/* whether use dma to transfer data */
-		if (info->use_dma) {
-			disable_int(info, NDCR_INT_MASK);
-			info->state = (status & NDSR_RDDREQ) ?
-				      STATE_DMA_READING : STATE_DMA_WRITING;
-			start_data_dma(info);
-			goto NORMAL_IRQ_EXIT;
-		} else {
-			info->state = (status & NDSR_RDDREQ) ?
-				      STATE_PIO_READING : STATE_PIO_WRITING;
-			ret = IRQ_WAKE_THREAD;
-			goto NORMAL_IRQ_EXIT;
-		}
-	}
-	if (status & cmd_done) {
-		info->state = STATE_CMD_DONE;
-		is_completed = 1;
-	}
-	if (status & ready) {
-		info->state = STATE_READY;
-		is_ready = 1;
-	}
-
-	/*
-	 * Clear all status bit before issuing the next command, which
-	 * can and will alter the status bits and will deserve a new
-	 * interrupt on its own. This lets the controller exit the IRQ
-	 */
-	nand_writel(info, NDSR, status);
-
-	if (status & NDSR_WRCMDREQ) {
-		status &= ~NDSR_WRCMDREQ;
-		info->state = STATE_CMD_HANDLE;
-
-		/*
-		 * Command buffer registers NDCB{0-2} (and optionally NDCB3)
-		 * must be loaded by writing directly either 12 or 16
-		 * bytes directly to NDCB0, four bytes at a time.
-		 *
-		 * Direct write access to NDCB1, NDCB2 and NDCB3 is ignored
-		 * but each NDCBx register can be read.
-		 */
-		nand_writel(info, NDCB0, info->ndcb0);
-		nand_writel(info, NDCB0, info->ndcb1);
-		nand_writel(info, NDCB0, info->ndcb2);
-
-		/* NDCB3 register is available in NFCv2 (Armada 370/XP SoC) */
-		if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K)
-			nand_writel(info, NDCB0, info->ndcb3);
-	}
-
-	if (is_completed)
-		complete(&info->cmd_complete);
-	if (is_ready)
-		complete(&info->dev_ready);
-NORMAL_IRQ_EXIT:
-	return ret;
-}
-
-static inline int is_buf_blank(uint8_t *buf, size_t len)
-{
-	for (; len > 0; len--)
-		if (*buf++ != 0xff)
-			return 0;
-	return 1;
-}
-
-static void set_command_address(struct pxa3xx_nand_info *info,
-		unsigned int page_size, uint16_t column, int page_addr)
-{
-	/* small page addr setting */
-	if (page_size < PAGE_CHUNK_SIZE) {
-		info->ndcb1 = ((page_addr & 0xFFFFFF) << 8)
-				| (column & 0xFF);
-
-		info->ndcb2 = 0;
-	} else {
-		info->ndcb1 = ((page_addr & 0xFFFF) << 16)
-				| (column & 0xFFFF);
-
-		if (page_addr & 0xFF0000)
-			info->ndcb2 = (page_addr & 0xFF0000) >> 16;
-		else
-			info->ndcb2 = 0;
-	}
-}
-
-static void prepare_start_command(struct pxa3xx_nand_info *info, int command)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct mtd_info *mtd = nand_to_mtd(&host->chip);
-
-	/* reset data and oob column point to handle data */
-	info->buf_start		= 0;
-	info->buf_count		= 0;
-	info->data_buff_pos	= 0;
-	info->oob_buff_pos	= 0;
-	info->step_chunk_size   = 0;
-	info->step_spare_size   = 0;
-	info->cur_chunk         = 0;
-	info->use_ecc		= 0;
-	info->use_spare		= 1;
-	info->retcode		= ERR_NONE;
-	info->ecc_err_cnt	= 0;
-	info->ndcb3		= 0;
-	info->need_wait		= 0;
-
-	switch (command) {
-	case NAND_CMD_READ0:
-	case NAND_CMD_PAGEPROG:
-		info->use_ecc = 1;
-		break;
-	case NAND_CMD_PARAM:
-		info->use_spare = 0;
-		break;
-	default:
-		info->ndcb1 = 0;
-		info->ndcb2 = 0;
-		break;
-	}
-
-	/*
-	 * If we are about to issue a read command, or about to set
-	 * the write address, then clean the data buffer.
-	 */
-	if (command == NAND_CMD_READ0 ||
-	    command == NAND_CMD_READOOB ||
-	    command == NAND_CMD_SEQIN) {
-
-		info->buf_count = mtd->writesize + mtd->oobsize;
-		memset(info->data_buff, 0xFF, info->buf_count);
-	}
-
-}
-
-static int prepare_set_command(struct pxa3xx_nand_info *info, int command,
-		int ext_cmd_type, uint16_t column, int page_addr)
-{
-	int addr_cycle, exec_cmd;
-	struct pxa3xx_nand_host *host;
-	struct mtd_info *mtd;
-
-	host = info->host[info->cs];
-	mtd = nand_to_mtd(&host->chip);
-	addr_cycle = 0;
-	exec_cmd = 1;
-
-	if (info->cs != 0)
-		info->ndcb0 = NDCB0_CSEL;
-	else
-		info->ndcb0 = 0;
-
-	if (command == NAND_CMD_SEQIN)
-		exec_cmd = 0;
-
-	addr_cycle = NDCB0_ADDR_CYC(host->row_addr_cycles
-				    + host->col_addr_cycles);
-
-	switch (command) {
-	case NAND_CMD_READOOB:
-	case NAND_CMD_READ0:
-		info->buf_start = column;
-		info->ndcb0 |= NDCB0_CMD_TYPE(0)
-				| addr_cycle
-				| NAND_CMD_READ0;
-
-		if (command == NAND_CMD_READOOB)
-			info->buf_start += mtd->writesize;
-
-		if (info->cur_chunk < info->nfullchunks) {
-			info->step_chunk_size = info->chunk_size;
-			info->step_spare_size = info->spare_size;
-		} else {
-			info->step_chunk_size = info->last_chunk_size;
-			info->step_spare_size = info->last_spare_size;
-		}
-
-		/*
-		 * Multiple page read needs an 'extended command type' field,
-		 * which is either naked-read or last-read according to the
-		 * state.
-		 */
-		if (mtd->writesize == PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_DBC | (NAND_CMD_READSTART << 8);
-		} else if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_DBC | (NAND_CMD_READSTART << 8)
-					| NDCB0_LEN_OVRD
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type);
-			info->ndcb3 = info->step_chunk_size +
-				info->step_spare_size;
-		}
-
-		set_command_address(info, mtd->writesize, column, page_addr);
-		break;
-
-	case NAND_CMD_SEQIN:
-
-		info->buf_start = column;
-		set_command_address(info, mtd->writesize, 0, page_addr);
-
-		/*
-		 * Multiple page programming needs to execute the initial
-		 * SEQIN command that sets the page address.
-		 */
-		if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-				| NDCB0_EXT_CMD_TYPE(ext_cmd_type)
-				| addr_cycle
-				| command;
-			exec_cmd = 1;
-		}
-		break;
-
-	case NAND_CMD_PAGEPROG:
-		if (is_buf_blank(info->data_buff,
-					(mtd->writesize + mtd->oobsize))) {
-			exec_cmd = 0;
-			break;
-		}
-
-		if (info->cur_chunk < info->nfullchunks) {
-			info->step_chunk_size = info->chunk_size;
-			info->step_spare_size = info->spare_size;
-		} else {
-			info->step_chunk_size = info->last_chunk_size;
-			info->step_spare_size = info->last_spare_size;
-		}
-
-		/* Second command setting for large pages */
-		if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			/*
-			 * Multiple page write uses the 'extended command'
-			 * field. This can be used to issue a command dispatch
-			 * or a naked-write depending on the current stage.
-			 */
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-					| NDCB0_LEN_OVRD
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type);
-			info->ndcb3 = info->step_chunk_size +
-				      info->step_spare_size;
-
-			/*
-			 * This is the command dispatch that completes a chunked
-			 * page program operation.
-			 */
-			if (info->cur_chunk == info->ntotalchunks) {
-				info->ndcb0 = NDCB0_CMD_TYPE(0x1)
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type)
-					| command;
-				info->ndcb1 = 0;
-				info->ndcb2 = 0;
-				info->ndcb3 = 0;
-			}
-		} else {
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-					| NDCB0_AUTO_RS
-					| NDCB0_ST_ROW_EN
-					| NDCB0_DBC
-					| (NAND_CMD_PAGEPROG << 8)
-					| NAND_CMD_SEQIN
-					| addr_cycle;
-		}
-		break;
-
-	case NAND_CMD_PARAM:
-		info->buf_count = INIT_BUFFER_SIZE;
-		info->ndcb0 |= NDCB0_CMD_TYPE(0)
-				| NDCB0_ADDR_CYC(1)
-				| NDCB0_LEN_OVRD
-				| command;
-		info->ndcb1 = (column & 0xFF);
-		info->ndcb3 = INIT_BUFFER_SIZE;
-		info->step_chunk_size = INIT_BUFFER_SIZE;
-		break;
-
-	case NAND_CMD_READID:
-		info->buf_count = READ_ID_BYTES;
-		info->ndcb0 |= NDCB0_CMD_TYPE(3)
-				| NDCB0_ADDR_CYC(1)
-				| command;
-		info->ndcb1 = (column & 0xFF);
-
-		info->step_chunk_size = 8;
-		break;
-	case NAND_CMD_STATUS:
-		info->buf_count = 1;
-		info->ndcb0 |= NDCB0_CMD_TYPE(4)
-				| NDCB0_ADDR_CYC(1)
-				| command;
-
-		info->step_chunk_size = 8;
-		break;
-
-	case NAND_CMD_ERASE1:
-		info->ndcb0 |= NDCB0_CMD_TYPE(2)
-				| NDCB0_AUTO_RS
-				| NDCB0_ADDR_CYC(3)
-				| NDCB0_DBC
-				| (NAND_CMD_ERASE2 << 8)
-				| NAND_CMD_ERASE1;
-		info->ndcb1 = page_addr;
-		info->ndcb2 = 0;
-
-		break;
-	case NAND_CMD_RESET:
-		info->ndcb0 |= NDCB0_CMD_TYPE(5)
-				| command;
-
-		break;
-
-	case NAND_CMD_ERASE2:
-		exec_cmd = 0;
-		break;
-
-	default:
-		exec_cmd = 0;
-		dev_err(&info->pdev->dev, "non-supported command %x\n",
-				command);
-		break;
-	}
-
-	return exec_cmd;
-}
-
-static void nand_cmdfunc(struct mtd_info *mtd, unsigned command,
-			 int column, int page_addr)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int exec_cmd;
-
-	/*
-	 * if this is a x16 device ,then convert the input
-	 * "byte" address into a "word" address appropriate
-	 * for indexing a word-oriented device
-	 */
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		column /= 2;
-
-	/*
-	 * There may be different NAND chip hooked to
-	 * different chip select, so check whether
-	 * chip select has been changed, if yes, reset the timing
-	 */
-	if (info->cs != host->cs) {
-		info->cs = host->cs;
-		nand_writel(info, NDTR0CS0, info->ndtr0cs0);
-		nand_writel(info, NDTR1CS0, info->ndtr1cs0);
-	}
-
-	prepare_start_command(info, command);
-
-	info->state = STATE_PREPARED;
-	exec_cmd = prepare_set_command(info, command, 0, column, page_addr);
-
-	if (exec_cmd) {
-		init_completion(&info->cmd_complete);
-		init_completion(&info->dev_ready);
-		info->need_wait = 1;
-		pxa3xx_nand_start(info);
-
-		if (!wait_for_completion_timeout(&info->cmd_complete,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Wait time out!!!\n");
-			/* Stop State Machine for next command cycle */
-			pxa3xx_nand_stop(info);
-		}
-	}
-	info->state = STATE_IDLE;
-}
-
-static void nand_cmdfunc_extended(struct mtd_info *mtd,
-				  const unsigned command,
-				  int column, int page_addr)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int exec_cmd, ext_cmd_type;
-
-	/*
-	 * if this is a x16 device then convert the input
-	 * "byte" address into a "word" address appropriate
-	 * for indexing a word-oriented device
-	 */
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		column /= 2;
-
-	/*
-	 * There may be different NAND chip hooked to
-	 * different chip select, so check whether
-	 * chip select has been changed, if yes, reset the timing
-	 */
-	if (info->cs != host->cs) {
-		info->cs = host->cs;
-		nand_writel(info, NDTR0CS0, info->ndtr0cs0);
-		nand_writel(info, NDTR1CS0, info->ndtr1cs0);
-	}
-
-	/* Select the extended command for the first command */
-	switch (command) {
-	case NAND_CMD_READ0:
-	case NAND_CMD_READOOB:
-		ext_cmd_type = EXT_CMD_TYPE_MONO;
-		break;
-	case NAND_CMD_SEQIN:
-		ext_cmd_type = EXT_CMD_TYPE_DISPATCH;
-		break;
-	case NAND_CMD_PAGEPROG:
-		ext_cmd_type = EXT_CMD_TYPE_NAKED_RW;
-		break;
-	default:
-		ext_cmd_type = 0;
-		break;
-	}
-
-	prepare_start_command(info, command);
-
-	/*
-	 * Prepare the "is ready" completion before starting a command
-	 * transaction sequence. If the command is not executed the
-	 * completion will be completed, see below.
-	 *
-	 * We can do that inside the loop because the command variable
-	 * is invariant and thus so is the exec_cmd.
-	 */
-	info->need_wait = 1;
-	init_completion(&info->dev_ready);
-	do {
-		info->state = STATE_PREPARED;
-
-		exec_cmd = prepare_set_command(info, command, ext_cmd_type,
-					       column, page_addr);
-		if (!exec_cmd) {
-			info->need_wait = 0;
-			complete(&info->dev_ready);
-			break;
-		}
-
-		init_completion(&info->cmd_complete);
-		pxa3xx_nand_start(info);
-
-		if (!wait_for_completion_timeout(&info->cmd_complete,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Wait time out!!!\n");
-			/* Stop State Machine for next command cycle */
-			pxa3xx_nand_stop(info);
-			break;
-		}
-
-		/* Only a few commands need several steps */
-		if (command != NAND_CMD_PAGEPROG &&
-		    command != NAND_CMD_READ0    &&
-		    command != NAND_CMD_READOOB)
-			break;
-
-		info->cur_chunk++;
-
-		/* Check if the sequence is complete */
-		if (info->cur_chunk == info->ntotalchunks && command != NAND_CMD_PAGEPROG)
-			break;
-
-		/*
-		 * After a splitted program command sequence has issued
-		 * the command dispatch, the command sequence is complete.
-		 */
-		if (info->cur_chunk == (info->ntotalchunks + 1) &&
-		    command == NAND_CMD_PAGEPROG &&
-		    ext_cmd_type == EXT_CMD_TYPE_DISPATCH)
-			break;
-
-		if (command == NAND_CMD_READ0 || command == NAND_CMD_READOOB) {
-			/* Last read: issue a 'last naked read' */
-			if (info->cur_chunk == info->ntotalchunks - 1)
-				ext_cmd_type = EXT_CMD_TYPE_LAST_RW;
-			else
-				ext_cmd_type = EXT_CMD_TYPE_NAKED_RW;
-
-		/*
-		 * If a splitted program command has no more data to transfer,
-		 * the command dispatch must be issued to complete.
-		 */
-		} else if (command == NAND_CMD_PAGEPROG &&
-			   info->cur_chunk == info->ntotalchunks) {
-				ext_cmd_type = EXT_CMD_TYPE_DISPATCH;
-		}
-	} while (1);
-
-	info->state = STATE_IDLE;
-}
-
-static int pxa3xx_nand_write_page_hwecc(struct mtd_info *mtd,
-		struct nand_chip *chip, const uint8_t *buf, int oob_required,
-		int page)
-{
-	nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize);
-	chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
-
-	return nand_prog_page_end_op(chip);
-}
-
-static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd,
-		struct nand_chip *chip, uint8_t *buf, int oob_required,
-		int page)
-{
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-
-	nand_read_page_op(chip, page, 0, buf, mtd->writesize);
-	chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
-
-	if (info->retcode == ERR_CORERR && info->use_ecc) {
-		mtd->ecc_stats.corrected += info->ecc_err_cnt;
-
-	} else if (info->retcode == ERR_UNCORERR) {
-		/*
-		 * for blank page (all 0xff), HW will calculate its ECC as
-		 * 0, which is different from the ECC information within
-		 * OOB, ignore such uncorrectable errors
-		 */
-		if (is_buf_blank(buf, mtd->writesize))
-			info->retcode = ERR_NONE;
-		else
-			mtd->ecc_stats.failed++;
-	}
-
-	return info->max_bitflips;
-}
-
-static uint8_t pxa3xx_nand_read_byte(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	char retval = 0xFF;
-
-	if (info->buf_start < info->buf_count)
-		/* Has just send a new command? */
-		retval = info->data_buff[info->buf_start++];
-
-	return retval;
-}
-
-static u16 pxa3xx_nand_read_word(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	u16 retval = 0xFFFF;
-
-	if (!(info->buf_start & 0x01) && info->buf_start < info->buf_count) {
-		retval = *((u16 *)(info->data_buff+info->buf_start));
-		info->buf_start += 2;
-	}
-	return retval;
-}
-
-static void pxa3xx_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int real_len = min_t(size_t, len, info->buf_count - info->buf_start);
-
-	memcpy(buf, info->data_buff + info->buf_start, real_len);
-	info->buf_start += real_len;
-}
-
-static void pxa3xx_nand_write_buf(struct mtd_info *mtd,
-		const uint8_t *buf, int len)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int real_len = min_t(size_t, len, info->buf_count - info->buf_start);
-
-	memcpy(info->data_buff + info->buf_start, buf, real_len);
-	info->buf_start += real_len;
-}
-
-static void pxa3xx_nand_select_chip(struct mtd_info *mtd, int chip)
-{
-	return;
-}
-
-static int pxa3xx_nand_waitfunc(struct mtd_info *mtd, struct nand_chip *this)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-
-	if (info->need_wait) {
-		info->need_wait = 0;
-		if (!wait_for_completion_timeout(&info->dev_ready,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Ready time out!!!\n");
-			return NAND_STATUS_FAIL;
-		}
-	}
-
-	/* pxa3xx_nand_send_command has waited for command complete */
-	if (this->state == FL_WRITING || this->state == FL_ERASING) {
-		if (info->retcode == ERR_NONE)
-			return 0;
-		else
-			return NAND_STATUS_FAIL;
-	}
-
-	return NAND_STATUS_READY;
-}
-
-static int pxa3xx_nand_config_ident(struct pxa3xx_nand_info *info)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	const struct nand_sdr_timings *timings;
-
-	/* Configure default flash values */
-	info->chunk_size = PAGE_CHUNK_SIZE;
-	info->reg_ndcr = 0x0; /* enable all interrupts */
-	info->reg_ndcr |= (pdata->enable_arbiter) ? NDCR_ND_ARB_EN : 0;
-	info->reg_ndcr |= NDCR_RD_ID_CNT(READ_ID_BYTES);
-	info->reg_ndcr |= NDCR_SPARE_EN;
-
-	/* use the common timing to make a try */
-	timings = onfi_async_timing_mode_to_sdr_timings(0);
-	if (IS_ERR(timings))
-		return PTR_ERR(timings);
-
-	pxa3xx_nand_set_sdr_timing(host, timings);
-	return 0;
-}
-
-static void pxa3xx_nand_config_tail(struct pxa3xx_nand_info *info)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct nand_chip *chip = &host->chip;
-	struct mtd_info *mtd = nand_to_mtd(chip);
-
-	info->reg_ndcr |= (host->col_addr_cycles == 2) ? NDCR_RA_START : 0;
-	info->reg_ndcr |= (chip->page_shift == 6) ? NDCR_PG_PER_BLK : 0;
-	info->reg_ndcr |= (mtd->writesize == 2048) ? NDCR_PAGE_SZ : 0;
-}
-
-static void pxa3xx_nand_detect_config(struct pxa3xx_nand_info *info)
-{
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	uint32_t ndcr = nand_readl(info, NDCR);
-
-	/* Set an initial chunk size */
-	info->chunk_size = ndcr & NDCR_PAGE_SZ ? 2048 : 512;
-	info->reg_ndcr = ndcr &
-		~(NDCR_INT_MASK | NDCR_ND_ARB_EN | NFCV1_NDCR_ARB_CNTL);
-	info->reg_ndcr |= (pdata->enable_arbiter) ? NDCR_ND_ARB_EN : 0;
-	info->ndtr0cs0 = nand_readl(info, NDTR0CS0);
-	info->ndtr1cs0 = nand_readl(info, NDTR1CS0);
-}
-
-static int pxa3xx_nand_init_buff(struct pxa3xx_nand_info *info)
-{
-	struct platform_device *pdev = info->pdev;
-	struct dma_slave_config	config;
-	dma_cap_mask_t mask;
-	struct pxad_param param;
-	int ret;
-
-	info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
-	if (info->data_buff == NULL)
-		return -ENOMEM;
-	if (use_dma == 0)
-		return 0;
-
-	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
-	if (ret)
-		return ret;
-
-	sg_init_one(&info->sg, info->data_buff, info->buf_size);
-	dma_cap_zero(mask);
-	dma_cap_set(DMA_SLAVE, mask);
-	param.prio = PXAD_PRIO_LOWEST;
-	param.drcmr = info->drcmr_dat;
-	info->dma_chan = dma_request_slave_channel_compat(mask, pxad_filter_fn,
-							  &param, &pdev->dev,
-							  "data");
-	if (!info->dma_chan) {
-		dev_err(&pdev->dev, "unable to request data dma channel\n");
-		return -ENODEV;
-	}
-
-	memset(&config, 0, sizeof(config));
-	config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-	config.src_addr = info->mmio_phys + NDDB;
-	config.dst_addr = info->mmio_phys + NDDB;
-	config.src_maxburst = 32;
-	config.dst_maxburst = 32;
-	ret = dmaengine_slave_config(info->dma_chan, &config);
-	if (ret < 0) {
-		dev_err(&info->pdev->dev,
-			"dma channel configuration failed: %d\n",
-			ret);
-		return ret;
-	}
-
-	/*
-	 * Now that DMA buffers are allocated we turn on
-	 * DMA proper for I/O operations.
-	 */
-	info->use_dma = 1;
-	return 0;
-}
-
-static void pxa3xx_nand_free_buff(struct pxa3xx_nand_info *info)
-{
-	if (info->use_dma) {
-		dmaengine_terminate_all(info->dma_chan);
-		dma_release_channel(info->dma_chan);
-	}
-	kfree(info->data_buff);
-}
-
-static int pxa_ecc_init(struct pxa3xx_nand_info *info,
-			struct mtd_info *mtd,
-			int strength, int ecc_stepsize, int page_size)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct nand_ecc_ctrl *ecc = &chip->ecc;
-
-	if (strength == 1 && ecc_stepsize == 512 && page_size == 2048) {
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 2048;
-		info->spare_size = 40;
-		info->ecc_size = 24;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = 512;
-		ecc->strength = 1;
-
-	} else if (strength == 1 && ecc_stepsize == 512 && page_size == 512) {
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 512;
-		info->spare_size = 8;
-		info->ecc_size = 8;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = 512;
-		ecc->strength = 1;
-
-	/*
-	 * Required ECC: 4-bit correction per 512 bytes
-	 * Select: 16-bit correction per 2048 bytes
-	 */
-	} else if (strength == 4 && ecc_stepsize == 512 && page_size == 2048) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 2048;
-		info->spare_size = 32;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-
-	} else if (strength == 4 && ecc_stepsize == 512 && page_size == 4096) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 2;
-		info->ntotalchunks = 2;
-		info->chunk_size = 2048;
-		info->spare_size = 32;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-
-	/*
-	 * Required ECC: 8-bit correction per 512 bytes
-	 * Select: 16-bit correction per 1024 bytes
-	 */
-	} else if (strength == 8 && ecc_stepsize == 512 && page_size == 4096) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 4;
-		info->ntotalchunks = 5;
-		info->chunk_size = 1024;
-		info->spare_size = 0;
-		info->last_chunk_size = 0;
-		info->last_spare_size = 64;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-	} else {
-		dev_err(&info->pdev->dev,
-			"ECC strength %d at page size %d is not supported\n",
-			strength, page_size);
-		return -ENODEV;
-	}
-
-	dev_info(&info->pdev->dev, "ECC strength %d, ECC step size %d\n",
-		 ecc->strength, ecc->size);
-	return 0;
-}
-
-static int pxa3xx_nand_scan(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	int ret;
-	uint16_t ecc_strength, ecc_step;
-
-	if (pdata->keep_config) {
-		pxa3xx_nand_detect_config(info);
-	} else {
-		ret = pxa3xx_nand_config_ident(info);
-		if (ret)
-			return ret;
-	}
-
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		chip->options |= NAND_BUSWIDTH_16;
-
-	/* Device detection must be done with ECC disabled */
-	if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-	    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K)
-		nand_writel(info, NDECCCTRL, 0x0);
-
-	if (pdata->flash_bbt)
-		chip->bbt_options |= NAND_BBT_USE_FLASH;
-
-	chip->ecc.strength = pdata->ecc_strength;
-	chip->ecc.size = pdata->ecc_step_size;
-
-	ret = nand_scan_ident(mtd, 1, NULL);
-	if (ret)
-		return ret;
-
-	if (!pdata->keep_config) {
-		ret = pxa3xx_nand_init(host);
-		if (ret) {
-			dev_err(&info->pdev->dev, "Failed to init nand: %d\n",
-				ret);
-			return ret;
-		}
-	}
-
-	if (chip->bbt_options & NAND_BBT_USE_FLASH) {
-		/*
-		 * We'll use a bad block table stored in-flash and don't
-		 * allow writing the bad block marker to the flash.
-		 */
-		chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
-		chip->bbt_td = &bbt_main_descr;
-		chip->bbt_md = &bbt_mirror_descr;
-	}
-
-	/*
-	 * If the page size is bigger than the FIFO size, let's check
-	 * we are given the right variant and then switch to the extended
-	 * (aka splitted) command handling,
-	 */
-	if (mtd->writesize > PAGE_CHUNK_SIZE) {
-		if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K) {
-			chip->cmdfunc = nand_cmdfunc_extended;
-		} else {
-			dev_err(&info->pdev->dev,
-				"unsupported page size on this variant\n");
-			return -ENODEV;
-		}
-	}
-
-	ecc_strength = chip->ecc.strength;
-	ecc_step = chip->ecc.size;
-	if (!ecc_strength || !ecc_step) {
-		ecc_strength = chip->ecc_strength_ds;
-		ecc_step = chip->ecc_step_ds;
-	}
-
-	/* Set default ECC strength requirements on non-ONFI devices */
-	if (ecc_strength < 1 && ecc_step < 1) {
-		ecc_strength = 1;
-		ecc_step = 512;
-	}
-
-	ret = pxa_ecc_init(info, mtd, ecc_strength,
-			   ecc_step, mtd->writesize);
-	if (ret)
-		return ret;
-
-	/* calculate addressing information */
-	if (mtd->writesize >= 2048)
-		host->col_addr_cycles = 2;
-	else
-		host->col_addr_cycles = 1;
-
-	/* release the initial buffer */
-	kfree(info->data_buff);
-
-	/* allocate the real data + oob buffer */
-	info->buf_size = mtd->writesize + mtd->oobsize;
-	ret = pxa3xx_nand_init_buff(info);
-	if (ret)
-		return ret;
-	info->oob_buff = info->data_buff + mtd->writesize;
-
-	if ((mtd->size >> chip->page_shift) > 65536)
-		host->row_addr_cycles = 3;
-	else
-		host->row_addr_cycles = 2;
-
-	if (!pdata->keep_config)
-		pxa3xx_nand_config_tail(info);
-
-	return nand_scan_tail(mtd);
-}
-
-static int alloc_nand_resource(struct platform_device *pdev)
-{
-	struct device_node *np = pdev->dev.of_node;
-	struct pxa3xx_nand_platform_data *pdata;
-	struct pxa3xx_nand_info *info;
-	struct pxa3xx_nand_host *host;
-	struct nand_chip *chip = NULL;
-	struct mtd_info *mtd;
-	struct resource *r;
-	int ret, irq, cs;
-
-	pdata = dev_get_platdata(&pdev->dev);
-	if (pdata->num_cs <= 0) {
-		dev_err(&pdev->dev, "invalid number of chip selects\n");
-		return -ENODEV;
-	}
-
-	info = devm_kzalloc(&pdev->dev,
-			    sizeof(*info) + sizeof(*host) * pdata->num_cs,
-			    GFP_KERNEL);
-	if (!info)
-		return -ENOMEM;
-
-	info->pdev = pdev;
-	info->variant = pxa3xx_nand_get_variant(pdev);
-	for (cs = 0; cs < pdata->num_cs; cs++) {
-		host = (void *)&info[1] + sizeof(*host) * cs;
-		chip = &host->chip;
-		nand_set_controller_data(chip, host);
-		mtd = nand_to_mtd(chip);
-		info->host[cs] = host;
-		host->cs = cs;
-		host->info_data = info;
-		mtd->dev.parent = &pdev->dev;
-		/* FIXME: all chips use the same device tree partitions */
-		nand_set_flash_node(chip, np);
-
-		nand_set_controller_data(chip, host);
-		chip->ecc.read_page	= pxa3xx_nand_read_page_hwecc;
-		chip->ecc.write_page	= pxa3xx_nand_write_page_hwecc;
-		chip->controller        = &info->controller;
-		chip->waitfunc		= pxa3xx_nand_waitfunc;
-		chip->select_chip	= pxa3xx_nand_select_chip;
-		chip->read_word		= pxa3xx_nand_read_word;
-		chip->read_byte		= pxa3xx_nand_read_byte;
-		chip->read_buf		= pxa3xx_nand_read_buf;
-		chip->write_buf		= pxa3xx_nand_write_buf;
-		chip->options		|= NAND_NO_SUBPAGE_WRITE;
-		chip->cmdfunc		= nand_cmdfunc;
-		chip->onfi_set_features	= nand_onfi_get_set_features_notsupp;
-		chip->onfi_get_features	= nand_onfi_get_set_features_notsupp;
-	}
-
-	nand_hw_control_init(chip->controller);
-	info->clk = devm_clk_get(&pdev->dev, NULL);
-	if (IS_ERR(info->clk)) {
-		ret = PTR_ERR(info->clk);
-		dev_err(&pdev->dev, "failed to get nand clock: %d\n", ret);
-		return ret;
-	}
-	ret = clk_prepare_enable(info->clk);
-	if (ret < 0)
-		return ret;
-
-	if (!np && use_dma) {
-		r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-		if (r == NULL) {
-			dev_err(&pdev->dev,
-				"no resource defined for data DMA\n");
-			ret = -ENXIO;
-			goto fail_disable_clk;
-		}
-		info->drcmr_dat = r->start;
-	}
-
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "no IRQ resource defined\n");
-		ret = -ENXIO;
-		goto fail_disable_clk;
-	}
-
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	info->mmio_base = devm_ioremap_resource(&pdev->dev, r);
-	if (IS_ERR(info->mmio_base)) {
-		ret = PTR_ERR(info->mmio_base);
-		dev_err(&pdev->dev, "failed to map register space: %d\n", ret);
-		goto fail_disable_clk;
-	}
-	info->mmio_phys = r->start;
-
-	/* Allocate a buffer to allow flash detection */
-	info->buf_size = INIT_BUFFER_SIZE;
-	info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
-	if (info->data_buff == NULL) {
-		ret = -ENOMEM;
-		goto fail_disable_clk;
-	}
-
-	/* initialize all interrupts to be disabled */
-	disable_int(info, NDSR_MASK);
-
-	ret = request_threaded_irq(irq, pxa3xx_nand_irq,
-				   pxa3xx_nand_irq_thread, IRQF_ONESHOT,
-				   pdev->name, info);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to request IRQ: %d\n", ret);
-		goto fail_free_buf;
-	}
-
-	platform_set_drvdata(pdev, info);
-
-	return 0;
-
-fail_free_buf:
-	free_irq(irq, info);
-	kfree(info->data_buff);
-fail_disable_clk:
-	clk_disable_unprepare(info->clk);
-	return ret;
-}
-
-static int pxa3xx_nand_remove(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_info *info = platform_get_drvdata(pdev);
-	struct pxa3xx_nand_platform_data *pdata;
-	int irq, cs;
-
-	if (!info)
-		return 0;
-
-	pdata = dev_get_platdata(&pdev->dev);
-
-	irq = platform_get_irq(pdev, 0);
-	if (irq >= 0)
-		free_irq(irq, info);
-	pxa3xx_nand_free_buff(info);
-
-	/*
-	 * In the pxa3xx case, the DFI bus is shared between the SMC and NFC.
-	 * In order to prevent a lockup of the system bus, the DFI bus
-	 * arbitration is granted to SMC upon driver removal. This is done by
-	 * setting the x_ARB_CNTL bit, which also prevents the NAND to have
-	 * access to the bus anymore.
-	 */
-	nand_writel(info, NDCR,
-		    (nand_readl(info, NDCR) & ~NDCR_ND_ARB_EN) |
-		    NFCV1_NDCR_ARB_CNTL);
-	clk_disable_unprepare(info->clk);
-
-	for (cs = 0; cs < pdata->num_cs; cs++)
-		nand_release(nand_to_mtd(&info->host[cs]->chip));
-	return 0;
-}
-
-static int pxa3xx_nand_probe_dt(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_platform_data *pdata;
-	struct device_node *np = pdev->dev.of_node;
-	const struct of_device_id *of_id =
-			of_match_device(pxa3xx_nand_dt_ids, &pdev->dev);
-
-	if (!of_id)
-		return 0;
-
-	/*
-	 * Some SoCs like A7k/A8k need to enable manually the NAND
-	 * controller to avoid being bootloader dependent. This is done
-	 * through the use of a single bit in the System Functions registers.
-	 */
-	if (pxa3xx_nand_get_variant(pdev) == PXA3XX_NAND_VARIANT_ARMADA_8K) {
-		struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
-			pdev->dev.of_node, "marvell,system-controller");
-		u32 reg;
-
-		if (IS_ERR(sysctrl_base))
-			return PTR_ERR(sysctrl_base);
-
-		regmap_read(sysctrl_base, GENCONF_SOC_DEVICE_MUX, &reg);
-		reg |= GENCONF_SOC_DEVICE_MUX_NFC_EN;
-		regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
-	}
-
-	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-	if (!pdata)
-		return -ENOMEM;
-
-	if (of_get_property(np, "marvell,nand-enable-arbiter", NULL))
-		pdata->enable_arbiter = 1;
-	if (of_get_property(np, "marvell,nand-keep-config", NULL))
-		pdata->keep_config = 1;
-	of_property_read_u32(np, "num-cs", &pdata->num_cs);
-
-	pdev->dev.platform_data = pdata;
-
-	return 0;
-}
-
-static int pxa3xx_nand_probe(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_platform_data *pdata;
-	struct pxa3xx_nand_info *info;
-	int ret, cs, probe_success, dma_available;
-
-	dma_available = IS_ENABLED(CONFIG_ARM) &&
-		(IS_ENABLED(CONFIG_ARCH_PXA) || IS_ENABLED(CONFIG_ARCH_MMP));
-	if (use_dma && !dma_available) {
-		use_dma = 0;
-		dev_warn(&pdev->dev,
-			 "This platform can't do DMA on this device\n");
-	}
-
-	ret = pxa3xx_nand_probe_dt(pdev);
-	if (ret)
-		return ret;
-
-	pdata = dev_get_platdata(&pdev->dev);
-	if (!pdata) {
-		dev_err(&pdev->dev, "no platform data defined\n");
-		return -ENODEV;
-	}
-
-	ret = alloc_nand_resource(pdev);
-	if (ret)
-		return ret;
-
-	info = platform_get_drvdata(pdev);
-	probe_success = 0;
-	for (cs = 0; cs < pdata->num_cs; cs++) {
-		struct mtd_info *mtd = nand_to_mtd(&info->host[cs]->chip);
-
-		/*
-		 * The mtd name matches the one used in 'mtdparts' kernel
-		 * parameter. This name cannot be changed or otherwise
-		 * user's mtd partitions configuration would get broken.
-		 */
-		mtd->name = "pxa3xx_nand-0";
-		info->cs = cs;
-		ret = pxa3xx_nand_scan(mtd);
-		if (ret) {
-			dev_warn(&pdev->dev, "failed to scan nand at cs %d\n",
-				cs);
-			continue;
-		}
-
-		ret = mtd_device_register(mtd, pdata->parts[cs],
-					  pdata->nr_parts[cs]);
-		if (!ret)
-			probe_success = 1;
-	}
-
-	if (!probe_success) {
-		pxa3xx_nand_remove(pdev);
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-#ifdef CONFIG_PM
-static int pxa3xx_nand_suspend(struct device *dev)
-{
-	struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
-
-	if (info->state) {
-		dev_err(dev, "driver busy, state = %d\n", info->state);
-		return -EAGAIN;
-	}
-
-	clk_disable(info->clk);
-	return 0;
-}
-
-static int pxa3xx_nand_resume(struct device *dev)
-{
-	struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
-	int ret;
-
-	ret = clk_enable(info->clk);
-	if (ret < 0)
-		return ret;
-
-	/* We don't want to handle interrupt without calling mtd routine */
-	disable_int(info, NDCR_INT_MASK);
-
-	/*
-	 * Directly set the chip select to a invalid value,
-	 * then the driver would reset the timing according
-	 * to current chip select at the beginning of cmdfunc
-	 */
-	info->cs = 0xff;
-
-	/*
-	 * As the spec says, the NDSR would be updated to 0x1800 when
-	 * doing the nand_clk disable/enable.
-	 * To prevent it damaging state machine of the driver, clear
-	 * all status before resume
-	 */
-	nand_writel(info, NDSR, NDSR_MASK);
-
-	return 0;
-}
-#else
-#define pxa3xx_nand_suspend	NULL
-#define pxa3xx_nand_resume	NULL
-#endif
-
-static const struct dev_pm_ops pxa3xx_nand_pm_ops = {
-	.suspend	= pxa3xx_nand_suspend,
-	.resume		= pxa3xx_nand_resume,
-};
-
-static struct platform_driver pxa3xx_nand_driver = {
-	.driver = {
-		.name	= "pxa3xx-nand",
-		.of_match_table = pxa3xx_nand_dt_ids,
-		.pm	= &pxa3xx_nand_pm_ops,
-	},
-	.probe		= pxa3xx_nand_probe,
-	.remove		= pxa3xx_nand_remove,
-};
-
-module_platform_driver(pxa3xx_nand_driver);
-
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("PXA3xx NAND controller driver");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 03/12] mtd: nand: replace pxa3xx_nand driver by its rework called marvell_nand
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Actually remove pxa3xx_nand.c to let marvell_nand.c be compiled instead.
Also change the defconfig files using it as well as some board files
depending on CONFIG_MTD_NAND_PXA3xx.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/configs/cm_x300_defconfig  |    2 +-
 arch/arm/configs/mvebu_v7_defconfig |    2 +-
 arch/arm/configs/pxa3xx_defconfig   |    3 +-
 arch/arm/configs/pxa_defconfig      |    2 +-
 arch/arm/configs/raumfeld_defconfig |    2 +-
 arch/arm/mach-mmp/ttc_dkb.c         |    4 +-
 arch/arm/mach-pxa/cm-x300.c         |    2 +-
 arch/arm/mach-pxa/colibri-pxa3xx.c  |    2 +-
 arch/arm/mach-pxa/colibri.h         |    2 +-
 arch/arm/mach-pxa/littleton.c       |    4 +-
 arch/arm/mach-pxa/mxm8x10.c         |    4 +-
 arch/arm/mach-pxa/zylonite.c        |    4 +-
 drivers/mtd/nand/Makefile           |    1 -
 drivers/mtd/nand/pxa3xx_nand.c      | 2104 -----------------------------------
 14 files changed, 16 insertions(+), 2122 deletions(-)
 delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c

diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig
index c0418e03d180..5e349c625b71 100644
--- a/arch/arm/configs/cm_x300_defconfig
+++ b/arch/arm/configs/cm_x300_defconfig
@@ -49,7 +49,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_MTD=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index 69553704f2dc..4b6e4fd47e5d 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -57,7 +57,7 @@ CONFIG_MTD_CFI_STAA=y
 CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_SRAM=y
 CONFIG_MTD_UBI=y
diff --git a/arch/arm/configs/pxa3xx_defconfig b/arch/arm/configs/pxa3xx_defconfig
index bfea6874b0a1..3e0de035ab77 100644
--- a/arch/arm/configs/pxa3xx_defconfig
+++ b/arch/arm/configs/pxa3xx_defconfig
@@ -32,8 +32,7 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_MTD=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
-CONFIG_MTD_NAND_PXA3xx_BUILTIN=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_ONENAND=y
 CONFIG_MTD_ONENAND_VERIFY_WRITE=y
 CONFIG_MTD_ONENAND_GENERIC=y
diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig
index 830e817a028a..934af8601f7d 100644
--- a/arch/arm/configs/pxa_defconfig
+++ b/arch/arm/configs/pxa_defconfig
@@ -198,7 +198,7 @@ CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0x4000000
 CONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=y
 CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
 CONFIG_MTD_NAND_SHARPSL=m
-CONFIG_MTD_NAND_PXA3xx=m
+CONFIG_MTD_NAND_MARVELL=m
 CONFIG_MTD_NAND_CM_X270=m
 CONFIG_MTD_NAND_TMIO=m
 CONFIG_MTD_NAND_BRCMNAND=m
diff --git a/arch/arm/configs/raumfeld_defconfig b/arch/arm/configs/raumfeld_defconfig
index 77a56c23c6ef..2dd56e9a484e 100644
--- a/arch/arm/configs/raumfeld_defconfig
+++ b/arch/arm/configs/raumfeld_defconfig
@@ -33,7 +33,7 @@ CONFIG_NFTL=y
 CONFIG_NFTL_RW=y
 CONFIG_MTD_BLOCK2MTD=y
 CONFIG_MTD_NAND=y
-CONFIG_MTD_NAND_PXA3xx=y
+CONFIG_MTD_NAND_MARVELL=y
 CONFIG_MTD_UBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_ISL29003=y
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index d90c74fa614d..e0b6073c61a7 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -178,7 +178,7 @@ static struct mv_usb_platform_data ttc_usb_pdata = {
 #endif
 #endif
 
-#if IS_ENABLED(CONFIG_MTD_NAND_PXA3xx)
+#if IS_ENABLED(CONFIG_MTD_NAND_MARVELL)
 static struct pxa3xx_nand_platform_data dkb_nand_info = {
 	.enable_arbiter = 1,
 	.num_cs = 1,
@@ -275,7 +275,7 @@ static void __init ttc_dkb_init(void)
 
 	/* on-chip devices */
 	pxa910_add_uart(1);
-#if IS_ENABLED(CONFIG_MTD_NAND_PXA3xx)
+#if IS_ENABLED(CONFIG_MTD_NAND_MARVELL)
 	pxa910_add_nand(&dkb_nand_info);
 #endif
 
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 868448d2cd82..89326378dabf 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -391,7 +391,7 @@ static void __init cm_x300_init_ac97(void)
 static inline void cm_x300_init_ac97(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition cm_x300_nand_partitions[] = {
 	[0] = {
 		.name        = "OBM",
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index b04431bb4ba7..c9c36f707555 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -110,7 +110,7 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin)
 }
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition colibri_nand_partitions[] = {
 	{
 		.name        = "bootloader",
diff --git a/arch/arm/mach-pxa/colibri.h b/arch/arm/mach-pxa/colibri.h
index 673a131da875..d5ba74831916 100644
--- a/arch/arm/mach-pxa/colibri.h
+++ b/arch/arm/mach-pxa/colibri.h
@@ -46,7 +46,7 @@ static inline void colibri_pxa3xx_init_lcd(int bl_pin) {}
 extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data);
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 extern void colibri_pxa3xx_init_nand(void);
 #else
 static inline void colibri_pxa3xx_init_nand(void) {}
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index fae38fdc8d8e..898961be36db 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -290,7 +290,7 @@ static void __init littleton_init_mmc(void)
 static inline void littleton_init_mmc(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition littleton_nand_partitions[] = {
 	[0] = {
 		.name        = "Bootloader",
@@ -340,7 +340,7 @@ static void __init littleton_init_nand(void)
 }
 #else
 static inline void littleton_init_nand(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
 static struct led_info littleton_da9034_leds[] = {
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c
index 9a22ae0ad8c9..7d7aab20b70a 100644
--- a/arch/arm/mach-pxa/mxm8x10.c
+++ b/arch/arm/mach-pxa/mxm8x10.c
@@ -359,7 +359,7 @@ void __init mxm_8x10_ac97_init(void)
 }
 
 /* NAND flash Support */
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 #define NAND_BLOCK_SIZE SZ_128K
 #define NB(x)           (NAND_BLOCK_SIZE * (x))
 static struct mtd_partition mxm_8x10_nand_partitions[] = {
@@ -402,7 +402,7 @@ static void __init mxm_8x10_nand_init(void)
 }
 #else
 static inline void mxm_8x10_nand_init(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 /* Ethernet support: Davicom DM9000 */
 static struct resource dm9k_resources[] = {
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 4268552d600d..a4577118d518 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -338,7 +338,7 @@ static void __init zylonite_init_keypad(void)
 static inline void zylonite_init_keypad(void) {}
 #endif
 
-#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
+#if defined(CONFIG_MTD_NAND_MARVELL) || defined(CONFIG_MTD_NAND_MARVELL_MODULE)
 static struct mtd_partition zylonite_nand_partitions[] = {
 	[0] = {
 		.name        = "Bootloader",
@@ -388,7 +388,7 @@ static void __init zylonite_init_nand(void)
 }
 #else
 static inline void zylonite_init_nand(void) {}
-#endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */
+#endif /* CONFIG_MTD_NAND_MARVELL || CONFIG_MTD_NAND_MARVELL_MODULE */
 
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
 static struct pxaohci_platform_data zylonite_ohci_info = {
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 921634ba400c..c882d5ef192a 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -31,7 +31,6 @@ omap2_nand-objs := omap2.o
 obj-$(CONFIG_MTD_NAND_OMAP2) 		+= omap2_nand.o
 obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)	+= omap_elm.o
 obj-$(CONFIG_MTD_NAND_CM_X270)		+= cmx270_nand.o
-obj-$(CONFIG_MTD_NAND_PXA3xx)		+= pxa3xx_nand.o
 obj-$(CONFIG_MTD_NAND_MARVELL)		+= marvell_nand.o
 obj-$(CONFIG_MTD_NAND_TMIO)		+= tmio_nand.o
 obj-$(CONFIG_MTD_NAND_PLATFORM)		+= plat_nand.o
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
deleted file mode 100644
index 021374fe59dc..000000000000
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ /dev/null
@@ -1,2104 +0,0 @@
-/*
- * drivers/mtd/nand/pxa3xx_nand.c
- *
- * Copyright ? 2005 Intel Corporation
- * Copyright ? 2006 Marvell International Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * See Documentation/mtd/nand/pxa3xx-nand.txt for more details.
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/dmaengine.h>
-#include <linux/dma-mapping.h>
-#include <linux/dma/pxa-dma.h>
-#include <linux/delay.h>
-#include <linux/clk.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/rawnand.h>
-#include <linux/mtd/partitions.h>
-#include <linux/io.h>
-#include <linux/iopoll.h>
-#include <linux/irq.h>
-#include <linux/slab.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
-#include <linux/platform_data/mtd-nand-pxa3xx.h>
-#include <linux/mfd/syscon.h>
-#include <linux/regmap.h>
-
-#define	CHIP_DELAY_TIMEOUT	msecs_to_jiffies(200)
-#define NAND_STOP_DELAY		msecs_to_jiffies(40)
-#define PAGE_CHUNK_SIZE		(2048)
-
-/*
- * Define a buffer size for the initial command that detects the flash device:
- * STATUS, READID and PARAM.
- * ONFI param page is 256 bytes, and there are three redundant copies
- * to be read. JEDEC param page is 512 bytes, and there are also three
- * redundant copies to be read.
- * Hence this buffer should be at least 512 x 3. Let's pick 2048.
- */
-#define INIT_BUFFER_SIZE	2048
-
-/* System control register and bit to enable NAND on some SoCs */
-#define GENCONF_SOC_DEVICE_MUX	0x208
-#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
-
-/* registers and bit definitions */
-#define NDCR		(0x00) /* Control register */
-#define NDTR0CS0	(0x04) /* Timing Parameter 0 for CS0 */
-#define NDTR1CS0	(0x0C) /* Timing Parameter 1 for CS0 */
-#define NDSR		(0x14) /* Status Register */
-#define NDPCR		(0x18) /* Page Count Register */
-#define NDBDR0		(0x1C) /* Bad Block Register 0 */
-#define NDBDR1		(0x20) /* Bad Block Register 1 */
-#define NDECCCTRL	(0x28) /* ECC control */
-#define NDDB		(0x40) /* Data Buffer */
-#define NDCB0		(0x48) /* Command Buffer0 */
-#define NDCB1		(0x4C) /* Command Buffer1 */
-#define NDCB2		(0x50) /* Command Buffer2 */
-
-#define NDCR_SPARE_EN		(0x1 << 31)
-#define NDCR_ECC_EN		(0x1 << 30)
-#define NDCR_DMA_EN		(0x1 << 29)
-#define NDCR_ND_RUN		(0x1 << 28)
-#define NDCR_DWIDTH_C		(0x1 << 27)
-#define NDCR_DWIDTH_M		(0x1 << 26)
-#define NDCR_PAGE_SZ		(0x1 << 24)
-#define NDCR_NCSX		(0x1 << 23)
-#define NDCR_ND_MODE		(0x3 << 21)
-#define NDCR_NAND_MODE   	(0x0)
-#define NDCR_CLR_PG_CNT		(0x1 << 20)
-#define NFCV1_NDCR_ARB_CNTL	(0x1 << 19)
-#define NFCV2_NDCR_STOP_ON_UNCOR	(0x1 << 19)
-#define NDCR_RD_ID_CNT_MASK	(0x7 << 16)
-#define NDCR_RD_ID_CNT(x)	(((x) << 16) & NDCR_RD_ID_CNT_MASK)
-
-#define NDCR_RA_START		(0x1 << 15)
-#define NDCR_PG_PER_BLK		(0x1 << 14)
-#define NDCR_ND_ARB_EN		(0x1 << 12)
-#define NDCR_INT_MASK           (0xFFF)
-
-#define NDSR_MASK		(0xfff)
-#define NDSR_ERR_CNT_OFF	(16)
-#define NDSR_ERR_CNT_MASK       (0x1f)
-#define NDSR_ERR_CNT(sr)	((sr >> NDSR_ERR_CNT_OFF) & NDSR_ERR_CNT_MASK)
-#define NDSR_RDY                (0x1 << 12)
-#define NDSR_FLASH_RDY          (0x1 << 11)
-#define NDSR_CS0_PAGED		(0x1 << 10)
-#define NDSR_CS1_PAGED		(0x1 << 9)
-#define NDSR_CS0_CMDD		(0x1 << 8)
-#define NDSR_CS1_CMDD		(0x1 << 7)
-#define NDSR_CS0_BBD		(0x1 << 6)
-#define NDSR_CS1_BBD		(0x1 << 5)
-#define NDSR_UNCORERR		(0x1 << 4)
-#define NDSR_CORERR		(0x1 << 3)
-#define NDSR_WRDREQ		(0x1 << 2)
-#define NDSR_RDDREQ		(0x1 << 1)
-#define NDSR_WRCMDREQ		(0x1)
-
-#define NDCB0_LEN_OVRD		(0x1 << 28)
-#define NDCB0_ST_ROW_EN         (0x1 << 26)
-#define NDCB0_AUTO_RS		(0x1 << 25)
-#define NDCB0_CSEL		(0x1 << 24)
-#define NDCB0_EXT_CMD_TYPE_MASK	(0x7 << 29)
-#define NDCB0_EXT_CMD_TYPE(x)	(((x) << 29) & NDCB0_EXT_CMD_TYPE_MASK)
-#define NDCB0_CMD_TYPE_MASK	(0x7 << 21)
-#define NDCB0_CMD_TYPE(x)	(((x) << 21) & NDCB0_CMD_TYPE_MASK)
-#define NDCB0_NC		(0x1 << 20)
-#define NDCB0_DBC		(0x1 << 19)
-#define NDCB0_ADDR_CYC_MASK	(0x7 << 16)
-#define NDCB0_ADDR_CYC(x)	(((x) << 16) & NDCB0_ADDR_CYC_MASK)
-#define NDCB0_CMD2_MASK		(0xff << 8)
-#define NDCB0_CMD1_MASK		(0xff)
-#define NDCB0_ADDR_CYC_SHIFT	(16)
-
-#define EXT_CMD_TYPE_DISPATCH	6 /* Command dispatch */
-#define EXT_CMD_TYPE_NAKED_RW	5 /* Naked read or Naked write */
-#define EXT_CMD_TYPE_READ	4 /* Read */
-#define EXT_CMD_TYPE_DISP_WR	4 /* Command dispatch with write */
-#define EXT_CMD_TYPE_FINAL	3 /* Final command */
-#define EXT_CMD_TYPE_LAST_RW	1 /* Last naked read/write */
-#define EXT_CMD_TYPE_MONO	0 /* Monolithic read/write */
-
-/*
- * This should be large enough to read 'ONFI' and 'JEDEC'.
- * Let's use 7 bytes, which is the maximum ID count supported
- * by the controller (see NDCR_RD_ID_CNT_MASK).
- */
-#define READ_ID_BYTES		7
-
-/* macros for registers read/write */
-#define nand_writel(info, off, val)					\
-	do {								\
-		dev_vdbg(&info->pdev->dev,				\
-			 "%s():%d nand_writel(0x%x, 0x%04x)\n",		\
-			 __func__, __LINE__, (val), (off));		\
-		writel_relaxed((val), (info)->mmio_base + (off));	\
-	} while (0)
-
-#define nand_readl(info, off)						\
-	({								\
-		unsigned int _v;					\
-		_v = readl_relaxed((info)->mmio_base + (off));		\
-		dev_vdbg(&info->pdev->dev,				\
-			 "%s():%d nand_readl(0x%04x) = 0x%x\n",		\
-			 __func__, __LINE__, (off), _v);		\
-		_v;							\
-	})
-
-/* error code and state */
-enum {
-	ERR_NONE	= 0,
-	ERR_DMABUSERR	= -1,
-	ERR_SENDCMD	= -2,
-	ERR_UNCORERR	= -3,
-	ERR_BBERR	= -4,
-	ERR_CORERR	= -5,
-};
-
-enum {
-	STATE_IDLE = 0,
-	STATE_PREPARED,
-	STATE_CMD_HANDLE,
-	STATE_DMA_READING,
-	STATE_DMA_WRITING,
-	STATE_DMA_DONE,
-	STATE_PIO_READING,
-	STATE_PIO_WRITING,
-	STATE_CMD_DONE,
-	STATE_READY,
-};
-
-enum pxa3xx_nand_variant {
-	PXA3XX_NAND_VARIANT_PXA,
-	PXA3XX_NAND_VARIANT_ARMADA370,
-	PXA3XX_NAND_VARIANT_ARMADA_8K,
-};
-
-struct pxa3xx_nand_host {
-	struct nand_chip	chip;
-	void			*info_data;
-
-	/* page size of attached chip */
-	int			use_ecc;
-	int			cs;
-
-	/* calculated from pxa3xx_nand_flash data */
-	unsigned int		col_addr_cycles;
-	unsigned int		row_addr_cycles;
-};
-
-struct pxa3xx_nand_info {
-	struct nand_hw_control	controller;
-	struct platform_device	 *pdev;
-
-	struct clk		*clk;
-	void __iomem		*mmio_base;
-	unsigned long		mmio_phys;
-	struct completion	cmd_complete, dev_ready;
-
-	unsigned int 		buf_start;
-	unsigned int		buf_count;
-	unsigned int		buf_size;
-	unsigned int		data_buff_pos;
-	unsigned int		oob_buff_pos;
-
-	/* DMA information */
-	struct scatterlist	sg;
-	enum dma_data_direction	dma_dir;
-	struct dma_chan		*dma_chan;
-	dma_cookie_t		dma_cookie;
-	int			drcmr_dat;
-
-	unsigned char		*data_buff;
-	unsigned char		*oob_buff;
-	dma_addr_t 		data_buff_phys;
-	int 			data_dma_ch;
-
-	struct pxa3xx_nand_host *host[NUM_CHIP_SELECT];
-	unsigned int		state;
-
-	/*
-	 * This driver supports NFCv1 (as found in PXA SoC)
-	 * and NFCv2 (as found in Armada 370/XP SoC).
-	 */
-	enum pxa3xx_nand_variant variant;
-
-	int			cs;
-	int			use_ecc;	/* use HW ECC ? */
-	int			ecc_bch;	/* using BCH ECC? */
-	int			use_dma;	/* use DMA ? */
-	int			use_spare;	/* use spare ? */
-	int			need_wait;
-
-	/* Amount of real data per full chunk */
-	unsigned int		chunk_size;
-
-	/* Amount of spare data per full chunk */
-	unsigned int		spare_size;
-
-	/* Number of full chunks (i.e chunk_size + spare_size) */
-	unsigned int            nfullchunks;
-
-	/*
-	 * Total number of chunks. If equal to nfullchunks, then there
-	 * are only full chunks. Otherwise, there is one last chunk of
-	 * size (last_chunk_size + last_spare_size)
-	 */
-	unsigned int            ntotalchunks;
-
-	/* Amount of real data in the last chunk */
-	unsigned int		last_chunk_size;
-
-	/* Amount of spare data in the last chunk */
-	unsigned int		last_spare_size;
-
-	unsigned int		ecc_size;
-	unsigned int		ecc_err_cnt;
-	unsigned int		max_bitflips;
-	int 			retcode;
-
-	/*
-	 * Variables only valid during command
-	 * execution. step_chunk_size and step_spare_size is the
-	 * amount of real data and spare data in the current
-	 * chunk. cur_chunk is the current chunk being
-	 * read/programmed.
-	 */
-	unsigned int		step_chunk_size;
-	unsigned int		step_spare_size;
-	unsigned int            cur_chunk;
-
-	/* cached register value */
-	uint32_t		reg_ndcr;
-	uint32_t		ndtr0cs0;
-	uint32_t		ndtr1cs0;
-
-	/* generated NDCBx register values */
-	uint32_t		ndcb0;
-	uint32_t		ndcb1;
-	uint32_t		ndcb2;
-	uint32_t		ndcb3;
-};
-
-static bool use_dma = 1;
-module_param(use_dma, bool, 0444);
-MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW");
-
-struct pxa3xx_nand_timing {
-	unsigned int	tCH;  /* Enable signal hold time */
-	unsigned int	tCS;  /* Enable signal setup time */
-	unsigned int	tWH;  /* ND_nWE high duration */
-	unsigned int	tWP;  /* ND_nWE pulse time */
-	unsigned int	tRH;  /* ND_nRE high duration */
-	unsigned int	tRP;  /* ND_nRE pulse width */
-	unsigned int	tR;   /* ND_nWE high to ND_nRE low for read */
-	unsigned int	tWHR; /* ND_nWE high to ND_nRE low for status read */
-	unsigned int	tAR;  /* ND_ALE low to ND_nRE low delay */
-};
-
-struct pxa3xx_nand_flash {
-	uint32_t	chip_id;
-	unsigned int	flash_width;	/* Width of Flash memory (DWIDTH_M) */
-	unsigned int	dfc_width;	/* Width of flash controller(DWIDTH_C) */
-	struct pxa3xx_nand_timing *timing;	/* NAND Flash timing */
-};
-
-static struct pxa3xx_nand_timing timing[] = {
-	{ 40, 80, 60, 100, 80, 100, 90000, 400, 40, },
-	{ 10,  0, 20,  40, 30,  40, 11123, 110, 10, },
-	{ 10, 25, 15,  25, 15,  30, 25000,  60, 10, },
-	{ 10, 35, 15,  25, 15,  25, 25000,  60, 10, },
-};
-
-static struct pxa3xx_nand_flash builtin_flash_types[] = {
-	{ 0x46ec, 16, 16, &timing[1] },
-	{ 0xdaec,  8,  8, &timing[1] },
-	{ 0xd7ec,  8,  8, &timing[1] },
-	{ 0xa12c,  8,  8, &timing[2] },
-	{ 0xb12c, 16, 16, &timing[2] },
-	{ 0xdc2c,  8,  8, &timing[2] },
-	{ 0xcc2c, 16, 16, &timing[2] },
-	{ 0xba20, 16, 16, &timing[3] },
-};
-
-static int pxa3xx_ooblayout_ecc(struct mtd_info *mtd, int section,
-				struct mtd_oob_region *oobregion)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int nchunks = mtd->writesize / info->chunk_size;
-
-	if (section >= nchunks)
-		return -ERANGE;
-
-	oobregion->offset = ((info->ecc_size + info->spare_size) * section) +
-			    info->spare_size;
-	oobregion->length = info->ecc_size;
-
-	return 0;
-}
-
-static int pxa3xx_ooblayout_free(struct mtd_info *mtd, int section,
-				 struct mtd_oob_region *oobregion)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int nchunks = mtd->writesize / info->chunk_size;
-
-	if (section >= nchunks)
-		return -ERANGE;
-
-	if (!info->spare_size)
-		return 0;
-
-	oobregion->offset = section * (info->ecc_size + info->spare_size);
-	oobregion->length = info->spare_size;
-	if (!section) {
-		/*
-		 * Bootrom looks in bytes 0 & 5 for bad blocks for the
-		 * 4KB page / 4bit BCH combination.
-		 */
-		if (mtd->writesize == 4096 && info->chunk_size == 2048) {
-			oobregion->offset += 6;
-			oobregion->length -= 6;
-		} else {
-			oobregion->offset += 2;
-			oobregion->length -= 2;
-		}
-	}
-
-	return 0;
-}
-
-static const struct mtd_ooblayout_ops pxa3xx_ooblayout_ops = {
-	.ecc = pxa3xx_ooblayout_ecc,
-	.free = pxa3xx_ooblayout_free,
-};
-
-static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
-static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
-
-static struct nand_bbt_descr bbt_main_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
-		| NAND_BBT_2BIT | NAND_BBT_VERSION,
-	.offs =	8,
-	.len = 6,
-	.veroffs = 14,
-	.maxblocks = 8,		/* Last 8 blocks in each chip */
-	.pattern = bbt_pattern
-};
-
-static struct nand_bbt_descr bbt_mirror_descr = {
-	.options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE
-		| NAND_BBT_2BIT | NAND_BBT_VERSION,
-	.offs =	8,
-	.len = 6,
-	.veroffs = 14,
-	.maxblocks = 8,		/* Last 8 blocks in each chip */
-	.pattern = bbt_mirror_pattern
-};
-
-#define NDTR0_tCH(c)	(min((c), 7) << 19)
-#define NDTR0_tCS(c)	(min((c), 7) << 16)
-#define NDTR0_tWH(c)	(min((c), 7) << 11)
-#define NDTR0_tWP(c)	(min((c), 7) << 8)
-#define NDTR0_tRH(c)	(min((c), 7) << 3)
-#define NDTR0_tRP(c)	(min((c), 7) << 0)
-
-#define NDTR1_tR(c)	(min((c), 65535) << 16)
-#define NDTR1_tWHR(c)	(min((c), 15) << 4)
-#define NDTR1_tAR(c)	(min((c), 15) << 0)
-
-/* convert nano-seconds to nand flash controller clock cycles */
-#define ns2cycle(ns, clk)	(int)((ns) * (clk / 1000000) / 1000)
-
-static const struct of_device_id pxa3xx_nand_dt_ids[] = {
-	{
-		.compatible = "marvell,pxa3xx-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_PXA,
-	},
-	{
-		.compatible = "marvell,armada370-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_ARMADA370,
-	},
-	{
-		.compatible = "marvell,armada-8k-nand",
-		.data       = (void *)PXA3XX_NAND_VARIANT_ARMADA_8K,
-	},
-	{}
-};
-MODULE_DEVICE_TABLE(of, pxa3xx_nand_dt_ids);
-
-static enum pxa3xx_nand_variant
-pxa3xx_nand_get_variant(struct platform_device *pdev)
-{
-	const struct of_device_id *of_id =
-			of_match_device(pxa3xx_nand_dt_ids, &pdev->dev);
-	if (!of_id)
-		return PXA3XX_NAND_VARIANT_PXA;
-	return (enum pxa3xx_nand_variant)of_id->data;
-}
-
-static void pxa3xx_nand_set_timing(struct pxa3xx_nand_host *host,
-				   const struct pxa3xx_nand_timing *t)
-{
-	struct pxa3xx_nand_info *info = host->info_data;
-	unsigned long nand_clk = clk_get_rate(info->clk);
-	uint32_t ndtr0, ndtr1;
-
-	ndtr0 = NDTR0_tCH(ns2cycle(t->tCH, nand_clk)) |
-		NDTR0_tCS(ns2cycle(t->tCS, nand_clk)) |
-		NDTR0_tWH(ns2cycle(t->tWH, nand_clk)) |
-		NDTR0_tWP(ns2cycle(t->tWP, nand_clk)) |
-		NDTR0_tRH(ns2cycle(t->tRH, nand_clk)) |
-		NDTR0_tRP(ns2cycle(t->tRP, nand_clk));
-
-	ndtr1 = NDTR1_tR(ns2cycle(t->tR, nand_clk)) |
-		NDTR1_tWHR(ns2cycle(t->tWHR, nand_clk)) |
-		NDTR1_tAR(ns2cycle(t->tAR, nand_clk));
-
-	info->ndtr0cs0 = ndtr0;
-	info->ndtr1cs0 = ndtr1;
-	nand_writel(info, NDTR0CS0, ndtr0);
-	nand_writel(info, NDTR1CS0, ndtr1);
-}
-
-static void pxa3xx_nand_set_sdr_timing(struct pxa3xx_nand_host *host,
-				       const struct nand_sdr_timings *t)
-{
-	struct pxa3xx_nand_info *info = host->info_data;
-	struct nand_chip *chip = &host->chip;
-	unsigned long nand_clk = clk_get_rate(info->clk);
-	uint32_t ndtr0, ndtr1;
-
-	u32 tCH_min = DIV_ROUND_UP(t->tCH_min, 1000);
-	u32 tCS_min = DIV_ROUND_UP(t->tCS_min, 1000);
-	u32 tWH_min = DIV_ROUND_UP(t->tWH_min, 1000);
-	u32 tWP_min = DIV_ROUND_UP(t->tWC_min - t->tWH_min, 1000);
-	u32 tREH_min = DIV_ROUND_UP(t->tREH_min, 1000);
-	u32 tRP_min = DIV_ROUND_UP(t->tRC_min - t->tREH_min, 1000);
-	u32 tR = chip->chip_delay * 1000;
-	u32 tWHR_min = DIV_ROUND_UP(t->tWHR_min, 1000);
-	u32 tAR_min = DIV_ROUND_UP(t->tAR_min, 1000);
-
-	/* fallback to a default value if tR = 0 */
-	if (!tR)
-		tR = 20000;
-
-	ndtr0 = NDTR0_tCH(ns2cycle(tCH_min, nand_clk)) |
-		NDTR0_tCS(ns2cycle(tCS_min, nand_clk)) |
-		NDTR0_tWH(ns2cycle(tWH_min, nand_clk)) |
-		NDTR0_tWP(ns2cycle(tWP_min, nand_clk)) |
-		NDTR0_tRH(ns2cycle(tREH_min, nand_clk)) |
-		NDTR0_tRP(ns2cycle(tRP_min, nand_clk));
-
-	ndtr1 = NDTR1_tR(ns2cycle(tR, nand_clk)) |
-		NDTR1_tWHR(ns2cycle(tWHR_min, nand_clk)) |
-		NDTR1_tAR(ns2cycle(tAR_min, nand_clk));
-
-	info->ndtr0cs0 = ndtr0;
-	info->ndtr1cs0 = ndtr1;
-	nand_writel(info, NDTR0CS0, ndtr0);
-	nand_writel(info, NDTR1CS0, ndtr1);
-}
-
-static int pxa3xx_nand_init_timings_compat(struct pxa3xx_nand_host *host,
-					   unsigned int *flash_width,
-					   unsigned int *dfc_width)
-{
-	struct nand_chip *chip = &host->chip;
-	struct pxa3xx_nand_info *info = host->info_data;
-	const struct pxa3xx_nand_flash *f = NULL;
-	int i, id, ntypes;
-	u8 idbuf[2];
-
-	ntypes = ARRAY_SIZE(builtin_flash_types);
-
-	nand_readid_op(chip, 0, idbuf, sizeof(idbuf));
-	id = idbuf[0] | (idbuf[1] << 8);
-
-	for (i = 0; i < ntypes; i++) {
-		f = &builtin_flash_types[i];
-
-		if (f->chip_id == id)
-			break;
-	}
-
-	if (i == ntypes) {
-		dev_err(&info->pdev->dev, "Error: timings not found\n");
-		return -EINVAL;
-	}
-
-	pxa3xx_nand_set_timing(host, f->timing);
-
-	*flash_width = f->flash_width;
-	*dfc_width = f->dfc_width;
-
-	return 0;
-}
-
-static int pxa3xx_nand_init_timings_onfi(struct pxa3xx_nand_host *host,
-					 int mode)
-{
-	const struct nand_sdr_timings *timings;
-
-	mode = fls(mode) - 1;
-	if (mode < 0)
-		mode = 0;
-
-	timings = onfi_async_timing_mode_to_sdr_timings(mode);
-	if (IS_ERR(timings))
-		return PTR_ERR(timings);
-
-	pxa3xx_nand_set_sdr_timing(host, timings);
-
-	return 0;
-}
-
-static int pxa3xx_nand_init(struct pxa3xx_nand_host *host)
-{
-	struct nand_chip *chip = &host->chip;
-	struct pxa3xx_nand_info *info = host->info_data;
-	unsigned int flash_width = 0, dfc_width = 0;
-	int mode, err;
-
-	mode = onfi_get_async_timing_mode(chip);
-	if (mode == ONFI_TIMING_MODE_UNKNOWN) {
-		err = pxa3xx_nand_init_timings_compat(host, &flash_width,
-						      &dfc_width);
-		if (err)
-			return err;
-
-		if (flash_width == 16) {
-			info->reg_ndcr |= NDCR_DWIDTH_M;
-			chip->options |= NAND_BUSWIDTH_16;
-		}
-
-		info->reg_ndcr |= (dfc_width == 16) ? NDCR_DWIDTH_C : 0;
-	} else {
-		err = pxa3xx_nand_init_timings_onfi(host, mode);
-		if (err)
-			return err;
-	}
-
-	return 0;
-}
-
-/**
- * NOTE: it is a must to set ND_RUN firstly, then write
- * command buffer, otherwise, it does not work.
- * We enable all the interrupt at the same time, and
- * let pxa3xx_nand_irq to handle all logic.
- */
-static void pxa3xx_nand_start(struct pxa3xx_nand_info *info)
-{
-	uint32_t ndcr;
-
-	ndcr = info->reg_ndcr;
-
-	if (info->use_ecc) {
-		ndcr |= NDCR_ECC_EN;
-		if (info->ecc_bch)
-			nand_writel(info, NDECCCTRL, 0x1);
-	} else {
-		ndcr &= ~NDCR_ECC_EN;
-		if (info->ecc_bch)
-			nand_writel(info, NDECCCTRL, 0x0);
-	}
-
-	if (info->use_dma)
-		ndcr |= NDCR_DMA_EN;
-	else
-		ndcr &= ~NDCR_DMA_EN;
-
-	if (info->use_spare)
-		ndcr |= NDCR_SPARE_EN;
-	else
-		ndcr &= ~NDCR_SPARE_EN;
-
-	ndcr |= NDCR_ND_RUN;
-
-	/* clear status bits and run */
-	nand_writel(info, NDSR, NDSR_MASK);
-	nand_writel(info, NDCR, 0);
-	nand_writel(info, NDCR, ndcr);
-}
-
-static void pxa3xx_nand_stop(struct pxa3xx_nand_info *info)
-{
-	uint32_t ndcr;
-	int timeout = NAND_STOP_DELAY;
-
-	/* wait RUN bit in NDCR become 0 */
-	ndcr = nand_readl(info, NDCR);
-	while ((ndcr & NDCR_ND_RUN) && (timeout-- > 0)) {
-		ndcr = nand_readl(info, NDCR);
-		udelay(1);
-	}
-
-	if (timeout <= 0) {
-		ndcr &= ~NDCR_ND_RUN;
-		nand_writel(info, NDCR, ndcr);
-	}
-	if (info->dma_chan)
-		dmaengine_terminate_all(info->dma_chan);
-
-	/* clear status bits */
-	nand_writel(info, NDSR, NDSR_MASK);
-}
-
-static void __maybe_unused
-enable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
-{
-	uint32_t ndcr;
-
-	ndcr = nand_readl(info, NDCR);
-	nand_writel(info, NDCR, ndcr & ~int_mask);
-}
-
-static void disable_int(struct pxa3xx_nand_info *info, uint32_t int_mask)
-{
-	uint32_t ndcr;
-
-	ndcr = nand_readl(info, NDCR);
-	nand_writel(info, NDCR, ndcr | int_mask);
-}
-
-static void drain_fifo(struct pxa3xx_nand_info *info, void *data, int len)
-{
-	if (info->ecc_bch) {
-		u32 val;
-		int ret;
-
-		/*
-		 * According to the datasheet, when reading from NDDB
-		 * with BCH enabled, after each 32 bytes reads, we
-		 * have to make sure that the NDSR.RDDREQ bit is set.
-		 *
-		 * Drain the FIFO 8 32 bits reads at a time, and skip
-		 * the polling on the last read.
-		 */
-		while (len > 8) {
-			ioread32_rep(info->mmio_base + NDDB, data, 8);
-
-			ret = readl_relaxed_poll_timeout(info->mmio_base + NDSR, val,
-							 val & NDSR_RDDREQ, 1000, 5000);
-			if (ret) {
-				dev_err(&info->pdev->dev,
-					"Timeout on RDDREQ while draining the FIFO\n");
-				return;
-			}
-
-			data += 32;
-			len -= 8;
-		}
-	}
-
-	ioread32_rep(info->mmio_base + NDDB, data, len);
-}
-
-static void handle_data_pio(struct pxa3xx_nand_info *info)
-{
-	switch (info->state) {
-	case STATE_PIO_WRITING:
-		if (info->step_chunk_size)
-			writesl(info->mmio_base + NDDB,
-				info->data_buff + info->data_buff_pos,
-				DIV_ROUND_UP(info->step_chunk_size, 4));
-
-		if (info->step_spare_size)
-			writesl(info->mmio_base + NDDB,
-				info->oob_buff + info->oob_buff_pos,
-				DIV_ROUND_UP(info->step_spare_size, 4));
-		break;
-	case STATE_PIO_READING:
-		if (info->step_chunk_size)
-			drain_fifo(info,
-				   info->data_buff + info->data_buff_pos,
-				   DIV_ROUND_UP(info->step_chunk_size, 4));
-
-		if (info->step_spare_size)
-			drain_fifo(info,
-				   info->oob_buff + info->oob_buff_pos,
-				   DIV_ROUND_UP(info->step_spare_size, 4));
-		break;
-	default:
-		dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
-				info->state);
-		BUG();
-	}
-
-	/* Update buffer pointers for multi-page read/write */
-	info->data_buff_pos += info->step_chunk_size;
-	info->oob_buff_pos += info->step_spare_size;
-}
-
-static void pxa3xx_nand_data_dma_irq(void *data)
-{
-	struct pxa3xx_nand_info *info = data;
-	struct dma_tx_state state;
-	enum dma_status status;
-
-	status = dmaengine_tx_status(info->dma_chan, info->dma_cookie, &state);
-	if (likely(status == DMA_COMPLETE)) {
-		info->state = STATE_DMA_DONE;
-	} else {
-		dev_err(&info->pdev->dev, "DMA error on data channel\n");
-		info->retcode = ERR_DMABUSERR;
-	}
-	dma_unmap_sg(info->dma_chan->device->dev, &info->sg, 1, info->dma_dir);
-
-	nand_writel(info, NDSR, NDSR_WRDREQ | NDSR_RDDREQ);
-	enable_int(info, NDCR_INT_MASK);
-}
-
-static void start_data_dma(struct pxa3xx_nand_info *info)
-{
-	enum dma_transfer_direction direction;
-	struct dma_async_tx_descriptor *tx;
-
-	switch (info->state) {
-	case STATE_DMA_WRITING:
-		info->dma_dir = DMA_TO_DEVICE;
-		direction = DMA_MEM_TO_DEV;
-		break;
-	case STATE_DMA_READING:
-		info->dma_dir = DMA_FROM_DEVICE;
-		direction = DMA_DEV_TO_MEM;
-		break;
-	default:
-		dev_err(&info->pdev->dev, "%s: invalid state %d\n", __func__,
-				info->state);
-		BUG();
-	}
-	info->sg.length = info->chunk_size;
-	if (info->use_spare)
-		info->sg.length += info->spare_size + info->ecc_size;
-	dma_map_sg(info->dma_chan->device->dev, &info->sg, 1, info->dma_dir);
-
-	tx = dmaengine_prep_slave_sg(info->dma_chan, &info->sg, 1, direction,
-				     DMA_PREP_INTERRUPT);
-	if (!tx) {
-		dev_err(&info->pdev->dev, "prep_slave_sg() failed\n");
-		return;
-	}
-	tx->callback = pxa3xx_nand_data_dma_irq;
-	tx->callback_param = info;
-	info->dma_cookie = dmaengine_submit(tx);
-	dma_async_issue_pending(info->dma_chan);
-	dev_dbg(&info->pdev->dev, "%s(dir=%d cookie=%x size=%u)\n",
-		__func__, direction, info->dma_cookie, info->sg.length);
-}
-
-static irqreturn_t pxa3xx_nand_irq_thread(int irq, void *data)
-{
-	struct pxa3xx_nand_info *info = data;
-
-	handle_data_pio(info);
-
-	info->state = STATE_CMD_DONE;
-	nand_writel(info, NDSR, NDSR_WRDREQ | NDSR_RDDREQ);
-
-	return IRQ_HANDLED;
-}
-
-static irqreturn_t pxa3xx_nand_irq(int irq, void *devid)
-{
-	struct pxa3xx_nand_info *info = devid;
-	unsigned int status, is_completed = 0, is_ready = 0;
-	unsigned int ready, cmd_done;
-	irqreturn_t ret = IRQ_HANDLED;
-
-	if (info->cs == 0) {
-		ready           = NDSR_FLASH_RDY;
-		cmd_done        = NDSR_CS0_CMDD;
-	} else {
-		ready           = NDSR_RDY;
-		cmd_done        = NDSR_CS1_CMDD;
-	}
-
-	status = nand_readl(info, NDSR);
-
-	if (status & NDSR_UNCORERR)
-		info->retcode = ERR_UNCORERR;
-	if (status & NDSR_CORERR) {
-		info->retcode = ERR_CORERR;
-		if ((info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		     info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K) &&
-		    info->ecc_bch)
-			info->ecc_err_cnt = NDSR_ERR_CNT(status);
-		else
-			info->ecc_err_cnt = 1;
-
-		/*
-		 * Each chunk composing a page is corrected independently,
-		 * and we need to store maximum number of corrected bitflips
-		 * to return it to the MTD layer in ecc.read_page().
-		 */
-		info->max_bitflips = max_t(unsigned int,
-					   info->max_bitflips,
-					   info->ecc_err_cnt);
-	}
-	if (status & (NDSR_RDDREQ | NDSR_WRDREQ)) {
-		/* whether use dma to transfer data */
-		if (info->use_dma) {
-			disable_int(info, NDCR_INT_MASK);
-			info->state = (status & NDSR_RDDREQ) ?
-				      STATE_DMA_READING : STATE_DMA_WRITING;
-			start_data_dma(info);
-			goto NORMAL_IRQ_EXIT;
-		} else {
-			info->state = (status & NDSR_RDDREQ) ?
-				      STATE_PIO_READING : STATE_PIO_WRITING;
-			ret = IRQ_WAKE_THREAD;
-			goto NORMAL_IRQ_EXIT;
-		}
-	}
-	if (status & cmd_done) {
-		info->state = STATE_CMD_DONE;
-		is_completed = 1;
-	}
-	if (status & ready) {
-		info->state = STATE_READY;
-		is_ready = 1;
-	}
-
-	/*
-	 * Clear all status bit before issuing the next command, which
-	 * can and will alter the status bits and will deserve a new
-	 * interrupt on its own. This lets the controller exit the IRQ
-	 */
-	nand_writel(info, NDSR, status);
-
-	if (status & NDSR_WRCMDREQ) {
-		status &= ~NDSR_WRCMDREQ;
-		info->state = STATE_CMD_HANDLE;
-
-		/*
-		 * Command buffer registers NDCB{0-2} (and optionally NDCB3)
-		 * must be loaded by writing directly either 12 or 16
-		 * bytes directly to NDCB0, four bytes at a time.
-		 *
-		 * Direct write access to NDCB1, NDCB2 and NDCB3 is ignored
-		 * but each NDCBx register can be read.
-		 */
-		nand_writel(info, NDCB0, info->ndcb0);
-		nand_writel(info, NDCB0, info->ndcb1);
-		nand_writel(info, NDCB0, info->ndcb2);
-
-		/* NDCB3 register is available in NFCv2 (Armada 370/XP SoC) */
-		if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K)
-			nand_writel(info, NDCB0, info->ndcb3);
-	}
-
-	if (is_completed)
-		complete(&info->cmd_complete);
-	if (is_ready)
-		complete(&info->dev_ready);
-NORMAL_IRQ_EXIT:
-	return ret;
-}
-
-static inline int is_buf_blank(uint8_t *buf, size_t len)
-{
-	for (; len > 0; len--)
-		if (*buf++ != 0xff)
-			return 0;
-	return 1;
-}
-
-static void set_command_address(struct pxa3xx_nand_info *info,
-		unsigned int page_size, uint16_t column, int page_addr)
-{
-	/* small page addr setting */
-	if (page_size < PAGE_CHUNK_SIZE) {
-		info->ndcb1 = ((page_addr & 0xFFFFFF) << 8)
-				| (column & 0xFF);
-
-		info->ndcb2 = 0;
-	} else {
-		info->ndcb1 = ((page_addr & 0xFFFF) << 16)
-				| (column & 0xFFFF);
-
-		if (page_addr & 0xFF0000)
-			info->ndcb2 = (page_addr & 0xFF0000) >> 16;
-		else
-			info->ndcb2 = 0;
-	}
-}
-
-static void prepare_start_command(struct pxa3xx_nand_info *info, int command)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct mtd_info *mtd = nand_to_mtd(&host->chip);
-
-	/* reset data and oob column point to handle data */
-	info->buf_start		= 0;
-	info->buf_count		= 0;
-	info->data_buff_pos	= 0;
-	info->oob_buff_pos	= 0;
-	info->step_chunk_size   = 0;
-	info->step_spare_size   = 0;
-	info->cur_chunk         = 0;
-	info->use_ecc		= 0;
-	info->use_spare		= 1;
-	info->retcode		= ERR_NONE;
-	info->ecc_err_cnt	= 0;
-	info->ndcb3		= 0;
-	info->need_wait		= 0;
-
-	switch (command) {
-	case NAND_CMD_READ0:
-	case NAND_CMD_PAGEPROG:
-		info->use_ecc = 1;
-		break;
-	case NAND_CMD_PARAM:
-		info->use_spare = 0;
-		break;
-	default:
-		info->ndcb1 = 0;
-		info->ndcb2 = 0;
-		break;
-	}
-
-	/*
-	 * If we are about to issue a read command, or about to set
-	 * the write address, then clean the data buffer.
-	 */
-	if (command == NAND_CMD_READ0 ||
-	    command == NAND_CMD_READOOB ||
-	    command == NAND_CMD_SEQIN) {
-
-		info->buf_count = mtd->writesize + mtd->oobsize;
-		memset(info->data_buff, 0xFF, info->buf_count);
-	}
-
-}
-
-static int prepare_set_command(struct pxa3xx_nand_info *info, int command,
-		int ext_cmd_type, uint16_t column, int page_addr)
-{
-	int addr_cycle, exec_cmd;
-	struct pxa3xx_nand_host *host;
-	struct mtd_info *mtd;
-
-	host = info->host[info->cs];
-	mtd = nand_to_mtd(&host->chip);
-	addr_cycle = 0;
-	exec_cmd = 1;
-
-	if (info->cs != 0)
-		info->ndcb0 = NDCB0_CSEL;
-	else
-		info->ndcb0 = 0;
-
-	if (command == NAND_CMD_SEQIN)
-		exec_cmd = 0;
-
-	addr_cycle = NDCB0_ADDR_CYC(host->row_addr_cycles
-				    + host->col_addr_cycles);
-
-	switch (command) {
-	case NAND_CMD_READOOB:
-	case NAND_CMD_READ0:
-		info->buf_start = column;
-		info->ndcb0 |= NDCB0_CMD_TYPE(0)
-				| addr_cycle
-				| NAND_CMD_READ0;
-
-		if (command == NAND_CMD_READOOB)
-			info->buf_start += mtd->writesize;
-
-		if (info->cur_chunk < info->nfullchunks) {
-			info->step_chunk_size = info->chunk_size;
-			info->step_spare_size = info->spare_size;
-		} else {
-			info->step_chunk_size = info->last_chunk_size;
-			info->step_spare_size = info->last_spare_size;
-		}
-
-		/*
-		 * Multiple page read needs an 'extended command type' field,
-		 * which is either naked-read or last-read according to the
-		 * state.
-		 */
-		if (mtd->writesize == PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_DBC | (NAND_CMD_READSTART << 8);
-		} else if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_DBC | (NAND_CMD_READSTART << 8)
-					| NDCB0_LEN_OVRD
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type);
-			info->ndcb3 = info->step_chunk_size +
-				info->step_spare_size;
-		}
-
-		set_command_address(info, mtd->writesize, column, page_addr);
-		break;
-
-	case NAND_CMD_SEQIN:
-
-		info->buf_start = column;
-		set_command_address(info, mtd->writesize, 0, page_addr);
-
-		/*
-		 * Multiple page programming needs to execute the initial
-		 * SEQIN command that sets the page address.
-		 */
-		if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-				| NDCB0_EXT_CMD_TYPE(ext_cmd_type)
-				| addr_cycle
-				| command;
-			exec_cmd = 1;
-		}
-		break;
-
-	case NAND_CMD_PAGEPROG:
-		if (is_buf_blank(info->data_buff,
-					(mtd->writesize + mtd->oobsize))) {
-			exec_cmd = 0;
-			break;
-		}
-
-		if (info->cur_chunk < info->nfullchunks) {
-			info->step_chunk_size = info->chunk_size;
-			info->step_spare_size = info->spare_size;
-		} else {
-			info->step_chunk_size = info->last_chunk_size;
-			info->step_spare_size = info->last_spare_size;
-		}
-
-		/* Second command setting for large pages */
-		if (mtd->writesize > PAGE_CHUNK_SIZE) {
-			/*
-			 * Multiple page write uses the 'extended command'
-			 * field. This can be used to issue a command dispatch
-			 * or a naked-write depending on the current stage.
-			 */
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-					| NDCB0_LEN_OVRD
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type);
-			info->ndcb3 = info->step_chunk_size +
-				      info->step_spare_size;
-
-			/*
-			 * This is the command dispatch that completes a chunked
-			 * page program operation.
-			 */
-			if (info->cur_chunk == info->ntotalchunks) {
-				info->ndcb0 = NDCB0_CMD_TYPE(0x1)
-					| NDCB0_EXT_CMD_TYPE(ext_cmd_type)
-					| command;
-				info->ndcb1 = 0;
-				info->ndcb2 = 0;
-				info->ndcb3 = 0;
-			}
-		} else {
-			info->ndcb0 |= NDCB0_CMD_TYPE(0x1)
-					| NDCB0_AUTO_RS
-					| NDCB0_ST_ROW_EN
-					| NDCB0_DBC
-					| (NAND_CMD_PAGEPROG << 8)
-					| NAND_CMD_SEQIN
-					| addr_cycle;
-		}
-		break;
-
-	case NAND_CMD_PARAM:
-		info->buf_count = INIT_BUFFER_SIZE;
-		info->ndcb0 |= NDCB0_CMD_TYPE(0)
-				| NDCB0_ADDR_CYC(1)
-				| NDCB0_LEN_OVRD
-				| command;
-		info->ndcb1 = (column & 0xFF);
-		info->ndcb3 = INIT_BUFFER_SIZE;
-		info->step_chunk_size = INIT_BUFFER_SIZE;
-		break;
-
-	case NAND_CMD_READID:
-		info->buf_count = READ_ID_BYTES;
-		info->ndcb0 |= NDCB0_CMD_TYPE(3)
-				| NDCB0_ADDR_CYC(1)
-				| command;
-		info->ndcb1 = (column & 0xFF);
-
-		info->step_chunk_size = 8;
-		break;
-	case NAND_CMD_STATUS:
-		info->buf_count = 1;
-		info->ndcb0 |= NDCB0_CMD_TYPE(4)
-				| NDCB0_ADDR_CYC(1)
-				| command;
-
-		info->step_chunk_size = 8;
-		break;
-
-	case NAND_CMD_ERASE1:
-		info->ndcb0 |= NDCB0_CMD_TYPE(2)
-				| NDCB0_AUTO_RS
-				| NDCB0_ADDR_CYC(3)
-				| NDCB0_DBC
-				| (NAND_CMD_ERASE2 << 8)
-				| NAND_CMD_ERASE1;
-		info->ndcb1 = page_addr;
-		info->ndcb2 = 0;
-
-		break;
-	case NAND_CMD_RESET:
-		info->ndcb0 |= NDCB0_CMD_TYPE(5)
-				| command;
-
-		break;
-
-	case NAND_CMD_ERASE2:
-		exec_cmd = 0;
-		break;
-
-	default:
-		exec_cmd = 0;
-		dev_err(&info->pdev->dev, "non-supported command %x\n",
-				command);
-		break;
-	}
-
-	return exec_cmd;
-}
-
-static void nand_cmdfunc(struct mtd_info *mtd, unsigned command,
-			 int column, int page_addr)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int exec_cmd;
-
-	/*
-	 * if this is a x16 device ,then convert the input
-	 * "byte" address into a "word" address appropriate
-	 * for indexing a word-oriented device
-	 */
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		column /= 2;
-
-	/*
-	 * There may be different NAND chip hooked to
-	 * different chip select, so check whether
-	 * chip select has been changed, if yes, reset the timing
-	 */
-	if (info->cs != host->cs) {
-		info->cs = host->cs;
-		nand_writel(info, NDTR0CS0, info->ndtr0cs0);
-		nand_writel(info, NDTR1CS0, info->ndtr1cs0);
-	}
-
-	prepare_start_command(info, command);
-
-	info->state = STATE_PREPARED;
-	exec_cmd = prepare_set_command(info, command, 0, column, page_addr);
-
-	if (exec_cmd) {
-		init_completion(&info->cmd_complete);
-		init_completion(&info->dev_ready);
-		info->need_wait = 1;
-		pxa3xx_nand_start(info);
-
-		if (!wait_for_completion_timeout(&info->cmd_complete,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Wait time out!!!\n");
-			/* Stop State Machine for next command cycle */
-			pxa3xx_nand_stop(info);
-		}
-	}
-	info->state = STATE_IDLE;
-}
-
-static void nand_cmdfunc_extended(struct mtd_info *mtd,
-				  const unsigned command,
-				  int column, int page_addr)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int exec_cmd, ext_cmd_type;
-
-	/*
-	 * if this is a x16 device then convert the input
-	 * "byte" address into a "word" address appropriate
-	 * for indexing a word-oriented device
-	 */
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		column /= 2;
-
-	/*
-	 * There may be different NAND chip hooked to
-	 * different chip select, so check whether
-	 * chip select has been changed, if yes, reset the timing
-	 */
-	if (info->cs != host->cs) {
-		info->cs = host->cs;
-		nand_writel(info, NDTR0CS0, info->ndtr0cs0);
-		nand_writel(info, NDTR1CS0, info->ndtr1cs0);
-	}
-
-	/* Select the extended command for the first command */
-	switch (command) {
-	case NAND_CMD_READ0:
-	case NAND_CMD_READOOB:
-		ext_cmd_type = EXT_CMD_TYPE_MONO;
-		break;
-	case NAND_CMD_SEQIN:
-		ext_cmd_type = EXT_CMD_TYPE_DISPATCH;
-		break;
-	case NAND_CMD_PAGEPROG:
-		ext_cmd_type = EXT_CMD_TYPE_NAKED_RW;
-		break;
-	default:
-		ext_cmd_type = 0;
-		break;
-	}
-
-	prepare_start_command(info, command);
-
-	/*
-	 * Prepare the "is ready" completion before starting a command
-	 * transaction sequence. If the command is not executed the
-	 * completion will be completed, see below.
-	 *
-	 * We can do that inside the loop because the command variable
-	 * is invariant and thus so is the exec_cmd.
-	 */
-	info->need_wait = 1;
-	init_completion(&info->dev_ready);
-	do {
-		info->state = STATE_PREPARED;
-
-		exec_cmd = prepare_set_command(info, command, ext_cmd_type,
-					       column, page_addr);
-		if (!exec_cmd) {
-			info->need_wait = 0;
-			complete(&info->dev_ready);
-			break;
-		}
-
-		init_completion(&info->cmd_complete);
-		pxa3xx_nand_start(info);
-
-		if (!wait_for_completion_timeout(&info->cmd_complete,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Wait time out!!!\n");
-			/* Stop State Machine for next command cycle */
-			pxa3xx_nand_stop(info);
-			break;
-		}
-
-		/* Only a few commands need several steps */
-		if (command != NAND_CMD_PAGEPROG &&
-		    command != NAND_CMD_READ0    &&
-		    command != NAND_CMD_READOOB)
-			break;
-
-		info->cur_chunk++;
-
-		/* Check if the sequence is complete */
-		if (info->cur_chunk == info->ntotalchunks && command != NAND_CMD_PAGEPROG)
-			break;
-
-		/*
-		 * After a splitted program command sequence has issued
-		 * the command dispatch, the command sequence is complete.
-		 */
-		if (info->cur_chunk == (info->ntotalchunks + 1) &&
-		    command == NAND_CMD_PAGEPROG &&
-		    ext_cmd_type == EXT_CMD_TYPE_DISPATCH)
-			break;
-
-		if (command == NAND_CMD_READ0 || command == NAND_CMD_READOOB) {
-			/* Last read: issue a 'last naked read' */
-			if (info->cur_chunk == info->ntotalchunks - 1)
-				ext_cmd_type = EXT_CMD_TYPE_LAST_RW;
-			else
-				ext_cmd_type = EXT_CMD_TYPE_NAKED_RW;
-
-		/*
-		 * If a splitted program command has no more data to transfer,
-		 * the command dispatch must be issued to complete.
-		 */
-		} else if (command == NAND_CMD_PAGEPROG &&
-			   info->cur_chunk == info->ntotalchunks) {
-				ext_cmd_type = EXT_CMD_TYPE_DISPATCH;
-		}
-	} while (1);
-
-	info->state = STATE_IDLE;
-}
-
-static int pxa3xx_nand_write_page_hwecc(struct mtd_info *mtd,
-		struct nand_chip *chip, const uint8_t *buf, int oob_required,
-		int page)
-{
-	nand_prog_page_begin_op(chip, page, 0, buf, mtd->writesize);
-	chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
-
-	return nand_prog_page_end_op(chip);
-}
-
-static int pxa3xx_nand_read_page_hwecc(struct mtd_info *mtd,
-		struct nand_chip *chip, uint8_t *buf, int oob_required,
-		int page)
-{
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-
-	nand_read_page_op(chip, page, 0, buf, mtd->writesize);
-	chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
-
-	if (info->retcode == ERR_CORERR && info->use_ecc) {
-		mtd->ecc_stats.corrected += info->ecc_err_cnt;
-
-	} else if (info->retcode == ERR_UNCORERR) {
-		/*
-		 * for blank page (all 0xff), HW will calculate its ECC as
-		 * 0, which is different from the ECC information within
-		 * OOB, ignore such uncorrectable errors
-		 */
-		if (is_buf_blank(buf, mtd->writesize))
-			info->retcode = ERR_NONE;
-		else
-			mtd->ecc_stats.failed++;
-	}
-
-	return info->max_bitflips;
-}
-
-static uint8_t pxa3xx_nand_read_byte(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	char retval = 0xFF;
-
-	if (info->buf_start < info->buf_count)
-		/* Has just send a new command? */
-		retval = info->data_buff[info->buf_start++];
-
-	return retval;
-}
-
-static u16 pxa3xx_nand_read_word(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	u16 retval = 0xFFFF;
-
-	if (!(info->buf_start & 0x01) && info->buf_start < info->buf_count) {
-		retval = *((u16 *)(info->data_buff+info->buf_start));
-		info->buf_start += 2;
-	}
-	return retval;
-}
-
-static void pxa3xx_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int real_len = min_t(size_t, len, info->buf_count - info->buf_start);
-
-	memcpy(buf, info->data_buff + info->buf_start, real_len);
-	info->buf_start += real_len;
-}
-
-static void pxa3xx_nand_write_buf(struct mtd_info *mtd,
-		const uint8_t *buf, int len)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	int real_len = min_t(size_t, len, info->buf_count - info->buf_start);
-
-	memcpy(info->data_buff + info->buf_start, buf, real_len);
-	info->buf_start += real_len;
-}
-
-static void pxa3xx_nand_select_chip(struct mtd_info *mtd, int chip)
-{
-	return;
-}
-
-static int pxa3xx_nand_waitfunc(struct mtd_info *mtd, struct nand_chip *this)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-
-	if (info->need_wait) {
-		info->need_wait = 0;
-		if (!wait_for_completion_timeout(&info->dev_ready,
-		    CHIP_DELAY_TIMEOUT)) {
-			dev_err(&info->pdev->dev, "Ready time out!!!\n");
-			return NAND_STATUS_FAIL;
-		}
-	}
-
-	/* pxa3xx_nand_send_command has waited for command complete */
-	if (this->state == FL_WRITING || this->state == FL_ERASING) {
-		if (info->retcode == ERR_NONE)
-			return 0;
-		else
-			return NAND_STATUS_FAIL;
-	}
-
-	return NAND_STATUS_READY;
-}
-
-static int pxa3xx_nand_config_ident(struct pxa3xx_nand_info *info)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	const struct nand_sdr_timings *timings;
-
-	/* Configure default flash values */
-	info->chunk_size = PAGE_CHUNK_SIZE;
-	info->reg_ndcr = 0x0; /* enable all interrupts */
-	info->reg_ndcr |= (pdata->enable_arbiter) ? NDCR_ND_ARB_EN : 0;
-	info->reg_ndcr |= NDCR_RD_ID_CNT(READ_ID_BYTES);
-	info->reg_ndcr |= NDCR_SPARE_EN;
-
-	/* use the common timing to make a try */
-	timings = onfi_async_timing_mode_to_sdr_timings(0);
-	if (IS_ERR(timings))
-		return PTR_ERR(timings);
-
-	pxa3xx_nand_set_sdr_timing(host, timings);
-	return 0;
-}
-
-static void pxa3xx_nand_config_tail(struct pxa3xx_nand_info *info)
-{
-	struct pxa3xx_nand_host *host = info->host[info->cs];
-	struct nand_chip *chip = &host->chip;
-	struct mtd_info *mtd = nand_to_mtd(chip);
-
-	info->reg_ndcr |= (host->col_addr_cycles == 2) ? NDCR_RA_START : 0;
-	info->reg_ndcr |= (chip->page_shift == 6) ? NDCR_PG_PER_BLK : 0;
-	info->reg_ndcr |= (mtd->writesize == 2048) ? NDCR_PAGE_SZ : 0;
-}
-
-static void pxa3xx_nand_detect_config(struct pxa3xx_nand_info *info)
-{
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	uint32_t ndcr = nand_readl(info, NDCR);
-
-	/* Set an initial chunk size */
-	info->chunk_size = ndcr & NDCR_PAGE_SZ ? 2048 : 512;
-	info->reg_ndcr = ndcr &
-		~(NDCR_INT_MASK | NDCR_ND_ARB_EN | NFCV1_NDCR_ARB_CNTL);
-	info->reg_ndcr |= (pdata->enable_arbiter) ? NDCR_ND_ARB_EN : 0;
-	info->ndtr0cs0 = nand_readl(info, NDTR0CS0);
-	info->ndtr1cs0 = nand_readl(info, NDTR1CS0);
-}
-
-static int pxa3xx_nand_init_buff(struct pxa3xx_nand_info *info)
-{
-	struct platform_device *pdev = info->pdev;
-	struct dma_slave_config	config;
-	dma_cap_mask_t mask;
-	struct pxad_param param;
-	int ret;
-
-	info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
-	if (info->data_buff == NULL)
-		return -ENOMEM;
-	if (use_dma == 0)
-		return 0;
-
-	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
-	if (ret)
-		return ret;
-
-	sg_init_one(&info->sg, info->data_buff, info->buf_size);
-	dma_cap_zero(mask);
-	dma_cap_set(DMA_SLAVE, mask);
-	param.prio = PXAD_PRIO_LOWEST;
-	param.drcmr = info->drcmr_dat;
-	info->dma_chan = dma_request_slave_channel_compat(mask, pxad_filter_fn,
-							  &param, &pdev->dev,
-							  "data");
-	if (!info->dma_chan) {
-		dev_err(&pdev->dev, "unable to request data dma channel\n");
-		return -ENODEV;
-	}
-
-	memset(&config, 0, sizeof(config));
-	config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-	config.src_addr = info->mmio_phys + NDDB;
-	config.dst_addr = info->mmio_phys + NDDB;
-	config.src_maxburst = 32;
-	config.dst_maxburst = 32;
-	ret = dmaengine_slave_config(info->dma_chan, &config);
-	if (ret < 0) {
-		dev_err(&info->pdev->dev,
-			"dma channel configuration failed: %d\n",
-			ret);
-		return ret;
-	}
-
-	/*
-	 * Now that DMA buffers are allocated we turn on
-	 * DMA proper for I/O operations.
-	 */
-	info->use_dma = 1;
-	return 0;
-}
-
-static void pxa3xx_nand_free_buff(struct pxa3xx_nand_info *info)
-{
-	if (info->use_dma) {
-		dmaengine_terminate_all(info->dma_chan);
-		dma_release_channel(info->dma_chan);
-	}
-	kfree(info->data_buff);
-}
-
-static int pxa_ecc_init(struct pxa3xx_nand_info *info,
-			struct mtd_info *mtd,
-			int strength, int ecc_stepsize, int page_size)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct nand_ecc_ctrl *ecc = &chip->ecc;
-
-	if (strength == 1 && ecc_stepsize == 512 && page_size == 2048) {
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 2048;
-		info->spare_size = 40;
-		info->ecc_size = 24;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = 512;
-		ecc->strength = 1;
-
-	} else if (strength == 1 && ecc_stepsize == 512 && page_size == 512) {
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 512;
-		info->spare_size = 8;
-		info->ecc_size = 8;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = 512;
-		ecc->strength = 1;
-
-	/*
-	 * Required ECC: 4-bit correction per 512 bytes
-	 * Select: 16-bit correction per 2048 bytes
-	 */
-	} else if (strength == 4 && ecc_stepsize == 512 && page_size == 2048) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 1;
-		info->ntotalchunks = 1;
-		info->chunk_size = 2048;
-		info->spare_size = 32;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-
-	} else if (strength == 4 && ecc_stepsize == 512 && page_size == 4096) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 2;
-		info->ntotalchunks = 2;
-		info->chunk_size = 2048;
-		info->spare_size = 32;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-
-	/*
-	 * Required ECC: 8-bit correction per 512 bytes
-	 * Select: 16-bit correction per 1024 bytes
-	 */
-	} else if (strength == 8 && ecc_stepsize == 512 && page_size == 4096) {
-		info->ecc_bch = 1;
-		info->nfullchunks = 4;
-		info->ntotalchunks = 5;
-		info->chunk_size = 1024;
-		info->spare_size = 0;
-		info->last_chunk_size = 0;
-		info->last_spare_size = 64;
-		info->ecc_size = 32;
-		ecc->mode = NAND_ECC_HW;
-		ecc->size = info->chunk_size;
-		mtd_set_ooblayout(mtd, &pxa3xx_ooblayout_ops);
-		ecc->strength = 16;
-	} else {
-		dev_err(&info->pdev->dev,
-			"ECC strength %d at page size %d is not supported\n",
-			strength, page_size);
-		return -ENODEV;
-	}
-
-	dev_info(&info->pdev->dev, "ECC strength %d, ECC step size %d\n",
-		 ecc->strength, ecc->size);
-	return 0;
-}
-
-static int pxa3xx_nand_scan(struct mtd_info *mtd)
-{
-	struct nand_chip *chip = mtd_to_nand(mtd);
-	struct pxa3xx_nand_host *host = nand_get_controller_data(chip);
-	struct pxa3xx_nand_info *info = host->info_data;
-	struct platform_device *pdev = info->pdev;
-	struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(&pdev->dev);
-	int ret;
-	uint16_t ecc_strength, ecc_step;
-
-	if (pdata->keep_config) {
-		pxa3xx_nand_detect_config(info);
-	} else {
-		ret = pxa3xx_nand_config_ident(info);
-		if (ret)
-			return ret;
-	}
-
-	if (info->reg_ndcr & NDCR_DWIDTH_M)
-		chip->options |= NAND_BUSWIDTH_16;
-
-	/* Device detection must be done with ECC disabled */
-	if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-	    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K)
-		nand_writel(info, NDECCCTRL, 0x0);
-
-	if (pdata->flash_bbt)
-		chip->bbt_options |= NAND_BBT_USE_FLASH;
-
-	chip->ecc.strength = pdata->ecc_strength;
-	chip->ecc.size = pdata->ecc_step_size;
-
-	ret = nand_scan_ident(mtd, 1, NULL);
-	if (ret)
-		return ret;
-
-	if (!pdata->keep_config) {
-		ret = pxa3xx_nand_init(host);
-		if (ret) {
-			dev_err(&info->pdev->dev, "Failed to init nand: %d\n",
-				ret);
-			return ret;
-		}
-	}
-
-	if (chip->bbt_options & NAND_BBT_USE_FLASH) {
-		/*
-		 * We'll use a bad block table stored in-flash and don't
-		 * allow writing the bad block marker to the flash.
-		 */
-		chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
-		chip->bbt_td = &bbt_main_descr;
-		chip->bbt_md = &bbt_mirror_descr;
-	}
-
-	/*
-	 * If the page size is bigger than the FIFO size, let's check
-	 * we are given the right variant and then switch to the extended
-	 * (aka splitted) command handling,
-	 */
-	if (mtd->writesize > PAGE_CHUNK_SIZE) {
-		if (info->variant == PXA3XX_NAND_VARIANT_ARMADA370 ||
-		    info->variant == PXA3XX_NAND_VARIANT_ARMADA_8K) {
-			chip->cmdfunc = nand_cmdfunc_extended;
-		} else {
-			dev_err(&info->pdev->dev,
-				"unsupported page size on this variant\n");
-			return -ENODEV;
-		}
-	}
-
-	ecc_strength = chip->ecc.strength;
-	ecc_step = chip->ecc.size;
-	if (!ecc_strength || !ecc_step) {
-		ecc_strength = chip->ecc_strength_ds;
-		ecc_step = chip->ecc_step_ds;
-	}
-
-	/* Set default ECC strength requirements on non-ONFI devices */
-	if (ecc_strength < 1 && ecc_step < 1) {
-		ecc_strength = 1;
-		ecc_step = 512;
-	}
-
-	ret = pxa_ecc_init(info, mtd, ecc_strength,
-			   ecc_step, mtd->writesize);
-	if (ret)
-		return ret;
-
-	/* calculate addressing information */
-	if (mtd->writesize >= 2048)
-		host->col_addr_cycles = 2;
-	else
-		host->col_addr_cycles = 1;
-
-	/* release the initial buffer */
-	kfree(info->data_buff);
-
-	/* allocate the real data + oob buffer */
-	info->buf_size = mtd->writesize + mtd->oobsize;
-	ret = pxa3xx_nand_init_buff(info);
-	if (ret)
-		return ret;
-	info->oob_buff = info->data_buff + mtd->writesize;
-
-	if ((mtd->size >> chip->page_shift) > 65536)
-		host->row_addr_cycles = 3;
-	else
-		host->row_addr_cycles = 2;
-
-	if (!pdata->keep_config)
-		pxa3xx_nand_config_tail(info);
-
-	return nand_scan_tail(mtd);
-}
-
-static int alloc_nand_resource(struct platform_device *pdev)
-{
-	struct device_node *np = pdev->dev.of_node;
-	struct pxa3xx_nand_platform_data *pdata;
-	struct pxa3xx_nand_info *info;
-	struct pxa3xx_nand_host *host;
-	struct nand_chip *chip = NULL;
-	struct mtd_info *mtd;
-	struct resource *r;
-	int ret, irq, cs;
-
-	pdata = dev_get_platdata(&pdev->dev);
-	if (pdata->num_cs <= 0) {
-		dev_err(&pdev->dev, "invalid number of chip selects\n");
-		return -ENODEV;
-	}
-
-	info = devm_kzalloc(&pdev->dev,
-			    sizeof(*info) + sizeof(*host) * pdata->num_cs,
-			    GFP_KERNEL);
-	if (!info)
-		return -ENOMEM;
-
-	info->pdev = pdev;
-	info->variant = pxa3xx_nand_get_variant(pdev);
-	for (cs = 0; cs < pdata->num_cs; cs++) {
-		host = (void *)&info[1] + sizeof(*host) * cs;
-		chip = &host->chip;
-		nand_set_controller_data(chip, host);
-		mtd = nand_to_mtd(chip);
-		info->host[cs] = host;
-		host->cs = cs;
-		host->info_data = info;
-		mtd->dev.parent = &pdev->dev;
-		/* FIXME: all chips use the same device tree partitions */
-		nand_set_flash_node(chip, np);
-
-		nand_set_controller_data(chip, host);
-		chip->ecc.read_page	= pxa3xx_nand_read_page_hwecc;
-		chip->ecc.write_page	= pxa3xx_nand_write_page_hwecc;
-		chip->controller        = &info->controller;
-		chip->waitfunc		= pxa3xx_nand_waitfunc;
-		chip->select_chip	= pxa3xx_nand_select_chip;
-		chip->read_word		= pxa3xx_nand_read_word;
-		chip->read_byte		= pxa3xx_nand_read_byte;
-		chip->read_buf		= pxa3xx_nand_read_buf;
-		chip->write_buf		= pxa3xx_nand_write_buf;
-		chip->options		|= NAND_NO_SUBPAGE_WRITE;
-		chip->cmdfunc		= nand_cmdfunc;
-		chip->onfi_set_features	= nand_onfi_get_set_features_notsupp;
-		chip->onfi_get_features	= nand_onfi_get_set_features_notsupp;
-	}
-
-	nand_hw_control_init(chip->controller);
-	info->clk = devm_clk_get(&pdev->dev, NULL);
-	if (IS_ERR(info->clk)) {
-		ret = PTR_ERR(info->clk);
-		dev_err(&pdev->dev, "failed to get nand clock: %d\n", ret);
-		return ret;
-	}
-	ret = clk_prepare_enable(info->clk);
-	if (ret < 0)
-		return ret;
-
-	if (!np && use_dma) {
-		r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
-		if (r == NULL) {
-			dev_err(&pdev->dev,
-				"no resource defined for data DMA\n");
-			ret = -ENXIO;
-			goto fail_disable_clk;
-		}
-		info->drcmr_dat = r->start;
-	}
-
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "no IRQ resource defined\n");
-		ret = -ENXIO;
-		goto fail_disable_clk;
-	}
-
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	info->mmio_base = devm_ioremap_resource(&pdev->dev, r);
-	if (IS_ERR(info->mmio_base)) {
-		ret = PTR_ERR(info->mmio_base);
-		dev_err(&pdev->dev, "failed to map register space: %d\n", ret);
-		goto fail_disable_clk;
-	}
-	info->mmio_phys = r->start;
-
-	/* Allocate a buffer to allow flash detection */
-	info->buf_size = INIT_BUFFER_SIZE;
-	info->data_buff = kmalloc(info->buf_size, GFP_KERNEL);
-	if (info->data_buff == NULL) {
-		ret = -ENOMEM;
-		goto fail_disable_clk;
-	}
-
-	/* initialize all interrupts to be disabled */
-	disable_int(info, NDSR_MASK);
-
-	ret = request_threaded_irq(irq, pxa3xx_nand_irq,
-				   pxa3xx_nand_irq_thread, IRQF_ONESHOT,
-				   pdev->name, info);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "failed to request IRQ: %d\n", ret);
-		goto fail_free_buf;
-	}
-
-	platform_set_drvdata(pdev, info);
-
-	return 0;
-
-fail_free_buf:
-	free_irq(irq, info);
-	kfree(info->data_buff);
-fail_disable_clk:
-	clk_disable_unprepare(info->clk);
-	return ret;
-}
-
-static int pxa3xx_nand_remove(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_info *info = platform_get_drvdata(pdev);
-	struct pxa3xx_nand_platform_data *pdata;
-	int irq, cs;
-
-	if (!info)
-		return 0;
-
-	pdata = dev_get_platdata(&pdev->dev);
-
-	irq = platform_get_irq(pdev, 0);
-	if (irq >= 0)
-		free_irq(irq, info);
-	pxa3xx_nand_free_buff(info);
-
-	/*
-	 * In the pxa3xx case, the DFI bus is shared between the SMC and NFC.
-	 * In order to prevent a lockup of the system bus, the DFI bus
-	 * arbitration is granted to SMC upon driver removal. This is done by
-	 * setting the x_ARB_CNTL bit, which also prevents the NAND to have
-	 * access to the bus anymore.
-	 */
-	nand_writel(info, NDCR,
-		    (nand_readl(info, NDCR) & ~NDCR_ND_ARB_EN) |
-		    NFCV1_NDCR_ARB_CNTL);
-	clk_disable_unprepare(info->clk);
-
-	for (cs = 0; cs < pdata->num_cs; cs++)
-		nand_release(nand_to_mtd(&info->host[cs]->chip));
-	return 0;
-}
-
-static int pxa3xx_nand_probe_dt(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_platform_data *pdata;
-	struct device_node *np = pdev->dev.of_node;
-	const struct of_device_id *of_id =
-			of_match_device(pxa3xx_nand_dt_ids, &pdev->dev);
-
-	if (!of_id)
-		return 0;
-
-	/*
-	 * Some SoCs like A7k/A8k need to enable manually the NAND
-	 * controller to avoid being bootloader dependent. This is done
-	 * through the use of a single bit in the System Functions registers.
-	 */
-	if (pxa3xx_nand_get_variant(pdev) == PXA3XX_NAND_VARIANT_ARMADA_8K) {
-		struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
-			pdev->dev.of_node, "marvell,system-controller");
-		u32 reg;
-
-		if (IS_ERR(sysctrl_base))
-			return PTR_ERR(sysctrl_base);
-
-		regmap_read(sysctrl_base, GENCONF_SOC_DEVICE_MUX, &reg);
-		reg |= GENCONF_SOC_DEVICE_MUX_NFC_EN;
-		regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
-	}
-
-	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-	if (!pdata)
-		return -ENOMEM;
-
-	if (of_get_property(np, "marvell,nand-enable-arbiter", NULL))
-		pdata->enable_arbiter = 1;
-	if (of_get_property(np, "marvell,nand-keep-config", NULL))
-		pdata->keep_config = 1;
-	of_property_read_u32(np, "num-cs", &pdata->num_cs);
-
-	pdev->dev.platform_data = pdata;
-
-	return 0;
-}
-
-static int pxa3xx_nand_probe(struct platform_device *pdev)
-{
-	struct pxa3xx_nand_platform_data *pdata;
-	struct pxa3xx_nand_info *info;
-	int ret, cs, probe_success, dma_available;
-
-	dma_available = IS_ENABLED(CONFIG_ARM) &&
-		(IS_ENABLED(CONFIG_ARCH_PXA) || IS_ENABLED(CONFIG_ARCH_MMP));
-	if (use_dma && !dma_available) {
-		use_dma = 0;
-		dev_warn(&pdev->dev,
-			 "This platform can't do DMA on this device\n");
-	}
-
-	ret = pxa3xx_nand_probe_dt(pdev);
-	if (ret)
-		return ret;
-
-	pdata = dev_get_platdata(&pdev->dev);
-	if (!pdata) {
-		dev_err(&pdev->dev, "no platform data defined\n");
-		return -ENODEV;
-	}
-
-	ret = alloc_nand_resource(pdev);
-	if (ret)
-		return ret;
-
-	info = platform_get_drvdata(pdev);
-	probe_success = 0;
-	for (cs = 0; cs < pdata->num_cs; cs++) {
-		struct mtd_info *mtd = nand_to_mtd(&info->host[cs]->chip);
-
-		/*
-		 * The mtd name matches the one used in 'mtdparts' kernel
-		 * parameter. This name cannot be changed or otherwise
-		 * user's mtd partitions configuration would get broken.
-		 */
-		mtd->name = "pxa3xx_nand-0";
-		info->cs = cs;
-		ret = pxa3xx_nand_scan(mtd);
-		if (ret) {
-			dev_warn(&pdev->dev, "failed to scan nand at cs %d\n",
-				cs);
-			continue;
-		}
-
-		ret = mtd_device_register(mtd, pdata->parts[cs],
-					  pdata->nr_parts[cs]);
-		if (!ret)
-			probe_success = 1;
-	}
-
-	if (!probe_success) {
-		pxa3xx_nand_remove(pdev);
-		return -ENODEV;
-	}
-
-	return 0;
-}
-
-#ifdef CONFIG_PM
-static int pxa3xx_nand_suspend(struct device *dev)
-{
-	struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
-
-	if (info->state) {
-		dev_err(dev, "driver busy, state = %d\n", info->state);
-		return -EAGAIN;
-	}
-
-	clk_disable(info->clk);
-	return 0;
-}
-
-static int pxa3xx_nand_resume(struct device *dev)
-{
-	struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
-	int ret;
-
-	ret = clk_enable(info->clk);
-	if (ret < 0)
-		return ret;
-
-	/* We don't want to handle interrupt without calling mtd routine */
-	disable_int(info, NDCR_INT_MASK);
-
-	/*
-	 * Directly set the chip select to a invalid value,
-	 * then the driver would reset the timing according
-	 * to current chip select@the beginning of cmdfunc
-	 */
-	info->cs = 0xff;
-
-	/*
-	 * As the spec says, the NDSR would be updated to 0x1800 when
-	 * doing the nand_clk disable/enable.
-	 * To prevent it damaging state machine of the driver, clear
-	 * all status before resume
-	 */
-	nand_writel(info, NDSR, NDSR_MASK);
-
-	return 0;
-}
-#else
-#define pxa3xx_nand_suspend	NULL
-#define pxa3xx_nand_resume	NULL
-#endif
-
-static const struct dev_pm_ops pxa3xx_nand_pm_ops = {
-	.suspend	= pxa3xx_nand_suspend,
-	.resume		= pxa3xx_nand_resume,
-};
-
-static struct platform_driver pxa3xx_nand_driver = {
-	.driver = {
-		.name	= "pxa3xx-nand",
-		.of_match_table = pxa3xx_nand_dt_ids,
-		.pm	= &pxa3xx_nand_pm_ops,
-	},
-	.probe		= pxa3xx_nand_probe,
-	.remove		= pxa3xx_nand_remove,
-};
-
-module_platform_driver(pxa3xx_nand_driver);
-
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("PXA3xx NAND controller driver");
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 04/12] dt-bindings: mtd: remove pxa3xx NAND controller documentation
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

The deprecated pxa3xx_nand.c driver does not exist anymore, it has been
replaced by marvell_nand.c which has its own up-to-date documentation.

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 .../devicetree/bindings/mtd/pxa3xx-nand.txt        | 50 ----------------------
 1 file changed, 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt

diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
deleted file mode 100644
index d4ee4da58463..000000000000
--- a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-PXA3xx NAND DT bindings
-
-Required properties:
-
- - compatible:		Should be set to one of the following:
-			marvell,pxa3xx-nand
-			marvell,armada370-nand
-			marvell,armada-8k-nand
- - reg: 		The register base for the controller
- - interrupts:		The interrupt to map
- - #address-cells:	Set to <1> if the node includes partitions
- - marvell,system-controller: Set to retrieve the syscon node that handles
-			NAND controller related registers (only required
-			with marvell,armada-8k-nand compatible).
-
-Optional properties:
-
- - dmas:			dma data channel, see dma.txt binding doc
- - marvell,nand-enable-arbiter:	Set to enable the bus arbiter
- - marvell,nand-keep-config:	Set to keep the NAND controller config as set
-				by the bootloader
- - num-cs:			Number of chipselect lines to use
- - nand-on-flash-bbt: 		boolean to enable on flash bbt option if
-				not present false
- - nand-ecc-strength:           number of bits to correct per ECC step
- - nand-ecc-step-size:          number of data bytes covered by a single ECC step
-
-The following ECC strength and step size are currently supported:
-
- - nand-ecc-strength = <1>, nand-ecc-step-size = <512>
- - nand-ecc-strength = <4>, nand-ecc-step-size = <512>
- - nand-ecc-strength = <8>, nand-ecc-step-size = <512>
-
-Example:
-
-	nand0: nand@43100000 {
-		compatible = "marvell,pxa3xx-nand";
-		reg = <0x43100000 90>;
-		interrupts = <45>;
-		dmas = <&pdma 97 0>;
-		dma-names = "data";
-		#address-cells = <1>;
-
-		marvell,nand-enable-arbiter;
-		marvell,nand-keep-config;
-		num-cs = <1>;
-
-		/* partitions (optional) */
-	};
-
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 04/12] dt-bindings: mtd: remove pxa3xx NAND controller documentation
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

The deprecated pxa3xx_nand.c driver does not exist anymore, it has been
replaced by marvell_nand.c which has its own up-to-date documentation.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 .../devicetree/bindings/mtd/pxa3xx-nand.txt        | 50 ----------------------
 1 file changed, 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt

diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
deleted file mode 100644
index d4ee4da58463..000000000000
--- a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-PXA3xx NAND DT bindings
-
-Required properties:
-
- - compatible:		Should be set to one of the following:
-			marvell,pxa3xx-nand
-			marvell,armada370-nand
-			marvell,armada-8k-nand
- - reg: 		The register base for the controller
- - interrupts:		The interrupt to map
- - #address-cells:	Set to <1> if the node includes partitions
- - marvell,system-controller: Set to retrieve the syscon node that handles
-			NAND controller related registers (only required
-			with marvell,armada-8k-nand compatible).
-
-Optional properties:
-
- - dmas:			dma data channel, see dma.txt binding doc
- - marvell,nand-enable-arbiter:	Set to enable the bus arbiter
- - marvell,nand-keep-config:	Set to keep the NAND controller config as set
-				by the bootloader
- - num-cs:			Number of chipselect lines to use
- - nand-on-flash-bbt: 		boolean to enable on flash bbt option if
-				not present false
- - nand-ecc-strength:           number of bits to correct per ECC step
- - nand-ecc-step-size:          number of data bytes covered by a single ECC step
-
-The following ECC strength and step size are currently supported:
-
- - nand-ecc-strength = <1>, nand-ecc-step-size = <512>
- - nand-ecc-strength = <4>, nand-ecc-step-size = <512>
- - nand-ecc-strength = <8>, nand-ecc-step-size = <512>
-
-Example:
-
-	nand0: nand@43100000 {
-		compatible = "marvell,pxa3xx-nand";
-		reg = <0x43100000 90>;
-		interrupts = <45>;
-		dmas = <&pdma 97 0>;
-		dma-names = "data";
-		#address-cells = <1>;
-
-		marvell,nand-enable-arbiter;
-		marvell,nand-keep-config;
-		num-cs = <1>;
-
-		/* partitions (optional) */
-	};
-
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 04/12] dt-bindings: mtd: remove pxa3xx NAND controller documentation
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

The deprecated pxa3xx_nand.c driver does not exist anymore, it has been
replaced by marvell_nand.c which has its own up-to-date documentation.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 .../devicetree/bindings/mtd/pxa3xx-nand.txt        | 50 ----------------------
 1 file changed, 50 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt

diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
deleted file mode 100644
index d4ee4da58463..000000000000
--- a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-PXA3xx NAND DT bindings
-
-Required properties:
-
- - compatible:		Should be set to one of the following:
-			marvell,pxa3xx-nand
-			marvell,armada370-nand
-			marvell,armada-8k-nand
- - reg: 		The register base for the controller
- - interrupts:		The interrupt to map
- - #address-cells:	Set to <1> if the node includes partitions
- - marvell,system-controller: Set to retrieve the syscon node that handles
-			NAND controller related registers (only required
-			with marvell,armada-8k-nand compatible).
-
-Optional properties:
-
- - dmas:			dma data channel, see dma.txt binding doc
- - marvell,nand-enable-arbiter:	Set to enable the bus arbiter
- - marvell,nand-keep-config:	Set to keep the NAND controller config as set
-				by the bootloader
- - num-cs:			Number of chipselect lines to use
- - nand-on-flash-bbt: 		boolean to enable on flash bbt option if
-				not present false
- - nand-ecc-strength:           number of bits to correct per ECC step
- - nand-ecc-step-size:          number of data bytes covered by a single ECC step
-
-The following ECC strength and step size are currently supported:
-
- - nand-ecc-strength = <1>, nand-ecc-step-size = <512>
- - nand-ecc-strength = <4>, nand-ecc-step-size = <512>
- - nand-ecc-strength = <8>, nand-ecc-step-size = <512>
-
-Example:
-
-	nand0: nand at 43100000 {
-		compatible = "marvell,pxa3xx-nand";
-		reg = <0x43100000 90>;
-		interrupts = <45>;
-		dmas = <&pdma 97 0>;
-		dma-names = "data";
-		#address-cells = <1>;
-
-		marvell,nand-enable-arbiter;
-		marvell,nand-keep-config;
-		num-cs = <1>;
-
-		/* partitions (optional) */
-	};
-
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 05/12] mtd: nand: remove useless fields from pxa3xx NAND platform data
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

The "enable arbiter" bit is available only for pxa3xx based platforms
but it was experimentally shown that even if this bit is reserved,
some Marvell platforms (64-bit) actually need it to be set. The driver
always set this bit regardless of this property, which is harmless.
Then this property is not needed.

The "num_cs" field is always 1 and for a good reason, the old driver
(pxa3xx_nand.c) could only handle one. The new driver that replaces it
(marvell_nand.c) can handle more, but better use device tree for such
description. As there is only one available chip select, there is no
need for an array of partitions neither an array of partition numbers.

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm/mach-pxa/cm-x300.c                   |  6 ++--
 arch/arm/mach-pxa/colibri-pxa3xx.c            |  6 ++--
 arch/arm/mach-pxa/littleton.c                 |  6 ++--
 arch/arm/mach-pxa/mxm8x10.c                   |  6 ++--
 arch/arm/mach-pxa/raumfeld.c                  |  6 ++--
 arch/arm/mach-pxa/zylonite.c                  |  6 ++--
 drivers/mtd/nand/marvell_nand.c               |  3 +-
 include/linux/platform_data/mtd-nand-pxa3xx.h | 43 ++++++++-------------------
 8 files changed, 25 insertions(+), 57 deletions(-)

diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 89326378dabf..23bb273f3ff3 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -429,11 +429,9 @@ static struct mtd_partition cm_x300_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data cm_x300_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= cm_x300_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(cm_x300_nand_partitions),
+	.parts		= cm_x300_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(cm_x300_nand_partitions),
 };
 
 static void __init cm_x300_init_nand(void)
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index c9c36f707555..adec6e013fe6 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -138,11 +138,9 @@ static struct mtd_partition colibri_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data colibri_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= colibri_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(colibri_nand_partitions),
+	.parts		= colibri_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(colibri_nand_partitions),
 };
 
 void __init colibri_pxa3xx_init_nand(void)
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 898961be36db..7e120e884165 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -328,10 +328,8 @@ static struct mtd_partition littleton_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data littleton_nand_info = {
-	.enable_arbiter	= 1,
-	.num_cs		= 1,
-	.parts[0]	= littleton_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(littleton_nand_partitions),
+	.parts		= littleton_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(littleton_nand_partitions),
 };
 
 static void __init littleton_init_nand(void)
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c
index 7d7aab20b70a..328689052668 100644
--- a/arch/arm/mach-pxa/mxm8x10.c
+++ b/arch/arm/mach-pxa/mxm8x10.c
@@ -389,11 +389,9 @@ static struct mtd_partition mxm_8x10_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data mxm_8x10_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= mxm_8x10_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(mxm_8x10_nand_partitions)
+	.parts		= mxm_8x10_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(mxm_8x10_nand_partitions)
 };
 
 static void __init mxm_8x10_nand_init(void)
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 9d662fed03ec..af72e79a7ffa 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -346,11 +346,9 @@ static struct mtd_partition raumfeld_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data raumfeld_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= raumfeld_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(raumfeld_nand_partitions),
+	.parts		= raumfeld_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(raumfeld_nand_partitions),
 };
 
 /**
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index a4577118d518..0534949d63f6 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -376,10 +376,8 @@ static struct mtd_partition zylonite_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data zylonite_nand_info = {
-	.enable_arbiter	= 1,
-	.num_cs		= 1,
-	.parts[0]	= zylonite_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(zylonite_nand_partitions),
+	.parts		= zylonite_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(zylonite_nand_partitions),
 };
 
 static void __init zylonite_init_nand(void)
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index 2525d9b2f4fa..75fbb3ea4977 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -2579,8 +2579,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
 
 	if (pdata)
 		/* Legacy bindings support only one chip */
-		ret = mtd_device_register(mtd, pdata->parts[0],
-					  pdata->nr_parts[0]);
+		ret = mtd_device_register(mtd, pdata->parts, pdata->nr_parts);
 	else
 		ret = mtd_device_register(mtd, NULL, 0);
 	if (ret) {
diff --git a/include/linux/platform_data/mtd-nand-pxa3xx.h b/include/linux/platform_data/mtd-nand-pxa3xx.h
index b42ad83cbc20..4fd0f592a2d2 100644
--- a/include/linux/platform_data/mtd-nand-pxa3xx.h
+++ b/include/linux/platform_data/mtd-nand-pxa3xx.h
@@ -6,41 +6,22 @@
 #include <linux/mtd/partitions.h>
 
 /*
- * Current pxa3xx_nand controller has two chip select which
- * both be workable.
- *
- * Notice should be taken that:
- * When you want to use this feature, you should not enable the
- * keep configuration feature, for two chip select could be
- * attached with different nand chip. The different page size
- * and timing requirement make the keep configuration impossible.
+ * Current pxa3xx_nand controller has two chip select which both be workable but
+ * historically all platforms remaining on platform data used only one. Switch
+ * to device tree if you need more.
  */
-
-/* The max num of chip select current support */
-#define NUM_CHIP_SELECT		(2)
 struct pxa3xx_nand_platform_data {
-
-	/* the data flash bus is shared between the Static Memory
-	 * Controller and the Data Flash Controller,  the arbiter
-	 * controls the ownership of the bus
-	 */
-	int	enable_arbiter;
-
-	/* allow platform code to keep OBM/bootloader defined NFC config */
-	int	keep_config;
-
-	/* indicate how many chip selects will be used */
-	int	num_cs;
-
-	/* use an flash-based bad block table */
-	bool	flash_bbt;
-
-	/* requested ECC strength and ECC step size */
+	/* Keep OBM/bootloader NFC timing configuration */
+	bool keep_config;
+	/* Use a flash-based bad block table */
+	bool flash_bbt;
+	/* Requested ECC strength and ECC step size */
 	int ecc_strength, ecc_step_size;
-
-	const struct mtd_partition		*parts[NUM_CHIP_SELECT];
-	unsigned int				nr_parts[NUM_CHIP_SELECT];
+	/* Partitions */
+	const struct mtd_partition *parts;
+	unsigned int nr_parts;
 };
 
 extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
+
 #endif /* __ASM_ARCH_PXA3XX_NAND_H */
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 05/12] mtd: nand: remove useless fields from pxa3xx NAND platform data
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

The "enable arbiter" bit is available only for pxa3xx based platforms
but it was experimentally shown that even if this bit is reserved,
some Marvell platforms (64-bit) actually need it to be set. The driver
always set this bit regardless of this property, which is harmless.
Then this property is not needed.

The "num_cs" field is always 1 and for a good reason, the old driver
(pxa3xx_nand.c) could only handle one. The new driver that replaces it
(marvell_nand.c) can handle more, but better use device tree for such
description. As there is only one available chip select, there is no
need for an array of partitions neither an array of partition numbers.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/mach-pxa/cm-x300.c                   |  6 ++--
 arch/arm/mach-pxa/colibri-pxa3xx.c            |  6 ++--
 arch/arm/mach-pxa/littleton.c                 |  6 ++--
 arch/arm/mach-pxa/mxm8x10.c                   |  6 ++--
 arch/arm/mach-pxa/raumfeld.c                  |  6 ++--
 arch/arm/mach-pxa/zylonite.c                  |  6 ++--
 drivers/mtd/nand/marvell_nand.c               |  3 +-
 include/linux/platform_data/mtd-nand-pxa3xx.h | 43 ++++++++-------------------
 8 files changed, 25 insertions(+), 57 deletions(-)

diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 89326378dabf..23bb273f3ff3 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -429,11 +429,9 @@ static struct mtd_partition cm_x300_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data cm_x300_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= cm_x300_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(cm_x300_nand_partitions),
+	.parts		= cm_x300_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(cm_x300_nand_partitions),
 };
 
 static void __init cm_x300_init_nand(void)
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index c9c36f707555..adec6e013fe6 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -138,11 +138,9 @@ static struct mtd_partition colibri_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data colibri_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= colibri_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(colibri_nand_partitions),
+	.parts		= colibri_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(colibri_nand_partitions),
 };
 
 void __init colibri_pxa3xx_init_nand(void)
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 898961be36db..7e120e884165 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -328,10 +328,8 @@ static struct mtd_partition littleton_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data littleton_nand_info = {
-	.enable_arbiter	= 1,
-	.num_cs		= 1,
-	.parts[0]	= littleton_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(littleton_nand_partitions),
+	.parts		= littleton_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(littleton_nand_partitions),
 };
 
 static void __init littleton_init_nand(void)
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c
index 7d7aab20b70a..328689052668 100644
--- a/arch/arm/mach-pxa/mxm8x10.c
+++ b/arch/arm/mach-pxa/mxm8x10.c
@@ -389,11 +389,9 @@ static struct mtd_partition mxm_8x10_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data mxm_8x10_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= mxm_8x10_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(mxm_8x10_nand_partitions)
+	.parts		= mxm_8x10_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(mxm_8x10_nand_partitions)
 };
 
 static void __init mxm_8x10_nand_init(void)
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 9d662fed03ec..af72e79a7ffa 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -346,11 +346,9 @@ static struct mtd_partition raumfeld_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data raumfeld_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= raumfeld_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(raumfeld_nand_partitions),
+	.parts		= raumfeld_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(raumfeld_nand_partitions),
 };
 
 /**
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index a4577118d518..0534949d63f6 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -376,10 +376,8 @@ static struct mtd_partition zylonite_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data zylonite_nand_info = {
-	.enable_arbiter	= 1,
-	.num_cs		= 1,
-	.parts[0]	= zylonite_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(zylonite_nand_partitions),
+	.parts		= zylonite_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(zylonite_nand_partitions),
 };
 
 static void __init zylonite_init_nand(void)
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index 2525d9b2f4fa..75fbb3ea4977 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -2579,8 +2579,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
 
 	if (pdata)
 		/* Legacy bindings support only one chip */
-		ret = mtd_device_register(mtd, pdata->parts[0],
-					  pdata->nr_parts[0]);
+		ret = mtd_device_register(mtd, pdata->parts, pdata->nr_parts);
 	else
 		ret = mtd_device_register(mtd, NULL, 0);
 	if (ret) {
diff --git a/include/linux/platform_data/mtd-nand-pxa3xx.h b/include/linux/platform_data/mtd-nand-pxa3xx.h
index b42ad83cbc20..4fd0f592a2d2 100644
--- a/include/linux/platform_data/mtd-nand-pxa3xx.h
+++ b/include/linux/platform_data/mtd-nand-pxa3xx.h
@@ -6,41 +6,22 @@
 #include <linux/mtd/partitions.h>
 
 /*
- * Current pxa3xx_nand controller has two chip select which
- * both be workable.
- *
- * Notice should be taken that:
- * When you want to use this feature, you should not enable the
- * keep configuration feature, for two chip select could be
- * attached with different nand chip. The different page size
- * and timing requirement make the keep configuration impossible.
+ * Current pxa3xx_nand controller has two chip select which both be workable but
+ * historically all platforms remaining on platform data used only one. Switch
+ * to device tree if you need more.
  */
-
-/* The max num of chip select current support */
-#define NUM_CHIP_SELECT		(2)
 struct pxa3xx_nand_platform_data {
-
-	/* the data flash bus is shared between the Static Memory
-	 * Controller and the Data Flash Controller,  the arbiter
-	 * controls the ownership of the bus
-	 */
-	int	enable_arbiter;
-
-	/* allow platform code to keep OBM/bootloader defined NFC config */
-	int	keep_config;
-
-	/* indicate how many chip selects will be used */
-	int	num_cs;
-
-	/* use an flash-based bad block table */
-	bool	flash_bbt;
-
-	/* requested ECC strength and ECC step size */
+	/* Keep OBM/bootloader NFC timing configuration */
+	bool keep_config;
+	/* Use a flash-based bad block table */
+	bool flash_bbt;
+	/* Requested ECC strength and ECC step size */
 	int ecc_strength, ecc_step_size;
-
-	const struct mtd_partition		*parts[NUM_CHIP_SELECT];
-	unsigned int				nr_parts[NUM_CHIP_SELECT];
+	/* Partitions */
+	const struct mtd_partition *parts;
+	unsigned int nr_parts;
 };
 
 extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
+
 #endif /* __ASM_ARCH_PXA3XX_NAND_H */
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 05/12] mtd: nand: remove useless fields from pxa3xx NAND platform data
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

The "enable arbiter" bit is available only for pxa3xx based platforms
but it was experimentally shown that even if this bit is reserved,
some Marvell platforms (64-bit) actually need it to be set. The driver
always set this bit regardless of this property, which is harmless.
Then this property is not needed.

The "num_cs" field is always 1 and for a good reason, the old driver
(pxa3xx_nand.c) could only handle one. The new driver that replaces it
(marvell_nand.c) can handle more, but better use device tree for such
description. As there is only one available chip select, there is no
need for an array of partitions neither an array of partition numbers.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/mach-pxa/cm-x300.c                   |  6 ++--
 arch/arm/mach-pxa/colibri-pxa3xx.c            |  6 ++--
 arch/arm/mach-pxa/littleton.c                 |  6 ++--
 arch/arm/mach-pxa/mxm8x10.c                   |  6 ++--
 arch/arm/mach-pxa/raumfeld.c                  |  6 ++--
 arch/arm/mach-pxa/zylonite.c                  |  6 ++--
 drivers/mtd/nand/marvell_nand.c               |  3 +-
 include/linux/platform_data/mtd-nand-pxa3xx.h | 43 ++++++++-------------------
 8 files changed, 25 insertions(+), 57 deletions(-)

diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 89326378dabf..23bb273f3ff3 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -429,11 +429,9 @@ static struct mtd_partition cm_x300_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data cm_x300_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= cm_x300_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(cm_x300_nand_partitions),
+	.parts		= cm_x300_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(cm_x300_nand_partitions),
 };
 
 static void __init cm_x300_init_nand(void)
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c
index c9c36f707555..adec6e013fe6 100644
--- a/arch/arm/mach-pxa/colibri-pxa3xx.c
+++ b/arch/arm/mach-pxa/colibri-pxa3xx.c
@@ -138,11 +138,9 @@ static struct mtd_partition colibri_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data colibri_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= colibri_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(colibri_nand_partitions),
+	.parts		= colibri_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(colibri_nand_partitions),
 };
 
 void __init colibri_pxa3xx_init_nand(void)
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 898961be36db..7e120e884165 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -328,10 +328,8 @@ static struct mtd_partition littleton_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data littleton_nand_info = {
-	.enable_arbiter	= 1,
-	.num_cs		= 1,
-	.parts[0]	= littleton_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(littleton_nand_partitions),
+	.parts		= littleton_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(littleton_nand_partitions),
 };
 
 static void __init littleton_init_nand(void)
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c
index 7d7aab20b70a..328689052668 100644
--- a/arch/arm/mach-pxa/mxm8x10.c
+++ b/arch/arm/mach-pxa/mxm8x10.c
@@ -389,11 +389,9 @@ static struct mtd_partition mxm_8x10_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data mxm_8x10_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= mxm_8x10_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(mxm_8x10_nand_partitions)
+	.parts		= mxm_8x10_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(mxm_8x10_nand_partitions)
 };
 
 static void __init mxm_8x10_nand_init(void)
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 9d662fed03ec..af72e79a7ffa 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -346,11 +346,9 @@ static struct mtd_partition raumfeld_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data raumfeld_nand_info = {
-	.enable_arbiter	= 1,
 	.keep_config	= 1,
-	.num_cs		= 1,
-	.parts[0]	= raumfeld_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(raumfeld_nand_partitions),
+	.parts		= raumfeld_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(raumfeld_nand_partitions),
 };
 
 /**
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index a4577118d518..0534949d63f6 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -376,10 +376,8 @@ static struct mtd_partition zylonite_nand_partitions[] = {
 };
 
 static struct pxa3xx_nand_platform_data zylonite_nand_info = {
-	.enable_arbiter	= 1,
-	.num_cs		= 1,
-	.parts[0]	= zylonite_nand_partitions,
-	.nr_parts[0]	= ARRAY_SIZE(zylonite_nand_partitions),
+	.parts		= zylonite_nand_partitions,
+	.nr_parts	= ARRAY_SIZE(zylonite_nand_partitions),
 };
 
 static void __init zylonite_init_nand(void)
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index 2525d9b2f4fa..75fbb3ea4977 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -2579,8 +2579,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
 
 	if (pdata)
 		/* Legacy bindings support only one chip */
-		ret = mtd_device_register(mtd, pdata->parts[0],
-					  pdata->nr_parts[0]);
+		ret = mtd_device_register(mtd, pdata->parts, pdata->nr_parts);
 	else
 		ret = mtd_device_register(mtd, NULL, 0);
 	if (ret) {
diff --git a/include/linux/platform_data/mtd-nand-pxa3xx.h b/include/linux/platform_data/mtd-nand-pxa3xx.h
index b42ad83cbc20..4fd0f592a2d2 100644
--- a/include/linux/platform_data/mtd-nand-pxa3xx.h
+++ b/include/linux/platform_data/mtd-nand-pxa3xx.h
@@ -6,41 +6,22 @@
 #include <linux/mtd/partitions.h>
 
 /*
- * Current pxa3xx_nand controller has two chip select which
- * both be workable.
- *
- * Notice should be taken that:
- * When you want to use this feature, you should not enable the
- * keep configuration feature, for two chip select could be
- * attached with different nand chip. The different page size
- * and timing requirement make the keep configuration impossible.
+ * Current pxa3xx_nand controller has two chip select which both be workable but
+ * historically all platforms remaining on platform data used only one. Switch
+ * to device tree if you need more.
  */
-
-/* The max num of chip select current support */
-#define NUM_CHIP_SELECT		(2)
 struct pxa3xx_nand_platform_data {
-
-	/* the data flash bus is shared between the Static Memory
-	 * Controller and the Data Flash Controller,  the arbiter
-	 * controls the ownership of the bus
-	 */
-	int	enable_arbiter;
-
-	/* allow platform code to keep OBM/bootloader defined NFC config */
-	int	keep_config;
-
-	/* indicate how many chip selects will be used */
-	int	num_cs;
-
-	/* use an flash-based bad block table */
-	bool	flash_bbt;
-
-	/* requested ECC strength and ECC step size */
+	/* Keep OBM/bootloader NFC timing configuration */
+	bool keep_config;
+	/* Use a flash-based bad block table */
+	bool flash_bbt;
+	/* Requested ECC strength and ECC step size */
 	int ecc_strength, ecc_step_size;
-
-	const struct mtd_partition		*parts[NUM_CHIP_SELECT];
-	unsigned int				nr_parts[NUM_CHIP_SELECT];
+	/* Partitions */
+	const struct mtd_partition *parts;
+	unsigned int nr_parts;
 };
 
 extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info);
+
 #endif /* __ASM_ARCH_PXA3XX_NAND_H */
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 06/12] ARM: dts: armada-370-xp: use reworked NAND controller driver
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore
as the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm/boot/dts/armada-370-db.dts                |  57 ++++----
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts     | 120 ++++++++--------
 arch/arm/boot/dts/armada-370-mirabox.dts           |  51 ++++---
 arch/arm/boot/dts/armada-370-netgear-rn102.dts     |  90 ++++++------
 arch/arm/boot/dts/armada-370-netgear-rn104.dts     |  90 ++++++------
 arch/arm/boot/dts/armada-370-rd.dts                |  52 ++++---
 arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |  64 +++++----
 arch/arm/boot/dts/armada-370-xp.dtsi               |   6 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |   2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |   2 +-
 arch/arm/boot/dts/armada-xp-db.dts                 |   2 +-
 arch/arm/boot/dts/armada-xp-gp.dts                 |   2 +-
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |   2 +-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts      | 156 +++++++++++----------
 arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |  90 ++++++------
 15 files changed, 434 insertions(+), 352 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index c4eef7323367..640f87a11834 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -142,33 +142,6 @@
 			usb@51000 {
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0 0x800000>;
-					};
-					partition@800000 {
-						label = "Linux";
-						reg = <0x800000 0x800000>;
-					};
-					partition@1000000 {
-						label = "Filesystem";
-						reg = <0x1000000 0x3f000000>;
-					};
-				};
-			};
 		};
 	};
 
@@ -276,3 +249,33 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-dlink-dns327l.dts b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
index db7f3aa38670..bb9be4d2b17e 100644
--- a/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
+++ b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
@@ -81,61 +81,6 @@
 			usb@50000 {
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					/* 1.0 MiB */
-					reg = <0x0000000 0x100000>;
-					read-only;
-				};
-
-				partition@100000 {
-					label = "u-boot-env";
-					/* 128 KiB */
-					reg = <0x100000 0x20000>;
-					read-only;
-				};
-
-				partition@120000 {
-					label = "uImage";
-					/* 7 MiB */
-					reg = <0x120000 0x700000>;
-				};
-
-				partition@820000 {
-					label = "ubifs";
-					/* ~ 84 MiB */
-					reg = <0x820000 0x54e0000>;
-				};
-
-				/* Hardcoded into stock bootloader */
-				partition@5d00000 {
-					label = "failsafe-uImage";
-					/* 5 MiB */
-					reg = <0x5d00000 0x500000>;
-				};
-
-				partition@6200000 {
-					label = "failsafe-fs";
-					/* 29 MiB */
-					reg = <0x6200000 0x1d00000>;
-				};
-
-				partition@7f00000 {
-					label = "bbt";
-					/* 1 MiB for BBT */
-					reg = <0x7f00000 0x100000>;
-				};
-			};
 		};
 	};
 
@@ -356,3 +301,68 @@
 	clock-frequency = <100000>;
 	status = "okay";
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				/* 1.0 MiB */
+				reg = <0x0000000 0x100000>;
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u-boot-env";
+				/* 128 KiB */
+				reg = <0x100000 0x20000>;
+				read-only;
+			};
+
+			partition@120000 {
+				label = "uImage";
+				/* 7 MiB */
+				reg = <0x120000 0x700000>;
+			};
+
+			partition@820000 {
+				label = "ubifs";
+				/* ~ 84 MiB */
+				reg = <0x820000 0x54e0000>;
+			};
+
+			/* Hardcoded into stock bootloader */
+			partition@5d00000 {
+				label = "failsafe-uImage";
+				/* 5 MiB */
+				reg = <0x5d00000 0x500000>;
+			};
+
+			partition@6200000 {
+				label = "failsafe-fs";
+				/* 29 MiB */
+				reg = <0x6200000 0x1d00000>;
+			};
+
+			partition@7f00000 {
+				label = "bbt";
+				/* 1 MiB for BBT */
+				reg = <0x7f00000 0x100000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index 702f58c9642d..af4db48ca2eb 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -145,27 +145,6 @@
 					reg = <0x25>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x400000>;
-				};
-				partition@400000 {
-					label = "Linux";
-					reg = <0x400000 0x400000>;
-				};
-				partition@800000 {
-					label = "Filesystem";
-					reg = <0x800000 0x3f800000>;
-				};
-			};
 		};
 	};
 };
@@ -210,3 +189,33 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x400000>;
+			};
+			partition@400000 {
+				label = "Linux";
+				reg = <0x400000 0x400000>;
+			};
+			partition@800000 {
+				label = "Filesystem";
+				reg = <0x800000 0x3f800000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
index b1a96e95e921..01bbb7d21cbc 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
@@ -118,46 +118,6 @@
 					pwm_polarity = <0>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition@180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition@200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition@800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition@c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -301,3 +261,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition@180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition@200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition@800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition@c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
index d67e7aa42b54..725181300575 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
@@ -127,46 +127,6 @@
 					reg = <0x23>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition@180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition@200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition@800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition@c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -313,3 +273,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition@180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition@200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition@800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition@c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index 8b2fa9a49967..4301867bc973 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -148,27 +148,6 @@
 					default-state = "keep";
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition@800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition@1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
 		};
 	};
 
@@ -293,3 +272,34 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi b/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
index e9a5b952afc0..b13d18fad40a 100644
--- a/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
+++ b/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
@@ -69,33 +69,6 @@
 					interrupts = <110>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0 0x300000>;
-				};
-				partition@300000 {
-					label = "device-tree";
-					reg = <0x300000 0x20000>;
-				};
-				partition@320000 {
-					label = "linux";
-					reg = <0x320000 0x2000000>;
-				};
-				partition@2320000 {
-					label = "rootfs";
-					reg = <0x2320000 0xdce0000>;
-				};
-			};
 		};
 
 	};
@@ -230,3 +203,40 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0 0x300000>;
+			};
+			partition@300000 {
+				label = "device-tree";
+				reg = <0x300000 0x20000>;
+			};
+			partition@320000 {
+				label = "linux";
+				reg = <0x320000 0x2000000>;
+			};
+			partition@2320000 {
+				label = "rootfs";
+				reg = <0x2320000 0xdce0000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 09495e87b038..b6bead81c438 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -281,11 +281,11 @@
 				status = "disabled";
 			};
 
-			nand: nand@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <113>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
diff --git a/arch/arm/boot/dts/armada-xp-db-dxbc2.dts b/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
index 1b1ff17fdd9c..eb63cc8bcacc 100644
--- a/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
+++ b/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
@@ -107,9 +107,9 @@
 
 &nand {
 	status = "okay";
+	label = "pxa3xx_nand-0";
 	num-cs = <1>;
 	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
 	nand-on-flash-bbt;
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
diff --git a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
index 06fce35d7491..ee830687c2a8 100644
--- a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
+++ b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
@@ -106,9 +106,9 @@
 
 &nand {
 	status = "okay";
+	label = "pxa3xx_nand-0";
 	num-cs = <1>;
 	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
 	nand-on-flash-bbt;
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index 065282c21789..6acf9cd65f5a 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -182,9 +182,9 @@
 
 			nand@d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 
 				partitions {
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index ac9eab8ac186..9f3317cd4773 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -199,9 +199,9 @@
 
 			nand@d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 			};
 		};
diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index ce0afba1ce58..398fe027b2a7 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -120,9 +120,9 @@
 
 			nand@d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 
 				partitions {
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
index 6d705f518254..4c09314a3260 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -196,79 +196,6 @@
 			bm@c8000 {
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x100000>;  /* 1MB */
-					read-only;
-				};
-
-				partition@100000 {
-					label = "u_env";
-					reg = <0x100000 0x40000>;    /* 256KB */
-				};
-
-				partition@140000 {
-					label = "s_env";
-					reg = <0x140000 0x40000>;    /* 256KB */
-				};
-
-				partition@900000 {
-					label = "devinfo";
-					reg = <0x900000 0x100000>;   /* 1MB */
-					read-only;
-				};
-
-				/* kernel1 overlaps with rootfs1 by design */
-				partition@a00000 {
-					label = "kernel1";
-					reg = <0xa00000 0x2800000>;  /* 40MB */
-				};
-
-				partition@d00000 {
-					label = "rootfs1";
-					reg = <0xd00000 0x2500000>;  /* 37MB */
-				};
-
-				/* kernel2 overlaps with rootfs2 by design */
-				partition@3200000 {
-					label = "kernel2";
-					reg = <0x3200000 0x2800000>; /* 40MB */
-				};
-
-				partition@3500000 {
-					label = "rootfs2";
-					reg = <0x3500000 0x2500000>; /* 37MB */
-				};
-
-				/*
-				 * 38MB, last MB is for the BBT, not writable
-				 */
-				partition@5a00000 {
-					label = "syscfg";
-					reg = <0x5a00000 0x2600000>;
-				};
-
-				/*
-				 * Unused area between "s_env" and "devinfo".
-				 * Moved here because otherwise the renumbered
-				 * partitions would break the bootloader
-				 * supplied bootargs
-				 */
-				partition@180000 {
-					label = "unused_area";
-					reg = <0x180000 0x780000>;   /* 7.5MB */
-				};
-			};
 		};
 
 		bm-bppi {
@@ -465,3 +392,86 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x100000>;  /* 1MB */
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u_env";
+				reg = <0x100000 0x40000>;    /* 256KB */
+			};
+
+			partition@140000 {
+				label = "s_env";
+				reg = <0x140000 0x40000>;    /* 256KB */
+			};
+
+			partition@900000 {
+				label = "devinfo";
+				reg = <0x900000 0x100000>;   /* 1MB */
+				read-only;
+			};
+
+			/* kernel1 overlaps with rootfs1 by design */
+			partition@a00000 {
+				label = "kernel1";
+				reg = <0xa00000 0x2800000>;  /* 40MB */
+			};
+
+			partition@d00000 {
+				label = "rootfs1";
+				reg = <0xd00000 0x2500000>;  /* 37MB */
+			};
+
+			/* kernel2 overlaps with rootfs2 by design */
+			partition@3200000 {
+				label = "kernel2";
+				reg = <0x3200000 0x2800000>; /* 40MB */
+			};
+
+			partition@3500000 {
+				label = "rootfs2";
+				reg = <0x3500000 0x2500000>; /* 37MB */
+			};
+
+			/*
+			 * 38MB, last MB is for the BBT, not writable
+			 */
+			partition@5a00000 {
+				label = "syscfg";
+				reg = <0x5a00000 0x2600000>;
+			};
+
+			/*
+			 * Unused area between "s_env" and "devinfo".
+			 * Moved here because otherwise the renumbered
+			 * partitions would break the bootloader
+			 * supplied bootargs
+			 */
+			partition@180000 {
+				label = "unused_area";
+				reg = <0x180000 0x780000>;   /* 7.5MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
index 40c6fe21e720..e9e4c7a8fba9 100644
--- a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
+++ b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
@@ -154,46 +154,6 @@
 				nr-ports = <2>;
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition@180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition@200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition@800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition@c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -382,3 +342,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition@180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition@200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition@800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition@c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 06/12] ARM: dts: armada-370-xp: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore
as the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-370-db.dts                |  57 ++++----
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts     | 120 ++++++++--------
 arch/arm/boot/dts/armada-370-mirabox.dts           |  51 ++++---
 arch/arm/boot/dts/armada-370-netgear-rn102.dts     |  90 ++++++------
 arch/arm/boot/dts/armada-370-netgear-rn104.dts     |  90 ++++++------
 arch/arm/boot/dts/armada-370-rd.dts                |  52 ++++---
 arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |  64 +++++----
 arch/arm/boot/dts/armada-370-xp.dtsi               |   6 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |   2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |   2 +-
 arch/arm/boot/dts/armada-xp-db.dts                 |   2 +-
 arch/arm/boot/dts/armada-xp-gp.dts                 |   2 +-
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |   2 +-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts      | 156 +++++++++++----------
 arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |  90 ++++++------
 15 files changed, 434 insertions(+), 352 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index c4eef7323367..640f87a11834 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -142,33 +142,6 @@
 			usb@51000 {
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0 0x800000>;
-					};
-					partition@800000 {
-						label = "Linux";
-						reg = <0x800000 0x800000>;
-					};
-					partition@1000000 {
-						label = "Filesystem";
-						reg = <0x1000000 0x3f000000>;
-					};
-				};
-			};
 		};
 	};
 
@@ -276,3 +249,33 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-dlink-dns327l.dts b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
index db7f3aa38670..bb9be4d2b17e 100644
--- a/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
+++ b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
@@ -81,61 +81,6 @@
 			usb@50000 {
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					/* 1.0 MiB */
-					reg = <0x0000000 0x100000>;
-					read-only;
-				};
-
-				partition@100000 {
-					label = "u-boot-env";
-					/* 128 KiB */
-					reg = <0x100000 0x20000>;
-					read-only;
-				};
-
-				partition@120000 {
-					label = "uImage";
-					/* 7 MiB */
-					reg = <0x120000 0x700000>;
-				};
-
-				partition@820000 {
-					label = "ubifs";
-					/* ~ 84 MiB */
-					reg = <0x820000 0x54e0000>;
-				};
-
-				/* Hardcoded into stock bootloader */
-				partition@5d00000 {
-					label = "failsafe-uImage";
-					/* 5 MiB */
-					reg = <0x5d00000 0x500000>;
-				};
-
-				partition@6200000 {
-					label = "failsafe-fs";
-					/* 29 MiB */
-					reg = <0x6200000 0x1d00000>;
-				};
-
-				partition@7f00000 {
-					label = "bbt";
-					/* 1 MiB for BBT */
-					reg = <0x7f00000 0x100000>;
-				};
-			};
 		};
 	};
 
@@ -356,3 +301,68 @@
 	clock-frequency = <100000>;
 	status = "okay";
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				/* 1.0 MiB */
+				reg = <0x0000000 0x100000>;
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u-boot-env";
+				/* 128 KiB */
+				reg = <0x100000 0x20000>;
+				read-only;
+			};
+
+			partition@120000 {
+				label = "uImage";
+				/* 7 MiB */
+				reg = <0x120000 0x700000>;
+			};
+
+			partition@820000 {
+				label = "ubifs";
+				/* ~ 84 MiB */
+				reg = <0x820000 0x54e0000>;
+			};
+
+			/* Hardcoded into stock bootloader */
+			partition@5d00000 {
+				label = "failsafe-uImage";
+				/* 5 MiB */
+				reg = <0x5d00000 0x500000>;
+			};
+
+			partition@6200000 {
+				label = "failsafe-fs";
+				/* 29 MiB */
+				reg = <0x6200000 0x1d00000>;
+			};
+
+			partition@7f00000 {
+				label = "bbt";
+				/* 1 MiB for BBT */
+				reg = <0x7f00000 0x100000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index 702f58c9642d..af4db48ca2eb 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -145,27 +145,6 @@
 					reg = <0x25>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x400000>;
-				};
-				partition@400000 {
-					label = "Linux";
-					reg = <0x400000 0x400000>;
-				};
-				partition@800000 {
-					label = "Filesystem";
-					reg = <0x800000 0x3f800000>;
-				};
-			};
 		};
 	};
 };
@@ -210,3 +189,33 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x400000>;
+			};
+			partition@400000 {
+				label = "Linux";
+				reg = <0x400000 0x400000>;
+			};
+			partition@800000 {
+				label = "Filesystem";
+				reg = <0x800000 0x3f800000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
index b1a96e95e921..01bbb7d21cbc 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
@@ -118,46 +118,6 @@
 					pwm_polarity = <0>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition@180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition@200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition@800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition@c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -301,3 +261,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition@180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition@200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition@800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition@c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
index d67e7aa42b54..725181300575 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
@@ -127,46 +127,6 @@
 					reg = <0x23>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition@180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition@200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition@800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition@c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -313,3 +273,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition@180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition@200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition@800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition@c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index 8b2fa9a49967..4301867bc973 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -148,27 +148,6 @@
 					default-state = "keep";
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition@800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition@1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
 		};
 	};
 
@@ -293,3 +272,34 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi b/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
index e9a5b952afc0..b13d18fad40a 100644
--- a/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
+++ b/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
@@ -69,33 +69,6 @@
 					interrupts = <110>;
 				};
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0 0x300000>;
-				};
-				partition@300000 {
-					label = "device-tree";
-					reg = <0x300000 0x20000>;
-				};
-				partition@320000 {
-					label = "linux";
-					reg = <0x320000 0x2000000>;
-				};
-				partition@2320000 {
-					label = "rootfs";
-					reg = <0x2320000 0xdce0000>;
-				};
-			};
 		};
 
 	};
@@ -230,3 +203,40 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0 0x300000>;
+			};
+			partition@300000 {
+				label = "device-tree";
+				reg = <0x300000 0x20000>;
+			};
+			partition@320000 {
+				label = "linux";
+				reg = <0x320000 0x2000000>;
+			};
+			partition@2320000 {
+				label = "rootfs";
+				reg = <0x2320000 0xdce0000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 09495e87b038..b6bead81c438 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -281,11 +281,11 @@
 				status = "disabled";
 			};
 
-			nand: nand@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <113>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
diff --git a/arch/arm/boot/dts/armada-xp-db-dxbc2.dts b/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
index 1b1ff17fdd9c..eb63cc8bcacc 100644
--- a/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
+++ b/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
@@ -107,9 +107,9 @@
 
 &nand {
 	status = "okay";
+	label = "pxa3xx_nand-0";
 	num-cs = <1>;
 	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
 	nand-on-flash-bbt;
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
diff --git a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
index 06fce35d7491..ee830687c2a8 100644
--- a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
+++ b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
@@ -106,9 +106,9 @@
 
 &nand {
 	status = "okay";
+	label = "pxa3xx_nand-0";
 	num-cs = <1>;
 	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
 	nand-on-flash-bbt;
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index 065282c21789..6acf9cd65f5a 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -182,9 +182,9 @@
 
 			nand@d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 
 				partitions {
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index ac9eab8ac186..9f3317cd4773 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -199,9 +199,9 @@
 
 			nand@d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 			};
 		};
diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index ce0afba1ce58..398fe027b2a7 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -120,9 +120,9 @@
 
 			nand@d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 
 				partitions {
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
index 6d705f518254..4c09314a3260 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -196,79 +196,6 @@
 			bm@c8000 {
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x100000>;  /* 1MB */
-					read-only;
-				};
-
-				partition@100000 {
-					label = "u_env";
-					reg = <0x100000 0x40000>;    /* 256KB */
-				};
-
-				partition@140000 {
-					label = "s_env";
-					reg = <0x140000 0x40000>;    /* 256KB */
-				};
-
-				partition@900000 {
-					label = "devinfo";
-					reg = <0x900000 0x100000>;   /* 1MB */
-					read-only;
-				};
-
-				/* kernel1 overlaps with rootfs1 by design */
-				partition@a00000 {
-					label = "kernel1";
-					reg = <0xa00000 0x2800000>;  /* 40MB */
-				};
-
-				partition@d00000 {
-					label = "rootfs1";
-					reg = <0xd00000 0x2500000>;  /* 37MB */
-				};
-
-				/* kernel2 overlaps with rootfs2 by design */
-				partition@3200000 {
-					label = "kernel2";
-					reg = <0x3200000 0x2800000>; /* 40MB */
-				};
-
-				partition@3500000 {
-					label = "rootfs2";
-					reg = <0x3500000 0x2500000>; /* 37MB */
-				};
-
-				/*
-				 * 38MB, last MB is for the BBT, not writable
-				 */
-				partition@5a00000 {
-					label = "syscfg";
-					reg = <0x5a00000 0x2600000>;
-				};
-
-				/*
-				 * Unused area between "s_env" and "devinfo".
-				 * Moved here because otherwise the renumbered
-				 * partitions would break the bootloader
-				 * supplied bootargs
-				 */
-				partition@180000 {
-					label = "unused_area";
-					reg = <0x180000 0x780000>;   /* 7.5MB */
-				};
-			};
 		};
 
 		bm-bppi {
@@ -465,3 +392,86 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x100000>;  /* 1MB */
+				read-only;
+			};
+
+			partition@100000 {
+				label = "u_env";
+				reg = <0x100000 0x40000>;    /* 256KB */
+			};
+
+			partition@140000 {
+				label = "s_env";
+				reg = <0x140000 0x40000>;    /* 256KB */
+			};
+
+			partition@900000 {
+				label = "devinfo";
+				reg = <0x900000 0x100000>;   /* 1MB */
+				read-only;
+			};
+
+			/* kernel1 overlaps with rootfs1 by design */
+			partition@a00000 {
+				label = "kernel1";
+				reg = <0xa00000 0x2800000>;  /* 40MB */
+			};
+
+			partition@d00000 {
+				label = "rootfs1";
+				reg = <0xd00000 0x2500000>;  /* 37MB */
+			};
+
+			/* kernel2 overlaps with rootfs2 by design */
+			partition@3200000 {
+				label = "kernel2";
+				reg = <0x3200000 0x2800000>; /* 40MB */
+			};
+
+			partition@3500000 {
+				label = "rootfs2";
+				reg = <0x3500000 0x2500000>; /* 37MB */
+			};
+
+			/*
+			 * 38MB, last MB is for the BBT, not writable
+			 */
+			partition@5a00000 {
+				label = "syscfg";
+				reg = <0x5a00000 0x2600000>;
+			};
+
+			/*
+			 * Unused area between "s_env" and "devinfo".
+			 * Moved here because otherwise the renumbered
+			 * partitions would break the bootloader
+			 * supplied bootargs
+			 */
+			partition@180000 {
+				label = "unused_area";
+				reg = <0x180000 0x780000>;   /* 7.5MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
index 40c6fe21e720..e9e4c7a8fba9 100644
--- a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
+++ b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
@@ -154,46 +154,6 @@
 				nr-ports = <2>;
 				status = "okay";
 			};
-
-			nand@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition@180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition@200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition@800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition@c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -382,3 +342,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition@180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition@200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition@800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition@c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 06/12] ARM: dts: armada-370-xp: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore
as the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-370-db.dts                |  57 ++++----
 arch/arm/boot/dts/armada-370-dlink-dns327l.dts     | 120 ++++++++--------
 arch/arm/boot/dts/armada-370-mirabox.dts           |  51 ++++---
 arch/arm/boot/dts/armada-370-netgear-rn102.dts     |  90 ++++++------
 arch/arm/boot/dts/armada-370-netgear-rn104.dts     |  90 ++++++------
 arch/arm/boot/dts/armada-370-rd.dts                |  52 ++++---
 arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |  64 +++++----
 arch/arm/boot/dts/armada-370-xp.dtsi               |   6 +-
 arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |   2 +-
 arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |   2 +-
 arch/arm/boot/dts/armada-xp-db.dts                 |   2 +-
 arch/arm/boot/dts/armada-xp-gp.dts                 |   2 +-
 arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |   2 +-
 arch/arm/boot/dts/armada-xp-linksys-mamba.dts      | 156 +++++++++++----------
 arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |  90 ++++++------
 15 files changed, 434 insertions(+), 352 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index c4eef7323367..640f87a11834 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -142,33 +142,6 @@
 			usb at 51000 {
 				status = "okay";
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition at 0 {
-						label = "U-Boot";
-						reg = <0 0x800000>;
-					};
-					partition at 800000 {
-						label = "Linux";
-						reg = <0x800000 0x800000>;
-					};
-					partition at 1000000 {
-						label = "Filesystem";
-						reg = <0x1000000 0x3f000000>;
-					};
-				};
-			};
 		};
 	};
 
@@ -276,3 +249,33 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition at 800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-dlink-dns327l.dts b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
index db7f3aa38670..bb9be4d2b17e 100644
--- a/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
+++ b/arch/arm/boot/dts/armada-370-dlink-dns327l.dts
@@ -81,61 +81,6 @@
 			usb at 50000 {
 				status = "okay";
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "u-boot";
-					/* 1.0 MiB */
-					reg = <0x0000000 0x100000>;
-					read-only;
-				};
-
-				partition at 100000 {
-					label = "u-boot-env";
-					/* 128 KiB */
-					reg = <0x100000 0x20000>;
-					read-only;
-				};
-
-				partition at 120000 {
-					label = "uImage";
-					/* 7 MiB */
-					reg = <0x120000 0x700000>;
-				};
-
-				partition at 820000 {
-					label = "ubifs";
-					/* ~ 84 MiB */
-					reg = <0x820000 0x54e0000>;
-				};
-
-				/* Hardcoded into stock bootloader */
-				partition at 5d00000 {
-					label = "failsafe-uImage";
-					/* 5 MiB */
-					reg = <0x5d00000 0x500000>;
-				};
-
-				partition at 6200000 {
-					label = "failsafe-fs";
-					/* 29 MiB */
-					reg = <0x6200000 0x1d00000>;
-				};
-
-				partition at 7f00000 {
-					label = "bbt";
-					/* 1 MiB for BBT */
-					reg = <0x7f00000 0x100000>;
-				};
-			};
 		};
 	};
 
@@ -356,3 +301,68 @@
 	clock-frequency = <100000>;
 	status = "okay";
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				/* 1.0 MiB */
+				reg = <0x0000000 0x100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				/* 128 KiB */
+				reg = <0x100000 0x20000>;
+				read-only;
+			};
+
+			partition at 120000 {
+				label = "uImage";
+				/* 7 MiB */
+				reg = <0x120000 0x700000>;
+			};
+
+			partition at 820000 {
+				label = "ubifs";
+				/* ~ 84 MiB */
+				reg = <0x820000 0x54e0000>;
+			};
+
+			/* Hardcoded into stock bootloader */
+			partition at 5d00000 {
+				label = "failsafe-uImage";
+				/* 5 MiB */
+				reg = <0x5d00000 0x500000>;
+			};
+
+			partition at 6200000 {
+				label = "failsafe-fs";
+				/* 29 MiB */
+				reg = <0x6200000 0x1d00000>;
+			};
+
+			partition at 7f00000 {
+				label = "bbt";
+				/* 1 MiB for BBT */
+				reg = <0x7f00000 0x100000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts
index 702f58c9642d..af4db48ca2eb 100644
--- a/arch/arm/boot/dts/armada-370-mirabox.dts
+++ b/arch/arm/boot/dts/armada-370-mirabox.dts
@@ -145,27 +145,6 @@
 					reg = <0x25>;
 				};
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partition at 0 {
-					label = "U-Boot";
-					reg = <0 0x400000>;
-				};
-				partition at 400000 {
-					label = "Linux";
-					reg = <0x400000 0x400000>;
-				};
-				partition at 800000 {
-					label = "Filesystem";
-					reg = <0x800000 0x3f800000>;
-				};
-			};
 		};
 	};
 };
@@ -210,3 +189,33 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x400000>;
+			};
+			partition at 400000 {
+				label = "Linux";
+				reg = <0x400000 0x400000>;
+			};
+			partition at 800000 {
+				label = "Filesystem";
+				reg = <0x800000 0x3f800000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn102.dts b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
index b1a96e95e921..01bbb7d21cbc 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn102.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn102.dts
@@ -118,46 +118,6 @@
 					pwm_polarity = <0>;
 				};
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition at 180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition at 200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition at 800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition at c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -301,3 +261,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition at 180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition at 200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition at 800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition at c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
index d67e7aa42b54..725181300575 100644
--- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts
+++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts
@@ -127,46 +127,6 @@
 					reg = <0x23>;
 				};
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition at 180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition at 200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition at 800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition at c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -313,3 +273,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition at 180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition at 200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition at 800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition at c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index 8b2fa9a49967..4301867bc973 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -148,27 +148,6 @@
 					default-state = "keep";
 				};
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partition at 0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition at 800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition at 1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
 		};
 	};
 
@@ -293,3 +272,34 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition at 800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi b/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
index e9a5b952afc0..b13d18fad40a 100644
--- a/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
+++ b/arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi
@@ -69,33 +69,6 @@
 					interrupts = <110>;
 				};
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x0 0x300000>;
-				};
-				partition at 300000 {
-					label = "device-tree";
-					reg = <0x300000 0x20000>;
-				};
-				partition at 320000 {
-					label = "linux";
-					reg = <0x320000 0x2000000>;
-				};
-				partition at 2320000 {
-					label = "rootfs";
-					reg = <0x2320000 0xdce0000>;
-				};
-			};
 		};
 
 	};
@@ -230,3 +203,40 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x300000>;
+			};
+			partition at 300000 {
+				label = "device-tree";
+				reg = <0x300000 0x20000>;
+			};
+			partition at 320000 {
+				label = "linux";
+				reg = <0x320000 0x2000000>;
+			};
+			partition at 2320000 {
+				label = "rootfs";
+				reg = <0x2320000 0xdce0000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 09495e87b038..b6bead81c438 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -281,11 +281,11 @@
 				status = "disabled";
 			};
 
-			nand: nand at d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller at d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <113>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
diff --git a/arch/arm/boot/dts/armada-xp-db-dxbc2.dts b/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
index 1b1ff17fdd9c..eb63cc8bcacc 100644
--- a/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
+++ b/arch/arm/boot/dts/armada-xp-db-dxbc2.dts
@@ -107,9 +107,9 @@
 
 &nand {
 	status = "okay";
+	label = "pxa3xx_nand-0";
 	num-cs = <1>;
 	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
 	nand-on-flash-bbt;
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
diff --git a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
index 06fce35d7491..ee830687c2a8 100644
--- a/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
+++ b/arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts
@@ -106,9 +106,9 @@
 
 &nand {
 	status = "okay";
+	label = "pxa3xx_nand-0";
 	num-cs = <1>;
 	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
 	nand-on-flash-bbt;
 	nand-ecc-strength = <4>;
 	nand-ecc-step-size = <512>;
diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index 065282c21789..6acf9cd65f5a 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -182,9 +182,9 @@
 
 			nand at d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 
 				partitions {
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index ac9eab8ac186..9f3317cd4773 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -199,9 +199,9 @@
 
 			nand at d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 			};
 		};
diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index ce0afba1ce58..398fe027b2a7 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -120,9 +120,9 @@
 
 			nand at d0000 {
 				status = "okay";
+				label = "pxa3xx_nand-0";
 				num-cs = <1>;
 				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
 				nand-on-flash-bbt;
 
 				partitions {
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
index 6d705f518254..4c09314a3260 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
@@ -196,79 +196,6 @@
 			bm at c8000 {
 				status = "okay";
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x0000000 0x100000>;  /* 1MB */
-					read-only;
-				};
-
-				partition at 100000 {
-					label = "u_env";
-					reg = <0x100000 0x40000>;    /* 256KB */
-				};
-
-				partition at 140000 {
-					label = "s_env";
-					reg = <0x140000 0x40000>;    /* 256KB */
-				};
-
-				partition at 900000 {
-					label = "devinfo";
-					reg = <0x900000 0x100000>;   /* 1MB */
-					read-only;
-				};
-
-				/* kernel1 overlaps with rootfs1 by design */
-				partition at a00000 {
-					label = "kernel1";
-					reg = <0xa00000 0x2800000>;  /* 40MB */
-				};
-
-				partition at d00000 {
-					label = "rootfs1";
-					reg = <0xd00000 0x2500000>;  /* 37MB */
-				};
-
-				/* kernel2 overlaps with rootfs2 by design */
-				partition at 3200000 {
-					label = "kernel2";
-					reg = <0x3200000 0x2800000>; /* 40MB */
-				};
-
-				partition at 3500000 {
-					label = "rootfs2";
-					reg = <0x3500000 0x2500000>; /* 37MB */
-				};
-
-				/*
-				 * 38MB, last MB is for the BBT, not writable
-				 */
-				partition at 5a00000 {
-					label = "syscfg";
-					reg = <0x5a00000 0x2600000>;
-				};
-
-				/*
-				 * Unused area between "s_env" and "devinfo".
-				 * Moved here because otherwise the renumbered
-				 * partitions would break the bootloader
-				 * supplied bootargs
-				 */
-				partition at 180000 {
-					label = "unused_area";
-					reg = <0x180000 0x780000>;   /* 7.5MB */
-				};
-			};
 		};
 
 		bm-bppi {
@@ -465,3 +392,86 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0000000 0x100000>;  /* 1MB */
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u_env";
+				reg = <0x100000 0x40000>;    /* 256KB */
+			};
+
+			partition at 140000 {
+				label = "s_env";
+				reg = <0x140000 0x40000>;    /* 256KB */
+			};
+
+			partition at 900000 {
+				label = "devinfo";
+				reg = <0x900000 0x100000>;   /* 1MB */
+				read-only;
+			};
+
+			/* kernel1 overlaps with rootfs1 by design */
+			partition at a00000 {
+				label = "kernel1";
+				reg = <0xa00000 0x2800000>;  /* 40MB */
+			};
+
+			partition at d00000 {
+				label = "rootfs1";
+				reg = <0xd00000 0x2500000>;  /* 37MB */
+			};
+
+			/* kernel2 overlaps with rootfs2 by design */
+			partition at 3200000 {
+				label = "kernel2";
+				reg = <0x3200000 0x2800000>; /* 40MB */
+			};
+
+			partition at 3500000 {
+				label = "rootfs2";
+				reg = <0x3500000 0x2500000>; /* 37MB */
+			};
+
+			/*
+			 * 38MB, last MB is for the BBT, not writable
+			 */
+			partition at 5a00000 {
+				label = "syscfg";
+				reg = <0x5a00000 0x2600000>;
+			};
+
+			/*
+			 * Unused area between "s_env" and "devinfo".
+			 * Moved here because otherwise the renumbered
+			 * partitions would break the bootloader
+			 * supplied bootargs
+			 */
+			partition at 180000 {
+				label = "unused_area";
+				reg = <0x180000 0x780000>;   /* 7.5MB */
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
index 40c6fe21e720..e9e4c7a8fba9 100644
--- a/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
+++ b/arch/arm/boot/dts/armada-xp-netgear-rn2120.dts
@@ -154,46 +154,6 @@
 				nr-ports = <2>;
 				status = "okay";
 			};
-
-			nand at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				/* Use Hardware BCH ECC */
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x0000000 0x180000>;  /* 1.5MB */
-					read-only;
-				};
-
-				partition at 180000 {
-					label = "u-boot-env";
-					reg = <0x180000 0x20000>;    /* 128KB */
-					read-only;
-				};
-
-				partition at 200000 {
-					label = "uImage";
-					reg = <0x0200000 0x600000>;    /* 6MB */
-				};
-
-				partition at 800000 {
-					label = "minirootfs";
-					reg = <0x0800000 0x400000>;    /* 4MB */
-				};
-
-				/* Last MB is for the BBT, i.e. not writable */
-				partition at c00000 {
-					label = "ubifs";
-					reg = <0x0c00000 0x7400000>; /* 116MB */
-				};
-			};
 		};
 	};
 
@@ -382,3 +342,53 @@
 		marvell,function = "gpio";
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+
+		/* Use Hardware BCH ECC */
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0000000 0x180000>;  /* 1.5MB */
+				read-only;
+			};
+
+			partition at 180000 {
+				label = "u-boot-env";
+				reg = <0x180000 0x20000>;    /* 128KB */
+				read-only;
+			};
+
+			partition at 200000 {
+				label = "uImage";
+				reg = <0x0200000 0x600000>;    /* 6MB */
+			};
+
+			partition at 800000 {
+				label = "minirootfs";
+				reg = <0x0800000 0x400000>;    /* 4MB */
+			};
+
+			/* Last MB is for the BBT, i.e. not writable */
+			partition at c00000 {
+				label = "ubifs";
+				reg = <0x0c00000 0x7400000>; /* 116MB */
+			};
+		};
+	};
+};
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 07/12] ARM: dts: armada-375: use reworked NAND controller driver
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore
as the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm/boot/dts/armada-375-db.dts | 50 ++++++++++++++++++++++---------------
 arch/arm/boot/dts/armada-375.dtsi   |  6 ++---
 2 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/arch/arm/boot/dts/armada-375-db.dts b/arch/arm/boot/dts/armada-375-db.dts
index bcdbb8ba1d65..d33cca4e315d 100644
--- a/arch/arm/boot/dts/armada-375-db.dts
+++ b/arch/arm/boot/dts/armada-375-db.dts
@@ -140,28 +140,38 @@
 	nr-ports = <2>;
 };
 
-&nand {
+&nand_controller {
+	status = "okay";
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";
-	status = "okay";
-	num-cs = <1>;
-	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-
-	partition@0 {
-		label = "U-Boot";
-		reg = <0 0x800000>;
-	};
-	partition@800000 {
-		label = "Linux";
-		reg = <0x800000 0x800000>;
-	};
-	partition@1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
 	};
 };
 
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 2cb1bcd30976..46471173c7c1 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -539,11 +539,11 @@
 				status = "disabled";
 			};
 
-			nand: nand@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&gateclk 11>;
 				status = "disabled";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 07/12] ARM: dts: armada-375: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore
as the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-375-db.dts | 50 ++++++++++++++++++++++---------------
 arch/arm/boot/dts/armada-375.dtsi   |  6 ++---
 2 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/arch/arm/boot/dts/armada-375-db.dts b/arch/arm/boot/dts/armada-375-db.dts
index bcdbb8ba1d65..d33cca4e315d 100644
--- a/arch/arm/boot/dts/armada-375-db.dts
+++ b/arch/arm/boot/dts/armada-375-db.dts
@@ -140,28 +140,38 @@
 	nr-ports = <2>;
 };
 
-&nand {
+&nand_controller {
+	status = "okay";
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";
-	status = "okay";
-	num-cs = <1>;
-	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-
-	partition@0 {
-		label = "U-Boot";
-		reg = <0 0x800000>;
-	};
-	partition@800000 {
-		label = "Linux";
-		reg = <0x800000 0x800000>;
-	};
-	partition@1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
 	};
 };
 
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 2cb1bcd30976..46471173c7c1 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -539,11 +539,11 @@
 				status = "disabled";
 			};
 
-			nand: nand@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&gateclk 11>;
 				status = "disabled";
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 07/12] ARM: dts: armada-375: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore
as the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-375-db.dts | 50 ++++++++++++++++++++++---------------
 arch/arm/boot/dts/armada-375.dtsi   |  6 ++---
 2 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/arch/arm/boot/dts/armada-375-db.dts b/arch/arm/boot/dts/armada-375-db.dts
index bcdbb8ba1d65..d33cca4e315d 100644
--- a/arch/arm/boot/dts/armada-375-db.dts
+++ b/arch/arm/boot/dts/armada-375-db.dts
@@ -140,28 +140,38 @@
 	nr-ports = <2>;
 };
 
-&nand {
+&nand_controller {
+	status = "okay";
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";
-	status = "okay";
-	num-cs = <1>;
-	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-
-	partition at 0 {
-		label = "U-Boot";
-		reg = <0 0x800000>;
-	};
-	partition at 800000 {
-		label = "Linux";
-		reg = <0x800000 0x800000>;
-	};
-	partition at 1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition at 800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
 	};
 };
 
diff --git a/arch/arm/boot/dts/armada-375.dtsi b/arch/arm/boot/dts/armada-375.dtsi
index 2cb1bcd30976..46471173c7c1 100644
--- a/arch/arm/boot/dts/armada-375.dtsi
+++ b/arch/arm/boot/dts/armada-375.dtsi
@@ -539,11 +539,11 @@
 				status = "disabled";
 			};
 
-			nand: nand at d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller at d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&gateclk 11>;
 				status = "disabled";
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 08/12] ARM: dts: armada-38x: use reworked NAND controller driver
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm/boot/dts/armada-385-db-ap.dts          |  69 ++++++------
 arch/arm/boot/dts/armada-385-linksys-caiman.dts | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys-cobra.dts  | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys-rango.dts  | 141 ++++++++++++------------
 arch/arm/boot/dts/armada-385-linksys-shelby.dts | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys.dtsi       |  16 ++-
 arch/arm/boot/dts/armada-388-db.dts             |  55 +++++----
 arch/arm/boot/dts/armada-38x.dtsi               |   6 +-
 8 files changed, 356 insertions(+), 318 deletions(-)

diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
index 25d2d720dc0e..c741708dabdb 100644
--- a/arch/arm/boot/dts/armada-385-db-ap.dts
+++ b/arch/arm/boot/dts/armada-385-db-ap.dts
@@ -166,39 +166,6 @@
 				status = "okay";
 			};
 
-			nfc: flash@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0x00000000 0x00800000>;
-						read-only;
-					};
-
-					partition@800000 {
-						label = "uImage";
-						reg = <0x00800000 0x00400000>;
-						read-only;
-					};
-
-					partition@c00000 {
-						label = "Root";
-						reg = <0x00c00000 0x3f400000>;
-					};
-				};
-			};
-
 			usb3@f0000 {
 				status = "okay";
 				usb-phy = <&usb3_phy>;
@@ -263,3 +230,39 @@
 		spi-max-frequency = <54000000>;
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0x00000000 0x00800000>;
+				read-only;
+			};
+
+			partition@800000 {
+				label = "uImage";
+				reg = <0x00800000 0x00400000>;
+				read-only;
+			};
+
+			partition@c00000 {
+				label = "Root";
+				reg = <0x00c00000 0x3f400000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-385-linksys-caiman.dts b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
index ee669ae61011..e769bcf7a9d1 100644
--- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition@140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition@900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition@3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition@5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition@140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition@900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition@3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition@5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys-cobra.dts b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
index 5169ca89c55a..690be217838c 100644
--- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition@140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition@900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition@3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition@5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition@140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition@900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition@3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition@5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys-rango.dts b/arch/arm/boot/dts/armada-385-linksys-rango.dts
index da8a0f3d432b..93570c6bfe85 100644
--- a/arch/arm/boot/dts/armada-385-linksys-rango.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-rango.dts
@@ -113,74 +113,79 @@
 
 &nand {
 	/* AMD/Spansion S34ML02G2 256MiB, OEM Layout */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@200000 {
-		label = "u_env";
-		reg = <0x200000 0x20000>;    /* 128KiB */
-	};
-
-	partition@220000 {
-		label = "s_env";
-		reg = <0x220000 0x40000>;    /* 256KiB */
-	};
-
-	partition@7e0000 {
-		label = "devinfo";
-		reg = <0x7e0000 0x40000>;   /* 256KiB */
-		read-only;
-	};
-
-	partition@820000 {
-		label = "sysdiag";
-		reg = <0x820000 0x1e0000>;   /* 1920KiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x5000000>;  /* 80MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x4a00000>;  /* 74MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@5a00000 {
-		label = "kernel2";
-		reg = <0x5a00000 0x5000000>; /* 80MiB */
-	};
-
-	partition@6000000 {
-		label = "rootfs2";
-		reg = <0x6000000 0x4a00000>; /* 74MiB */
-	};
-
-	/*
-	 * 86MiB, last MiB is for the BBT, not writable
-	 */
-	partition@aa00000 {
-		label = "syscfg";
-		reg = <0xaa00000 0x5600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x260000 0x5c0000>;   /* 5.75MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@200000 {
+			label = "u_env";
+			reg = <0x200000 0x20000>;    /* 128KiB */
+		};
+
+		partition@220000 {
+			label = "s_env";
+			reg = <0x220000 0x40000>;    /* 256KiB */
+		};
+
+		partition@7e0000 {
+			label = "devinfo";
+			reg = <0x7e0000 0x40000>;   /* 256KiB */
+			read-only;
+		};
+
+		partition@820000 {
+			label = "sysdiag";
+			reg = <0x820000 0x1e0000>;   /* 1920KiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x5000000>;  /* 80MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x4a00000>;  /* 74MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@5a00000 {
+			label = "kernel2";
+			reg = <0x5a00000 0x5000000>; /* 80MiB */
+		};
+
+		partition@6000000 {
+			label = "rootfs2";
+			reg = <0x6000000 0x4a00000>; /* 74MiB */
+		};
+
+		/*
+		 * 86MiB, last MiB is for the BBT, not writable
+		 */
+		partition@aa00000 {
+			label = "syscfg";
+			reg = <0xaa00000 0x5600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x260000 0x5c0000>;   /* 5.75MiB */
+		};
 	};
 };
 
diff --git a/arch/arm/boot/dts/armada-385-linksys-shelby.dts b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
index 94aa35bc0bff..4694556700ff 100644
--- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition@140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition@900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition@3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition@5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition@140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition@900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition@3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition@5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index e1f355ffc8f7..214630b06f0e 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -169,13 +169,19 @@
 	};
 };
 
-&nand {
+&nand_controller {
 	/* 128MiB or 256MiB */
 	status = "okay";
-	num-cs = <1>;
-	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	nand: nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+	};
 };
 
 &mdio {
diff --git a/arch/arm/boot/dts/armada-388-db.dts b/arch/arm/boot/dts/armada-388-db.dts
index a4ec1fa37529..61bfed5adaaa 100644
--- a/arch/arm/boot/dts/armada-388-db.dts
+++ b/arch/arm/boot/dts/armada-388-db.dts
@@ -128,29 +128,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition@800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition@1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
-
 			sdhci@d8000 {
 				broken-cd;
 				wp-inverted;
@@ -202,3 +179,35 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 00ff549d4e39..28669188f69d 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -583,11 +583,11 @@
 				status = "okay";
 			};
 
-			nand: flash@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 08/12] ARM: dts: armada-38x: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-385-db-ap.dts          |  69 ++++++------
 arch/arm/boot/dts/armada-385-linksys-caiman.dts | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys-cobra.dts  | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys-rango.dts  | 141 ++++++++++++------------
 arch/arm/boot/dts/armada-385-linksys-shelby.dts | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys.dtsi       |  16 ++-
 arch/arm/boot/dts/armada-388-db.dts             |  55 +++++----
 arch/arm/boot/dts/armada-38x.dtsi               |   6 +-
 8 files changed, 356 insertions(+), 318 deletions(-)

diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
index 25d2d720dc0e..c741708dabdb 100644
--- a/arch/arm/boot/dts/armada-385-db-ap.dts
+++ b/arch/arm/boot/dts/armada-385-db-ap.dts
@@ -166,39 +166,6 @@
 				status = "okay";
 			};
 
-			nfc: flash@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0x00000000 0x00800000>;
-						read-only;
-					};
-
-					partition@800000 {
-						label = "uImage";
-						reg = <0x00800000 0x00400000>;
-						read-only;
-					};
-
-					partition@c00000 {
-						label = "Root";
-						reg = <0x00c00000 0x3f400000>;
-					};
-				};
-			};
-
 			usb3@f0000 {
 				status = "okay";
 				usb-phy = <&usb3_phy>;
@@ -263,3 +230,39 @@
 		spi-max-frequency = <54000000>;
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0x00000000 0x00800000>;
+				read-only;
+			};
+
+			partition@800000 {
+				label = "uImage";
+				reg = <0x00800000 0x00400000>;
+				read-only;
+			};
+
+			partition@c00000 {
+				label = "Root";
+				reg = <0x00c00000 0x3f400000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-385-linksys-caiman.dts b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
index ee669ae61011..e769bcf7a9d1 100644
--- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition@140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition@900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition@3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition@5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition@140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition@900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition@3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition@5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys-cobra.dts b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
index 5169ca89c55a..690be217838c 100644
--- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition@140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition@900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition@3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition@5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition@140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition@900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition@3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition@5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys-rango.dts b/arch/arm/boot/dts/armada-385-linksys-rango.dts
index da8a0f3d432b..93570c6bfe85 100644
--- a/arch/arm/boot/dts/armada-385-linksys-rango.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-rango.dts
@@ -113,74 +113,79 @@
 
 &nand {
 	/* AMD/Spansion S34ML02G2 256MiB, OEM Layout */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@200000 {
-		label = "u_env";
-		reg = <0x200000 0x20000>;    /* 128KiB */
-	};
-
-	partition@220000 {
-		label = "s_env";
-		reg = <0x220000 0x40000>;    /* 256KiB */
-	};
-
-	partition@7e0000 {
-		label = "devinfo";
-		reg = <0x7e0000 0x40000>;   /* 256KiB */
-		read-only;
-	};
-
-	partition@820000 {
-		label = "sysdiag";
-		reg = <0x820000 0x1e0000>;   /* 1920KiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x5000000>;  /* 80MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x4a00000>;  /* 74MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@5a00000 {
-		label = "kernel2";
-		reg = <0x5a00000 0x5000000>; /* 80MiB */
-	};
-
-	partition@6000000 {
-		label = "rootfs2";
-		reg = <0x6000000 0x4a00000>; /* 74MiB */
-	};
-
-	/*
-	 * 86MiB, last MiB is for the BBT, not writable
-	 */
-	partition@aa00000 {
-		label = "syscfg";
-		reg = <0xaa00000 0x5600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x260000 0x5c0000>;   /* 5.75MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@200000 {
+			label = "u_env";
+			reg = <0x200000 0x20000>;    /* 128KiB */
+		};
+
+		partition@220000 {
+			label = "s_env";
+			reg = <0x220000 0x40000>;    /* 256KiB */
+		};
+
+		partition@7e0000 {
+			label = "devinfo";
+			reg = <0x7e0000 0x40000>;   /* 256KiB */
+			read-only;
+		};
+
+		partition@820000 {
+			label = "sysdiag";
+			reg = <0x820000 0x1e0000>;   /* 1920KiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x5000000>;  /* 80MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x4a00000>;  /* 74MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@5a00000 {
+			label = "kernel2";
+			reg = <0x5a00000 0x5000000>; /* 80MiB */
+		};
+
+		partition@6000000 {
+			label = "rootfs2";
+			reg = <0x6000000 0x4a00000>; /* 74MiB */
+		};
+
+		/*
+		 * 86MiB, last MiB is for the BBT, not writable
+		 */
+		partition@aa00000 {
+			label = "syscfg";
+			reg = <0xaa00000 0x5600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x260000 0x5c0000>;   /* 5.75MiB */
+		};
 	};
 };
 
diff --git a/arch/arm/boot/dts/armada-385-linksys-shelby.dts b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
index 94aa35bc0bff..4694556700ff 100644
--- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition@140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition@900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition@3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition@5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition@100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition@140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition@900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition@a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition@1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition@3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition@3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition@5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition@180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index e1f355ffc8f7..214630b06f0e 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -169,13 +169,19 @@
 	};
 };
 
-&nand {
+&nand_controller {
 	/* 128MiB or 256MiB */
 	status = "okay";
-	num-cs = <1>;
-	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	nand: nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+	};
 };
 
 &mdio {
diff --git a/arch/arm/boot/dts/armada-388-db.dts b/arch/arm/boot/dts/armada-388-db.dts
index a4ec1fa37529..61bfed5adaaa 100644
--- a/arch/arm/boot/dts/armada-388-db.dts
+++ b/arch/arm/boot/dts/armada-388-db.dts
@@ -128,29 +128,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition@800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition@1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
-
 			sdhci@d8000 {
 				broken-cd;
 				wp-inverted;
@@ -202,3 +179,35 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 00ff549d4e39..28669188f69d 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -583,11 +583,11 @@
 				status = "okay";
 			};
 
-			nand: flash@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 08/12] ARM: dts: armada-38x: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-385-db-ap.dts          |  69 ++++++------
 arch/arm/boot/dts/armada-385-linksys-caiman.dts | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys-cobra.dts  | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys-rango.dts  | 141 ++++++++++++------------
 arch/arm/boot/dts/armada-385-linksys-shelby.dts | 129 +++++++++++-----------
 arch/arm/boot/dts/armada-385-linksys.dtsi       |  16 ++-
 arch/arm/boot/dts/armada-388-db.dts             |  55 +++++----
 arch/arm/boot/dts/armada-38x.dtsi               |   6 +-
 8 files changed, 356 insertions(+), 318 deletions(-)

diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
index 25d2d720dc0e..c741708dabdb 100644
--- a/arch/arm/boot/dts/armada-385-db-ap.dts
+++ b/arch/arm/boot/dts/armada-385-db-ap.dts
@@ -166,39 +166,6 @@
 				status = "okay";
 			};
 
-			nfc: flash at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition at 0 {
-						label = "U-Boot";
-						reg = <0x00000000 0x00800000>;
-						read-only;
-					};
-
-					partition at 800000 {
-						label = "uImage";
-						reg = <0x00800000 0x00400000>;
-						read-only;
-					};
-
-					partition at c00000 {
-						label = "Root";
-						reg = <0x00c00000 0x3f400000>;
-					};
-				};
-			};
-
 			usb3 at f0000 {
 				status = "okay";
 				usb-phy = <&usb3_phy>;
@@ -263,3 +230,39 @@
 		spi-max-frequency = <54000000>;
 	};
 };
+
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0x00000000 0x00800000>;
+				read-only;
+			};
+
+			partition at 800000 {
+				label = "uImage";
+				reg = <0x00800000 0x00400000>;
+				read-only;
+			};
+
+			partition at c00000 {
+				label = "Root";
+				reg = <0x00c00000 0x3f400000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-385-linksys-caiman.dts b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
index ee669ae61011..e769bcf7a9d1 100644
--- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition at 0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition at 100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition at 140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition at 900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition at a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition at 1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition at 3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition at 3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition at 5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition at 180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition at 100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition at 140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition at 900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition at a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition at 1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition at 3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition at 3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition at 5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition at 180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys-cobra.dts b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
index 5169ca89c55a..690be217838c 100644
--- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition at 0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition at 100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition at 140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition at 900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition at a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition at 1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition at 3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition at 3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition at 5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition at 180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition at 100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition at 140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition at 900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition at a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition at 1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition at 3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition at 3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition at 5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition at 180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys-rango.dts b/arch/arm/boot/dts/armada-385-linksys-rango.dts
index da8a0f3d432b..93570c6bfe85 100644
--- a/arch/arm/boot/dts/armada-385-linksys-rango.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-rango.dts
@@ -113,74 +113,79 @@
 
 &nand {
 	/* AMD/Spansion S34ML02G2 256MiB, OEM Layout */
-
-	partition at 0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition at 200000 {
-		label = "u_env";
-		reg = <0x200000 0x20000>;    /* 128KiB */
-	};
-
-	partition at 220000 {
-		label = "s_env";
-		reg = <0x220000 0x40000>;    /* 256KiB */
-	};
-
-	partition at 7e0000 {
-		label = "devinfo";
-		reg = <0x7e0000 0x40000>;   /* 256KiB */
-		read-only;
-	};
-
-	partition at 820000 {
-		label = "sysdiag";
-		reg = <0x820000 0x1e0000>;   /* 1920KiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition at a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x5000000>;  /* 80MiB */
-	};
-
-	partition at 1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x4a00000>;  /* 74MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition at 5a00000 {
-		label = "kernel2";
-		reg = <0x5a00000 0x5000000>; /* 80MiB */
-	};
-
-	partition at 6000000 {
-		label = "rootfs2";
-		reg = <0x6000000 0x4a00000>; /* 74MiB */
-	};
-
-	/*
-	 * 86MiB, last MiB is for the BBT, not writable
-	 */
-	partition at aa00000 {
-		label = "syscfg";
-		reg = <0xaa00000 0x5600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition at 180000 {
-		label = "unused_area";
-		reg = <0x260000 0x5c0000>;   /* 5.75MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition at 200000 {
+			label = "u_env";
+			reg = <0x200000 0x20000>;    /* 128KiB */
+		};
+
+		partition at 220000 {
+			label = "s_env";
+			reg = <0x220000 0x40000>;    /* 256KiB */
+		};
+
+		partition at 7e0000 {
+			label = "devinfo";
+			reg = <0x7e0000 0x40000>;   /* 256KiB */
+			read-only;
+		};
+
+		partition at 820000 {
+			label = "sysdiag";
+			reg = <0x820000 0x1e0000>;   /* 1920KiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition at a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x5000000>;  /* 80MiB */
+		};
+
+		partition at 1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x4a00000>;  /* 74MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition at 5a00000 {
+			label = "kernel2";
+			reg = <0x5a00000 0x5000000>; /* 80MiB */
+		};
+
+		partition at 6000000 {
+			label = "rootfs2";
+			reg = <0x6000000 0x4a00000>; /* 74MiB */
+		};
+
+		/*
+		 * 86MiB, last MiB is for the BBT, not writable
+		 */
+		partition at aa00000 {
+			label = "syscfg";
+			reg = <0xaa00000 0x5600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition at 180000 {
+			label = "unused_area";
+			reg = <0x260000 0x5c0000>;   /* 5.75MiB */
+		};
 	};
 };
 
diff --git a/arch/arm/boot/dts/armada-385-linksys-shelby.dts b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
index 94aa35bc0bff..4694556700ff 100644
--- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
@@ -105,67 +105,72 @@
 
 &nand {
 	/* 128MiB */
-
-	partition at 0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition at 100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition at 140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition at 900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition at a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition at 1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition at 3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition at 3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition at 5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition at 180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0000000 0x200000>;  /* 2MiB */
+			read-only;
+		};
+
+		partition at 100000 {
+			label = "u_env";
+			reg = <0x200000 0x40000>;    /* 256KiB */
+		};
+
+		partition at 140000 {
+			label = "s_env";
+			reg = <0x240000 0x40000>;    /* 256KiB */
+		};
+
+		partition at 900000 {
+			label = "devinfo";
+			reg = <0x900000 0x100000>;   /* 1MiB */
+			read-only;
+		};
+
+		/* kernel1 overlaps with rootfs1 by design */
+		partition at a00000 {
+			label = "kernel1";
+			reg = <0xa00000 0x2800000>;  /* 40MiB */
+		};
+
+		partition at 1000000 {
+			label = "rootfs1";
+			reg = <0x1000000 0x2200000>;  /* 34MiB */
+		};
+
+		/* kernel2 overlaps with rootfs2 by design */
+		partition at 3200000 {
+			label = "kernel2";
+			reg = <0x3200000 0x2800000>; /* 40MiB */
+		};
+
+		partition at 3800000 {
+			label = "rootfs2";
+			reg = <0x3800000 0x2200000>; /* 34MiB */
+		};
+
+		/*
+		 * 38MiB, last MiB is for the BBT, not writable
+		 */
+		partition at 5a00000 {
+			label = "syscfg";
+			reg = <0x5a00000 0x2600000>;
+		};
+
+		/*
+		 * Unused area between "s_env" and "devinfo".
+		 * Moved here because otherwise the renumbered
+		 * partitions would break the bootloader
+		 * supplied bootargs
+		 */
+		partition at 180000 {
+			label = "unused_area";
+			reg = <0x280000 0x680000>;   /* 6.5MiB */
+		};
 	};
 };
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index e1f355ffc8f7..214630b06f0e 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -169,13 +169,19 @@
 	};
 };
 
-&nand {
+&nand_controller {
 	/* 128MiB or 256MiB */
 	status = "okay";
-	num-cs = <1>;
-	marvell,nand-keep-config;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	nand: nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+	};
 };
 
 &mdio {
diff --git a/arch/arm/boot/dts/armada-388-db.dts b/arch/arm/boot/dts/armada-388-db.dts
index a4ec1fa37529..61bfed5adaaa 100644
--- a/arch/arm/boot/dts/armada-388-db.dts
+++ b/arch/arm/boot/dts/armada-388-db.dts
@@ -128,29 +128,6 @@
 				status = "okay";
 			};
 
-			flash at d0000 {
-				status = "okay";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition at 800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition at 1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
-
 			sdhci at d8000 {
 				broken-cd;
 				wp-inverted;
@@ -202,3 +179,35 @@
 	};
 };
 
+&nand_controller {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition at 800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
index 00ff549d4e39..28669188f69d 100644
--- a/arch/arm/boot/dts/armada-38x.dtsi
+++ b/arch/arm/boot/dts/armada-38x.dtsi
@@ -583,11 +583,11 @@
 				status = "okay";
 			};
 
-			nand: flash at d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller at d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 09/12] ARM: dts: armada-39x: use reworked NAND controller driver
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm/boot/dts/armada-390-db.dts | 66 +++++++++++++++++----------------
 arch/arm/boot/dts/armada-395-gp.dts | 74 +++++++++++++++++++------------------
 arch/arm/boot/dts/armada-398-db.dts | 60 +++++++++++++++++-------------
 arch/arm/boot/dts/armada-39x.dtsi   |  6 +--
 4 files changed, 112 insertions(+), 94 deletions(-)

diff --git a/arch/arm/boot/dts/armada-390-db.dts b/arch/arm/boot/dts/armada-390-db.dts
index c718a5242595..2135a48cd385 100644
--- a/arch/arm/boot/dts/armada-390-db.dts
+++ b/arch/arm/boot/dts/armada-390-db.dts
@@ -86,37 +86,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <8>;
-				nand-ecc-step-size = <512>;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0 0x800000>;
-					};
-					partition@800000 {
-						label = "Linux";
-						reg = <0x800000 0x800000>;
-					};
-					partition@1000000 {
-						label = "Filesystem";
-						reg = <0x1000000 0x3f000000>;
-					};
-				};
-			};
-
 			/* CON98 */
 			usb3@f8000 {
 				status = "okay";
@@ -173,3 +142,38 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-395-gp.dts b/arch/arm/boot/dts/armada-395-gp.dts
index ef491b524fd6..d3422f77d057 100644
--- a/arch/arm/boot/dts/armada-395-gp.dts
+++ b/arch/arm/boot/dts/armada-395-gp.dts
@@ -88,41 +88,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0x00000000 0x00600000>;
-						read-only;
-					};
-
-					partition@800000 {
-						label = "uImage";
-						reg = <0x00600000 0x00400000>;
-						read-only;
-					};
-
-					partition@1000000 {
-						label = "Root";
-						reg = <0x00a00000 0x3f600000>;
-					};
-				};
-			};
-
 			/* CON18 */
 			sdhci@d8000 {
 				clock-frequency = <200000000>;
@@ -161,3 +126,42 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0x00000000 0x00600000>;
+				read-only;
+			};
+
+			partition@800000 {
+				label = "uImage";
+				reg = <0x00600000 0x00400000>;
+				read-only;
+			};
+
+			partition@1000000 {
+				label = "Root";
+				reg = <0x00a00000 0x3f600000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-398-db.dts b/arch/arm/boot/dts/armada-398-db.dts
index f0e0379f7619..e73e5e453fd7 100644
--- a/arch/arm/boot/dts/armada-398-db.dts
+++ b/arch/arm/boot/dts/armada-398-db.dts
@@ -88,31 +88,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <8>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition@800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition@1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
-
 			usb3@f8000 {
 				status = "okay";
 			};
@@ -159,3 +134,38 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
index 5218bd2a248d..a8322de3f0b3 100644
--- a/arch/arm/boot/dts/armada-39x.dtsi
+++ b/arch/arm/boot/dts/armada-39x.dtsi
@@ -404,11 +404,11 @@
 				interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
-			flash@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 09/12] ARM: dts: armada-39x: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-390-db.dts | 66 +++++++++++++++++----------------
 arch/arm/boot/dts/armada-395-gp.dts | 74 +++++++++++++++++++------------------
 arch/arm/boot/dts/armada-398-db.dts | 60 +++++++++++++++++-------------
 arch/arm/boot/dts/armada-39x.dtsi   |  6 +--
 4 files changed, 112 insertions(+), 94 deletions(-)

diff --git a/arch/arm/boot/dts/armada-390-db.dts b/arch/arm/boot/dts/armada-390-db.dts
index c718a5242595..2135a48cd385 100644
--- a/arch/arm/boot/dts/armada-390-db.dts
+++ b/arch/arm/boot/dts/armada-390-db.dts
@@ -86,37 +86,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <8>;
-				nand-ecc-step-size = <512>;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0 0x800000>;
-					};
-					partition@800000 {
-						label = "Linux";
-						reg = <0x800000 0x800000>;
-					};
-					partition@1000000 {
-						label = "Filesystem";
-						reg = <0x1000000 0x3f000000>;
-					};
-				};
-			};
-
 			/* CON98 */
 			usb3@f8000 {
 				status = "okay";
@@ -173,3 +142,38 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-395-gp.dts b/arch/arm/boot/dts/armada-395-gp.dts
index ef491b524fd6..d3422f77d057 100644
--- a/arch/arm/boot/dts/armada-395-gp.dts
+++ b/arch/arm/boot/dts/armada-395-gp.dts
@@ -88,41 +88,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0x00000000 0x00600000>;
-						read-only;
-					};
-
-					partition@800000 {
-						label = "uImage";
-						reg = <0x00600000 0x00400000>;
-						read-only;
-					};
-
-					partition@1000000 {
-						label = "Root";
-						reg = <0x00a00000 0x3f600000>;
-					};
-				};
-			};
-
 			/* CON18 */
 			sdhci@d8000 {
 				clock-frequency = <200000000>;
@@ -161,3 +126,42 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0x00000000 0x00600000>;
+				read-only;
+			};
+
+			partition@800000 {
+				label = "uImage";
+				reg = <0x00600000 0x00400000>;
+				read-only;
+			};
+
+			partition@1000000 {
+				label = "Root";
+				reg = <0x00a00000 0x3f600000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-398-db.dts b/arch/arm/boot/dts/armada-398-db.dts
index f0e0379f7619..e73e5e453fd7 100644
--- a/arch/arm/boot/dts/armada-398-db.dts
+++ b/arch/arm/boot/dts/armada-398-db.dts
@@ -88,31 +88,6 @@
 				status = "okay";
 			};
 
-			flash@d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <8>;
-				nand-ecc-step-size = <512>;
-
-				partition@0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition@800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition@1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
-
 			usb3@f8000 {
 				status = "okay";
 			};
@@ -159,3 +134,38 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition@800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
index 5218bd2a248d..a8322de3f0b3 100644
--- a/arch/arm/boot/dts/armada-39x.dtsi
+++ b/arch/arm/boot/dts/armada-39x.dtsi
@@ -404,11 +404,11 @@
 				interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
-			flash@d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller@d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 09/12] ARM: dts: armada-39x: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/armada-390-db.dts | 66 +++++++++++++++++----------------
 arch/arm/boot/dts/armada-395-gp.dts | 74 +++++++++++++++++++------------------
 arch/arm/boot/dts/armada-398-db.dts | 60 +++++++++++++++++-------------
 arch/arm/boot/dts/armada-39x.dtsi   |  6 +--
 4 files changed, 112 insertions(+), 94 deletions(-)

diff --git a/arch/arm/boot/dts/armada-390-db.dts b/arch/arm/boot/dts/armada-390-db.dts
index c718a5242595..2135a48cd385 100644
--- a/arch/arm/boot/dts/armada-390-db.dts
+++ b/arch/arm/boot/dts/armada-390-db.dts
@@ -86,37 +86,6 @@
 				status = "okay";
 			};
 
-			flash at d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <8>;
-				nand-ecc-step-size = <512>;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition at 0 {
-						label = "U-Boot";
-						reg = <0 0x800000>;
-					};
-					partition at 800000 {
-						label = "Linux";
-						reg = <0x800000 0x800000>;
-					};
-					partition at 1000000 {
-						label = "Filesystem";
-						reg = <0x1000000 0x3f000000>;
-					};
-				};
-			};
-
 			/* CON98 */
 			usb3 at f8000 {
 				status = "okay";
@@ -173,3 +142,38 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition at 800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-395-gp.dts b/arch/arm/boot/dts/armada-395-gp.dts
index ef491b524fd6..d3422f77d057 100644
--- a/arch/arm/boot/dts/armada-395-gp.dts
+++ b/arch/arm/boot/dts/armada-395-gp.dts
@@ -88,41 +88,6 @@
 				status = "okay";
 			};
 
-			flash at d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <4>;
-				nand-ecc-step-size = <512>;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition at 0 {
-						label = "U-Boot";
-						reg = <0x00000000 0x00600000>;
-						read-only;
-					};
-
-					partition at 800000 {
-						label = "uImage";
-						reg = <0x00600000 0x00400000>;
-						read-only;
-					};
-
-					partition at 1000000 {
-						label = "Root";
-						reg = <0x00a00000 0x3f600000>;
-					};
-				};
-			};
-
 			/* CON18 */
 			sdhci at d8000 {
 				clock-frequency = <200000000>;
@@ -161,3 +126,42 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0x00000000 0x00600000>;
+				read-only;
+			};
+
+			partition at 800000 {
+				label = "uImage";
+				reg = <0x00600000 0x00400000>;
+				read-only;
+			};
+
+			partition at 1000000 {
+				label = "Root";
+				reg = <0x00a00000 0x3f600000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-398-db.dts b/arch/arm/boot/dts/armada-398-db.dts
index f0e0379f7619..e73e5e453fd7 100644
--- a/arch/arm/boot/dts/armada-398-db.dts
+++ b/arch/arm/boot/dts/armada-398-db.dts
@@ -88,31 +88,6 @@
 				status = "okay";
 			};
 
-			flash at d0000 {
-				status = "okay";
-				pinctrl-0 = <&nand_pins>;
-				pinctrl-names = "default";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				marvell,nand-enable-arbiter;
-				nand-on-flash-bbt;
-				nand-ecc-strength = <8>;
-				nand-ecc-step-size = <512>;
-
-				partition at 0 {
-					label = "U-Boot";
-					reg = <0 0x800000>;
-				};
-				partition at 800000 {
-					label = "Linux";
-					reg = <0x800000 0x800000>;
-				};
-				partition at 1000000 {
-					label = "Filesystem";
-					reg = <0x1000000 0x3f000000>;
-				};
-			};
-
 			usb3 at f8000 {
 				status = "okay";
 			};
@@ -159,3 +134,38 @@
 		};
 	};
 };
+
+&nand_controller {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		marvell,nand-keep-config;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x800000>;
+			};
+			partition at 800000 {
+				label = "Linux";
+				reg = <0x800000 0x800000>;
+			};
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/armada-39x.dtsi b/arch/arm/boot/dts/armada-39x.dtsi
index 5218bd2a248d..a8322de3f0b3 100644
--- a/arch/arm/boot/dts/armada-39x.dtsi
+++ b/arch/arm/boot/dts/armada-39x.dtsi
@@ -404,11 +404,11 @@
 				interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
 			};
 
-			flash at d0000 {
-				compatible = "marvell,armada370-nand";
+			nand_controller: nand-controller at d0000 {
+				compatible = "marvell,armada370-nand-controller";
 				reg = <0xd0000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&coredivclk 0>;
 				status = "disabled";
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 10/12] ARM: dts: pxa: use reworked NAND controller driver
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm/boot/dts/pxa3xx.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
index 55c75b67351c..982d1a62661d 100644
--- a/arch/arm/boot/dts/pxa3xx.dtsi
+++ b/arch/arm/boot/dts/pxa3xx.dtsi
@@ -117,15 +117,15 @@
 			status = "disabled";
 		};
 
-		nand0: nand@43100000 {
-			compatible = "marvell,pxa3xx-nand";
+		nand_controller: nand-controller@43100000 {
+			compatible = "marvell,pxa3xx-nand-controller";
 			reg = <0x43100000 90>;
 			interrupts = <45>;
 			clocks = <&clks CLK_NAND>;
 			dmas = <&pdma 97 3>;
 			dma-names = "data";
 			#address-cells = <1>;
-			#size-cells = <1>;	
+			#size-cells = <0>;
 			status = "disabled";
 		};
 
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 10/12] ARM: dts: pxa: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/pxa3xx.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
index 55c75b67351c..982d1a62661d 100644
--- a/arch/arm/boot/dts/pxa3xx.dtsi
+++ b/arch/arm/boot/dts/pxa3xx.dtsi
@@ -117,15 +117,15 @@
 			status = "disabled";
 		};
 
-		nand0: nand@43100000 {
-			compatible = "marvell,pxa3xx-nand";
+		nand_controller: nand-controller@43100000 {
+			compatible = "marvell,pxa3xx-nand-controller";
 			reg = <0x43100000 90>;
 			interrupts = <45>;
 			clocks = <&clks CLK_NAND>;
 			dmas = <&pdma 97 3>;
 			dma-names = "data";
 			#address-cells = <1>;
-			#size-cells = <1>;	
+			#size-cells = <0>;
 			status = "disabled";
 		};
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 10/12] ARM: dts: pxa: use reworked NAND controller driver
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm/boot/dts/pxa3xx.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
index 55c75b67351c..982d1a62661d 100644
--- a/arch/arm/boot/dts/pxa3xx.dtsi
+++ b/arch/arm/boot/dts/pxa3xx.dtsi
@@ -117,15 +117,15 @@
 			status = "disabled";
 		};
 
-		nand0: nand at 43100000 {
-			compatible = "marvell,pxa3xx-nand";
+		nand_controller: nand-controller at 43100000 {
+			compatible = "marvell,pxa3xx-nand-controller";
 			reg = <0x43100000 90>;
 			interrupts = <45>;
 			clocks = <&clks CLK_NAND>;
 			dmas = <&pdma 97 3>;
 			dma-names = "data";
 			#address-cells = <1>;
-			#size-cells = <1>;	
+			#size-cells = <0>;
 			status = "disabled";
 		};
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
 .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
 2 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
index 52b5341cb270..758452c10612 100644
--- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
@@ -156,36 +156,48 @@
 	};
 };
 
-&cpm_nand {
+&cpm_nand_controller {
 	/*
 	 * SPI on CPM and NAND have common pins on this board. We can
-	 * use only one at a time. To enable the NAND (whihch will
+	 * use only one at a time. To enable the NAND (which will
 	 * disable the SPI), the "status = "okay";" line have to be
 	 * added here.
 	 */
-	num-cs = <1>;
 	pinctrl-0 = <&nand_pins>, <&nand_rb>;
 	pinctrl-names = "default";
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
-
-	partition@0 {
-		label = "U-Boot";
-		reg = <0 0x200000>;
-	};
-	partition@200000 {
-		label = "Linux";
-		reg = <0x200000 0xe00000>;
-	};
-	partition@1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x200000>;
+			};
+
+			partition@200000 {
+				label = "Linux";
+				reg = <0x200000 0xe00000>;
+			};
+
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+
+		};
 	};
 };
 
-
 &cpm_spi1 {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
index e3b64d03fbd8..8a3cff9a7343 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
@@ -309,17 +309,17 @@
 				status = "disabled";
 			};
 
-			cpm_nand: nand@720000 {
+			cpm_nand_controller: nand@720000 {
 				/*
 				 * Due to the limiation of the pin available
 				 * this controller is only usable on the CPM
 				 * for A7K and on the CPS for A8K.
 				 */
-				compatible = "marvell,armada-8k-nand",
-					     "marvell,armada370-nand";
+				compatible = "marvell,armada-8k-nand-controller",
+					     "marvell,armada370-nand-controller";
 				reg = <0x720000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&cpm_clk 1 2>;
 				marvell,system-controller = <&cpm_syscon0>;
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
 .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
 2 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
index 52b5341cb270..758452c10612 100644
--- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
@@ -156,36 +156,48 @@
 	};
 };
 
-&cpm_nand {
+&cpm_nand_controller {
 	/*
 	 * SPI on CPM and NAND have common pins on this board. We can
-	 * use only one at a time. To enable the NAND (whihch will
+	 * use only one at a time. To enable the NAND (which will
 	 * disable the SPI), the "status = "okay";" line have to be
 	 * added here.
 	 */
-	num-cs = <1>;
 	pinctrl-0 = <&nand_pins>, <&nand_rb>;
 	pinctrl-names = "default";
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
-
-	partition@0 {
-		label = "U-Boot";
-		reg = <0 0x200000>;
-	};
-	partition@200000 {
-		label = "Linux";
-		reg = <0x200000 0xe00000>;
-	};
-	partition@1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand@0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x200000>;
+			};
+
+			partition@200000 {
+				label = "Linux";
+				reg = <0x200000 0xe00000>;
+			};
+
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+
+		};
 	};
 };
 
-
 &cpm_spi1 {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
index e3b64d03fbd8..8a3cff9a7343 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
@@ -309,17 +309,17 @@
 				status = "disabled";
 			};
 
-			cpm_nand: nand@720000 {
+			cpm_nand_controller: nand@720000 {
 				/*
 				 * Due to the limiation of the pin available
 				 * this controller is only usable on the CPM
 				 * for A7K and on the CPS for A8K.
 				 */
-				compatible = "marvell,armada-8k-nand",
-					     "marvell,armada370-nand";
+				compatible = "marvell,armada-8k-nand-controller",
+					     "marvell,armada370-nand-controller";
 				reg = <0x720000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&cpm_clk 1 2>;
 				marvell,system-controller = <&cpm_syscon0>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
 .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
 2 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
index 52b5341cb270..758452c10612 100644
--- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
@@ -156,36 +156,48 @@
 	};
 };
 
-&cpm_nand {
+&cpm_nand_controller {
 	/*
 	 * SPI on CPM and NAND have common pins on this board. We can
-	 * use only one at a time. To enable the NAND (whihch will
+	 * use only one at a time. To enable the NAND (which will
 	 * disable the SPI), the "status = "okay";" line have to be
 	 * added here.
 	 */
-	num-cs = <1>;
 	pinctrl-0 = <&nand_pins>, <&nand_rb>;
 	pinctrl-names = "default";
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-	marvell,nand-enable-arbiter;
-	nand-on-flash-bbt;
-
-	partition at 0 {
-		label = "U-Boot";
-		reg = <0 0x200000>;
-	};
-	partition at 200000 {
-		label = "Linux";
-		reg = <0x200000 0xe00000>;
-	};
-	partition at 1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand at 0 {
+		reg = <0>;
+		label = "pxa3xx_nand-0";
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x200000>;
+			};
+
+			partition at 200000 {
+				label = "Linux";
+				reg = <0x200000 0xe00000>;
+			};
+
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+
+		};
 	};
 };
 
-
 &cpm_spi1 {
 	status = "okay";
 
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
index e3b64d03fbd8..8a3cff9a7343 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
@@ -309,17 +309,17 @@
 				status = "disabled";
 			};
 
-			cpm_nand: nand at 720000 {
+			cpm_nand_controller: nand at 720000 {
 				/*
 				 * Due to the limiation of the pin available
 				 * this controller is only usable on the CPM
 				 * for A7K and on the CPS for A8K.
 				 */
-				compatible = "marvell,armada-8k-nand",
-					     "marvell,armada370-nand";
+				compatible = "marvell,armada-8k-nand-controller",
+					     "marvell,armada370-nand-controller";
 				reg = <0x720000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&cpm_clk 1 2>;
 				marvell,system-controller = <&cpm_syscon0>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-07 20:18     ` Miquel Raynal
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas
  Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Thomas Petazzoni, Antoine Tenart, Nadav Haklai, Miquel Raynal,
	Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
---
 arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
 2 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
index b1f6cccc5081..c25ac3fa9aec 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
@@ -272,27 +272,35 @@
  * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
  * MDIO signal of CP1.
  */
-&cps_nand {
-	num-cs = <1>;
+&cps_nand_controller {
 	pinctrl-0 = <&nand_pins>, <&nand_rb>;
 	pinctrl-names = "default";
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-	marvell,nand-enable-arbiter;
-	marvell,system-controller = <&cps_syscon0>;
-	nand-on-flash-bbt;
-
-	partition@0 {
-		label = "U-Boot";
-		reg = <0 0x200000>;
-	};
-	partition@200000 {
-		label = "Linux";
-		reg = <0x200000 0xe00000>;
-	};
-	partition@1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand@0 {
+		reg = <0>;
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x200000>;
+			};
+			partition@200000 {
+				label = "Linux";
+				reg = <0x200000 0xe00000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
 	};
 };
 
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
index cb1fb49ccf81..8610163bb1a4 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
@@ -310,20 +310,20 @@
 				status = "disabled";
 			};
 
-			cps_nand: nand@720000 {
+			cps_nand_controller: nand@720000 {
 				/*
 				 * Due to the limiation of the pin available
 				 * this controller is only usable on the CPM
 				 * for A7K and on the CPS for A8K.
 				 */
-				compatible = "marvell,armada370-nand",
-					     "marvell,armada-8k-nand";
+				compatible = "marvell,armada-8k-nand-controller",
+					     "marvell,armada370-nand-controller";
 				reg = <0x720000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&cps_clk 1 2>;
-				marvell,system-controller = <&cpm_syscon0>;
+				marvell,system-controller = <&cps_syscon0>;
 				status = "disabled";
 			};
 
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia
  Cc: linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Miquel Raynal, Ofer Heifetz,
	Hanna Hawa, Neta Zur Hershkovits

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
 2 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
index b1f6cccc5081..c25ac3fa9aec 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
@@ -272,27 +272,35 @@
  * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
  * MDIO signal of CP1.
  */
-&cps_nand {
-	num-cs = <1>;
+&cps_nand_controller {
 	pinctrl-0 = <&nand_pins>, <&nand_rb>;
 	pinctrl-names = "default";
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-	marvell,nand-enable-arbiter;
-	marvell,system-controller = <&cps_syscon0>;
-	nand-on-flash-bbt;
-
-	partition@0 {
-		label = "U-Boot";
-		reg = <0 0x200000>;
-	};
-	partition@200000 {
-		label = "Linux";
-		reg = <0x200000 0xe00000>;
-	};
-	partition@1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand@0 {
+		reg = <0>;
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "U-Boot";
+				reg = <0 0x200000>;
+			};
+			partition@200000 {
+				label = "Linux";
+				reg = <0x200000 0xe00000>;
+			};
+			partition@1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
 	};
 };
 
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
index cb1fb49ccf81..8610163bb1a4 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
@@ -310,20 +310,20 @@
 				status = "disabled";
 			};
 
-			cps_nand: nand@720000 {
+			cps_nand_controller: nand@720000 {
 				/*
 				 * Due to the limiation of the pin available
 				 * this controller is only usable on the CPM
 				 * for A7K and on the CPS for A8K.
 				 */
-				compatible = "marvell,armada370-nand",
-					     "marvell,armada-8k-nand";
+				compatible = "marvell,armada-8k-nand-controller",
+					     "marvell,armada370-nand-controller";
 				reg = <0x720000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&cps_clk 1 2>;
-				marvell,system-controller = <&cpm_syscon0>;
+				marvell,system-controller = <&cps_syscon0>;
 				status = "disabled";
 			};
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
@ 2017-12-07 20:18     ` Miquel Raynal
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel Raynal @ 2017-12-07 20:18 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new bindings of the reworked Marvell NAND controller driver.
Also adapt the nand controller node organization to distinguish which
property is relevant for the controller, and which one is NAND chip
specific. Expose the partitions as a subnode of the NAND chip.

Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
the driver activates the arbiter by default for all boards (either
needed or harmless).

Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
---
 arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
 .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
 2 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
index b1f6cccc5081..c25ac3fa9aec 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
+++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
@@ -272,27 +272,35 @@
  * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
  * MDIO signal of CP1.
  */
-&cps_nand {
-	num-cs = <1>;
+&cps_nand_controller {
 	pinctrl-0 = <&nand_pins>, <&nand_rb>;
 	pinctrl-names = "default";
-	nand-ecc-strength = <4>;
-	nand-ecc-step-size = <512>;
-	marvell,nand-enable-arbiter;
-	marvell,system-controller = <&cps_syscon0>;
-	nand-on-flash-bbt;
-
-	partition at 0 {
-		label = "U-Boot";
-		reg = <0 0x200000>;
-	};
-	partition at 200000 {
-		label = "Linux";
-		reg = <0x200000 0xe00000>;
-	};
-	partition at 1000000 {
-		label = "Filesystem";
-		reg = <0x1000000 0x3f000000>;
+
+	nand at 0 {
+		reg = <0>;
+		marvell,rb = <0>;
+		nand-on-flash-bbt;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0 0x200000>;
+			};
+			partition at 200000 {
+				label = "Linux";
+				reg = <0x200000 0xe00000>;
+			};
+			partition at 1000000 {
+				label = "Filesystem";
+				reg = <0x1000000 0x3f000000>;
+			};
+		};
 	};
 };
 
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
index cb1fb49ccf81..8610163bb1a4 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
@@ -310,20 +310,20 @@
 				status = "disabled";
 			};
 
-			cps_nand: nand at 720000 {
+			cps_nand_controller: nand at 720000 {
 				/*
 				 * Due to the limiation of the pin available
 				 * this controller is only usable on the CPM
 				 * for A7K and on the CPS for A8K.
 				 */
-				compatible = "marvell,armada370-nand",
-					     "marvell,armada-8k-nand";
+				compatible = "marvell,armada-8k-nand-controller",
+					     "marvell,armada370-nand-controller";
 				reg = <0x720000 0x54>;
 				#address-cells = <1>;
-				#size-cells = <1>;
+				#size-cells = <0>;
 				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&cps_clk 1 2>;
-				marvell,system-controller = <&cpm_syscon0>;
+				marvell,system-controller = <&cps_syscon0>;
 				status = "disabled";
 			};
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* Re: [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation
  2017-12-07 20:18     ` Miquel Raynal
  (?)
@ 2017-12-08 20:56         ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-08 20:56 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
	Cyrille Pitchen, Rob Herring, Mark Rutland, Jason Cooper,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Russell King, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia

On Thu,  7 Dec 2017 21:18:03 +0100
Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Document the legacy and the new bindings for Marvell NAND controller.
> 
> The pxa3xx_nand.c driver does only support legacy bindings, which are
> incomplete and inaccurate. A rework of this controller (called
> marvell_nand.c) does support both.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
>  .../devicetree/bindings/mtd/marvell-nand.txt       | 84 ++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
> 
> diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> new file mode 100644
> index 000000000000..0b3d5e0bab83
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> @@ -0,0 +1,84 @@
> +Marvell NAND Flash Controller (NFC)
> +
> +Required properties:
> +- compatible: can be one of the following:
> +    * "marvell,armada-8k-nand-controller"
> +    * "marvell,armada370-nand-controller"
> +    * "marvell,pxa3xx-nand-controller"
> +    * "marvell,armada-8k-nand" (deprecated)
> +    * "marvell,armada370-nand" (deprecated)
> +    * "marvell,pxa3xx-nand" (deprecated)
> +- reg: NAND flash controller memory area.
> +- #address-cells: shall be set to 1. Encode the NAND CS.
> +- #size-cells: shall be set to 0.
> +- interrupts: shall define the NAND controller interrupt.
> +- clocks: shall reference the NAND controller clock.
> +- marvell,system-controller: Set to retrieve the syscon node that handles
> +  NAND controller related registers (only required with the
> +  "marvell,armada-8k-nand[-controller]" compatibles).
> +
> +Optional properties:
> +- label: see partition.txt. New platforms shall omit this property.
> +- dmas: shall reference DMA channel associated to the NAND controller.
> +- dma-names: shall be "rxtx".
> +
> +Optional children nodes:
> +Children nodes represent the available NAND chips.
> +
> +Required properties:
> +- reg: shall contain the native Chip Select ids (0-3)
> +- marvell,rb: shall contain the native Ready/Busy ids (0-1)
> +
> +Optional properties:
> +- marvell,nand-keep-config: orders the driver not to take the timings
> +  from the core and leaving them completely untouched. Bootloader
> +  timings will then be used.
> +- nand-on-flash-bbt: see nand.txt.
> +- nand-ecc-mode: see nand.txt. Will use hardware ECC if not specified.
> +- nand-ecc-algo: see nand.txt. This property may be added when using
> +  hardware ECC for clarification but will be ignored by the driver
> +  because ECC mode is chosen depending on the page size and the strength
> +  required by the NAND chip. This value may be overwritten with
> +  nand-ecc-strength property.
> +- nand-ecc-strength: see nand.txt.
> +- nand-ecc-step-size: see nand.txt. This has no effect and will be
> +  ignored by the driver when using hardware ECC because Marvell's NAND
> +  flash controller does use fixed strength (1-bit for Hamming, 16-bit
> +  for BCH), so the step size will shrink or grow in order to fit the
> +  required strength. Step sizes are not completely random for all and
> +  follow certain patterns described in AN-379, "Marvell SoC NFC ECC".
> +
> +See Documentation/devicetree/bindings/mtd/nand.txt for more details on
> +generic bindings.
> +
> +
> +Example:
> +nand_controller: nand-controller@d0000 {
> +	compatible = "marvell,armada370-nand-controller";
> +	reg = <0xd0000 0x54>;
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
> +	clocks = <&coredivclk 0>;
> +
> +	nand@0 {
> +		reg = <0>;
> +		marvell,rb = <0>;
> +		nand-ecc-mode = "hw";
> +		marvell,nand-keep-config;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition@0 {
> +				label = "Rootfs";
> +				reg = <0x00000000 0x40000000>;
> +			};
> +		};
> +	};
> +};

Maybe you should also give an example for the old bindings.
BTW, given your properties description, it's not clear which properties
are deprecated. Maybe you should split the doc in 2 sections: one
describing the new bindings, and the other one describing the deprecated
bindings.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation
@ 2017-12-08 20:56         ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-08 20:56 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
	Cyrille Pitchen, Rob Herring, Mark Rutland, Jason Cooper,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Russell King, Daniel Mack, Haojian Zhuang, Robert Jarzmik,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

On Thu,  7 Dec 2017 21:18:03 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Document the legacy and the new bindings for Marvell NAND controller.
> 
> The pxa3xx_nand.c driver does only support legacy bindings, which are
> incomplete and inaccurate. A rework of this controller (called
> marvell_nand.c) does support both.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
>  .../devicetree/bindings/mtd/marvell-nand.txt       | 84 ++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
> 
> diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> new file mode 100644
> index 000000000000..0b3d5e0bab83
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> @@ -0,0 +1,84 @@
> +Marvell NAND Flash Controller (NFC)
> +
> +Required properties:
> +- compatible: can be one of the following:
> +    * "marvell,armada-8k-nand-controller"
> +    * "marvell,armada370-nand-controller"
> +    * "marvell,pxa3xx-nand-controller"
> +    * "marvell,armada-8k-nand" (deprecated)
> +    * "marvell,armada370-nand" (deprecated)
> +    * "marvell,pxa3xx-nand" (deprecated)
> +- reg: NAND flash controller memory area.
> +- #address-cells: shall be set to 1. Encode the NAND CS.
> +- #size-cells: shall be set to 0.
> +- interrupts: shall define the NAND controller interrupt.
> +- clocks: shall reference the NAND controller clock.
> +- marvell,system-controller: Set to retrieve the syscon node that handles
> +  NAND controller related registers (only required with the
> +  "marvell,armada-8k-nand[-controller]" compatibles).
> +
> +Optional properties:
> +- label: see partition.txt. New platforms shall omit this property.
> +- dmas: shall reference DMA channel associated to the NAND controller.
> +- dma-names: shall be "rxtx".
> +
> +Optional children nodes:
> +Children nodes represent the available NAND chips.
> +
> +Required properties:
> +- reg: shall contain the native Chip Select ids (0-3)
> +- marvell,rb: shall contain the native Ready/Busy ids (0-1)
> +
> +Optional properties:
> +- marvell,nand-keep-config: orders the driver not to take the timings
> +  from the core and leaving them completely untouched. Bootloader
> +  timings will then be used.
> +- nand-on-flash-bbt: see nand.txt.
> +- nand-ecc-mode: see nand.txt. Will use hardware ECC if not specified.
> +- nand-ecc-algo: see nand.txt. This property may be added when using
> +  hardware ECC for clarification but will be ignored by the driver
> +  because ECC mode is chosen depending on the page size and the strength
> +  required by the NAND chip. This value may be overwritten with
> +  nand-ecc-strength property.
> +- nand-ecc-strength: see nand.txt.
> +- nand-ecc-step-size: see nand.txt. This has no effect and will be
> +  ignored by the driver when using hardware ECC because Marvell's NAND
> +  flash controller does use fixed strength (1-bit for Hamming, 16-bit
> +  for BCH), so the step size will shrink or grow in order to fit the
> +  required strength. Step sizes are not completely random for all and
> +  follow certain patterns described in AN-379, "Marvell SoC NFC ECC".
> +
> +See Documentation/devicetree/bindings/mtd/nand.txt for more details on
> +generic bindings.
> +
> +
> +Example:
> +nand_controller: nand-controller@d0000 {
> +	compatible = "marvell,armada370-nand-controller";
> +	reg = <0xd0000 0x54>;
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
> +	clocks = <&coredivclk 0>;
> +
> +	nand@0 {
> +		reg = <0>;
> +		marvell,rb = <0>;
> +		nand-ecc-mode = "hw";
> +		marvell,nand-keep-config;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition@0 {
> +				label = "Rootfs";
> +				reg = <0x00000000 0x40000000>;
> +			};
> +		};
> +	};
> +};

Maybe you should also give an example for the old bindings.
BTW, given your properties description, it's not clear which properties
are deprecated. Maybe you should split the doc in 2 sections: one
describing the new bindings, and the other one describing the deprecated
bindings.

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation
@ 2017-12-08 20:56         ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-08 20:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu,  7 Dec 2017 21:18:03 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Document the legacy and the new bindings for Marvell NAND controller.
> 
> The pxa3xx_nand.c driver does only support legacy bindings, which are
> incomplete and inaccurate. A rework of this controller (called
> marvell_nand.c) does support both.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
>  .../devicetree/bindings/mtd/marvell-nand.txt       | 84 ++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
> 
> diff --git a/Documentation/devicetree/bindings/mtd/marvell-nand.txt b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> new file mode 100644
> index 000000000000..0b3d5e0bab83
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/marvell-nand.txt
> @@ -0,0 +1,84 @@
> +Marvell NAND Flash Controller (NFC)
> +
> +Required properties:
> +- compatible: can be one of the following:
> +    * "marvell,armada-8k-nand-controller"
> +    * "marvell,armada370-nand-controller"
> +    * "marvell,pxa3xx-nand-controller"
> +    * "marvell,armada-8k-nand" (deprecated)
> +    * "marvell,armada370-nand" (deprecated)
> +    * "marvell,pxa3xx-nand" (deprecated)
> +- reg: NAND flash controller memory area.
> +- #address-cells: shall be set to 1. Encode the NAND CS.
> +- #size-cells: shall be set to 0.
> +- interrupts: shall define the NAND controller interrupt.
> +- clocks: shall reference the NAND controller clock.
> +- marvell,system-controller: Set to retrieve the syscon node that handles
> +  NAND controller related registers (only required with the
> +  "marvell,armada-8k-nand[-controller]" compatibles).
> +
> +Optional properties:
> +- label: see partition.txt. New platforms shall omit this property.
> +- dmas: shall reference DMA channel associated to the NAND controller.
> +- dma-names: shall be "rxtx".
> +
> +Optional children nodes:
> +Children nodes represent the available NAND chips.
> +
> +Required properties:
> +- reg: shall contain the native Chip Select ids (0-3)
> +- marvell,rb: shall contain the native Ready/Busy ids (0-1)
> +
> +Optional properties:
> +- marvell,nand-keep-config: orders the driver not to take the timings
> +  from the core and leaving them completely untouched. Bootloader
> +  timings will then be used.
> +- nand-on-flash-bbt: see nand.txt.
> +- nand-ecc-mode: see nand.txt. Will use hardware ECC if not specified.
> +- nand-ecc-algo: see nand.txt. This property may be added when using
> +  hardware ECC for clarification but will be ignored by the driver
> +  because ECC mode is chosen depending on the page size and the strength
> +  required by the NAND chip. This value may be overwritten with
> +  nand-ecc-strength property.
> +- nand-ecc-strength: see nand.txt.
> +- nand-ecc-step-size: see nand.txt. This has no effect and will be
> +  ignored by the driver when using hardware ECC because Marvell's NAND
> +  flash controller does use fixed strength (1-bit for Hamming, 16-bit
> +  for BCH), so the step size will shrink or grow in order to fit the
> +  required strength. Step sizes are not completely random for all and
> +  follow certain patterns described in AN-379, "Marvell SoC NFC ECC".
> +
> +See Documentation/devicetree/bindings/mtd/nand.txt for more details on
> +generic bindings.
> +
> +
> +Example:
> +nand_controller: nand-controller at d0000 {
> +	compatible = "marvell,armada370-nand-controller";
> +	reg = <0xd0000 0x54>;
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
> +	clocks = <&coredivclk 0>;
> +
> +	nand at 0 {
> +		reg = <0>;
> +		marvell,rb = <0>;
> +		nand-ecc-mode = "hw";
> +		marvell,nand-keep-config;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition at 0 {
> +				label = "Rootfs";
> +				reg = <0x00000000 0x40000000>;
> +			};
> +		};
> +	};
> +};

Maybe you should also give an example for the old bindings.
BTW, given your properties description, it's not clear which properties
are deprecated. Maybe you should split the doc in 2 sections: one
describing the new bindings, and the other one describing the deprecated
bindings.

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-09 23:27     ` Ezequiel Garcia
  -1 siblings, 0 replies; 126+ messages in thread
From: Ezequiel Garcia @ 2017-12-09 23:27 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas

Miquel,

On 7 December 2017 at 17:18, Miquel Raynal
<miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> Hi,
>
> After the addition of the NAND framework ->exec_op() interface (see [1]
> for the series preparing it and [2] for the last version of the
> core-side implementation of ->exec_op() itself), this series replaces
> the current Marvell NAND controller driver pxa3xx_nand.c with a rework
> called marvell_nand.c.
>

Nice to see this effort!

Unfortunately, I don't much time to spend reviewing this, but I'm super
happy to see a new driver fixing all the nasty issues the current one has.

Cheers,
-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-09 23:27     ` Ezequiel Garcia
  0 siblings, 0 replies; 126+ messages in thread
From: Ezequiel Garcia @ 2017-12-09 23:27 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia, Thomas Petazzoni, devicetree, Antoine Tenart,
	Nadav Haklai, linux-mtd, Neta Zur Hershkovits, Hanna Hawa,
	Ofer Heifetz, linux-arm-kernel

Miquel,

On 7 December 2017 at 17:18, Miquel Raynal
<miquel.raynal@free-electrons.com> wrote:
> Hi,
>
> After the addition of the NAND framework ->exec_op() interface (see [1]
> for the series preparing it and [2] for the last version of the
> core-side implementation of ->exec_op() itself), this series replaces
> the current Marvell NAND controller driver pxa3xx_nand.c with a rework
> called marvell_nand.c.
>

Nice to see this effort!

Unfortunately, I don't much time to spend reviewing this, but I'm super
happy to see a new driver fixing all the nasty issues the current one has.

Cheers,
-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-09 23:27     ` Ezequiel Garcia
  0 siblings, 0 replies; 126+ messages in thread
From: Ezequiel Garcia @ 2017-12-09 23:27 UTC (permalink / raw)
  To: linux-arm-kernel

Miquel,

On 7 December 2017 at 17:18, Miquel Raynal
<miquel.raynal@free-electrons.com> wrote:
> Hi,
>
> After the addition of the NAND framework ->exec_op() interface (see [1]
> for the series preparing it and [2] for the last version of the
> core-side implementation of ->exec_op() itself), this series replaces
> the current Marvell NAND controller driver pxa3xx_nand.c with a rework
> called marvell_nand.c.
>

Nice to see this effort!

Unfortunately, I don't much time to spend reviewing this, but I'm super
happy to see a new driver fixing all the nasty issues the current one has.

Cheers,
-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
  2017-12-07 20:18     ` Miquel Raynal
@ 2017-12-11 16:27         ` Ezequiel Garcia
  -1 siblings, 0 replies; 126+ messages in thread
From: Ezequiel Garcia @ 2017-12-11 16:27 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas

On 7 December 2017 at 17:18, Miquel Raynal
<miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> Add marvell_nand driver which aims at replacing the existing pxa3xx_nand
> driver.
>
> The new driver intends to be easier to understand and follows the brand
> new NAND framework rules by implementing hooks for every pattern the
> controller might support and referencing them inside a parser object
> that will be given to the core at each ->exec_op() call.
>
> Raw accessors are implemented, useful to test/debug memory/filesystem
> corruptions. Userspace binaries contained in the mtd-utils package may
> now be used and their output trusted.
>
> Timings may not be kept from the bootloader anymore, the timings used
> for instance in U-Boot were not optimal and it supposed to have NAND
> support (and initialized) in the bootloader.
>
> Thanks to the improved timings, implementation of ONFI mode 5 support
> (with EDO managed by adding a delay on data sampling), merging the
> commands together and optimizing writes in the command registers, the
> new driver may achieve faster throughputs in both directions.
> Measurements show an improvement of about +23% read throughput and +24%
> write throughput. These measurements have been done with an
> Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH ECC
> correction) using the userspace tool 'flash_speed' from the MTD test
> suite.
>
> Besides these important topics, the new driver addresses several
> unsolved known issues in the old driver which:
> - did not work with ECC soft neither with ECC none ;
> - relied on naked read/write (which is unchanged) while the NFCv1
>   embedded in the pxa3xx platforms do not implement it, so several
>   NAND commands did not actually ever work without any notice (like
>   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> - wrote the OOB data correctly, but was not able to read it correctly
>   past the first OOB data chunk ;
> - did not displayed ECC bytes ;
> - used device tree bindings that did not allow more than one NAND chip,
>   and did not allow to choose the correct chip select if not
>   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
>
> Old device tree bindings are still supported but deprecated. A more
> hierarchical view has to be used to keep the controller and the NAND
> chip structures clearly separated both inside the device tree and also
> in the driver code.
>

So, is this driver fully compatible with the current pxa3xx-nand driver?

Have you tested with U-Boot's driver (based on the pxa3xx-nand)?

I recally some subtle issues with the fact that U-Boot and Linux had
to agree about the BBT format.

> Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
>  drivers/mtd/nand/Kconfig        |   12 +
>  drivers/mtd/nand/Makefile       |    1 +
>  drivers/mtd/nand/marvell_nand.c | 2951 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 2964 insertions(+)
>  create mode 100644 drivers/mtd/nand/marvell_nand.c
>
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 859eb7790c46..9e141e03f5c2 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -323,6 +323,18 @@ config MTD_NAND_PXA3xx
>           platforms (XP, 370, 375, 38x, 39x) and 64-bit Armada
>           platforms (7K, 8K) (NFCv2).
>
> +config MTD_NAND_MARVELL
> +       tristate "NAND controller support on Marvell boards"
> +       depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
> +                  COMPILE_TEST
> +       depends on HAS_IOMEM
> +       help
> +         This enables the NAND flash controller driver for Marvell boards,
> +         including:
> +         - PXA3xx processors (NFCv1)
> +         - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
> +         - 64-bit Aramda platforms (7k, 8k) (NFCv2)
> +
>  config MTD_NAND_SLC_LPC32XX
>         tristate "NXP LPC32xx SLC Controller"
>         depends on ARCH_LPC32XX
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 118a1349aad3..921634ba400c 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -32,6 +32,7 @@ obj-$(CONFIG_MTD_NAND_OMAP2)          += omap2_nand.o
>  obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)  += omap_elm.o
>  obj-$(CONFIG_MTD_NAND_CM_X270)         += cmx270_nand.o
>  obj-$(CONFIG_MTD_NAND_PXA3xx)          += pxa3xx_nand.o
> +obj-$(CONFIG_MTD_NAND_MARVELL)         += marvell_nand.o
>  obj-$(CONFIG_MTD_NAND_TMIO)            += tmio_nand.o
>  obj-$(CONFIG_MTD_NAND_PLATFORM)                += plat_nand.o
>  obj-$(CONFIG_MTD_NAND_PASEMI)          += pasemi_nand.o
> diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
> new file mode 100644
> index 000000000000..2525d9b2f4fa
> --- /dev/null
> +++ b/drivers/mtd/nand/marvell_nand.c
> @@ -0,0 +1,2951 @@
> +/*
> + * Marvell NAND flash controller driver
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * Copyright (C) 2017 Marvell
> + * Author: Miquel RAYNAL <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> + */
> +
> +#include <linux/module.h>
> +#include <linux/clk.h>
> +#include <linux/mtd/rawnand.h>
> +#include <linux/of_platform.h>
> +#include <linux/iopoll.h>
> +#include <linux/interrupt.h>
> +#include <linux/slab.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
> +#include <asm/unaligned.h>
> +
> +#include <linux/dmaengine.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/dma/pxa-dma.h>
> +#include <linux/platform_data/mtd-nand-pxa3xx.h>
> +
> +/* Data FIFO granularity, FIFO reads/writes must be a multiple of this length */
> +#define FIFO_DEPTH             8
> +#define FIFO_REP(x)            (x / sizeof(u32))
> +#define BCH_SEQ_READS          (32 / FIFO_DEPTH)
> +/* NFC does not support transfers of larger chunks at a time */
> +#define MAX_CHUNK_SIZE         2112
> +/* NFCv1 cannot read more that 7 bytes of ID */
> +#define NFCV1_READID_LEN       7
> +/* Polling is done at a pace of POLL_PERIOD us until POLL_TIMEOUT is reached */
> +#define POLL_PERIOD            0
> +#define POLL_TIMEOUT           100000
> +/* Interrupt maximum wait period in ms */
> +#define IRQ_TIMEOUT            1000
> +/* Latency in clock cycles between SoC pins and NFC logic */
> +#define MIN_RD_DEL_CNT         3
> +/* Maximum number of contiguous address cycles */
> +#define MAX_ADDRESS_CYC_NFCV1  5
> +#define MAX_ADDRESS_CYC_NFCV2  7
> +/* System control registers/bits to enable the NAND controller on some SoCs */
> +#define GENCONF_SOC_DEVICE_MUX 0x208
> +#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
> +#define GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST BIT(20)
> +#define GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST BIT(21)
> +#define GENCONF_SOC_DEVICE_MUX_NFC_INT_EN BIT(25)
> +#define GENCONF_CLK_GATING_CTRL        0x220
> +#define GENCONF_CLK_GATING_CTRL_ND_GATE BIT(2)
> +#define GENCONF_ND_CLK_CTRL    0x700
> +#define GENCONF_ND_CLK_CTRL_EN BIT(0)
> +
> +/* NAND controller data flash control register */
> +#define NDCR                   0x00
> +/* NAND interface timing parameter 0 register */
> +#define NDTR0                  0x04
> +/* NAND interface timing parameter 1 register */
> +#define NDTR1                  0x0C
> +/* NAND controller status register */
> +#define NDSR                   0x14
> +/* NAND ECC control register */
> +#define NDECCCTRL              0x28
> +/* NAND controller data buffer register */
> +#define NDDB                   0x40
> +/* NAND controller command buffer 0 register */
> +#define NDCB0                  0x48
> +/* NAND controller command buffer 1 register */
> +#define NDCB1                  0x4C
> +/* NAND controller command buffer 2 register */
> +#define NDCB2                  0x50
> +/* NAND controller command buffer 3 register */
> +#define NDCB3                  0x54
> +
> +/* Data flash control register bitfields */
> +#define NDCR_ALL_INT           GENMASK(11, 0)
> +#define NDCR_CS1_CMDDM         BIT(7)
> +#define NDCR_CS0_CMDDM         BIT(8)
> +#define NDCR_RDYM              BIT(11)
> +#define NDCR_ND_ARB_EN         BIT(12)
> +#define NDCR_RA_START          BIT(15)
> +#define NDCR_RD_ID_CNT(x)      (min_t(unsigned int, x, 0x7) << 16)
> +#define NDCR_PAGE_SZ(x)                (x >= 2048 ? BIT(24) : 0)
> +#define NDCR_DWIDTH_M          BIT(26)
> +#define NDCR_DWIDTH_C          BIT(27)
> +#define NDCR_ND_RUN            BIT(28)
> +#define NDCR_DMA_EN            BIT(29)
> +#define NDCR_ECC_EN            BIT(30)
> +#define NDCR_SPARE_EN          BIT(31)
> +
> +/* NAND interface timing parameter registers bitfields */
> +#define NDTR0_TRP(x)           ((min_t(unsigned int, x, 0xF) & 0x7) << 0)
> +#define NDTR0_TRH(x)           (min_t(unsigned int, x, 0x7) << 3)
> +#define NDTR0_ETRP(x)          ((min_t(unsigned int, x, 0xF) & 0x8) << 3)
> +#define NDTR0_SEL_NRE_EDGE     BIT(7)
> +#define NDTR0_TWP(x)           (min_t(unsigned int, x, 0x7) << 8)
> +#define NDTR0_TWH(x)           (min_t(unsigned int, x, 0x7) << 11)
> +#define NDTR0_TCS(x)           (min_t(unsigned int, x, 0x7) << 16)
> +#define NDTR0_TCH(x)           (min_t(unsigned int, x, 0x7) << 19)
> +#define NDTR0_RD_CNT_DEL(x)    (min_t(unsigned int, x, 0xF) << 22)
> +#define NDTR0_SELCNTR          BIT(26)
> +#define NDTR0_TADL(x)          (min_t(unsigned int, x, 0x1F) << 27)
> +
> +#define NDTR1_TAR(x)           (min_t(unsigned int, x, 0xF) << 0)
> +#define NDTR1_TWHR(x)          (min_t(unsigned int, x, 0xF) << 4)
> +#define NDTR1_TRHW(x)          (min_t(unsigned int, x / 16, 0x3) << 8)
> +#define NDTR1_PRESCALE         BIT(14)
> +#define NDTR1_WAIT_MODE                BIT(15)
> +#define NDTR1_TR(x)            (min_t(unsigned int, x, 0xFFFF) << 16)
> +
> +/* NAND controller status register bitfields */
> +#define NDSR_WRCMDREQ          BIT(0)
> +#define NDSR_RDDREQ            BIT(1)
> +#define NDSR_WRDREQ            BIT(2)
> +#define NDSR_CORERR            BIT(3)
> +#define NDSR_UNCERR            BIT(4)
> +#define NDSR_CMDD(cs)          BIT(8 - cs)
> +#define NDSR_RDY(rb)           BIT(11 + rb)
> +#define NDSR_ERRCNT(x)         ((x >> 16) & 0x1F)
> +
> +/* NAND ECC control register bitfields */
> +#define NDECCTRL_BCH_EN                BIT(0)
> +
> +/* NAND controller command buffer registers bitfields */
> +#define NDCB0_CMD1(x)          ((x & 0xFF) << 0)
> +#define NDCB0_CMD2(x)          ((x & 0xFF) << 8)
> +#define NDCB0_ADDR_CYC(x)      ((x & 0x7) << 16)
> +#define NDCB0_DBC              BIT(19)
> +#define NDCB0_CMD_TYPE(x)      ((x & 0x7) << 21)
> +#define NDCB0_CSEL             BIT(24)
> +#define NDCB0_RDY_BYP          BIT(27)
> +#define NDCB0_LEN_OVRD         BIT(28)
> +#define NDCB0_CMD_XTYPE(x)     ((x & 0x7) << 29)
> +
> +#define NDCB1_COLS(x)          ((x & 0xFFFF) << 0)
> +#define NDCB1_ADDRS(x)         (x << 16)
> +
> +#define NDCB2_ADDR5(x)         (((x >> 16) & 0xFF) << 0)
> +
> +#define NDCB3_ADDR6(x)         ((x & 0xFF) << 16)
> +#define NDCB3_ADDR7(x)         ((x & 0xFF) << 24)
> +
> +/* NAND controller command buffer 0 register 'type' and 'xtype' fields */
> +#define TYPE_READ              0
> +#define TYPE_WRITE             1
> +#define TYPE_ERASE             2
> +#define TYPE_READ_ID           3
> +#define TYPE_STATUS            4
> +#define TYPE_RESET             5
> +#define TYPE_NAKED_CMD         6
> +#define TYPE_NAKED_ADDR                7
> +#define TYPE_MASK              7
> +#define XTYPE_MONOLITHIC_RW    0
> +#define XTYPE_LAST_NAKED_RW    1
> +#define XTYPE_FINAL_COMMAND    3
> +#define XTYPE_READ             4
> +#define XTYPE_WRITE_DISPATCH   4
> +#define XTYPE_NAKED_RW         5
> +#define XTYPE_COMMAND_DISPATCH 6
> +#define XTYPE_MASK             7
> +
> +/*
> + * Marvell ECC engine works differently than the others, in order to limit the
> + * size of the IP, hardware engineers choose to set a fixed strength at 16 bits
> + * per subpage, and depending on a the desired strength needed by the NAND chip,
> + * a particular layout mixing data/spare/ecc is defined, with a possible last
> + * chunk smaller that the others.
> + *
> + * @writesize:         Full page size on which the layout applies
> + * @chunk:             Desired ECC chunk size on which the layout applies
> + * @strength:          Desired ECC strength (per chunk size bytes) on which the
> + *                     layout applies
> + * @full_chunk_cnt:    Number of full-sized chunks, which is the number of
> + *                     repetitions of the pattern:
> + *                     (data_bytes + spare_bytes + ecc_bytes).
> + * @data_bytes:                Number of data bytes per chunk
> + * @spare_bytes:       Number of spare bytes per chunk
> + * @ecc_bytes:         Number of ecc bytes per chunk
> + * @last_chunk_cnt:    If there is a last chunk with a different size than
> + *                     the first ones, the next fields may not be empty
> + * @last_data_bytes:   Number of data bytes in the last chunk
> + * @last_spare_bytes:  Number of spare bytes in the last chunk
> + * @last_ecc_bytes:    Number of ecc bytes in the last chunk
> + */
> +struct marvell_hw_ecc_layout {
> +       /* Constraints */
> +       int writesize;
> +       int chunk;
> +       int strength;
> +       /* Corresponding layout */
> +       int full_chunk_cnt;
> +       int data_bytes;
> +       int spare_bytes;
> +       int ecc_bytes;
> +       int last_chunk_cnt;
> +       int last_data_bytes;
> +       int last_spare_bytes;
> +       int last_ecc_bytes;
> +};
> +
> +#define MARVELL_LAYOUT(ws, dc, ds, fcc, db, sb, eb, lcc, ldb, lsb, leb) \
> +       {                                                               \
> +               .writesize = ws,                                        \
> +               .chunk = dc,                                            \
> +               .strength = ds,                                         \
> +               .full_chunk_cnt = fcc,                                  \
> +               .data_bytes = db,                                       \
> +               .spare_bytes = sb,                                      \
> +               .ecc_bytes = eb,                                        \
> +               .last_chunk_cnt = lcc,                                  \
> +               .last_data_bytes = ldb,                                 \
> +               .last_spare_bytes = lsb,                                \
> +               .last_ecc_bytes = leb,                                  \
> +       }
> +
> +/* Layouts explained in AN-379_Marvell_SoC_NFC_ECC */
> +static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {
> +       MARVELL_LAYOUT(  512,   512,  1,  1,  512,  8,  8,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 2048,   512,  1,  1, 2048, 40, 24,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 2048,   512,  4,  1, 2048, 32, 30,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 4096,   512,  4,  2, 2048, 32, 30,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 4096,   512,  8,  4, 1024,  0, 30,  1,  0, 64, 30),
> +};
> +
> +/*
> + * The Nand Flash Controller has up to 4 CE and 2 RB pins. The CE selection
> + * is made by a field in NDCB0 register, and in another field in NDCB2 register.
> + * The datasheet describes the logic with an error: ADDR5 field is once
> + * declared at the beginning of NDCB2, and another time at its end. Because the
> + * ADDR5 field of NDCB2 may be used by other bytes, it would be more logical
> + * to use the last bit of this field instead of the first ones.
> + *
> + * @cs:                        Wanted CE lane.
> + * @ndcb0_csel:                Value of the NDCB0 register with or without the flag
> + *                     selecting the wanted CE lane. This is set once when
> + *                     the Device Tree is probed.
> + * @rb:                        Ready/Busy pin for the flash chip
> + */
> +struct marvell_nand_chip_sel {
> +       unsigned int cs;
> +       u32 ndcb0_csel;
> +       unsigned int rb;
> +};
> +
> +/*
> + * NAND chip structure: stores NAND chip device related information
> + *
> + * @chip:              Base NAND chip structure
> + * @node:              Used to store NAND chips into a list
> + * @layout             NAND layout when using hardware ECC
> + * @ndtr0              Timing registers 0 value for this NAND chip
> + * @ndtr1              Timing registers 1 value for this NAND chip
> + * @selected_die:      Current active CS
> + * @nsels:             Number of CS lines required by the NAND chip
> + * @sels:              Array of CS lines descriptions
> + */
> +struct marvell_nand_chip {
> +       struct nand_chip chip;
> +       struct list_head node;
> +       const struct marvell_hw_ecc_layout *layout;
> +       u32 ndtr0;
> +       u32 ndtr1;
> +       int addr_cyc;
> +       int selected_die;
> +       unsigned int nsels;
> +       struct marvell_nand_chip_sel sels[0];
> +};
> +
> +static inline struct marvell_nand_chip *to_marvell_nand(struct nand_chip *chip)
> +{
> +       return container_of(chip, struct marvell_nand_chip, chip);
> +}
> +
> +static inline struct marvell_nand_chip_sel *to_nand_sel(struct marvell_nand_chip
> +                                                       *nand)
> +{
> +       return &nand->sels[nand->selected_die];
> +}
> +
> +/*
> + * NAND controller capabilities for distinction between compatible strings
> + *
> + * @max_cs_nb:         Number of Chip Select lines available
> + * @max_rb_nb:         Number of Ready/Busy lines available
> + * @need_system_controller: Indicates if the SoC needs to have access to the
> + *                      system controller (ie. to enable the NAND controller)
> + * @legacy_of_bindings:        Indicates if DT parsing must be done using the old
> + *                     fashion way
> + * @is_nfcv2:          NFCv2 has numerous enhancements compared to NFCv1, ie.
> + *                     BCH error detection and correction algorithm,
> + *                     NDCB3 register has been added
> + * @use_dma:           Use dma for data transfers
> + */
> +struct marvell_nfc_caps {
> +       unsigned int max_cs_nb;
> +       unsigned int max_rb_nb;
> +       bool need_system_controller;
> +       bool legacy_of_bindings;
> +       bool is_nfcv2;
> +       bool use_dma;
> +};
> +
> +/*
> + * NAND controller structure: stores Marvell NAND controller information
> + *
> + * @controller:                Base controller structure
> + * @dev:               Parent device (used to print error messages)
> + * @regs:              NAND controller registers
> + * @ecc_clk:           ECC block clock, two times the NAND controller clock
> + * @complete:          Completion object to wait for NAND controller events
> + * @assigned_cs:       Bitmask describing already assigned CS lines
> + * @chips:             List containing all the NAND chips attached to
> + *                     this NAND controller
> + * @caps:              NAND controller capabilities for each compatible string
> + * @buf:               Controller local buffer to store a part of the read
> + *                     buffer when the read operation was not 8 bytes aligned
> + *                     as is the FIFO.
> + * @buf_pos:           Position in the 'buf' buffer
> + * @dma_chan:          DMA channel (NFCv1 only)
> + * @dma_buf:           32-bit aligned buffer for DMA transfers (NFCv1 only)
> + */
> +struct marvell_nfc {
> +       struct nand_hw_control controller;
> +       struct device *dev;
> +       void __iomem *regs;
> +       struct clk *ecc_clk;
> +       struct completion complete;
> +       unsigned long assigned_cs;
> +       struct list_head chips;
> +       struct nand_chip *selected_chip;
> +       const struct marvell_nfc_caps *caps;
> +
> +       /*
> +        * Buffer handling: @buf will be accessed byte-per-byter but also
> +        * int-per-int when exchanging data with the NAND controller FIFO,
> +        * 32-bit alignment is then required.
> +        */
> +       u8 buf[FIFO_DEPTH] __aligned(sizeof(u32));
> +       int buf_pos;
> +
> +       /* DMA (NFCv1 only) */
> +       bool use_dma;
> +       struct dma_chan *dma_chan;
> +       u8 *dma_buf;
> +};
> +
> +static inline struct marvell_nfc *to_marvell_nfc(struct nand_hw_control *ctrl)
> +{
> +       return container_of(ctrl, struct marvell_nfc, controller);
> +}
> +
> +/*
> + * NAND controller timings expressed in NAND Controller clock cycles
> + *
> + * @tRP:               ND_nRE pulse width
> + * @tRH:               ND_nRE high duration
> + * @tWP:               ND_nWE pulse time
> + * @tWH:               ND_nWE high duration
> + * @tCS:               Enable signal setup time
> + * @tCH:               Enable signal hold time
> + * @tADL:              Address to write data delay
> + * @tAR:               ND_ALE low to ND_nRE low delay
> + * @tWHR:              ND_nWE high to ND_nRE low for status read
> + * @tRHW:              ND_nRE high duration, read to write delay
> + * @tR:                        ND_nWE high to ND_nRE low for read
> + */
> +struct marvell_nfc_timings {
> +       /* NDTR0 fields */
> +       unsigned int tRP;
> +       unsigned int tRH;
> +       unsigned int tWP;
> +       unsigned int tWH;
> +       unsigned int tCS;
> +       unsigned int tCH;
> +       unsigned int tADL;
> +       /* NDTR1 fields */
> +       unsigned int tAR;
> +       unsigned int tWHR;
> +       unsigned int tRHW;
> +       unsigned int tR;
> +};
> +
> +/*
> + * Derives a duration in numbers of clock cycles.
> + *
> + * @ps: Duration in pico-seconds
> + * @period_ns:  Clock period in nano-seconds
> + *
> + * Convert the duration in nano-seconds, then divide by the period and
> + * return the number of clock periods.
> + */
> +#define TO_CYCLES(ps, period_ns) (DIV_ROUND_UP(ps / 1000, period_ns))
> +
> +/*
> + * NAND driver structure filled during the parsing of the ->exec_op() subop
> + * subset of instructions.
> + *
> + * @ndcb:              Array for the values of the NDCBx registers
> + * @cle_ale_delay_ns:  Optional delay after the last CMD or ADDR cycle
> + * @rdy_timeout_ms:    Timeout for waits on Ready/Busy pin
> + * @rdy_delay_ns:      Optional delay after waiting for the RB pin
> + * @data_delay_ns:     Optional delay after the data xfer
> + * @data_instr_idx:    Index of the data instruction in the subop
> + * @data_instr:                Pointer to the data instruction in the subop
> + */
> +struct marvell_nfc_op {
> +       u32 ndcb[4];
> +       unsigned int cle_ale_delay_ns;
> +       unsigned int rdy_timeout_ms;
> +       unsigned int rdy_delay_ns;
> +       unsigned int data_delay_ns;
> +       unsigned int data_instr_idx;
> +       const struct nand_op_instr *data_instr;
> +};
> +
> +/*
> + * Internal helper to conditionnally apply a delay (from the above structure,
> + * most of the time).
> + */
> +static void cond_delay(unsigned int ns)
> +{
> +       if (!ns)
> +               return;
> +
> +       if (ns < 10000)
> +               ndelay(ns);
> +       else
> +               udelay(DIV_ROUND_UP(ns, 1000));
> +}
> +
> +/*
> + * Internal helper to mimic core functions whithout having to distinguish if
> + * this is the first read operation on the page or not and hence choose the
> + * right function.
> + */
> +int read_page_data(struct nand_chip *chip, unsigned int page,
> +                  unsigned int column, void *buf, unsigned int len)
> +{
> +       if (!column)
> +               return nand_read_page_op(chip, page, column, buf, len);
> +       else
> +               return nand_change_read_column_op(chip, column, buf, len,
> +                                                 false);
> +}
> +
> +/*
> + * The controller has many flags that could generate interrupts, most of them
> + * are disabled and polling is used. For the very slow signals, using interrupts
> + * may relax the CPU charge.
> + */
> +static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask)
> +{
> +       u32 reg;
> +
> +       /* Writing 1 disables the interrupt */
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg | int_mask, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask)
> +{
> +       u32 reg;
> +
> +       /* Writing 0 enables the interrupt */
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg & ~int_mask, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask)
> +{
> +       writel_relaxed(int_mask, nfc->regs + NDSR);
> +}
> +
> +/*
> + * The core may ask the controller to use only 8-bit accesses while usually
> + * using 16-bit accesses. Later function may blindly call this one with a
> + * boolean to indicate if 8-bit accesses must be enabled of disabled without
> + * knowing if 16-bit accesses are actually in use.
> + */
> +static void marvell_nfc_force_byte_access(struct nand_chip *chip,
> +                                         bool force_8bit)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr;
> +
> +       if (!(chip->options & NAND_BUSWIDTH_16))
> +               return;
> +
> +       ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (force_8bit)
> +               ndcr &= ~(NDCR_DWIDTH_M | NDCR_DWIDTH_C);
> +       else
> +               ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
> +
> +       writel_relaxed(ndcr, nfc->regs + NDCR);
> +}
> +
> +static int marvell_nfc_wait_ndrun(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 val;
> +       int ret;
> +
> +       /*
> +        * The command is being processed, wait for the ND_RUN bit to be
> +        * cleared by the NFC. If not, we must clear it by hand.
> +        */
> +       ret = readl_relaxed_poll_timeout(nfc->regs + NDCR, val,
> +                                        (val & NDCR_ND_RUN) == 0,
> +                                        POLL_PERIOD, POLL_TIMEOUT);
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout on NAND controller run mode\n");
> +               writel_relaxed(readl_relaxed(nfc->regs + NDCR) & ~NDCR_ND_RUN,
> +                              nfc->regs + NDCR);
> +               return ret;
> +       }
> +
> +       return 0;
> +}
> +
> +/*
> + * Any time a command has to be sent to the controller, the following sequence
> + * has to be followed:
> + * - call marvell_nfc_prepare_cmd()
> + *      -> activate the ND_RUN bit that will kind of 'start a job'
> + *      -> wait the signal indicating the NFC is waiting for a command
> + * - send the command (cmd and address cycles)
> + * - enventually send or receive the data
> + * - call marvell_nfc_end_cmd() with the corresponding flag
> + *      -> wait the flag to be triggered or cancel the job with a timeout
> + *
> + * The following functions are helpers to do this job and keep in the
> + * specialized functions the code that really does the operations.
> + */
> +static int marvell_nfc_prepare_cmd(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr, val;
> +       int ret;
> +
> +       /* Poll ND_RUN and clear NDSR before issuing any command */
> +       ret = marvell_nfc_wait_ndrun(chip);
> +       if (ret) {
> +               dev_err(nfc->dev, "Last operation did not suceed\n");
> +               return ret;
> +       }
> +
> +       ndcr = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(readl_relaxed(nfc->regs + NDSR), nfc->regs + NDSR);
> +
> +       /* Assert ND_RUN bit and wait the NFC to be ready */
> +       writel_relaxed(ndcr | NDCR_ND_RUN, nfc->regs + NDCR);
> +       ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
> +                                        val & NDSR_WRCMDREQ,
> +                                        POLL_PERIOD, POLL_TIMEOUT);
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout on WRCMDRE\n");
> +               return -ETIMEDOUT;
> +       }
> +
> +       /* Command may be written, clear WRCMDREQ status bit */
> +       writel_relaxed(NDSR_WRCMDREQ, nfc->regs + NDSR);
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_send_cmd(struct nand_chip *chip,
> +                                struct marvell_nfc_op *nfc_op)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +       dev_dbg(nfc->dev,
> +               "NDCB0: 0x%08x\nNDCB1: 0x%08x\nNDCB2: 0x%08x\nNDCB3: 0x%08x\n",
> +               nfc_op->ndcb[0], nfc_op->ndcb[1], nfc_op->ndcb[2],
> +               nfc_op->ndcb[3]);
> +
> +       writel_relaxed(to_nand_sel(marvell_nand)->ndcb0_csel | nfc_op->ndcb[0],
> +                      nfc->regs + NDCB0);
> +       writel_relaxed(nfc_op->ndcb[1], nfc->regs + NDCB0);
> +       writel(nfc_op->ndcb[2], nfc->regs + NDCB0);
> +
> +       /*
> +        * Write NDCB0 four times only if LEN_OVRD is set or if ADDR6 or ADDR7
> +        * fields are used (only available on NFCv2).
> +        */
> +       if (nfc_op->ndcb[0] & NDCB0_LEN_OVRD ||
> +           (nfc_op->ndcb[0] & NDCB0_ADDR_CYC(6)) == NDCB0_ADDR_CYC(6)) {
> +               if (nfc->caps->is_nfcv2)
> +                       writel(nfc_op->ndcb[3], nfc->regs + NDCB0);
> +               else
> +                       dev_err(nfc->dev,
> +                               "NDCB3 does not exist on NFCv1 and should not be written\n");
> +       }
> +}
> +
> +static int marvell_nfc_end_cmd(struct nand_chip *chip, int flag,
> +                              const char *label)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 val;
> +       int ret;
> +
> +       ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
> +                                        val & flag,
> +                                        POLL_PERIOD, POLL_TIMEOUT);
> +
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout on %s (NDSR: 0x%08x)\n",
> +                       label, val);
> +               if (nfc->dma_chan)
> +                       dmaengine_terminate_all(nfc->dma_chan);
> +               return ret;
> +       }
> +
> +       /*
> +        * DMA function uses this helper to poll on CMDD bits without wanting
> +        * them to be bleared.
> +        */
> +       if (nfc->use_dma && (readl(nfc->regs + NDCR) & NDCR_DMA_EN))
> +               return 0;
> +
> +       writel_relaxed(flag, nfc->regs + NDSR);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_wait_cmdd(struct nand_chip *chip)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       int cs_flag = NDSR_CMDD(to_nand_sel(marvell_nand)->ndcb0_csel);
> +
> +       return marvell_nfc_end_cmd(chip, cs_flag, "CMDD");
> +}
> +
> +static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       int ret;
> +
> +       /* Timeout is expressed in ms */
> +       if (!timeout_ms)
> +               timeout_ms = IRQ_TIMEOUT;
> +
> +       init_completion(&nfc->complete);
> +
> +       marvell_nfc_enable_int(nfc, NDCR_RDYM);
> +       ret = wait_for_completion_timeout(&nfc->complete,
> +                                         msecs_to_jiffies(timeout_ms));
> +       marvell_nfc_disable_int(nfc, NDCR_RDYM);
> +       marvell_nfc_clear_int(nfc, NDSR_RDY(0) | NDSR_RDY(1));
> +       if (!ret) {
> +               dev_err(nfc->dev, "Timeout waiting for RB signal\n");
> +               return -ETIMEDOUT;
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_select_chip(struct mtd_info *mtd, int die_nr)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr;
> +
> +       if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
> +               return;
> +
> +       if (die_nr < 0 || die_nr >= marvell_nand->nsels) {
> +               nfc->selected_chip = NULL;
> +               marvell_nand->selected_die = -1;
> +               return;
> +       }
> +
> +       /*
> +        * Do not change the timing registers when using the DT property
> +        * marvell,nand-keep-config; in that case ->ndtr0 and ->ndtr1 from the
> +        * marvell_nand structure are supposedly empty.
> +        */
> +       if (marvell_nand->ndtr0 && marvell_nand->ndtr1) {
> +               writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
> +               writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
> +       }
> +
> +       ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       /* Ensure controller is not blocked; also clear some fields */
> +       ndcr &= ~(NDCR_ND_RUN | NDCR_DWIDTH_M | NDCR_DWIDTH_C |
> +                 NDCR_PAGE_SZ(2048));
> +
> +       /* Adapt bus width */
> +       if (chip->options & NAND_BUSWIDTH_16)
> +               ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
> +
> +       /* Page size as seen by the controller, either 512B or 2kiB */
> +       ndcr |= NDCR_PAGE_SZ(mtd->writesize);
> +
> +       /* Update the control register */
> +       writel_relaxed(ndcr,  nfc->regs + NDCR);
> +
> +       /* Also reset the interrupt status register */
> +       marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
> +
> +       nfc->selected_chip = chip;
> +       marvell_nand->selected_die = die_nr;
> +}
> +
> +static irqreturn_t marvell_nfc_isr(int irq, void *dev_id)
> +{
> +       struct marvell_nfc *nfc = dev_id;
> +       u32 st = readl_relaxed(nfc->regs + NDSR);
> +       u32 ien = (~readl_relaxed(nfc->regs + NDCR)) & NDCR_ALL_INT;
> +
> +       /*
> +        * RDY interrupt mask is one bit in NDCR while there are two status
> +        * bit in NDSR (RDY[cs0/cs2] and RDY[cs1/cs3]).
> +        */
> +       if (st & NDSR_RDY(1))
> +               st |= NDSR_RDY(0);
> +
> +       if (!(st & ien))
> +               return IRQ_NONE;
> +
> +       marvell_nfc_disable_int(nfc, st & NDCR_ALL_INT);
> +
> +       if (!(st & (NDSR_RDDREQ | NDSR_WRDREQ | NDSR_WRCMDREQ)))
> +               complete(&nfc->complete);
> +
> +       return IRQ_HANDLED;
> +}
> +
> +/* HW ECC related functions */
> +static void marvell_nfc_enable_hw_ecc(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (!(ndcr & NDCR_ECC_EN)) {
> +               writel(ndcr | NDCR_ECC_EN, nfc->regs + NDCR);
> +
> +               /*
> +                * When enabling BCH, set threshold to 0 to always know the
> +                * number of corrected bitflips.
> +                */
> +               if (chip->ecc.algo == NAND_ECC_BCH)
> +                       writel(NDECCTRL_BCH_EN, nfc->regs + NDECCCTRL);
> +       }
> +}
> +
> +static void marvell_nfc_disable_hw_ecc(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (ndcr & NDCR_ECC_EN) {
> +               writel_relaxed(ndcr & ~NDCR_ECC_EN, nfc->regs + NDCR);
> +               if (chip->ecc.algo == NAND_ECC_BCH)
> +                       writel_relaxed(0, nfc->regs + NDECCCTRL);
> +       }
> +}
> +
> +/*
> + * Enable/disable spare area
> + *
> + * NFCv1 needs it (see Hamming related functions). NFCv2 uses LEN_OVRD and thus
> + * does not need this bit to be set.
> + */
> +static void marvell_nfc_enable_spare(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (!(ndcr & NDCR_SPARE_EN))
> +               writel(ndcr | NDCR_SPARE_EN, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_disable_spare(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (ndcr & NDCR_SPARE_EN)
> +               writel_relaxed(ndcr & ~NDCR_SPARE_EN, nfc->regs + NDCR);
> +}
> +
> +/* DMA related helpers */
> +static void marvell_nfc_enable_dma(struct marvell_nfc *nfc)
> +{
> +       u32 reg;
> +
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg | NDCR_DMA_EN, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_disable_dma(struct marvell_nfc *nfc)
> +{
> +       u32 reg;
> +
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg & ~NDCR_DMA_EN, nfc->regs + NDCR);
> +}
> +
> +/* Read/write PIO/DMA accessors */
> +static int marvell_nfc_xfer_data_dma(struct marvell_nfc *nfc,
> +                                    enum dma_data_direction direction,
> +                                    unsigned int len)
> +{
> +       unsigned int dma_len = min_t(int, ALIGN(len, 32), MAX_CHUNK_SIZE);
> +       struct dma_async_tx_descriptor *tx;
> +       struct scatterlist sg;
> +       dma_cookie_t cookie;
> +       int ret;
> +
> +       marvell_nfc_enable_dma(nfc);
> +       /* Prepare the DMA transfer */
> +       sg_init_one(&sg, nfc->dma_buf, dma_len);
> +       dma_map_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
> +       tx = dmaengine_prep_slave_sg(nfc->dma_chan, &sg, 1,
> +                                    direction == DMA_FROM_DEVICE ?
> +                                    DMA_DEV_TO_MEM : DMA_MEM_TO_DEV,
> +                                    DMA_PREP_INTERRUPT);
> +       if (!tx) {
> +               dev_err(nfc->dev, "Could not prepare DMA S/G list\n");
> +               return -ENXIO;
> +       }
> +
> +       /* Do the task and wait for it to finish */
> +       cookie = dmaengine_submit(tx);
> +       ret = dma_submit_error(cookie);
> +       if (ret)
> +               return -EIO;
> +
> +       dma_async_issue_pending(nfc->dma_chan);
> +       ret = marvell_nfc_wait_cmdd(nfc->selected_chip);
> +       dma_unmap_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
> +       marvell_nfc_disable_dma(nfc);
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout waiting for DMA (status: %d)\n",
> +                       dmaengine_tx_status(nfc->dma_chan, cookie, NULL));
> +               dmaengine_terminate_all(nfc->dma_chan);
> +               return -ETIMEDOUT;
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_xfer_data_in_pio(struct marvell_nfc *nfc, u8 *in,
> +                                       unsigned int len)
> +{
> +       unsigned int last_len = len % FIFO_DEPTH;
> +       unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
> +       int i;
> +
> +       for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
> +               ioread32_rep(nfc->regs + NDDB, in + i, FIFO_REP(FIFO_DEPTH));
> +
> +       if (last_len) {
> +               ioread32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
> +               memcpy(in + last_full_offset, nfc->buf, last_len);
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_xfer_data_out_pio(struct marvell_nfc *nfc, const u8 *out,
> +                                        unsigned int len)
> +{
> +       unsigned int last_len = len % FIFO_DEPTH;
> +       unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
> +       int i;
> +
> +       for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
> +               iowrite32_rep(nfc->regs + NDDB, out + i, FIFO_REP(FIFO_DEPTH));
> +
> +       if (last_len) {
> +               memcpy(nfc->buf, out + last_full_offset, last_len);
> +               iowrite32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_hw_ecc_correct(struct nand_chip *chip,
> +                                      u8 *data, int data_len,
> +                                      u8 *oob, int oob_len,
> +                                      unsigned int *max_bitflips)
> +{
> +       struct mtd_info *mtd = nand_to_mtd(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       int bf = 0;
> +       u32 ndsr;
> +
> +       ndsr = readl_relaxed(nfc->regs + NDSR);
> +
> +       /* Check uncorrectable error flag */
> +       if (ndsr & NDSR_UNCERR) {
> +               writel_relaxed(ndsr, nfc->regs + NDSR);
> +
> +               /*
> +                * Blank pages (all 0xFF) with no ECC are recognized as bad
> +                * because hardware ECC engine expects non-empty ECC values
> +                * in that case, so whenever an uncorrectable error occurs,
> +                * check if the page is actually blank or not.
> +                *
> +                * It is important to check the emptyness only on oob_len,
> +                * which only covers the spare bytes because after a read with
> +                * ECC enabled, the ECC bytes in the buffer have been set by the
> +                * ECC engine, so they are not 0xFF.
> +                */
> +               if (!data)
> +                       data_len = 0;
> +               if (!oob)
> +                       oob_len = 0;
> +               bf = nand_check_erased_ecc_chunk(data, data_len, NULL, 0,
> +                                                oob, oob_len,
> +                                                chip->ecc.strength);
> +               if (bf < 0) {
> +                       mtd->ecc_stats.failed++;
> +                       return;
> +               }
> +       }
> +
> +       /* Check correctable error flag */
> +       if (ndsr & NDSR_CORERR) {
> +               writel_relaxed(ndsr, nfc->regs + NDSR);
> +
> +               if (chip->ecc.algo == NAND_ECC_BCH)
> +                       bf = NDSR_ERRCNT(ndsr);
> +               else
> +                       bf = 1;
> +       }
> +
> +       /*
> +        * Derive max_bitflips either from the number of bitflips detected by
> +        * the hardware ECC engine or by nand_check_erased_ecc_chunk().
> +        */
> +       mtd->ecc_stats.corrected += bf;
> +       *max_bitflips = max_t(unsigned int, *max_bitflips, bf);
> +}
> +
> +/* Hamming read helpers */
> +static int marvell_nfc_hw_ecc_hmg_do_read_page(struct nand_chip *chip, u8 *buf,
> +                                              bool oob_required, bool raw,
> +                                              int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
> +                          NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                          NDCB0_DBC |
> +                          NDCB0_CMD1(NAND_CMD_READ0) |
> +                          NDCB0_CMD2(NAND_CMD_READSTART),
> +               .ndcb[1] = NDCB1_ADDRS(page),
> +               .ndcb[2] = NDCB2_ADDR5(page),
> +       };
> +       unsigned int oob_bytes = 0;
> +       int ret;
> +
> +       /* NFCv2 needs more information about the operation being executed */
> +       if (nfc->caps->is_nfcv2)
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required) {
> +               marvell_nfc_enable_spare(chip);
> +               oob_bytes = lt->spare_bytes;
> +               if (raw)
> +                       oob_bytes += lt->ecc_bytes;
> +       }
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                 "RDDREQ while draining FIFO (data/oob)");
> +       if (ret)
> +               return ret;
> +
> +       /* Read the page then the OOB area */
> +       if (nfc->use_dma) {
> +               marvell_nfc_xfer_data_dma(nfc, DMA_FROM_DEVICE,
> +                                         lt->data_bytes + oob_bytes);
> +               memcpy(buf, nfc->dma_buf, lt->data_bytes);
> +               memcpy(chip->oob_poi + (raw ? 0 : lt->ecc_bytes),
> +                      nfc->dma_buf + lt->data_bytes, oob_bytes);
> +       } else {
> +               marvell_nfc_xfer_data_in_pio(nfc, buf, lt->data_bytes);
> +               marvell_nfc_xfer_data_in_pio(nfc, chip->oob_poi, oob_bytes);
> +       }
> +
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required)
> +               marvell_nfc_disable_spare(chip);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_read_page_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip, u8 *buf,
> +                                               int oob_required, int page)
> +{
> +       return marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, oob_required,
> +                                                  true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_read_page(struct mtd_info *mtd,
> +                                           struct nand_chip *chip,
> +                                           u8 *buf, int oob_required,
> +                                           int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int max_bf = 0;
> +
> +       /*
> +        * Reading/Writing a given page must always be performed with the same
> +        * configuration regarding the state of the SPARE_EN bit or ECC bytes
> +        * will not be present at the same location (writing only data, without
> +        * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
> +        * while writing with the SPARE_EN bit (hence, also writing free OOB
> +        * bytes) will put first the spare bytes then, at the end of the OOB
> +        * area, the ECC bytes. Choices has been made to always read/write OOB
> +        * area (padding with 0xFF is handled by the core for writes).
> +        */
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +       marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, true, false, page);
> +       marvell_nfc_hw_ecc_correct(chip, buf, lt->data_bytes, NULL, 0, &max_bf);
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       /*
> +        * Re-read the OOB area in raw mode to get the ECC bytes if the OOB area
> +        * is needed.
> +        */
> +       if (oob_required)
> +               chip->ecc.read_oob_raw(mtd, chip, page);
> +
> +       return max_bf;
> +}
> +
> +/*
> + * Spare area in Hamming layouts is not protected by the ECC engine (even if
> + * it appears before the ECC bytes when reading), the ->read_oob_raw() function
> + * also stands for ->read_oob().
> + */
> +static int marvell_nfc_hw_ecc_hmg_read_oob_raw(struct mtd_info *mtd,
> +                                              struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       return marvell_nfc_hw_ecc_hmg_do_read_page(chip, chip->data_buf, true,
> +                                                  true, page);
> +}
> +
> +/* Hamming write helpers */
> +static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
> +                                               const u8 *buf,
> +                                               bool oob_required, bool raw,
> +                                               int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) |
> +                          NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                          NDCB0_CMD1(NAND_CMD_SEQIN) |
> +                          NDCB0_CMD2(NAND_CMD_PAGEPROG) |
> +                          NDCB0_DBC,
> +               .ndcb[1] = NDCB1_ADDRS(page),
> +               .ndcb[2] = NDCB2_ADDR5(page),
> +       };
> +       int oob_bytes = 0;
> +       int ret;
> +
> +       /* NFCv2 needs more information about the operation being executed */
> +       if (nfc->caps->is_nfcv2)
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required) {
> +               marvell_nfc_enable_spare(chip);
> +               oob_bytes = lt->spare_bytes;
> +               if (raw)
> +                       oob_bytes += lt->ecc_bytes;
> +       }
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
> +                                 "WRDREQ while loading FIFO (data)");
> +       if (ret)
> +               return ret;
> +
> +       /* Write the page then the OOB area */
> +       if (nfc->use_dma) {
> +               memcpy(nfc->dma_buf, buf, lt->data_bytes);
> +               if (oob_required)
> +                       memcpy(nfc->dma_buf + lt->data_bytes, chip->oob_poi,
> +                              oob_bytes);
> +               marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
> +                                         lt->ecc_bytes + lt->spare_bytes);
> +       } else {
> +               marvell_nfc_xfer_data_out_pio(nfc, buf, lt->data_bytes);
> +               if (oob_required)
> +                       marvell_nfc_xfer_data_out_pio(nfc, chip->oob_poi,
> +                                                     oob_bytes);
> +       }
> +
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       ret = marvell_nfc_wait_op(chip,
> +                                 chip->data_interface.timings.sdr.tPROG_max);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required)
> +               marvell_nfc_disable_spare(chip);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_write_page_raw(struct mtd_info *mtd,
> +                                                struct nand_chip *chip,
> +                                                const u8 *buf,
> +                                                int oob_required, int page)
> +{
> +       return marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, oob_required,
> +                                                   true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_write_page(struct mtd_info *mtd,
> +                                            struct nand_chip *chip,
> +                                            const u8 *buf,
> +                                            int oob_required, int page)
> +{
> +       int ret;
> +
> +       /*
> +        * Reading/Writing a given page must always be performed with the same
> +        * configuration regarding the state of the SPARE_EN bit or ECC bytes
> +        * will not be present at the same location (writing only data, without
> +        * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
> +        * while writing with the SPARE_EN bit (hence, also writing free OOB
> +        * bytes) will put first the spare bytes then, at the end of the OOB
> +        * area, the ECC bytes. Choices has been made to always read/write OOB
> +        * area (padding with 0xFF is handled by the core for writes).
> +        */
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +       ret = marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, true, false,
> +                                                  page);
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       return ret;
> +}
> +
> +/*
> + * Spare area in Hamming layouts is not protected by the ECC engine (even if
> + * it appears before the ECC bytes when reading), the ->write_oob_raw() function
> + * also stands for ->write_oob().
> + */
> +static int marvell_nfc_hw_ecc_hmg_write_oob_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip,
> +                                               int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       memset(chip->data_buf, 0xFF, mtd->writesize);
> +
> +       return marvell_nfc_hw_ecc_hmg_do_write_page(chip, chip->data_buf, true,
> +                                                   true, page);
> +}
> +
> +/* BCH read helpers */
> +static int marvell_nfc_hw_ecc_bch_read_page_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip, u8 *buf,
> +                                               int oob_required, int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       u8 *oob = chip->oob_poi;
> +       int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
> +       int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
> +               (lt->last_chunk_cnt * lt->last_spare_bytes);
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       int ecc_len = lt->ecc_bytes;
> +       int chunk;
> +
> +       if (oob_required)
> +               memset(chip->oob_poi, 0xFF, mtd->oobsize);
> +
> +       nand_read_page_op(chip, page, 0, NULL, 0);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               int offset_in_page = chunk * chunk_size;
> +
> +               /* Update last chunk length */
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +                       ecc_len = lt->last_ecc_bytes;
> +               }
> +
> +               nand_change_read_column_op(chip, offset_in_page, buf,
> +                                          lt->data_bytes, false);
> +               buf += lt->data_bytes;
> +
> +               if (!oob_required)
> +                       continue;
> +
> +               offset_in_page += data_len;
> +               nand_change_read_column_op(chip, offset_in_page,
> +                                          oob + (lt->spare_bytes * chunk),
> +                                          spare_len, false);
> +
> +               offset_in_page += spare_len;
> +               nand_change_read_column_op(chip, offset_in_page,
> +                                          oob + ecc_offset +
> +                                          (ALIGN(lt->ecc_bytes, 32) * chunk),
> +                                          ecc_len, false);
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
> +                                             u8 *data, unsigned int data_len,
> +                                             u8 *spare, unsigned int spare_len,
> +                                             int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int i, ret;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
> +                          NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                          NDCB0_LEN_OVRD,
> +               .ndcb[1] = NDCB1_ADDRS(page),
> +               .ndcb[2] = NDCB2_ADDR5(page),
> +       };
> +
> +       /*
> +        * Reading spare area is mandatory when using HW ECC or read operation
> +        * will trigger uncorrectable ECC errors, but do not read ECC here.
> +        */
> +       nfc_op.ndcb[3] = data_len + spare_len;
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return;
> +
> +       if (chunk == 0)
> +               nfc_op.ndcb[0] |= NDCB0_DBC |
> +                                 NDCB0_CMD1(NAND_CMD_READ0) |
> +                                 NDCB0_CMD2(NAND_CMD_READSTART);
> +
> +       /*
> +        * Trigger the naked read operation only on the last chunk.
> +        * Otherwise, use monolithic read.
> +        */
> +       if (chunk < nchunks - 1)
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
> +       else
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +
> +       /*
> +        * According to the datasheet, when reading from NDDB
> +        * with BCH enabled, after each 32 bytes reads, we
> +        * have to make sure that the NDSR.RDDREQ bit is set.
> +        *
> +        * Drain the FIFO, 8 32-bit reads at a time, and skip
> +        * the polling on the last read.
> +        *
> +        * Length is a multiple of 32 bytes, hence it is a multiple of 8 too.
> +        *
> +        */
> +
> +       for (i = 0; i < data_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
> +               marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                   "RDDREQ while draining FIFO (data)");
> +               marvell_nfc_xfer_data_in_pio(nfc, data,
> +                                            FIFO_DEPTH * BCH_SEQ_READS);
> +               data += FIFO_DEPTH * BCH_SEQ_READS;
> +       }
> +
> +       for (i = 0; i < spare_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
> +               marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                   "RDDREQ while draining FIFO (OOB)");
> +               marvell_nfc_xfer_data_in_pio(nfc, spare,
> +                                            FIFO_DEPTH * BCH_SEQ_READS);
> +               spare += FIFO_DEPTH * BCH_SEQ_READS;
> +       }
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_read_page(struct mtd_info *mtd,
> +                                           struct nand_chip *chip,
> +                                           u8 *buf, int oob_required,
> +                                           int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       u8 *data = buf;
> +       u8 *spare = chip->oob_poi;
> +       int max_bitflips = 0;
> +       int chunk, ecc_offset_in_page, ecc_offset_in_oob_buf, ecc_len;
> +
> +       /*
> +        * With BCH, OOB is not fully used (and thus not read entirely), not
> +        * expected bytes could show up at the end of the OOB buffer if not
> +        * explicitly erased.
> +        */
> +       if (oob_required)
> +               memset(chip->oob_poi, 0xFF, mtd->oobsize);
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               /* Update length for the last chunk */
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +               }
> +
> +               /* Read the chunk and detect number of bitflips */
> +               marvell_nfc_hw_ecc_bch_read_chunk(chip, chunk, data, data_len,
> +                                                 spare, spare_len, page);
> +               marvell_nfc_hw_ecc_correct(chip, data, data_len,
> +                                          spare, spare_len, &max_bitflips);
> +
> +               data += data_len;
> +               spare += spare_len;
> +       }
> +
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       if (!oob_required)
> +               return max_bitflips;
> +
> +       /*
> +        * Re-read ECC bytes without ECC enabled, else it is garbage and it
> +        * fails the ->correct() call.
> +        */
> +       ecc_len = lt->ecc_bytes;
> +       ecc_offset_in_oob_buf =
> +               (lt->full_chunk_cnt * lt->spare_bytes) +
> +               (lt->last_chunk_cnt * lt->last_spare_bytes);
> +       ecc_offset_in_page = lt->data_bytes + lt->spare_bytes;
> +
> +       for (chunk = 0; chunk < nchunks;) {
> +               /* Do the actual raw read of the ECC bytes */
> +               nand_change_read_column_op(chip, ecc_offset_in_page,
> +                                          chip->oob_poi + ecc_offset_in_oob_buf,
> +                                          ecc_len, false);
> +
> +               chunk++;
> +
> +               /* When using a "last chunk", the ECC size might vary */
> +               if (chunk >= lt->full_chunk_cnt)
> +                       ecc_len = lt->last_ecc_bytes;
> +
> +               /* Increment the offsets where ECC will be read and written */
> +               ecc_offset_in_oob_buf += ALIGN(lt->ecc_bytes, 32);
> +               ecc_offset_in_page += lt->ecc_bytes;
> +               if (chunk < lt->full_chunk_cnt)
> +                       ecc_offset_in_page += lt->data_bytes + lt->spare_bytes;
> +               else
> +                       ecc_offset_in_page += lt->last_data_bytes +
> +                               lt->last_spare_bytes;
> +       }
> +
> +       return max_bitflips;
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_read_oob_raw(struct mtd_info *mtd,
> +                                              struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       return chip->ecc.read_page_raw(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_read_oob(struct mtd_info *mtd,
> +                                          struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       return chip->ecc.read_page(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +/* BCH write helpers */
> +static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
> +                                                struct nand_chip *chip,
> +                                                const u8 *buf,
> +                                                int oob_required, int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       int ecc_len = lt->ecc_bytes;
> +       int oob_len = spare_len + ecc_len;
> +       int spare_offset = 0;
> +       int ecc_offset =
> +               (lt->full_chunk_cnt * lt->spare_bytes) +
> +               (lt->last_chunk_cnt * lt->last_spare_bytes);
> +       int chunk;
> +
> +       nand_prog_page_begin_op(chip, page, 0, NULL, 0);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +                       ecc_len = lt->last_ecc_bytes;
> +                       oob_len = spare_len + ecc_len;
> +               }
> +
> +               /* Point to the column of the next chunk */
> +               nand_change_write_column_op(chip, chunk * full_chunk_size,
> +                                           NULL, 0, false);
> +
> +               /* Write the data */
> +               nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
> +                                  data_len, false);
> +
> +               if (!oob_required)
> +                       continue;
> +
> +               /* Write the spare bytes */
> +               if (spare_len)
> +                       nand_write_data_op(chip, chip->oob_poi + spare_offset,
> +                                          spare_len, false);
> +
> +               /* Write the ECC bytes */
> +               if (ecc_len)
> +                       nand_write_data_op(chip, chip->oob_poi + ecc_offset,
> +                                          ecc_len, false);
> +
> +               spare_offset += spare_len;
> +               ecc_offset += ALIGN(ecc_len, 32);
> +       }
> +
> +       return nand_prog_page_end_op(chip);
> +}
> +
> +static int
> +marvell_nfc_hw_ecc_bch_write_chunk(struct nand_chip *chip, int chunk,
> +                                  const u8 *data, unsigned int data_len,
> +                                  const u8 *spare, unsigned int spare_len,
> +                                  int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int ret;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) | NDCB0_LEN_OVRD,
> +               .ndcb[3] = data_len + spare_len,
> +       };
> +
> +       /*
> +        * First operation dispatches the CMD_SEQIN command, issue the address
> +        * cycles and asks for the first chunk of data.
> +        * All operations in the middle (if any) will issue a naked write and
> +        * also ask for data.
> +        * Last operation dispatches the PAGEPROG command and also asks for the
> +        * last chunk of data.
> +        */
> +       if (chunk == 0) {
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_WRITE_DISPATCH) |
> +                                 NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                                 NDCB0_CMD1(NAND_CMD_SEQIN);
> +               nfc_op.ndcb[1] |= NDCB1_ADDRS(page);
> +               nfc_op.ndcb[2] |= NDCB2_ADDR5(page);
> +       } else if (chunk < nchunks - 1) {
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_NAKED_RW);
> +       } else {
> +               nfc_op.ndcb[0] |= NDCB0_CMD2(NAND_CMD_PAGEPROG) | NDCB0_DBC |
> +                                 NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +       }
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
> +                                 "WRDREQ while loading FIFO (data)");
> +       if (ret)
> +               return ret;
> +
> +       /* Transfer the contents */
> +       iowrite32_rep(nfc->regs + NDDB, data, FIFO_REP(data_len));
> +       iowrite32_rep(nfc->regs + NDDB, spare, FIFO_REP(spare_len));
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_write_page(struct mtd_info *mtd,
> +                                            struct nand_chip *chip,
> +                                            const u8 *buf,
> +                                            int oob_required, int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       const u8 *data = buf;
> +       const u8 *spare = chip->oob_poi;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       int chunk, ret;
> +
> +       /* Spare data will be written anyway, so clear it to avoid garbage */
> +       if (!oob_required)
> +               memset(chip->oob_poi, 0xFF, mtd->oobsize);
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +               }
> +
> +               marvell_nfc_hw_ecc_bch_write_chunk(chip, chunk, data, data_len,
> +                                                  spare, spare_len, page);
> +               data += data_len;
> +               spare += spare_len;
> +
> +               /*
> +                * Waiting only for CMDD or PAGED is not enough, ECC are
> +                * partially written. No flag is set once the operation is
> +                * really finished but the ND_RUN bit is cleared, so wait for it
> +                * before stepping into the next command.
> +                */
> +               marvell_nfc_wait_ndrun(chip);
> +       }
> +
> +       ret = marvell_nfc_wait_op(chip,
> +                                 chip->data_interface.timings.sdr.tPROG_max);
> +
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       if (ret)
> +               return ret;
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_write_oob_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip,
> +                                               int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       memset(chip->data_buf, 0xFF, mtd->writesize);
> +
> +       return chip->ecc.write_page_raw(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_write_oob(struct mtd_info *mtd,
> +                                           struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       memset(chip->data_buf, 0xFF, mtd->writesize);
> +
> +       return chip->ecc.write_page(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +/* NAND framework ->exec_op() hooks and related helpers */
> +static void marvell_nfc_parse_instructions(struct nand_chip *chip,
> +                                          const struct nand_subop *subop,
> +                                          struct marvell_nfc_op *nfc_op)
> +{
> +       const struct nand_op_instr *instr = NULL;
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       bool first_cmd = true;
> +       unsigned int op_id;
> +       int i;
> +
> +       /* Reset the input structure as most of its fields will be OR'ed */
> +       memset(nfc_op, 0, sizeof(struct marvell_nfc_op));
> +
> +       for (op_id = 0; op_id < subop->ninstrs; op_id++) {
> +               unsigned int offset, naddrs;
> +               const u8 *addrs;
> +               int len = nand_subop_get_data_len(subop, op_id);
> +
> +               instr = &subop->instrs[op_id];
> +
> +               switch (instr->type) {
> +               case NAND_OP_CMD_INSTR:
> +                       if (first_cmd)
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD1(instr->ctx.cmd.opcode);
> +                       else
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD2(instr->ctx.cmd.opcode) |
> +                                       NDCB0_DBC;
> +
> +                       nfc_op->cle_ale_delay_ns = instr->delay_ns;
> +                       first_cmd = false;
> +                       break;
> +
> +               case NAND_OP_ADDR_INSTR:
> +                       offset = nand_subop_get_addr_start_off(subop, op_id);
> +                       naddrs = nand_subop_get_num_addr_cyc(subop, op_id);
> +                       addrs = &instr->ctx.addr.addrs[offset];
> +
> +                       nfc_op->ndcb[0] |= NDCB0_ADDR_CYC(naddrs);
> +
> +                       for (i = 0; i < min_t(unsigned int, 4, naddrs); i++)
> +                               nfc_op->ndcb[1] |= addrs[i] << (8 * i);
> +
> +                       if (naddrs >= 5)
> +                               nfc_op->ndcb[2] |= NDCB2_ADDR5(addrs[5]);
> +                       if (naddrs >= 6)
> +                               nfc_op->ndcb[3] |= NDCB3_ADDR6(addrs[6]);
> +                       if (naddrs == 7)
> +                               nfc_op->ndcb[3] |= NDCB3_ADDR7(addrs[7]);
> +
> +                       nfc_op->cle_ale_delay_ns = instr->delay_ns;
> +                       break;
> +
> +               case NAND_OP_DATA_IN_INSTR:
> +                       nfc_op->data_instr = instr;
> +                       nfc_op->data_instr_idx = op_id;
> +                       nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ);
> +                       if (nfc->caps->is_nfcv2) {
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
> +                                       NDCB0_LEN_OVRD;
> +                               nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
> +                       }
> +                       nfc_op->data_delay_ns = instr->delay_ns;
> +                       break;
> +
> +               case NAND_OP_DATA_OUT_INSTR:
> +                       nfc_op->data_instr = instr;
> +                       nfc_op->data_instr_idx = op_id;
> +                       nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE);
> +                       if (nfc->caps->is_nfcv2) {
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
> +                                       NDCB0_LEN_OVRD;
> +                               nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
> +                       }
> +                       nfc_op->data_delay_ns = instr->delay_ns;
> +                       break;
> +
> +               case NAND_OP_WAITRDY_INSTR:
> +                       nfc_op->rdy_timeout_ms = instr->ctx.waitrdy.timeout_ms;
> +                       nfc_op->rdy_delay_ns = instr->delay_ns;
> +                       break;
> +               }
> +       }
> +}
> +
> +static int marvell_nfc_xfer_data_pio(struct nand_chip *chip,
> +                                    const struct nand_subop *subop,
> +                                    struct marvell_nfc_op *nfc_op)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct nand_op_instr *instr = nfc_op->data_instr;
> +       unsigned int op_id = nfc_op->data_instr_idx;
> +       unsigned int len = nand_subop_get_data_len(subop, op_id);
> +       unsigned int offset = nand_subop_get_data_start_off(subop, op_id);
> +       bool reading = (instr->type == NAND_OP_DATA_IN_INSTR);
> +       int ret;
> +
> +       if (instr->ctx.data.force_8bit)
> +               marvell_nfc_force_byte_access(chip, true);
> +
> +       if (reading) {
> +               u8 *in = instr->ctx.data.buf.in + offset;
> +
> +               ret = marvell_nfc_xfer_data_in_pio(nfc, in, len);
> +       } else {
> +               const u8 *out = instr->ctx.data.buf.out + offset;
> +
> +               ret = marvell_nfc_xfer_data_out_pio(nfc, out, len);
> +       }
> +
> +       if (instr->ctx.data.force_8bit)
> +               marvell_nfc_force_byte_access(chip, false);
> +
> +       return ret;
> +}
> +
> +static int marvell_nfc_monolithic_access_exec(struct nand_chip *chip,
> +                                             const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       bool reading;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       reading = (nfc_op.data_instr->type == NAND_OP_DATA_IN_INSTR);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
> +                                 "RDDREQ/WRDREQ while draining raw data");
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       if (reading) {
> +               if (nfc_op.rdy_timeout_ms) {
> +                       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +                       if (ret)
> +                               return ret;
> +               }
> +
> +               cond_delay(nfc_op.rdy_delay_ns);
> +       }
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.data_delay_ns);
> +
> +       if (!reading) {
> +               if (nfc_op.rdy_timeout_ms) {
> +                       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +                       if (ret)
> +                               return ret;
> +               }
> +
> +               cond_delay(nfc_op.rdy_delay_ns);
> +       }
> +
> +       /*
> +        * NDCR ND_RUN bit should be cleared automatically at the end of each
> +        * operation but experience shows that the behavior is buggy when it
> +        * comes to writes (with LEN_OVRD). Clear it by hand in this case.
> +        */
> +       if (!reading) {
> +               struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +               writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
> +                              nfc->regs + NDCR);
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_naked_access_exec(struct nand_chip *chip,
> +                                        const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +
> +       /*
> +        * Naked access are different in that they need to be flagged as naked
> +        * by the controller. Reset the controller registers fields that inform
> +        * on the type and refill them according to the ongoing operation.
> +        */
> +       nfc_op.ndcb[0] &= ~(NDCB0_CMD_TYPE(TYPE_MASK) |
> +                           NDCB0_CMD_XTYPE(XTYPE_MASK));
> +       switch (subop->instrs[0].type) {
> +       case NAND_OP_CMD_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_CMD);
> +               break;
> +       case NAND_OP_ADDR_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_ADDR);
> +               break;
> +       case NAND_OP_DATA_IN_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ) |
> +                                 NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +               break;
> +       case NAND_OP_DATA_OUT_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE) |
> +                                 NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +               break;
> +       default:
> +               /* This should never happen */
> +               break;
> +       }
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +
> +       if (!nfc_op.data_instr) {
> +               ret = marvell_nfc_wait_cmdd(chip);
> +               cond_delay(nfc_op.cle_ale_delay_ns);
> +               return ret;
> +       }
> +
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
> +                                 "RDDREQ/WRDREQ while draining raw data");
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       /*
> +        * NDCR ND_RUN bit should be cleared automatically at the end of each
> +        * operation but experience shows that the behavior is buggy when it
> +        * comes to writes (with LEN_OVRD). Clear it by hand in this case.
> +        */
> +       if (subop->instrs[0].type == NAND_OP_DATA_OUT_INSTR) {
> +               struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +               writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
> +                              nfc->regs + NDCR);
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_naked_waitrdy_exec(struct nand_chip *chip,
> +                                         const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +
> +       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       return ret;
> +}
> +
> +static int marvell_nfc_read_id_type_exec(struct nand_chip *chip,
> +                                        const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ_ID);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                 "RDDREQ while reading ID");
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       if (nfc_op.rdy_timeout_ms) {
> +               ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +               if (ret)
> +                       return ret;
> +       }
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.data_delay_ns);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_read_status_exec(struct nand_chip *chip,
> +                                       const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_STATUS);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                 "RDDREQ while reading status");
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       if (nfc_op.rdy_timeout_ms) {
> +               ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +               if (ret)
> +                       return ret;
> +       }
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.data_delay_ns);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_reset_cmd_type_exec(struct nand_chip *chip,
> +                                          const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_RESET);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_erase_cmd_type_exec(struct nand_chip *chip,
> +                                          const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_ERASE);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       return 0;
> +}
> +
> +static const struct nand_op_parser marvell_nfcv2_op_parser = NAND_OP_PARSER(
> +       /* Monolithic reads/writes */
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_monolithic_access_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(true, MAX_ADDRESS_CYC_NFCV2),
> +               NAND_OP_PARSER_PAT_CMD_ELEM(true),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(true),
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_monolithic_access_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2),
> +               NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE),
> +               NAND_OP_PARSER_PAT_CMD_ELEM(true),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(true)),
> +       /* Naked commands */
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_waitrdy_exec,
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       );
> +
> +static const struct nand_op_parser marvell_nfcv1_op_parser = NAND_OP_PARSER(
> +       /* Naked commands not supported, use a function for each pattern */
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_read_id_type_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 8)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_erase_cmd_type_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_read_status_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 1)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_reset_cmd_type_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_waitrdy_exec,
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       );
> +
> +static int marvell_nfc_exec_op(struct nand_chip *chip,
> +                              const struct nand_operation *op,
> +                              bool check_only)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +       if (nfc->caps->is_nfcv2)
> +               return nand_op_parser_exec_op(chip, &marvell_nfcv2_op_parser,
> +                                             op, check_only);
> +       else
> +               return nand_op_parser_exec_op(chip, &marvell_nfcv1_op_parser,
> +                                             op, check_only);
> +}
> +
> +/*
> + * HW ECC layouts, identical to old pxa3xx_nand driver,
> + * to be fully backward compatible.
> + */
> +static int marvell_nand_ooblayout_ecc(struct mtd_info *mtd, int section,
> +                                     struct mtd_oob_region *oobregion)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt;
> +
> +       if (section >= nchunks)
> +               return -ERANGE;
> +
> +       oobregion->offset = ((lt->spare_bytes + lt->ecc_bytes) * section) +
> +               lt->spare_bytes;
> +       oobregion->length = lt->ecc_bytes;
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_ooblayout_free(struct mtd_info *mtd, int section,
> +                                      struct mtd_oob_region *oobregion)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt;
> +
> +       if (section >= nchunks)
> +               return -ERANGE;
> +
> +       if (!lt->spare_bytes)
> +               return 0;
> +
> +       oobregion->offset = section * (lt->spare_bytes + lt->ecc_bytes);
> +       oobregion->length = lt->spare_bytes;
> +       if (!section) {
> +               /*
> +                * Bootrom looks in bytes 0 & 5 for bad blocks for the
> +                * 4KB page / 4bit BCH combination.
> +                */
> +               if (mtd->writesize == 4096 && lt->data_bytes == 2048) {
> +                       oobregion->offset += 6;
> +                       oobregion->length -= 6;
> +               } else {
> +                       oobregion->offset += 2;
> +                       oobregion->length -= 2;
> +               }
> +       }
> +
> +       return 0;
> +}
> +
> +static const struct mtd_ooblayout_ops marvell_nand_ooblayout_ops = {
> +       .ecc = marvell_nand_ooblayout_ecc,
> +       .free = marvell_nand_ooblayout_free,
> +};
> +
> +static int marvell_nand_hw_ecc_ctrl_init(struct mtd_info *mtd,
> +                                        struct nand_ecc_ctrl *ecc)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *l;
> +       int i;
> +
> +       if (!nfc->caps->is_nfcv2 &&
> +           (mtd->writesize + mtd->oobsize > MAX_CHUNK_SIZE)) {
> +               dev_err(nfc->dev,
> +                       "NFCv1: writesize (%d) cannot be bigger than a chunk (%d)\n",
> +                       mtd->writesize, MAX_CHUNK_SIZE - mtd->oobsize);
> +               return -ENOTSUPP;
> +       }
> +
> +       to_marvell_nand(chip)->layout = NULL;
> +       for (i = 0; i < ARRAY_SIZE(marvell_nfc_layouts); i++) {
> +               l = &marvell_nfc_layouts[i];
> +               if (mtd->writesize == l->writesize &&
> +                   ecc->size == l->chunk && ecc->strength == l->strength) {
> +                       to_marvell_nand(chip)->layout = l;
> +                       break;
> +               }
> +       }
> +
> +       if (!to_marvell_nand(chip)->layout ||
> +           (!nfc->caps->is_nfcv2 && ecc->strength > 1)) {
> +               dev_err(nfc->dev,
> +                       "ECC strength %d at page size %d is not supported\n",
> +                       ecc->strength, mtd->writesize);
> +               return -ENOTSUPP;
> +       }
> +
> +       mtd_set_ooblayout(mtd, &marvell_nand_ooblayout_ops);
> +       ecc->steps = l->full_chunk_cnt + l->last_chunk_cnt;
> +       ecc->size = l->data_bytes;
> +
> +       if (ecc->strength == 1) {
> +               chip->ecc.algo = NAND_ECC_HAMMING;
> +               ecc->read_page_raw = marvell_nfc_hw_ecc_hmg_read_page_raw;
> +               ecc->read_page = marvell_nfc_hw_ecc_hmg_read_page;
> +               ecc->read_oob_raw = marvell_nfc_hw_ecc_hmg_read_oob_raw;
> +               ecc->read_oob = ecc->read_oob_raw;
> +               ecc->write_page_raw = marvell_nfc_hw_ecc_hmg_write_page_raw;
> +               ecc->write_page = marvell_nfc_hw_ecc_hmg_write_page;
> +               ecc->write_oob_raw = marvell_nfc_hw_ecc_hmg_write_oob_raw;
> +               ecc->write_oob = ecc->write_oob_raw;
> +       } else {
> +               chip->ecc.algo = NAND_ECC_BCH;
> +               ecc->strength = 16;
> +               ecc->read_page_raw = marvell_nfc_hw_ecc_bch_read_page_raw;
> +               ecc->read_page = marvell_nfc_hw_ecc_bch_read_page;
> +               ecc->read_oob_raw = marvell_nfc_hw_ecc_bch_read_oob_raw;
> +               ecc->read_oob = marvell_nfc_hw_ecc_bch_read_oob;
> +               ecc->write_page_raw = marvell_nfc_hw_ecc_bch_write_page_raw;
> +               ecc->write_page = marvell_nfc_hw_ecc_bch_write_page;
> +               ecc->write_oob_raw = marvell_nfc_hw_ecc_bch_write_oob_raw;
> +               ecc->write_oob = marvell_nfc_hw_ecc_bch_write_oob;
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_ecc_init(struct mtd_info *mtd,
> +                                struct nand_ecc_ctrl *ecc)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       int ret;
> +
> +       if ((ecc->mode != NAND_ECC_NONE) && (!ecc->size || !ecc->strength)) {
> +               if (chip->ecc_step_ds && chip->ecc_strength_ds) {
> +                       ecc->size = chip->ecc_step_ds;
> +                       ecc->strength = chip->ecc_strength_ds;
> +               } else {
> +                       dev_info(nfc->dev,
> +                                "No minimum ECC strength, using 1b/512B\n");
> +                       ecc->size = 512;
> +                       ecc->strength = 1;
> +               }
> +       }
> +
> +       switch (ecc->mode) {
> +       case NAND_ECC_HW:
> +               ret = marvell_nand_hw_ecc_ctrl_init(mtd, ecc);
> +               if (ret)
> +                       return ret;
> +               break;
> +       case NAND_ECC_NONE:
> +               chip->ecc.algo = 0;
> +       case NAND_ECC_SOFT:
> +               break;
> +       default:
> +               return -EINVAL;
> +       }
> +
> +       return 0;
> +}
> +
> +static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
> +static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
> +
> +static struct nand_bbt_descr bbt_main_descr = {
> +       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
> +                  NAND_BBT_2BIT | NAND_BBT_VERSION,
> +       .offs = 8,
> +       .len = 6,
> +       .veroffs = 14,
> +       .maxblocks = 8, /* Last 8 blocks in each chip */
> +       .pattern = bbt_pattern
> +};
> +
> +static struct nand_bbt_descr bbt_mirror_descr = {
> +       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
> +                  NAND_BBT_2BIT | NAND_BBT_VERSION,
> +       .offs = 8,
> +       .len = 6,
> +       .veroffs = 14,
> +       .maxblocks = 8, /* Last 8 blocks in each chip */
> +       .pattern = bbt_mirror_pattern
> +};
> +
> +static int marvell_nfc_setup_data_interface(struct mtd_info *mtd, int chipnr,
> +                                           const struct nand_data_interface
> +                                           *conf)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       unsigned int period_ns = 1000000000 / clk_get_rate(nfc->ecc_clk) * 2;
> +       const struct nand_sdr_timings *sdr;
> +       struct marvell_nfc_timings nfc_tmg;
> +       int read_delay;
> +
> +       sdr = nand_get_sdr_timings(conf);
> +       if (IS_ERR(sdr))
> +               return PTR_ERR(sdr);
> +
> +       /*
> +        * SDR timings are given in pico-seconds while NFC timings must be
> +        * expressed in NAND controller clock cycles, which is half of the
> +        * frequency of the accessible ECC clock retrieved by clk_get_rate().
> +        * This is not written anywhere in the datasheet but was observed
> +        * with an oscilloscope.
> +        *
> +        * NFC datasheet gives equations from which thoses calculations
> +        * are derived, they tend to be slightly more restrictives than the
> +        * given core timings and may improve the overall speed.
> +        */
> +       nfc_tmg.tRP = TO_CYCLES(DIV_ROUND_UP(sdr->tRC_min, 2), period_ns) - 1;
> +       nfc_tmg.tRH = nfc_tmg.tRP;
> +       nfc_tmg.tWP = TO_CYCLES(DIV_ROUND_UP(sdr->tWC_min, 2), period_ns) - 1;
> +       nfc_tmg.tWH = nfc_tmg.tWP;
> +       nfc_tmg.tCS = TO_CYCLES(sdr->tCS_min, period_ns);
> +       nfc_tmg.tCH = TO_CYCLES(sdr->tCH_min, period_ns) - 1;
> +       nfc_tmg.tADL = TO_CYCLES(sdr->tADL_min, period_ns);
> +       /*
> +        * Read delay is the time of propagation from SoC pins to NFC internal
> +        * logic. With non-EDO timings, this is MIN_RD_DEL_CNT clock cycles. In
> +        * EDO mode, an additional delay of tRH must be taken into account so
> +        * the data is sampled on the falling edge instead of the rising edge.
> +        */
> +       read_delay = sdr->tRC_min >= 30000 ?
> +               MIN_RD_DEL_CNT : MIN_RD_DEL_CNT + nfc_tmg.tRH;
> +
> +       nfc_tmg.tAR = TO_CYCLES(sdr->tAR_min, period_ns);
> +       /*
> +        * tWHR and tRHW are supposed to be read to write delays (and vice
> +        * versa) but in some cases, ie. when doing a change column, they must
> +        * be greater than that to be sure tCCS delay is respected.
> +        */
> +       nfc_tmg.tWHR = TO_CYCLES(max_t(int, sdr->tWHR_min, sdr->tCCS_min),
> +                                period_ns) - 2,
> +       nfc_tmg.tRHW = TO_CYCLES(max_t(int, sdr->tRHW_min, sdr->tCCS_min),
> +                                period_ns);
> +
> +       /* Use WAIT_MODE (wait for RB line) instead of only relying on delays */
> +       nfc_tmg.tR = TO_CYCLES(sdr->tWB_max, period_ns);
> +
> +       if (chipnr < 0)
> +               return 0;
> +
> +       marvell_nand->ndtr0 =
> +               NDTR0_TRP(nfc_tmg.tRP) |
> +               NDTR0_TRH(nfc_tmg.tRH) |
> +               NDTR0_ETRP(nfc_tmg.tRP) |
> +               NDTR0_TWP(nfc_tmg.tWP) |
> +               NDTR0_TWH(nfc_tmg.tWH) |
> +               NDTR0_TCS(nfc_tmg.tCS) |
> +               NDTR0_TCH(nfc_tmg.tCH) |
> +               NDTR0_RD_CNT_DEL(read_delay) |
> +               NDTR0_SELCNTR |
> +               NDTR0_TADL(nfc_tmg.tADL);
> +
> +       marvell_nand->ndtr1 =
> +               NDTR1_TAR(nfc_tmg.tAR) |
> +               NDTR1_TWHR(nfc_tmg.tWHR) |
> +               NDTR1_TRHW(nfc_tmg.tRHW) |
> +               NDTR1_WAIT_MODE |
> +               NDTR1_TR(nfc_tmg.tR);
> +
> +       writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
> +       writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
> +                                 struct device_node *np)
> +{
> +       struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(dev);
> +       struct marvell_nand_chip *marvell_nand;
> +       struct mtd_info *mtd;
> +       struct nand_chip *chip;
> +       int nsels, ret, i;
> +       u32 cs, rb;
> +
> +       /*
> +        * The legacy "num-cs" property indicates the number of CS on the only
> +        * chip connected to the controller (legacy bindings does not support
> +        * more than one chip). CS are only incremented one by one while the RB
> +        * pin is always the #0.
> +        *
> +        * When not using legacy bindings, a couple of "reg" and "marvell,rb"
> +        * properties must be filled. For each chip, expressed as a subnode,
> +        * "reg" points to the CS lines and "marvell,rb" to the RB line.
> +        */
> +       if (pdata) {
> +               nsels = 1;
> +       } else if (nfc->caps->legacy_of_bindings) {
> +               if (!of_get_property(np, "num-cs", &nsels)) {
> +                       dev_err(dev, "missing num-cs property\n");
> +                       return -EINVAL;
> +               }
> +       } else {
> +               if (!of_get_property(np, "reg", &nsels)) {
> +                       dev_err(dev, "missing reg property\n");
> +                       return -EINVAL;
> +               }
> +       }
> +
> +       if (!pdata)
> +               nsels /= sizeof(u32);
> +       if (!nsels) {
> +               dev_err(dev, "invalid reg property size\n");
> +               return -EINVAL;
> +       }
> +
> +       /* Alloc the nand chip structure */
> +       marvell_nand = devm_kzalloc(dev, sizeof(*marvell_nand) +
> +                                   (nsels *
> +                                    sizeof(struct marvell_nand_chip_sel)),
> +                                   GFP_KERNEL);
> +       if (!marvell_nand) {
> +               dev_err(dev, "could not allocate chip structure\n");
> +               return -ENOMEM;
> +       }
> +
> +       marvell_nand->nsels = nsels;
> +       marvell_nand->selected_die = -1;
> +
> +       for (i = 0; i < nsels; i++) {
> +               if (pdata || nfc->caps->legacy_of_bindings) {
> +                       /*
> +                        * Legacy bindings use the CS lines in natural
> +                        * order (0, 1, ...)
> +                        */
> +                       cs = i;
> +               } else {
> +                       /* Retrieve CS id */
> +                       ret = of_property_read_u32_index(np, "reg", i, &cs);
> +                       if (ret) {
> +                               dev_err(dev, "could not retrieve reg property: %d\n",
> +                                       ret);
> +                               return ret;
> +                       }
> +               }
> +
> +               if (cs >= nfc->caps->max_cs_nb) {
> +                       dev_err(dev, "invalid reg value: %u (max CS = %d)\n",
> +                               cs, nfc->caps->max_cs_nb);
> +                       return -EINVAL;
> +               }
> +
> +               if (test_and_set_bit(cs, &nfc->assigned_cs)) {
> +                       dev_err(dev, "CS %d already assigned\n", cs);
> +                       return -EINVAL;
> +               }
> +
> +               /*
> +                * The cs variable represents the chip select id, which must be
> +                * converted in bit fields for NDCB0 and NDCB2 to select the
> +                * right chip. Unfortunately, due to a lack of information on
> +                * the subject and incoherent documentation, the user should not
> +                * use CS1 and CS3 at all as asserting them is not supported in
> +                * a reliable way (due to multiplexing inside ADDR5 field).
> +                */
> +               marvell_nand->sels[i].cs = cs;
> +               switch (cs) {
> +               case 0:
> +               case 2:
> +                       marvell_nand->sels[i].ndcb0_csel = 0;
> +                       break;
> +               case 1:
> +               case 3:
> +                       marvell_nand->sels[i].ndcb0_csel = NDCB0_CSEL;
> +                       break;
> +               default:
> +                       return -EINVAL;
> +               }
> +
> +               /* Retrieve RB id */
> +               if (pdata || nfc->caps->legacy_of_bindings) {
> +                       /* Legacy bindings always use RB #0 */
> +                       rb = 0;
> +               } else {
> +                       ret = of_property_read_u32_index(np, "marvell,rb", i,
> +                                                        &rb);
> +                       if (ret) {
> +                               dev_err(dev,
> +                                       "could not retrieve RB property: %d\n",
> +                                       ret);
> +                               return ret;
> +                       }
> +               }
> +
> +               if (rb >= nfc->caps->max_rb_nb) {
> +                       dev_err(dev, "invalid reg value: %u (max RB = %d)\n",
> +                               rb, nfc->caps->max_rb_nb);
> +                       return -EINVAL;
> +               }
> +
> +               marvell_nand->sels[i].rb = rb;
> +       }
> +
> +       chip = &marvell_nand->chip;
> +       chip->controller = &nfc->controller;
> +       nand_set_flash_node(chip, np);
> +
> +       chip->exec_op = marvell_nfc_exec_op;
> +       chip->select_chip = marvell_nfc_select_chip;
> +       if (nfc->caps->is_nfcv2 &&
> +           !of_property_read_bool(np, "marvell,nand-keep-config"))
> +               chip->setup_data_interface = marvell_nfc_setup_data_interface;
> +
> +       mtd = nand_to_mtd(chip);
> +       mtd->dev.parent = dev;
> +
> +       /*
> +        * Default to HW ECC engine mode. If the nand-ecc-mode property is given
> +        * in the DT node, this entry will be overwritten in nand_scan_ident().
> +        */
> +       chip->ecc.mode = NAND_ECC_HW;
> +
> +       ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
> +       if (ret) {
> +               dev_err(dev, "could not identify the nand chip\n");
> +               return ret;
> +       }
> +
> +       if (pdata && pdata->flash_bbt)
> +               chip->bbt_options |= NAND_BBT_USE_FLASH;
> +
> +       if (chip->bbt_options & NAND_BBT_USE_FLASH) {
> +               /*
> +                * We'll use a bad block table stored in-flash and don't
> +                * allow writing the bad block marker to the flash.
> +                */
> +               chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
> +               chip->bbt_td = &bbt_main_descr;
> +               chip->bbt_md = &bbt_mirror_descr;
> +       }
> +
> +       /*
> +        * With RA_START bit set in NDCR, columns takes two address cycles. This
> +        * means addressing a chip with more than 256 pages needs a fifth
> +        * address cycle. Addressing a chip using CS 2 or 3 should also needs
> +        * this additional cycle but due to insistance in the documentation and
> +        * lack of hardware to test this situation, this case has been dropped
> +        * and is not supported by this driver.
> +        */
> +       marvell_nand->addr_cyc = 4;
> +       if (chip->options & NAND_ROW_ADDR_3)
> +               marvell_nand->addr_cyc = 5;
> +
> +       if (pdata) {
> +               chip->ecc.size = pdata->ecc_step_size;
> +               chip->ecc.strength = pdata->ecc_strength;
> +       }
> +
> +       ret = marvell_nand_ecc_init(mtd, &chip->ecc);
> +       if (ret) {
> +               dev_err(dev, "ECC init failed: %d\n", ret);
> +               return ret;
> +       }
> +
> +       if (chip->ecc.mode == NAND_ECC_HW) {
> +               /*
> +                * Subpage write not available with hardware ECC, prohibit also
> +                * subpage read as in userspace subpage acces would still be
> +                * allowed and subpage write, if used, would lead to numerous
> +                * uncorrectable ECC errors.
> +                */
> +               chip->options |= NAND_NO_SUBPAGE_WRITE;
> +       }
> +
> +       if (pdata || nfc->caps->legacy_of_bindings) {
> +               /*
> +                * We keep the MTD name unchanged to avoid breaking platforms
> +                * where the MTD cmdline parser is used and the bootloader
> +                * has not been updated to use the new naming scheme.
> +                */
> +               mtd->name = "pxa3xx_nand-0";
> +       } else if (!mtd->name) {
> +               /*
> +                * If the new bindings are used and the bootloader has not been
> +                * updated to pass a new mtdparts parameter on the cmdline, you
> +                * should define the following property in your NAND node, ie:
> +                *
> +                *      label = "main-storage";
> +                *
> +                * This way, mtd->name will be set by the core when
> +                * nand_set_flash_node() is called.
> +                */
> +               mtd->name = devm_kasprintf(nfc->dev, GFP_KERNEL,
> +                                          "%s:nand.%d", dev_name(nfc->dev),
> +                                          marvell_nand->sels[0].cs);
> +               if (!mtd->name) {
> +                       dev_err(nfc->dev, "Failed to allocate mtd->name\n");
> +                       return -ENOMEM;
> +               }
> +       }
> +
> +       ret = nand_scan_tail(mtd);
> +       if (ret) {
> +               dev_err(dev, "nand_scan_tail failed: %d\n", ret);
> +               return ret;
> +       }
> +
> +       if (pdata)
> +               /* Legacy bindings support only one chip */
> +               ret = mtd_device_register(mtd, pdata->parts[0],
> +                                         pdata->nr_parts[0]);
> +       else
> +               ret = mtd_device_register(mtd, NULL, 0);
> +       if (ret) {
> +               dev_err(dev, "failed to register mtd device: %d\n", ret);
> +               nand_release(mtd);
> +               return ret;
> +       }
> +
> +       list_add_tail(&marvell_nand->node, &nfc->chips);
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_chips_init(struct device *dev, struct marvell_nfc *nfc)
> +{
> +       struct device_node *np = dev->of_node;
> +       struct device_node *nand_np;
> +       int max_cs = nfc->caps->max_cs_nb;
> +       int nchips;
> +       int ret;
> +
> +       if (!np)
> +               nchips = 1;
> +       else
> +               nchips = of_get_child_count(np);
> +
> +       if (nchips > max_cs) {
> +               dev_err(dev, "too many NAND chips: %d (max = %d CS)\n", nchips,
> +                       max_cs);
> +               return -EINVAL;
> +       }
> +
> +       /*
> +        * Legacy bindings do not use child nodes to exhibit NAND chip
> +        * properties and layout. Instead, NAND properties are mixed with the
> +        * controller's and a single subnode presents the memory layout.
> +        */
> +       if (nfc->caps->legacy_of_bindings) {
> +               ret = marvell_nand_chip_init(dev, nfc, np);
> +               return ret;
> +       }
> +
> +       for_each_child_of_node(np, nand_np) {
> +               ret = marvell_nand_chip_init(dev, nfc, nand_np);
> +               if (ret) {
> +                       of_node_put(nand_np);
> +                       return ret;
> +               }
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nand_chips_cleanup(struct marvell_nfc *nfc)
> +{
> +       struct marvell_nand_chip *entry, *temp;
> +
> +       list_for_each_entry_safe(entry, temp, &nfc->chips, node) {
> +               nand_release(nand_to_mtd(&entry->chip));
> +               list_del(&entry->node);
> +       }
> +}
> +
> +static int marvell_nfc_init_dma(struct marvell_nfc *nfc)
> +{
> +       struct platform_device *pdev = container_of(nfc->dev,
> +                                                   struct platform_device,
> +                                                   dev);
> +       struct dma_slave_config config = {};
> +       struct resource *r;
> +       dma_cap_mask_t mask;
> +       struct pxad_param param;
> +       int ret;
> +
> +       if (!IS_ENABLED(CONFIG_PXA_DMA)) {
> +               dev_warn(nfc->dev,
> +                        "DMA not enabled in configuration\n");
> +               return -ENOTSUPP;
> +       }
> +
> +       ret = dma_set_mask_and_coherent(nfc->dev, DMA_BIT_MASK(32));
> +       if (ret)
> +               return ret;
> +
> +       r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
> +       if (!r) {
> +               dev_err(nfc->dev, "No resource defined for data DMA\n");
> +               return -ENXIO;
> +       }
> +
> +       param.drcmr = r->start;
> +       param.prio = PXAD_PRIO_LOWEST;
> +       dma_cap_zero(mask);
> +       dma_cap_set(DMA_SLAVE, mask);
> +       nfc->dma_chan =
> +               dma_request_slave_channel_compat(mask, pxad_filter_fn,
> +                                                &param, nfc->dev,
> +                                                "data");
> +       if (!nfc->dma_chan) {
> +               dev_err(nfc->dev,
> +                       "Unable to request data DMA channel\n");
> +               return -ENODEV;
> +       }
> +
> +       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +       if (!r)
> +               return -ENXIO;
> +
> +       config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> +       config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> +       config.src_addr = r->start + NDDB;
> +       config.dst_addr = r->start + NDDB;
> +       config.src_maxburst = 32;
> +       config.dst_maxburst = 32;
> +       ret = dmaengine_slave_config(nfc->dma_chan, &config);
> +       if (ret < 0) {
> +               dev_err(nfc->dev, "Failed to configure DMA channel\n");
> +               return ret;
> +       }
> +
> +       /*
> +        * DMA must act on length multiple of 32 and this length may be
> +        * bigger than the destination buffer. Use this buffer instead
> +        * for DMA transfers and then copy the desired amount of data to
> +        * the provided buffer.
> +        */
> +       nfc->dma_buf = kmalloc(MAX_CHUNK_SIZE, GFP_DMA);
> +       if (!nfc->dma_buf)
> +               return -ENOMEM;
> +
> +       nfc->use_dma = true;
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_init(struct marvell_nfc *nfc)
> +{
> +       struct device_node *np = nfc->dev->of_node;
> +
> +       /*
> +        * Some SoCs like A7k/A8k need to enable manually the NAND
> +        * controller, gated clocks and reset bits to avoid being bootloader
> +        * dependent. This is done through the use of the System Functions
> +        * registers.
> +        */
> +       if (nfc->caps->need_system_controller) {
> +               struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
> +                       np, "marvell,system-controller");
> +               u32 reg;
> +
> +               if (IS_ERR(sysctrl_base))
> +                       return PTR_ERR(sysctrl_base);
> +
> +               reg = GENCONF_SOC_DEVICE_MUX_NFC_EN |
> +                       GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST |
> +                       GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST |
> +                       GENCONF_SOC_DEVICE_MUX_NFC_INT_EN;
> +               regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
> +
> +               regmap_read(sysctrl_base, GENCONF_CLK_GATING_CTRL, &reg);
> +               reg |= GENCONF_CLK_GATING_CTRL_ND_GATE;
> +               regmap_write(sysctrl_base, GENCONF_CLK_GATING_CTRL, reg);
> +
> +               regmap_read(sysctrl_base, GENCONF_ND_CLK_CTRL, &reg);
> +               reg |= GENCONF_ND_CLK_CTRL_EN;
> +               regmap_write(sysctrl_base, GENCONF_ND_CLK_CTRL, reg);
> +       }
> +
> +       /* Configure the DMA if appropriate */
> +       if (!nfc->caps->is_nfcv2)
> +               marvell_nfc_init_dma(nfc);
> +
> +       /*
> +        * ECC operations and interruptions are only enabled when specifically
> +        * needed. ECC shall not be activated in the early stages (fails probe).
> +        * Arbiter flag, even if marked as "reserved", must be set (empirical).
> +        */
> +       writel_relaxed(NDCR_RA_START | NDCR_ALL_INT | NDCR_ND_ARB_EN |
> +                      (nfc->caps->is_nfcv2 ?
> +                       0 : NDCR_RD_ID_CNT(NFCV1_READID_LEN)),
> +                      nfc->regs + NDCR);
> +       writel_relaxed(0xFFFFFFFF, nfc->regs + NDSR);
> +       writel_relaxed(0, nfc->regs + NDECCCTRL);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_probe(struct platform_device *pdev)
> +{
> +       struct device *dev = &pdev->dev;
> +       struct resource *r;
> +       struct marvell_nfc *nfc;
> +       int ret;
> +       int irq;
> +
> +       nfc = devm_kzalloc(&pdev->dev, sizeof(struct marvell_nfc),
> +                          GFP_KERNEL);
> +       if (!nfc)
> +               return -ENOMEM;
> +
> +       nfc->dev = dev;
> +       nand_hw_control_init(&nfc->controller);
> +       INIT_LIST_HEAD(&nfc->chips);
> +
> +       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +       nfc->regs = devm_ioremap_resource(dev, r);
> +       if (IS_ERR(nfc->regs))
> +               return PTR_ERR(nfc->regs);
> +
> +       irq = platform_get_irq(pdev, 0);
> +       if (irq < 0) {
> +               dev_err(dev, "failed to retrieve irq\n");
> +               return irq;
> +       }
> +
> +       nfc->ecc_clk = devm_clk_get(&pdev->dev, NULL);
> +       if (IS_ERR(nfc->ecc_clk))
> +               return PTR_ERR(nfc->ecc_clk);
> +
> +       ret = clk_prepare_enable(nfc->ecc_clk);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_disable_int(nfc, NDCR_ALL_INT);
> +       marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
> +       ret = devm_request_irq(dev, irq, marvell_nfc_isr,
> +                              0, "marvell-nfc", nfc);
> +       if (ret)
> +               goto unprepare_clk;
> +
> +       /* Get NAND controller capabilities */
> +       if (pdev->id_entry)
> +               nfc->caps = (void *)pdev->id_entry->driver_data;
> +       else
> +               nfc->caps = of_device_get_match_data(&pdev->dev);
> +
> +       if (!nfc->caps) {
> +               dev_err(dev, "Could not retrieve NFC caps\n");
> +               ret = -EINVAL;
> +               goto unprepare_clk;
> +       }
> +
> +       /* Init the controller and then probe the chips */
> +       ret = marvell_nfc_init(nfc);
> +       if (ret)
> +               goto unprepare_clk;
> +
> +       platform_set_drvdata(pdev, nfc);
> +
> +       ret = marvell_nand_chips_init(dev, nfc);
> +       if (ret)
> +               goto unprepare_clk;
> +
> +       return 0;
> +
> +unprepare_clk:
> +       clk_disable_unprepare(nfc->ecc_clk);
> +
> +       return ret;
> +}
> +
> +static int marvell_nfc_remove(struct platform_device *pdev)
> +{
> +       struct marvell_nfc *nfc = platform_get_drvdata(pdev);
> +
> +       marvell_nand_chips_cleanup(nfc);
> +
> +       if (nfc->use_dma) {
> +               dmaengine_terminate_all(nfc->dma_chan);
> +               dma_release_channel(nfc->dma_chan);
> +       }
> +
> +       clk_disable_unprepare(nfc->ecc_clk);
> +
> +       return 0;
> +}
> +
> +static const struct marvell_nfc_caps marvell_armada_8k_nfc_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .need_system_controller = true,
> +       .is_nfcv2 = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_armada370_nfc_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .is_nfcv2 = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_pxa3xx_nfc_caps = {
> +       .max_cs_nb = 2,
> +       .max_rb_nb = 1,
> +       .use_dma = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_armada_8k_nfc_legacy_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .need_system_controller = true,
> +       .legacy_of_bindings = true,
> +       .is_nfcv2 = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_armada370_nfc_legacy_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .legacy_of_bindings = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_pxa3xx_nfc_legacy_caps = {
> +       .max_cs_nb = 2,
> +       .max_rb_nb = 1,
> +       .legacy_of_bindings = true,
> +};
> +
> +static const struct platform_device_id marvell_nfc_platform_ids[] = {
> +       {
> +               .name = "pxa3xx-nand",
> +               .driver_data = (kernel_ulong_t)&marvell_pxa3xx_nfc_legacy_caps,
> +       },
> +       { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(platform, marvell_nfc_platform_ids);
> +
> +static const struct of_device_id marvell_nfc_of_ids[] = {
> +       {
> +               .compatible = "marvell,armada-8k-nand-controller",
> +               .data = &marvell_armada_8k_nfc_caps,
> +       },
> +       {
> +               .compatible = "marvell,armada370-nand-controller",
> +               .data = &marvell_armada370_nfc_caps,
> +       },
> +       {
> +               .compatible = "marvell,pxa3xx-nand-controller",
> +               .data = &marvell_pxa3xx_nfc_caps,
> +       },
> +       /* Support for old/deprecated bindings: */
> +       {
> +               .compatible = "marvell,armada-8k-nand",
> +               .data = &marvell_armada_8k_nfc_legacy_caps,
> +       },
> +       {
> +               .compatible = "marvell,armada370-nand",
> +               .data = &marvell_armada370_nfc_legacy_caps,
> +       },
> +       {
> +               .compatible = "marvell,pxa3xx-nand",
> +               .data = &marvell_pxa3xx_nfc_legacy_caps,
> +       },
> +       { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, marvell_nfc_of_ids);
> +
> +static struct platform_driver marvell_nfc_driver = {
> +       .driver = {
> +               .name           = "marvell-nfc",
> +               .of_match_table = marvell_nfc_of_ids,
> +       },
> +       .id_table = marvell_nfc_platform_ids,
> +       .probe = marvell_nfc_probe,
> +       .remove = marvell_nfc_remove,
> +};
> +module_platform_driver(marvell_nfc_driver);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_DESCRIPTION("Marvell NAND controller driver");
> --
> 2.11.0
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/



-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-11 16:27         ` Ezequiel Garcia
  0 siblings, 0 replies; 126+ messages in thread
From: Ezequiel Garcia @ 2017-12-11 16:27 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia, Thomas Petazzoni, devicetree, Antoine Tenart,
	Nadav Haklai, linux-mtd, Neta Zur Hershkovits, Hanna Hawa,
	Ofer Heifetz, linux-arm-kernel

On 7 December 2017 at 17:18, Miquel Raynal
<miquel.raynal@free-electrons.com> wrote:
> Add marvell_nand driver which aims at replacing the existing pxa3xx_nand
> driver.
>
> The new driver intends to be easier to understand and follows the brand
> new NAND framework rules by implementing hooks for every pattern the
> controller might support and referencing them inside a parser object
> that will be given to the core at each ->exec_op() call.
>
> Raw accessors are implemented, useful to test/debug memory/filesystem
> corruptions. Userspace binaries contained in the mtd-utils package may
> now be used and their output trusted.
>
> Timings may not be kept from the bootloader anymore, the timings used
> for instance in U-Boot were not optimal and it supposed to have NAND
> support (and initialized) in the bootloader.
>
> Thanks to the improved timings, implementation of ONFI mode 5 support
> (with EDO managed by adding a delay on data sampling), merging the
> commands together and optimizing writes in the command registers, the
> new driver may achieve faster throughputs in both directions.
> Measurements show an improvement of about +23% read throughput and +24%
> write throughput. These measurements have been done with an
> Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH ECC
> correction) using the userspace tool 'flash_speed' from the MTD test
> suite.
>
> Besides these important topics, the new driver addresses several
> unsolved known issues in the old driver which:
> - did not work with ECC soft neither with ECC none ;
> - relied on naked read/write (which is unchanged) while the NFCv1
>   embedded in the pxa3xx platforms do not implement it, so several
>   NAND commands did not actually ever work without any notice (like
>   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> - wrote the OOB data correctly, but was not able to read it correctly
>   past the first OOB data chunk ;
> - did not displayed ECC bytes ;
> - used device tree bindings that did not allow more than one NAND chip,
>   and did not allow to choose the correct chip select if not
>   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
>
> Old device tree bindings are still supported but deprecated. A more
> hierarchical view has to be used to keep the controller and the NAND
> chip structures clearly separated both inside the device tree and also
> in the driver code.
>

So, is this driver fully compatible with the current pxa3xx-nand driver?

Have you tested with U-Boot's driver (based on the pxa3xx-nand)?

I recally some subtle issues with the fact that U-Boot and Linux had
to agree about the BBT format.

> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
> ---
>  drivers/mtd/nand/Kconfig        |   12 +
>  drivers/mtd/nand/Makefile       |    1 +
>  drivers/mtd/nand/marvell_nand.c | 2951 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 2964 insertions(+)
>  create mode 100644 drivers/mtd/nand/marvell_nand.c
>
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 859eb7790c46..9e141e03f5c2 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -323,6 +323,18 @@ config MTD_NAND_PXA3xx
>           platforms (XP, 370, 375, 38x, 39x) and 64-bit Armada
>           platforms (7K, 8K) (NFCv2).
>
> +config MTD_NAND_MARVELL
> +       tristate "NAND controller support on Marvell boards"
> +       depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
> +                  COMPILE_TEST
> +       depends on HAS_IOMEM
> +       help
> +         This enables the NAND flash controller driver for Marvell boards,
> +         including:
> +         - PXA3xx processors (NFCv1)
> +         - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
> +         - 64-bit Aramda platforms (7k, 8k) (NFCv2)
> +
>  config MTD_NAND_SLC_LPC32XX
>         tristate "NXP LPC32xx SLC Controller"
>         depends on ARCH_LPC32XX
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 118a1349aad3..921634ba400c 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -32,6 +32,7 @@ obj-$(CONFIG_MTD_NAND_OMAP2)          += omap2_nand.o
>  obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)  += omap_elm.o
>  obj-$(CONFIG_MTD_NAND_CM_X270)         += cmx270_nand.o
>  obj-$(CONFIG_MTD_NAND_PXA3xx)          += pxa3xx_nand.o
> +obj-$(CONFIG_MTD_NAND_MARVELL)         += marvell_nand.o
>  obj-$(CONFIG_MTD_NAND_TMIO)            += tmio_nand.o
>  obj-$(CONFIG_MTD_NAND_PLATFORM)                += plat_nand.o
>  obj-$(CONFIG_MTD_NAND_PASEMI)          += pasemi_nand.o
> diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
> new file mode 100644
> index 000000000000..2525d9b2f4fa
> --- /dev/null
> +++ b/drivers/mtd/nand/marvell_nand.c
> @@ -0,0 +1,2951 @@
> +/*
> + * Marvell NAND flash controller driver
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * Copyright (C) 2017 Marvell
> + * Author: Miquel RAYNAL <miquel.raynal@free-electrons.com>
> + */
> +
> +#include <linux/module.h>
> +#include <linux/clk.h>
> +#include <linux/mtd/rawnand.h>
> +#include <linux/of_platform.h>
> +#include <linux/iopoll.h>
> +#include <linux/interrupt.h>
> +#include <linux/slab.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/regmap.h>
> +#include <asm/unaligned.h>
> +
> +#include <linux/dmaengine.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/dma/pxa-dma.h>
> +#include <linux/platform_data/mtd-nand-pxa3xx.h>
> +
> +/* Data FIFO granularity, FIFO reads/writes must be a multiple of this length */
> +#define FIFO_DEPTH             8
> +#define FIFO_REP(x)            (x / sizeof(u32))
> +#define BCH_SEQ_READS          (32 / FIFO_DEPTH)
> +/* NFC does not support transfers of larger chunks at a time */
> +#define MAX_CHUNK_SIZE         2112
> +/* NFCv1 cannot read more that 7 bytes of ID */
> +#define NFCV1_READID_LEN       7
> +/* Polling is done at a pace of POLL_PERIOD us until POLL_TIMEOUT is reached */
> +#define POLL_PERIOD            0
> +#define POLL_TIMEOUT           100000
> +/* Interrupt maximum wait period in ms */
> +#define IRQ_TIMEOUT            1000
> +/* Latency in clock cycles between SoC pins and NFC logic */
> +#define MIN_RD_DEL_CNT         3
> +/* Maximum number of contiguous address cycles */
> +#define MAX_ADDRESS_CYC_NFCV1  5
> +#define MAX_ADDRESS_CYC_NFCV2  7
> +/* System control registers/bits to enable the NAND controller on some SoCs */
> +#define GENCONF_SOC_DEVICE_MUX 0x208
> +#define GENCONF_SOC_DEVICE_MUX_NFC_EN BIT(0)
> +#define GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST BIT(20)
> +#define GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST BIT(21)
> +#define GENCONF_SOC_DEVICE_MUX_NFC_INT_EN BIT(25)
> +#define GENCONF_CLK_GATING_CTRL        0x220
> +#define GENCONF_CLK_GATING_CTRL_ND_GATE BIT(2)
> +#define GENCONF_ND_CLK_CTRL    0x700
> +#define GENCONF_ND_CLK_CTRL_EN BIT(0)
> +
> +/* NAND controller data flash control register */
> +#define NDCR                   0x00
> +/* NAND interface timing parameter 0 register */
> +#define NDTR0                  0x04
> +/* NAND interface timing parameter 1 register */
> +#define NDTR1                  0x0C
> +/* NAND controller status register */
> +#define NDSR                   0x14
> +/* NAND ECC control register */
> +#define NDECCCTRL              0x28
> +/* NAND controller data buffer register */
> +#define NDDB                   0x40
> +/* NAND controller command buffer 0 register */
> +#define NDCB0                  0x48
> +/* NAND controller command buffer 1 register */
> +#define NDCB1                  0x4C
> +/* NAND controller command buffer 2 register */
> +#define NDCB2                  0x50
> +/* NAND controller command buffer 3 register */
> +#define NDCB3                  0x54
> +
> +/* Data flash control register bitfields */
> +#define NDCR_ALL_INT           GENMASK(11, 0)
> +#define NDCR_CS1_CMDDM         BIT(7)
> +#define NDCR_CS0_CMDDM         BIT(8)
> +#define NDCR_RDYM              BIT(11)
> +#define NDCR_ND_ARB_EN         BIT(12)
> +#define NDCR_RA_START          BIT(15)
> +#define NDCR_RD_ID_CNT(x)      (min_t(unsigned int, x, 0x7) << 16)
> +#define NDCR_PAGE_SZ(x)                (x >= 2048 ? BIT(24) : 0)
> +#define NDCR_DWIDTH_M          BIT(26)
> +#define NDCR_DWIDTH_C          BIT(27)
> +#define NDCR_ND_RUN            BIT(28)
> +#define NDCR_DMA_EN            BIT(29)
> +#define NDCR_ECC_EN            BIT(30)
> +#define NDCR_SPARE_EN          BIT(31)
> +
> +/* NAND interface timing parameter registers bitfields */
> +#define NDTR0_TRP(x)           ((min_t(unsigned int, x, 0xF) & 0x7) << 0)
> +#define NDTR0_TRH(x)           (min_t(unsigned int, x, 0x7) << 3)
> +#define NDTR0_ETRP(x)          ((min_t(unsigned int, x, 0xF) & 0x8) << 3)
> +#define NDTR0_SEL_NRE_EDGE     BIT(7)
> +#define NDTR0_TWP(x)           (min_t(unsigned int, x, 0x7) << 8)
> +#define NDTR0_TWH(x)           (min_t(unsigned int, x, 0x7) << 11)
> +#define NDTR0_TCS(x)           (min_t(unsigned int, x, 0x7) << 16)
> +#define NDTR0_TCH(x)           (min_t(unsigned int, x, 0x7) << 19)
> +#define NDTR0_RD_CNT_DEL(x)    (min_t(unsigned int, x, 0xF) << 22)
> +#define NDTR0_SELCNTR          BIT(26)
> +#define NDTR0_TADL(x)          (min_t(unsigned int, x, 0x1F) << 27)
> +
> +#define NDTR1_TAR(x)           (min_t(unsigned int, x, 0xF) << 0)
> +#define NDTR1_TWHR(x)          (min_t(unsigned int, x, 0xF) << 4)
> +#define NDTR1_TRHW(x)          (min_t(unsigned int, x / 16, 0x3) << 8)
> +#define NDTR1_PRESCALE         BIT(14)
> +#define NDTR1_WAIT_MODE                BIT(15)
> +#define NDTR1_TR(x)            (min_t(unsigned int, x, 0xFFFF) << 16)
> +
> +/* NAND controller status register bitfields */
> +#define NDSR_WRCMDREQ          BIT(0)
> +#define NDSR_RDDREQ            BIT(1)
> +#define NDSR_WRDREQ            BIT(2)
> +#define NDSR_CORERR            BIT(3)
> +#define NDSR_UNCERR            BIT(4)
> +#define NDSR_CMDD(cs)          BIT(8 - cs)
> +#define NDSR_RDY(rb)           BIT(11 + rb)
> +#define NDSR_ERRCNT(x)         ((x >> 16) & 0x1F)
> +
> +/* NAND ECC control register bitfields */
> +#define NDECCTRL_BCH_EN                BIT(0)
> +
> +/* NAND controller command buffer registers bitfields */
> +#define NDCB0_CMD1(x)          ((x & 0xFF) << 0)
> +#define NDCB0_CMD2(x)          ((x & 0xFF) << 8)
> +#define NDCB0_ADDR_CYC(x)      ((x & 0x7) << 16)
> +#define NDCB0_DBC              BIT(19)
> +#define NDCB0_CMD_TYPE(x)      ((x & 0x7) << 21)
> +#define NDCB0_CSEL             BIT(24)
> +#define NDCB0_RDY_BYP          BIT(27)
> +#define NDCB0_LEN_OVRD         BIT(28)
> +#define NDCB0_CMD_XTYPE(x)     ((x & 0x7) << 29)
> +
> +#define NDCB1_COLS(x)          ((x & 0xFFFF) << 0)
> +#define NDCB1_ADDRS(x)         (x << 16)
> +
> +#define NDCB2_ADDR5(x)         (((x >> 16) & 0xFF) << 0)
> +
> +#define NDCB3_ADDR6(x)         ((x & 0xFF) << 16)
> +#define NDCB3_ADDR7(x)         ((x & 0xFF) << 24)
> +
> +/* NAND controller command buffer 0 register 'type' and 'xtype' fields */
> +#define TYPE_READ              0
> +#define TYPE_WRITE             1
> +#define TYPE_ERASE             2
> +#define TYPE_READ_ID           3
> +#define TYPE_STATUS            4
> +#define TYPE_RESET             5
> +#define TYPE_NAKED_CMD         6
> +#define TYPE_NAKED_ADDR                7
> +#define TYPE_MASK              7
> +#define XTYPE_MONOLITHIC_RW    0
> +#define XTYPE_LAST_NAKED_RW    1
> +#define XTYPE_FINAL_COMMAND    3
> +#define XTYPE_READ             4
> +#define XTYPE_WRITE_DISPATCH   4
> +#define XTYPE_NAKED_RW         5
> +#define XTYPE_COMMAND_DISPATCH 6
> +#define XTYPE_MASK             7
> +
> +/*
> + * Marvell ECC engine works differently than the others, in order to limit the
> + * size of the IP, hardware engineers choose to set a fixed strength at 16 bits
> + * per subpage, and depending on a the desired strength needed by the NAND chip,
> + * a particular layout mixing data/spare/ecc is defined, with a possible last
> + * chunk smaller that the others.
> + *
> + * @writesize:         Full page size on which the layout applies
> + * @chunk:             Desired ECC chunk size on which the layout applies
> + * @strength:          Desired ECC strength (per chunk size bytes) on which the
> + *                     layout applies
> + * @full_chunk_cnt:    Number of full-sized chunks, which is the number of
> + *                     repetitions of the pattern:
> + *                     (data_bytes + spare_bytes + ecc_bytes).
> + * @data_bytes:                Number of data bytes per chunk
> + * @spare_bytes:       Number of spare bytes per chunk
> + * @ecc_bytes:         Number of ecc bytes per chunk
> + * @last_chunk_cnt:    If there is a last chunk with a different size than
> + *                     the first ones, the next fields may not be empty
> + * @last_data_bytes:   Number of data bytes in the last chunk
> + * @last_spare_bytes:  Number of spare bytes in the last chunk
> + * @last_ecc_bytes:    Number of ecc bytes in the last chunk
> + */
> +struct marvell_hw_ecc_layout {
> +       /* Constraints */
> +       int writesize;
> +       int chunk;
> +       int strength;
> +       /* Corresponding layout */
> +       int full_chunk_cnt;
> +       int data_bytes;
> +       int spare_bytes;
> +       int ecc_bytes;
> +       int last_chunk_cnt;
> +       int last_data_bytes;
> +       int last_spare_bytes;
> +       int last_ecc_bytes;
> +};
> +
> +#define MARVELL_LAYOUT(ws, dc, ds, fcc, db, sb, eb, lcc, ldb, lsb, leb) \
> +       {                                                               \
> +               .writesize = ws,                                        \
> +               .chunk = dc,                                            \
> +               .strength = ds,                                         \
> +               .full_chunk_cnt = fcc,                                  \
> +               .data_bytes = db,                                       \
> +               .spare_bytes = sb,                                      \
> +               .ecc_bytes = eb,                                        \
> +               .last_chunk_cnt = lcc,                                  \
> +               .last_data_bytes = ldb,                                 \
> +               .last_spare_bytes = lsb,                                \
> +               .last_ecc_bytes = leb,                                  \
> +       }
> +
> +/* Layouts explained in AN-379_Marvell_SoC_NFC_ECC */
> +static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] = {
> +       MARVELL_LAYOUT(  512,   512,  1,  1,  512,  8,  8,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 2048,   512,  1,  1, 2048, 40, 24,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 2048,   512,  4,  1, 2048, 32, 30,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 4096,   512,  4,  2, 2048, 32, 30,  0,  0,  0,  0),
> +       MARVELL_LAYOUT( 4096,   512,  8,  4, 1024,  0, 30,  1,  0, 64, 30),
> +};
> +
> +/*
> + * The Nand Flash Controller has up to 4 CE and 2 RB pins. The CE selection
> + * is made by a field in NDCB0 register, and in another field in NDCB2 register.
> + * The datasheet describes the logic with an error: ADDR5 field is once
> + * declared at the beginning of NDCB2, and another time at its end. Because the
> + * ADDR5 field of NDCB2 may be used by other bytes, it would be more logical
> + * to use the last bit of this field instead of the first ones.
> + *
> + * @cs:                        Wanted CE lane.
> + * @ndcb0_csel:                Value of the NDCB0 register with or without the flag
> + *                     selecting the wanted CE lane. This is set once when
> + *                     the Device Tree is probed.
> + * @rb:                        Ready/Busy pin for the flash chip
> + */
> +struct marvell_nand_chip_sel {
> +       unsigned int cs;
> +       u32 ndcb0_csel;
> +       unsigned int rb;
> +};
> +
> +/*
> + * NAND chip structure: stores NAND chip device related information
> + *
> + * @chip:              Base NAND chip structure
> + * @node:              Used to store NAND chips into a list
> + * @layout             NAND layout when using hardware ECC
> + * @ndtr0              Timing registers 0 value for this NAND chip
> + * @ndtr1              Timing registers 1 value for this NAND chip
> + * @selected_die:      Current active CS
> + * @nsels:             Number of CS lines required by the NAND chip
> + * @sels:              Array of CS lines descriptions
> + */
> +struct marvell_nand_chip {
> +       struct nand_chip chip;
> +       struct list_head node;
> +       const struct marvell_hw_ecc_layout *layout;
> +       u32 ndtr0;
> +       u32 ndtr1;
> +       int addr_cyc;
> +       int selected_die;
> +       unsigned int nsels;
> +       struct marvell_nand_chip_sel sels[0];
> +};
> +
> +static inline struct marvell_nand_chip *to_marvell_nand(struct nand_chip *chip)
> +{
> +       return container_of(chip, struct marvell_nand_chip, chip);
> +}
> +
> +static inline struct marvell_nand_chip_sel *to_nand_sel(struct marvell_nand_chip
> +                                                       *nand)
> +{
> +       return &nand->sels[nand->selected_die];
> +}
> +
> +/*
> + * NAND controller capabilities for distinction between compatible strings
> + *
> + * @max_cs_nb:         Number of Chip Select lines available
> + * @max_rb_nb:         Number of Ready/Busy lines available
> + * @need_system_controller: Indicates if the SoC needs to have access to the
> + *                      system controller (ie. to enable the NAND controller)
> + * @legacy_of_bindings:        Indicates if DT parsing must be done using the old
> + *                     fashion way
> + * @is_nfcv2:          NFCv2 has numerous enhancements compared to NFCv1, ie.
> + *                     BCH error detection and correction algorithm,
> + *                     NDCB3 register has been added
> + * @use_dma:           Use dma for data transfers
> + */
> +struct marvell_nfc_caps {
> +       unsigned int max_cs_nb;
> +       unsigned int max_rb_nb;
> +       bool need_system_controller;
> +       bool legacy_of_bindings;
> +       bool is_nfcv2;
> +       bool use_dma;
> +};
> +
> +/*
> + * NAND controller structure: stores Marvell NAND controller information
> + *
> + * @controller:                Base controller structure
> + * @dev:               Parent device (used to print error messages)
> + * @regs:              NAND controller registers
> + * @ecc_clk:           ECC block clock, two times the NAND controller clock
> + * @complete:          Completion object to wait for NAND controller events
> + * @assigned_cs:       Bitmask describing already assigned CS lines
> + * @chips:             List containing all the NAND chips attached to
> + *                     this NAND controller
> + * @caps:              NAND controller capabilities for each compatible string
> + * @buf:               Controller local buffer to store a part of the read
> + *                     buffer when the read operation was not 8 bytes aligned
> + *                     as is the FIFO.
> + * @buf_pos:           Position in the 'buf' buffer
> + * @dma_chan:          DMA channel (NFCv1 only)
> + * @dma_buf:           32-bit aligned buffer for DMA transfers (NFCv1 only)
> + */
> +struct marvell_nfc {
> +       struct nand_hw_control controller;
> +       struct device *dev;
> +       void __iomem *regs;
> +       struct clk *ecc_clk;
> +       struct completion complete;
> +       unsigned long assigned_cs;
> +       struct list_head chips;
> +       struct nand_chip *selected_chip;
> +       const struct marvell_nfc_caps *caps;
> +
> +       /*
> +        * Buffer handling: @buf will be accessed byte-per-byter but also
> +        * int-per-int when exchanging data with the NAND controller FIFO,
> +        * 32-bit alignment is then required.
> +        */
> +       u8 buf[FIFO_DEPTH] __aligned(sizeof(u32));
> +       int buf_pos;
> +
> +       /* DMA (NFCv1 only) */
> +       bool use_dma;
> +       struct dma_chan *dma_chan;
> +       u8 *dma_buf;
> +};
> +
> +static inline struct marvell_nfc *to_marvell_nfc(struct nand_hw_control *ctrl)
> +{
> +       return container_of(ctrl, struct marvell_nfc, controller);
> +}
> +
> +/*
> + * NAND controller timings expressed in NAND Controller clock cycles
> + *
> + * @tRP:               ND_nRE pulse width
> + * @tRH:               ND_nRE high duration
> + * @tWP:               ND_nWE pulse time
> + * @tWH:               ND_nWE high duration
> + * @tCS:               Enable signal setup time
> + * @tCH:               Enable signal hold time
> + * @tADL:              Address to write data delay
> + * @tAR:               ND_ALE low to ND_nRE low delay
> + * @tWHR:              ND_nWE high to ND_nRE low for status read
> + * @tRHW:              ND_nRE high duration, read to write delay
> + * @tR:                        ND_nWE high to ND_nRE low for read
> + */
> +struct marvell_nfc_timings {
> +       /* NDTR0 fields */
> +       unsigned int tRP;
> +       unsigned int tRH;
> +       unsigned int tWP;
> +       unsigned int tWH;
> +       unsigned int tCS;
> +       unsigned int tCH;
> +       unsigned int tADL;
> +       /* NDTR1 fields */
> +       unsigned int tAR;
> +       unsigned int tWHR;
> +       unsigned int tRHW;
> +       unsigned int tR;
> +};
> +
> +/*
> + * Derives a duration in numbers of clock cycles.
> + *
> + * @ps: Duration in pico-seconds
> + * @period_ns:  Clock period in nano-seconds
> + *
> + * Convert the duration in nano-seconds, then divide by the period and
> + * return the number of clock periods.
> + */
> +#define TO_CYCLES(ps, period_ns) (DIV_ROUND_UP(ps / 1000, period_ns))
> +
> +/*
> + * NAND driver structure filled during the parsing of the ->exec_op() subop
> + * subset of instructions.
> + *
> + * @ndcb:              Array for the values of the NDCBx registers
> + * @cle_ale_delay_ns:  Optional delay after the last CMD or ADDR cycle
> + * @rdy_timeout_ms:    Timeout for waits on Ready/Busy pin
> + * @rdy_delay_ns:      Optional delay after waiting for the RB pin
> + * @data_delay_ns:     Optional delay after the data xfer
> + * @data_instr_idx:    Index of the data instruction in the subop
> + * @data_instr:                Pointer to the data instruction in the subop
> + */
> +struct marvell_nfc_op {
> +       u32 ndcb[4];
> +       unsigned int cle_ale_delay_ns;
> +       unsigned int rdy_timeout_ms;
> +       unsigned int rdy_delay_ns;
> +       unsigned int data_delay_ns;
> +       unsigned int data_instr_idx;
> +       const struct nand_op_instr *data_instr;
> +};
> +
> +/*
> + * Internal helper to conditionnally apply a delay (from the above structure,
> + * most of the time).
> + */
> +static void cond_delay(unsigned int ns)
> +{
> +       if (!ns)
> +               return;
> +
> +       if (ns < 10000)
> +               ndelay(ns);
> +       else
> +               udelay(DIV_ROUND_UP(ns, 1000));
> +}
> +
> +/*
> + * Internal helper to mimic core functions whithout having to distinguish if
> + * this is the first read operation on the page or not and hence choose the
> + * right function.
> + */
> +int read_page_data(struct nand_chip *chip, unsigned int page,
> +                  unsigned int column, void *buf, unsigned int len)
> +{
> +       if (!column)
> +               return nand_read_page_op(chip, page, column, buf, len);
> +       else
> +               return nand_change_read_column_op(chip, column, buf, len,
> +                                                 false);
> +}
> +
> +/*
> + * The controller has many flags that could generate interrupts, most of them
> + * are disabled and polling is used. For the very slow signals, using interrupts
> + * may relax the CPU charge.
> + */
> +static void marvell_nfc_disable_int(struct marvell_nfc *nfc, u32 int_mask)
> +{
> +       u32 reg;
> +
> +       /* Writing 1 disables the interrupt */
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg | int_mask, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_enable_int(struct marvell_nfc *nfc, u32 int_mask)
> +{
> +       u32 reg;
> +
> +       /* Writing 0 enables the interrupt */
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg & ~int_mask, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_clear_int(struct marvell_nfc *nfc, u32 int_mask)
> +{
> +       writel_relaxed(int_mask, nfc->regs + NDSR);
> +}
> +
> +/*
> + * The core may ask the controller to use only 8-bit accesses while usually
> + * using 16-bit accesses. Later function may blindly call this one with a
> + * boolean to indicate if 8-bit accesses must be enabled of disabled without
> + * knowing if 16-bit accesses are actually in use.
> + */
> +static void marvell_nfc_force_byte_access(struct nand_chip *chip,
> +                                         bool force_8bit)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr;
> +
> +       if (!(chip->options & NAND_BUSWIDTH_16))
> +               return;
> +
> +       ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (force_8bit)
> +               ndcr &= ~(NDCR_DWIDTH_M | NDCR_DWIDTH_C);
> +       else
> +               ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
> +
> +       writel_relaxed(ndcr, nfc->regs + NDCR);
> +}
> +
> +static int marvell_nfc_wait_ndrun(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 val;
> +       int ret;
> +
> +       /*
> +        * The command is being processed, wait for the ND_RUN bit to be
> +        * cleared by the NFC. If not, we must clear it by hand.
> +        */
> +       ret = readl_relaxed_poll_timeout(nfc->regs + NDCR, val,
> +                                        (val & NDCR_ND_RUN) == 0,
> +                                        POLL_PERIOD, POLL_TIMEOUT);
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout on NAND controller run mode\n");
> +               writel_relaxed(readl_relaxed(nfc->regs + NDCR) & ~NDCR_ND_RUN,
> +                              nfc->regs + NDCR);
> +               return ret;
> +       }
> +
> +       return 0;
> +}
> +
> +/*
> + * Any time a command has to be sent to the controller, the following sequence
> + * has to be followed:
> + * - call marvell_nfc_prepare_cmd()
> + *      -> activate the ND_RUN bit that will kind of 'start a job'
> + *      -> wait the signal indicating the NFC is waiting for a command
> + * - send the command (cmd and address cycles)
> + * - enventually send or receive the data
> + * - call marvell_nfc_end_cmd() with the corresponding flag
> + *      -> wait the flag to be triggered or cancel the job with a timeout
> + *
> + * The following functions are helpers to do this job and keep in the
> + * specialized functions the code that really does the operations.
> + */
> +static int marvell_nfc_prepare_cmd(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr, val;
> +       int ret;
> +
> +       /* Poll ND_RUN and clear NDSR before issuing any command */
> +       ret = marvell_nfc_wait_ndrun(chip);
> +       if (ret) {
> +               dev_err(nfc->dev, "Last operation did not suceed\n");
> +               return ret;
> +       }
> +
> +       ndcr = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(readl_relaxed(nfc->regs + NDSR), nfc->regs + NDSR);
> +
> +       /* Assert ND_RUN bit and wait the NFC to be ready */
> +       writel_relaxed(ndcr | NDCR_ND_RUN, nfc->regs + NDCR);
> +       ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
> +                                        val & NDSR_WRCMDREQ,
> +                                        POLL_PERIOD, POLL_TIMEOUT);
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout on WRCMDRE\n");
> +               return -ETIMEDOUT;
> +       }
> +
> +       /* Command may be written, clear WRCMDREQ status bit */
> +       writel_relaxed(NDSR_WRCMDREQ, nfc->regs + NDSR);
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_send_cmd(struct nand_chip *chip,
> +                                struct marvell_nfc_op *nfc_op)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +       dev_dbg(nfc->dev,
> +               "NDCB0: 0x%08x\nNDCB1: 0x%08x\nNDCB2: 0x%08x\nNDCB3: 0x%08x\n",
> +               nfc_op->ndcb[0], nfc_op->ndcb[1], nfc_op->ndcb[2],
> +               nfc_op->ndcb[3]);
> +
> +       writel_relaxed(to_nand_sel(marvell_nand)->ndcb0_csel | nfc_op->ndcb[0],
> +                      nfc->regs + NDCB0);
> +       writel_relaxed(nfc_op->ndcb[1], nfc->regs + NDCB0);
> +       writel(nfc_op->ndcb[2], nfc->regs + NDCB0);
> +
> +       /*
> +        * Write NDCB0 four times only if LEN_OVRD is set or if ADDR6 or ADDR7
> +        * fields are used (only available on NFCv2).
> +        */
> +       if (nfc_op->ndcb[0] & NDCB0_LEN_OVRD ||
> +           (nfc_op->ndcb[0] & NDCB0_ADDR_CYC(6)) == NDCB0_ADDR_CYC(6)) {
> +               if (nfc->caps->is_nfcv2)
> +                       writel(nfc_op->ndcb[3], nfc->regs + NDCB0);
> +               else
> +                       dev_err(nfc->dev,
> +                               "NDCB3 does not exist on NFCv1 and should not be written\n");
> +       }
> +}
> +
> +static int marvell_nfc_end_cmd(struct nand_chip *chip, int flag,
> +                              const char *label)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 val;
> +       int ret;
> +
> +       ret = readl_relaxed_poll_timeout(nfc->regs + NDSR, val,
> +                                        val & flag,
> +                                        POLL_PERIOD, POLL_TIMEOUT);
> +
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout on %s (NDSR: 0x%08x)\n",
> +                       label, val);
> +               if (nfc->dma_chan)
> +                       dmaengine_terminate_all(nfc->dma_chan);
> +               return ret;
> +       }
> +
> +       /*
> +        * DMA function uses this helper to poll on CMDD bits without wanting
> +        * them to be bleared.
> +        */
> +       if (nfc->use_dma && (readl(nfc->regs + NDCR) & NDCR_DMA_EN))
> +               return 0;
> +
> +       writel_relaxed(flag, nfc->regs + NDSR);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_wait_cmdd(struct nand_chip *chip)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       int cs_flag = NDSR_CMDD(to_nand_sel(marvell_nand)->ndcb0_csel);
> +
> +       return marvell_nfc_end_cmd(chip, cs_flag, "CMDD");
> +}
> +
> +static int marvell_nfc_wait_op(struct nand_chip *chip, unsigned int timeout_ms)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       int ret;
> +
> +       /* Timeout is expressed in ms */
> +       if (!timeout_ms)
> +               timeout_ms = IRQ_TIMEOUT;
> +
> +       init_completion(&nfc->complete);
> +
> +       marvell_nfc_enable_int(nfc, NDCR_RDYM);
> +       ret = wait_for_completion_timeout(&nfc->complete,
> +                                         msecs_to_jiffies(timeout_ms));
> +       marvell_nfc_disable_int(nfc, NDCR_RDYM);
> +       marvell_nfc_clear_int(nfc, NDSR_RDY(0) | NDSR_RDY(1));
> +       if (!ret) {
> +               dev_err(nfc->dev, "Timeout waiting for RB signal\n");
> +               return -ETIMEDOUT;
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_select_chip(struct mtd_info *mtd, int die_nr)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr;
> +
> +       if (chip == nfc->selected_chip && die_nr == marvell_nand->selected_die)
> +               return;
> +
> +       if (die_nr < 0 || die_nr >= marvell_nand->nsels) {
> +               nfc->selected_chip = NULL;
> +               marvell_nand->selected_die = -1;
> +               return;
> +       }
> +
> +       /*
> +        * Do not change the timing registers when using the DT property
> +        * marvell,nand-keep-config; in that case ->ndtr0 and ->ndtr1 from the
> +        * marvell_nand structure are supposedly empty.
> +        */
> +       if (marvell_nand->ndtr0 && marvell_nand->ndtr1) {
> +               writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
> +               writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
> +       }
> +
> +       ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       /* Ensure controller is not blocked; also clear some fields */
> +       ndcr &= ~(NDCR_ND_RUN | NDCR_DWIDTH_M | NDCR_DWIDTH_C |
> +                 NDCR_PAGE_SZ(2048));
> +
> +       /* Adapt bus width */
> +       if (chip->options & NAND_BUSWIDTH_16)
> +               ndcr |= NDCR_DWIDTH_M | NDCR_DWIDTH_C;
> +
> +       /* Page size as seen by the controller, either 512B or 2kiB */
> +       ndcr |= NDCR_PAGE_SZ(mtd->writesize);
> +
> +       /* Update the control register */
> +       writel_relaxed(ndcr,  nfc->regs + NDCR);
> +
> +       /* Also reset the interrupt status register */
> +       marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
> +
> +       nfc->selected_chip = chip;
> +       marvell_nand->selected_die = die_nr;
> +}
> +
> +static irqreturn_t marvell_nfc_isr(int irq, void *dev_id)
> +{
> +       struct marvell_nfc *nfc = dev_id;
> +       u32 st = readl_relaxed(nfc->regs + NDSR);
> +       u32 ien = (~readl_relaxed(nfc->regs + NDCR)) & NDCR_ALL_INT;
> +
> +       /*
> +        * RDY interrupt mask is one bit in NDCR while there are two status
> +        * bit in NDSR (RDY[cs0/cs2] and RDY[cs1/cs3]).
> +        */
> +       if (st & NDSR_RDY(1))
> +               st |= NDSR_RDY(0);
> +
> +       if (!(st & ien))
> +               return IRQ_NONE;
> +
> +       marvell_nfc_disable_int(nfc, st & NDCR_ALL_INT);
> +
> +       if (!(st & (NDSR_RDDREQ | NDSR_WRDREQ | NDSR_WRCMDREQ)))
> +               complete(&nfc->complete);
> +
> +       return IRQ_HANDLED;
> +}
> +
> +/* HW ECC related functions */
> +static void marvell_nfc_enable_hw_ecc(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (!(ndcr & NDCR_ECC_EN)) {
> +               writel(ndcr | NDCR_ECC_EN, nfc->regs + NDCR);
> +
> +               /*
> +                * When enabling BCH, set threshold to 0 to always know the
> +                * number of corrected bitflips.
> +                */
> +               if (chip->ecc.algo == NAND_ECC_BCH)
> +                       writel(NDECCTRL_BCH_EN, nfc->regs + NDECCCTRL);
> +       }
> +}
> +
> +static void marvell_nfc_disable_hw_ecc(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (ndcr & NDCR_ECC_EN) {
> +               writel_relaxed(ndcr & ~NDCR_ECC_EN, nfc->regs + NDCR);
> +               if (chip->ecc.algo == NAND_ECC_BCH)
> +                       writel_relaxed(0, nfc->regs + NDECCCTRL);
> +       }
> +}
> +
> +/*
> + * Enable/disable spare area
> + *
> + * NFCv1 needs it (see Hamming related functions). NFCv2 uses LEN_OVRD and thus
> + * does not need this bit to be set.
> + */
> +static void marvell_nfc_enable_spare(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (!(ndcr & NDCR_SPARE_EN))
> +               writel(ndcr | NDCR_SPARE_EN, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_disable_spare(struct nand_chip *chip)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       u32 ndcr = readl_relaxed(nfc->regs + NDCR);
> +
> +       if (ndcr & NDCR_SPARE_EN)
> +               writel_relaxed(ndcr & ~NDCR_SPARE_EN, nfc->regs + NDCR);
> +}
> +
> +/* DMA related helpers */
> +static void marvell_nfc_enable_dma(struct marvell_nfc *nfc)
> +{
> +       u32 reg;
> +
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg | NDCR_DMA_EN, nfc->regs + NDCR);
> +}
> +
> +static void marvell_nfc_disable_dma(struct marvell_nfc *nfc)
> +{
> +       u32 reg;
> +
> +       reg = readl_relaxed(nfc->regs + NDCR);
> +       writel_relaxed(reg & ~NDCR_DMA_EN, nfc->regs + NDCR);
> +}
> +
> +/* Read/write PIO/DMA accessors */
> +static int marvell_nfc_xfer_data_dma(struct marvell_nfc *nfc,
> +                                    enum dma_data_direction direction,
> +                                    unsigned int len)
> +{
> +       unsigned int dma_len = min_t(int, ALIGN(len, 32), MAX_CHUNK_SIZE);
> +       struct dma_async_tx_descriptor *tx;
> +       struct scatterlist sg;
> +       dma_cookie_t cookie;
> +       int ret;
> +
> +       marvell_nfc_enable_dma(nfc);
> +       /* Prepare the DMA transfer */
> +       sg_init_one(&sg, nfc->dma_buf, dma_len);
> +       dma_map_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
> +       tx = dmaengine_prep_slave_sg(nfc->dma_chan, &sg, 1,
> +                                    direction == DMA_FROM_DEVICE ?
> +                                    DMA_DEV_TO_MEM : DMA_MEM_TO_DEV,
> +                                    DMA_PREP_INTERRUPT);
> +       if (!tx) {
> +               dev_err(nfc->dev, "Could not prepare DMA S/G list\n");
> +               return -ENXIO;
> +       }
> +
> +       /* Do the task and wait for it to finish */
> +       cookie = dmaengine_submit(tx);
> +       ret = dma_submit_error(cookie);
> +       if (ret)
> +               return -EIO;
> +
> +       dma_async_issue_pending(nfc->dma_chan);
> +       ret = marvell_nfc_wait_cmdd(nfc->selected_chip);
> +       dma_unmap_sg(nfc->dma_chan->device->dev, &sg, 1, direction);
> +       marvell_nfc_disable_dma(nfc);
> +       if (ret) {
> +               dev_err(nfc->dev, "Timeout waiting for DMA (status: %d)\n",
> +                       dmaengine_tx_status(nfc->dma_chan, cookie, NULL));
> +               dmaengine_terminate_all(nfc->dma_chan);
> +               return -ETIMEDOUT;
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_xfer_data_in_pio(struct marvell_nfc *nfc, u8 *in,
> +                                       unsigned int len)
> +{
> +       unsigned int last_len = len % FIFO_DEPTH;
> +       unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
> +       int i;
> +
> +       for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
> +               ioread32_rep(nfc->regs + NDDB, in + i, FIFO_REP(FIFO_DEPTH));
> +
> +       if (last_len) {
> +               ioread32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
> +               memcpy(in + last_full_offset, nfc->buf, last_len);
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_xfer_data_out_pio(struct marvell_nfc *nfc, const u8 *out,
> +                                        unsigned int len)
> +{
> +       unsigned int last_len = len % FIFO_DEPTH;
> +       unsigned int last_full_offset = round_down(len, FIFO_DEPTH);
> +       int i;
> +
> +       for (i = 0; i < last_full_offset; i += FIFO_DEPTH)
> +               iowrite32_rep(nfc->regs + NDDB, out + i, FIFO_REP(FIFO_DEPTH));
> +
> +       if (last_len) {
> +               memcpy(nfc->buf, out + last_full_offset, last_len);
> +               iowrite32_rep(nfc->regs + NDDB, nfc->buf, FIFO_REP(FIFO_DEPTH));
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_hw_ecc_correct(struct nand_chip *chip,
> +                                      u8 *data, int data_len,
> +                                      u8 *oob, int oob_len,
> +                                      unsigned int *max_bitflips)
> +{
> +       struct mtd_info *mtd = nand_to_mtd(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       int bf = 0;
> +       u32 ndsr;
> +
> +       ndsr = readl_relaxed(nfc->regs + NDSR);
> +
> +       /* Check uncorrectable error flag */
> +       if (ndsr & NDSR_UNCERR) {
> +               writel_relaxed(ndsr, nfc->regs + NDSR);
> +
> +               /*
> +                * Blank pages (all 0xFF) with no ECC are recognized as bad
> +                * because hardware ECC engine expects non-empty ECC values
> +                * in that case, so whenever an uncorrectable error occurs,
> +                * check if the page is actually blank or not.
> +                *
> +                * It is important to check the emptyness only on oob_len,
> +                * which only covers the spare bytes because after a read with
> +                * ECC enabled, the ECC bytes in the buffer have been set by the
> +                * ECC engine, so they are not 0xFF.
> +                */
> +               if (!data)
> +                       data_len = 0;
> +               if (!oob)
> +                       oob_len = 0;
> +               bf = nand_check_erased_ecc_chunk(data, data_len, NULL, 0,
> +                                                oob, oob_len,
> +                                                chip->ecc.strength);
> +               if (bf < 0) {
> +                       mtd->ecc_stats.failed++;
> +                       return;
> +               }
> +       }
> +
> +       /* Check correctable error flag */
> +       if (ndsr & NDSR_CORERR) {
> +               writel_relaxed(ndsr, nfc->regs + NDSR);
> +
> +               if (chip->ecc.algo == NAND_ECC_BCH)
> +                       bf = NDSR_ERRCNT(ndsr);
> +               else
> +                       bf = 1;
> +       }
> +
> +       /*
> +        * Derive max_bitflips either from the number of bitflips detected by
> +        * the hardware ECC engine or by nand_check_erased_ecc_chunk().
> +        */
> +       mtd->ecc_stats.corrected += bf;
> +       *max_bitflips = max_t(unsigned int, *max_bitflips, bf);
> +}
> +
> +/* Hamming read helpers */
> +static int marvell_nfc_hw_ecc_hmg_do_read_page(struct nand_chip *chip, u8 *buf,
> +                                              bool oob_required, bool raw,
> +                                              int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
> +                          NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                          NDCB0_DBC |
> +                          NDCB0_CMD1(NAND_CMD_READ0) |
> +                          NDCB0_CMD2(NAND_CMD_READSTART),
> +               .ndcb[1] = NDCB1_ADDRS(page),
> +               .ndcb[2] = NDCB2_ADDR5(page),
> +       };
> +       unsigned int oob_bytes = 0;
> +       int ret;
> +
> +       /* NFCv2 needs more information about the operation being executed */
> +       if (nfc->caps->is_nfcv2)
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required) {
> +               marvell_nfc_enable_spare(chip);
> +               oob_bytes = lt->spare_bytes;
> +               if (raw)
> +                       oob_bytes += lt->ecc_bytes;
> +       }
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                 "RDDREQ while draining FIFO (data/oob)");
> +       if (ret)
> +               return ret;
> +
> +       /* Read the page then the OOB area */
> +       if (nfc->use_dma) {
> +               marvell_nfc_xfer_data_dma(nfc, DMA_FROM_DEVICE,
> +                                         lt->data_bytes + oob_bytes);
> +               memcpy(buf, nfc->dma_buf, lt->data_bytes);
> +               memcpy(chip->oob_poi + (raw ? 0 : lt->ecc_bytes),
> +                      nfc->dma_buf + lt->data_bytes, oob_bytes);
> +       } else {
> +               marvell_nfc_xfer_data_in_pio(nfc, buf, lt->data_bytes);
> +               marvell_nfc_xfer_data_in_pio(nfc, chip->oob_poi, oob_bytes);
> +       }
> +
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required)
> +               marvell_nfc_disable_spare(chip);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_read_page_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip, u8 *buf,
> +                                               int oob_required, int page)
> +{
> +       return marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, oob_required,
> +                                                  true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_read_page(struct mtd_info *mtd,
> +                                           struct nand_chip *chip,
> +                                           u8 *buf, int oob_required,
> +                                           int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int max_bf = 0;
> +
> +       /*
> +        * Reading/Writing a given page must always be performed with the same
> +        * configuration regarding the state of the SPARE_EN bit or ECC bytes
> +        * will not be present at the same location (writing only data, without
> +        * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
> +        * while writing with the SPARE_EN bit (hence, also writing free OOB
> +        * bytes) will put first the spare bytes then, at the end of the OOB
> +        * area, the ECC bytes. Choices has been made to always read/write OOB
> +        * area (padding with 0xFF is handled by the core for writes).
> +        */
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +       marvell_nfc_hw_ecc_hmg_do_read_page(chip, buf, true, false, page);
> +       marvell_nfc_hw_ecc_correct(chip, buf, lt->data_bytes, NULL, 0, &max_bf);
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       /*
> +        * Re-read the OOB area in raw mode to get the ECC bytes if the OOB area
> +        * is needed.
> +        */
> +       if (oob_required)
> +               chip->ecc.read_oob_raw(mtd, chip, page);
> +
> +       return max_bf;
> +}
> +
> +/*
> + * Spare area in Hamming layouts is not protected by the ECC engine (even if
> + * it appears before the ECC bytes when reading), the ->read_oob_raw() function
> + * also stands for ->read_oob().
> + */
> +static int marvell_nfc_hw_ecc_hmg_read_oob_raw(struct mtd_info *mtd,
> +                                              struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       return marvell_nfc_hw_ecc_hmg_do_read_page(chip, chip->data_buf, true,
> +                                                  true, page);
> +}
> +
> +/* Hamming write helpers */
> +static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
> +                                               const u8 *buf,
> +                                               bool oob_required, bool raw,
> +                                               int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) |
> +                          NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                          NDCB0_CMD1(NAND_CMD_SEQIN) |
> +                          NDCB0_CMD2(NAND_CMD_PAGEPROG) |
> +                          NDCB0_DBC,
> +               .ndcb[1] = NDCB1_ADDRS(page),
> +               .ndcb[2] = NDCB2_ADDR5(page),
> +       };
> +       int oob_bytes = 0;
> +       int ret;
> +
> +       /* NFCv2 needs more information about the operation being executed */
> +       if (nfc->caps->is_nfcv2)
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required) {
> +               marvell_nfc_enable_spare(chip);
> +               oob_bytes = lt->spare_bytes;
> +               if (raw)
> +                       oob_bytes += lt->ecc_bytes;
> +       }
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
> +                                 "WRDREQ while loading FIFO (data)");
> +       if (ret)
> +               return ret;
> +
> +       /* Write the page then the OOB area */
> +       if (nfc->use_dma) {
> +               memcpy(nfc->dma_buf, buf, lt->data_bytes);
> +               if (oob_required)
> +                       memcpy(nfc->dma_buf + lt->data_bytes, chip->oob_poi,
> +                              oob_bytes);
> +               marvell_nfc_xfer_data_dma(nfc, DMA_TO_DEVICE, lt->data_bytes +
> +                                         lt->ecc_bytes + lt->spare_bytes);
> +       } else {
> +               marvell_nfc_xfer_data_out_pio(nfc, buf, lt->data_bytes);
> +               if (oob_required)
> +                       marvell_nfc_xfer_data_out_pio(nfc, chip->oob_poi,
> +                                                     oob_bytes);
> +       }
> +
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       ret = marvell_nfc_wait_op(chip,
> +                                 chip->data_interface.timings.sdr.tPROG_max);
> +       if (ret)
> +               return ret;
> +
> +       if (oob_required)
> +               marvell_nfc_disable_spare(chip);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_write_page_raw(struct mtd_info *mtd,
> +                                                struct nand_chip *chip,
> +                                                const u8 *buf,
> +                                                int oob_required, int page)
> +{
> +       return marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, oob_required,
> +                                                   true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_hmg_write_page(struct mtd_info *mtd,
> +                                            struct nand_chip *chip,
> +                                            const u8 *buf,
> +                                            int oob_required, int page)
> +{
> +       int ret;
> +
> +       /*
> +        * Reading/Writing a given page must always be performed with the same
> +        * configuration regarding the state of the SPARE_EN bit or ECC bytes
> +        * will not be present at the same location (writing only data, without
> +        * SPARE_EN will put the ECC bytes at the beginning of the OOB area,
> +        * while writing with the SPARE_EN bit (hence, also writing free OOB
> +        * bytes) will put first the spare bytes then, at the end of the OOB
> +        * area, the ECC bytes. Choices has been made to always read/write OOB
> +        * area (padding with 0xFF is handled by the core for writes).
> +        */
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +       ret = marvell_nfc_hw_ecc_hmg_do_write_page(chip, buf, true, false,
> +                                                  page);
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       return ret;
> +}
> +
> +/*
> + * Spare area in Hamming layouts is not protected by the ECC engine (even if
> + * it appears before the ECC bytes when reading), the ->write_oob_raw() function
> + * also stands for ->write_oob().
> + */
> +static int marvell_nfc_hw_ecc_hmg_write_oob_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip,
> +                                               int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       memset(chip->data_buf, 0xFF, mtd->writesize);
> +
> +       return marvell_nfc_hw_ecc_hmg_do_write_page(chip, chip->data_buf, true,
> +                                                   true, page);
> +}
> +
> +/* BCH read helpers */
> +static int marvell_nfc_hw_ecc_bch_read_page_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip, u8 *buf,
> +                                               int oob_required, int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       u8 *oob = chip->oob_poi;
> +       int chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
> +       int ecc_offset = (lt->full_chunk_cnt * lt->spare_bytes) +
> +               (lt->last_chunk_cnt * lt->last_spare_bytes);
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       int ecc_len = lt->ecc_bytes;
> +       int chunk;
> +
> +       if (oob_required)
> +               memset(chip->oob_poi, 0xFF, mtd->oobsize);
> +
> +       nand_read_page_op(chip, page, 0, NULL, 0);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               int offset_in_page = chunk * chunk_size;
> +
> +               /* Update last chunk length */
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +                       ecc_len = lt->last_ecc_bytes;
> +               }
> +
> +               nand_change_read_column_op(chip, offset_in_page, buf,
> +                                          lt->data_bytes, false);
> +               buf += lt->data_bytes;
> +
> +               if (!oob_required)
> +                       continue;
> +
> +               offset_in_page += data_len;
> +               nand_change_read_column_op(chip, offset_in_page,
> +                                          oob + (lt->spare_bytes * chunk),
> +                                          spare_len, false);
> +
> +               offset_in_page += spare_len;
> +               nand_change_read_column_op(chip, offset_in_page,
> +                                          oob + ecc_offset +
> +                                          (ALIGN(lt->ecc_bytes, 32) * chunk),
> +                                          ecc_len, false);
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nfc_hw_ecc_bch_read_chunk(struct nand_chip *chip, int chunk,
> +                                             u8 *data, unsigned int data_len,
> +                                             u8 *spare, unsigned int spare_len,
> +                                             int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int i, ret;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_READ) |
> +                          NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                          NDCB0_LEN_OVRD,
> +               .ndcb[1] = NDCB1_ADDRS(page),
> +               .ndcb[2] = NDCB2_ADDR5(page),
> +       };
> +
> +       /*
> +        * Reading spare area is mandatory when using HW ECC or read operation
> +        * will trigger uncorrectable ECC errors, but do not read ECC here.
> +        */
> +       nfc_op.ndcb[3] = data_len + spare_len;
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return;
> +
> +       if (chunk == 0)
> +               nfc_op.ndcb[0] |= NDCB0_DBC |
> +                                 NDCB0_CMD1(NAND_CMD_READ0) |
> +                                 NDCB0_CMD2(NAND_CMD_READSTART);
> +
> +       /*
> +        * Trigger the naked read operation only on the last chunk.
> +        * Otherwise, use monolithic read.
> +        */
> +       if (chunk < nchunks - 1)
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW);
> +       else
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +
> +       /*
> +        * According to the datasheet, when reading from NDDB
> +        * with BCH enabled, after each 32 bytes reads, we
> +        * have to make sure that the NDSR.RDDREQ bit is set.
> +        *
> +        * Drain the FIFO, 8 32-bit reads at a time, and skip
> +        * the polling on the last read.
> +        *
> +        * Length is a multiple of 32 bytes, hence it is a multiple of 8 too.
> +        *
> +        */
> +
> +       for (i = 0; i < data_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
> +               marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                   "RDDREQ while draining FIFO (data)");
> +               marvell_nfc_xfer_data_in_pio(nfc, data,
> +                                            FIFO_DEPTH * BCH_SEQ_READS);
> +               data += FIFO_DEPTH * BCH_SEQ_READS;
> +       }
> +
> +       for (i = 0; i < spare_len; i += FIFO_DEPTH * BCH_SEQ_READS) {
> +               marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                   "RDDREQ while draining FIFO (OOB)");
> +               marvell_nfc_xfer_data_in_pio(nfc, spare,
> +                                            FIFO_DEPTH * BCH_SEQ_READS);
> +               spare += FIFO_DEPTH * BCH_SEQ_READS;
> +       }
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_read_page(struct mtd_info *mtd,
> +                                           struct nand_chip *chip,
> +                                           u8 *buf, int oob_required,
> +                                           int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       u8 *data = buf;
> +       u8 *spare = chip->oob_poi;
> +       int max_bitflips = 0;
> +       int chunk, ecc_offset_in_page, ecc_offset_in_oob_buf, ecc_len;
> +
> +       /*
> +        * With BCH, OOB is not fully used (and thus not read entirely), not
> +        * expected bytes could show up at the end of the OOB buffer if not
> +        * explicitly erased.
> +        */
> +       if (oob_required)
> +               memset(chip->oob_poi, 0xFF, mtd->oobsize);
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               /* Update length for the last chunk */
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +               }
> +
> +               /* Read the chunk and detect number of bitflips */
> +               marvell_nfc_hw_ecc_bch_read_chunk(chip, chunk, data, data_len,
> +                                                 spare, spare_len, page);
> +               marvell_nfc_hw_ecc_correct(chip, data, data_len,
> +                                          spare, spare_len, &max_bitflips);
> +
> +               data += data_len;
> +               spare += spare_len;
> +       }
> +
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       if (!oob_required)
> +               return max_bitflips;
> +
> +       /*
> +        * Re-read ECC bytes without ECC enabled, else it is garbage and it
> +        * fails the ->correct() call.
> +        */
> +       ecc_len = lt->ecc_bytes;
> +       ecc_offset_in_oob_buf =
> +               (lt->full_chunk_cnt * lt->spare_bytes) +
> +               (lt->last_chunk_cnt * lt->last_spare_bytes);
> +       ecc_offset_in_page = lt->data_bytes + lt->spare_bytes;
> +
> +       for (chunk = 0; chunk < nchunks;) {
> +               /* Do the actual raw read of the ECC bytes */
> +               nand_change_read_column_op(chip, ecc_offset_in_page,
> +                                          chip->oob_poi + ecc_offset_in_oob_buf,
> +                                          ecc_len, false);
> +
> +               chunk++;
> +
> +               /* When using a "last chunk", the ECC size might vary */
> +               if (chunk >= lt->full_chunk_cnt)
> +                       ecc_len = lt->last_ecc_bytes;
> +
> +               /* Increment the offsets where ECC will be read and written */
> +               ecc_offset_in_oob_buf += ALIGN(lt->ecc_bytes, 32);
> +               ecc_offset_in_page += lt->ecc_bytes;
> +               if (chunk < lt->full_chunk_cnt)
> +                       ecc_offset_in_page += lt->data_bytes + lt->spare_bytes;
> +               else
> +                       ecc_offset_in_page += lt->last_data_bytes +
> +                               lt->last_spare_bytes;
> +       }
> +
> +       return max_bitflips;
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_read_oob_raw(struct mtd_info *mtd,
> +                                              struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       return chip->ecc.read_page_raw(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_read_oob(struct mtd_info *mtd,
> +                                          struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       return chip->ecc.read_page(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +/* BCH write helpers */
> +static int marvell_nfc_hw_ecc_bch_write_page_raw(struct mtd_info *mtd,
> +                                                struct nand_chip *chip,
> +                                                const u8 *buf,
> +                                                int oob_required, int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int full_chunk_size = lt->data_bytes + lt->spare_bytes + lt->ecc_bytes;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       int ecc_len = lt->ecc_bytes;
> +       int oob_len = spare_len + ecc_len;
> +       int spare_offset = 0;
> +       int ecc_offset =
> +               (lt->full_chunk_cnt * lt->spare_bytes) +
> +               (lt->last_chunk_cnt * lt->last_spare_bytes);
> +       int chunk;
> +
> +       nand_prog_page_begin_op(chip, page, 0, NULL, 0);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +                       ecc_len = lt->last_ecc_bytes;
> +                       oob_len = spare_len + ecc_len;
> +               }
> +
> +               /* Point to the column of the next chunk */
> +               nand_change_write_column_op(chip, chunk * full_chunk_size,
> +                                           NULL, 0, false);
> +
> +               /* Write the data */
> +               nand_write_data_op(chip, buf + (chunk * lt->data_bytes),
> +                                  data_len, false);
> +
> +               if (!oob_required)
> +                       continue;
> +
> +               /* Write the spare bytes */
> +               if (spare_len)
> +                       nand_write_data_op(chip, chip->oob_poi + spare_offset,
> +                                          spare_len, false);
> +
> +               /* Write the ECC bytes */
> +               if (ecc_len)
> +                       nand_write_data_op(chip, chip->oob_poi + ecc_offset,
> +                                          ecc_len, false);
> +
> +               spare_offset += spare_len;
> +               ecc_offset += ALIGN(ecc_len, 32);
> +       }
> +
> +       return nand_prog_page_end_op(chip);
> +}
> +
> +static int
> +marvell_nfc_hw_ecc_bch_write_chunk(struct nand_chip *chip, int chunk,
> +                                  const u8 *data, unsigned int data_len,
> +                                  const u8 *spare, unsigned int spare_len,
> +                                  int page)
> +{
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       int ret;
> +       struct marvell_nfc_op nfc_op = {
> +               .ndcb[0] = NDCB0_CMD_TYPE(TYPE_WRITE) | NDCB0_LEN_OVRD,
> +               .ndcb[3] = data_len + spare_len,
> +       };
> +
> +       /*
> +        * First operation dispatches the CMD_SEQIN command, issue the address
> +        * cycles and asks for the first chunk of data.
> +        * All operations in the middle (if any) will issue a naked write and
> +        * also ask for data.
> +        * Last operation dispatches the PAGEPROG command and also asks for the
> +        * last chunk of data.
> +        */
> +       if (chunk == 0) {
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_WRITE_DISPATCH) |
> +                                 NDCB0_ADDR_CYC(marvell_nand->addr_cyc) |
> +                                 NDCB0_CMD1(NAND_CMD_SEQIN);
> +               nfc_op.ndcb[1] |= NDCB1_ADDRS(page);
> +               nfc_op.ndcb[2] |= NDCB2_ADDR5(page);
> +       } else if (chunk < nchunks - 1) {
> +               nfc_op.ndcb[0] |= NDCB0_CMD_XTYPE(XTYPE_NAKED_RW);
> +       } else {
> +               nfc_op.ndcb[0] |= NDCB0_CMD2(NAND_CMD_PAGEPROG) | NDCB0_DBC |
> +                                 NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +       }
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_WRDREQ,
> +                                 "WRDREQ while loading FIFO (data)");
> +       if (ret)
> +               return ret;
> +
> +       /* Transfer the contents */
> +       iowrite32_rep(nfc->regs + NDDB, data, FIFO_REP(data_len));
> +       iowrite32_rep(nfc->regs + NDDB, spare, FIFO_REP(spare_len));
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_write_page(struct mtd_info *mtd,
> +                                            struct nand_chip *chip,
> +                                            const u8 *buf,
> +                                            int oob_required, int page)
> +{
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt + lt->last_chunk_cnt;
> +       const u8 *data = buf;
> +       const u8 *spare = chip->oob_poi;
> +       int data_len = lt->data_bytes;
> +       int spare_len = lt->spare_bytes;
> +       int chunk, ret;
> +
> +       /* Spare data will be written anyway, so clear it to avoid garbage */
> +       if (!oob_required)
> +               memset(chip->oob_poi, 0xFF, mtd->oobsize);
> +
> +       marvell_nfc_enable_hw_ecc(chip);
> +
> +       for (chunk = 0; chunk < nchunks; chunk++) {
> +               if (chunk >= lt->full_chunk_cnt) {
> +                       data_len = lt->last_data_bytes;
> +                       spare_len = lt->last_spare_bytes;
> +               }
> +
> +               marvell_nfc_hw_ecc_bch_write_chunk(chip, chunk, data, data_len,
> +                                                  spare, spare_len, page);
> +               data += data_len;
> +               spare += spare_len;
> +
> +               /*
> +                * Waiting only for CMDD or PAGED is not enough, ECC are
> +                * partially written. No flag is set once the operation is
> +                * really finished but the ND_RUN bit is cleared, so wait for it
> +                * before stepping into the next command.
> +                */
> +               marvell_nfc_wait_ndrun(chip);
> +       }
> +
> +       ret = marvell_nfc_wait_op(chip,
> +                                 chip->data_interface.timings.sdr.tPROG_max);
> +
> +       marvell_nfc_disable_hw_ecc(chip);
> +
> +       if (ret)
> +               return ret;
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_write_oob_raw(struct mtd_info *mtd,
> +                                               struct nand_chip *chip,
> +                                               int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       memset(chip->data_buf, 0xFF, mtd->writesize);
> +
> +       return chip->ecc.write_page_raw(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +static int marvell_nfc_hw_ecc_bch_write_oob(struct mtd_info *mtd,
> +                                           struct nand_chip *chip, int page)
> +{
> +       /* Invalidate page cache */
> +       chip->pagebuf = -1;
> +
> +       memset(chip->data_buf, 0xFF, mtd->writesize);
> +
> +       return chip->ecc.write_page(mtd, chip, chip->data_buf, true, page);
> +}
> +
> +/* NAND framework ->exec_op() hooks and related helpers */
> +static void marvell_nfc_parse_instructions(struct nand_chip *chip,
> +                                          const struct nand_subop *subop,
> +                                          struct marvell_nfc_op *nfc_op)
> +{
> +       const struct nand_op_instr *instr = NULL;
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       bool first_cmd = true;
> +       unsigned int op_id;
> +       int i;
> +
> +       /* Reset the input structure as most of its fields will be OR'ed */
> +       memset(nfc_op, 0, sizeof(struct marvell_nfc_op));
> +
> +       for (op_id = 0; op_id < subop->ninstrs; op_id++) {
> +               unsigned int offset, naddrs;
> +               const u8 *addrs;
> +               int len = nand_subop_get_data_len(subop, op_id);
> +
> +               instr = &subop->instrs[op_id];
> +
> +               switch (instr->type) {
> +               case NAND_OP_CMD_INSTR:
> +                       if (first_cmd)
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD1(instr->ctx.cmd.opcode);
> +                       else
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD2(instr->ctx.cmd.opcode) |
> +                                       NDCB0_DBC;
> +
> +                       nfc_op->cle_ale_delay_ns = instr->delay_ns;
> +                       first_cmd = false;
> +                       break;
> +
> +               case NAND_OP_ADDR_INSTR:
> +                       offset = nand_subop_get_addr_start_off(subop, op_id);
> +                       naddrs = nand_subop_get_num_addr_cyc(subop, op_id);
> +                       addrs = &instr->ctx.addr.addrs[offset];
> +
> +                       nfc_op->ndcb[0] |= NDCB0_ADDR_CYC(naddrs);
> +
> +                       for (i = 0; i < min_t(unsigned int, 4, naddrs); i++)
> +                               nfc_op->ndcb[1] |= addrs[i] << (8 * i);
> +
> +                       if (naddrs >= 5)
> +                               nfc_op->ndcb[2] |= NDCB2_ADDR5(addrs[5]);
> +                       if (naddrs >= 6)
> +                               nfc_op->ndcb[3] |= NDCB3_ADDR6(addrs[6]);
> +                       if (naddrs == 7)
> +                               nfc_op->ndcb[3] |= NDCB3_ADDR7(addrs[7]);
> +
> +                       nfc_op->cle_ale_delay_ns = instr->delay_ns;
> +                       break;
> +
> +               case NAND_OP_DATA_IN_INSTR:
> +                       nfc_op->data_instr = instr;
> +                       nfc_op->data_instr_idx = op_id;
> +                       nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ);
> +                       if (nfc->caps->is_nfcv2) {
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
> +                                       NDCB0_LEN_OVRD;
> +                               nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
> +                       }
> +                       nfc_op->data_delay_ns = instr->delay_ns;
> +                       break;
> +
> +               case NAND_OP_DATA_OUT_INSTR:
> +                       nfc_op->data_instr = instr;
> +                       nfc_op->data_instr_idx = op_id;
> +                       nfc_op->ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE);
> +                       if (nfc->caps->is_nfcv2) {
> +                               nfc_op->ndcb[0] |=
> +                                       NDCB0_CMD_XTYPE(XTYPE_MONOLITHIC_RW) |
> +                                       NDCB0_LEN_OVRD;
> +                               nfc_op->ndcb[3] |= round_up(len, FIFO_DEPTH);
> +                       }
> +                       nfc_op->data_delay_ns = instr->delay_ns;
> +                       break;
> +
> +               case NAND_OP_WAITRDY_INSTR:
> +                       nfc_op->rdy_timeout_ms = instr->ctx.waitrdy.timeout_ms;
> +                       nfc_op->rdy_delay_ns = instr->delay_ns;
> +                       break;
> +               }
> +       }
> +}
> +
> +static int marvell_nfc_xfer_data_pio(struct nand_chip *chip,
> +                                    const struct nand_subop *subop,
> +                                    struct marvell_nfc_op *nfc_op)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct nand_op_instr *instr = nfc_op->data_instr;
> +       unsigned int op_id = nfc_op->data_instr_idx;
> +       unsigned int len = nand_subop_get_data_len(subop, op_id);
> +       unsigned int offset = nand_subop_get_data_start_off(subop, op_id);
> +       bool reading = (instr->type == NAND_OP_DATA_IN_INSTR);
> +       int ret;
> +
> +       if (instr->ctx.data.force_8bit)
> +               marvell_nfc_force_byte_access(chip, true);
> +
> +       if (reading) {
> +               u8 *in = instr->ctx.data.buf.in + offset;
> +
> +               ret = marvell_nfc_xfer_data_in_pio(nfc, in, len);
> +       } else {
> +               const u8 *out = instr->ctx.data.buf.out + offset;
> +
> +               ret = marvell_nfc_xfer_data_out_pio(nfc, out, len);
> +       }
> +
> +       if (instr->ctx.data.force_8bit)
> +               marvell_nfc_force_byte_access(chip, false);
> +
> +       return ret;
> +}
> +
> +static int marvell_nfc_monolithic_access_exec(struct nand_chip *chip,
> +                                             const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       bool reading;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       reading = (nfc_op.data_instr->type == NAND_OP_DATA_IN_INSTR);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
> +                                 "RDDREQ/WRDREQ while draining raw data");
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       if (reading) {
> +               if (nfc_op.rdy_timeout_ms) {
> +                       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +                       if (ret)
> +                               return ret;
> +               }
> +
> +               cond_delay(nfc_op.rdy_delay_ns);
> +       }
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.data_delay_ns);
> +
> +       if (!reading) {
> +               if (nfc_op.rdy_timeout_ms) {
> +                       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +                       if (ret)
> +                               return ret;
> +               }
> +
> +               cond_delay(nfc_op.rdy_delay_ns);
> +       }
> +
> +       /*
> +        * NDCR ND_RUN bit should be cleared automatically at the end of each
> +        * operation but experience shows that the behavior is buggy when it
> +        * comes to writes (with LEN_OVRD). Clear it by hand in this case.
> +        */
> +       if (!reading) {
> +               struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +               writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
> +                              nfc->regs + NDCR);
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_naked_access_exec(struct nand_chip *chip,
> +                                        const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +
> +       /*
> +        * Naked access are different in that they need to be flagged as naked
> +        * by the controller. Reset the controller registers fields that inform
> +        * on the type and refill them according to the ongoing operation.
> +        */
> +       nfc_op.ndcb[0] &= ~(NDCB0_CMD_TYPE(TYPE_MASK) |
> +                           NDCB0_CMD_XTYPE(XTYPE_MASK));
> +       switch (subop->instrs[0].type) {
> +       case NAND_OP_CMD_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_CMD);
> +               break;
> +       case NAND_OP_ADDR_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_NAKED_ADDR);
> +               break;
> +       case NAND_OP_DATA_IN_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ) |
> +                                 NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +               break;
> +       case NAND_OP_DATA_OUT_INSTR:
> +               nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_WRITE) |
> +                                 NDCB0_CMD_XTYPE(XTYPE_LAST_NAKED_RW);
> +               break;
> +       default:
> +               /* This should never happen */
> +               break;
> +       }
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +
> +       if (!nfc_op.data_instr) {
> +               ret = marvell_nfc_wait_cmdd(chip);
> +               cond_delay(nfc_op.cle_ale_delay_ns);
> +               return ret;
> +       }
> +
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ | NDSR_WRDREQ,
> +                                 "RDDREQ/WRDREQ while draining raw data");
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       /*
> +        * NDCR ND_RUN bit should be cleared automatically at the end of each
> +        * operation but experience shows that the behavior is buggy when it
> +        * comes to writes (with LEN_OVRD). Clear it by hand in this case.
> +        */
> +       if (subop->instrs[0].type == NAND_OP_DATA_OUT_INSTR) {
> +               struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +               writel_relaxed(readl(nfc->regs + NDCR) & ~NDCR_ND_RUN,
> +                              nfc->regs + NDCR);
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_naked_waitrdy_exec(struct nand_chip *chip,
> +                                         const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +
> +       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       return ret;
> +}
> +
> +static int marvell_nfc_read_id_type_exec(struct nand_chip *chip,
> +                                        const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_READ_ID);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                 "RDDREQ while reading ID");
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       if (nfc_op.rdy_timeout_ms) {
> +               ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +               if (ret)
> +                       return ret;
> +       }
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.data_delay_ns);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_read_status_exec(struct nand_chip *chip,
> +                                       const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] &= ~NDCB0_CMD_TYPE(TYPE_READ);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_STATUS);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_end_cmd(chip, NDSR_RDDREQ,
> +                                 "RDDREQ while reading status");
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       if (nfc_op.rdy_timeout_ms) {
> +               ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +               if (ret)
> +                       return ret;
> +       }
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       marvell_nfc_xfer_data_pio(chip, subop, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.data_delay_ns);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_reset_cmd_type_exec(struct nand_chip *chip,
> +                                          const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_RESET);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_erase_cmd_type_exec(struct nand_chip *chip,
> +                                          const struct nand_subop *subop)
> +{
> +       struct marvell_nfc_op nfc_op;
> +       int ret;
> +
> +       marvell_nfc_parse_instructions(chip, subop, &nfc_op);
> +       nfc_op.ndcb[0] |= NDCB0_CMD_TYPE(TYPE_ERASE);
> +
> +       ret = marvell_nfc_prepare_cmd(chip);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_send_cmd(chip, &nfc_op);
> +       ret = marvell_nfc_wait_cmdd(chip);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.cle_ale_delay_ns);
> +
> +       ret = marvell_nfc_wait_op(chip, nfc_op.rdy_timeout_ms);
> +       if (ret)
> +               return ret;
> +
> +       cond_delay(nfc_op.rdy_delay_ns);
> +
> +       return 0;
> +}
> +
> +static const struct nand_op_parser marvell_nfcv2_op_parser = NAND_OP_PARSER(
> +       /* Monolithic reads/writes */
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_monolithic_access_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(true, MAX_ADDRESS_CYC_NFCV2),
> +               NAND_OP_PARSER_PAT_CMD_ELEM(true),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(true),
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_monolithic_access_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2),
> +               NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE),
> +               NAND_OP_PARSER_PAT_CMD_ELEM(true),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(true)),
> +       /* Naked commands */
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV2)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, MAX_CHUNK_SIZE)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_access_exec,
> +               NAND_OP_PARSER_PAT_DATA_OUT_ELEM(false, MAX_CHUNK_SIZE)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_waitrdy_exec,
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       );
> +
> +static const struct nand_op_parser marvell_nfcv1_op_parser = NAND_OP_PARSER(
> +       /* Naked commands not supported, use a function for each pattern */
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_read_id_type_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 8)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_erase_cmd_type_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_ADDR_ELEM(false, MAX_ADDRESS_CYC_NFCV1),
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_read_status_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_DATA_IN_ELEM(false, 1)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_reset_cmd_type_exec,
> +               NAND_OP_PARSER_PAT_CMD_ELEM(false),
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       NAND_OP_PARSER_PATTERN(
> +               marvell_nfc_naked_waitrdy_exec,
> +               NAND_OP_PARSER_PAT_WAITRDY_ELEM(false)),
> +       );
> +
> +static int marvell_nfc_exec_op(struct nand_chip *chip,
> +                              const struct nand_operation *op,
> +                              bool check_only)
> +{
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +
> +       if (nfc->caps->is_nfcv2)
> +               return nand_op_parser_exec_op(chip, &marvell_nfcv2_op_parser,
> +                                             op, check_only);
> +       else
> +               return nand_op_parser_exec_op(chip, &marvell_nfcv1_op_parser,
> +                                             op, check_only);
> +}
> +
> +/*
> + * HW ECC layouts, identical to old pxa3xx_nand driver,
> + * to be fully backward compatible.
> + */
> +static int marvell_nand_ooblayout_ecc(struct mtd_info *mtd, int section,
> +                                     struct mtd_oob_region *oobregion)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt;
> +
> +       if (section >= nchunks)
> +               return -ERANGE;
> +
> +       oobregion->offset = ((lt->spare_bytes + lt->ecc_bytes) * section) +
> +               lt->spare_bytes;
> +       oobregion->length = lt->ecc_bytes;
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_ooblayout_free(struct mtd_info *mtd, int section,
> +                                      struct mtd_oob_region *oobregion)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       const struct marvell_hw_ecc_layout *lt = to_marvell_nand(chip)->layout;
> +       int nchunks = lt->full_chunk_cnt;
> +
> +       if (section >= nchunks)
> +               return -ERANGE;
> +
> +       if (!lt->spare_bytes)
> +               return 0;
> +
> +       oobregion->offset = section * (lt->spare_bytes + lt->ecc_bytes);
> +       oobregion->length = lt->spare_bytes;
> +       if (!section) {
> +               /*
> +                * Bootrom looks in bytes 0 & 5 for bad blocks for the
> +                * 4KB page / 4bit BCH combination.
> +                */
> +               if (mtd->writesize == 4096 && lt->data_bytes == 2048) {
> +                       oobregion->offset += 6;
> +                       oobregion->length -= 6;
> +               } else {
> +                       oobregion->offset += 2;
> +                       oobregion->length -= 2;
> +               }
> +       }
> +
> +       return 0;
> +}
> +
> +static const struct mtd_ooblayout_ops marvell_nand_ooblayout_ops = {
> +       .ecc = marvell_nand_ooblayout_ecc,
> +       .free = marvell_nand_ooblayout_free,
> +};
> +
> +static int marvell_nand_hw_ecc_ctrl_init(struct mtd_info *mtd,
> +                                        struct nand_ecc_ctrl *ecc)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       const struct marvell_hw_ecc_layout *l;
> +       int i;
> +
> +       if (!nfc->caps->is_nfcv2 &&
> +           (mtd->writesize + mtd->oobsize > MAX_CHUNK_SIZE)) {
> +               dev_err(nfc->dev,
> +                       "NFCv1: writesize (%d) cannot be bigger than a chunk (%d)\n",
> +                       mtd->writesize, MAX_CHUNK_SIZE - mtd->oobsize);
> +               return -ENOTSUPP;
> +       }
> +
> +       to_marvell_nand(chip)->layout = NULL;
> +       for (i = 0; i < ARRAY_SIZE(marvell_nfc_layouts); i++) {
> +               l = &marvell_nfc_layouts[i];
> +               if (mtd->writesize == l->writesize &&
> +                   ecc->size == l->chunk && ecc->strength == l->strength) {
> +                       to_marvell_nand(chip)->layout = l;
> +                       break;
> +               }
> +       }
> +
> +       if (!to_marvell_nand(chip)->layout ||
> +           (!nfc->caps->is_nfcv2 && ecc->strength > 1)) {
> +               dev_err(nfc->dev,
> +                       "ECC strength %d at page size %d is not supported\n",
> +                       ecc->strength, mtd->writesize);
> +               return -ENOTSUPP;
> +       }
> +
> +       mtd_set_ooblayout(mtd, &marvell_nand_ooblayout_ops);
> +       ecc->steps = l->full_chunk_cnt + l->last_chunk_cnt;
> +       ecc->size = l->data_bytes;
> +
> +       if (ecc->strength == 1) {
> +               chip->ecc.algo = NAND_ECC_HAMMING;
> +               ecc->read_page_raw = marvell_nfc_hw_ecc_hmg_read_page_raw;
> +               ecc->read_page = marvell_nfc_hw_ecc_hmg_read_page;
> +               ecc->read_oob_raw = marvell_nfc_hw_ecc_hmg_read_oob_raw;
> +               ecc->read_oob = ecc->read_oob_raw;
> +               ecc->write_page_raw = marvell_nfc_hw_ecc_hmg_write_page_raw;
> +               ecc->write_page = marvell_nfc_hw_ecc_hmg_write_page;
> +               ecc->write_oob_raw = marvell_nfc_hw_ecc_hmg_write_oob_raw;
> +               ecc->write_oob = ecc->write_oob_raw;
> +       } else {
> +               chip->ecc.algo = NAND_ECC_BCH;
> +               ecc->strength = 16;
> +               ecc->read_page_raw = marvell_nfc_hw_ecc_bch_read_page_raw;
> +               ecc->read_page = marvell_nfc_hw_ecc_bch_read_page;
> +               ecc->read_oob_raw = marvell_nfc_hw_ecc_bch_read_oob_raw;
> +               ecc->read_oob = marvell_nfc_hw_ecc_bch_read_oob;
> +               ecc->write_page_raw = marvell_nfc_hw_ecc_bch_write_page_raw;
> +               ecc->write_page = marvell_nfc_hw_ecc_bch_write_page;
> +               ecc->write_oob_raw = marvell_nfc_hw_ecc_bch_write_oob_raw;
> +               ecc->write_oob = marvell_nfc_hw_ecc_bch_write_oob;
> +       }
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_ecc_init(struct mtd_info *mtd,
> +                                struct nand_ecc_ctrl *ecc)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       int ret;
> +
> +       if ((ecc->mode != NAND_ECC_NONE) && (!ecc->size || !ecc->strength)) {
> +               if (chip->ecc_step_ds && chip->ecc_strength_ds) {
> +                       ecc->size = chip->ecc_step_ds;
> +                       ecc->strength = chip->ecc_strength_ds;
> +               } else {
> +                       dev_info(nfc->dev,
> +                                "No minimum ECC strength, using 1b/512B\n");
> +                       ecc->size = 512;
> +                       ecc->strength = 1;
> +               }
> +       }
> +
> +       switch (ecc->mode) {
> +       case NAND_ECC_HW:
> +               ret = marvell_nand_hw_ecc_ctrl_init(mtd, ecc);
> +               if (ret)
> +                       return ret;
> +               break;
> +       case NAND_ECC_NONE:
> +               chip->ecc.algo = 0;
> +       case NAND_ECC_SOFT:
> +               break;
> +       default:
> +               return -EINVAL;
> +       }
> +
> +       return 0;
> +}
> +
> +static u8 bbt_pattern[] = {'M', 'V', 'B', 'b', 't', '0' };
> +static u8 bbt_mirror_pattern[] = {'1', 't', 'b', 'B', 'V', 'M' };
> +
> +static struct nand_bbt_descr bbt_main_descr = {
> +       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
> +                  NAND_BBT_2BIT | NAND_BBT_VERSION,
> +       .offs = 8,
> +       .len = 6,
> +       .veroffs = 14,
> +       .maxblocks = 8, /* Last 8 blocks in each chip */
> +       .pattern = bbt_pattern
> +};
> +
> +static struct nand_bbt_descr bbt_mirror_descr = {
> +       .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE |
> +                  NAND_BBT_2BIT | NAND_BBT_VERSION,
> +       .offs = 8,
> +       .len = 6,
> +       .veroffs = 14,
> +       .maxblocks = 8, /* Last 8 blocks in each chip */
> +       .pattern = bbt_mirror_pattern
> +};
> +
> +static int marvell_nfc_setup_data_interface(struct mtd_info *mtd, int chipnr,
> +                                           const struct nand_data_interface
> +                                           *conf)
> +{
> +       struct nand_chip *chip = mtd_to_nand(mtd);
> +       struct marvell_nand_chip *marvell_nand = to_marvell_nand(chip);
> +       struct marvell_nfc *nfc = to_marvell_nfc(chip->controller);
> +       unsigned int period_ns = 1000000000 / clk_get_rate(nfc->ecc_clk) * 2;
> +       const struct nand_sdr_timings *sdr;
> +       struct marvell_nfc_timings nfc_tmg;
> +       int read_delay;
> +
> +       sdr = nand_get_sdr_timings(conf);
> +       if (IS_ERR(sdr))
> +               return PTR_ERR(sdr);
> +
> +       /*
> +        * SDR timings are given in pico-seconds while NFC timings must be
> +        * expressed in NAND controller clock cycles, which is half of the
> +        * frequency of the accessible ECC clock retrieved by clk_get_rate().
> +        * This is not written anywhere in the datasheet but was observed
> +        * with an oscilloscope.
> +        *
> +        * NFC datasheet gives equations from which thoses calculations
> +        * are derived, they tend to be slightly more restrictives than the
> +        * given core timings and may improve the overall speed.
> +        */
> +       nfc_tmg.tRP = TO_CYCLES(DIV_ROUND_UP(sdr->tRC_min, 2), period_ns) - 1;
> +       nfc_tmg.tRH = nfc_tmg.tRP;
> +       nfc_tmg.tWP = TO_CYCLES(DIV_ROUND_UP(sdr->tWC_min, 2), period_ns) - 1;
> +       nfc_tmg.tWH = nfc_tmg.tWP;
> +       nfc_tmg.tCS = TO_CYCLES(sdr->tCS_min, period_ns);
> +       nfc_tmg.tCH = TO_CYCLES(sdr->tCH_min, period_ns) - 1;
> +       nfc_tmg.tADL = TO_CYCLES(sdr->tADL_min, period_ns);
> +       /*
> +        * Read delay is the time of propagation from SoC pins to NFC internal
> +        * logic. With non-EDO timings, this is MIN_RD_DEL_CNT clock cycles. In
> +        * EDO mode, an additional delay of tRH must be taken into account so
> +        * the data is sampled on the falling edge instead of the rising edge.
> +        */
> +       read_delay = sdr->tRC_min >= 30000 ?
> +               MIN_RD_DEL_CNT : MIN_RD_DEL_CNT + nfc_tmg.tRH;
> +
> +       nfc_tmg.tAR = TO_CYCLES(sdr->tAR_min, period_ns);
> +       /*
> +        * tWHR and tRHW are supposed to be read to write delays (and vice
> +        * versa) but in some cases, ie. when doing a change column, they must
> +        * be greater than that to be sure tCCS delay is respected.
> +        */
> +       nfc_tmg.tWHR = TO_CYCLES(max_t(int, sdr->tWHR_min, sdr->tCCS_min),
> +                                period_ns) - 2,
> +       nfc_tmg.tRHW = TO_CYCLES(max_t(int, sdr->tRHW_min, sdr->tCCS_min),
> +                                period_ns);
> +
> +       /* Use WAIT_MODE (wait for RB line) instead of only relying on delays */
> +       nfc_tmg.tR = TO_CYCLES(sdr->tWB_max, period_ns);
> +
> +       if (chipnr < 0)
> +               return 0;
> +
> +       marvell_nand->ndtr0 =
> +               NDTR0_TRP(nfc_tmg.tRP) |
> +               NDTR0_TRH(nfc_tmg.tRH) |
> +               NDTR0_ETRP(nfc_tmg.tRP) |
> +               NDTR0_TWP(nfc_tmg.tWP) |
> +               NDTR0_TWH(nfc_tmg.tWH) |
> +               NDTR0_TCS(nfc_tmg.tCS) |
> +               NDTR0_TCH(nfc_tmg.tCH) |
> +               NDTR0_RD_CNT_DEL(read_delay) |
> +               NDTR0_SELCNTR |
> +               NDTR0_TADL(nfc_tmg.tADL);
> +
> +       marvell_nand->ndtr1 =
> +               NDTR1_TAR(nfc_tmg.tAR) |
> +               NDTR1_TWHR(nfc_tmg.tWHR) |
> +               NDTR1_TRHW(nfc_tmg.tRHW) |
> +               NDTR1_WAIT_MODE |
> +               NDTR1_TR(nfc_tmg.tR);
> +
> +       writel_relaxed(marvell_nand->ndtr0, nfc->regs + NDTR0);
> +       writel_relaxed(marvell_nand->ndtr1, nfc->regs + NDTR1);
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
> +                                 struct device_node *np)
> +{
> +       struct pxa3xx_nand_platform_data *pdata = dev_get_platdata(dev);
> +       struct marvell_nand_chip *marvell_nand;
> +       struct mtd_info *mtd;
> +       struct nand_chip *chip;
> +       int nsels, ret, i;
> +       u32 cs, rb;
> +
> +       /*
> +        * The legacy "num-cs" property indicates the number of CS on the only
> +        * chip connected to the controller (legacy bindings does not support
> +        * more than one chip). CS are only incremented one by one while the RB
> +        * pin is always the #0.
> +        *
> +        * When not using legacy bindings, a couple of "reg" and "marvell,rb"
> +        * properties must be filled. For each chip, expressed as a subnode,
> +        * "reg" points to the CS lines and "marvell,rb" to the RB line.
> +        */
> +       if (pdata) {
> +               nsels = 1;
> +       } else if (nfc->caps->legacy_of_bindings) {
> +               if (!of_get_property(np, "num-cs", &nsels)) {
> +                       dev_err(dev, "missing num-cs property\n");
> +                       return -EINVAL;
> +               }
> +       } else {
> +               if (!of_get_property(np, "reg", &nsels)) {
> +                       dev_err(dev, "missing reg property\n");
> +                       return -EINVAL;
> +               }
> +       }
> +
> +       if (!pdata)
> +               nsels /= sizeof(u32);
> +       if (!nsels) {
> +               dev_err(dev, "invalid reg property size\n");
> +               return -EINVAL;
> +       }
> +
> +       /* Alloc the nand chip structure */
> +       marvell_nand = devm_kzalloc(dev, sizeof(*marvell_nand) +
> +                                   (nsels *
> +                                    sizeof(struct marvell_nand_chip_sel)),
> +                                   GFP_KERNEL);
> +       if (!marvell_nand) {
> +               dev_err(dev, "could not allocate chip structure\n");
> +               return -ENOMEM;
> +       }
> +
> +       marvell_nand->nsels = nsels;
> +       marvell_nand->selected_die = -1;
> +
> +       for (i = 0; i < nsels; i++) {
> +               if (pdata || nfc->caps->legacy_of_bindings) {
> +                       /*
> +                        * Legacy bindings use the CS lines in natural
> +                        * order (0, 1, ...)
> +                        */
> +                       cs = i;
> +               } else {
> +                       /* Retrieve CS id */
> +                       ret = of_property_read_u32_index(np, "reg", i, &cs);
> +                       if (ret) {
> +                               dev_err(dev, "could not retrieve reg property: %d\n",
> +                                       ret);
> +                               return ret;
> +                       }
> +               }
> +
> +               if (cs >= nfc->caps->max_cs_nb) {
> +                       dev_err(dev, "invalid reg value: %u (max CS = %d)\n",
> +                               cs, nfc->caps->max_cs_nb);
> +                       return -EINVAL;
> +               }
> +
> +               if (test_and_set_bit(cs, &nfc->assigned_cs)) {
> +                       dev_err(dev, "CS %d already assigned\n", cs);
> +                       return -EINVAL;
> +               }
> +
> +               /*
> +                * The cs variable represents the chip select id, which must be
> +                * converted in bit fields for NDCB0 and NDCB2 to select the
> +                * right chip. Unfortunately, due to a lack of information on
> +                * the subject and incoherent documentation, the user should not
> +                * use CS1 and CS3 at all as asserting them is not supported in
> +                * a reliable way (due to multiplexing inside ADDR5 field).
> +                */
> +               marvell_nand->sels[i].cs = cs;
> +               switch (cs) {
> +               case 0:
> +               case 2:
> +                       marvell_nand->sels[i].ndcb0_csel = 0;
> +                       break;
> +               case 1:
> +               case 3:
> +                       marvell_nand->sels[i].ndcb0_csel = NDCB0_CSEL;
> +                       break;
> +               default:
> +                       return -EINVAL;
> +               }
> +
> +               /* Retrieve RB id */
> +               if (pdata || nfc->caps->legacy_of_bindings) {
> +                       /* Legacy bindings always use RB #0 */
> +                       rb = 0;
> +               } else {
> +                       ret = of_property_read_u32_index(np, "marvell,rb", i,
> +                                                        &rb);
> +                       if (ret) {
> +                               dev_err(dev,
> +                                       "could not retrieve RB property: %d\n",
> +                                       ret);
> +                               return ret;
> +                       }
> +               }
> +
> +               if (rb >= nfc->caps->max_rb_nb) {
> +                       dev_err(dev, "invalid reg value: %u (max RB = %d)\n",
> +                               rb, nfc->caps->max_rb_nb);
> +                       return -EINVAL;
> +               }
> +
> +               marvell_nand->sels[i].rb = rb;
> +       }
> +
> +       chip = &marvell_nand->chip;
> +       chip->controller = &nfc->controller;
> +       nand_set_flash_node(chip, np);
> +
> +       chip->exec_op = marvell_nfc_exec_op;
> +       chip->select_chip = marvell_nfc_select_chip;
> +       if (nfc->caps->is_nfcv2 &&
> +           !of_property_read_bool(np, "marvell,nand-keep-config"))
> +               chip->setup_data_interface = marvell_nfc_setup_data_interface;
> +
> +       mtd = nand_to_mtd(chip);
> +       mtd->dev.parent = dev;
> +
> +       /*
> +        * Default to HW ECC engine mode. If the nand-ecc-mode property is given
> +        * in the DT node, this entry will be overwritten in nand_scan_ident().
> +        */
> +       chip->ecc.mode = NAND_ECC_HW;
> +
> +       ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
> +       if (ret) {
> +               dev_err(dev, "could not identify the nand chip\n");
> +               return ret;
> +       }
> +
> +       if (pdata && pdata->flash_bbt)
> +               chip->bbt_options |= NAND_BBT_USE_FLASH;
> +
> +       if (chip->bbt_options & NAND_BBT_USE_FLASH) {
> +               /*
> +                * We'll use a bad block table stored in-flash and don't
> +                * allow writing the bad block marker to the flash.
> +                */
> +               chip->bbt_options |= NAND_BBT_NO_OOB_BBM;
> +               chip->bbt_td = &bbt_main_descr;
> +               chip->bbt_md = &bbt_mirror_descr;
> +       }
> +
> +       /*
> +        * With RA_START bit set in NDCR, columns takes two address cycles. This
> +        * means addressing a chip with more than 256 pages needs a fifth
> +        * address cycle. Addressing a chip using CS 2 or 3 should also needs
> +        * this additional cycle but due to insistance in the documentation and
> +        * lack of hardware to test this situation, this case has been dropped
> +        * and is not supported by this driver.
> +        */
> +       marvell_nand->addr_cyc = 4;
> +       if (chip->options & NAND_ROW_ADDR_3)
> +               marvell_nand->addr_cyc = 5;
> +
> +       if (pdata) {
> +               chip->ecc.size = pdata->ecc_step_size;
> +               chip->ecc.strength = pdata->ecc_strength;
> +       }
> +
> +       ret = marvell_nand_ecc_init(mtd, &chip->ecc);
> +       if (ret) {
> +               dev_err(dev, "ECC init failed: %d\n", ret);
> +               return ret;
> +       }
> +
> +       if (chip->ecc.mode == NAND_ECC_HW) {
> +               /*
> +                * Subpage write not available with hardware ECC, prohibit also
> +                * subpage read as in userspace subpage acces would still be
> +                * allowed and subpage write, if used, would lead to numerous
> +                * uncorrectable ECC errors.
> +                */
> +               chip->options |= NAND_NO_SUBPAGE_WRITE;
> +       }
> +
> +       if (pdata || nfc->caps->legacy_of_bindings) {
> +               /*
> +                * We keep the MTD name unchanged to avoid breaking platforms
> +                * where the MTD cmdline parser is used and the bootloader
> +                * has not been updated to use the new naming scheme.
> +                */
> +               mtd->name = "pxa3xx_nand-0";
> +       } else if (!mtd->name) {
> +               /*
> +                * If the new bindings are used and the bootloader has not been
> +                * updated to pass a new mtdparts parameter on the cmdline, you
> +                * should define the following property in your NAND node, ie:
> +                *
> +                *      label = "main-storage";
> +                *
> +                * This way, mtd->name will be set by the core when
> +                * nand_set_flash_node() is called.
> +                */
> +               mtd->name = devm_kasprintf(nfc->dev, GFP_KERNEL,
> +                                          "%s:nand.%d", dev_name(nfc->dev),
> +                                          marvell_nand->sels[0].cs);
> +               if (!mtd->name) {
> +                       dev_err(nfc->dev, "Failed to allocate mtd->name\n");
> +                       return -ENOMEM;
> +               }
> +       }
> +
> +       ret = nand_scan_tail(mtd);
> +       if (ret) {
> +               dev_err(dev, "nand_scan_tail failed: %d\n", ret);
> +               return ret;
> +       }
> +
> +       if (pdata)
> +               /* Legacy bindings support only one chip */
> +               ret = mtd_device_register(mtd, pdata->parts[0],
> +                                         pdata->nr_parts[0]);
> +       else
> +               ret = mtd_device_register(mtd, NULL, 0);
> +       if (ret) {
> +               dev_err(dev, "failed to register mtd device: %d\n", ret);
> +               nand_release(mtd);
> +               return ret;
> +       }
> +
> +       list_add_tail(&marvell_nand->node, &nfc->chips);
> +
> +       return 0;
> +}
> +
> +static int marvell_nand_chips_init(struct device *dev, struct marvell_nfc *nfc)
> +{
> +       struct device_node *np = dev->of_node;
> +       struct device_node *nand_np;
> +       int max_cs = nfc->caps->max_cs_nb;
> +       int nchips;
> +       int ret;
> +
> +       if (!np)
> +               nchips = 1;
> +       else
> +               nchips = of_get_child_count(np);
> +
> +       if (nchips > max_cs) {
> +               dev_err(dev, "too many NAND chips: %d (max = %d CS)\n", nchips,
> +                       max_cs);
> +               return -EINVAL;
> +       }
> +
> +       /*
> +        * Legacy bindings do not use child nodes to exhibit NAND chip
> +        * properties and layout. Instead, NAND properties are mixed with the
> +        * controller's and a single subnode presents the memory layout.
> +        */
> +       if (nfc->caps->legacy_of_bindings) {
> +               ret = marvell_nand_chip_init(dev, nfc, np);
> +               return ret;
> +       }
> +
> +       for_each_child_of_node(np, nand_np) {
> +               ret = marvell_nand_chip_init(dev, nfc, nand_np);
> +               if (ret) {
> +                       of_node_put(nand_np);
> +                       return ret;
> +               }
> +       }
> +
> +       return 0;
> +}
> +
> +static void marvell_nand_chips_cleanup(struct marvell_nfc *nfc)
> +{
> +       struct marvell_nand_chip *entry, *temp;
> +
> +       list_for_each_entry_safe(entry, temp, &nfc->chips, node) {
> +               nand_release(nand_to_mtd(&entry->chip));
> +               list_del(&entry->node);
> +       }
> +}
> +
> +static int marvell_nfc_init_dma(struct marvell_nfc *nfc)
> +{
> +       struct platform_device *pdev = container_of(nfc->dev,
> +                                                   struct platform_device,
> +                                                   dev);
> +       struct dma_slave_config config = {};
> +       struct resource *r;
> +       dma_cap_mask_t mask;
> +       struct pxad_param param;
> +       int ret;
> +
> +       if (!IS_ENABLED(CONFIG_PXA_DMA)) {
> +               dev_warn(nfc->dev,
> +                        "DMA not enabled in configuration\n");
> +               return -ENOTSUPP;
> +       }
> +
> +       ret = dma_set_mask_and_coherent(nfc->dev, DMA_BIT_MASK(32));
> +       if (ret)
> +               return ret;
> +
> +       r = platform_get_resource(pdev, IORESOURCE_DMA, 0);
> +       if (!r) {
> +               dev_err(nfc->dev, "No resource defined for data DMA\n");
> +               return -ENXIO;
> +       }
> +
> +       param.drcmr = r->start;
> +       param.prio = PXAD_PRIO_LOWEST;
> +       dma_cap_zero(mask);
> +       dma_cap_set(DMA_SLAVE, mask);
> +       nfc->dma_chan =
> +               dma_request_slave_channel_compat(mask, pxad_filter_fn,
> +                                                &param, nfc->dev,
> +                                                "data");
> +       if (!nfc->dma_chan) {
> +               dev_err(nfc->dev,
> +                       "Unable to request data DMA channel\n");
> +               return -ENODEV;
> +       }
> +
> +       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +       if (!r)
> +               return -ENXIO;
> +
> +       config.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> +       config.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
> +       config.src_addr = r->start + NDDB;
> +       config.dst_addr = r->start + NDDB;
> +       config.src_maxburst = 32;
> +       config.dst_maxburst = 32;
> +       ret = dmaengine_slave_config(nfc->dma_chan, &config);
> +       if (ret < 0) {
> +               dev_err(nfc->dev, "Failed to configure DMA channel\n");
> +               return ret;
> +       }
> +
> +       /*
> +        * DMA must act on length multiple of 32 and this length may be
> +        * bigger than the destination buffer. Use this buffer instead
> +        * for DMA transfers and then copy the desired amount of data to
> +        * the provided buffer.
> +        */
> +       nfc->dma_buf = kmalloc(MAX_CHUNK_SIZE, GFP_DMA);
> +       if (!nfc->dma_buf)
> +               return -ENOMEM;
> +
> +       nfc->use_dma = true;
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_init(struct marvell_nfc *nfc)
> +{
> +       struct device_node *np = nfc->dev->of_node;
> +
> +       /*
> +        * Some SoCs like A7k/A8k need to enable manually the NAND
> +        * controller, gated clocks and reset bits to avoid being bootloader
> +        * dependent. This is done through the use of the System Functions
> +        * registers.
> +        */
> +       if (nfc->caps->need_system_controller) {
> +               struct regmap *sysctrl_base = syscon_regmap_lookup_by_phandle(
> +                       np, "marvell,system-controller");
> +               u32 reg;
> +
> +               if (IS_ERR(sysctrl_base))
> +                       return PTR_ERR(sysctrl_base);
> +
> +               reg = GENCONF_SOC_DEVICE_MUX_NFC_EN |
> +                       GENCONF_SOC_DEVICE_MUX_ECC_CLK_RST |
> +                       GENCONF_SOC_DEVICE_MUX_ECC_CORE_RST |
> +                       GENCONF_SOC_DEVICE_MUX_NFC_INT_EN;
> +               regmap_write(sysctrl_base, GENCONF_SOC_DEVICE_MUX, reg);
> +
> +               regmap_read(sysctrl_base, GENCONF_CLK_GATING_CTRL, &reg);
> +               reg |= GENCONF_CLK_GATING_CTRL_ND_GATE;
> +               regmap_write(sysctrl_base, GENCONF_CLK_GATING_CTRL, reg);
> +
> +               regmap_read(sysctrl_base, GENCONF_ND_CLK_CTRL, &reg);
> +               reg |= GENCONF_ND_CLK_CTRL_EN;
> +               regmap_write(sysctrl_base, GENCONF_ND_CLK_CTRL, reg);
> +       }
> +
> +       /* Configure the DMA if appropriate */
> +       if (!nfc->caps->is_nfcv2)
> +               marvell_nfc_init_dma(nfc);
> +
> +       /*
> +        * ECC operations and interruptions are only enabled when specifically
> +        * needed. ECC shall not be activated in the early stages (fails probe).
> +        * Arbiter flag, even if marked as "reserved", must be set (empirical).
> +        */
> +       writel_relaxed(NDCR_RA_START | NDCR_ALL_INT | NDCR_ND_ARB_EN |
> +                      (nfc->caps->is_nfcv2 ?
> +                       0 : NDCR_RD_ID_CNT(NFCV1_READID_LEN)),
> +                      nfc->regs + NDCR);
> +       writel_relaxed(0xFFFFFFFF, nfc->regs + NDSR);
> +       writel_relaxed(0, nfc->regs + NDECCCTRL);
> +
> +       return 0;
> +}
> +
> +static int marvell_nfc_probe(struct platform_device *pdev)
> +{
> +       struct device *dev = &pdev->dev;
> +       struct resource *r;
> +       struct marvell_nfc *nfc;
> +       int ret;
> +       int irq;
> +
> +       nfc = devm_kzalloc(&pdev->dev, sizeof(struct marvell_nfc),
> +                          GFP_KERNEL);
> +       if (!nfc)
> +               return -ENOMEM;
> +
> +       nfc->dev = dev;
> +       nand_hw_control_init(&nfc->controller);
> +       INIT_LIST_HEAD(&nfc->chips);
> +
> +       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +       nfc->regs = devm_ioremap_resource(dev, r);
> +       if (IS_ERR(nfc->regs))
> +               return PTR_ERR(nfc->regs);
> +
> +       irq = platform_get_irq(pdev, 0);
> +       if (irq < 0) {
> +               dev_err(dev, "failed to retrieve irq\n");
> +               return irq;
> +       }
> +
> +       nfc->ecc_clk = devm_clk_get(&pdev->dev, NULL);
> +       if (IS_ERR(nfc->ecc_clk))
> +               return PTR_ERR(nfc->ecc_clk);
> +
> +       ret = clk_prepare_enable(nfc->ecc_clk);
> +       if (ret)
> +               return ret;
> +
> +       marvell_nfc_disable_int(nfc, NDCR_ALL_INT);
> +       marvell_nfc_clear_int(nfc, NDCR_ALL_INT);
> +       ret = devm_request_irq(dev, irq, marvell_nfc_isr,
> +                              0, "marvell-nfc", nfc);
> +       if (ret)
> +               goto unprepare_clk;
> +
> +       /* Get NAND controller capabilities */
> +       if (pdev->id_entry)
> +               nfc->caps = (void *)pdev->id_entry->driver_data;
> +       else
> +               nfc->caps = of_device_get_match_data(&pdev->dev);
> +
> +       if (!nfc->caps) {
> +               dev_err(dev, "Could not retrieve NFC caps\n");
> +               ret = -EINVAL;
> +               goto unprepare_clk;
> +       }
> +
> +       /* Init the controller and then probe the chips */
> +       ret = marvell_nfc_init(nfc);
> +       if (ret)
> +               goto unprepare_clk;
> +
> +       platform_set_drvdata(pdev, nfc);
> +
> +       ret = marvell_nand_chips_init(dev, nfc);
> +       if (ret)
> +               goto unprepare_clk;
> +
> +       return 0;
> +
> +unprepare_clk:
> +       clk_disable_unprepare(nfc->ecc_clk);
> +
> +       return ret;
> +}
> +
> +static int marvell_nfc_remove(struct platform_device *pdev)
> +{
> +       struct marvell_nfc *nfc = platform_get_drvdata(pdev);
> +
> +       marvell_nand_chips_cleanup(nfc);
> +
> +       if (nfc->use_dma) {
> +               dmaengine_terminate_all(nfc->dma_chan);
> +               dma_release_channel(nfc->dma_chan);
> +       }
> +
> +       clk_disable_unprepare(nfc->ecc_clk);
> +
> +       return 0;
> +}
> +
> +static const struct marvell_nfc_caps marvell_armada_8k_nfc_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .need_system_controller = true,
> +       .is_nfcv2 = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_armada370_nfc_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .is_nfcv2 = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_pxa3xx_nfc_caps = {
> +       .max_cs_nb = 2,
> +       .max_rb_nb = 1,
> +       .use_dma = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_armada_8k_nfc_legacy_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .need_system_controller = true,
> +       .legacy_of_bindings = true,
> +       .is_nfcv2 = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_armada370_nfc_legacy_caps = {
> +       .max_cs_nb = 4,
> +       .max_rb_nb = 2,
> +       .legacy_of_bindings = true,
> +};
> +
> +static const struct marvell_nfc_caps marvell_pxa3xx_nfc_legacy_caps = {
> +       .max_cs_nb = 2,
> +       .max_rb_nb = 1,
> +       .legacy_of_bindings = true,
> +};
> +
> +static const struct platform_device_id marvell_nfc_platform_ids[] = {
> +       {
> +               .name = "pxa3xx-nand",
> +               .driver_data = (kernel_ulong_t)&marvell_pxa3xx_nfc_legacy_caps,
> +       },
> +       { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(platform, marvell_nfc_platform_ids);
> +
> +static const struct of_device_id marvell_nfc_of_ids[] = {
> +       {
> +               .compatible = "marvell,armada-8k-nand-controller",
> +               .data = &marvell_armada_8k_nfc_caps,
> +       },
> +       {
> +               .compatible = "marvell,armada370-nand-controller",
> +               .data = &marvell_armada370_nfc_caps,
> +       },
> +       {
> +               .compatible = "marvell,pxa3xx-nand-controller",
> +               .data = &marvell_pxa3xx_nfc_caps,
> +       },
> +       /* Support for old/deprecated bindings: */
> +       {
> +               .compatible = "marvell,armada-8k-nand",
> +               .data = &marvell_armada_8k_nfc_legacy_caps,
> +       },
> +       {
> +               .compatible = "marvell,armada370-nand",
> +               .data = &marvell_armada370_nfc_legacy_caps,
> +       },
> +       {
> +               .compatible = "marvell,pxa3xx-nand",
> +               .data = &marvell_pxa3xx_nfc_legacy_caps,
> +       },
> +       { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, marvell_nfc_of_ids);
> +
> +static struct platform_driver marvell_nfc_driver = {
> +       .driver = {
> +               .name           = "marvell-nfc",
> +               .of_match_table = marvell_nfc_of_ids,
> +       },
> +       .id_table = marvell_nfc_platform_ids,
> +       .probe = marvell_nfc_probe,
> +       .remove = marvell_nfc_remove,
> +};
> +module_platform_driver(marvell_nfc_driver);
> +
> +MODULE_LICENSE("GPL");
> +MODULE_DESCRIPTION("Marvell NAND controller driver");
> --
> 2.11.0
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/



-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
  2017-12-11 16:27         ` Ezequiel Garcia
  (?)
@ 2017-12-11 16:55             ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-11 16:55 UTC (permalink / raw)
  To: Ezequiel Garcia
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas

On Mon, 11 Dec 2017 13:27:30 -0300
Ezequiel Garcia <ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org> wrote:

> On 7 December 2017 at 17:18, Miquel Raynal
> <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> > Add marvell_nand driver which aims at replacing the existing
> > pxa3xx_nand driver.
> >
> > The new driver intends to be easier to understand and follows the
> > brand new NAND framework rules by implementing hooks for every
> > pattern the controller might support and referencing them inside a
> > parser object that will be given to the core at each ->exec_op()
> > call.
> >
> > Raw accessors are implemented, useful to test/debug
> > memory/filesystem corruptions. Userspace binaries contained in the
> > mtd-utils package may now be used and their output trusted.
> >
> > Timings may not be kept from the bootloader anymore, the timings
> > used for instance in U-Boot were not optimal and it supposed to
> > have NAND support (and initialized) in the bootloader.
> >
> > Thanks to the improved timings, implementation of ONFI mode 5
> > support (with EDO managed by adding a delay on data sampling),
> > merging the commands together and optimizing writes in the command
> > registers, the new driver may achieve faster throughputs in both
> > directions. Measurements show an improvement of about +23% read
> > throughput and +24% write throughput. These measurements have been
> > done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit
> > strength BCH ECC correction) using the userspace tool 'flash_speed'
> > from the MTD test suite.
> >
> > Besides these important topics, the new driver addresses several
> > unsolved known issues in the old driver which:
> > - did not work with ECC soft neither with ECC none ;
> > - relied on naked read/write (which is unchanged) while the NFCv1
> >   embedded in the pxa3xx platforms do not implement it, so several
> >   NAND commands did not actually ever work without any notice (like
> >   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > - wrote the OOB data correctly, but was not able to read it
> > correctly past the first OOB data chunk ;
> > - did not displayed ECC bytes ;
> > - used device tree bindings that did not allow more than one NAND
> > chip, and did not allow to choose the correct chip select if not
> >   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
> >
> > Old device tree bindings are still supported but deprecated. A more
> > hierarchical view has to be used to keep the controller and the NAND
> > chip structures clearly separated both inside the device tree and
> > also in the driver code.
> >  
> 
> So, is this driver fully compatible with the current pxa3xx-nand
> driver?

It should be!

> 
> Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> 
> I recally some subtle issues with the fact that U-Boot and Linux had
> to agree about the BBT format.

I kept the pxa3xx_nand driver BBT format.

This is something I mistakenly omitted from the commit message:

There are 5 supported layouts in the driver (the same as withing the
pxa3xx_nand driver):
    1/ Page: 512B, strength 1b/512B (hamming)
    2/ Page: 2kiB, strength 4b/2kiB (hamming)
    3/ page: 2kiB, strength 16b/2kiB (BCH)
    4/ page: 4kiB, strength 16b/2kiB (BCH)
    5/ page: 4kiB, strength 32b/2kiB (BCH)

Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
and without DMA.
Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB and
an Armada 8040 DB.
Layout 5 has been tested with an Armada 398 db.

Layout 1 has been tested with the Armada 385 db with some hacks.
Layout 3 has been tested with the Armada 385 db with some other hacks,
that is why I am concerned about the other thread on the MTD mailing
list "wait timeout when scanning for BB" where a 2kiB page with
16b/2048B strength is in use.

Regards,
Miquèl
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-11 16:55             ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-11 16:55 UTC (permalink / raw)
  To: Ezequiel Garcia
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia, Thomas Petazzoni, devicetree, Antoine Tenart,
	Nadav Haklai, linux-mtd, Neta Zur Hershkovits, Hanna Hawa,
	Ofer Heifetz, linux-arm-kernel

On Mon, 11 Dec 2017 13:27:30 -0300
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:

> On 7 December 2017 at 17:18, Miquel Raynal
> <miquel.raynal@free-electrons.com> wrote:
> > Add marvell_nand driver which aims at replacing the existing
> > pxa3xx_nand driver.
> >
> > The new driver intends to be easier to understand and follows the
> > brand new NAND framework rules by implementing hooks for every
> > pattern the controller might support and referencing them inside a
> > parser object that will be given to the core at each ->exec_op()
> > call.
> >
> > Raw accessors are implemented, useful to test/debug
> > memory/filesystem corruptions. Userspace binaries contained in the
> > mtd-utils package may now be used and their output trusted.
> >
> > Timings may not be kept from the bootloader anymore, the timings
> > used for instance in U-Boot were not optimal and it supposed to
> > have NAND support (and initialized) in the bootloader.
> >
> > Thanks to the improved timings, implementation of ONFI mode 5
> > support (with EDO managed by adding a delay on data sampling),
> > merging the commands together and optimizing writes in the command
> > registers, the new driver may achieve faster throughputs in both
> > directions. Measurements show an improvement of about +23% read
> > throughput and +24% write throughput. These measurements have been
> > done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit
> > strength BCH ECC correction) using the userspace tool 'flash_speed'
> > from the MTD test suite.
> >
> > Besides these important topics, the new driver addresses several
> > unsolved known issues in the old driver which:
> > - did not work with ECC soft neither with ECC none ;
> > - relied on naked read/write (which is unchanged) while the NFCv1
> >   embedded in the pxa3xx platforms do not implement it, so several
> >   NAND commands did not actually ever work without any notice (like
> >   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > - wrote the OOB data correctly, but was not able to read it
> > correctly past the first OOB data chunk ;
> > - did not displayed ECC bytes ;
> > - used device tree bindings that did not allow more than one NAND
> > chip, and did not allow to choose the correct chip select if not
> >   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
> >
> > Old device tree bindings are still supported but deprecated. A more
> > hierarchical view has to be used to keep the controller and the NAND
> > chip structures clearly separated both inside the device tree and
> > also in the driver code.
> >  
> 
> So, is this driver fully compatible with the current pxa3xx-nand
> driver?

It should be!

> 
> Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> 
> I recally some subtle issues with the fact that U-Boot and Linux had
> to agree about the BBT format.

I kept the pxa3xx_nand driver BBT format.

This is something I mistakenly omitted from the commit message:

There are 5 supported layouts in the driver (the same as withing the
pxa3xx_nand driver):
    1/ Page: 512B, strength 1b/512B (hamming)
    2/ Page: 2kiB, strength 4b/2kiB (hamming)
    3/ page: 2kiB, strength 16b/2kiB (BCH)
    4/ page: 4kiB, strength 16b/2kiB (BCH)
    5/ page: 4kiB, strength 32b/2kiB (BCH)

Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
and without DMA.
Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB and
an Armada 8040 DB.
Layout 5 has been tested with an Armada 398 db.

Layout 1 has been tested with the Armada 385 db with some hacks.
Layout 3 has been tested with the Armada 385 db with some other hacks,
that is why I am concerned about the other thread on the MTD mailing
list "wait timeout when scanning for BB" where a 2kiB page with
16b/2048B strength is in use.

Regards,
Miquèl

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-11 16:55             ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-11 16:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 11 Dec 2017 13:27:30 -0300
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:

> On 7 December 2017 at 17:18, Miquel Raynal
> <miquel.raynal@free-electrons.com> wrote:
> > Add marvell_nand driver which aims at replacing the existing
> > pxa3xx_nand driver.
> >
> > The new driver intends to be easier to understand and follows the
> > brand new NAND framework rules by implementing hooks for every
> > pattern the controller might support and referencing them inside a
> > parser object that will be given to the core at each ->exec_op()
> > call.
> >
> > Raw accessors are implemented, useful to test/debug
> > memory/filesystem corruptions. Userspace binaries contained in the
> > mtd-utils package may now be used and their output trusted.
> >
> > Timings may not be kept from the bootloader anymore, the timings
> > used for instance in U-Boot were not optimal and it supposed to
> > have NAND support (and initialized) in the bootloader.
> >
> > Thanks to the improved timings, implementation of ONFI mode 5
> > support (with EDO managed by adding a delay on data sampling),
> > merging the commands together and optimizing writes in the command
> > registers, the new driver may achieve faster throughputs in both
> > directions. Measurements show an improvement of about +23% read
> > throughput and +24% write throughput. These measurements have been
> > done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit
> > strength BCH ECC correction) using the userspace tool 'flash_speed'
> > from the MTD test suite.
> >
> > Besides these important topics, the new driver addresses several
> > unsolved known issues in the old driver which:
> > - did not work with ECC soft neither with ECC none ;
> > - relied on naked read/write (which is unchanged) while the NFCv1
> >   embedded in the pxa3xx platforms do not implement it, so several
> >   NAND commands did not actually ever work without any notice (like
> >   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > - wrote the OOB data correctly, but was not able to read it
> > correctly past the first OOB data chunk ;
> > - did not displayed ECC bytes ;
> > - used device tree bindings that did not allow more than one NAND
> > chip, and did not allow to choose the correct chip select if not
> >   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
> >
> > Old device tree bindings are still supported but deprecated. A more
> > hierarchical view has to be used to keep the controller and the NAND
> > chip structures clearly separated both inside the device tree and
> > also in the driver code.
> >  
> 
> So, is this driver fully compatible with the current pxa3xx-nand
> driver?

It should be!

> 
> Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> 
> I recally some subtle issues with the fact that U-Boot and Linux had
> to agree about the BBT format.

I kept the pxa3xx_nand driver BBT format.

This is something I mistakenly omitted from the commit message:

There are 5 supported layouts in the driver (the same as withing the
pxa3xx_nand driver):
    1/ Page: 512B, strength 1b/512B (hamming)
    2/ Page: 2kiB, strength 4b/2kiB (hamming)
    3/ page: 2kiB, strength 16b/2kiB (BCH)
    4/ page: 4kiB, strength 16b/2kiB (BCH)
    5/ page: 4kiB, strength 32b/2kiB (BCH)

Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
and without DMA.
Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB and
an Armada 8040 DB.
Layout 5 has been tested with an Armada 398 db.

Layout 1 has been tested with the Armada 385 db with some hacks.
Layout 3 has been tested with the Armada 385 db with some other hacks,
that is why I am concerned about the other thread on the MTD mailing
list "wait timeout when scanning for BB" where a 2kiB page with
16b/2048B strength is in use.

Regards,
Miqu?l

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
  2017-12-11 16:55             ` Miquel RAYNAL
  (?)
@ 2017-12-11 17:05               ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-11 17:05 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Ezequiel Garcia, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon

On Mon, 11 Dec 2017 17:55:06 +0100
Miquel RAYNAL <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> On Mon, 11 Dec 2017 13:27:30 -0300
> Ezequiel Garcia <ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org> wrote:
> 
> > On 7 December 2017 at 17:18, Miquel Raynal
> > <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:  
> > > Add marvell_nand driver which aims at replacing the existing
> > > pxa3xx_nand driver.
> > >
> > > The new driver intends to be easier to understand and follows the
> > > brand new NAND framework rules by implementing hooks for every
> > > pattern the controller might support and referencing them inside a
> > > parser object that will be given to the core at each ->exec_op()
> > > call.
> > >
> > > Raw accessors are implemented, useful to test/debug
> > > memory/filesystem corruptions. Userspace binaries contained in the
> > > mtd-utils package may now be used and their output trusted.
> > >
> > > Timings may not be kept from the bootloader anymore, the timings
> > > used for instance in U-Boot were not optimal and it supposed to
> > > have NAND support (and initialized) in the bootloader.
> > >
> > > Thanks to the improved timings, implementation of ONFI mode 5
> > > support (with EDO managed by adding a delay on data sampling),
> > > merging the commands together and optimizing writes in the command
> > > registers, the new driver may achieve faster throughputs in both
> > > directions. Measurements show an improvement of about +23% read
> > > throughput and +24% write throughput. These measurements have been
> > > done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit
> > > strength BCH ECC correction) using the userspace tool 'flash_speed'
> > > from the MTD test suite.
> > >
> > > Besides these important topics, the new driver addresses several
> > > unsolved known issues in the old driver which:
> > > - did not work with ECC soft neither with ECC none ;
> > > - relied on naked read/write (which is unchanged) while the NFCv1
> > >   embedded in the pxa3xx platforms do not implement it, so several
> > >   NAND commands did not actually ever work without any notice (like
> > >   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > > - wrote the OOB data correctly, but was not able to read it
> > > correctly past the first OOB data chunk ;
> > > - did not displayed ECC bytes ;
> > > - used device tree bindings that did not allow more than one NAND
> > > chip, and did not allow to choose the correct chip select if not
> > >   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
> > >
> > > Old device tree bindings are still supported but deprecated. A more
> > > hierarchical view has to be used to keep the controller and the NAND
> > > chip structures clearly separated both inside the device tree and
> > > also in the driver code.
> > >    
> > 
> > So, is this driver fully compatible with the current pxa3xx-nand
> > driver?  
> 
> It should be!
> 
> > 
> > Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> > 
> > I recally some subtle issues with the fact that U-Boot and Linux had
> > to agree about the BBT format.  
> 
> I kept the pxa3xx_nand driver BBT format.
> 
> This is something I mistakenly omitted from the commit message:
> 
> There are 5 supported layouts in the driver (the same as withing the
> pxa3xx_nand driver):
>     1/ Page: 512B, strength 1b/512B (hamming)
>     2/ Page: 2kiB, strength 4b/2kiB (hamming)
>     3/ page: 2kiB, strength 16b/2kiB (BCH)
>     4/ page: 4kiB, strength 16b/2kiB (BCH)
>     5/ page: 4kiB, strength 32b/2kiB (BCH)

Are you sure of #5? I thought the engine was only capable of modifying
the ECC block size, not the strength. If this is the case, then mode #5
is actually 16b/1024kiB.

> 
> Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
> and without DMA.
> Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB and
> an Armada 8040 DB.
> Layout 5 has been tested with an Armada 398 db.
> 
> Layout 1 has been tested with the Armada 385 db with some hacks.
> Layout 3 has been tested with the Armada 385 db with some other hacks,
> that is why I am concerned about the other thread on the MTD mailing
> list "wait timeout when scanning for BB" where a 2kiB page with
> 16b/2048B strength is in use.
> 
> Regards,
> Miquèl

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-11 17:05               ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-11 17:05 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Ezequiel Garcia, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia, Thomas Petazzoni, devicetree, Antoine Tenart,
	Nadav Haklai, linux-mtd, Neta Zur Hershkovits, Hanna Hawa,
	Ofer Heifetz, linux-arm-kernel

On Mon, 11 Dec 2017 17:55:06 +0100
Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:

> On Mon, 11 Dec 2017 13:27:30 -0300
> Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> 
> > On 7 December 2017 at 17:18, Miquel Raynal
> > <miquel.raynal@free-electrons.com> wrote:  
> > > Add marvell_nand driver which aims at replacing the existing
> > > pxa3xx_nand driver.
> > >
> > > The new driver intends to be easier to understand and follows the
> > > brand new NAND framework rules by implementing hooks for every
> > > pattern the controller might support and referencing them inside a
> > > parser object that will be given to the core at each ->exec_op()
> > > call.
> > >
> > > Raw accessors are implemented, useful to test/debug
> > > memory/filesystem corruptions. Userspace binaries contained in the
> > > mtd-utils package may now be used and their output trusted.
> > >
> > > Timings may not be kept from the bootloader anymore, the timings
> > > used for instance in U-Boot were not optimal and it supposed to
> > > have NAND support (and initialized) in the bootloader.
> > >
> > > Thanks to the improved timings, implementation of ONFI mode 5
> > > support (with EDO managed by adding a delay on data sampling),
> > > merging the commands together and optimizing writes in the command
> > > registers, the new driver may achieve faster throughputs in both
> > > directions. Measurements show an improvement of about +23% read
> > > throughput and +24% write throughput. These measurements have been
> > > done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit
> > > strength BCH ECC correction) using the userspace tool 'flash_speed'
> > > from the MTD test suite.
> > >
> > > Besides these important topics, the new driver addresses several
> > > unsolved known issues in the old driver which:
> > > - did not work with ECC soft neither with ECC none ;
> > > - relied on naked read/write (which is unchanged) while the NFCv1
> > >   embedded in the pxa3xx platforms do not implement it, so several
> > >   NAND commands did not actually ever work without any notice (like
> > >   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > > - wrote the OOB data correctly, but was not able to read it
> > > correctly past the first OOB data chunk ;
> > > - did not displayed ECC bytes ;
> > > - used device tree bindings that did not allow more than one NAND
> > > chip, and did not allow to choose the correct chip select if not
> > >   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
> > >
> > > Old device tree bindings are still supported but deprecated. A more
> > > hierarchical view has to be used to keep the controller and the NAND
> > > chip structures clearly separated both inside the device tree and
> > > also in the driver code.
> > >    
> > 
> > So, is this driver fully compatible with the current pxa3xx-nand
> > driver?  
> 
> It should be!
> 
> > 
> > Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> > 
> > I recally some subtle issues with the fact that U-Boot and Linux had
> > to agree about the BBT format.  
> 
> I kept the pxa3xx_nand driver BBT format.
> 
> This is something I mistakenly omitted from the commit message:
> 
> There are 5 supported layouts in the driver (the same as withing the
> pxa3xx_nand driver):
>     1/ Page: 512B, strength 1b/512B (hamming)
>     2/ Page: 2kiB, strength 4b/2kiB (hamming)
>     3/ page: 2kiB, strength 16b/2kiB (BCH)
>     4/ page: 4kiB, strength 16b/2kiB (BCH)
>     5/ page: 4kiB, strength 32b/2kiB (BCH)

Are you sure of #5? I thought the engine was only capable of modifying
the ECC block size, not the strength. If this is the case, then mode #5
is actually 16b/1024kiB.

> 
> Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
> and without DMA.
> Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB and
> an Armada 8040 DB.
> Layout 5 has been tested with an Armada 398 db.
> 
> Layout 1 has been tested with the Armada 385 db with some hacks.
> Layout 3 has been tested with the Armada 385 db with some other hacks,
> that is why I am concerned about the other thread on the MTD mailing
> list "wait timeout when scanning for BB" where a 2kiB page with
> 16b/2048B strength is in use.
> 
> Regards,
> Miquèl

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-11 17:05               ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-11 17:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 11 Dec 2017 17:55:06 +0100
Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:

> On Mon, 11 Dec 2017 13:27:30 -0300
> Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> 
> > On 7 December 2017 at 17:18, Miquel Raynal
> > <miquel.raynal@free-electrons.com> wrote:  
> > > Add marvell_nand driver which aims at replacing the existing
> > > pxa3xx_nand driver.
> > >
> > > The new driver intends to be easier to understand and follows the
> > > brand new NAND framework rules by implementing hooks for every
> > > pattern the controller might support and referencing them inside a
> > > parser object that will be given to the core at each ->exec_op()
> > > call.
> > >
> > > Raw accessors are implemented, useful to test/debug
> > > memory/filesystem corruptions. Userspace binaries contained in the
> > > mtd-utils package may now be used and their output trusted.
> > >
> > > Timings may not be kept from the bootloader anymore, the timings
> > > used for instance in U-Boot were not optimal and it supposed to
> > > have NAND support (and initialized) in the bootloader.
> > >
> > > Thanks to the improved timings, implementation of ONFI mode 5
> > > support (with EDO managed by adding a delay on data sampling),
> > > merging the commands together and optimizing writes in the command
> > > registers, the new driver may achieve faster throughputs in both
> > > directions. Measurements show an improvement of about +23% read
> > > throughput and +24% write throughput. These measurements have been
> > > done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit
> > > strength BCH ECC correction) using the userspace tool 'flash_speed'
> > > from the MTD test suite.
> > >
> > > Besides these important topics, the new driver addresses several
> > > unsolved known issues in the old driver which:
> > > - did not work with ECC soft neither with ECC none ;
> > > - relied on naked read/write (which is unchanged) while the NFCv1
> > >   embedded in the pxa3xx platforms do not implement it, so several
> > >   NAND commands did not actually ever work without any notice (like
> > >   reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > > - wrote the OOB data correctly, but was not able to read it
> > > correctly past the first OOB data chunk ;
> > > - did not displayed ECC bytes ;
> > > - used device tree bindings that did not allow more than one NAND
> > > chip, and did not allow to choose the correct chip select if not
> > >   incrementing from 0. Plus, the Ready/Busy line used had to be 0.
> > >
> > > Old device tree bindings are still supported but deprecated. A more
> > > hierarchical view has to be used to keep the controller and the NAND
> > > chip structures clearly separated both inside the device tree and
> > > also in the driver code.
> > >    
> > 
> > So, is this driver fully compatible with the current pxa3xx-nand
> > driver?  
> 
> It should be!
> 
> > 
> > Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> > 
> > I recally some subtle issues with the fact that U-Boot and Linux had
> > to agree about the BBT format.  
> 
> I kept the pxa3xx_nand driver BBT format.
> 
> This is something I mistakenly omitted from the commit message:
> 
> There are 5 supported layouts in the driver (the same as withing the
> pxa3xx_nand driver):
>     1/ Page: 512B, strength 1b/512B (hamming)
>     2/ Page: 2kiB, strength 4b/2kiB (hamming)
>     3/ page: 2kiB, strength 16b/2kiB (BCH)
>     4/ page: 4kiB, strength 16b/2kiB (BCH)
>     5/ page: 4kiB, strength 32b/2kiB (BCH)

Are you sure of #5? I thought the engine was only capable of modifying
the ECC block size, not the strength. If this is the case, then mode #5
is actually 16b/1024kiB.

> 
> Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
> and without DMA.
> Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB and
> an Armada 8040 DB.
> Layout 5 has been tested with an Armada 398 db.
> 
> Layout 1 has been tested with the Armada 385 db with some hacks.
> Layout 3 has been tested with the Armada 385 db with some other hacks,
> that is why I am concerned about the other thread on the MTD mailing
> list "wait timeout when scanning for BB" where a 2kiB page with
> 16b/2048B strength is in use.
> 
> Regards,
> Miqu?l

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
  2017-12-11 17:05               ` Boris Brezillon
  (?)
@ 2017-12-11 21:02                 ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-11 21:02 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Ezequiel Garcia, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon

On Mon, 11 Dec 2017 18:05:11 +0100
Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> On Mon, 11 Dec 2017 17:55:06 +0100
> Miquel RAYNAL <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> 
> > On Mon, 11 Dec 2017 13:27:30 -0300
> > Ezequiel Garcia <ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org> wrote:
> >   
> > > On 7 December 2017 at 17:18, Miquel Raynal
> > > <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:    
> > > > Add marvell_nand driver which aims at replacing the existing
> > > > pxa3xx_nand driver.
> > > >
> > > > The new driver intends to be easier to understand and follows
> > > > the brand new NAND framework rules by implementing hooks for
> > > > every pattern the controller might support and referencing them
> > > > inside a parser object that will be given to the core at each
> > > > ->exec_op() call.
> > > >
> > > > Raw accessors are implemented, useful to test/debug
> > > > memory/filesystem corruptions. Userspace binaries contained in
> > > > the mtd-utils package may now be used and their output trusted.
> > > >
> > > > Timings may not be kept from the bootloader anymore, the timings
> > > > used for instance in U-Boot were not optimal and it supposed to
> > > > have NAND support (and initialized) in the bootloader.
> > > >
> > > > Thanks to the improved timings, implementation of ONFI mode 5
> > > > support (with EDO managed by adding a delay on data sampling),
> > > > merging the commands together and optimizing writes in the
> > > > command registers, the new driver may achieve faster
> > > > throughputs in both directions. Measurements show an
> > > > improvement of about +23% read throughput and +24% write
> > > > throughput. These measurements have been done with an
> > > > Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH
> > > > ECC correction) using the userspace tool 'flash_speed' from the
> > > > MTD test suite.
> > > >
> > > > Besides these important topics, the new driver addresses several
> > > > unsolved known issues in the old driver which:
> > > > - did not work with ECC soft neither with ECC none ;
> > > > - relied on naked read/write (which is unchanged) while the
> > > > NFCv1 embedded in the pxa3xx platforms do not implement it, so
> > > > several NAND commands did not actually ever work without any
> > > > notice (like reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > > > - wrote the OOB data correctly, but was not able to read it
> > > > correctly past the first OOB data chunk ;
> > > > - did not displayed ECC bytes ;
> > > > - used device tree bindings that did not allow more than one
> > > > NAND chip, and did not allow to choose the correct chip select
> > > > if not incrementing from 0. Plus, the Ready/Busy line used had
> > > > to be 0.
> > > >
> > > > Old device tree bindings are still supported but deprecated. A
> > > > more hierarchical view has to be used to keep the controller
> > > > and the NAND chip structures clearly separated both inside the
> > > > device tree and also in the driver code.
> > > >      
> > > 
> > > So, is this driver fully compatible with the current pxa3xx-nand
> > > driver?    
> > 
> > It should be!
> >   
> > > 
> > > Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> > > 
> > > I recally some subtle issues with the fact that U-Boot and Linux
> > > had to agree about the BBT format.    
> > 
> > I kept the pxa3xx_nand driver BBT format.
> > 
> > This is something I mistakenly omitted from the commit message:
> > 
> > There are 5 supported layouts in the driver (the same as withing the
> > pxa3xx_nand driver):
> >     1/ Page: 512B, strength 1b/512B (hamming)
> >     2/ Page: 2kiB, strength 4b/2kiB (hamming)
> >     3/ page: 2kiB, strength 16b/2kiB (BCH)
> >     4/ page: 4kiB, strength 16b/2kiB (BCH)
> >     5/ page: 4kiB, strength 32b/2kiB (BCH)  
> 
> Are you sure of #5? I thought the engine was only capable of modifying
> the ECC block size, not the strength. If this is the case, then mode
> #5 is actually 16b/1024kiB.

You are right, #5 you actually be:

    5/ page: 4kiB, strength 16b/1kiB (BCH)  

Thanks for pointing it,
Miquèl

> 
> > 
> > Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
> > and without DMA.
> > Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB
> > and an Armada 8040 DB.
> > Layout 5 has been tested with an Armada 398 db.
> > 
> > Layout 1 has been tested with the Armada 385 db with some hacks.
> > Layout 3 has been tested with the Armada 385 db with some other
> > hacks, that is why I am concerned about the other thread on the MTD
> > mailing list "wait timeout when scanning for BB" where a 2kiB page
> > with 16b/2048B strength is in use.
> > 
> > Regards,
> > Miquèl  
> 



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-11 21:02                 ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-11 21:02 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Ezequiel Garcia, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik, Eric Miao, Catalin Marinas, Will Deacon,
	Ezequiel Garcia, Thomas Petazzoni, devicetree, Antoine Tenart,
	Nadav Haklai, linux-mtd, Neta Zur Hershkovits, Hanna Hawa,
	Ofer Heifetz, linux-arm-kernel

On Mon, 11 Dec 2017 18:05:11 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> On Mon, 11 Dec 2017 17:55:06 +0100
> Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:
> 
> > On Mon, 11 Dec 2017 13:27:30 -0300
> > Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> >   
> > > On 7 December 2017 at 17:18, Miquel Raynal
> > > <miquel.raynal@free-electrons.com> wrote:    
> > > > Add marvell_nand driver which aims at replacing the existing
> > > > pxa3xx_nand driver.
> > > >
> > > > The new driver intends to be easier to understand and follows
> > > > the brand new NAND framework rules by implementing hooks for
> > > > every pattern the controller might support and referencing them
> > > > inside a parser object that will be given to the core at each
> > > > ->exec_op() call.
> > > >
> > > > Raw accessors are implemented, useful to test/debug
> > > > memory/filesystem corruptions. Userspace binaries contained in
> > > > the mtd-utils package may now be used and their output trusted.
> > > >
> > > > Timings may not be kept from the bootloader anymore, the timings
> > > > used for instance in U-Boot were not optimal and it supposed to
> > > > have NAND support (and initialized) in the bootloader.
> > > >
> > > > Thanks to the improved timings, implementation of ONFI mode 5
> > > > support (with EDO managed by adding a delay on data sampling),
> > > > merging the commands together and optimizing writes in the
> > > > command registers, the new driver may achieve faster
> > > > throughputs in both directions. Measurements show an
> > > > improvement of about +23% read throughput and +24% write
> > > > throughput. These measurements have been done with an
> > > > Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH
> > > > ECC correction) using the userspace tool 'flash_speed' from the
> > > > MTD test suite.
> > > >
> > > > Besides these important topics, the new driver addresses several
> > > > unsolved known issues in the old driver which:
> > > > - did not work with ECC soft neither with ECC none ;
> > > > - relied on naked read/write (which is unchanged) while the
> > > > NFCv1 embedded in the pxa3xx platforms do not implement it, so
> > > > several NAND commands did not actually ever work without any
> > > > notice (like reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > > > - wrote the OOB data correctly, but was not able to read it
> > > > correctly past the first OOB data chunk ;
> > > > - did not displayed ECC bytes ;
> > > > - used device tree bindings that did not allow more than one
> > > > NAND chip, and did not allow to choose the correct chip select
> > > > if not incrementing from 0. Plus, the Ready/Busy line used had
> > > > to be 0.
> > > >
> > > > Old device tree bindings are still supported but deprecated. A
> > > > more hierarchical view has to be used to keep the controller
> > > > and the NAND chip structures clearly separated both inside the
> > > > device tree and also in the driver code.
> > > >      
> > > 
> > > So, is this driver fully compatible with the current pxa3xx-nand
> > > driver?    
> > 
> > It should be!
> >   
> > > 
> > > Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> > > 
> > > I recally some subtle issues with the fact that U-Boot and Linux
> > > had to agree about the BBT format.    
> > 
> > I kept the pxa3xx_nand driver BBT format.
> > 
> > This is something I mistakenly omitted from the commit message:
> > 
> > There are 5 supported layouts in the driver (the same as withing the
> > pxa3xx_nand driver):
> >     1/ Page: 512B, strength 1b/512B (hamming)
> >     2/ Page: 2kiB, strength 4b/2kiB (hamming)
> >     3/ page: 2kiB, strength 16b/2kiB (BCH)
> >     4/ page: 4kiB, strength 16b/2kiB (BCH)
> >     5/ page: 4kiB, strength 32b/2kiB (BCH)  
> 
> Are you sure of #5? I thought the engine was only capable of modifying
> the ECC block size, not the strength. If this is the case, then mode
> #5 is actually 16b/1024kiB.

You are right, #5 you actually be:

    5/ page: 4kiB, strength 16b/1kiB (BCH)  

Thanks for pointing it,
Miquèl

> 
> > 
> > Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
> > and without DMA.
> > Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB
> > and an Armada 8040 DB.
> > Layout 5 has been tested with an Armada 398 db.
> > 
> > Layout 1 has been tested with the Armada 385 db with some hacks.
> > Layout 3 has been tested with the Armada 385 db with some other
> > hacks, that is why I am concerned about the other thread on the MTD
> > mailing list "wait timeout when scanning for BB" where a 2kiB page
> > with 16b/2048B strength is in use.
> > 
> > Regards,
> > Miquèl  
> 



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver
@ 2017-12-11 21:02                 ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-11 21:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 11 Dec 2017 18:05:11 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> On Mon, 11 Dec 2017 17:55:06 +0100
> Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:
> 
> > On Mon, 11 Dec 2017 13:27:30 -0300
> > Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> >   
> > > On 7 December 2017 at 17:18, Miquel Raynal
> > > <miquel.raynal@free-electrons.com> wrote:    
> > > > Add marvell_nand driver which aims at replacing the existing
> > > > pxa3xx_nand driver.
> > > >
> > > > The new driver intends to be easier to understand and follows
> > > > the brand new NAND framework rules by implementing hooks for
> > > > every pattern the controller might support and referencing them
> > > > inside a parser object that will be given to the core at each
> > > > ->exec_op() call.
> > > >
> > > > Raw accessors are implemented, useful to test/debug
> > > > memory/filesystem corruptions. Userspace binaries contained in
> > > > the mtd-utils package may now be used and their output trusted.
> > > >
> > > > Timings may not be kept from the bootloader anymore, the timings
> > > > used for instance in U-Boot were not optimal and it supposed to
> > > > have NAND support (and initialized) in the bootloader.
> > > >
> > > > Thanks to the improved timings, implementation of ONFI mode 5
> > > > support (with EDO managed by adding a delay on data sampling),
> > > > merging the commands together and optimizing writes in the
> > > > command registers, the new driver may achieve faster
> > > > throughputs in both directions. Measurements show an
> > > > improvement of about +23% read throughput and +24% write
> > > > throughput. These measurements have been done with an
> > > > Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH
> > > > ECC correction) using the userspace tool 'flash_speed' from the
> > > > MTD test suite.
> > > >
> > > > Besides these important topics, the new driver addresses several
> > > > unsolved known issues in the old driver which:
> > > > - did not work with ECC soft neither with ECC none ;
> > > > - relied on naked read/write (which is unchanged) while the
> > > > NFCv1 embedded in the pxa3xx platforms do not implement it, so
> > > > several NAND commands did not actually ever work without any
> > > > notice (like reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ;
> > > > - wrote the OOB data correctly, but was not able to read it
> > > > correctly past the first OOB data chunk ;
> > > > - did not displayed ECC bytes ;
> > > > - used device tree bindings that did not allow more than one
> > > > NAND chip, and did not allow to choose the correct chip select
> > > > if not incrementing from 0. Plus, the Ready/Busy line used had
> > > > to be 0.
> > > >
> > > > Old device tree bindings are still supported but deprecated. A
> > > > more hierarchical view has to be used to keep the controller
> > > > and the NAND chip structures clearly separated both inside the
> > > > device tree and also in the driver code.
> > > >      
> > > 
> > > So, is this driver fully compatible with the current pxa3xx-nand
> > > driver?    
> > 
> > It should be!
> >   
> > > 
> > > Have you tested with U-Boot's driver (based on the pxa3xx-nand)?
> > > 
> > > I recally some subtle issues with the fact that U-Boot and Linux
> > > had to agree about the BBT format.    
> > 
> > I kept the pxa3xx_nand driver BBT format.
> > 
> > This is something I mistakenly omitted from the commit message:
> > 
> > There are 5 supported layouts in the driver (the same as withing the
> > pxa3xx_nand driver):
> >     1/ Page: 512B, strength 1b/512B (hamming)
> >     2/ Page: 2kiB, strength 4b/2kiB (hamming)
> >     3/ page: 2kiB, strength 16b/2kiB (BCH)
> >     4/ page: 4kiB, strength 16b/2kiB (BCH)
> >     5/ page: 4kiB, strength 32b/2kiB (BCH)  
> 
> Are you sure of #5? I thought the engine was only capable of modifying
> the ECC block size, not the strength. If this is the case, then mode
> #5 is actually 16b/1024kiB.

You are right, #5 you actually be:

    5/ page: 4kiB, strength 16b/1kiB (BCH)  

Thanks for pointing it,
Miqu?l

> 
> > 
> > Layout 2 has been tested with CM_X300 compulab module (PXA SoC) with
> > and without DMA.
> > Layout 4 has been tested with an Armada 385 db, an Armada 7040 DB
> > and an Armada 8040 DB.
> > Layout 5 has been tested with an Armada 398 db.
> > 
> > Layout 1 has been tested with the Armada 385 db with some hacks.
> > Layout 3 has been tested with the Armada 385 db with some other
> > hacks, that is why I am concerned about the other thread on the MTD
> > mailing list "wait timeout when scanning for BB" where a 2kiB page
> > with 16b/2048B strength is in use.
> > 
> > Regards,
> > Miqu?l  
> 



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-07 20:18 ` Miquel Raynal
  (?)
@ 2017-12-14  6:09     ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-14  6:09 UTC (permalink / raw)
  To: Miquel Raynal, Robert Jarzmik
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
	Cyrille Pitchen, Rob Herring, Mark Rutland, Jason Cooper,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Russell King, Daniel Mack, Haojian Zhuang, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd-IAPFreCvJWMP3drIcvDWNA

Hi,

On Thu,  7 Dec 2017 21:18:02 +0100
Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Hi,
> 
> After the addition of the NAND framework ->exec_op() interface (see [1]
> for the series preparing it and [2] for the last version of the
> core-side implementation of ->exec_op() itself), this series replaces
> the current Marvell NAND controller driver pxa3xx_nand.c with a rework
> called marvell_nand.c.
> 
> Aside the fact that it drops the big state machine, improves the overall
> speed and implements raw accesses, it is the first driver-side
> implementation of the ->exec_op() interface and may be used as reference
> for latter reworks of the same type.
> 
> One may find more detail about why a completely new driver is needed in
> the commit log of:
> 
>     "mtd: nand: add reworked Marvell NAND controller driver"
> 
> The series also changes the device tree NAND node definition for all
> platforms referring to the Marvell driver to use the new bindings. They
> are more hierarchical and fit the real organization of the hardware, by
> having NAND partitions that are part of NAND chip nodes, themselves part
> of the NAND controller node.
> 
> These changes have been tested on:
>    - PXA3xx platform with a CM-X300 board (2kiB page NAND, 1b/512B
>      strength, Hamming ECC engine) [32 bits]
>    - Armada 385 DB AP (4kiB page NAND, 4b/512B, BCH ECC engine) [32 bits]
>    - Armada 398 DB (4kiB page NAND, 8b/512B, BCH ECC engine using a layout
>      with a last chunk different than the others) [32 bits]
>    - Armada 7040 DB and Armada 8040 DB (4kiB page NAND, 4b/512B, BCH ECC
>      engine) [64 bits]
> 
> Robert, it would be great if you could also do more testing on PXA and
> validate this driver. If needed, a branch ready to be tested is
> available at [3]. It is based on nand/next and has all the changes
> brought by the previously mentionned series as well as this one.

Robert, do you think you'll have some time to test Miquel's branch on
your PXA boards? Miquel already tested on one of these boards (CM-X300),
but we'd like to have other testers. Also feel free to review the
driver if have the time.

Thanks,

Boris

> 
> Thank you,
> Miquèl
> 
> 
> [1] https://www.spinics.net/lists/arm-kernel/msg619633.html
> [2] http://lists.infradead.org/pipermail/linux-mtd/2017-December/077965.html
> [3] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc-rework
> 
> Miquel Raynal (12):
>   dt-bindings: mtd: add Marvell NAND controller documentation
>   mtd: nand: add reworked Marvell NAND controller driver
>   mtd: nand: replace pxa3xx_nand driver by its rework called
>     marvell_nand
>   dt-bindings: mtd: remove pxa3xx NAND controller documentation
>   mtd: nand: remove useless fields from pxa3xx NAND platform data
>   ARM: dts: armada-370-xp: use reworked NAND controller driver
>   ARM: dts: armada-375: use reworked NAND controller driver
>   ARM: dts: armada-38x: use reworked NAND controller driver
>   ARM: dts: armada-39x: use reworked NAND controller driver
>   ARM: dts: pxa: use reworked NAND controller driver
>   ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
>   ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
> 
>  .../devicetree/bindings/mtd/marvell-nand.txt       |   84 +
>  .../devicetree/bindings/mtd/pxa3xx-nand.txt        |   50 -
>  arch/arm/boot/dts/armada-370-db.dts                |   57 +-
>  arch/arm/boot/dts/armada-370-dlink-dns327l.dts     |  120 +-
>  arch/arm/boot/dts/armada-370-mirabox.dts           |   51 +-
>  arch/arm/boot/dts/armada-370-netgear-rn102.dts     |   90 +-
>  arch/arm/boot/dts/armada-370-netgear-rn104.dts     |   90 +-
>  arch/arm/boot/dts/armada-370-rd.dts                |   52 +-
>  arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |   64 +-
>  arch/arm/boot/dts/armada-370-xp.dtsi               |    6 +-
>  arch/arm/boot/dts/armada-375-db.dts                |   50 +-
>  arch/arm/boot/dts/armada-375.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-385-db-ap.dts             |   69 +-
>  arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  129 +-
>  arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  129 +-
>  arch/arm/boot/dts/armada-385-linksys-rango.dts     |  141 +-
>  arch/arm/boot/dts/armada-385-linksys-shelby.dts    |  129 +-
>  arch/arm/boot/dts/armada-385-linksys.dtsi          |   16 +-
>  arch/arm/boot/dts/armada-388-db.dts                |   55 +-
>  arch/arm/boot/dts/armada-38x.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-390-db.dts                |   66 +-
>  arch/arm/boot/dts/armada-395-gp.dts                |   74 +-
>  arch/arm/boot/dts/armada-398-db.dts                |   60 +-
>  arch/arm/boot/dts/armada-39x.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |    2 +-
>  arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |    2 +-
>  arch/arm/boot/dts/armada-xp-db.dts                 |    2 +-
>  arch/arm/boot/dts/armada-xp-gp.dts                 |    2 +-
>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |    2 +-
>  arch/arm/boot/dts/armada-xp-linksys-mamba.dts      |  156 +-
>  arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |   90 +-
>  arch/arm/boot/dts/pxa3xx.dtsi                      |    6 +-
>  arch/arm/configs/cm_x300_defconfig                 |    2 +-
>  arch/arm/configs/mvebu_v7_defconfig                |    2 +-
>  arch/arm/configs/pxa3xx_defconfig                  |    3 +-
>  arch/arm/configs/pxa_defconfig                     |    2 +-
>  arch/arm/configs/raumfeld_defconfig                |    2 +-
>  arch/arm/mach-mmp/ttc_dkb.c                        |    4 +-
>  arch/arm/mach-pxa/cm-x300.c                        |    8 +-
>  arch/arm/mach-pxa/colibri-pxa3xx.c                 |    8 +-
>  arch/arm/mach-pxa/colibri.h                        |    2 +-
>  arch/arm/mach-pxa/littleton.c                      |   10 +-
>  arch/arm/mach-pxa/mxm8x10.c                        |   10 +-
>  arch/arm/mach-pxa/raumfeld.c                       |    6 +-
>  arch/arm/mach-pxa/zylonite.c                       |   10 +-
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     |   52 +-
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     |   46 +-
>  .../boot/dts/marvell/armada-cp110-master.dtsi      |    8 +-
>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi |   10 +-
>  drivers/mtd/nand/Kconfig                           |   12 +
>  drivers/mtd/nand/Makefile                          |    2 +-
>  drivers/mtd/nand/marvell_nand.c                    | 2950 ++++++++++++++++++++
>  drivers/mtd/nand/pxa3xx_nand.c                     | 2104 --------------
>  include/linux/platform_data/mtd-nand-pxa3xx.h      |   43 +-
>  54 files changed, 4093 insertions(+), 3065 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
>  delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
>  create mode 100644 drivers/mtd/nand/marvell_nand.c
>  delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-14  6:09     ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-14  6:09 UTC (permalink / raw)
  To: Miquel Raynal, Robert Jarzmik
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
	Cyrille Pitchen, Rob Herring, Mark Rutland, Jason Cooper,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Russell King, Daniel Mack, Haojian Zhuang, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia, linux-mtd,
	devicetree, linux-arm-kernel, Thomas Petazzoni, Antoine Tenart,
	Nadav Haklai, Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Hi,

On Thu,  7 Dec 2017 21:18:02 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Hi,
> 
> After the addition of the NAND framework ->exec_op() interface (see [1]
> for the series preparing it and [2] for the last version of the
> core-side implementation of ->exec_op() itself), this series replaces
> the current Marvell NAND controller driver pxa3xx_nand.c with a rework
> called marvell_nand.c.
> 
> Aside the fact that it drops the big state machine, improves the overall
> speed and implements raw accesses, it is the first driver-side
> implementation of the ->exec_op() interface and may be used as reference
> for latter reworks of the same type.
> 
> One may find more detail about why a completely new driver is needed in
> the commit log of:
> 
>     "mtd: nand: add reworked Marvell NAND controller driver"
> 
> The series also changes the device tree NAND node definition for all
> platforms referring to the Marvell driver to use the new bindings. They
> are more hierarchical and fit the real organization of the hardware, by
> having NAND partitions that are part of NAND chip nodes, themselves part
> of the NAND controller node.
> 
> These changes have been tested on:
>    - PXA3xx platform with a CM-X300 board (2kiB page NAND, 1b/512B
>      strength, Hamming ECC engine) [32 bits]
>    - Armada 385 DB AP (4kiB page NAND, 4b/512B, BCH ECC engine) [32 bits]
>    - Armada 398 DB (4kiB page NAND, 8b/512B, BCH ECC engine using a layout
>      with a last chunk different than the others) [32 bits]
>    - Armada 7040 DB and Armada 8040 DB (4kiB page NAND, 4b/512B, BCH ECC
>      engine) [64 bits]
> 
> Robert, it would be great if you could also do more testing on PXA and
> validate this driver. If needed, a branch ready to be tested is
> available at [3]. It is based on nand/next and has all the changes
> brought by the previously mentionned series as well as this one.

Robert, do you think you'll have some time to test Miquel's branch on
your PXA boards? Miquel already tested on one of these boards (CM-X300),
but we'd like to have other testers. Also feel free to review the
driver if have the time.

Thanks,

Boris

> 
> Thank you,
> Miquèl
> 
> 
> [1] https://www.spinics.net/lists/arm-kernel/msg619633.html
> [2] http://lists.infradead.org/pipermail/linux-mtd/2017-December/077965.html
> [3] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc-rework
> 
> Miquel Raynal (12):
>   dt-bindings: mtd: add Marvell NAND controller documentation
>   mtd: nand: add reworked Marvell NAND controller driver
>   mtd: nand: replace pxa3xx_nand driver by its rework called
>     marvell_nand
>   dt-bindings: mtd: remove pxa3xx NAND controller documentation
>   mtd: nand: remove useless fields from pxa3xx NAND platform data
>   ARM: dts: armada-370-xp: use reworked NAND controller driver
>   ARM: dts: armada-375: use reworked NAND controller driver
>   ARM: dts: armada-38x: use reworked NAND controller driver
>   ARM: dts: armada-39x: use reworked NAND controller driver
>   ARM: dts: pxa: use reworked NAND controller driver
>   ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
>   ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
> 
>  .../devicetree/bindings/mtd/marvell-nand.txt       |   84 +
>  .../devicetree/bindings/mtd/pxa3xx-nand.txt        |   50 -
>  arch/arm/boot/dts/armada-370-db.dts                |   57 +-
>  arch/arm/boot/dts/armada-370-dlink-dns327l.dts     |  120 +-
>  arch/arm/boot/dts/armada-370-mirabox.dts           |   51 +-
>  arch/arm/boot/dts/armada-370-netgear-rn102.dts     |   90 +-
>  arch/arm/boot/dts/armada-370-netgear-rn104.dts     |   90 +-
>  arch/arm/boot/dts/armada-370-rd.dts                |   52 +-
>  arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |   64 +-
>  arch/arm/boot/dts/armada-370-xp.dtsi               |    6 +-
>  arch/arm/boot/dts/armada-375-db.dts                |   50 +-
>  arch/arm/boot/dts/armada-375.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-385-db-ap.dts             |   69 +-
>  arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  129 +-
>  arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  129 +-
>  arch/arm/boot/dts/armada-385-linksys-rango.dts     |  141 +-
>  arch/arm/boot/dts/armada-385-linksys-shelby.dts    |  129 +-
>  arch/arm/boot/dts/armada-385-linksys.dtsi          |   16 +-
>  arch/arm/boot/dts/armada-388-db.dts                |   55 +-
>  arch/arm/boot/dts/armada-38x.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-390-db.dts                |   66 +-
>  arch/arm/boot/dts/armada-395-gp.dts                |   74 +-
>  arch/arm/boot/dts/armada-398-db.dts                |   60 +-
>  arch/arm/boot/dts/armada-39x.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |    2 +-
>  arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |    2 +-
>  arch/arm/boot/dts/armada-xp-db.dts                 |    2 +-
>  arch/arm/boot/dts/armada-xp-gp.dts                 |    2 +-
>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |    2 +-
>  arch/arm/boot/dts/armada-xp-linksys-mamba.dts      |  156 +-
>  arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |   90 +-
>  arch/arm/boot/dts/pxa3xx.dtsi                      |    6 +-
>  arch/arm/configs/cm_x300_defconfig                 |    2 +-
>  arch/arm/configs/mvebu_v7_defconfig                |    2 +-
>  arch/arm/configs/pxa3xx_defconfig                  |    3 +-
>  arch/arm/configs/pxa_defconfig                     |    2 +-
>  arch/arm/configs/raumfeld_defconfig                |    2 +-
>  arch/arm/mach-mmp/ttc_dkb.c                        |    4 +-
>  arch/arm/mach-pxa/cm-x300.c                        |    8 +-
>  arch/arm/mach-pxa/colibri-pxa3xx.c                 |    8 +-
>  arch/arm/mach-pxa/colibri.h                        |    2 +-
>  arch/arm/mach-pxa/littleton.c                      |   10 +-
>  arch/arm/mach-pxa/mxm8x10.c                        |   10 +-
>  arch/arm/mach-pxa/raumfeld.c                       |    6 +-
>  arch/arm/mach-pxa/zylonite.c                       |   10 +-
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     |   52 +-
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     |   46 +-
>  .../boot/dts/marvell/armada-cp110-master.dtsi      |    8 +-
>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi |   10 +-
>  drivers/mtd/nand/Kconfig                           |   12 +
>  drivers/mtd/nand/Makefile                          |    2 +-
>  drivers/mtd/nand/marvell_nand.c                    | 2950 ++++++++++++++++++++
>  drivers/mtd/nand/pxa3xx_nand.c                     | 2104 --------------
>  include/linux/platform_data/mtd-nand-pxa3xx.h      |   43 +-
>  54 files changed, 4093 insertions(+), 3065 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
>  delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
>  create mode 100644 drivers/mtd/nand/marvell_nand.c
>  delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c
> 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-14  6:09     ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-14  6:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu,  7 Dec 2017 21:18:02 +0100
Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Hi,
> 
> After the addition of the NAND framework ->exec_op() interface (see [1]
> for the series preparing it and [2] for the last version of the
> core-side implementation of ->exec_op() itself), this series replaces
> the current Marvell NAND controller driver pxa3xx_nand.c with a rework
> called marvell_nand.c.
> 
> Aside the fact that it drops the big state machine, improves the overall
> speed and implements raw accesses, it is the first driver-side
> implementation of the ->exec_op() interface and may be used as reference
> for latter reworks of the same type.
> 
> One may find more detail about why a completely new driver is needed in
> the commit log of:
> 
>     "mtd: nand: add reworked Marvell NAND controller driver"
> 
> The series also changes the device tree NAND node definition for all
> platforms referring to the Marvell driver to use the new bindings. They
> are more hierarchical and fit the real organization of the hardware, by
> having NAND partitions that are part of NAND chip nodes, themselves part
> of the NAND controller node.
> 
> These changes have been tested on:
>    - PXA3xx platform with a CM-X300 board (2kiB page NAND, 1b/512B
>      strength, Hamming ECC engine) [32 bits]
>    - Armada 385 DB AP (4kiB page NAND, 4b/512B, BCH ECC engine) [32 bits]
>    - Armada 398 DB (4kiB page NAND, 8b/512B, BCH ECC engine using a layout
>      with a last chunk different than the others) [32 bits]
>    - Armada 7040 DB and Armada 8040 DB (4kiB page NAND, 4b/512B, BCH ECC
>      engine) [64 bits]
> 
> Robert, it would be great if you could also do more testing on PXA and
> validate this driver. If needed, a branch ready to be tested is
> available at [3]. It is based on nand/next and has all the changes
> brought by the previously mentionned series as well as this one.

Robert, do you think you'll have some time to test Miquel's branch on
your PXA boards? Miquel already tested on one of these boards (CM-X300),
but we'd like to have other testers. Also feel free to review the
driver if have the time.

Thanks,

Boris

> 
> Thank you,
> Miqu?l
> 
> 
> [1] https://www.spinics.net/lists/arm-kernel/msg619633.html
> [2] http://lists.infradead.org/pipermail/linux-mtd/2017-December/077965.html
> [3] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc-rework
> 
> Miquel Raynal (12):
>   dt-bindings: mtd: add Marvell NAND controller documentation
>   mtd: nand: add reworked Marvell NAND controller driver
>   mtd: nand: replace pxa3xx_nand driver by its rework called
>     marvell_nand
>   dt-bindings: mtd: remove pxa3xx NAND controller documentation
>   mtd: nand: remove useless fields from pxa3xx NAND platform data
>   ARM: dts: armada-370-xp: use reworked NAND controller driver
>   ARM: dts: armada-375: use reworked NAND controller driver
>   ARM: dts: armada-38x: use reworked NAND controller driver
>   ARM: dts: armada-39x: use reworked NAND controller driver
>   ARM: dts: pxa: use reworked NAND controller driver
>   ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
>   ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
> 
>  .../devicetree/bindings/mtd/marvell-nand.txt       |   84 +
>  .../devicetree/bindings/mtd/pxa3xx-nand.txt        |   50 -
>  arch/arm/boot/dts/armada-370-db.dts                |   57 +-
>  arch/arm/boot/dts/armada-370-dlink-dns327l.dts     |  120 +-
>  arch/arm/boot/dts/armada-370-mirabox.dts           |   51 +-
>  arch/arm/boot/dts/armada-370-netgear-rn102.dts     |   90 +-
>  arch/arm/boot/dts/armada-370-netgear-rn104.dts     |   90 +-
>  arch/arm/boot/dts/armada-370-rd.dts                |   52 +-
>  arch/arm/boot/dts/armada-370-seagate-nas-xbay.dtsi |   64 +-
>  arch/arm/boot/dts/armada-370-xp.dtsi               |    6 +-
>  arch/arm/boot/dts/armada-375-db.dts                |   50 +-
>  arch/arm/boot/dts/armada-375.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-385-db-ap.dts             |   69 +-
>  arch/arm/boot/dts/armada-385-linksys-caiman.dts    |  129 +-
>  arch/arm/boot/dts/armada-385-linksys-cobra.dts     |  129 +-
>  arch/arm/boot/dts/armada-385-linksys-rango.dts     |  141 +-
>  arch/arm/boot/dts/armada-385-linksys-shelby.dts    |  129 +-
>  arch/arm/boot/dts/armada-385-linksys.dtsi          |   16 +-
>  arch/arm/boot/dts/armada-388-db.dts                |   55 +-
>  arch/arm/boot/dts/armada-38x.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-390-db.dts                |   66 +-
>  arch/arm/boot/dts/armada-395-gp.dts                |   74 +-
>  arch/arm/boot/dts/armada-398-db.dts                |   60 +-
>  arch/arm/boot/dts/armada-39x.dtsi                  |    6 +-
>  arch/arm/boot/dts/armada-xp-db-dxbc2.dts           |    2 +-
>  arch/arm/boot/dts/armada-xp-db-xc3-24g4xg.dts      |    2 +-
>  arch/arm/boot/dts/armada-xp-db.dts                 |    2 +-
>  arch/arm/boot/dts/armada-xp-gp.dts                 |    2 +-
>  arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts    |    2 +-
>  arch/arm/boot/dts/armada-xp-linksys-mamba.dts      |  156 +-
>  arch/arm/boot/dts/armada-xp-netgear-rn2120.dts     |   90 +-
>  arch/arm/boot/dts/pxa3xx.dtsi                      |    6 +-
>  arch/arm/configs/cm_x300_defconfig                 |    2 +-
>  arch/arm/configs/mvebu_v7_defconfig                |    2 +-
>  arch/arm/configs/pxa3xx_defconfig                  |    3 +-
>  arch/arm/configs/pxa_defconfig                     |    2 +-
>  arch/arm/configs/raumfeld_defconfig                |    2 +-
>  arch/arm/mach-mmp/ttc_dkb.c                        |    4 +-
>  arch/arm/mach-pxa/cm-x300.c                        |    8 +-
>  arch/arm/mach-pxa/colibri-pxa3xx.c                 |    8 +-
>  arch/arm/mach-pxa/colibri.h                        |    2 +-
>  arch/arm/mach-pxa/littleton.c                      |   10 +-
>  arch/arm/mach-pxa/mxm8x10.c                        |   10 +-
>  arch/arm/mach-pxa/raumfeld.c                       |    6 +-
>  arch/arm/mach-pxa/zylonite.c                       |   10 +-
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     |   52 +-
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     |   46 +-
>  .../boot/dts/marvell/armada-cp110-master.dtsi      |    8 +-
>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi |   10 +-
>  drivers/mtd/nand/Kconfig                           |   12 +
>  drivers/mtd/nand/Makefile                          |    2 +-
>  drivers/mtd/nand/marvell_nand.c                    | 2950 ++++++++++++++++++++
>  drivers/mtd/nand/pxa3xx_nand.c                     | 2104 --------------
>  include/linux/platform_data/mtd-nand-pxa3xx.h      |   43 +-
>  54 files changed, 4093 insertions(+), 3065 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mtd/marvell-nand.txt
>  delete mode 100644 Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
>  create mode 100644 drivers/mtd/nand/marvell_nand.c
>  delete mode 100644 drivers/mtd/nand/pxa3xx_nand.c
> 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
  2017-12-07 20:18     ` Miquel Raynal
  (?)
@ 2017-12-15 10:29         ` Gregory CLEMENT
  -1 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:29 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia

Hi Miquel,
 
 On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Use the new bindings of the reworked Marvell NAND controller driver.
> Also adapt the nand controller node organization to distinguish which
> property is relevant for the controller, and which one is NAND chip
> specific. Expose the partitions as a subnode of the NAND chip.
>
> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
> the driver activates the arbiter by default for all boards (either
> needed or harmless).
>
> Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
>  .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
>  2 files changed, 36 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> index 52b5341cb270..758452c10612 100644
> --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> @@ -156,36 +156,48 @@
>  	};
>  };
>  
> -&cpm_nand {
> +&cpm_nand_controller {
>  	/*
>  	 * SPI on CPM and NAND have common pins on this board. We can
> -	 * use only one at a time. To enable the NAND (whihch will
> +	 * use only one at a time. To enable the NAND (which will
>  	 * disable the SPI), the "status = "okay";" line have to be
>  	 * added here.
>  	 */
> -	num-cs = <1>;
>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>  	pinctrl-names = "default";
> -	nand-ecc-strength = <4>;
> -	nand-ecc-step-size = <512>;
> -	marvell,nand-enable-arbiter;
> -	nand-on-flash-bbt;
> -
> -	partition@0 {
> -		label = "U-Boot";
> -		reg = <0 0x200000>;
> -	};
> -	partition@200000 {
> -		label = "Linux";
> -		reg = <0x200000 0xe00000>;
> -	};
> -	partition@1000000 {
> -		label = "Filesystem";
> -		reg = <0x1000000 0x3f000000>;
> +
> +	nand@0 {
> +		reg = <0>;
> +		label = "pxa3xx_nand-0";
> +		marvell,rb = <0>;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition@0 {
> +				label = "U-Boot";
> +				reg = <0 0x200000>;
> +			};
> +
> +			partition@200000 {
> +				label = "Linux";
> +				reg = <0x200000 0xe00000>;
> +			};
> +
> +			partition@1000000 {
> +				label = "Filesystem";
> +				reg = <0x1000000 0x3f000000>;
> +			};
> +
> +		};
>  	};
>  };
>  
> -
>  &cpm_spi1 {
>  	status = "okay";
>  
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> index e3b64d03fbd8..8a3cff9a7343 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> @@ -309,17 +309,17 @@
>  				status = "disabled";
>  			};
>  
> -			cpm_nand: nand@720000 {
> +			cpm_nand_controller: nand@720000 {
>  				/*
>  				 * Due to the limiation of the pin available
>  				 * this controller is only usable on the CPM
>  				 * for A7K and on the CPS for A8K.
>  				 */
> -				compatible = "marvell,armada-8k-nand",
> -					     "marvell,armada370-nand";
> +				compatible = "marvell,armada-8k-nand-controller",
> +					     "marvell,armada370-nand-controller";
>  				reg = <0x720000 0x54>;
>  				#address-cells = <1>;
> -				#size-cells = <1>;
> +				#size-cells = <0>;
>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&cpm_clk 1 2>;
>  				marvell,system-controller = <&cpm_syscon0>;
> -- 
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
@ 2017-12-15 10:29         ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:29 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia, Thomas Petazzoni,
	devicetree, Antoine Tenart, Nadav Haklai, linux-mtd,
	Neta Zur Hershkovits, Hanna Hawa, Ofer Heifetz, linux-arm-kernel

Hi Miquel,
 
 On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Use the new bindings of the reworked Marvell NAND controller driver.
> Also adapt the nand controller node organization to distinguish which
> property is relevant for the controller, and which one is NAND chip
> specific. Expose the partitions as a subnode of the NAND chip.
>
> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
> the driver activates the arbiter by default for all boards (either
> needed or harmless).
>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
>  .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
>  2 files changed, 36 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> index 52b5341cb270..758452c10612 100644
> --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> @@ -156,36 +156,48 @@
>  	};
>  };
>  
> -&cpm_nand {
> +&cpm_nand_controller {
>  	/*
>  	 * SPI on CPM and NAND have common pins on this board. We can
> -	 * use only one at a time. To enable the NAND (whihch will
> +	 * use only one at a time. To enable the NAND (which will
>  	 * disable the SPI), the "status = "okay";" line have to be
>  	 * added here.
>  	 */
> -	num-cs = <1>;
>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>  	pinctrl-names = "default";
> -	nand-ecc-strength = <4>;
> -	nand-ecc-step-size = <512>;
> -	marvell,nand-enable-arbiter;
> -	nand-on-flash-bbt;
> -
> -	partition@0 {
> -		label = "U-Boot";
> -		reg = <0 0x200000>;
> -	};
> -	partition@200000 {
> -		label = "Linux";
> -		reg = <0x200000 0xe00000>;
> -	};
> -	partition@1000000 {
> -		label = "Filesystem";
> -		reg = <0x1000000 0x3f000000>;
> +
> +	nand@0 {
> +		reg = <0>;
> +		label = "pxa3xx_nand-0";
> +		marvell,rb = <0>;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition@0 {
> +				label = "U-Boot";
> +				reg = <0 0x200000>;
> +			};
> +
> +			partition@200000 {
> +				label = "Linux";
> +				reg = <0x200000 0xe00000>;
> +			};
> +
> +			partition@1000000 {
> +				label = "Filesystem";
> +				reg = <0x1000000 0x3f000000>;
> +			};
> +
> +		};
>  	};
>  };
>  
> -
>  &cpm_spi1 {
>  	status = "okay";
>  
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> index e3b64d03fbd8..8a3cff9a7343 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> @@ -309,17 +309,17 @@
>  				status = "disabled";
>  			};
>  
> -			cpm_nand: nand@720000 {
> +			cpm_nand_controller: nand@720000 {
>  				/*
>  				 * Due to the limiation of the pin available
>  				 * this controller is only usable on the CPM
>  				 * for A7K and on the CPS for A8K.
>  				 */
> -				compatible = "marvell,armada-8k-nand",
> -					     "marvell,armada370-nand";
> +				compatible = "marvell,armada-8k-nand-controller",
> +					     "marvell,armada370-nand-controller";
>  				reg = <0x720000 0x54>;
>  				#address-cells = <1>;
> -				#size-cells = <1>;
> +				#size-cells = <0>;
>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&cpm_clk 1 2>;
>  				marvell,system-controller = <&cpm_syscon0>;
> -- 
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
@ 2017-12-15 10:29         ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Miquel,
 
 On jeu., d?c. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Use the new bindings of the reworked Marvell NAND controller driver.
> Also adapt the nand controller node organization to distinguish which
> property is relevant for the controller, and which one is NAND chip
> specific. Expose the partitions as a subnode of the NAND chip.
>
> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
> the driver activates the arbiter by default for all boards (either
> needed or harmless).
>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
>  .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
>  2 files changed, 36 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> index 52b5341cb270..758452c10612 100644
> --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
> @@ -156,36 +156,48 @@
>  	};
>  };
>  
> -&cpm_nand {
> +&cpm_nand_controller {
>  	/*
>  	 * SPI on CPM and NAND have common pins on this board. We can
> -	 * use only one at a time. To enable the NAND (whihch will
> +	 * use only one at a time. To enable the NAND (which will
>  	 * disable the SPI), the "status = "okay";" line have to be
>  	 * added here.
>  	 */
> -	num-cs = <1>;
>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>  	pinctrl-names = "default";
> -	nand-ecc-strength = <4>;
> -	nand-ecc-step-size = <512>;
> -	marvell,nand-enable-arbiter;
> -	nand-on-flash-bbt;
> -
> -	partition at 0 {
> -		label = "U-Boot";
> -		reg = <0 0x200000>;
> -	};
> -	partition at 200000 {
> -		label = "Linux";
> -		reg = <0x200000 0xe00000>;
> -	};
> -	partition at 1000000 {
> -		label = "Filesystem";
> -		reg = <0x1000000 0x3f000000>;
> +
> +	nand at 0 {
> +		reg = <0>;
> +		label = "pxa3xx_nand-0";
> +		marvell,rb = <0>;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition at 0 {
> +				label = "U-Boot";
> +				reg = <0 0x200000>;
> +			};
> +
> +			partition at 200000 {
> +				label = "Linux";
> +				reg = <0x200000 0xe00000>;
> +			};
> +
> +			partition at 1000000 {
> +				label = "Filesystem";
> +				reg = <0x1000000 0x3f000000>;
> +			};
> +
> +		};
>  	};
>  };
>  
> -
>  &cpm_spi1 {
>  	status = "okay";
>  
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> index e3b64d03fbd8..8a3cff9a7343 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> @@ -309,17 +309,17 @@
>  				status = "disabled";
>  			};
>  
> -			cpm_nand: nand at 720000 {
> +			cpm_nand_controller: nand at 720000 {
>  				/*
>  				 * Due to the limiation of the pin available
>  				 * this controller is only usable on the CPM
>  				 * for A7K and on the CPS for A8K.
>  				 */
> -				compatible = "marvell,armada-8k-nand",
> -					     "marvell,armada370-nand";
> +				compatible = "marvell,armada-8k-nand-controller",
> +					     "marvell,armada370-nand-controller";
>  				reg = <0x720000 0x54>;
>  				#address-cells = <1>;
> -				#size-cells = <1>;
> +				#size-cells = <0>;
>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&cpm_clk 1 2>;
>  				marvell,system-controller = <&cpm_syscon0>;
> -- 
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
  2017-12-07 20:18     ` Miquel Raynal
  (?)
@ 2017-12-15 10:29         ` Gregory CLEMENT
  -1 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:29 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia

Hi Miquel,
 
 On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Use the new bindings of the reworked Marvell NAND controller driver.
> Also adapt the nand controller node organization to distinguish which
> property is relevant for the controller, and which one is NAND chip
> specific. Expose the partitions as a subnode of the NAND chip.
>
> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
> the driver activates the arbiter by default for all boards (either
> needed or harmless).
>
> Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
>  2 files changed, 32 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> index b1f6cccc5081..c25ac3fa9aec 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> @@ -272,27 +272,35 @@
>   * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
>   * MDIO signal of CP1.
>   */
> -&cps_nand {
> -	num-cs = <1>;
> +&cps_nand_controller {
>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>  	pinctrl-names = "default";
> -	nand-ecc-strength = <4>;
> -	nand-ecc-step-size = <512>;
> -	marvell,nand-enable-arbiter;
> -	marvell,system-controller = <&cps_syscon0>;
> -	nand-on-flash-bbt;
> -
> -	partition@0 {
> -		label = "U-Boot";
> -		reg = <0 0x200000>;
> -	};
> -	partition@200000 {
> -		label = "Linux";
> -		reg = <0x200000 0xe00000>;
> -	};
> -	partition@1000000 {
> -		label = "Filesystem";
> -		reg = <0x1000000 0x3f000000>;
> +
> +	nand@0 {
> +		reg = <0>;
> +		marvell,rb = <0>;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition@0 {
> +				label = "U-Boot";
> +				reg = <0 0x200000>;
> +			};
> +			partition@200000 {
> +				label = "Linux";
> +				reg = <0x200000 0xe00000>;
> +			};
> +			partition@1000000 {
> +				label = "Filesystem";
> +				reg = <0x1000000 0x3f000000>;
> +			};
> +		};
>  	};
>  };
>  
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> index cb1fb49ccf81..8610163bb1a4 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> @@ -310,20 +310,20 @@
>  				status = "disabled";
>  			};
>  
> -			cps_nand: nand@720000 {
> +			cps_nand_controller: nand@720000 {
>  				/*
>  				 * Due to the limiation of the pin available
>  				 * this controller is only usable on the CPM
>  				 * for A7K and on the CPS for A8K.
>  				 */
> -				compatible = "marvell,armada370-nand",
> -					     "marvell,armada-8k-nand";
> +				compatible = "marvell,armada-8k-nand-controller",
> +					     "marvell,armada370-nand-controller";
>  				reg = <0x720000 0x54>;
>  				#address-cells = <1>;
> -				#size-cells = <1>;
> +				#size-cells = <0>;
>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&cps_clk 1 2>;
> -				marvell,system-controller = <&cpm_syscon0>;
> +				marvell,system-controller = <&cps_syscon0>;
>  				status = "disabled";
>  			};
>  
> -- 
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
@ 2017-12-15 10:29         ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:29 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia, Thomas Petazzoni,
	devicetree, Antoine Tenart, Nadav Haklai, linux-mtd,
	Neta Zur Hershkovits, Hanna Hawa, Ofer Heifetz, linux-arm-kernel

Hi Miquel,
 
 On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Use the new bindings of the reworked Marvell NAND controller driver.
> Also adapt the nand controller node organization to distinguish which
> property is relevant for the controller, and which one is NAND chip
> specific. Expose the partitions as a subnode of the NAND chip.
>
> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
> the driver activates the arbiter by default for all boards (either
> needed or harmless).
>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
>  2 files changed, 32 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> index b1f6cccc5081..c25ac3fa9aec 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> @@ -272,27 +272,35 @@
>   * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
>   * MDIO signal of CP1.
>   */
> -&cps_nand {
> -	num-cs = <1>;
> +&cps_nand_controller {
>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>  	pinctrl-names = "default";
> -	nand-ecc-strength = <4>;
> -	nand-ecc-step-size = <512>;
> -	marvell,nand-enable-arbiter;
> -	marvell,system-controller = <&cps_syscon0>;
> -	nand-on-flash-bbt;
> -
> -	partition@0 {
> -		label = "U-Boot";
> -		reg = <0 0x200000>;
> -	};
> -	partition@200000 {
> -		label = "Linux";
> -		reg = <0x200000 0xe00000>;
> -	};
> -	partition@1000000 {
> -		label = "Filesystem";
> -		reg = <0x1000000 0x3f000000>;
> +
> +	nand@0 {
> +		reg = <0>;
> +		marvell,rb = <0>;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition@0 {
> +				label = "U-Boot";
> +				reg = <0 0x200000>;
> +			};
> +			partition@200000 {
> +				label = "Linux";
> +				reg = <0x200000 0xe00000>;
> +			};
> +			partition@1000000 {
> +				label = "Filesystem";
> +				reg = <0x1000000 0x3f000000>;
> +			};
> +		};
>  	};
>  };
>  
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> index cb1fb49ccf81..8610163bb1a4 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> @@ -310,20 +310,20 @@
>  				status = "disabled";
>  			};
>  
> -			cps_nand: nand@720000 {
> +			cps_nand_controller: nand@720000 {
>  				/*
>  				 * Due to the limiation of the pin available
>  				 * this controller is only usable on the CPM
>  				 * for A7K and on the CPS for A8K.
>  				 */
> -				compatible = "marvell,armada370-nand",
> -					     "marvell,armada-8k-nand";
> +				compatible = "marvell,armada-8k-nand-controller",
> +					     "marvell,armada370-nand-controller";
>  				reg = <0x720000 0x54>;
>  				#address-cells = <1>;
> -				#size-cells = <1>;
> +				#size-cells = <0>;
>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&cps_clk 1 2>;
> -				marvell,system-controller = <&cpm_syscon0>;
> +				marvell,system-controller = <&cps_syscon0>;
>  				status = "disabled";
>  			};
>  
> -- 
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
@ 2017-12-15 10:29         ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Miquel,
 
 On jeu., d?c. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:

> Use the new bindings of the reworked Marvell NAND controller driver.
> Also adapt the nand controller node organization to distinguish which
> property is relevant for the controller, and which one is NAND chip
> specific. Expose the partitions as a subnode of the NAND chip.
>
> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
> the driver activates the arbiter by default for all boards (either
> needed or harmless).
>
> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
>  2 files changed, 32 insertions(+), 24 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> index b1f6cccc5081..c25ac3fa9aec 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
> @@ -272,27 +272,35 @@
>   * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
>   * MDIO signal of CP1.
>   */
> -&cps_nand {
> -	num-cs = <1>;
> +&cps_nand_controller {
>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>  	pinctrl-names = "default";
> -	nand-ecc-strength = <4>;
> -	nand-ecc-step-size = <512>;
> -	marvell,nand-enable-arbiter;
> -	marvell,system-controller = <&cps_syscon0>;
> -	nand-on-flash-bbt;
> -
> -	partition at 0 {
> -		label = "U-Boot";
> -		reg = <0 0x200000>;
> -	};
> -	partition at 200000 {
> -		label = "Linux";
> -		reg = <0x200000 0xe00000>;
> -	};
> -	partition at 1000000 {
> -		label = "Filesystem";
> -		reg = <0x1000000 0x3f000000>;
> +
> +	nand at 0 {
> +		reg = <0>;
> +		marvell,rb = <0>;
> +		nand-on-flash-bbt;
> +		nand-ecc-strength = <4>;
> +		nand-ecc-step-size = <512>;
> +
> +		partitions {
> +			compatible = "fixed-partitions";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partition at 0 {
> +				label = "U-Boot";
> +				reg = <0 0x200000>;
> +			};
> +			partition at 200000 {
> +				label = "Linux";
> +				reg = <0x200000 0xe00000>;
> +			};
> +			partition at 1000000 {
> +				label = "Filesystem";
> +				reg = <0x1000000 0x3f000000>;
> +			};
> +		};
>  	};
>  };
>  
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> index cb1fb49ccf81..8610163bb1a4 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> @@ -310,20 +310,20 @@
>  				status = "disabled";
>  			};
>  
> -			cps_nand: nand at 720000 {
> +			cps_nand_controller: nand at 720000 {
>  				/*
>  				 * Due to the limiation of the pin available
>  				 * this controller is only usable on the CPM
>  				 * for A7K and on the CPS for A8K.
>  				 */
> -				compatible = "marvell,armada370-nand",
> -					     "marvell,armada-8k-nand";
> +				compatible = "marvell,armada-8k-nand-controller",
> +					     "marvell,armada370-nand-controller";
>  				reg = <0x720000 0x54>;
>  				#address-cells = <1>;
> -				#size-cells = <1>;
> +				#size-cells = <0>;
>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>  				clocks = <&cps_clk 1 2>;
> -				marvell,system-controller = <&cpm_syscon0>;
> +				marvell,system-controller = <&cps_syscon0>;
>  				status = "disabled";
>  			};
>  
> -- 
> 2.11.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
  2017-12-15 10:29         ` Gregory CLEMENT
  (?)
@ 2017-12-15 10:44             ` Gregory CLEMENT
  -1 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:44 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia

Hi,
 
 On ven., déc. 15 2017, Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Hi Miquel,
>  
>  On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
>
>> Use the new bindings of the reworked Marvell NAND controller driver.
>> Also adapt the nand controller node organization to distinguish which
>> property is relevant for the controller, and which one is NAND chip
>> specific. Expose the partitions as a subnode of the NAND chip.
>>
>> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
>> the driver activates the arbiter by default for all boards (either
>> needed or harmless).
>>
>> Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
>
> Applied on mvebu/dt64

Well I have been said that actually thess changes are not ready and that
we should wait for the driver would me merged first so I moved it on
mvebu/dt64-nand

>
> Thanks,
>
> Gregory
>
>> ---
>>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
>>  .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
>>  2 files changed, 36 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> index 52b5341cb270..758452c10612 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> @@ -156,36 +156,48 @@
>>  	};
>>  };
>>  
>> -&cpm_nand {
>> +&cpm_nand_controller {
>>  	/*
>>  	 * SPI on CPM and NAND have common pins on this board. We can
>> -	 * use only one at a time. To enable the NAND (whihch will
>> +	 * use only one at a time. To enable the NAND (which will
>>  	 * disable the SPI), the "status = "okay";" line have to be
>>  	 * added here.
>>  	 */
>> -	num-cs = <1>;
>>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>>  	pinctrl-names = "default";
>> -	nand-ecc-strength = <4>;
>> -	nand-ecc-step-size = <512>;
>> -	marvell,nand-enable-arbiter;
>> -	nand-on-flash-bbt;
>> -
>> -	partition@0 {
>> -		label = "U-Boot";
>> -		reg = <0 0x200000>;
>> -	};
>> -	partition@200000 {
>> -		label = "Linux";
>> -		reg = <0x200000 0xe00000>;
>> -	};
>> -	partition@1000000 {
>> -		label = "Filesystem";
>> -		reg = <0x1000000 0x3f000000>;
>> +
>> +	nand@0 {
>> +		reg = <0>;
>> +		label = "pxa3xx_nand-0";
>> +		marvell,rb = <0>;
>> +		nand-on-flash-bbt;
>> +		nand-ecc-strength = <4>;
>> +		nand-ecc-step-size = <512>;
>> +
>> +		partitions {
>> +			compatible = "fixed-partitions";
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +
>> +			partition@0 {
>> +				label = "U-Boot";
>> +				reg = <0 0x200000>;
>> +			};
>> +
>> +			partition@200000 {
>> +				label = "Linux";
>> +				reg = <0x200000 0xe00000>;
>> +			};
>> +
>> +			partition@1000000 {
>> +				label = "Filesystem";
>> +				reg = <0x1000000 0x3f000000>;
>> +			};
>> +
>> +		};
>>  	};
>>  };
>>  
>> -
>>  &cpm_spi1 {
>>  	status = "okay";
>>  
>> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> index e3b64d03fbd8..8a3cff9a7343 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> @@ -309,17 +309,17 @@
>>  				status = "disabled";
>>  			};
>>  
>> -			cpm_nand: nand@720000 {
>> +			cpm_nand_controller: nand@720000 {
>>  				/*
>>  				 * Due to the limiation of the pin available
>>  				 * this controller is only usable on the CPM
>>  				 * for A7K and on the CPS for A8K.
>>  				 */
>> -				compatible = "marvell,armada-8k-nand",
>> -					     "marvell,armada370-nand";
>> +				compatible = "marvell,armada-8k-nand-controller",
>> +					     "marvell,armada370-nand-controller";
>>  				reg = <0x720000 0x54>;
>>  				#address-cells = <1>;
>> -				#size-cells = <1>;
>> +				#size-cells = <0>;
>>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>>  				clocks = <&cpm_clk 1 2>;
>>  				marvell,system-controller = <&cpm_syscon0>;
>> -- 
>> 2.11.0
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
@ 2017-12-15 10:44             ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:44 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia, Thomas Petazzoni,
	devicetree, Antoine Tenart, Nadav Haklai, linux-mtd,
	Neta Zur Hershkovits, Hanna Hawa, Ofer Heifetz, linux-arm-kernel

Hi,
 
 On ven., déc. 15 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:

> Hi Miquel,
>  
>  On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
>
>> Use the new bindings of the reworked Marvell NAND controller driver.
>> Also adapt the nand controller node organization to distinguish which
>> property is relevant for the controller, and which one is NAND chip
>> specific. Expose the partitions as a subnode of the NAND chip.
>>
>> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
>> the driver activates the arbiter by default for all boards (either
>> needed or harmless).
>>
>> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
>
> Applied on mvebu/dt64

Well I have been said that actually thess changes are not ready and that
we should wait for the driver would me merged first so I moved it on
mvebu/dt64-nand

>
> Thanks,
>
> Gregory
>
>> ---
>>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
>>  .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
>>  2 files changed, 36 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> index 52b5341cb270..758452c10612 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> @@ -156,36 +156,48 @@
>>  	};
>>  };
>>  
>> -&cpm_nand {
>> +&cpm_nand_controller {
>>  	/*
>>  	 * SPI on CPM and NAND have common pins on this board. We can
>> -	 * use only one at a time. To enable the NAND (whihch will
>> +	 * use only one at a time. To enable the NAND (which will
>>  	 * disable the SPI), the "status = "okay";" line have to be
>>  	 * added here.
>>  	 */
>> -	num-cs = <1>;
>>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>>  	pinctrl-names = "default";
>> -	nand-ecc-strength = <4>;
>> -	nand-ecc-step-size = <512>;
>> -	marvell,nand-enable-arbiter;
>> -	nand-on-flash-bbt;
>> -
>> -	partition@0 {
>> -		label = "U-Boot";
>> -		reg = <0 0x200000>;
>> -	};
>> -	partition@200000 {
>> -		label = "Linux";
>> -		reg = <0x200000 0xe00000>;
>> -	};
>> -	partition@1000000 {
>> -		label = "Filesystem";
>> -		reg = <0x1000000 0x3f000000>;
>> +
>> +	nand@0 {
>> +		reg = <0>;
>> +		label = "pxa3xx_nand-0";
>> +		marvell,rb = <0>;
>> +		nand-on-flash-bbt;
>> +		nand-ecc-strength = <4>;
>> +		nand-ecc-step-size = <512>;
>> +
>> +		partitions {
>> +			compatible = "fixed-partitions";
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +
>> +			partition@0 {
>> +				label = "U-Boot";
>> +				reg = <0 0x200000>;
>> +			};
>> +
>> +			partition@200000 {
>> +				label = "Linux";
>> +				reg = <0x200000 0xe00000>;
>> +			};
>> +
>> +			partition@1000000 {
>> +				label = "Filesystem";
>> +				reg = <0x1000000 0x3f000000>;
>> +			};
>> +
>> +		};
>>  	};
>>  };
>>  
>> -
>>  &cpm_spi1 {
>>  	status = "okay";
>>  
>> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> index e3b64d03fbd8..8a3cff9a7343 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> @@ -309,17 +309,17 @@
>>  				status = "disabled";
>>  			};
>>  
>> -			cpm_nand: nand@720000 {
>> +			cpm_nand_controller: nand@720000 {
>>  				/*
>>  				 * Due to the limiation of the pin available
>>  				 * this controller is only usable on the CPM
>>  				 * for A7K and on the CPS for A8K.
>>  				 */
>> -				compatible = "marvell,armada-8k-nand",
>> -					     "marvell,armada370-nand";
>> +				compatible = "marvell,armada-8k-nand-controller",
>> +					     "marvell,armada370-nand-controller";
>>  				reg = <0x720000 0x54>;
>>  				#address-cells = <1>;
>> -				#size-cells = <1>;
>> +				#size-cells = <0>;
>>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>>  				clocks = <&cpm_clk 1 2>;
>>  				marvell,system-controller = <&cpm_syscon0>;
>> -- 
>> 2.11.0
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K
@ 2017-12-15 10:44             ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
 
 On ven., d?c. 15 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:

> Hi Miquel,
>  
>  On jeu., d?c. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
>
>> Use the new bindings of the reworked Marvell NAND controller driver.
>> Also adapt the nand controller node organization to distinguish which
>> property is relevant for the controller, and which one is NAND chip
>> specific. Expose the partitions as a subnode of the NAND chip.
>>
>> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
>> the driver activates the arbiter by default for all boards (either
>> needed or harmless).
>>
>> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
>
> Applied on mvebu/dt64

Well I have been said that actually thess changes are not ready and that
we should wait for the driver would me merged first so I moved it on
mvebu/dt64-nand

>
> Thanks,
>
> Gregory
>
>> ---
>>  arch/arm64/boot/dts/marvell/armada-7040-db.dts     | 52 +++++++++++++---------
>>  .../boot/dts/marvell/armada-cp110-master.dtsi      |  8 ++--
>>  2 files changed, 36 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/marvell/armada-7040-db.dts b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> index 52b5341cb270..758452c10612 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> +++ b/arch/arm64/boot/dts/marvell/armada-7040-db.dts
>> @@ -156,36 +156,48 @@
>>  	};
>>  };
>>  
>> -&cpm_nand {
>> +&cpm_nand_controller {
>>  	/*
>>  	 * SPI on CPM and NAND have common pins on this board. We can
>> -	 * use only one at a time. To enable the NAND (whihch will
>> +	 * use only one at a time. To enable the NAND (which will
>>  	 * disable the SPI), the "status = "okay";" line have to be
>>  	 * added here.
>>  	 */
>> -	num-cs = <1>;
>>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>>  	pinctrl-names = "default";
>> -	nand-ecc-strength = <4>;
>> -	nand-ecc-step-size = <512>;
>> -	marvell,nand-enable-arbiter;
>> -	nand-on-flash-bbt;
>> -
>> -	partition at 0 {
>> -		label = "U-Boot";
>> -		reg = <0 0x200000>;
>> -	};
>> -	partition at 200000 {
>> -		label = "Linux";
>> -		reg = <0x200000 0xe00000>;
>> -	};
>> -	partition at 1000000 {
>> -		label = "Filesystem";
>> -		reg = <0x1000000 0x3f000000>;
>> +
>> +	nand at 0 {
>> +		reg = <0>;
>> +		label = "pxa3xx_nand-0";
>> +		marvell,rb = <0>;
>> +		nand-on-flash-bbt;
>> +		nand-ecc-strength = <4>;
>> +		nand-ecc-step-size = <512>;
>> +
>> +		partitions {
>> +			compatible = "fixed-partitions";
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +
>> +			partition at 0 {
>> +				label = "U-Boot";
>> +				reg = <0 0x200000>;
>> +			};
>> +
>> +			partition at 200000 {
>> +				label = "Linux";
>> +				reg = <0x200000 0xe00000>;
>> +			};
>> +
>> +			partition at 1000000 {
>> +				label = "Filesystem";
>> +				reg = <0x1000000 0x3f000000>;
>> +			};
>> +
>> +		};
>>  	};
>>  };
>>  
>> -
>>  &cpm_spi1 {
>>  	status = "okay";
>>  
>> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> index e3b64d03fbd8..8a3cff9a7343 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
>> @@ -309,17 +309,17 @@
>>  				status = "disabled";
>>  			};
>>  
>> -			cpm_nand: nand at 720000 {
>> +			cpm_nand_controller: nand at 720000 {
>>  				/*
>>  				 * Due to the limiation of the pin available
>>  				 * this controller is only usable on the CPM
>>  				 * for A7K and on the CPS for A8K.
>>  				 */
>> -				compatible = "marvell,armada-8k-nand",
>> -					     "marvell,armada370-nand";
>> +				compatible = "marvell,armada-8k-nand-controller",
>> +					     "marvell,armada370-nand-controller";
>>  				reg = <0x720000 0x54>;
>>  				#address-cells = <1>;
>> -				#size-cells = <1>;
>> +				#size-cells = <0>;
>>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>>  				clocks = <&cpm_clk 1 2>;
>>  				marvell,system-controller = <&cpm_syscon0>;
>> -- 
>> 2.11.0
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
  2017-12-15 10:29         ` Gregory CLEMENT
  (?)
@ 2017-12-15 10:44             ` Gregory CLEMENT
  -1 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:44 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia

Hi,
 
 On ven., déc. 15 2017, Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Hi Miquel,
>  
>  On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
>
>> Use the new bindings of the reworked Marvell NAND controller driver.
>> Also adapt the nand controller node organization to distinguish which
>> property is relevant for the controller, and which one is NAND chip
>> specific. Expose the partitions as a subnode of the NAND chip.
>>
>> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
>> the driver activates the arbiter by default for all boards (either
>> needed or harmless).
>>
>> Signed-off-by: Miquel Raynal <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
>
> Applied on mvebu/dt64


As for the other paych, I have been said that actually thess changes are
not ready and that we should wait for the driver would me merged first
so I moved it on mvebu/dt64-nand

Gregory

>
> Thanks,
>
> Gregory
>
>> ---
>>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
>>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
>>  2 files changed, 32 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> index b1f6cccc5081..c25ac3fa9aec 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> @@ -272,27 +272,35 @@
>>   * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
>>   * MDIO signal of CP1.
>>   */
>> -&cps_nand {
>> -	num-cs = <1>;
>> +&cps_nand_controller {
>>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>>  	pinctrl-names = "default";
>> -	nand-ecc-strength = <4>;
>> -	nand-ecc-step-size = <512>;
>> -	marvell,nand-enable-arbiter;
>> -	marvell,system-controller = <&cps_syscon0>;
>> -	nand-on-flash-bbt;
>> -
>> -	partition@0 {
>> -		label = "U-Boot";
>> -		reg = <0 0x200000>;
>> -	};
>> -	partition@200000 {
>> -		label = "Linux";
>> -		reg = <0x200000 0xe00000>;
>> -	};
>> -	partition@1000000 {
>> -		label = "Filesystem";
>> -		reg = <0x1000000 0x3f000000>;
>> +
>> +	nand@0 {
>> +		reg = <0>;
>> +		marvell,rb = <0>;
>> +		nand-on-flash-bbt;
>> +		nand-ecc-strength = <4>;
>> +		nand-ecc-step-size = <512>;
>> +
>> +		partitions {
>> +			compatible = "fixed-partitions";
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +
>> +			partition@0 {
>> +				label = "U-Boot";
>> +				reg = <0 0x200000>;
>> +			};
>> +			partition@200000 {
>> +				label = "Linux";
>> +				reg = <0x200000 0xe00000>;
>> +			};
>> +			partition@1000000 {
>> +				label = "Filesystem";
>> +				reg = <0x1000000 0x3f000000>;
>> +			};
>> +		};
>>  	};
>>  };
>>  
>> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> index cb1fb49ccf81..8610163bb1a4 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> @@ -310,20 +310,20 @@
>>  				status = "disabled";
>>  			};
>>  
>> -			cps_nand: nand@720000 {
>> +			cps_nand_controller: nand@720000 {
>>  				/*
>>  				 * Due to the limiation of the pin available
>>  				 * this controller is only usable on the CPM
>>  				 * for A7K and on the CPS for A8K.
>>  				 */
>> -				compatible = "marvell,armada370-nand",
>> -					     "marvell,armada-8k-nand";
>> +				compatible = "marvell,armada-8k-nand-controller",
>> +					     "marvell,armada370-nand-controller";
>>  				reg = <0x720000 0x54>;
>>  				#address-cells = <1>;
>> -				#size-cells = <1>;
>> +				#size-cells = <0>;
>>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>>  				clocks = <&cps_clk 1 2>;
>> -				marvell,system-controller = <&cpm_syscon0>;
>> +				marvell,system-controller = <&cps_syscon0>;
>>  				status = "disabled";
>>  			};
>>  
>> -- 
>> 2.11.0
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
@ 2017-12-15 10:44             ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:44 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Russell King,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia, Thomas Petazzoni,
	devicetree, Antoine Tenart, Nadav Haklai, linux-mtd,
	Neta Zur Hershkovits, Hanna Hawa, Ofer Heifetz, linux-arm-kernel

Hi,
 
 On ven., déc. 15 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:

> Hi Miquel,
>  
>  On jeu., déc. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
>
>> Use the new bindings of the reworked Marvell NAND controller driver.
>> Also adapt the nand controller node organization to distinguish which
>> property is relevant for the controller, and which one is NAND chip
>> specific. Expose the partitions as a subnode of the NAND chip.
>>
>> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
>> the driver activates the arbiter by default for all boards (either
>> needed or harmless).
>>
>> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
>
> Applied on mvebu/dt64


As for the other paych, I have been said that actually thess changes are
not ready and that we should wait for the driver would me merged first
so I moved it on mvebu/dt64-nand

Gregory

>
> Thanks,
>
> Gregory
>
>> ---
>>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
>>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
>>  2 files changed, 32 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> index b1f6cccc5081..c25ac3fa9aec 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> @@ -272,27 +272,35 @@
>>   * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
>>   * MDIO signal of CP1.
>>   */
>> -&cps_nand {
>> -	num-cs = <1>;
>> +&cps_nand_controller {
>>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>>  	pinctrl-names = "default";
>> -	nand-ecc-strength = <4>;
>> -	nand-ecc-step-size = <512>;
>> -	marvell,nand-enable-arbiter;
>> -	marvell,system-controller = <&cps_syscon0>;
>> -	nand-on-flash-bbt;
>> -
>> -	partition@0 {
>> -		label = "U-Boot";
>> -		reg = <0 0x200000>;
>> -	};
>> -	partition@200000 {
>> -		label = "Linux";
>> -		reg = <0x200000 0xe00000>;
>> -	};
>> -	partition@1000000 {
>> -		label = "Filesystem";
>> -		reg = <0x1000000 0x3f000000>;
>> +
>> +	nand@0 {
>> +		reg = <0>;
>> +		marvell,rb = <0>;
>> +		nand-on-flash-bbt;
>> +		nand-ecc-strength = <4>;
>> +		nand-ecc-step-size = <512>;
>> +
>> +		partitions {
>> +			compatible = "fixed-partitions";
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +
>> +			partition@0 {
>> +				label = "U-Boot";
>> +				reg = <0 0x200000>;
>> +			};
>> +			partition@200000 {
>> +				label = "Linux";
>> +				reg = <0x200000 0xe00000>;
>> +			};
>> +			partition@1000000 {
>> +				label = "Filesystem";
>> +				reg = <0x1000000 0x3f000000>;
>> +			};
>> +		};
>>  	};
>>  };
>>  
>> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> index cb1fb49ccf81..8610163bb1a4 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> @@ -310,20 +310,20 @@
>>  				status = "disabled";
>>  			};
>>  
>> -			cps_nand: nand@720000 {
>> +			cps_nand_controller: nand@720000 {
>>  				/*
>>  				 * Due to the limiation of the pin available
>>  				 * this controller is only usable on the CPM
>>  				 * for A7K and on the CPS for A8K.
>>  				 */
>> -				compatible = "marvell,armada370-nand",
>> -					     "marvell,armada-8k-nand";
>> +				compatible = "marvell,armada-8k-nand-controller",
>> +					     "marvell,armada370-nand-controller";
>>  				reg = <0x720000 0x54>;
>>  				#address-cells = <1>;
>> -				#size-cells = <1>;
>> +				#size-cells = <0>;
>>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>>  				clocks = <&cps_clk 1 2>;
>> -				marvell,system-controller = <&cpm_syscon0>;
>> +				marvell,system-controller = <&cps_syscon0>;
>>  				status = "disabled";
>>  			};
>>  
>> -- 
>> 2.11.0
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K
@ 2017-12-15 10:44             ` Gregory CLEMENT
  0 siblings, 0 replies; 126+ messages in thread
From: Gregory CLEMENT @ 2017-12-15 10:44 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,
 
 On ven., d?c. 15 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:

> Hi Miquel,
>  
>  On jeu., d?c. 07 2017, Miquel Raynal <miquel.raynal@free-electrons.com> wrote:
>
>> Use the new bindings of the reworked Marvell NAND controller driver.
>> Also adapt the nand controller node organization to distinguish which
>> property is relevant for the controller, and which one is NAND chip
>> specific. Expose the partitions as a subnode of the NAND chip.
>>
>> Remove the 'marvell,nand-enable-arbiter' property, not needed anymore as
>> the driver activates the arbiter by default for all boards (either
>> needed or harmless).
>>
>> Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com>
>
> Applied on mvebu/dt64


As for the other paych, I have been said that actually thess changes are
not ready and that we should wait for the driver would me merged first
so I moved it on mvebu/dt64-nand

Gregory

>
> Thanks,
>
> Gregory
>
>> ---
>>  arch/arm64/boot/dts/marvell/armada-8040-db.dts     | 46 +++++++++++++---------
>>  .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 10 ++---
>>  2 files changed, 32 insertions(+), 24 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-db.dts b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> index b1f6cccc5081..c25ac3fa9aec 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> +++ b/arch/arm64/boot/dts/marvell/armada-8040-db.dts
>> @@ -272,27 +272,35 @@
>>   * Proper NAND usage will require DPR-76 to be in position 1-2, which disables
>>   * MDIO signal of CP1.
>>   */
>> -&cps_nand {
>> -	num-cs = <1>;
>> +&cps_nand_controller {
>>  	pinctrl-0 = <&nand_pins>, <&nand_rb>;
>>  	pinctrl-names = "default";
>> -	nand-ecc-strength = <4>;
>> -	nand-ecc-step-size = <512>;
>> -	marvell,nand-enable-arbiter;
>> -	marvell,system-controller = <&cps_syscon0>;
>> -	nand-on-flash-bbt;
>> -
>> -	partition at 0 {
>> -		label = "U-Boot";
>> -		reg = <0 0x200000>;
>> -	};
>> -	partition at 200000 {
>> -		label = "Linux";
>> -		reg = <0x200000 0xe00000>;
>> -	};
>> -	partition at 1000000 {
>> -		label = "Filesystem";
>> -		reg = <0x1000000 0x3f000000>;
>> +
>> +	nand at 0 {
>> +		reg = <0>;
>> +		marvell,rb = <0>;
>> +		nand-on-flash-bbt;
>> +		nand-ecc-strength = <4>;
>> +		nand-ecc-step-size = <512>;
>> +
>> +		partitions {
>> +			compatible = "fixed-partitions";
>> +			#address-cells = <1>;
>> +			#size-cells = <1>;
>> +
>> +			partition at 0 {
>> +				label = "U-Boot";
>> +				reg = <0 0x200000>;
>> +			};
>> +			partition at 200000 {
>> +				label = "Linux";
>> +				reg = <0x200000 0xe00000>;
>> +			};
>> +			partition at 1000000 {
>> +				label = "Filesystem";
>> +				reg = <0x1000000 0x3f000000>;
>> +			};
>> +		};
>>  	};
>>  };
>>  
>> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> index cb1fb49ccf81..8610163bb1a4 100644
>> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
>> @@ -310,20 +310,20 @@
>>  				status = "disabled";
>>  			};
>>  
>> -			cps_nand: nand at 720000 {
>> +			cps_nand_controller: nand at 720000 {
>>  				/*
>>  				 * Due to the limiation of the pin available
>>  				 * this controller is only usable on the CPM
>>  				 * for A7K and on the CPS for A8K.
>>  				 */
>> -				compatible = "marvell,armada370-nand",
>> -					     "marvell,armada-8k-nand";
>> +				compatible = "marvell,armada-8k-nand-controller",
>> +					     "marvell,armada370-nand-controller";
>>  				reg = <0x720000 0x54>;
>>  				#address-cells = <1>;
>> -				#size-cells = <1>;
>> +				#size-cells = <0>;
>>  				interrupts = <ICU_GRP_NSR 115 IRQ_TYPE_LEVEL_HIGH>;
>>  				clocks = <&cps_clk 1 2>;
>> -				marvell,system-controller = <&cpm_syscon0>;
>> +				marvell,system-controller = <&cps_syscon0>;
>>  				status = "disabled";
>>  			};
>>  
>> -- 
>> 2.11.0
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
> -- 
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-14  6:09     ` Boris Brezillon
  (?)
@ 2017-12-18  7:11       ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-18  7:11 UTC (permalink / raw)
  To: Boris Brezillon, Miquel Raynal
  Cc: Mark Rutland, Andrew Lunn, Catalin Marinas, Hanna Hawa,
	Will Deacon, Nadav Haklai, linux-mtd, Richard Weinberger,
	Russell King, Marek Vasut, Ezequiel Garcia,
	Sebastian Hesselbarth, devicetree, Jason Cooper, Haojian Zhuang,
	Rob Herring, Gregory Clement, Ofer Heifetz, linux-arm-kernel,
	Thomas Petazzoni, Eric Miao, Antoine Tenart, Cyri

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

>> Robert, it would be great if you could also do more testing on PXA and
>> validate this driver. If needed, a branch ready to be tested is
>> available at [3]. It is based on nand/next and has all the changes
>> brought by the previously mentionned series as well as this one.
>
> Robert, do you think you'll have some time to test Miquel's branch on
> your PXA boards? Miquel already tested on one of these boards (CM-X300),
> but we'd like to have other testers. Also feel free to review the
> driver if have the time.
>
> Thanks,
>
> Boris

Hi Boris and Miquel,

I have applied the whole serie to linux-next yesterday.

A boot attempt on my zylonite with my old defconfig (with the new Marvell NAND
config activated) yields to :
 - this message
[    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand chip
[    3.143874] marvell-nfc: probe of pxa3xx-nand failed with error -22
 - then my board hangs

Is there something to be done to improve the trace level so that you can guess
what's happening ?

Cheers.

--
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-18  7:11       ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-18  7:11 UTC (permalink / raw)
  To: Boris Brezillon, Miquel Raynal
  Cc: David Woodhouse, Brian Norris, Marek Vasut, Richard Weinberger,
	Cyrille Pitchen, Rob Herring, Mark Rutland, Jason Cooper,
	Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Russell King, Daniel Mack, Haojian Zhuang, Eric Miao,
	Catalin Marinas, Will Deacon, Ezequiel Garcia, linux-mtd,
	devicetree, linux-arm-kernel, Thomas Petazzoni, Antoine Tenart,
	Nadav Haklai, Ofer Heifetz, Hanna Hawa, Neta Zur Hershkovits

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

>> Robert, it would be great if you could also do more testing on PXA and
>> validate this driver. If needed, a branch ready to be tested is
>> available at [3]. It is based on nand/next and has all the changes
>> brought by the previously mentionned series as well as this one.
>
> Robert, do you think you'll have some time to test Miquel's branch on
> your PXA boards? Miquel already tested on one of these boards (CM-X300),
> but we'd like to have other testers. Also feel free to review the
> driver if have the time.
>
> Thanks,
>
> Boris

Hi Boris and Miquel,

I have applied the whole serie to linux-next yesterday.

A boot attempt on my zylonite with my old defconfig (with the new Marvell NAND
config activated) yields to :
 - this message
[    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand chip
[    3.143874] marvell-nfc: probe of pxa3xx-nand failed with error -22
 - then my board hangs

Is there something to be done to improve the trace level so that you can guess
what's happening ?

Cheers.

--
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-18  7:11       ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-18  7:11 UTC (permalink / raw)
  To: linux-arm-kernel

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

>> Robert, it would be great if you could also do more testing on PXA and
>> validate this driver. If needed, a branch ready to be tested is
>> available at [3]. It is based on nand/next and has all the changes
>> brought by the previously mentionned series as well as this one.
>
> Robert, do you think you'll have some time to test Miquel's branch on
> your PXA boards? Miquel already tested on one of these boards (CM-X300),
> but we'd like to have other testers. Also feel free to review the
> driver if have the time.
>
> Thanks,
>
> Boris

Hi Boris and Miquel,

I have applied the whole serie to linux-next yesterday.

A boot attempt on my zylonite with my old defconfig (with the new Marvell NAND
config activated) yields to :
 - this message
[    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand chip
[    3.143874] marvell-nfc: probe of pxa3xx-nand failed with error -22
 - then my board hangs

Is there something to be done to improve the trace level so that you can guess
what's happening ?

Cheers.

--
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-18  7:11       ` Robert Jarzmik
  (?)
@ 2017-12-18  8:25           ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-18  8:25 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon

Hello Robert,

On Mon, 18 Dec 2017 08:11:35 +0100
Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org> wrote:

> Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:
> 
> >> Robert, it would be great if you could also do more testing on PXA
> >> and validate this driver. If needed, a branch ready to be tested is
> >> available at [3]. It is based on nand/next and has all the changes
> >> brought by the previously mentionned series as well as this one.  
> >
> > Robert, do you think you'll have some time to test Miquel's branch
> > on your PXA boards? Miquel already tested on one of these boards
> > (CM-X300), but we'd like to have other testers. Also feel free to
> > review the driver if have the time.
> >
> > Thanks,
> >
> > Boris  
> 
> Hi Boris and Miquel,
> 
> I have applied the whole serie to linux-next yesterday.
> 
> A boot attempt on my zylonite with my old defconfig (with the new
> Marvell NAND config activated) yields to :
>  - this message
> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
> error -22
>  - then my board hangs
> 
> Is there something to be done to improve the trace level so that you
> can guess what's happening ?

Thank you very much for testing this.

Could you please try this branch [1] instead of linux-next + the
patches?

Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
it should help us figuring out what is wrong.

Thank you,
Miquèl

[1] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-18  8:25           ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-18  8:25 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

Hello Robert,

On Mon, 18 Dec 2017 08:11:35 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> >> Robert, it would be great if you could also do more testing on PXA
> >> and validate this driver. If needed, a branch ready to be tested is
> >> available at [3]. It is based on nand/next and has all the changes
> >> brought by the previously mentionned series as well as this one.  
> >
> > Robert, do you think you'll have some time to test Miquel's branch
> > on your PXA boards? Miquel already tested on one of these boards
> > (CM-X300), but we'd like to have other testers. Also feel free to
> > review the driver if have the time.
> >
> > Thanks,
> >
> > Boris  
> 
> Hi Boris and Miquel,
> 
> I have applied the whole serie to linux-next yesterday.
> 
> A boot attempt on my zylonite with my old defconfig (with the new
> Marvell NAND config activated) yields to :
>  - this message
> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
> error -22
>  - then my board hangs
> 
> Is there something to be done to improve the trace level so that you
> can guess what's happening ?

Thank you very much for testing this.

Could you please try this branch [1] instead of linux-next + the
patches?

Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
it should help us figuring out what is wrong.

Thank you,
Miquèl

[1] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-18  8:25           ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-18  8:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Robert,

On Mon, 18 Dec 2017 08:11:35 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> >> Robert, it would be great if you could also do more testing on PXA
> >> and validate this driver. If needed, a branch ready to be tested is
> >> available at [3]. It is based on nand/next and has all the changes
> >> brought by the previously mentionned series as well as this one.  
> >
> > Robert, do you think you'll have some time to test Miquel's branch
> > on your PXA boards? Miquel already tested on one of these boards
> > (CM-X300), but we'd like to have other testers. Also feel free to
> > review the driver if have the time.
> >
> > Thanks,
> >
> > Boris  
> 
> Hi Boris and Miquel,
> 
> I have applied the whole serie to linux-next yesterday.
> 
> A boot attempt on my zylonite with my old defconfig (with the new
> Marvell NAND config activated) yields to :
>  - this message
> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
> error -22
>  - then my board hangs
> 
> Is there something to be done to improve the trace level so that you
> can guess what's happening ?

Thank you very much for testing this.

Could you please try this branch [1] instead of linux-next + the
patches?

Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
it should help us figuring out what is wrong.

Thank you,
Miqu?l

[1] https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-18  8:25           ` Miquel RAYNAL
  (?)
@ 2017-12-20 21:26             ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-20 21:26 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon

Miquel RAYNAL <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:

> Hello Robert,
>
> On Mon, 18 Dec 2017 08:11:35 +0100
> Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org> wrote:
>
>> Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:
>> 
>> >> Robert, it would be great if you could also do more testing on PXA
>> >> and validate this driver. If needed, a branch ready to be tested is
>> >> available at [3]. It is based on nand/next and has all the changes
>> >> brought by the previously mentionned series as well as this one.  
>> >
>> > Robert, do you think you'll have some time to test Miquel's branch
>> > on your PXA boards? Miquel already tested on one of these boards
>> > (CM-X300), but we'd like to have other testers. Also feel free to
>> > review the driver if have the time.
>> >
>> > Thanks,
>> >
>> > Boris  
>> 
>> Hi Boris and Miquel,
>> 
>> I have applied the whole serie to linux-next yesterday.
>> 
>> A boot attempt on my zylonite with my old defconfig (with the new
>> Marvell NAND config activated) yields to :
>>  - this message
>> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
>> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
>> error -22
>>  - then my board hangs
>> 
>> Is there something to be done to improve the trace level so that you
>> can guess what's happening ?
>
> Thank you very much for testing this.
>
> Could you please try this branch [1] instead of linux-next + the
> patches?
>
> Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
> it should help us figuring out what is wrong.

Done, same result, the dmesg is in [1].

Cheers.

-- 
Robert

[1] Kernel output
Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00041-g4dc0195 (jenkins@belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #721 PREEMPT Wed Dec 20 22:15:08 CET 2017
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4225K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04289e8   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000069] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000267] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002142] Console: colour dummy device 80x30
[    0.002302] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081019] pid_max: default: 32768 minimum: 301
[    0.081860] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081960] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085178] CPU: Testing write buffer coherency: ok
[    0.089002] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089962] Hierarchical SRCU implementation.
[    0.102994] devtmpfs: initialized
[    0.113882] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.114023] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116361] NET: Registered protocol family 16
[    0.119175] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.389891] Advanced Linux Sound Architecture Driver Initialized.
[    0.394261] clocksource: Switched to clocksource oscr0
[    0.552465] NET: Registered protocol family 2
[    0.559531] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.559757] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.559938] TCP: Hash tables configured (established 1024 bind 1024)
[    0.560478] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.560660] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.561794] NET: Registered protocol family 1
[    0.563834] RPC: Registered named UNIX socket transport module.
[    0.563934] RPC: Registered udp transport module.
[    0.563988] RPC: Registered tcp transport module.
[    0.564046] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.503938] Initialise system trusted keyrings
[    2.506180] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.510083] NFS: Registering the id_resolver key type
[    2.510312] Key type id_resolver registered
[    2.510374] Key type id_legacy registered
[    2.516887] Key type asymmetric registered
[    2.516991] Asymmetric key parser 'x509' registered
[    2.517149] io scheduler noop registered
[    2.517213] io scheduler deadline registered
[    2.517601] io scheduler cfq registered (default)
[    2.517671] io scheduler mq-deadline registered
[    2.517732] io scheduler kyber registered
[    2.577937] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.581363] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.056921] console [ttyS0] enabled
[    3.063284] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.076187] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.091759] nand: executing subop:
[    3.097924] nand:     ->CMD      [0xff]
[    3.101830] nand:     ->WAITRDY  [max 250 ms]
[    3.106998] marvell-nfc pxa3xx-nand: 
[    3.106998] NDCR:  0x90079fff
[    3.106998] NDCB0: 0x00a000ff
[    3.106998] NDCB1: 0x00000000
[    3.106998] NDCB2: 0x00000000
[    3.106998] NDCB3: 0x00000000
[    3.126261] nand: executing subop:
[    3.129732] nand:     ->CMD      [0x90]
[    3.133605] nand:     ->ADDR     [1 cyc: 00]
[    3.138275] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.143276] marvell-nfc pxa3xx-nand: 
[    3.143276] NDCR:  0x90079fff
[    3.143276] NDCB0: 0x00610090
[    3.143276] NDCB1: 0x00000000
[    3.143276] NDCB2: 0x00000000
[    3.143276] NDCB3: 0x00000000
[    3.162111] nand: executing subop:
[    3.165754] nand:     ->CMD      [0x90]
[    3.169644] nand:     ->ADDR     [1 cyc: 00]
[    3.173945] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.179056] marvell-nfc pxa3xx-nand: 
[    3.179056] NDCR:  0x90079fff
[    3.179056] NDCB0: 0x00610090
[    3.179056] NDCB1: 0x00000000
[    3.179056] NDCB2: 0x00000000
[    3.179056] NDCB3: 0x00000000
[    3.197729] nand: executing subop:
[    3.201185] nand:     ->CMD      [0x90]
[    3.205207] nand:     ->ADDR     [1 cyc: 20]
[    3.209519] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.214626] marvell-nfc pxa3xx-nand: 
[    3.214626] NDCR:  0x90079fff
[    3.214626] NDCB0: 0x00610090
[    3.214626] NDCB1: 0x00000020
[    3.214626] NDCB2: 0x00000000
[    3.214626] NDCB3: 0x00000000
[    3.233249] nand: executing subop:
[    3.236837] nand:     ->CMD      [0x90]
[    3.240719] nand:     ->ADDR     [1 cyc: 40]
[    3.245158] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.250133] marvell-nfc pxa3xx-nand: 
[    3.250133] NDCR:  0x90079fff
[    3.250133] NDCB0: 0x00610090
[    3.250133] NDCB1: 0x00000040
[    3.250133] NDCB2: 0x00000000
[    3.250133] NDCB3: 0x00000000
[    3.268756] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.275239] nand: ST Micro pxa3xx-nand
[    3.279028] nand: bus width 8 instead of 16 bits
[    3.283651] nand: No NAND device found
[    3.287582] marvell-nfc pxa3xx-nand: could not identify the nand chip
[    3.294466] marvell-nfc: probe of pxa3xx-nand failed with error -22
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-20 21:26             ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-20 21:26 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

> Hello Robert,
>
> On Mon, 18 Dec 2017 08:11:35 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>
>> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
>> 
>> >> Robert, it would be great if you could also do more testing on PXA
>> >> and validate this driver. If needed, a branch ready to be tested is
>> >> available at [3]. It is based on nand/next and has all the changes
>> >> brought by the previously mentionned series as well as this one.  
>> >
>> > Robert, do you think you'll have some time to test Miquel's branch
>> > on your PXA boards? Miquel already tested on one of these boards
>> > (CM-X300), but we'd like to have other testers. Also feel free to
>> > review the driver if have the time.
>> >
>> > Thanks,
>> >
>> > Boris  
>> 
>> Hi Boris and Miquel,
>> 
>> I have applied the whole serie to linux-next yesterday.
>> 
>> A boot attempt on my zylonite with my old defconfig (with the new
>> Marvell NAND config activated) yields to :
>>  - this message
>> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
>> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
>> error -22
>>  - then my board hangs
>> 
>> Is there something to be done to improve the trace level so that you
>> can guess what's happening ?
>
> Thank you very much for testing this.
>
> Could you please try this branch [1] instead of linux-next + the
> patches?
>
> Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
> it should help us figuring out what is wrong.

Done, same result, the dmesg is in [1].

Cheers.

-- 
Robert

[1] Kernel output
Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00041-g4dc0195 (jenkins@belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #721 PREEMPT Wed Dec 20 22:15:08 CET 2017
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4225K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04289e8   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000069] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000267] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002142] Console: colour dummy device 80x30
[    0.002302] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081019] pid_max: default: 32768 minimum: 301
[    0.081860] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081960] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085178] CPU: Testing write buffer coherency: ok
[    0.089002] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089962] Hierarchical SRCU implementation.
[    0.102994] devtmpfs: initialized
[    0.113882] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.114023] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116361] NET: Registered protocol family 16
[    0.119175] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.389891] Advanced Linux Sound Architecture Driver Initialized.
[    0.394261] clocksource: Switched to clocksource oscr0
[    0.552465] NET: Registered protocol family 2
[    0.559531] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.559757] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.559938] TCP: Hash tables configured (established 1024 bind 1024)
[    0.560478] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.560660] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.561794] NET: Registered protocol family 1
[    0.563834] RPC: Registered named UNIX socket transport module.
[    0.563934] RPC: Registered udp transport module.
[    0.563988] RPC: Registered tcp transport module.
[    0.564046] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.503938] Initialise system trusted keyrings
[    2.506180] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.510083] NFS: Registering the id_resolver key type
[    2.510312] Key type id_resolver registered
[    2.510374] Key type id_legacy registered
[    2.516887] Key type asymmetric registered
[    2.516991] Asymmetric key parser 'x509' registered
[    2.517149] io scheduler noop registered
[    2.517213] io scheduler deadline registered
[    2.517601] io scheduler cfq registered (default)
[    2.517671] io scheduler mq-deadline registered
[    2.517732] io scheduler kyber registered
[    2.577937] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.581363] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.056921] console [ttyS0] enabled
[    3.063284] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.076187] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.091759] nand: executing subop:
[    3.097924] nand:     ->CMD      [0xff]
[    3.101830] nand:     ->WAITRDY  [max 250 ms]
[    3.106998] marvell-nfc pxa3xx-nand: 
[    3.106998] NDCR:  0x90079fff
[    3.106998] NDCB0: 0x00a000ff
[    3.106998] NDCB1: 0x00000000
[    3.106998] NDCB2: 0x00000000
[    3.106998] NDCB3: 0x00000000
[    3.126261] nand: executing subop:
[    3.129732] nand:     ->CMD      [0x90]
[    3.133605] nand:     ->ADDR     [1 cyc: 00]
[    3.138275] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.143276] marvell-nfc pxa3xx-nand: 
[    3.143276] NDCR:  0x90079fff
[    3.143276] NDCB0: 0x00610090
[    3.143276] NDCB1: 0x00000000
[    3.143276] NDCB2: 0x00000000
[    3.143276] NDCB3: 0x00000000
[    3.162111] nand: executing subop:
[    3.165754] nand:     ->CMD      [0x90]
[    3.169644] nand:     ->ADDR     [1 cyc: 00]
[    3.173945] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.179056] marvell-nfc pxa3xx-nand: 
[    3.179056] NDCR:  0x90079fff
[    3.179056] NDCB0: 0x00610090
[    3.179056] NDCB1: 0x00000000
[    3.179056] NDCB2: 0x00000000
[    3.179056] NDCB3: 0x00000000
[    3.197729] nand: executing subop:
[    3.201185] nand:     ->CMD      [0x90]
[    3.205207] nand:     ->ADDR     [1 cyc: 20]
[    3.209519] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.214626] marvell-nfc pxa3xx-nand: 
[    3.214626] NDCR:  0x90079fff
[    3.214626] NDCB0: 0x00610090
[    3.214626] NDCB1: 0x00000020
[    3.214626] NDCB2: 0x00000000
[    3.214626] NDCB3: 0x00000000
[    3.233249] nand: executing subop:
[    3.236837] nand:     ->CMD      [0x90]
[    3.240719] nand:     ->ADDR     [1 cyc: 40]
[    3.245158] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.250133] marvell-nfc pxa3xx-nand: 
[    3.250133] NDCR:  0x90079fff
[    3.250133] NDCB0: 0x00610090
[    3.250133] NDCB1: 0x00000040
[    3.250133] NDCB2: 0x00000000
[    3.250133] NDCB3: 0x00000000
[    3.268756] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.275239] nand: ST Micro pxa3xx-nand
[    3.279028] nand: bus width 8 instead of 16 bits
[    3.283651] nand: No NAND device found
[    3.287582] marvell-nfc pxa3xx-nand: could not identify the nand chip
[    3.294466] marvell-nfc: probe of pxa3xx-nand failed with error -22

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-20 21:26             ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-20 21:26 UTC (permalink / raw)
  To: linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

> Hello Robert,
>
> On Mon, 18 Dec 2017 08:11:35 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>
>> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
>> 
>> >> Robert, it would be great if you could also do more testing on PXA
>> >> and validate this driver. If needed, a branch ready to be tested is
>> >> available at [3]. It is based on nand/next and has all the changes
>> >> brought by the previously mentionned series as well as this one.  
>> >
>> > Robert, do you think you'll have some time to test Miquel's branch
>> > on your PXA boards? Miquel already tested on one of these boards
>> > (CM-X300), but we'd like to have other testers. Also feel free to
>> > review the driver if have the time.
>> >
>> > Thanks,
>> >
>> > Boris  
>> 
>> Hi Boris and Miquel,
>> 
>> I have applied the whole serie to linux-next yesterday.
>> 
>> A boot attempt on my zylonite with my old defconfig (with the new
>> Marvell NAND config activated) yields to :
>>  - this message
>> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
>> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
>> error -22
>>  - then my board hangs
>> 
>> Is there something to be done to improve the trace level so that you
>> can guess what's happening ?
>
> Thank you very much for testing this.
>
> Could you please try this branch [1] instead of linux-next + the
> patches?
>
> Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
> it should help us figuring out what is wrong.

Done, same result, the dmesg is in [1].

Cheers.

-- 
Robert

[1] Kernel output
Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00041-g4dc0195 (jenkins at belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #721 PREEMPT Wed Dec 20 22:15:08 CET 2017
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4225K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04289e8   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000069] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000267] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002142] Console: colour dummy device 80x30
[    0.002302] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081019] pid_max: default: 32768 minimum: 301
[    0.081860] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081960] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085178] CPU: Testing write buffer coherency: ok
[    0.089002] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089962] Hierarchical SRCU implementation.
[    0.102994] devtmpfs: initialized
[    0.113882] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.114023] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116361] NET: Registered protocol family 16
[    0.119175] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.389891] Advanced Linux Sound Architecture Driver Initialized.
[    0.394261] clocksource: Switched to clocksource oscr0
[    0.552465] NET: Registered protocol family 2
[    0.559531] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.559757] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.559938] TCP: Hash tables configured (established 1024 bind 1024)
[    0.560478] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.560660] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.561794] NET: Registered protocol family 1
[    0.563834] RPC: Registered named UNIX socket transport module.
[    0.563934] RPC: Registered udp transport module.
[    0.563988] RPC: Registered tcp transport module.
[    0.564046] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.503938] Initialise system trusted keyrings
[    2.506180] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.510083] NFS: Registering the id_resolver key type
[    2.510312] Key type id_resolver registered
[    2.510374] Key type id_legacy registered
[    2.516887] Key type asymmetric registered
[    2.516991] Asymmetric key parser 'x509' registered
[    2.517149] io scheduler noop registered
[    2.517213] io scheduler deadline registered
[    2.517601] io scheduler cfq registered (default)
[    2.517671] io scheduler mq-deadline registered
[    2.517732] io scheduler kyber registered
[    2.577937] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.581363] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.056921] console [ttyS0] enabled
[    3.063284] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.076187] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.091759] nand: executing subop:
[    3.097924] nand:     ->CMD      [0xff]
[    3.101830] nand:     ->WAITRDY  [max 250 ms]
[    3.106998] marvell-nfc pxa3xx-nand: 
[    3.106998] NDCR:  0x90079fff
[    3.106998] NDCB0: 0x00a000ff
[    3.106998] NDCB1: 0x00000000
[    3.106998] NDCB2: 0x00000000
[    3.106998] NDCB3: 0x00000000
[    3.126261] nand: executing subop:
[    3.129732] nand:     ->CMD      [0x90]
[    3.133605] nand:     ->ADDR     [1 cyc: 00]
[    3.138275] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.143276] marvell-nfc pxa3xx-nand: 
[    3.143276] NDCR:  0x90079fff
[    3.143276] NDCB0: 0x00610090
[    3.143276] NDCB1: 0x00000000
[    3.143276] NDCB2: 0x00000000
[    3.143276] NDCB3: 0x00000000
[    3.162111] nand: executing subop:
[    3.165754] nand:     ->CMD      [0x90]
[    3.169644] nand:     ->ADDR     [1 cyc: 00]
[    3.173945] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.179056] marvell-nfc pxa3xx-nand: 
[    3.179056] NDCR:  0x90079fff
[    3.179056] NDCB0: 0x00610090
[    3.179056] NDCB1: 0x00000000
[    3.179056] NDCB2: 0x00000000
[    3.179056] NDCB3: 0x00000000
[    3.197729] nand: executing subop:
[    3.201185] nand:     ->CMD      [0x90]
[    3.205207] nand:     ->ADDR     [1 cyc: 20]
[    3.209519] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.214626] marvell-nfc pxa3xx-nand: 
[    3.214626] NDCR:  0x90079fff
[    3.214626] NDCB0: 0x00610090
[    3.214626] NDCB1: 0x00000020
[    3.214626] NDCB2: 0x00000000
[    3.214626] NDCB3: 0x00000000
[    3.233249] nand: executing subop:
[    3.236837] nand:     ->CMD      [0x90]
[    3.240719] nand:     ->ADDR     [1 cyc: 40]
[    3.245158] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.250133] marvell-nfc pxa3xx-nand: 
[    3.250133] NDCR:  0x90079fff
[    3.250133] NDCB0: 0x00610090
[    3.250133] NDCB1: 0x00000040
[    3.250133] NDCB2: 0x00000000
[    3.250133] NDCB3: 0x00000000
[    3.268756] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.275239] nand: ST Micro pxa3xx-nand
[    3.279028] nand: bus width 8 instead of 16 bits
[    3.283651] nand: No NAND device found
[    3.287582] marvell-nfc pxa3xx-nand: could not identify the nand chip
[    3.294466] marvell-nfc: probe of pxa3xx-nand failed with error -22

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-20 21:26             ` Robert Jarzmik
  (?)
@ 2017-12-20 21:41                 ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-20 21:41 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia

On Wed, 20 Dec 2017 22:26:04 +0100
Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org> wrote:

> Miquel RAYNAL <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:
> 
> > Hello Robert,
> >
> > On Mon, 18 Dec 2017 08:11:35 +0100
> > Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org> wrote:
> >  
> >> Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:
> >>   
> >> >> Robert, it would be great if you could also do more testing on PXA
> >> >> and validate this driver. If needed, a branch ready to be tested is
> >> >> available at [3]. It is based on nand/next and has all the changes
> >> >> brought by the previously mentionned series as well as this one.    
> >> >
> >> > Robert, do you think you'll have some time to test Miquel's branch
> >> > on your PXA boards? Miquel already tested on one of these boards
> >> > (CM-X300), but we'd like to have other testers. Also feel free to
> >> > review the driver if have the time.
> >> >
> >> > Thanks,
> >> >
> >> > Boris    
> >> 
> >> Hi Boris and Miquel,
> >> 
> >> I have applied the whole serie to linux-next yesterday.
> >> 
> >> A boot attempt on my zylonite with my old defconfig (with the new
> >> Marvell NAND config activated) yields to :
> >>  - this message
> >> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
> >> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
> >> error -22
> >>  - then my board hangs
> >> 
> >> Is there something to be done to improve the trace level so that you
> >> can guess what's happening ?  
> >
> > Thank you very much for testing this.
> >
> > Could you please try this branch [1] instead of linux-next + the
> > patches?
> >
> > Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
> > it should help us figuring out what is wrong.  
> 
> Done, same result, the dmesg is in [1].

Looks like there is a mismatch on the nand bus width detected by the
core and the one declared by the driver. Can you try with the following
diff applied?

Thanks,

Boris

--->8---
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index c618ccb22a61..ddd6a07888e2 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -2481,6 +2481,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
         */
        chip->ecc.mode = NAND_ECC_HW;
 
+       chip->options |= NAND_BUSWIDTH_AUTO;
        ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
        if (ret) {
                dev_err(dev, "could not identify the nand chip\n");
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-20 21:41                 ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-20 21:41 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

On Wed, 20 Dec 2017 22:26:04 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> > Hello Robert,
> >
> > On Mon, 18 Dec 2017 08:11:35 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> >  
> >> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> >>   
> >> >> Robert, it would be great if you could also do more testing on PXA
> >> >> and validate this driver. If needed, a branch ready to be tested is
> >> >> available at [3]. It is based on nand/next and has all the changes
> >> >> brought by the previously mentionned series as well as this one.    
> >> >
> >> > Robert, do you think you'll have some time to test Miquel's branch
> >> > on your PXA boards? Miquel already tested on one of these boards
> >> > (CM-X300), but we'd like to have other testers. Also feel free to
> >> > review the driver if have the time.
> >> >
> >> > Thanks,
> >> >
> >> > Boris    
> >> 
> >> Hi Boris and Miquel,
> >> 
> >> I have applied the whole serie to linux-next yesterday.
> >> 
> >> A boot attempt on my zylonite with my old defconfig (with the new
> >> Marvell NAND config activated) yields to :
> >>  - this message
> >> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
> >> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
> >> error -22
> >>  - then my board hangs
> >> 
> >> Is there something to be done to improve the trace level so that you
> >> can guess what's happening ?  
> >
> > Thank you very much for testing this.
> >
> > Could you please try this branch [1] instead of linux-next + the
> > patches?
> >
> > Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
> > it should help us figuring out what is wrong.  
> 
> Done, same result, the dmesg is in [1].

Looks like there is a mismatch on the nand bus width detected by the
core and the one declared by the driver. Can you try with the following
diff applied?

Thanks,

Boris

--->8---
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index c618ccb22a61..ddd6a07888e2 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -2481,6 +2481,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
         */
        chip->ecc.mode = NAND_ECC_HW;
 
+       chip->options |= NAND_BUSWIDTH_AUTO;
        ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
        if (ret) {
                dev_err(dev, "could not identify the nand chip\n");

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-20 21:41                 ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-20 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 20 Dec 2017 22:26:04 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> > Hello Robert,
> >
> > On Mon, 18 Dec 2017 08:11:35 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> >  
> >> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> >>   
> >> >> Robert, it would be great if you could also do more testing on PXA
> >> >> and validate this driver. If needed, a branch ready to be tested is
> >> >> available at [3]. It is based on nand/next and has all the changes
> >> >> brought by the previously mentionned series as well as this one.    
> >> >
> >> > Robert, do you think you'll have some time to test Miquel's branch
> >> > on your PXA boards? Miquel already tested on one of these boards
> >> > (CM-X300), but we'd like to have other testers. Also feel free to
> >> > review the driver if have the time.
> >> >
> >> > Thanks,
> >> >
> >> > Boris    
> >> 
> >> Hi Boris and Miquel,
> >> 
> >> I have applied the whole serie to linux-next yesterday.
> >> 
> >> A boot attempt on my zylonite with my old defconfig (with the new
> >> Marvell NAND config activated) yields to :
> >>  - this message
> >> [    3.136818] marvell-nfc pxa3xx-nand: could not identify the nand
> >> chip [    3.143874] marvell-nfc: probe of pxa3xx-nand failed with
> >> error -22
> >>  - then my board hangs
> >> 
> >> Is there something to be done to improve the trace level so that you
> >> can guess what's happening ?  
> >
> > Thank you very much for testing this.
> >
> > Could you please try this branch [1] instead of linux-next + the
> > patches?
> >
> > Also, can you please add #define DEBUG in marvell_nand.c + nand_base.c,
> > it should help us figuring out what is wrong.  
> 
> Done, same result, the dmesg is in [1].

Looks like there is a mismatch on the nand bus width detected by the
core and the one declared by the driver. Can you try with the following
diff applied?

Thanks,

Boris

--->8---
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index c618ccb22a61..ddd6a07888e2 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -2481,6 +2481,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
         */
        chip->ecc.mode = NAND_ECC_HW;
 
+       chip->options |= NAND_BUSWIDTH_AUTO;
        ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
        if (ret) {
                dev_err(dev, "could not identify the nand chip\n");

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-20 21:41                 ` Boris Brezillon
  (?)
@ 2017-12-22 20:11                   ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-22 20:11 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia

Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:

> Looks like there is a mismatch on the nand bus width detected by the
> core and the one declared by the driver. Can you try with the following
> diff applied?

Sure.

Now I get a lot of these message which I didn't have before :
[   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.928559] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.959623] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.990714] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read 126976 bytes
[   27.002084] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
[   27.009674] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[   27.016750] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[   27.024729] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
[   27.032453] [<c02c5bd4>] (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
[   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
[   27.048473] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
[   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[   27.064466] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[   27.073398] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
[   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[   27.090115] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.102363] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.114586] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.126813] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read 64 bytes
[   27.137416] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
[   27.145143] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[   27.152207] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[   27.160037] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
[   27.167742] [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
[   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
[   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
[   27.193010] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
[   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[   27.208839] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[   27.217755] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
[   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)

Cheers.

-- 
Robert
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 20:11                   ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-22 20:11 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

> Looks like there is a mismatch on the nand bus width detected by the
> core and the one declared by the driver. Can you try with the following
> diff applied?

Sure.

Now I get a lot of these message which I didn't have before :
[   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.928559] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.959623] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.990714] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read 126976 bytes
[   27.002084] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
[   27.009674] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[   27.016750] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[   27.024729] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
[   27.032453] [<c02c5bd4>] (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
[   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
[   27.048473] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
[   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[   27.064466] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[   27.073398] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
[   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[   27.090115] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.102363] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.114586] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.126813] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read 64 bytes
[   27.137416] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
[   27.145143] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[   27.152207] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[   27.160037] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
[   27.167742] [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
[   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
[   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
[   27.193010] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
[   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[   27.208839] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[   27.217755] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
[   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 20:11                   ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-22 20:11 UTC (permalink / raw)
  To: linux-arm-kernel

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

> Looks like there is a mismatch on the nand bus width detected by the
> core and the one declared by the driver. Can you try with the following
> diff applied?

Sure.

Now I get a lot of these message which I didn't have before :
[   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.928559] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.959623] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
[   26.990714] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read 126976 bytes
[   27.002084] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
[   27.009674] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[   27.016750] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[   27.024729] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
[   27.032453] [<c02c5bd4>] (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
[   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
[   27.048473] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
[   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[   27.064466] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[   27.073398] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
[   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[   27.090115] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.102363] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.114586] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
[   27.126813] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read 64 bytes
[   27.137416] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
[   27.145143] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[   27.152207] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[   27.160037] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
[   27.167742] [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
[   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
[   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
[   27.193010] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
[   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[   27.208839] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[   27.217755] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
[   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-22 20:11                   ` Robert Jarzmik
  (?)
@ 2017-12-22 21:24                       ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-22 21:24 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia

Hi Robert,

On Fri, 22 Dec 2017 21:11:32 +0100
Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org> wrote:

> Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:
> 
> > Looks like there is a mismatch on the nand bus width detected by the
> > core and the one declared by the driver. Can you try with the following
> > diff applied?  
> 
> Sure.
> 
> Now I get a lot of these message which I didn't have before :
> [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.928559] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.959623] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.990714] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read 126976 bytes
> [   27.002084] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> [   27.009674] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
> [   27.016750] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
> [   27.024729] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
> [   27.032453] [<c02c5bd4>] (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
> [   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
> [   27.048473] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> [   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
> [   27.064466] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
> [   27.073398] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
> [   27.090115] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.102363] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.114586] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.126813] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read 64 bytes
> [   27.137416] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> [   27.145143] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
> [   27.152207] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
> [   27.160037] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
> [   27.167742] [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
> [   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
> [   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
> [   27.193010] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
> [   27.208839] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
> [   27.217755] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)

Looks like a mismatch in the ECC config. Can you check the ecc
strength/step_size in both situation (old driver vs new driver)? Could
you also dump the NDCR register in both cases?

Thanks,

Boris
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 21:24                       ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-22 21:24 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

Hi Robert,

On Fri, 22 Dec 2017 21:11:32 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> > Looks like there is a mismatch on the nand bus width detected by the
> > core and the one declared by the driver. Can you try with the following
> > diff applied?  
> 
> Sure.
> 
> Now I get a lot of these message which I didn't have before :
> [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.928559] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.959623] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.990714] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read 126976 bytes
> [   27.002084] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> [   27.009674] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
> [   27.016750] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
> [   27.024729] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
> [   27.032453] [<c02c5bd4>] (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
> [   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
> [   27.048473] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> [   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
> [   27.064466] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
> [   27.073398] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
> [   27.090115] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.102363] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.114586] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.126813] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read 64 bytes
> [   27.137416] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> [   27.145143] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
> [   27.152207] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
> [   27.160037] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
> [   27.167742] [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
> [   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
> [   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
> [   27.193010] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
> [   27.208839] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
> [   27.217755] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)

Looks like a mismatch in the ECC config. Can you check the ecc
strength/step_size in both situation (old driver vs new driver)? Could
you also dump the NDCR register in both cases?

Thanks,

Boris

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 21:24                       ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2017-12-22 21:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Robert,

On Fri, 22 Dec 2017 21:11:32 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> > Looks like there is a mismatch on the nand bus width detected by the
> > core and the one declared by the driver. Can you try with the following
> > diff applied?  
> 
> Sure.
> 
> Now I get a lot of these message which I didn't have before :
> [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.928559] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.959623] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read only 126976 bytes, retry
> [   26.990714] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read 126976 bytes
> [   27.002084] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> [   27.009674] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
> [   27.016750] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
> [   27.024729] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
> [   27.032453] [<c02c5bd4>] (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
> [   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
> [   27.048473] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> [   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
> [   27.064466] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
> [   27.073398] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
> [   27.090115] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.102363] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.114586] ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read only 64 bytes, retry
> [   27.126813] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 243:2048, read 64 bytes
> [   27.137416] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> [   27.145143] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
> [   27.152207] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
> [   27.160037] [<c000df94>] (show_stack) from [<c02c5bd4>] (ubi_io_read+0x124/0x368)
> [   27.167742] [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
> [   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
> [   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58)
> [   27.193010] [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
> [   27.208839] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
> [   27.217755] [<c053fd80>] (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)

Looks like a mismatch in the ECC config. Can you check the ecc
strength/step_size in both situation (old driver vs new driver)? Could
you also dump the NDCR register in both cases?

Thanks,

Boris

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-22 21:24                       ` Boris Brezillon
  (?)
@ 2017-12-22 22:37                         ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-22 22:37 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Robert Jarzmik, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia

Hi Robert,

On Fri, 22 Dec 2017 22:24:41 +0100
Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Hi Robert,
> 
> On Fri, 22 Dec 2017 21:11:32 +0100
> Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org> wrote:
> 
> > Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:
> >   
> > > Looks like there is a mismatch on the nand bus width detected by
> > > the core and the one declared by the driver. Can you try with the
> > > following diff applied?    
> > 
> > Sure.
> > 
> > Now I get a lot of these message which I didn't have before :
> > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> > while reading 126976 bytes from PEB 242:4096, read only 126976
> > bytes, retry [   26.928559] ubi0 warning: ubi_io_read: error -74
> > (ECC error) while reading 126976 bytes from PEB 242:4096, read only
> > 126976 bytes, retry [   26.959623] ubi0 warning: ubi_io_read: error
> > -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read
> > only 126976 bytes, retry [   26.990714] ubi0 error: ubi_io_read:
> > error -74 (ECC error) while reading 126976 bytes from PEB 242:4096,
> > read 126976 bytes [   27.002084] CPU: 0 PID: 1 Comm: swapper Not
> > tainted 4.15.0-rc1-00041-ge371e97 #737 [   27.009674] Hardware
> > name: PXA3xx Platform Development Kit (aka Zylonite) [   27.016750]
> > [<c0010440>] (unwind_backtrace) from [<c000df94>]
> > (show_stack+0x10/0x14) [   27.024729] [<c000df94>] (show_stack)
> > from [<c02c5bd4>] (ubi_io_read+0x124/0x368) [   27.032453]
> > [<c02c5bd4>] (ubi_io_read) from [<c02cd550>]
> > (ubi_attach+0xbd8/0x1868) [   27.040148] [<c02cd550>] (ubi_attach)
> > from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58) [   27.048473]
> > [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>]
> > (ubi_init+0x134/0x1d4) [   27.056623] [<c05526e4>] (ubi_init) from
> > [<c00099f8>] (do_one_initcall+0x3c/0x17c) [   27.064466]
> > [<c00099f8>] (do_one_initcall) from [<c053fd80>]
> > (kernel_init_freeable+0x104/0x1c0) [   27.073398] [<c053fd80>]
> > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > (ret_from_fork+0x14/0x34) [   27.090115] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.102363] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.114586] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.126813] ubi0 error: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read 64 bytes [   27.137416] CPU: 0 PID: 1 Comm: swapper Not
> > tainted 4.15.0-rc1-00041-ge371e97 #737 [   27.145143] Hardware
> > name: PXA3xx Platform Development Kit (aka Zylonite) [   27.152207]
> > [<c0010440>] (unwind_backtrace) from [<c000df94>]
> > (show_stack+0x10/0x14) [   27.160037] [<c000df94>] (show_stack)
> > from [<c02c5bd4>] (ubi_io_read+0x124/0x368) [   27.167742]
> > [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>]
> > (ubi_io_read_vid_hdr+0x60/0x3ac) [   27.176156] [<c02c63dc>]
> > (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
> > [   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>]
> > (ubi_attach_mtd_dev+0x548/0xe58) [   27.193010] [<c02be7c4>]
> > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > (do_one_initcall+0x3c/0x17c) [   27.208839] [<c00099f8>]
> > (do_one_initcall) from [<c053fd80>]
> > (kernel_init_freeable+0x104/0x1c0) [   27.217755] [<c053fd80>]
> > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > (ret_from_fork+0x14/0x34)  
> 
> Looks like a mismatch in the ECC config. Can you check the ecc
> strength/step_size in both situation (old driver vs new driver)?

For that, you might want to add traces in marvell_nand_ecc_init() and
marvell_nand_hw_ecc_ctrl_init().

> Could you also dump the NDCR register in both cases?

NDCR register (as well as NDCBx registers) will appear if you let

    #define DEBUG

at the beginning of the driver.

Also, can you please give us the entire dmesg (I mean the boot, not the
flow of UBIFS errors of course).

If this, in conjunction with your check of the ECC configuration, does
not give satisfying results, I will write a test script using
nandwrite/nanddump/flash_erase.

Thank you,
Miquèl


> 
> Thanks,
> 
> Boris



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 22:37                         ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-22 22:37 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Robert Jarzmik, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

Hi Robert,

On Fri, 22 Dec 2017 22:24:41 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> Hi Robert,
> 
> On Fri, 22 Dec 2017 21:11:32 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> 
> > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> >   
> > > Looks like there is a mismatch on the nand bus width detected by
> > > the core and the one declared by the driver. Can you try with the
> > > following diff applied?    
> > 
> > Sure.
> > 
> > Now I get a lot of these message which I didn't have before :
> > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> > while reading 126976 bytes from PEB 242:4096, read only 126976
> > bytes, retry [   26.928559] ubi0 warning: ubi_io_read: error -74
> > (ECC error) while reading 126976 bytes from PEB 242:4096, read only
> > 126976 bytes, retry [   26.959623] ubi0 warning: ubi_io_read: error
> > -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read
> > only 126976 bytes, retry [   26.990714] ubi0 error: ubi_io_read:
> > error -74 (ECC error) while reading 126976 bytes from PEB 242:4096,
> > read 126976 bytes [   27.002084] CPU: 0 PID: 1 Comm: swapper Not
> > tainted 4.15.0-rc1-00041-ge371e97 #737 [   27.009674] Hardware
> > name: PXA3xx Platform Development Kit (aka Zylonite) [   27.016750]
> > [<c0010440>] (unwind_backtrace) from [<c000df94>]
> > (show_stack+0x10/0x14) [   27.024729] [<c000df94>] (show_stack)
> > from [<c02c5bd4>] (ubi_io_read+0x124/0x368) [   27.032453]
> > [<c02c5bd4>] (ubi_io_read) from [<c02cd550>]
> > (ubi_attach+0xbd8/0x1868) [   27.040148] [<c02cd550>] (ubi_attach)
> > from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58) [   27.048473]
> > [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>]
> > (ubi_init+0x134/0x1d4) [   27.056623] [<c05526e4>] (ubi_init) from
> > [<c00099f8>] (do_one_initcall+0x3c/0x17c) [   27.064466]
> > [<c00099f8>] (do_one_initcall) from [<c053fd80>]
> > (kernel_init_freeable+0x104/0x1c0) [   27.073398] [<c053fd80>]
> > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > (ret_from_fork+0x14/0x34) [   27.090115] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.102363] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.114586] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.126813] ubi0 error: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read 64 bytes [   27.137416] CPU: 0 PID: 1 Comm: swapper Not
> > tainted 4.15.0-rc1-00041-ge371e97 #737 [   27.145143] Hardware
> > name: PXA3xx Platform Development Kit (aka Zylonite) [   27.152207]
> > [<c0010440>] (unwind_backtrace) from [<c000df94>]
> > (show_stack+0x10/0x14) [   27.160037] [<c000df94>] (show_stack)
> > from [<c02c5bd4>] (ubi_io_read+0x124/0x368) [   27.167742]
> > [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>]
> > (ubi_io_read_vid_hdr+0x60/0x3ac) [   27.176156] [<c02c63dc>]
> > (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
> > [   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>]
> > (ubi_attach_mtd_dev+0x548/0xe58) [   27.193010] [<c02be7c4>]
> > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > (do_one_initcall+0x3c/0x17c) [   27.208839] [<c00099f8>]
> > (do_one_initcall) from [<c053fd80>]
> > (kernel_init_freeable+0x104/0x1c0) [   27.217755] [<c053fd80>]
> > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > (ret_from_fork+0x14/0x34)  
> 
> Looks like a mismatch in the ECC config. Can you check the ecc
> strength/step_size in both situation (old driver vs new driver)?

For that, you might want to add traces in marvell_nand_ecc_init() and
marvell_nand_hw_ecc_ctrl_init().

> Could you also dump the NDCR register in both cases?

NDCR register (as well as NDCBx registers) will appear if you let

    #define DEBUG

at the beginning of the driver.

Also, can you please give us the entire dmesg (I mean the boot, not the
flow of UBIFS errors of course).

If this, in conjunction with your check of the ECC configuration, does
not give satisfying results, I will write a test script using
nandwrite/nanddump/flash_erase.

Thank you,
Miquèl


> 
> Thanks,
> 
> Boris



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 22:37                         ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-22 22:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Robert,

On Fri, 22 Dec 2017 22:24:41 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> Hi Robert,
> 
> On Fri, 22 Dec 2017 21:11:32 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> 
> > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> >   
> > > Looks like there is a mismatch on the nand bus width detected by
> > > the core and the one declared by the driver. Can you try with the
> > > following diff applied?    
> > 
> > Sure.
> > 
> > Now I get a lot of these message which I didn't have before :
> > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> > while reading 126976 bytes from PEB 242:4096, read only 126976
> > bytes, retry [   26.928559] ubi0 warning: ubi_io_read: error -74
> > (ECC error) while reading 126976 bytes from PEB 242:4096, read only
> > 126976 bytes, retry [   26.959623] ubi0 warning: ubi_io_read: error
> > -74 (ECC error) while reading 126976 bytes from PEB 242:4096, read
> > only 126976 bytes, retry [   26.990714] ubi0 error: ubi_io_read:
> > error -74 (ECC error) while reading 126976 bytes from PEB 242:4096,
> > read 126976 bytes [   27.002084] CPU: 0 PID: 1 Comm: swapper Not
> > tainted 4.15.0-rc1-00041-ge371e97 #737 [   27.009674] Hardware
> > name: PXA3xx Platform Development Kit (aka Zylonite) [   27.016750]
> > [<c0010440>] (unwind_backtrace) from [<c000df94>]
> > (show_stack+0x10/0x14) [   27.024729] [<c000df94>] (show_stack)
> > from [<c02c5bd4>] (ubi_io_read+0x124/0x368) [   27.032453]
> > [<c02c5bd4>] (ubi_io_read) from [<c02cd550>]
> > (ubi_attach+0xbd8/0x1868) [   27.040148] [<c02cd550>] (ubi_attach)
> > from [<c02be7c4>] (ubi_attach_mtd_dev+0x548/0xe58) [   27.048473]
> > [<c02be7c4>] (ubi_attach_mtd_dev) from [<c05526e4>]
> > (ubi_init+0x134/0x1d4) [   27.056623] [<c05526e4>] (ubi_init) from
> > [<c00099f8>] (do_one_initcall+0x3c/0x17c) [   27.064466]
> > [<c00099f8>] (do_one_initcall) from [<c053fd80>]
> > (kernel_init_freeable+0x104/0x1c0) [   27.073398] [<c053fd80>]
> > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > (ret_from_fork+0x14/0x34) [   27.090115] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.102363] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.114586] ubi0 warning: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read only 64 bytes, retry [   27.126813] ubi0 error: ubi_io_read:
> > error -74 (ECC error) while reading 64 bytes from PEB 243:2048,
> > read 64 bytes [   27.137416] CPU: 0 PID: 1 Comm: swapper Not
> > tainted 4.15.0-rc1-00041-ge371e97 #737 [   27.145143] Hardware
> > name: PXA3xx Platform Development Kit (aka Zylonite) [   27.152207]
> > [<c0010440>] (unwind_backtrace) from [<c000df94>]
> > (show_stack+0x10/0x14) [   27.160037] [<c000df94>] (show_stack)
> > from [<c02c5bd4>] (ubi_io_read+0x124/0x368) [   27.167742]
> > [<c02c5bd4>] (ubi_io_read) from [<c02c63dc>]
> > (ubi_io_read_vid_hdr+0x60/0x3ac) [   27.176156] [<c02c63dc>]
> > (ubi_io_read_vid_hdr) from [<c02cce58>] (ubi_attach+0x4e0/0x1868)
> > [   27.184675] [<c02cce58>] (ubi_attach) from [<c02be7c4>]
> > (ubi_attach_mtd_dev+0x548/0xe58) [   27.193010] [<c02be7c4>]
> > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > (do_one_initcall+0x3c/0x17c) [   27.208839] [<c00099f8>]
> > (do_one_initcall) from [<c053fd80>]
> > (kernel_init_freeable+0x104/0x1c0) [   27.217755] [<c053fd80>]
> > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > (ret_from_fork+0x14/0x34)  
> 
> Looks like a mismatch in the ECC config. Can you check the ecc
> strength/step_size in both situation (old driver vs new driver)?

For that, you might want to add traces in marvell_nand_ecc_init() and
marvell_nand_hw_ecc_ctrl_init().

> Could you also dump the NDCR register in both cases?

NDCR register (as well as NDCBx registers) will appear if you let

    #define DEBUG

at the beginning of the driver.

Also, can you please give us the entire dmesg (I mean the boot, not the
flow of UBIFS errors of course).

If this, in conjunction with your check of the ECC configuration, does
not give satisfying results, I will write a test script using
nandwrite/nanddump/flash_erase.

Thank you,
Miqu?l


> 
> Thanks,
> 
> Boris



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-22 22:37                         ` Miquel RAYNAL
  (?)
@ 2017-12-22 22:50                           ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-22 22:50 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Robert Jarzmik, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia

On Fri, 22 Dec 2017 23:37:30 +0100
Miquel RAYNAL <miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:

> Hi Robert,
> 
> On Fri, 22 Dec 2017 22:24:41 +0100
> Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> 
> > Hi Robert,
> > 
> > On Fri, 22 Dec 2017 21:11:32 +0100
> > Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org> wrote:
> > 
> > > Boris Brezillon <boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> writes:
> > >   
> > > > Looks like there is a mismatch on the nand bus width detected by
> > > > the core and the one declared by the driver. Can you try with
> > > > the following diff applied?    
> > > 
> > > Sure.
> > > 
> > > Now I get a lot of these message which I didn't have before :
> > > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> > > while reading 126976 bytes from PEB 242:4096, read only 126976
> > > bytes, retry [   26.928559] ubi0 warning: ubi_io_read: error -74
> > > (ECC error) while reading 126976 bytes from PEB 242:4096, read
> > > only 126976 bytes, retry [   26.959623] ubi0 warning:
> > > ubi_io_read: error -74 (ECC error) while reading 126976 bytes
> > > from PEB 242:4096, read only 126976 bytes, retry [   26.990714]
> > > ubi0 error: ubi_io_read: error -74 (ECC error) while reading
> > > 126976 bytes from PEB 242:4096, read 126976 bytes [   27.002084]
> > > CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97
> > > #737 [   27.009674] Hardware name: PXA3xx Platform Development
> > > Kit (aka Zylonite) [   27.016750] [<c0010440>] (unwind_backtrace)
> > > from [<c000df94>] (show_stack+0x10/0x14) [   27.024729]
> > > [<c000df94>] (show_stack) from [<c02c5bd4>]
> > > (ubi_io_read+0x124/0x368) [   27.032453] [<c02c5bd4>]
> > > (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
> > > [   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>]
> > > (ubi_attach_mtd_dev+0x548/0xe58) [   27.048473] [<c02be7c4>]
> > > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > > [   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > > (do_one_initcall+0x3c/0x17c) [   27.064466] [<c00099f8>]
> > > (do_one_initcall) from [<c053fd80>]
> > > (kernel_init_freeable+0x104/0x1c0) [   27.073398] [<c053fd80>]
> > > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > > [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > > (ret_from_fork+0x14/0x34) [   27.090115] ubi0 warning:
> > > ubi_io_read: error -74 (ECC error) while reading 64 bytes from
> > > PEB 243:2048, read only 64 bytes, retry [   27.102363] ubi0
> > > warning: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read only 64 bytes, retry [   27.114586]
> > > ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read only 64 bytes, retry [   27.126813]
> > > ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read 64 bytes [   27.137416] CPU: 0 PID:
> > > 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> > > [   27.145143] Hardware name: PXA3xx Platform Development Kit
> > > (aka Zylonite) [   27.152207] [<c0010440>] (unwind_backtrace)
> > > from [<c000df94>] (show_stack+0x10/0x14) [   27.160037]
> > > [<c000df94>] (show_stack) from [<c02c5bd4>]
> > > (ubi_io_read+0x124/0x368) [   27.167742] [<c02c5bd4>]
> > > (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
> > > [   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from
> > > [<c02cce58>] (ubi_attach+0x4e0/0x1868) [   27.184675]
> > > [<c02cce58>] (ubi_attach) from [<c02be7c4>]
> > > (ubi_attach_mtd_dev+0x548/0xe58) [   27.193010] [<c02be7c4>]
> > > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > > [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > > (do_one_initcall+0x3c/0x17c) [   27.208839] [<c00099f8>]
> > > (do_one_initcall) from [<c053fd80>]
> > > (kernel_init_freeable+0x104/0x1c0) [   27.217755] [<c053fd80>]
> > > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > > [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > > (ret_from_fork+0x14/0x34)  
> > 
> > Looks like a mismatch in the ECC config. Can you check the ecc
> > strength/step_size in both situation (old driver vs new driver)?
> 
> For that, you might want to add traces in marvell_nand_ecc_init() and
> marvell_nand_hw_ecc_ctrl_init().
> 
> > Could you also dump the NDCR register in both cases?
> 
> NDCR register (as well as NDCBx registers) will appear if you let
> 
>     #define DEBUG
> 
> at the beginning of the driver.
> 
> Also, can you please give us the entire dmesg (I mean the boot, not
> the flow of UBIFS errors of course).
> 
> If this, in conjunction with your check of the ECC configuration, does
> not give satisfying results, I will write a test script using
> nandwrite/nanddump/flash_erase.

Something else:
Do you use platform data or device tree? Can you show where the board
information are?

I guess you tried to compile from the top of the branch, could you try
right after the addition of marvell_nand.c, bypassing the pdata/DT
changes.

Thanks,
Miquèl

> 
> Thank you,
> Miquèl
> 
> 
> > 
> > Thanks,
> > 
> > Boris
> 
> 
> 



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 22:50                           ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-22 22:50 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Robert Jarzmik, David Woodhouse, Brian Norris, Marek Vasut,
	Richard Weinberger, Cyrille Pitchen, Rob Herring, Mark Rutland,
	Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Russell King, Daniel Mack, Haojian Zhuang,
	Eric Miao, Catalin Marinas, Will Deacon, Ezequiel Garcia,
	linux-mtd, devicetree, linux-arm-kernel, Thomas Petazzoni,
	Antoine Tenart, Nadav Haklai, Ofer Heifetz, Hanna Hawa,
	Neta Zur Hershkovits

On Fri, 22 Dec 2017 23:37:30 +0100
Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:

> Hi Robert,
> 
> On Fri, 22 Dec 2017 22:24:41 +0100
> Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
> 
> > Hi Robert,
> > 
> > On Fri, 22 Dec 2017 21:11:32 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> > 
> > > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> > >   
> > > > Looks like there is a mismatch on the nand bus width detected by
> > > > the core and the one declared by the driver. Can you try with
> > > > the following diff applied?    
> > > 
> > > Sure.
> > > 
> > > Now I get a lot of these message which I didn't have before :
> > > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> > > while reading 126976 bytes from PEB 242:4096, read only 126976
> > > bytes, retry [   26.928559] ubi0 warning: ubi_io_read: error -74
> > > (ECC error) while reading 126976 bytes from PEB 242:4096, read
> > > only 126976 bytes, retry [   26.959623] ubi0 warning:
> > > ubi_io_read: error -74 (ECC error) while reading 126976 bytes
> > > from PEB 242:4096, read only 126976 bytes, retry [   26.990714]
> > > ubi0 error: ubi_io_read: error -74 (ECC error) while reading
> > > 126976 bytes from PEB 242:4096, read 126976 bytes [   27.002084]
> > > CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97
> > > #737 [   27.009674] Hardware name: PXA3xx Platform Development
> > > Kit (aka Zylonite) [   27.016750] [<c0010440>] (unwind_backtrace)
> > > from [<c000df94>] (show_stack+0x10/0x14) [   27.024729]
> > > [<c000df94>] (show_stack) from [<c02c5bd4>]
> > > (ubi_io_read+0x124/0x368) [   27.032453] [<c02c5bd4>]
> > > (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
> > > [   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>]
> > > (ubi_attach_mtd_dev+0x548/0xe58) [   27.048473] [<c02be7c4>]
> > > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > > [   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > > (do_one_initcall+0x3c/0x17c) [   27.064466] [<c00099f8>]
> > > (do_one_initcall) from [<c053fd80>]
> > > (kernel_init_freeable+0x104/0x1c0) [   27.073398] [<c053fd80>]
> > > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > > [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > > (ret_from_fork+0x14/0x34) [   27.090115] ubi0 warning:
> > > ubi_io_read: error -74 (ECC error) while reading 64 bytes from
> > > PEB 243:2048, read only 64 bytes, retry [   27.102363] ubi0
> > > warning: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read only 64 bytes, retry [   27.114586]
> > > ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read only 64 bytes, retry [   27.126813]
> > > ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read 64 bytes [   27.137416] CPU: 0 PID:
> > > 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> > > [   27.145143] Hardware name: PXA3xx Platform Development Kit
> > > (aka Zylonite) [   27.152207] [<c0010440>] (unwind_backtrace)
> > > from [<c000df94>] (show_stack+0x10/0x14) [   27.160037]
> > > [<c000df94>] (show_stack) from [<c02c5bd4>]
> > > (ubi_io_read+0x124/0x368) [   27.167742] [<c02c5bd4>]
> > > (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
> > > [   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from
> > > [<c02cce58>] (ubi_attach+0x4e0/0x1868) [   27.184675]
> > > [<c02cce58>] (ubi_attach) from [<c02be7c4>]
> > > (ubi_attach_mtd_dev+0x548/0xe58) [   27.193010] [<c02be7c4>]
> > > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > > [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > > (do_one_initcall+0x3c/0x17c) [   27.208839] [<c00099f8>]
> > > (do_one_initcall) from [<c053fd80>]
> > > (kernel_init_freeable+0x104/0x1c0) [   27.217755] [<c053fd80>]
> > > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > > [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > > (ret_from_fork+0x14/0x34)  
> > 
> > Looks like a mismatch in the ECC config. Can you check the ecc
> > strength/step_size in both situation (old driver vs new driver)?
> 
> For that, you might want to add traces in marvell_nand_ecc_init() and
> marvell_nand_hw_ecc_ctrl_init().
> 
> > Could you also dump the NDCR register in both cases?
> 
> NDCR register (as well as NDCBx registers) will appear if you let
> 
>     #define DEBUG
> 
> at the beginning of the driver.
> 
> Also, can you please give us the entire dmesg (I mean the boot, not
> the flow of UBIFS errors of course).
> 
> If this, in conjunction with your check of the ECC configuration, does
> not give satisfying results, I will write a test script using
> nandwrite/nanddump/flash_erase.

Something else:
Do you use platform data or device tree? Can you show where the board
information are?

I guess you tried to compile from the top of the branch, could you try
right after the addition of marvell_nand.c, bypassing the pdata/DT
changes.

Thanks,
Miquèl

> 
> Thank you,
> Miquèl
> 
> 
> > 
> > Thanks,
> > 
> > Boris
> 
> 
> 



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-22 22:50                           ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-22 22:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 22 Dec 2017 23:37:30 +0100
Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:

> Hi Robert,
> 
> On Fri, 22 Dec 2017 22:24:41 +0100
> Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
> 
> > Hi Robert,
> > 
> > On Fri, 22 Dec 2017 21:11:32 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> > 
> > > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> > >   
> > > > Looks like there is a mismatch on the nand bus width detected by
> > > > the core and the one declared by the driver. Can you try with
> > > > the following diff applied?    
> > > 
> > > Sure.
> > > 
> > > Now I get a lot of these message which I didn't have before :
> > > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> > > while reading 126976 bytes from PEB 242:4096, read only 126976
> > > bytes, retry [   26.928559] ubi0 warning: ubi_io_read: error -74
> > > (ECC error) while reading 126976 bytes from PEB 242:4096, read
> > > only 126976 bytes, retry [   26.959623] ubi0 warning:
> > > ubi_io_read: error -74 (ECC error) while reading 126976 bytes
> > > from PEB 242:4096, read only 126976 bytes, retry [   26.990714]
> > > ubi0 error: ubi_io_read: error -74 (ECC error) while reading
> > > 126976 bytes from PEB 242:4096, read 126976 bytes [   27.002084]
> > > CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97
> > > #737 [   27.009674] Hardware name: PXA3xx Platform Development
> > > Kit (aka Zylonite) [   27.016750] [<c0010440>] (unwind_backtrace)
> > > from [<c000df94>] (show_stack+0x10/0x14) [   27.024729]
> > > [<c000df94>] (show_stack) from [<c02c5bd4>]
> > > (ubi_io_read+0x124/0x368) [   27.032453] [<c02c5bd4>]
> > > (ubi_io_read) from [<c02cd550>] (ubi_attach+0xbd8/0x1868)
> > > [   27.040148] [<c02cd550>] (ubi_attach) from [<c02be7c4>]
> > > (ubi_attach_mtd_dev+0x548/0xe58) [   27.048473] [<c02be7c4>]
> > > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > > [   27.056623] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > > (do_one_initcall+0x3c/0x17c) [   27.064466] [<c00099f8>]
> > > (do_one_initcall) from [<c053fd80>]
> > > (kernel_init_freeable+0x104/0x1c0) [   27.073398] [<c053fd80>]
> > > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > > [   27.081715] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > > (ret_from_fork+0x14/0x34) [   27.090115] ubi0 warning:
> > > ubi_io_read: error -74 (ECC error) while reading 64 bytes from
> > > PEB 243:2048, read only 64 bytes, retry [   27.102363] ubi0
> > > warning: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read only 64 bytes, retry [   27.114586]
> > > ubi0 warning: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read only 64 bytes, retry [   27.126813]
> > > ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64
> > > bytes from PEB 243:2048, read 64 bytes [   27.137416] CPU: 0 PID:
> > > 1 Comm: swapper Not tainted 4.15.0-rc1-00041-ge371e97 #737
> > > [   27.145143] Hardware name: PXA3xx Platform Development Kit
> > > (aka Zylonite) [   27.152207] [<c0010440>] (unwind_backtrace)
> > > from [<c000df94>] (show_stack+0x10/0x14) [   27.160037]
> > > [<c000df94>] (show_stack) from [<c02c5bd4>]
> > > (ubi_io_read+0x124/0x368) [   27.167742] [<c02c5bd4>]
> > > (ubi_io_read) from [<c02c63dc>] (ubi_io_read_vid_hdr+0x60/0x3ac)
> > > [   27.176156] [<c02c63dc>] (ubi_io_read_vid_hdr) from
> > > [<c02cce58>] (ubi_attach+0x4e0/0x1868) [   27.184675]
> > > [<c02cce58>] (ubi_attach) from [<c02be7c4>]
> > > (ubi_attach_mtd_dev+0x548/0xe58) [   27.193010] [<c02be7c4>]
> > > (ubi_attach_mtd_dev) from [<c05526e4>] (ubi_init+0x134/0x1d4)
> > > [   27.201159] [<c05526e4>] (ubi_init) from [<c00099f8>]
> > > (do_one_initcall+0x3c/0x17c) [   27.208839] [<c00099f8>]
> > > (do_one_initcall) from [<c053fd80>]
> > > (kernel_init_freeable+0x104/0x1c0) [   27.217755] [<c053fd80>]
> > > (kernel_init_freeable) from [<c0423ab8>] (kernel_init+0x8/0xf8)
> > > [   27.226074] [<c0423ab8>] (kernel_init) from [<c000a780>]
> > > (ret_from_fork+0x14/0x34)  
> > 
> > Looks like a mismatch in the ECC config. Can you check the ecc
> > strength/step_size in both situation (old driver vs new driver)?
> 
> For that, you might want to add traces in marvell_nand_ecc_init() and
> marvell_nand_hw_ecc_ctrl_init().
> 
> > Could you also dump the NDCR register in both cases?
> 
> NDCR register (as well as NDCBx registers) will appear if you let
> 
>     #define DEBUG
> 
> at the beginning of the driver.
> 
> Also, can you please give us the entire dmesg (I mean the boot, not
> the flow of UBIFS errors of course).
> 
> If this, in conjunction with your check of the ECC configuration, does
> not give satisfying results, I will write a test script using
> nandwrite/nanddump/flash_erase.

Something else:
Do you use platform data or device tree? Can you show where the board
information are?

I guess you tried to compile from the top of the branch, could you try
right after the addition of marvell_nand.c, bypassing the pdata/DT
changes.

Thanks,
Miqu?l

> 
> Thank you,
> Miqu?l
> 
> 
> > 
> > Thanks,
> > 
> > Boris
> 
> 
> 



-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-22 22:37                         ` Miquel RAYNAL
@ 2017-12-23 13:42                           ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-23 13:42 UTC (permalink / raw)
  To: Miquel RAYNAL, Boris Brezillon
  Cc: David Woodhouse, Brian Norris, Ezequiel Garcia, linux-mtd,
	linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

I removed a lot of people from the recipients, as this is a debug session.

>> > Now I get a lot of these message which I didn't have before :
>> > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
>> > while reading 126976 bytes from PEB 242:4096, read only 126976
>> Looks like a mismatch in the ECC config. Can you check the ecc
>> strength/step_size in both situation (old driver vs new driver)?
>
> For that, you might want to add traces in marvell_nand_ecc_init() and
> marvell_nand_hw_ecc_ctrl_init().
>
>> Could you also dump the NDCR register in both cases?
>
> NDCR register (as well as NDCBx registers) will appear if you let
>
>     #define DEBUG
>
> at the beginning of the driver.
>
> Also, can you please give us the entire dmesg (I mean the boot, not the
> flow of UBIFS errors of course).
Here it comes in [3]. I suspect the BBT parser here, here is the extract that
_might_ be relevant:
[    3.372907] nand: ->exec_op() parser: pattern not found!
[    3.378445] marvell-nfc pxa3xx-nand: 
... repeats many times ...
[    3.666571] Bad block table not found for chip 0
[    3.671368] Scanning device for bad blocks
[    3.675540] nand: nand_do_read_oob: from = 0x00000000, len = 64
[    3.681688] marvell-nfc pxa3xx-nand: 
[    3.681688] NDCR:  0x9d079fff
[    3.681688] NDCB0: 0x000d3000
[    3.681688] NDCB1: 0x00000000
[    3.681688] NDCB2: 0x00000000
[    3.681688] NDCB3: 0x00000000
[    3.700570] Bad eraseblock 0 at 0x000000000000

My configuration is :
 - make zylonite_defconfig
 - apply patch in [1] for arch/arm/mach-pxa
 - apply patch in [2] for drivers/mtd
 - run the test (make zylonite_defconfig; make; do_the_test_with_jenkins)
That should give you all my setup information, ie. platform_data, ECC and BBT
settings (ie. the "MBBbt0" pattern).

Cheers.

-- 
Robert

[1] Patch for zylonite
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 0534949d63f6..d247ef01dc62 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -378,6 +378,8 @@ static struct mtd_partition zylonite_nand_partitions[] = {
 static struct pxa3xx_nand_platform_data zylonite_nand_info = {
 	.parts		= zylonite_nand_partitions,
 	.nr_parts	= ARRAY_SIZE(zylonite_nand_partitions),
+	.flash_bbt	= 1,
+	.keep_config	= 1,
 };
 
 static void __init zylonite_init_nand(void)

[2] Patch for mtd
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index c618ccb22a61..957219e7c23d 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -7,6 +7,8 @@
  * SPDX-License-Identifier: GPL-2.0
  */
 
+#define DEBUG 1
+
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/mtd/rawnand.h>
@@ -2480,6 +2482,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
 	 * in the DT node, this entry will be overwritten in nand_scan_ident().
 	 */
 	chip->ecc.mode = NAND_ECC_HW;
+	chip->options |= NAND_BUSWIDTH_AUTO;
 
 	ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
 	if (ret) {
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 469220065b8b..0beed1cd58b3 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -27,6 +27,8 @@
  *
  */
 
+#define DEBUG 1
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/module.h>

[3] Dmesg of my failing zylonite
Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00041-g8ba5ca3 (jenkins@belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #747 PREEMPT Sat Dec 23 11:55:09 CET 2017
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4226K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0428a08   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000069] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000266] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002138] Console: colour dummy device 80x30
[    0.002299] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081018] pid_max: default: 32768 minimum: 301
[    0.081861] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081960] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085170] CPU: Testing write buffer coherency: ok
[    0.088970] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089927] Hierarchical SRCU implementation.
[    0.103027] devtmpfs: initialized
[    0.113870] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.114009] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116340] NET: Registered protocol family 16
[    0.119151] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.388383] Advanced Linux Sound Architecture Driver Initialized.
[    0.399046] clocksource: Switched to clocksource oscr0
[    0.551948] NET: Registered protocol family 2
[    0.557703] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.557940] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.558123] TCP: Hash tables configured (established 1024 bind 1024)
[    0.558662] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.558853] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560546] NET: Registered protocol family 1
[    0.562593] RPC: Registered named UNIX socket transport module.
[    0.562693] RPC: Registered udp transport module.
[    0.562747] RPC: Registered tcp transport module.
[    0.562806] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.499969] Initialise system trusted keyrings
[    2.501747] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.505617] NFS: Registering the id_resolver key type
[    2.505846] Key type id_resolver registered
[    2.505907] Key type id_legacy registered
[    2.512358] Key type asymmetric registered
[    2.512460] Asymmetric key parser 'x509' registered
[    2.512619] io scheduler noop registered
[    2.512685] io scheduler deadline registered
[    2.513081] io scheduler cfq registered (default)
[    2.513152] io scheduler mq-deadline registered
[    2.513215] io scheduler kyber registered
[    2.573653] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.577078] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.052691] console [ttyS0] enabled
[    3.059293] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.071727] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.087282] nand: executing subop:
[    3.093208] nand:     ->CMD      [0xff]
[    3.097110] nand:     ->WAITRDY  [max 250 ms]
[    3.102330] marvell-nfc pxa3xx-nand: 
[    3.102330] NDCR:  0x90079fff
[    3.102330] NDCB0: 0x00a000ff
[    3.102330] NDCB1: 0x00000000
[    3.102330] NDCB2: 0x00000000
[    3.102330] NDCB3: 0x00000000
[    3.121601] nand: executing subop:
[    3.125071] nand:     ->CMD      [0x90]
[    3.128946] nand:     ->ADDR     [1 cyc: 00]
[    3.133608] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.138617] marvell-nfc pxa3xx-nand: 
[    3.138617] NDCR:  0x90079fff
[    3.138617] NDCB0: 0x00610090
[    3.138617] NDCB1: 0x00000000
[    3.138617] NDCB2: 0x00000000
[    3.138617] NDCB3: 0x00000000
[    3.157454] nand: executing subop:
[    3.161098] nand:     ->CMD      [0x90]
[    3.164983] nand:     ->ADDR     [1 cyc: 00]
[    3.169424] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.174412] marvell-nfc pxa3xx-nand: 
[    3.174412] NDCR:  0x90079fff
[    3.174412] NDCB0: 0x00610090
[    3.174412] NDCB1: 0x00000000
[    3.174412] NDCB2: 0x00000000
[    3.174412] NDCB3: 0x00000000
[    3.193079] nand: executing subop:
[    3.196531] nand:     ->CMD      [0x90]
[    3.200553] nand:     ->ADDR     [1 cyc: 20]
[    3.204867] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.209975] marvell-nfc pxa3xx-nand: 
[    3.209975] NDCR:  0x90079fff
[    3.209975] NDCB0: 0x00610090
[    3.209975] NDCB1: 0x00000020
[    3.209975] NDCB2: 0x00000000
[    3.209975] NDCB3: 0x00000000
[    3.228598] nand: executing subop:
[    3.232187] nand:     ->CMD      [0x90]
[    3.236077] nand:     ->ADDR     [1 cyc: 40]
[    3.240517] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.245499] marvell-nfc pxa3xx-nand: 
[    3.245499] NDCR:  0x90079fff
[    3.245499] NDCB0: 0x00610090
[    3.245499] NDCB1: 0x00000040
[    3.245499] NDCB2: 0x00000000
[    3.245499] NDCB3: 0x00000000
[    3.264138] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.270650] nand: ST Micro NAND 256MiB 1,8V 16-bit
[    3.275491] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.283219] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
[    3.290880] marvell-nfc pxa3xx-nand: 
[    3.290880] NDCR:  0xdd079fff
[    3.290880] NDCB0: 0x000d3000
[    3.290880] NDCB1: 0xffc00000
[    3.290880] NDCB2: 0x00000001
[    3.290880] NDCB3: 0x00000000
[    3.310230] marvell-nfc pxa3xx-nand: 
[    3.310230] NDCR:  0xdd079fff
[    3.310230] NDCB0: 0x000d3000
[    3.310230] NDCB1: 0xff800000
[    3.310230] NDCB2: 0x00000001
[    3.310230] NDCB3: 0x00000000
[    3.329329] marvell-nfc pxa3xx-nand: 
[    3.329329] NDCR:  0xdd079fff
[    3.329329] NDCB0: 0x000d3000
[    3.329329] NDCB1: 0xff400000
[    3.329329] NDCB2: 0x00000001
[    3.329329] NDCB3: 0x00000000
[    3.348256] nand: ->exec_op() parser: pattern not found!
[    3.353989] marvell-nfc pxa3xx-nand: 
[    3.353989] NDCR:  0xdd079fff
[    3.353989] NDCB0: 0x000d3000
[    3.353989] NDCB1: 0xff000000
[    3.353989] NDCB2: 0x00000001
[    3.353989] NDCB3: 0x00000000
[    3.372907] nand: ->exec_op() parser: pattern not found!
[    3.378445] marvell-nfc pxa3xx-nand: 
... repeats many times ...
[    3.666571] Bad block table not found for chip 0
[    3.671368] Scanning device for bad blocks
[    3.675540] nand: nand_do_read_oob: from = 0x00000000, len = 64
[    3.681688] marvell-nfc pxa3xx-nand: 
[    3.681688] NDCR:  0x9d079fff
[    3.681688] NDCB0: 0x000d3000
[    3.681688] NDCB1: 0x00000000
[    3.681688] NDCB2: 0x00000000
[    3.681688] NDCB3: 0x00000000
[    3.700570] Bad eraseblock 0 at 0x000000000000
[    3.705096] nand: nand_do_read_oob: from = 0x00020000, len = 64
[    3.711275] marvell-nfc pxa3xx-nand: 
[    3.711275] NDCR:  0x9d079fff
[    3.711275] NDCB0: 0x000d3000
[    3.711275] NDCB1: 0x00400000
[    3.711275] NDCB2: 0x00000000
[    3.711275] NDCB3: 0x00000000
[    3.730190] nand: nand_do_read_oob: from = 0x00040000, len = 64
[    3.736221] marvell-nfc pxa3xx-nand: 
[    3.736221] NDCR:  0x9d079fff
[    3.736221] NDCB0: 0x000d3000
[    3.736221] NDCB1: 0x00800000
[    3.736221] NDCB2: 0x00000000
[    3.736221] NDCB3: 0x00000000
[    3.755106] Bad eraseblock 2 at 0x000000040000
[    3.759786] nand: nand_do_read_oob: from = 0x00060000, len = 64
[    3.765804] marvell-nfc pxa3xx-nand: 
[    3.765804] NDCR:  0x9d079fff
[    3.765804] NDCB0: 0x000d3000
[    3.765804] NDCB1: 0x00c00000
[    3.765804] NDCB2: 0x00000000
[    3.765804] NDCB3: 0x00000000
[    3.784670] Bad eraseblock 3 at 0x000000060000
[    3.789346] nand: nand_do_read_oob: from = 0x00080000, len = 64
[    3.795363] marvell-nfc pxa3xx-nand: 
[    3.795363] NDCR:  0x9d079fff
[    3.795363] NDCB0: 0x000d3000
[    3.795363] NDCB1: 0x01000000
[    3.795363] NDCB2: 0x00000000
[    3.795363] NDCB3: 0x00000000
[    3.814234] Bad eraseblock 4 at 0x000000080000
... repeats many times ...

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-23 13:42                           ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-23 13:42 UTC (permalink / raw)
  To: linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

I removed a lot of people from the recipients, as this is a debug session.

>> > Now I get a lot of these message which I didn't have before :
>> > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
>> > while reading 126976 bytes from PEB 242:4096, read only 126976
>> Looks like a mismatch in the ECC config. Can you check the ecc
>> strength/step_size in both situation (old driver vs new driver)?
>
> For that, you might want to add traces in marvell_nand_ecc_init() and
> marvell_nand_hw_ecc_ctrl_init().
>
>> Could you also dump the NDCR register in both cases?
>
> NDCR register (as well as NDCBx registers) will appear if you let
>
>     #define DEBUG
>
> at the beginning of the driver.
>
> Also, can you please give us the entire dmesg (I mean the boot, not the
> flow of UBIFS errors of course).
Here it comes in [3]. I suspect the BBT parser here, here is the extract that
_might_ be relevant:
[    3.372907] nand: ->exec_op() parser: pattern not found!
[    3.378445] marvell-nfc pxa3xx-nand: 
... repeats many times ...
[    3.666571] Bad block table not found for chip 0
[    3.671368] Scanning device for bad blocks
[    3.675540] nand: nand_do_read_oob: from = 0x00000000, len = 64
[    3.681688] marvell-nfc pxa3xx-nand: 
[    3.681688] NDCR:  0x9d079fff
[    3.681688] NDCB0: 0x000d3000
[    3.681688] NDCB1: 0x00000000
[    3.681688] NDCB2: 0x00000000
[    3.681688] NDCB3: 0x00000000
[    3.700570] Bad eraseblock 0 at 0x000000000000

My configuration is :
 - make zylonite_defconfig
 - apply patch in [1] for arch/arm/mach-pxa
 - apply patch in [2] for drivers/mtd
 - run the test (make zylonite_defconfig; make; do_the_test_with_jenkins)
That should give you all my setup information, ie. platform_data, ECC and BBT
settings (ie. the "MBBbt0" pattern).

Cheers.

-- 
Robert

[1] Patch for zylonite
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 0534949d63f6..d247ef01dc62 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -378,6 +378,8 @@ static struct mtd_partition zylonite_nand_partitions[] = {
 static struct pxa3xx_nand_platform_data zylonite_nand_info = {
 	.parts		= zylonite_nand_partitions,
 	.nr_parts	= ARRAY_SIZE(zylonite_nand_partitions),
+	.flash_bbt	= 1,
+	.keep_config	= 1,
 };
 
 static void __init zylonite_init_nand(void)

[2] Patch for mtd
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/marvell_nand.c
index c618ccb22a61..957219e7c23d 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/marvell_nand.c
@@ -7,6 +7,8 @@
  * SPDX-License-Identifier: GPL-2.0
  */
 
+#define DEBUG 1
+
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/mtd/rawnand.h>
@@ -2480,6 +2482,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
 	 * in the DT node, this entry will be overwritten in nand_scan_ident().
 	 */
 	chip->ecc.mode = NAND_ECC_HW;
+	chip->options |= NAND_BUSWIDTH_AUTO;
 
 	ret = nand_scan_ident(mtd, marvell_nand->nsels, NULL);
 	if (ret) {
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 469220065b8b..0beed1cd58b3 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -27,6 +27,8 @@
  *
  */
 
+#define DEBUG 1
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/module.h>

[3] Dmesg of my failing zylonite
Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00041-g8ba5ca3 (jenkins at belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #747 PREEMPT Sat Dec 23 11:55:09 CET 2017
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4226K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0428a08   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000069] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000266] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002138] Console: colour dummy device 80x30
[    0.002299] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081018] pid_max: default: 32768 minimum: 301
[    0.081861] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081960] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085170] CPU: Testing write buffer coherency: ok
[    0.088970] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089927] Hierarchical SRCU implementation.
[    0.103027] devtmpfs: initialized
[    0.113870] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.114009] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116340] NET: Registered protocol family 16
[    0.119151] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.388383] Advanced Linux Sound Architecture Driver Initialized.
[    0.399046] clocksource: Switched to clocksource oscr0
[    0.551948] NET: Registered protocol family 2
[    0.557703] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.557940] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.558123] TCP: Hash tables configured (established 1024 bind 1024)
[    0.558662] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.558853] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560546] NET: Registered protocol family 1
[    0.562593] RPC: Registered named UNIX socket transport module.
[    0.562693] RPC: Registered udp transport module.
[    0.562747] RPC: Registered tcp transport module.
[    0.562806] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.499969] Initialise system trusted keyrings
[    2.501747] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.505617] NFS: Registering the id_resolver key type
[    2.505846] Key type id_resolver registered
[    2.505907] Key type id_legacy registered
[    2.512358] Key type asymmetric registered
[    2.512460] Asymmetric key parser 'x509' registered
[    2.512619] io scheduler noop registered
[    2.512685] io scheduler deadline registered
[    2.513081] io scheduler cfq registered (default)
[    2.513152] io scheduler mq-deadline registered
[    2.513215] io scheduler kyber registered
[    2.573653] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.577078] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.052691] console [ttyS0] enabled
[    3.059293] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.071727] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.087282] nand: executing subop:
[    3.093208] nand:     ->CMD      [0xff]
[    3.097110] nand:     ->WAITRDY  [max 250 ms]
[    3.102330] marvell-nfc pxa3xx-nand: 
[    3.102330] NDCR:  0x90079fff
[    3.102330] NDCB0: 0x00a000ff
[    3.102330] NDCB1: 0x00000000
[    3.102330] NDCB2: 0x00000000
[    3.102330] NDCB3: 0x00000000
[    3.121601] nand: executing subop:
[    3.125071] nand:     ->CMD      [0x90]
[    3.128946] nand:     ->ADDR     [1 cyc: 00]
[    3.133608] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.138617] marvell-nfc pxa3xx-nand: 
[    3.138617] NDCR:  0x90079fff
[    3.138617] NDCB0: 0x00610090
[    3.138617] NDCB1: 0x00000000
[    3.138617] NDCB2: 0x00000000
[    3.138617] NDCB3: 0x00000000
[    3.157454] nand: executing subop:
[    3.161098] nand:     ->CMD      [0x90]
[    3.164983] nand:     ->ADDR     [1 cyc: 00]
[    3.169424] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.174412] marvell-nfc pxa3xx-nand: 
[    3.174412] NDCR:  0x90079fff
[    3.174412] NDCB0: 0x00610090
[    3.174412] NDCB1: 0x00000000
[    3.174412] NDCB2: 0x00000000
[    3.174412] NDCB3: 0x00000000
[    3.193079] nand: executing subop:
[    3.196531] nand:     ->CMD      [0x90]
[    3.200553] nand:     ->ADDR     [1 cyc: 20]
[    3.204867] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.209975] marvell-nfc pxa3xx-nand: 
[    3.209975] NDCR:  0x90079fff
[    3.209975] NDCB0: 0x00610090
[    3.209975] NDCB1: 0x00000020
[    3.209975] NDCB2: 0x00000000
[    3.209975] NDCB3: 0x00000000
[    3.228598] nand: executing subop:
[    3.232187] nand:     ->CMD      [0x90]
[    3.236077] nand:     ->ADDR     [1 cyc: 40]
[    3.240517] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.245499] marvell-nfc pxa3xx-nand: 
[    3.245499] NDCR:  0x90079fff
[    3.245499] NDCB0: 0x00610090
[    3.245499] NDCB1: 0x00000040
[    3.245499] NDCB2: 0x00000000
[    3.245499] NDCB3: 0x00000000
[    3.264138] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.270650] nand: ST Micro NAND 256MiB 1,8V 16-bit
[    3.275491] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.283219] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
[    3.290880] marvell-nfc pxa3xx-nand: 
[    3.290880] NDCR:  0xdd079fff
[    3.290880] NDCB0: 0x000d3000
[    3.290880] NDCB1: 0xffc00000
[    3.290880] NDCB2: 0x00000001
[    3.290880] NDCB3: 0x00000000
[    3.310230] marvell-nfc pxa3xx-nand: 
[    3.310230] NDCR:  0xdd079fff
[    3.310230] NDCB0: 0x000d3000
[    3.310230] NDCB1: 0xff800000
[    3.310230] NDCB2: 0x00000001
[    3.310230] NDCB3: 0x00000000
[    3.329329] marvell-nfc pxa3xx-nand: 
[    3.329329] NDCR:  0xdd079fff
[    3.329329] NDCB0: 0x000d3000
[    3.329329] NDCB1: 0xff400000
[    3.329329] NDCB2: 0x00000001
[    3.329329] NDCB3: 0x00000000
[    3.348256] nand: ->exec_op() parser: pattern not found!
[    3.353989] marvell-nfc pxa3xx-nand: 
[    3.353989] NDCR:  0xdd079fff
[    3.353989] NDCB0: 0x000d3000
[    3.353989] NDCB1: 0xff000000
[    3.353989] NDCB2: 0x00000001
[    3.353989] NDCB3: 0x00000000
[    3.372907] nand: ->exec_op() parser: pattern not found!
[    3.378445] marvell-nfc pxa3xx-nand: 
... repeats many times ...
[    3.666571] Bad block table not found for chip 0
[    3.671368] Scanning device for bad blocks
[    3.675540] nand: nand_do_read_oob: from = 0x00000000, len = 64
[    3.681688] marvell-nfc pxa3xx-nand: 
[    3.681688] NDCR:  0x9d079fff
[    3.681688] NDCB0: 0x000d3000
[    3.681688] NDCB1: 0x00000000
[    3.681688] NDCB2: 0x00000000
[    3.681688] NDCB3: 0x00000000
[    3.700570] Bad eraseblock 0 at 0x000000000000
[    3.705096] nand: nand_do_read_oob: from = 0x00020000, len = 64
[    3.711275] marvell-nfc pxa3xx-nand: 
[    3.711275] NDCR:  0x9d079fff
[    3.711275] NDCB0: 0x000d3000
[    3.711275] NDCB1: 0x00400000
[    3.711275] NDCB2: 0x00000000
[    3.711275] NDCB3: 0x00000000
[    3.730190] nand: nand_do_read_oob: from = 0x00040000, len = 64
[    3.736221] marvell-nfc pxa3xx-nand: 
[    3.736221] NDCR:  0x9d079fff
[    3.736221] NDCB0: 0x000d3000
[    3.736221] NDCB1: 0x00800000
[    3.736221] NDCB2: 0x00000000
[    3.736221] NDCB3: 0x00000000
[    3.755106] Bad eraseblock 2 at 0x000000040000
[    3.759786] nand: nand_do_read_oob: from = 0x00060000, len = 64
[    3.765804] marvell-nfc pxa3xx-nand: 
[    3.765804] NDCR:  0x9d079fff
[    3.765804] NDCB0: 0x000d3000
[    3.765804] NDCB1: 0x00c00000
[    3.765804] NDCB2: 0x00000000
[    3.765804] NDCB3: 0x00000000
[    3.784670] Bad eraseblock 3 at 0x000000060000
[    3.789346] nand: nand_do_read_oob: from = 0x00080000, len = 64
[    3.795363] marvell-nfc pxa3xx-nand: 
[    3.795363] NDCR:  0x9d079fff
[    3.795363] NDCB0: 0x000d3000
[    3.795363] NDCB1: 0x01000000
[    3.795363] NDCB2: 0x00000000
[    3.795363] NDCB3: 0x00000000
[    3.814234] Bad eraseblock 4 at 0x000000080000
... repeats many times ...

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-23 13:42                           ` Robert Jarzmik
@ 2017-12-23 14:57                             ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-23 14:57 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Hi Robert,

On Sat, 23 Dec 2017 14:42:20 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> I removed a lot of people from the recipients, as this is a debug
> session.

Sure!

> 
> >> > Now I get a lot of these message which I didn't have before :
> >> > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> >> > while reading 126976 bytes from PEB 242:4096, read only 126976  
> >> Looks like a mismatch in the ECC config. Can you check the ecc
> >> strength/step_size in both situation (old driver vs new driver)?  
> >
> > For that, you might want to add traces in marvell_nand_ecc_init()
> > and marvell_nand_hw_ecc_ctrl_init().
> >  
> >> Could you also dump the NDCR register in both cases?  
> >
> > NDCR register (as well as NDCBx registers) will appear if you let
> >
> >     #define DEBUG
> >
> > at the beginning of the driver.
> >
> > Also, can you please give us the entire dmesg (I mean the boot, not
> > the flow of UBIFS errors of course).  
> Here it comes in [3]. I suspect the BBT parser here, here is the
> extract that _might_ be relevant:
> [    3.372907] nand: ->exec_op() parser: pattern not found!

Indeed this might be the problem, it means there is one scenario that
should be handled by the parser that is missing. I am really
interrogative about which one it is and to discover it, can you rebuild
with

        #define DEBUG

in drivers/mtd/nand/nand_base.c too.

This way the core will display the patterns it try to find a match for.

Also to ease the understanding, you might add a dump_stack() right
next to this error message.


> [    3.378445] marvell-nfc pxa3xx-nand: 
> ... repeats many times ...
> [    3.666571] Bad block table not found for chip 0
> [    3.671368] Scanning device for bad blocks
> [    3.675540] nand: nand_do_read_oob: from = 0x00000000, len = 64
> [    3.681688] marvell-nfc pxa3xx-nand: 
> [    3.681688] NDCR:  0x9d079fff
> [    3.681688] NDCB0: 0x000d3000
> [    3.681688] NDCB1: 0x00000000
> [    3.681688] NDCB2: 0x00000000
> [    3.681688] NDCB3: 0x00000000
> [    3.700570] Bad eraseblock 0 at 0x000000000000
> 
> My configuration is :
>  - make zylonite_defconfig
>  - apply patch in [1] for arch/arm/mach-pxa
>  - apply patch in [2] for drivers/mtd
>  - run the test (make zylonite_defconfig; make;
> do_the_test_with_jenkins) That should give you all my setup
> information, ie. platform_data, ECC and BBT settings (ie. the
> "MBBbt0" pattern).

This is probably a typo, because we expect the pattern to be "MVBbt0"?

> 
> Cheers.
> 



Thanks for the help,
Miquèl


-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-23 14:57                             ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-23 14:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Robert,

On Sat, 23 Dec 2017 14:42:20 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> I removed a lot of people from the recipients, as this is a debug
> session.

Sure!

> 
> >> > Now I get a lot of these message which I didn't have before :
> >> > [   26.897372] ubi0 warning: ubi_io_read: error -74 (ECC error)
> >> > while reading 126976 bytes from PEB 242:4096, read only 126976  
> >> Looks like a mismatch in the ECC config. Can you check the ecc
> >> strength/step_size in both situation (old driver vs new driver)?  
> >
> > For that, you might want to add traces in marvell_nand_ecc_init()
> > and marvell_nand_hw_ecc_ctrl_init().
> >  
> >> Could you also dump the NDCR register in both cases?  
> >
> > NDCR register (as well as NDCBx registers) will appear if you let
> >
> >     #define DEBUG
> >
> > at the beginning of the driver.
> >
> > Also, can you please give us the entire dmesg (I mean the boot, not
> > the flow of UBIFS errors of course).  
> Here it comes in [3]. I suspect the BBT parser here, here is the
> extract that _might_ be relevant:
> [    3.372907] nand: ->exec_op() parser: pattern not found!

Indeed this might be the problem, it means there is one scenario that
should be handled by the parser that is missing. I am really
interrogative about which one it is and to discover it, can you rebuild
with

        #define DEBUG

in drivers/mtd/nand/nand_base.c too.

This way the core will display the patterns it try to find a match for.

Also to ease the understanding, you might add a dump_stack() right
next to this error message.


> [    3.378445] marvell-nfc pxa3xx-nand: 
> ... repeats many times ...
> [    3.666571] Bad block table not found for chip 0
> [    3.671368] Scanning device for bad blocks
> [    3.675540] nand: nand_do_read_oob: from = 0x00000000, len = 64
> [    3.681688] marvell-nfc pxa3xx-nand: 
> [    3.681688] NDCR:  0x9d079fff
> [    3.681688] NDCB0: 0x000d3000
> [    3.681688] NDCB1: 0x00000000
> [    3.681688] NDCB2: 0x00000000
> [    3.681688] NDCB3: 0x00000000
> [    3.700570] Bad eraseblock 0 at 0x000000000000
> 
> My configuration is :
>  - make zylonite_defconfig
>  - apply patch in [1] for arch/arm/mach-pxa
>  - apply patch in [2] for drivers/mtd
>  - run the test (make zylonite_defconfig; make;
> do_the_test_with_jenkins) That should give you all my setup
> information, ie. platform_data, ECC and BBT settings (ie. the
> "MBBbt0" pattern).

This is probably a typo, because we expect the pattern to be "MVBbt0"?

> 
> Cheers.
> 



Thanks for the help,
Miqu?l


-- 
Miquel Raynal, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-23 14:57                             ` Miquel RAYNAL
@ 2017-12-23 17:14                               ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-23 17:14 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

>> Here it comes in [3]. I suspect the BBT parser here, here is the
>> extract that _might_ be relevant:
>> [    3.372907] nand: ->exec_op() parser: pattern not found!
>
> Indeed this might be the problem, it means there is one scenario that
> should be handled by the parser that is missing. I am really
> interrogative about which one it is and to discover it, can you rebuild
> with
>
>         #define DEBUG
>
> in drivers/mtd/nand/nand_base.c too.
It was already there, check the patch I attached to my previous mail.

> This way the core will display the patterns it try to find a match for.
The core displays already debug message, as these are displayed :
[    3.228598] nand: executing subop:
[    3.232187] nand:     ->CMD      [0x90]
[    3.236077] nand:     ->ADDR     [1 cyc: 40]
[    3.240517] nand:     ->DATA_IN  [5 B, force 8-bit]

As to your statement "the core will display the patterns it try to find a match
for", how confident are you with it ? Because my reading of the following code
is quite different :
			if (!nand_op_parser_match_pat(pattern, &ctx))
				continue;

			nand_op_parser_trace(&ctx);

> Also to ease the understanding, you might add a dump_stack() right
> next to this error message.
Attached in [1].

>> information, ie. platform_data, ECC and BBT settings (ie. the
>> "MBBbt0" pattern).
>
> This is probably a typo, because we expect the pattern to be "MVBbt0"?
Right, it's a typo.

Cheers.

-- 
Robert

[1] DMesg extract
[    3.053528] console [ttyS0] enabled
[    3.059893] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.072771] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.088327] nand: executing subop:
[    3.094488] nand:     ->CMD      [0xff]
[    3.098387] nand:     ->WAITRDY  [max 250 ms]
[    3.103543] marvell-nfc pxa3xx-nand: 
[    3.103543] NDCR:  0x90079fff
[    3.103543] NDCB0: 0x00a000ff
[    3.103543] NDCB1: 0x00000000
[    3.103543] NDCB2: 0x00000000
[    3.103543] NDCB3: 0x00000000
[    3.122800] nand: executing subop:
[    3.126272] nand:     ->CMD      [0x90]
[    3.130146] nand:     ->ADDR     [1 cyc: 00]
[    3.134811] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.139818] marvell-nfc pxa3xx-nand: 
[    3.139818] NDCR:  0x90079fff
[    3.139818] NDCB0: 0x00610090
[    3.139818] NDCB1: 0x00000000
[    3.139818] NDCB2: 0x00000000
[    3.139818] NDCB3: 0x00000000
[    3.158657] nand: executing subop:
[    3.162302] nand:     ->CMD      [0x90]
[    3.166192] nand:     ->ADDR     [1 cyc: 00]
[    3.170494] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.175607] marvell-nfc pxa3xx-nand: 
[    3.175607] NDCR:  0x90079fff
[    3.175607] NDCB0: 0x00610090
[    3.175607] NDCB1: 0x00000000
[    3.175607] NDCB2: 0x00000000
[    3.175607] NDCB3: 0x00000000
[    3.194281] nand: executing subop:
[    3.197734] nand:     ->CMD      [0x90]
[    3.201757] nand:     ->ADDR     [1 cyc: 20]
[    3.206078] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.211186] marvell-nfc pxa3xx-nand: 
[    3.211186] NDCR:  0x90079fff
[    3.211186] NDCB0: 0x00610090
[    3.211186] NDCB1: 0x00000020
[    3.211186] NDCB2: 0x00000000
[    3.211186] NDCB3: 0x00000000
[    3.229806] nand: executing subop:
[    3.233396] nand:     ->CMD      [0x90]
[    3.237286] nand:     ->ADDR     [1 cyc: 40]
[    3.241728] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.246709] marvell-nfc pxa3xx-nand: 
[    3.246709] NDCR:  0x90079fff
[    3.246709] NDCB0: 0x00610090
[    3.246709] NDCB1: 0x00000040
[    3.246709] NDCB2: 0x00000000
[    3.246709] NDCB3: 0x00000000
[    3.265346] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.271858] nand: ST Micro NAND 256MiB 1,8V 16-bit
[    3.276700] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.284428] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
[    3.292092] marvell-nfc pxa3xx-nand: 
[    3.292092] NDCR:  0xdd079fff
[    3.292092] NDCB0: 0x000d3000
[    3.292092] NDCB1: 0xffc00000
[    3.292092] NDCB2: 0x00000001
[    3.292092] NDCB3: 0x00000000
[    3.311481] marvell-nfc pxa3xx-nand: 
[    3.311481] NDCR:  0xdd079fff
[    3.311481] NDCB0: 0x000d3000
[    3.311481] NDCB1: 0xff800000
[    3.311481] NDCB2: 0x00000001
[    3.311481] NDCB3: 0x00000000
[    3.330508] marvell-nfc pxa3xx-nand: 
[    3.330508] NDCR:  0xdd079fff
[    3.330508] NDCB0: 0x000d3000
[    3.330508] NDCB1: 0xff400000
[    3.330508] NDCB2: 0x00000001
[    3.330508] NDCB3: 0x00000000
[    3.349472] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    3.357225] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    3.364323] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    3.372307] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    3.380966] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    3.391038] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    3.401864] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    3.411902] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    3.420098] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    3.427964] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    3.435583] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    3.443116] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    3.451259] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    3.459605] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    3.468213] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    3.476979] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    3.486070] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    3.494809] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    3.503210] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    3.511702] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    3.519790] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    3.528216] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    3.537136] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    3.545443] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    3.553175] nand: ->exec_op() parser: pattern not found!
[    3.558743] marvell-nfc pxa3xx-nand: 
[    3.558743] NDCR:  0xdd079fff
[    3.558743] NDCB0: 0x000d3000
[    3.558743] NDCB1: 0xff000000
[    3.558743] NDCB2: 0x00000001
[    3.558743] NDCB3: 0x00000000
[    3.577698] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    3.585451] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    3.592496] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    3.600325] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    3.608973] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    3.619037] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    3.629869] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    3.639908] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    3.648244] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    3.656121] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    3.663736] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    3.671269] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    3.679266] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    3.687745] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    3.696354] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    3.705120] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    3.714214] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    3.722952] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    3.731353] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    3.739701] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    3.747915] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    3.756339] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    3.765261] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    3.773559] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    3.781295] nand: ->exec_op() parser: pattern not found!
[    3.786853] marvell-nfc pxa3xx-nand: 
[    3.786853] NDCR:  0xdd079fff
[    3.786853] NDCB0: 0x000d3000
[    3.786853] NDCB1: 0xfec00000
[    3.786853] NDCB2: 0x00000001
[    3.786853] NDCB3: 0x00000000
[    3.805809] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    3.813560] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    3.820488] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    3.828451] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    3.837106] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    3.847177] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    3.858006] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    3.868044] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    3.876378] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    3.884257] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    3.891872] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    3.899261] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    3.907391] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    3.915881] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    3.924490] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    3.933248] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    3.942366] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    3.951113] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    3.959372] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    3.967847] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    3.976073] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    3.984501] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    3.993421] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.001722] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.009319] nand: ->exec_op() parser: pattern not found!
[    4.015007] marvell-nfc pxa3xx-nand: 
[    4.015007] NDCR:  0xdd079fff
[    4.015007] NDCB0: 0x000d3000
[    4.015007] NDCB1: 0xfe800000
[    4.015007] NDCB2: 0x00000001
[    4.015007] NDCB3: 0x00000000
[    4.033976] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.041735] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.048659] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.056618] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.065274] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.075341] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.086166] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.096559] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.104948] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.112833] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.120314] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.127832] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    4.135976] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.144468] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.153092] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.161857] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.170942] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.179555] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.187941] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.196432] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.204658] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.213094] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.222012] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.230171] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.237894] nand: ->exec_op() parser: pattern not found!
[    4.243602] marvell-nfc pxa3xx-nand: 
[    4.243602] NDCR:  0xdd079fff
[    4.243602] NDCB0: 0x000d3000
[    4.243602] NDCB1: 0xfe400000
[    4.243602] NDCB2: 0x00000001
[    4.243602] NDCB3: 0x00000000
[    4.262584] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.270175] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.277257] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.285235] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.293894] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.303961] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.314793] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.324831] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.333159] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.341037] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.348518] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.356037] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    4.364179] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.372667] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.381276] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.389889] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.398979] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.407718] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.416111] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.424603] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.432827] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.441256] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.450035] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.458326] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.466055] nand: ->exec_op() parser: pattern not found!
[    4.471753] marvell-nfc pxa3xx-nand: 
[    4.471753] NDCR:  0xdd079fff
[    4.471753] NDCB0: 0x000d3000
[    4.471753] NDCB1: 0xfe000000
[    4.471753] NDCB2: 0x00000001
[    4.471753] NDCB3: 0x00000000
[    4.490714] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.498469] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.505524] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.513498] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.522149] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.532219] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.543050] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.553089] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.561419] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.569161] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.576796] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.584338] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    4.592478] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.600967] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.609432] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.618179] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.627271] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.636011] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.644412] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.652903] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.661123] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.669407] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.678322] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.686627] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.694360] nand: ->exec_op() parser: pattern not found!
[    4.699810] Bad block table not found for chip 0
[    4.704717] marvell-nfc pxa3xx-nand: 
[    4.704717] NDCR:  0xdd079fff
[    4.704717] NDCB0: 0x000d3000
[    4.704717] NDCB1: 0xffc00000
[    4.704717] NDCB2: 0x00000001
[    4.704717] NDCB3: 0x00000000
[    4.723741] marvell-nfc pxa3xx-nand: 
[    4.723741] NDCR:  0xdd079fff
[    4.723741] NDCB0: 0x000d3000
[    4.723741] NDCB1: 0xff800000
[    4.723741] NDCB2: 0x00000001
[    4.723741] NDCB3: 0x00000000
[    4.742760] marvell-nfc pxa3xx-nand: 
[    4.742760] NDCR:  0xdd079fff
[    4.742760] NDCB0: 0x000d3000
[    4.742760] NDCB1: 0xff400000
[    4.742760] NDCB2: 0x00000001
[    4.742760] NDCB3: 0x00000000
[    4.761711] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.769307] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.776386] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.784360] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.793018] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.803088] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.813917] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.823956] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.832290] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.840028] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.847636] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.855170] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    4.863312] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.871801] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.880267] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.889013] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.898106] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.906842] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.915234] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.923718] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.931940] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.940235] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.949146] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.957451] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.965177] nand: ->exec_op() parser: pattern not found!
[    4.970731] marvell-nfc pxa3xx-nand: 
[    4.970731] NDCR:  0xdd079fff
[    4.970731] NDCB0: 0x000d3000
[    4.970731] NDCB1: 0xff000000
[    4.970731] NDCB2: 0x00000001
[    4.970731] NDCB3: 0x00000000
[    4.989786] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.997531] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.004586] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.012562] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.021224] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.031287] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.042111] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.052150] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.060335] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.068201] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.075821] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.083356] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.091498] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.099844] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.108442] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.117207] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.126303] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.135046] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.143440] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.151931] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.160012] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.168428] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.177346] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.185647] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.193379] nand: ->exec_op() parser: pattern not found!
[    5.198932] marvell-nfc pxa3xx-nand: 
[    5.198932] NDCR:  0xdd079fff
[    5.198932] NDCB0: 0x000d3000
[    5.198932] NDCB1: 0xfec00000
[    5.198932] NDCB2: 0x00000001
[    5.198932] NDCB3: 0x00000000
[    5.217913] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.225670] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.232729] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.240559] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.249206] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.259272] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.270104] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.280141] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.288475] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.296355] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.303975] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.311510] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.319509] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.327986] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.336594] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.345352] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.354446] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.363183] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.371584] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.379934] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.388151] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.396576] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.405499] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.413800] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.421534] nand: ->exec_op() parser: pattern not found!
[    5.427088] marvell-nfc pxa3xx-nand: 
[    5.427088] NDCR:  0xdd079fff
[    5.427088] NDCB0: 0x000d3000
[    5.427088] NDCB1: 0xfe800000
[    5.427088] NDCB2: 0x00000001
[    5.427088] NDCB3: 0x00000000
[    5.446044] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.453794] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.460725] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.468703] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.477344] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.487418] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.498247] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.508283] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.516607] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.524488] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.532101] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.539493] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.547623] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.556111] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.564723] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.573487] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.582580] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.591320] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.599579] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.608054] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.616279] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.624709] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.633625] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.641925] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.649518] nand: ->exec_op() parser: pattern not found!
[    5.655192] marvell-nfc pxa3xx-nand: 
[    5.655192] NDCR:  0xdd079fff
[    5.655192] NDCB0: 0x000d3000
[    5.655192] NDCB1: 0xfe400000
[    5.655192] NDCB2: 0x00000001
[    5.655192] NDCB3: 0x00000000
[    5.674154] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.681904] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.688832] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.696798] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.705456] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.715521] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.726344] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.736376] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.744710] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.752589] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.760061] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.767580] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.775714] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.784204] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.792814] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.801579] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.810534] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.819264] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.827665] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.836154] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.844403] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.852834] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.861753] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.869912] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.877632] nand: ->exec_op() parser: pattern not found!
[    5.883334] marvell-nfc pxa3xx-nand: 
[    5.883334] NDCR:  0xdd079fff
[    5.883334] NDCB0: 0x000d3000
[    5.883334] NDCB1: 0xfe000000
[    5.883334] NDCB2: 0x00000001
[    5.883334] NDCB3: 0x00000000
[    5.902303] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.909898] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.916979] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.924950] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.933606] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.943672] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.954498] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.964526] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.972855] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.980592] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.988202] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.995734] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    6.003876] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    6.012373] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    6.020838] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    6.029598] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    6.038676] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    6.047417] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    6.055807] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    6.064290] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    6.072513] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    6.080795] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    6.089716] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    6.098699] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    6.106511] nand: ->exec_op() parser: pattern not found!
[    6.112110] Bad block table not found for chip 0
[    6.116762] Scanning device for bad blocks
[    6.121060] nand: nand_do_read_oob: from = 0x00000000, len = 64
[    6.127086] marvell-nfc pxa3xx-nand: 
[    6.127086] NDCR:  0x9d079fff
[    6.127086] NDCB0: 0x000d3000
[    6.127086] NDCB1: 0x00000000
[    6.127086] NDCB2: 0x00000000
[    6.127086] NDCB3: 0x00000000
[    6.145988] Bad eraseblock 0 at 0x000000000000

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-23 17:14                               ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2017-12-23 17:14 UTC (permalink / raw)
  To: linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

>> Here it comes in [3]. I suspect the BBT parser here, here is the
>> extract that _might_ be relevant:
>> [    3.372907] nand: ->exec_op() parser: pattern not found!
>
> Indeed this might be the problem, it means there is one scenario that
> should be handled by the parser that is missing. I am really
> interrogative about which one it is and to discover it, can you rebuild
> with
>
>         #define DEBUG
>
> in drivers/mtd/nand/nand_base.c too.
It was already there, check the patch I attached to my previous mail.

> This way the core will display the patterns it try to find a match for.
The core displays already debug message, as these are displayed :
[    3.228598] nand: executing subop:
[    3.232187] nand:     ->CMD      [0x90]
[    3.236077] nand:     ->ADDR     [1 cyc: 40]
[    3.240517] nand:     ->DATA_IN  [5 B, force 8-bit]

As to your statement "the core will display the patterns it try to find a match
for", how confident are you with it ? Because my reading of the following code
is quite different :
			if (!nand_op_parser_match_pat(pattern, &ctx))
				continue;

			nand_op_parser_trace(&ctx);

> Also to ease the understanding, you might add a dump_stack() right
> next to this error message.
Attached in [1].

>> information, ie. platform_data, ECC and BBT settings (ie. the
>> "MBBbt0" pattern).
>
> This is probably a typo, because we expect the pattern to be "MVBbt0"?
Right, it's a typo.

Cheers.

-- 
Robert

[1] DMesg extract
[    3.053528] console [ttyS0] enabled
[    3.059893] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.072771] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.088327] nand: executing subop:
[    3.094488] nand:     ->CMD      [0xff]
[    3.098387] nand:     ->WAITRDY  [max 250 ms]
[    3.103543] marvell-nfc pxa3xx-nand: 
[    3.103543] NDCR:  0x90079fff
[    3.103543] NDCB0: 0x00a000ff
[    3.103543] NDCB1: 0x00000000
[    3.103543] NDCB2: 0x00000000
[    3.103543] NDCB3: 0x00000000
[    3.122800] nand: executing subop:
[    3.126272] nand:     ->CMD      [0x90]
[    3.130146] nand:     ->ADDR     [1 cyc: 00]
[    3.134811] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.139818] marvell-nfc pxa3xx-nand: 
[    3.139818] NDCR:  0x90079fff
[    3.139818] NDCB0: 0x00610090
[    3.139818] NDCB1: 0x00000000
[    3.139818] NDCB2: 0x00000000
[    3.139818] NDCB3: 0x00000000
[    3.158657] nand: executing subop:
[    3.162302] nand:     ->CMD      [0x90]
[    3.166192] nand:     ->ADDR     [1 cyc: 00]
[    3.170494] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.175607] marvell-nfc pxa3xx-nand: 
[    3.175607] NDCR:  0x90079fff
[    3.175607] NDCB0: 0x00610090
[    3.175607] NDCB1: 0x00000000
[    3.175607] NDCB2: 0x00000000
[    3.175607] NDCB3: 0x00000000
[    3.194281] nand: executing subop:
[    3.197734] nand:     ->CMD      [0x90]
[    3.201757] nand:     ->ADDR     [1 cyc: 20]
[    3.206078] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.211186] marvell-nfc pxa3xx-nand: 
[    3.211186] NDCR:  0x90079fff
[    3.211186] NDCB0: 0x00610090
[    3.211186] NDCB1: 0x00000020
[    3.211186] NDCB2: 0x00000000
[    3.211186] NDCB3: 0x00000000
[    3.229806] nand: executing subop:
[    3.233396] nand:     ->CMD      [0x90]
[    3.237286] nand:     ->ADDR     [1 cyc: 40]
[    3.241728] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.246709] marvell-nfc pxa3xx-nand: 
[    3.246709] NDCR:  0x90079fff
[    3.246709] NDCB0: 0x00610090
[    3.246709] NDCB1: 0x00000040
[    3.246709] NDCB2: 0x00000000
[    3.246709] NDCB3: 0x00000000
[    3.265346] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.271858] nand: ST Micro NAND 256MiB 1,8V 16-bit
[    3.276700] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.284428] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
[    3.292092] marvell-nfc pxa3xx-nand: 
[    3.292092] NDCR:  0xdd079fff
[    3.292092] NDCB0: 0x000d3000
[    3.292092] NDCB1: 0xffc00000
[    3.292092] NDCB2: 0x00000001
[    3.292092] NDCB3: 0x00000000
[    3.311481] marvell-nfc pxa3xx-nand: 
[    3.311481] NDCR:  0xdd079fff
[    3.311481] NDCB0: 0x000d3000
[    3.311481] NDCB1: 0xff800000
[    3.311481] NDCB2: 0x00000001
[    3.311481] NDCB3: 0x00000000
[    3.330508] marvell-nfc pxa3xx-nand: 
[    3.330508] NDCR:  0xdd079fff
[    3.330508] NDCB0: 0x000d3000
[    3.330508] NDCB1: 0xff400000
[    3.330508] NDCB2: 0x00000001
[    3.330508] NDCB3: 0x00000000
[    3.349472] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    3.357225] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    3.364323] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    3.372307] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    3.380966] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    3.391038] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    3.401864] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    3.411902] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    3.420098] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    3.427964] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    3.435583] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    3.443116] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    3.451259] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    3.459605] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    3.468213] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    3.476979] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    3.486070] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    3.494809] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    3.503210] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    3.511702] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    3.519790] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    3.528216] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    3.537136] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    3.545443] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    3.553175] nand: ->exec_op() parser: pattern not found!
[    3.558743] marvell-nfc pxa3xx-nand: 
[    3.558743] NDCR:  0xdd079fff
[    3.558743] NDCB0: 0x000d3000
[    3.558743] NDCB1: 0xff000000
[    3.558743] NDCB2: 0x00000001
[    3.558743] NDCB3: 0x00000000
[    3.577698] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    3.585451] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    3.592496] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    3.600325] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    3.608973] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    3.619037] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    3.629869] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    3.639908] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    3.648244] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    3.656121] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    3.663736] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    3.671269] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    3.679266] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    3.687745] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    3.696354] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    3.705120] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    3.714214] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    3.722952] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    3.731353] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    3.739701] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    3.747915] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    3.756339] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    3.765261] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    3.773559] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    3.781295] nand: ->exec_op() parser: pattern not found!
[    3.786853] marvell-nfc pxa3xx-nand: 
[    3.786853] NDCR:  0xdd079fff
[    3.786853] NDCB0: 0x000d3000
[    3.786853] NDCB1: 0xfec00000
[    3.786853] NDCB2: 0x00000001
[    3.786853] NDCB3: 0x00000000
[    3.805809] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    3.813560] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    3.820488] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    3.828451] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    3.837106] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    3.847177] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    3.858006] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    3.868044] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    3.876378] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    3.884257] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    3.891872] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    3.899261] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    3.907391] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    3.915881] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    3.924490] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    3.933248] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    3.942366] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    3.951113] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    3.959372] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    3.967847] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    3.976073] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    3.984501] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    3.993421] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.001722] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.009319] nand: ->exec_op() parser: pattern not found!
[    4.015007] marvell-nfc pxa3xx-nand: 
[    4.015007] NDCR:  0xdd079fff
[    4.015007] NDCB0: 0x000d3000
[    4.015007] NDCB1: 0xfe800000
[    4.015007] NDCB2: 0x00000001
[    4.015007] NDCB3: 0x00000000
[    4.033976] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.041735] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.048659] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.056618] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.065274] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.075341] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.086166] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.096559] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.104948] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.112833] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.120314] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.127832] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    4.135976] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.144468] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.153092] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.161857] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.170942] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.179555] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.187941] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.196432] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.204658] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.213094] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.222012] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.230171] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.237894] nand: ->exec_op() parser: pattern not found!
[    4.243602] marvell-nfc pxa3xx-nand: 
[    4.243602] NDCR:  0xdd079fff
[    4.243602] NDCB0: 0x000d3000
[    4.243602] NDCB1: 0xfe400000
[    4.243602] NDCB2: 0x00000001
[    4.243602] NDCB3: 0x00000000
[    4.262584] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.270175] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.277257] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.285235] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.293894] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.303961] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.314793] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.324831] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.333159] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.341037] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.348518] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.356037] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    4.364179] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.372667] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.381276] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.389889] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.398979] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.407718] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.416111] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.424603] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.432827] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.441256] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.450035] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.458326] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.466055] nand: ->exec_op() parser: pattern not found!
[    4.471753] marvell-nfc pxa3xx-nand: 
[    4.471753] NDCR:  0xdd079fff
[    4.471753] NDCB0: 0x000d3000
[    4.471753] NDCB1: 0xfe000000
[    4.471753] NDCB2: 0x00000001
[    4.471753] NDCB3: 0x00000000
[    4.490714] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.498469] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.505524] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.513498] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.522149] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.532219] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.543050] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.553089] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.561419] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.569161] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.576796] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.584338] [<c02b3ba0>] (search_bbt) from [<c02b4cd8>] (nand_default_bbt+0x100/0x640)
[    4.592478] [<c02b4cd8>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.600967] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.609432] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.618179] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.627271] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.636011] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.644412] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.652903] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.661123] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.669407] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.678322] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.686627] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.694360] nand: ->exec_op() parser: pattern not found!
[    4.699810] Bad block table not found for chip 0
[    4.704717] marvell-nfc pxa3xx-nand: 
[    4.704717] NDCR:  0xdd079fff
[    4.704717] NDCB0: 0x000d3000
[    4.704717] NDCB1: 0xffc00000
[    4.704717] NDCB2: 0x00000001
[    4.704717] NDCB3: 0x00000000
[    4.723741] marvell-nfc pxa3xx-nand: 
[    4.723741] NDCR:  0xdd079fff
[    4.723741] NDCB0: 0x000d3000
[    4.723741] NDCB1: 0xff800000
[    4.723741] NDCB2: 0x00000001
[    4.723741] NDCB3: 0x00000000
[    4.742760] marvell-nfc pxa3xx-nand: 
[    4.742760] NDCR:  0xdd079fff
[    4.742760] NDCB0: 0x000d3000
[    4.742760] NDCB1: 0xff400000
[    4.742760] NDCB2: 0x00000001
[    4.742760] NDCB3: 0x00000000
[    4.761711] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.769307] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    4.776386] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    4.784360] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    4.793018] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    4.803088] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    4.813917] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    4.823956] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    4.832290] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    4.840028] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    4.847636] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    4.855170] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    4.863312] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    4.871801] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    4.880267] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    4.889013] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    4.898106] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    4.906842] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    4.915234] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    4.923718] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    4.931940] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    4.940235] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    4.949146] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    4.957451] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    4.965177] nand: ->exec_op() parser: pattern not found!
[    4.970731] marvell-nfc pxa3xx-nand: 
[    4.970731] NDCR:  0xdd079fff
[    4.970731] NDCB0: 0x000d3000
[    4.970731] NDCB1: 0xff000000
[    4.970731] NDCB2: 0x00000001
[    4.970731] NDCB3: 0x00000000
[    4.989786] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    4.997531] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.004586] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.012562] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.021224] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.031287] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.042111] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.052150] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.060335] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.068201] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.075821] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.083356] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.091498] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.099844] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.108442] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.117207] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.126303] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.135046] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.143440] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.151931] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.160012] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.168428] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.177346] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.185647] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.193379] nand: ->exec_op() parser: pattern not found!
[    5.198932] marvell-nfc pxa3xx-nand: 
[    5.198932] NDCR:  0xdd079fff
[    5.198932] NDCB0: 0x000d3000
[    5.198932] NDCB1: 0xfec00000
[    5.198932] NDCB2: 0x00000001
[    5.198932] NDCB3: 0x00000000
[    5.217913] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.225670] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.232729] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.240559] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.249206] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.259272] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.270104] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.280141] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.288475] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.296355] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.303975] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.311510] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.319509] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.327986] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.336594] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.345352] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.354446] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.363183] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.371584] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.379934] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.388151] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.396576] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.405499] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.413800] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.421534] nand: ->exec_op() parser: pattern not found!
[    5.427088] marvell-nfc pxa3xx-nand: 
[    5.427088] NDCR:  0xdd079fff
[    5.427088] NDCB0: 0x000d3000
[    5.427088] NDCB1: 0xfe800000
[    5.427088] NDCB2: 0x00000001
[    5.427088] NDCB3: 0x00000000
[    5.446044] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.453794] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.460725] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.468703] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.477344] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.487418] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.498247] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.508283] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.516607] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.524488] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.532101] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.539493] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.547623] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.556111] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.564723] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.573487] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.582580] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.591320] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.599579] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.608054] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.616279] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.624709] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.633625] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.641925] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.649518] nand: ->exec_op() parser: pattern not found!
[    5.655192] marvell-nfc pxa3xx-nand: 
[    5.655192] NDCR:  0xdd079fff
[    5.655192] NDCB0: 0x000d3000
[    5.655192] NDCB1: 0xfe400000
[    5.655192] NDCB2: 0x00000001
[    5.655192] NDCB3: 0x00000000
[    5.674154] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.681904] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.688832] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.696798] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.705456] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.715521] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.726344] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.736376] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.744710] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.752589] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.760061] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.767580] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    5.775714] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    5.784204] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    5.792814] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    5.801579] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    5.810534] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    5.819264] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    5.827665] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    5.836154] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    5.844403] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    5.852834] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    5.861753] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    5.869912] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    5.877632] nand: ->exec_op() parser: pattern not found!
[    5.883334] marvell-nfc pxa3xx-nand: 
[    5.883334] NDCR:  0xdd079fff
[    5.883334] NDCB0: 0x000d3000
[    5.883334] NDCB1: 0xfe000000
[    5.883334] NDCB2: 0x00000001
[    5.883334] NDCB3: 0x00000000
[    5.902303] CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0-rc1-00041-g0f3e977 #749
[    5.909898] Hardware name: PXA3xx Platform Development Kit (aka Zylonite)
[    5.916979] [<c0010440>] (unwind_backtrace) from [<c000df94>] (show_stack+0x10/0x14)
[    5.924950] [<c000df94>] (show_stack) from [<c02adb58>] (nand_op_parser_exec_op+0x39c/0x474)
[    5.933606] [<c02adb58>] (nand_op_parser_exec_op) from [<c02ac6b0>] (nand_change_read_column_op+0x134/0x194)
[    5.943672] [<c02ac6b0>] (nand_change_read_column_op) from [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page+0xd0/0x16c)
[    5.954498] [<c02b9ac8>] (marvell_nfc_hw_ecc_hmg_read_page) from [<c02b25e4>] (nand_do_read_ops+0x200/0x55c)
[    5.964526] [<c02b25e4>] (nand_do_read_ops) from [<c02b29f4>] (nand_read_oob+0xb4/0x3f8)
[    5.972855] [<c02b29f4>] (nand_read_oob) from [<c02a4c54>] (mtd_read_oob+0x60/0x9c)
[    5.980592] [<c02a4c54>] (mtd_read_oob) from [<c02b39a8>] (scan_read+0xa0/0x104)
[    5.988202] [<c02b39a8>] (scan_read) from [<c02b3ba0>] (search_bbt+0x194/0x2b4)
[    5.995734] [<c02b3ba0>] (search_bbt) from [<c02b4cf4>] (nand_default_bbt+0x11c/0x640)
[    6.003876] [<c02b4cf4>] (nand_default_bbt) from [<c02af1b0>] (nand_scan_tail+0x990/0xabc)
[    6.012373] [<c02af1b0>] (nand_scan_tail) from [<c02b7e7c>] (marvell_nfc_probe+0x3ac/0x9b8)
[    6.020838] [<c02b7e7c>] (marvell_nfc_probe) from [<c028bb54>] (platform_drv_probe+0x38/0x94)
[    6.029598] [<c028bb54>] (platform_drv_probe) from [<c0289de0>] (driver_probe_device+0x2e8/0x4b4)
[    6.038676] [<c0289de0>] (driver_probe_device) from [<c028a090>] (__driver_attach+0xe4/0x124)
[    6.047417] [<c028a090>] (__driver_attach) from [<c0287e44>] (bus_for_each_dev+0x64/0x94)
[    6.055807] [<c0287e44>] (bus_for_each_dev) from [<c02890b8>] (bus_add_driver+0x198/0x264)
[    6.064290] [<c02890b8>] (bus_add_driver) from [<c028aa50>] (driver_register+0x78/0xf8)
[    6.072513] [<c028aa50>] (driver_register) from [<c00099f8>] (do_one_initcall+0x3c/0x17c)
[    6.080795] [<c00099f8>] (do_one_initcall) from [<c053fd80>] (kernel_init_freeable+0x104/0x1c0)
[    6.089716] [<c053fd80>] (kernel_init_freeable) from [<c0423a38>] (kernel_init+0x8/0xf8)
[    6.098699] [<c0423a38>] (kernel_init) from [<c000a780>] (ret_from_fork+0x14/0x34)
[    6.106511] nand: ->exec_op() parser: pattern not found!
[    6.112110] Bad block table not found for chip 0
[    6.116762] Scanning device for bad blocks
[    6.121060] nand: nand_do_read_oob: from = 0x00000000, len = 64
[    6.127086] marvell-nfc pxa3xx-nand: 
[    6.127086] NDCR:  0x9d079fff
[    6.127086] NDCB0: 0x000d3000
[    6.127086] NDCB1: 0x00000000
[    6.127086] NDCB2: 0x00000000
[    6.127086] NDCB3: 0x00000000
[    6.145988] Bad eraseblock 0 at 0x000000000000

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-23 17:14                               ` Robert Jarzmik
@ 2017-12-23 22:42                                 ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-23 22:42 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Hi Robert,

> > Also to ease the understanding, you might add a dump_stack() right
> > next to this error message.  
> Attached in [1].

Ok, I think I have identified the issue, and I probably can reproduce
it with the board I have. I think this is a regression due to a
recent fix, when I changed the ->correct() hook to check for 0xFF bytes
also in the ECC bytes.

I will come back to you in a few days, until then, happy end of year :)

Thank you,
Miquèl

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2017-12-23 22:42                                 ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2017-12-23 22:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Robert,

> > Also to ease the understanding, you might add a dump_stack() right
> > next to this error message.  
> Attached in [1].

Ok, I think I have identified the issue, and I probably can reproduce
it with the board I have. I think this is a regression due to a
recent fix, when I changed the ->correct() hook to check for 0xFF bytes
also in the ECC bytes.

I will come back to you in a few days, until then, happy end of year :)

Thank you,
Miqu?l

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2017-12-23 17:14                               ` Robert Jarzmik
@ 2018-01-02 11:03                                 ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-02 11:03 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Hello Robert,

On Sat, 23 Dec 2017 18:14:18 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> >> Here it comes in [3]. I suspect the BBT parser here, here is the
> >> extract that _might_ be relevant:
> >> [    3.372907] nand: ->exec_op() parser: pattern not found!  
> >
> > Indeed this might be the problem, it means there is one scenario
> > that should be handled by the parser that is missing. I am really
> > interrogative about which one it is and to discover it, can you
> > rebuild with
> >
> >         #define DEBUG
> >
> > in drivers/mtd/nand/nand_base.c too.  
> It was already there, check the patch I attached to my previous mail.
> 
> > This way the core will display the patterns it try to find a match
> > for.  
> The core displays already debug message, as these are displayed :
> [    3.228598] nand: executing subop:
> [    3.232187] nand:     ->CMD      [0x90]
> [    3.236077] nand:     ->ADDR     [1 cyc: 40]
> [    3.240517] nand:     ->DATA_IN  [5 B, force 8-bit]
> 
> As to your statement "the core will display the patterns it try to
> find a match for", how confident are you with it ? Because my reading
> of the following code is quite different :
> 			if (!nand_op_parser_match_pat(pattern, &ctx))
> 				continue;
> 
> 			nand_op_parser_trace(&ctx);
> 
> > Also to ease the understanding, you might add a dump_stack() right
> > next to this error message.  
> Attached in [1].

I just pushed two fixups on top of the Github branch [1], can you rebase
on top of them and give me the result?

The first patch just adds the auto bus width bit in nand->options.
The second removes the faulty ->change_column(), and does the same
check with another method.

I think the ECC issue you faced was related to pages being written
*and* empty. If this guess is right, the board should boot fine with
these changes.

Otherwise, please add the DEBUG define as before in both the core and
the driver and do not hesitate to add another dump_stack() where it
crashes (if applicable).

Thanks for your help,
Miquèl

[1] https://github.com/miquelraynal/linux/commits/marvell/nand-next/nfc

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-02 11:03                                 ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-02 11:03 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Robert,

On Sat, 23 Dec 2017 18:14:18 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> >> Here it comes in [3]. I suspect the BBT parser here, here is the
> >> extract that _might_ be relevant:
> >> [    3.372907] nand: ->exec_op() parser: pattern not found!  
> >
> > Indeed this might be the problem, it means there is one scenario
> > that should be handled by the parser that is missing. I am really
> > interrogative about which one it is and to discover it, can you
> > rebuild with
> >
> >         #define DEBUG
> >
> > in drivers/mtd/nand/nand_base.c too.  
> It was already there, check the patch I attached to my previous mail.
> 
> > This way the core will display the patterns it try to find a match
> > for.  
> The core displays already debug message, as these are displayed :
> [    3.228598] nand: executing subop:
> [    3.232187] nand:     ->CMD      [0x90]
> [    3.236077] nand:     ->ADDR     [1 cyc: 40]
> [    3.240517] nand:     ->DATA_IN  [5 B, force 8-bit]
> 
> As to your statement "the core will display the patterns it try to
> find a match for", how confident are you with it ? Because my reading
> of the following code is quite different :
> 			if (!nand_op_parser_match_pat(pattern, &ctx))
> 				continue;
> 
> 			nand_op_parser_trace(&ctx);
> 
> > Also to ease the understanding, you might add a dump_stack() right
> > next to this error message.  
> Attached in [1].

I just pushed two fixups on top of the Github branch [1], can you rebase
on top of them and give me the result?

The first patch just adds the auto bus width bit in nand->options.
The second removes the faulty ->change_column(), and does the same
check with another method.

I think the ECC issue you faced was related to pages being written
*and* empty. If this guess is right, the board should boot fine with
these changes.

Otherwise, please add the DEBUG define as before in both the core and
the driver and do not hesitate to add another dump_stack() where it
crashes (if applicable).

Thanks for your help,
Miqu?l

[1] https://github.com/miquelraynal/linux/commits/marvell/nand-next/nfc

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-02 11:03                                 ` Miquel RAYNAL
  (?)
@ 2018-01-02 19:21                                 ` Robert Jarzmik
  2018-01-03  7:40                                     ` Miquel RAYNAL
  -1 siblings, 1 reply; 126+ messages in thread
From: Robert Jarzmik @ 2018-01-02 19:21 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

> I think the ECC issue you faced was related to pages being written
> *and* empty. If this guess is right, the board should boot fine with
> these changes.
>
> Otherwise, please add the DEBUG define as before in both the core and
> the driver and do not hesitate to add another dump_stack() where it
> crashes (if applicable).

The problem looks still the same :
[    3.560163] Bad block table not found for chip 0

Cheers.

--
Robert

-- 
Robert

[1] Dmesg
---8>---
netconsole: port not set
netconsole: registered as netconsole-1
smc91c111 smc91c1110: chip is revision= 9, version= 2
mdio_bus: miibus0: probed
eth0: got preset MAC address: 00:0e:0c:a7:26:f7
nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0xba (ST Micro NAND 256MiB 1,8V 16-bit), 256MiB, page size: 2048, OOB size: 64
mrvl_nand mrvl_nand0: ECC strength 1, ECC step size 512
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
malloc space: 0x83700000 -> 0x83efffff (size 8 MiB)
running /env/bin/init...
magicvar: No such file or directory
magicvar: No such file or directory
magicvar: No such file or directory

Hit any key to stop autoboot:  3\b\b 2\b\b 1\b\b 0
booting net
netconsole: netconsole initialized with 255.255.255.255:6662
eth0: 100Mbps full duplex link detected
DHCP client bound to address 192.168.1.232
netconsole: netconsole initialized with 255.255.255.255:6662
could not open /mnt/tftp/none-linux-zylonite: No such file or directory
Booting net failed: No such file or directory
booting net failed: No such file or directory
boot: No such file or directory
.[1;32mbarebox@.[1;36mZylonite:/.[0m global linux.bootargs.debug=earlycon
.[1;32mbarebox@.[1;36mZylonite:/.[0m bootm /mnt/tftp/zImage_jenkins

Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00042-ge693b77 (jenkins@belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #817 PREEMPT Tue Jan 2 18:08:25 CET 2018
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4226K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0428a28   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000069] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000265] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002135] Console: colour dummy device 80x30
[    0.002294] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081023] pid_max: default: 32768 minimum: 301
[    0.081861] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081961] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085176] CPU: Testing write buffer coherency: ok
[    0.088966] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089928] Hierarchical SRCU implementation.
[    0.102939] devtmpfs: initialized
[    0.113807] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.113949] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116286] NET: Registered protocol family 16
[    0.119101] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.385393] Advanced Linux Sound Architecture Driver Initialized.
[    0.398663] clocksource: Switched to clocksource oscr0
[    0.551533] NET: Registered protocol family 2
[    0.557291] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.557517] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.557699] TCP: Hash tables configured (established 1024 bind 1024)
[    0.558259] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.558438] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560686] NET: Registered protocol family 1
[    0.562714] RPC: Registered named UNIX socket transport module.
[    0.562816] RPC: Registered udp transport module.
[    0.562871] RPC: Registered tcp transport module.
[    0.562931] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.501505] Initialise system trusted keyrings
[    2.502977] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.507421] NFS: Registering the id_resolver key type
[    2.507626] Key type id_resolver registered
[    2.507689] Key type id_legacy registered
[    2.513786] Key type asymmetric registered
[    2.513887] Asymmetric key parser 'x509' registered
[    2.514050] io scheduler noop registered
[    2.514116] io scheduler deadline registered
[    2.514509] io scheduler cfq registered (default)
[    2.514579] io scheduler mq-deadline registered
[    2.514643] io scheduler kyber registered
[    2.574261] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.578634] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.054506] console [ttyS0] enabled
[    3.061109] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.073618] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.091288] nand: executing subop:
[    3.094787] nand:     ->CMD      [0xff]
[    3.099973] nand:     ->WAITRDY  [max 250 ms]
[    3.104480] marvell-nfc pxa3xx-nand: 
[    3.104480] NDCR:  0x90079fff
[    3.104480] NDCB0: 0x00a000ff
[    3.104480] NDCB1: 0x00000000
[    3.104480] NDCB2: 0x00000000
[    3.104480] NDCB3: 0x00000000
[    3.123768] nand: executing subop:
[    3.127243] nand:     ->CMD      [0x90]
[    3.131549] nand:     ->ADDR     [1 cyc: 00]
[    3.135876] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.141219] marvell-nfc pxa3xx-nand: 
[    3.141219] NDCR:  0x90079fff
[    3.141219] NDCB0: 0x00610090
[    3.141219] NDCB1: 0x00000000
[    3.141219] NDCB2: 0x00000000
[    3.141219] NDCB3: 0x00000000
[    3.160073] nand: executing subop:
[    3.163536] nand:     ->CMD      [0x90]
[    3.167410] nand:     ->ADDR     [1 cyc: 00]
[    3.171900] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.176892] marvell-nfc pxa3xx-nand: 
[    3.176892] NDCR:  0x90079fff
[    3.176892] NDCB0: 0x00610090
[    3.176892] NDCB1: 0x00000000
[    3.176892] NDCB2: 0x00000000
[    3.176892] NDCB3: 0x00000000
[    3.195557] nand: executing subop:
[    3.199162] nand:     ->CMD      [0x90]
[    3.203053] nand:     ->ADDR     [1 cyc: 20]
[    3.207353] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.212466] marvell-nfc pxa3xx-nand: 
[    3.212466] NDCR:  0x90079fff
[    3.212466] NDCB0: 0x00610090
[    3.212466] NDCB1: 0x00000020
[    3.212466] NDCB2: 0x00000000
[    3.212466] NDCB3: 0x00000000
[    3.231108] nand: executing subop:
[    3.234561] nand:     ->CMD      [0x90]
[    3.238433] nand:     ->ADDR     [1 cyc: 40]
[    3.242882] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.247869] marvell-nfc pxa3xx-nand: 
[    3.247869] NDCR:  0x90079fff
[    3.247869] NDCB0: 0x00610090
[    3.247869] NDCB1: 0x00000040
[    3.247869] NDCB2: 0x00000000
[    3.247869] NDCB3: 0x00000000
[    3.266511] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.273022] nand: ST Micro NAND 256MiB 1,8V 16-bit
[    3.277867] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.285604] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
[    3.293273] marvell-nfc pxa3xx-nand: 
[    3.293273] NDCR:  0xdd079fff
[    3.293273] NDCB0: 0x000d3000
[    3.293273] NDCB1: 0xffc00000
[    3.293273] NDCB2: 0x00000001
[    3.293273] NDCB3: 0x00000000
[    3.312627] marvell-nfc pxa3xx-nand: 
[    3.312627] NDCR:  0xdd079fff
[    3.312627] NDCB0: 0x000d3000
[    3.312627] NDCB1: 0xff800000
[    3.312627] NDCB2: 0x00000001
[    3.312627] NDCB3: 0x00000000
[    3.331669] marvell-nfc pxa3xx-nand: 
[    3.331669] NDCR:  0xdd079fff
[    3.331669] NDCB0: 0x000d3000
[    3.331669] NDCB1: 0xff400000
[    3.331669] NDCB2: 0x00000001
[    3.331669] NDCB3: 0x00000000
[    3.350652] marvell-nfc pxa3xx-nand: 
[    3.350652] NDCR:  0x9d079fff
[    3.350652] NDCB0: 0x000d3000
[    3.350652] NDCB1: 0xff400000
[    3.350652] NDCB2: 0x00000001
[    3.350652] NDCB3: 0x00000000
[    3.369749] marvell-nfc pxa3xx-nand: 
[    3.369749] NDCR:  0xdd079fff
[    3.369749] NDCB0: 0x000d3000
[    3.369749] NDCB1: 0xff000000
[    3.369749] NDCB2: 0x00000001
[    3.369749] NDCB3: 0x00000000
[    3.388952] marvell-nfc pxa3xx-nand: 
[    3.388952] NDCR:  0x9d079fff
[    3.388952] NDCB0: 0x000d3000
[    3.388952] NDCB1: 0xff000000
[    3.388952] NDCB2: 0x00000001
[    3.388952] NDCB3: 0x00000000
[    3.408036] marvell-nfc pxa3xx-nand: 
[    3.408036] NDCR:  0xdd079fff
[    3.408036] NDCB0: 0x000d3000
[    3.408036] NDCB1: 0xfec00000
[    3.408036] NDCB2: 0x00000001
[    3.408036] NDCB3: 0x00000000
[    3.427024] marvell-nfc pxa3xx-nand: 
[    3.427024] NDCR:  0x9d079fff
[    3.427024] NDCB0: 0x000d3000
[    3.427024] NDCB1: 0xfec00000
[    3.427024] NDCB2: 0x00000001
[    3.427024] NDCB3: 0x00000000
[    3.446101] marvell-nfc pxa3xx-nand: 
[    3.446101] NDCR:  0xdd079fff
[    3.446101] NDCB0: 0x000d3000
[    3.446101] NDCB1: 0xfe800000
[    3.446101] NDCB2: 0x00000001
[    3.446101] NDCB3: 0x00000000
[    3.465087] marvell-nfc pxa3xx-nand: 
[    3.465087] NDCR:  0x9d079fff
[    3.465087] NDCB0: 0x000d3000
[    3.465087] NDCB1: 0xfe800000
[    3.465087] NDCB2: 0x00000001
[    3.465087] NDCB3: 0x00000000
[    3.484155] marvell-nfc pxa3xx-nand: 
[    3.484155] NDCR:  0xdd079fff
[    3.484155] NDCB0: 0x000d3000
[    3.484155] NDCB1: 0xfe400000
[    3.484155] NDCB2: 0x00000001
[    3.484155] NDCB3: 0x00000000
[    3.503139] marvell-nfc pxa3xx-nand: 
[    3.503139] NDCR:  0x9d079fff
[    3.503139] NDCB0: 0x000d3000
[    3.503139] NDCB1: 0xfe400000
[    3.503139] NDCB2: 0x00000001
[    3.503139] NDCB3: 0x00000000
[    3.522207] marvell-nfc pxa3xx-nand: 
[    3.522207] NDCR:  0xdd079fff
[    3.522207] NDCB0: 0x000d3000
[    3.522207] NDCB1: 0xfe000000
[    3.522207] NDCB2: 0x00000001
[    3.522207] NDCB3: 0x00000000
[    3.541194] marvell-nfc pxa3xx-nand: 
[    3.541194] NDCR:  0x9d079fff
[    3.541194] NDCB0: 0x000d3000
[    3.541194] NDCB1: 0xfe000000
[    3.541194] NDCB2: 0x00000001
[    3.541194] NDCB3: 0x00000000
[    3.560163] Bad block table not found for chip 0
[    3.564937] marvell-nfc pxa3xx-nand: 
[    3.564937] NDCR:  0xdd079fff
[    3.564937] NDCB0: 0x000d3000
[    3.564937] NDCB1: 0xffc00000
[    3.564937] NDCB2: 0x00000001
[    3.564937] NDCB3: 0x00000000
[    3.583953] marvell-nfc pxa3xx-nand: 
[    3.583953] NDCR:  0xdd079fff
[    3.583953] NDCB0: 0x000d3000
[    3.583953] NDCB1: 0xff800000
[    3.583953] NDCB2: 0x00000001
[    3.583953] NDCB3: 0x00000000
[    3.602976] marvell-nfc pxa3xx-nand: 
[    3.602976] NDCR:  0xdd079fff
[    3.602976] NDCB0: 0x000d3000
[    3.602976] NDCB1: 0xff400000
[    3.602976] NDCB2: 0x00000001
[    3.602976] NDCB3: 0x00000000
[    3.621958] marvell-nfc pxa3xx-nand: 
[    3.621958] NDCR:  0x9d079fff
[    3.621958] NDCB0: 0x000d3000
[    3.621958] NDCB1: 0xff400000
[    3.621958] NDCB2: 0x00000001
[    3.621958] NDCB3: 0x00000000
[    3.641031] marvell-nfc pxa3xx-nand: 
[    3.641031] NDCR:  0xdd079fff
[    3.641031] NDCB0: 0x000d3000
[    3.641031] NDCB1: 0xff000000
[    3.641031] NDCB2: 0x00000001
[    3.641031] NDCB3: 0x00000000
[    3.660018] marvell-nfc pxa3xx-nand: 
[    3.660018] NDCR:  0x9d079fff
[    3.660018] NDCB0: 0x000d3000
[    3.660018] NDCB1: 0xff000000
[    3.660018] NDCB2: 0x00000001
[    3.660018] NDCB3: 0x00000000
[    3.679132] marvell-nfc pxa3xx-nand: 
[    3.679132] NDCR:  0xdd079fff
[    3.679132] NDCB0: 0x000d3000
[    3.679132] NDCB1: 0xfec00000
[    3.679132] NDCB2: 0x00000001
[    3.679132] NDCB3: 0x00000000
[    3.698111] marvell-nfc pxa3xx-nand: 
[    3.698111] NDCR:  0x9d079fff
[    3.698111] NDCB0: 0x000d3000
[    3.698111] NDCB1: 0xfec00000
[    3.698111] NDCB2: 0x00000001
[    3.698111] NDCB3: 0x00000000
[    3.717181] marvell-nfc pxa3xx-nand: 
[    3.717181] NDCR:  0xdd079fff
[    3.717181] NDCB0: 0x000d3000
[    3.717181] NDCB1: 0xfe800000
[    3.717181] NDCB2: 0x00000001
[    3.717181] NDCB3: 0x00000000
[    3.736169] marvell-nfc pxa3xx-nand: 
[    3.736169] NDCR:  0x9d079fff
[    3.736169] NDCB0: 0x000d3000
[    3.736169] NDCB1: 0xfe800000
[    3.736169] NDCB2: 0x00000001
[    3.736169] NDCB3: 0x00000000
[    3.755238] marvell-nfc pxa3xx-nand: 
[    3.755238] NDCR:  0xdd079fff
[    3.755238] NDCB0: 0x000d3000
[    3.755238] NDCB1: 0xfe400000
[    3.755238] NDCB2: 0x00000001
[    3.755238] NDCB3: 0x00000000
[    3.774224] marvell-nfc pxa3xx-nand: 
[    3.774224] NDCR:  0x9d079fff
[    3.774224] NDCB0: 0x000d3000
[    3.774224] NDCB1: 0xfe400000
[    3.774224] NDCB2: 0x00000001
[    3.774224] NDCB3: 0x00000000
[    3.793297] marvell-nfc pxa3xx-nand: 
[    3.793297] NDCR:  0xdd079fff
[    3.793297] NDCB0: 0x000d3000
[    3.793297] NDCB1: 0xfe000000
[    3.793297] NDCB2: 0x00000001
[    3.793297] NDCB3: 0x00000000
[    3.812287] marvell-nfc pxa3xx-nand: 
[    3.812287] NDCR:  0x9d079fff
[    3.812287] NDCB0: 0x000d3000
[    3.812287] NDCB1: 0xfe000000
[    3.812287] NDCB2: 0x00000001
[    3.812287] NDCB3: 0x00000000
[    3.831254] Bad block table not found for chip 0
[    3.835915] Scanning device for bad blocks
[    3.840247] nand: nand_do_read_oob: from = 0x00000000, len = 64
[    3.846271] marvell-nfc pxa3xx-nand: 
[    3.846271] NDCR:  0x9d079fff
[    3.846271] NDCB0: 0x000d3000
[    3.846271] NDCB1: 0x00000000
[    3.846271] NDCB2: 0x00000000
[    3.846271] NDCB3: 0x00000000
[    3.865153] Bad eraseblock 0 at 0x000000000000
[    3.869834] nand: nand_do_read_oob: from = 0x00020000, len = 64
[    3.875857] marvell-nfc pxa3xx-nand: 
[    3.875857] NDCR:  0x9d079fff
[    3.875857] NDCB0: 0x000d3000
[    3.875857] NDCB1: 0x00400000
[    3.875857] NDCB2: 0x00000000
[    3.875857] NDCB3: 0x00000000
[    3.894763] nand: nand_do_read_oob: from = 0x00040000, len = 64
[    3.900960] marvell-nfc pxa3xx-nand: 
[    3.900960] NDCR:  0x9d079fff
[    3.900960] NDCB0: 0x000d3000
[    3.900960] NDCB1: 0x00800000
[    3.900960] NDCB2: 0x00000000
[    3.900960] NDCB3: 0x00000000
[    3.919870] Bad eraseblock 2 at 0x000000040000
[    3.924394] nand: nand_do_read_oob: from = 0x00060000, len = 64
[    3.930571] marvell-nfc pxa3xx-nand: 
[    3.930571] NDCR:  0x9d079fff
[    3.930571] NDCB0: 0x000d3000
[    3.930571] NDCB1: 0x00c00000
[    3.930571] NDCB2: 0x00000000
[    3.930571] NDCB3: 0x00000000
[    3.949456] Bad eraseblock 3 at 0x000000060000
[    3.953984] nand: nand_do_read_oob: from = 0x00080000, len = 64
[    3.960164] marvell-nfc pxa3xx-nand: 
[    3.960164] NDCR:  0x9d079fff
[    3.960164] NDCB0: 0x000d3000
[    3.960164] NDCB1: 0x01000000
[    3.960164] NDCB2: 0x00000000
[    3.960164] NDCB3: 0x00000000
[    3.979047] Bad eraseblock 4 at 0x000000080000
[    3.983571] nand: nand_do_read_oob: from = 0x000a0000, len = 64
[    3.989747] marvell-nfc pxa3xx-nand: 
[    3.989747] NDCR:  0x9d079fff
[    3.989747] NDCB0: 0x000d3000
[    3.989747] NDCB1: 0x01400000
[    3.989747] NDCB2: 0x00000000
[    3.989747] NDCB3: 0x00000000
[    4.008735] Bad eraseblock 5 at 0x0000000a0000
[    4.013265] nand: nand_do_read_oob: from = 0x000c0000, len = 64
[    4.019426] marvell-nfc pxa3xx-nand: 
[    4.019426] NDCR:  0x9d079fff
[    4.019426] NDCB0: 0x000d3000
[    4.019426] NDCB1: 0x01800000
[    4.019426] NDCB2: 0x00000000
[    4.019426] NDCB3: 0x00000000
[    4.038293] Bad eraseblock 6 at 0x0000000c0000
[    4.042975] nand: nand_do_read_oob: from = 0x000e0000, len = 64
[    4.049149] marvell-nfc pxa3xx-nand: 
[    4.049149] NDCR:  0x9d079fff
[    4.049149] NDCB0: 0x000d3000
[    4.049149] NDCB1: 0x01c00000
[    4.049149] NDCB2: 0x00000000
[    4.049149] NDCB3: 0x00000000
[    4.068019] Bad eraseblock 7 at 0x0000000e0000
[    4.072699] nand: nand_do_read_oob: from = 0x00100000, len = 64
[    4.078875] marvell-nfc pxa3xx-nand: 
[    4.078875] NDCR:  0x9d079fff
[    4.078875] NDCB0: 0x000d3000
[    4.078875] NDCB1: 0x02000000
[    4.078875] NDCB2: 0x00000000
[    4.078875] NDCB3: 0x00000000
[    4.098109] Bad eraseblock 8 at 0x000000100000
[    4.102830] nand: nand_do_read_oob: from = 0x00120000, len = 64
[    4.109007] marvell-nfc pxa3xx-nand: 
[    4.109007] NDCR:  0x9d079fff
[    4.109007] NDCB0: 0x000d3000
[    4.109007] NDCB1: 0x02400000
[    4.109007] NDCB2: 0x00000000
[    4.109007] NDCB3: 0x00000000
[    4.127919] nand: nand_do_read_oob: from = 0x00140000, len = 64
[    4.134120] marvell-nfc pxa3xx-nand: 
[    4.134120] NDCR:  0x9d079fff
[    4.134120] NDCB0: 0x000d3000
[    4.134120] NDCB1: 0x02800000
[    4.134120] NDCB2: 0x00000000
[    4.134120] NDCB3: 0x00000000
[    4.153008] Bad eraseblock 10 at 0x000000140000
[    4.157619] nand: nand_do_read_oob: from = 0x00160000, len = 64
[    4.163799] marvell-nfc pxa3xx-nand: 
[    4.163799] NDCR:  0x9d079fff
[    4.163799] NDCB0: 0x000d3000
[    4.163799] NDCB1: 0x02c00000
[    4.163799] NDCB2: 0x00000000
[    4.163799] NDCB3: 0x00000000
[    4.182687] Bad eraseblock 11 at 0x000000160000
[    4.187300] nand: nand_do_read_oob: from = 0x00180000, len = 64
[    4.193478] marvell-nfc pxa3xx-nand: 
[    4.193478] NDCR:  0x9d079fff
[    4.193478] NDCB0: 0x000d3000
[    4.193478] NDCB1: 0x03000000
[    4.193478] NDCB2: 0x00000000
[    4.193478] NDCB3: 0x00000000
[    4.212367] Bad eraseblock 12 at 0x000000180000
[    4.216978] nand: nand_do_read_oob: from = 0x001a0000, len = 64
[    4.223158] marvell-nfc pxa3xx-nand: 
[    4.223158] NDCR:  0x9d079fff
[    4.223158] NDCB0: 0x000d3000
[    4.223158] NDCB1: 0x03400000
[    4.223158] NDCB2: 0x00000000
[    4.223158] NDCB3: 0x00000000
[    4.242047] Bad eraseblock 13 at 0x0000001a0000
[    4.246659] nand: nand_do_read_oob: from = 0x001c0000, len = 64
[    4.252836] marvell-nfc pxa3xx-nand: 
[    4.252836] NDCR:  0x9d079fff
[    4.252836] NDCB0: 0x000d3000
[    4.252836] NDCB1: 0x03800000
[    4.252836] NDCB2: 0x00000000
[    4.252836] NDCB3: 0x00000000
[    4.271724] Bad eraseblock 14 at 0x0000001c0000
[    4.276329] nand: nand_do_read_oob: from = 0x001e0000, len = 64
[    4.282510] marvell-nfc pxa3xx-nand: 
[    4.282510] NDCR:  0x9d079fff
[    4.282510] NDCB0: 0x000d3000
[    4.282510] NDCB1: 0x03c00000
[    4.282510] NDCB2: 0x00000000
[    4.282510] NDCB3: 0x00000000
[    4.301396] Bad eraseblock 15 at 0x0000001e0000
[    4.306010] nand: nand_do_read_oob: from = 0x00200000, len = 64
[    4.312187] marvell-nfc pxa3xx-nand: 
[    4.312187] NDCR:  0x9d079fff
[    4.312187] NDCB0: 0x000d3000
[    4.312187] NDCB1: 0x04000000
[    4.312187] NDCB2: 0x00000000
[    4.312187] NDCB3: 0x00000000
[    4.331078] Bad eraseblock 16 at 0x000000200000
[    4.335690] nand: nand_do_read_oob: from = 0x00220000, len = 64
[    4.341868] marvell-nfc pxa3xx-nand: 
[    4.341868] NDCR:  0x9d079fff
[    4.341868] NDCB0: 0x000d3000
[    4.341868] NDCB1: 0x04400000
[    4.341868] NDCB2: 0x00000000
[    4.341868] NDCB3: 0x00000000
[    4.360757] Bad eraseblock 17 at 0x000000220000
[    4.365371] nand: nand_do_read_oob: from = 0x00240000, len = 64
[    4.371546] marvell-nfc pxa3xx-nand: 
[    4.371546] NDCR:  0x9d079fff
[    4.371546] NDCB0: 0x000d3000
[    4.371546] NDCB1: 0x04800000
[    4.371546] NDCB2: 0x00000000
[    4.371546] NDCB3: 0x00000000
[    4.390428] Bad eraseblock 18 at 0x000000240000
[    4.395041] nand: nand_do_read_oob: from = 0x00260000, len = 64
[    4.401219] marvell-nfc pxa3xx-nand: 
[    4.401219] NDCR:  0x9d079fff
[    4.401219] NDCB0: 0x000d3000
[    4.401219] NDCB1: 0x04c00000
[    4.401219] NDCB2: 0x00000000
[    4.401219] NDCB3: 0x00000000
[    4.420110] Bad eraseblock 19 at 0x000000260000
[    4.424721] nand: nand_do_read_oob: from = 0x00280000, len = 64
[    4.430902] marvell-nfc pxa3xx-nand: 
[    4.430902] NDCR:  0x9d079fff
[    4.430902] NDCB0: 0x000d3000
[    4.430902] NDCB1: 0x05000000
[    4.430902] NDCB2: 0x00000000
[    4.430902] NDCB3: 0x00000000
[    4.449790] Bad eraseblock 20 at 0x000000280000
[    4.454402] nand: nand_do_read_oob: from = 0x002a0000, len = 64
[    4.460578] marvell-nfc pxa3xx-nand: 
[    4.460578] NDCR:  0x9d079fff
[    4.460578] NDCB0: 0x000d3000
[    4.460578] NDCB1: 0x05400000
[    4.460578] NDCB2: 0x00000000
[    4.460578] NDCB3: 0x00000000
[    4.479469] Bad eraseblock 21 at 0x0000002a0000
[    4.484081] nand: nand_do_read_oob: from = 0x002c0000, len = 64
[    4.490260] marvell-nfc pxa3xx-nand: 
[    4.490260] NDCR:  0x9d079fff
[    4.490260] NDCB0: 0x000d3000
[    4.490260] NDCB1: 0x05800000
[    4.490260] NDCB2: 0x00000000
[    4.490260] NDCB3: 0x00000000
[    4.509171] Bad eraseblock 22 at 0x0000002c0000
[    4.513779] nand: nand_do_read_oob: from = 0x002e0000, len = 64
[    4.519957] marvell-nfc pxa3xx-nand: 
[    4.519957] NDCR:  0x9d079fff
[    4.519957] NDCB0: 0x000d3000
[    4.519957] NDCB1: 0x05c00000
[    4.519957] NDCB2: 0x00000000
[    4.519957] NDCB3: 0x00000000
[    4.538865] Bad eraseblock 23 at 0x0000002e0000
[    4.543479] nand: nand_do_read_oob: from = 0x00300000, len = 64
[    4.549653] marvell-nfc pxa3xx-nand: 
[    4.549653] NDCR:  0x9d079fff
[    4.549653] NDCB0: 0x000d3000
[    4.549653] NDCB1: 0x06000000
[    4.549653] NDCB2: 0x00000000
[    4.549653] NDCB3: 0x00000000
[    4.568531] Bad eraseblock 24 at 0x000000300000
[    4.573297] nand: nand_do_read_oob: from = 0x00320000, len = 64
[    4.579473] marvell-nfc pxa3xx-nand: 
[    4.579473] NDCR:  0x9d079fff
[    4.579473] NDCB0: 0x000d3000
[    4.579473] NDCB1: 0x06400000
[    4.579473] NDCB2: 0x00000000
[    4.579473] NDCB3: 0x00000000
[    4.598354] Bad eraseblock 25 at 0x000000320000
[    4.603123] nand: nand_do_read_oob: from = 0x00340000, len = 64
[    4.609298] marvell-nfc pxa3xx-nand: 
[    4.609298] NDCR:  0x9d079fff
[    4.609298] NDCB0: 0x000d3000
[    4.609298] NDCB1: 0x06800000
[    4.609298] NDCB2: 0x00000000
[    4.609298] NDCB3: 0x00000000
[    4.628177] Bad eraseblock 26 at 0x000000340000
[    4.632941] nand: nand_do_read_oob: from = 0x00360000, len = 64
[    4.639116] marvell-nfc pxa3xx-nand: 
[    4.639116] NDCR:  0x9d079fff
[    4.639116] NDCB0: 0x000d3000
[    4.639116] NDCB1: 0x06c00000
[    4.639116] NDCB2: 0x00000000
[    4.639116] NDCB3: 0x00000000
[    4.657995] Bad eraseblock 27 at 0x000000360000
[    4.662757] nand: nand_do_read_oob: from = 0x00380000, len = 64
[    4.668933] marvell-nfc pxa3xx-nand: 
[    4.668933] NDCR:  0x9d079fff
[    4.668933] NDCB0: 0x000d3000
[    4.668933] NDCB1: 0x07000000
[    4.668933] NDCB2: 0x00000000
[    4.668933] NDCB3: 0x00000000
[    4.687812] Bad eraseblock 28 at 0x000000380000
[    4.692577] nand: nand_do_read_oob: from = 0x003a0000, len = 64
[    4.698602] marvell-nfc pxa3xx-nand: 
[    4.698602] NDCR:  0x9d079fff
[    4.698602] NDCB0: 0x000d3000
[    4.698602] NDCB1: 0x07400000
[    4.698602] NDCB2: 0x00000000
[    4.698602] NDCB3: 0x00000000
[    4.717583] Bad eraseblock 29 at 0x0000003a0000
[    4.722352] nand: nand_do_read_oob: from = 0x003c0000, len = 64
[    4.728375] marvell-nfc pxa3xx-nand: 
[    4.728375] NDCR:  0x9d079fff
[    4.728375] NDCB0: 0x000d3000
[    4.728375] NDCB1: 0x07800000
[    4.728375] NDCB2: 0x00000000
[    4.728375] NDCB3: 0x00000000
[    4.747249] Bad eraseblock 30 at 0x0000003c0000
[    4.752017] nand: nand_do_read_oob: from = 0x003e0000, len = 64
[    4.758038] marvell-nfc pxa3xx-nand: 
[    4.758038] NDCR:  0x9d079fff
[    4.758038] NDCB0: 0x000d3000
[    4.758038] NDCB1: 0x07c00000
[    4.758038] NDCB2: 0x00000000
[    4.758038] NDCB3: 0x00000000
[    4.776911] Bad eraseblock 31 at 0x0000003e0000
[    4.781677] nand: nand_do_read_oob: from = 0x00400000, len = 64
[    4.787702] marvell-nfc pxa3xx-nand: 
[    4.787702] NDCR:  0x9d079fff
[    4.787702] NDCB0: 0x000d3000
[    4.787702] NDCB1: 0x08000000
[    4.787702] NDCB2: 0x00000000
[    4.787702] NDCB3: 0x00000000
[    4.806582] Bad eraseblock 32 at 0x000000400000
[    4.811349] nand: nand_do_read_oob: from = 0x00420000, len = 64
[    4.817375] marvell-nfc pxa3xx-nand: 
[    4.817375] NDCR:  0x9d079fff
[    4.817375] NDCB0: 0x000d3000
[    4.817375] NDCB1: 0x08400000
[    4.817375] NDCB2: 0x00000000
[    4.817375] NDCB3: 0x00000000
[    4.836255] Bad eraseblock 33 at 0x000000420000
[    4.841020] nand: nand_do_read_oob: from = 0x00440000, len = 64
[    4.847043] marvell-nfc pxa3xx-nand: 
[    4.847043] NDCR:  0x9d079fff
[    4.847043] NDCB0: 0x000d3000
[    4.847043] NDCB1: 0x08800000
[    4.847043] NDCB2: 0x00000000
[    4.847043] NDCB3: 0x00000000
[    4.865918] Bad eraseblock 34 at 0x000000440000
[    4.870684] nand: nand_do_read_oob: from = 0x00460000, len = 64
[    4.876706] marvell-nfc pxa3xx-nand: 
[    4.876706] NDCR:  0x9d079fff
[    4.876706] NDCB0: 0x000d3000
[    4.876706] NDCB1: 0x08c00000
[    4.876706] NDCB2: 0x00000000
[    4.876706] NDCB3: 0x00000000
[    4.895580] Bad eraseblock 35 at 0x000000460000
[    4.900347] nand: nand_do_read_oob: from = 0x00480000, len = 64
[    4.906370] marvell-nfc pxa3xx-nand: 
[    4.906370] NDCR:  0x9d079fff
[    4.906370] NDCB0: 0x000d3000
[    4.906370] NDCB1: 0x09000000
[    4.906370] NDCB2: 0x00000000
[    4.906370] NDCB3: 0x00000000
[    4.925252] Bad eraseblock 36 at 0x000000480000
[    4.930018] nand: nand_do_read_oob: from = 0x004a0000, len = 64
[    4.936039] marvell-nfc pxa3xx-nand: 
[    4.936039] NDCR:  0x9d079fff
[    4.936039] NDCB0: 0x000d3000
[    4.936039] NDCB1: 0x09400000
[    4.936039] NDCB2: 0x00000000
[    4.936039] NDCB3: 0x00000000
[    4.954915] Bad eraseblock 37 at 0x0000004a0000
[    4.959680] nand: nand_do_read_oob: from = 0x004c0000, len = 64
[    4.965704] marvell-nfc pxa3xx-nand: 
[    4.965704] NDCR:  0x9d079fff
[    4.965704] NDCB0: 0x000d3000
[    4.965704] NDCB1: 0x09800000
[    4.965704] NDCB2: 0x00000000
[    4.965704] NDCB3: 0x00000000
[    4.984575] Bad eraseblock 38 at 0x0000004c0000
[    4.989344] nand: nand_do_read_oob: from = 0x004e0000, len = 64
[    4.995365] marvell-nfc pxa3xx-nand: 
[    4.995365] NDCR:  0x9d079fff
[    4.995365] NDCB0: 0x000d3000
[    4.995365] NDCB1: 0x09c00000
[    4.995365] NDCB2: 0x00000000
[    4.995365] NDCB3: 0x00000000
[    5.014251] Bad eraseblock 39 at 0x0000004e0000
[    5.019025] nand: nand_do_read_oob: from = 0x00500000, len = 64
[    5.025046] marvell-nfc pxa3xx-nand: 
[    5.025046] NDCR:  0x9d079fff
[    5.025046] NDCB0: 0x000d3000
[    5.025046] NDCB1: 0x0a000000
[    5.025046] NDCB2: 0x00000000
[    5.025046] NDCB3: 0x00000000
[    5.043920] Bad eraseblock 40 at 0x000000500000
[    5.048527] nand: nand_do_read_oob: from = 0x00520000, len = 64
[    5.054704] marvell-nfc pxa3xx-nand: 
[    5.054704] NDCR:  0x9d079fff
[    5.054704] NDCB0: 0x000d3000
[    5.054704] NDCB1: 0x0a400000
[    5.054704] NDCB2: 0x00000000
[    5.054704] NDCB3: 0x00000000
[    5.073594] Bad eraseblock 41 at 0x000000520000
[    5.078207] nand: nand_do_read_oob: from = 0x00540000, len = 64
[    5.084401] marvell-nfc pxa3xx-nand: 
[    5.084401] NDCR:  0x9d079fff
[    5.084401] NDCB0: 0x000d3000
[    5.084401] NDCB1: 0x0a800000
[    5.084401] NDCB2: 0x00000000
[    5.084401] NDCB3: 0x00000000
[    5.103292] Bad eraseblock 42 at 0x000000540000
[    5.107905] nand: nand_do_read_oob: from = 0x00560000, len = 64
[    5.114083] marvell-nfc pxa3xx-nand: 
[    5.114083] NDCR:  0x9d079fff
[    5.114083] NDCB0: 0x000d3000
[    5.114083] NDCB1: 0x0ac00000
[    5.114083] NDCB2: 0x00000000
[    5.114083] NDCB3: 0x00000000
[    5.132972] Bad eraseblock 43 at 0x000000560000
[    5.137584] nand: nand_do_read_oob: from = 0x00580000, len = 64
[    5.143763] marvell-nfc pxa3xx-nand: 
[    5.143763] NDCR:  0x9d079fff
[    5.143763] NDCB0: 0x000d3000
[    5.143763] NDCB1: 0x0b000000
[    5.143763] NDCB2: 0x00000000
[    5.143763] NDCB3: 0x00000000
[    5.162648] Bad eraseblock 44 at 0x000000580000
[    5.167257] nand: nand_do_read_oob: from = 0x005a0000, len = 64
[    5.173434] marvell-nfc pxa3xx-nand: 
[    5.173434] NDCR:  0x9d079fff
[    5.173434] NDCB0: 0x000d3000
[    5.173434] NDCB1: 0x0b400000
[    5.173434] NDCB2: 0x00000000
[    5.173434] NDCB3: 0x00000000
[    5.192323] Bad eraseblock 45 at 0x0000005a0000
[    5.196934] nand: nand_do_read_oob: from = 0x005c0000, len = 64
[    5.203113] marvell-nfc pxa3xx-nand: 
[    5.203113] NDCR:  0x9d079fff
[    5.203113] NDCB0: 0x000d3000
[    5.203113] NDCB1: 0x0b800000
[    5.203113] NDCB2: 0x00000000
[    5.203113] NDCB3: 0x00000000
[    5.222004] Bad eraseblock 46 at 0x0000005c0000
[    5.226617] nand: nand_do_read_oob: from = 0x005e0000, len = 64
[    5.232793] marvell-nfc pxa3xx-nand: 
[    5.232793] NDCR:  0x9d079fff
[    5.232793] NDCB0: 0x000d3000
[    5.232793] NDCB1: 0x0bc00000
[    5.232793] NDCB2: 0x00000000
[    5.232793] NDCB3: 0x00000000
[    5.251684] Bad eraseblock 47 at 0x0000005e0000
[    5.256295] nand: nand_do_read_oob: from = 0x00600000, len = 64
[    5.262474] marvell-nfc pxa3xx-nand: 
[    5.262474] NDCR:  0x9d079fff
[    5.262474] NDCB0: 0x000d3000
[    5.262474] NDCB1: 0x0c000000
[    5.262474] NDCB2: 0x00000000
[    5.262474] NDCB3: 0x00000000
[    5.281361] Bad eraseblock 48 at 0x000000600000
[    5.285975] nand: nand_do_read_oob: from = 0x00620000, len = 64
[    5.292155] marvell-nfc pxa3xx-nand: 
[    5.292155] NDCR:  0x9d079fff
[    5.292155] NDCB0: 0x000d3000
[    5.292155] NDCB1: 0x0c400000
[    5.292155] NDCB2: 0x00000000
[    5.292155] NDCB3: 0x00000000
[    5.311043] Bad eraseblock 49 at 0x000000620000
[    5.315655] nand: nand_do_read_oob: from = 0x00640000, len = 64
[    5.321833] marvell-nfc pxa3xx-nand: 
[    5.321833] NDCR:  0x9d079fff
[    5.321833] NDCB0: 0x000d3000
[    5.321833] NDCB1: 0x0c800000
[    5.321833] NDCB2: 0x00000000
[    5.321833] NDCB3: 0x00000000
[    5.340720] Bad eraseblock 50 at 0x000000640000
[    5.345329] nand: nand_do_read_oob: from = 0x00660000, len = 64
[    5.351504] marvell-nfc pxa3xx-nand: 
[    5.351504] NDCR:  0x9d079fff
[    5.351504] NDCB0: 0x000d3000
[    5.351504] NDCB1: 0x0cc00000
[    5.351504] NDCB2: 0x00000000
[    5.351504] NDCB3: 0x00000000
[    5.370397] Bad eraseblock 51 at 0x000000660000
[    5.375006] nand: nand_do_read_oob: from = 0x00680000, len = 64
[    5.381188] marvell-nfc pxa3xx-nand: 
[    5.381188] NDCR:  0x9d079fff
[    5.381188] NDCB0: 0x000d3000
[    5.381188] NDCB1: 0x0d000000
[    5.381188] NDCB2: 0x00000000
[    5.381188] NDCB3: 0x00000000
[    5.400075] Bad eraseblock 52 at 0x000000680000
[    5.404686] nand: nand_do_read_oob: from = 0x006a0000, len = 64
[    5.410866] marvell-nfc pxa3xx-nand: 
[    5.410866] NDCR:  0x9d079fff
[    5.410866] NDCB0: 0x000d3000
[    5.410866] NDCB1: 0x0d400000
[    5.410866] NDCB2: 0x00000000
[    5.410866] NDCB3: 0x00000000
[    5.429755] Bad eraseblock 53 at 0x0000006a0000
[    5.434365] nand: nand_do_read_oob: from = 0x006c0000, len = 64
[    5.440546] marvell-nfc pxa3xx-nand: 
[    5.440546] NDCR:  0x9d079fff
[    5.440546] NDCB0: 0x000d3000
[    5.440546] NDCB1: 0x0d800000
[    5.440546] NDCB2: 0x00000000
[    5.440546] NDCB3: 0x00000000
[    5.459434] Bad eraseblock 54 at 0x0000006c0000
[    5.464046] nand: nand_do_read_oob: from = 0x006e0000, len = 64
[    5.470225] marvell-nfc pxa3xx-nand: 
[    5.470225] NDCR:  0x9d079fff
[    5.470225] NDCB0: 0x000d3000
[    5.470225] NDCB1: 0x0dc00000
[    5.470225] NDCB2: 0x00000000
[    5.470225] NDCB3: 0x00000000
[    5.489114] Bad eraseblock 55 at 0x0000006e0000
[    5.493729] nand: nand_do_read_oob: from = 0x00700000, len = 64
[    5.499905] marvell-nfc pxa3xx-nand: 
[    5.499905] NDCR:  0x9d079fff
[    5.499905] NDCB0: 0x000d3000
[    5.499905] NDCB1: 0x0e000000
[    5.499905] NDCB2: 0x00000000
[    5.499905] NDCB3: 0x00000000
[    5.518853] Bad eraseblock 56 at 0x000000700000
[    5.523471] nand: nand_do_read_oob: from = 0x00720000, len = 64
[    5.529652] marvell-nfc pxa3xx-nand: 
[    5.529652] NDCR:  0x9d079fff
[    5.529652] NDCB0: 0x000d3000
[    5.529652] NDCB1: 0x0e400000
[    5.529652] NDCB2: 0x00000000
[    5.529652] NDCB3: 0x00000000
[    5.548558] nand: nand_do_read_oob: from = 0x00740000, len = 64
[    5.554762] marvell-nfc pxa3xx-nand: 
[    5.554762] NDCR:  0x9d079fff
[    5.554762] NDCB0: 0x000d3000
[    5.554762] NDCB1: 0x0e800000
[    5.554762] NDCB2: 0x00000000
[    5.554762] NDCB3: 0x00000000
[    5.573683] nand: nand_do_read_oob: from = 0x00760000, len = 64
[    5.579883] marvell-nfc pxa3xx-nand: 
[    5.579883] NDCR:  0x9d079fff
[    5.579883] NDCB0: 0x000d3000
[    5.579883] NDCB1: 0x0ec00000
[    5.579883] NDCB2: 0x00000000
[    5.579883] NDCB3: 0x00000000
[    5.598875] nand: nand_do_read_oob: from = 0x00780000, len = 64
[    5.604907] marvell-nfc pxa3xx-nand: 
[    5.604907] NDCR:  0x9d079fff
[    5.604907] NDCB0: 0x000d3000
[    5.604907] NDCB1: 0x0f000000
[    5.604907] NDCB2: 0x00000000
[    5.604907] NDCB3: 0x00000000
[    5.623835] nand: nand_do_read_oob: from = 0x007a0000, len = 64
[    5.630035] marvell-nfc pxa3xx-nand: 
[    5.630035] NDCR:  0x9d079fff
[    5.630035] NDCB0: 0x000d3000
[    5.630035] NDCB1: 0x0f400000
[    5.630035] NDCB2: 0x00000000
[    5.630035] NDCB3: 0x00000000
[    5.648994] nand: nand_do_read_oob: from = 0x007c0000, len = 64
[    5.655020] marvell-nfc pxa3xx-nand: 
[    5.655020] NDCR:  0x9d079fff
[    5.655020] NDCB0: 0x000d3000
[    5.655020] NDCB1: 0x0f800000
[    5.655020] NDCB2: 0x00000000
[    5.655020] NDCB3: 0x00000000
[    5.673942] nand: nand_do_read_oob: from = 0x007e0000, len = 64
[    5.680140] marvell-nfc pxa3xx-nand: 
[    5.680140] NDCR:  0x9d079fff
[    5.680140] NDCB0: 0x000d3000
[    5.680140] NDCB1: 0x0fc00000
[    5.680140] NDCB2: 0x00000000
[    5.680140] NDCB3: 0x00000000
[    5.699079] nand: nand_do_read_oob: from = 0x00800000, len = 64
[    5.705111] marvell-nfc pxa3xx-nand: 
[    5.705111] NDCR:  0x9d079fff
[    5.705111] NDCB0: 0x000d3000
[    5.705111] NDCB1: 0x10000000
[    5.705111] NDCB2: 0x00000000
[    5.705111] NDCB3: 0x00000000
[    5.724036] nand: nand_do_read_oob: from = 0x00820000, len = 64
[    5.730239] marvell-nfc pxa3xx-nand: 
[    5.730239] NDCR:  0x9d079fff
[    5.730239] NDCB0: 0x000d3000
[    5.730239] NDCB1: 0x10400000
[    5.730239] NDCB2: 0x00000000
[    5.730239] NDCB3: 0x00000000
[    5.749158] nand: nand_do_read_oob: from = 0x00840000, len = 64
[    5.755191] marvell-nfc pxa3xx-nand: 
[    5.755191] NDCR:  0x9d079fff
[    5.755191] NDCB0: 0x000d3000
[    5.755191] NDCB1: 0x10800000
[    5.755191] NDCB2: 0x00000000
[    5.755191] NDCB3: 0x00000000
[    5.774114] nand: nand_do_read_oob: from = 0x00860000, len = 64
[    5.780313] marvell-nfc pxa3xx-nand: 
[    5.780313] NDCR:  0x9d079fff
[    5.780313] NDCB0: 0x000d3000
[    5.780313] NDCB1: 0x10c00000
[    5.780313] NDCB2: 0x00000000
[    5.780313] NDCB3: 0x00000000
[    5.799234] nand: nand_do_read_oob: from = 0x00880000, len = 64
[    5.805263] marvell-nfc pxa3xx-nand: 
[    5.805263] NDCR:  0x9d079fff
[    5.805263] NDCB0: 0x000d3000
[    5.805263] NDCB1: 0x11000000
[    5.805263] NDCB2: 0x00000000
[    5.805263] NDCB3: 0x00000000
[    5.824187] nand: nand_do_read_oob: from = 0x008a0000, len = 64
[    5.830385] marvell-nfc pxa3xx-nand: 
[    5.830385] NDCR:  0x9d079fff
[    5.830385] NDCB0: 0x000d3000
[    5.830385] NDCB1: 0x11400000
[    5.830385] NDCB2: 0x00000000
[    5.830385] NDCB3: 0x00000000
[    5.849304] nand: nand_do_read_oob: from = 0x008c0000, len = 64
[    5.855338] marvell-nfc pxa3xx-nand: 
[    5.855338] NDCR:  0x9d079fff
[    5.855338] NDCB0: 0x000d3000
[    5.855338] NDCB1: 0x11800000
[    5.855338] NDCB2: 0x00000000
[    5.855338] NDCB3: 0x00000000
[    5.874259] nand: nand_do_read_oob: from = 0x008e0000, len = 64
[    5.880457] marvell-nfc pxa3xx-nand: 
[    5.880457] NDCR:  0x9d079fff
[    5.880457] NDCB0: 0x000d3000
[    5.880457] NDCB1: 0x11c00000
[    5.880457] NDCB2: 0x00000000
[    5.880457] NDCB3: 0x00000000
[    5.899376] nand: nand_do_read_oob: from = 0x00900000, len = 64
[    5.905410] marvell-nfc pxa3xx-nand: 
[    5.905410] NDCR:  0x9d079fff
[    5.905410] NDCB0: 0x000d3000
[    5.905410] NDCB1: 0x12000000
[    5.905410] NDCB2: 0x00000000
[    5.905410] NDCB3: 0x00000000
[    5.924331] nand: nand_do_read_oob: from = 0x00920000, len = 64
[    5.930531] marvell-nfc pxa3xx-nand: 
[    5.930531] NDCR:  0x9d079fff
[    5.930531] NDCB0: 0x000d3000
[    5.930531] NDCB1: 0x12400000
[    5.930531] NDCB2: 0x00000000
[    5.930531] NDCB3: 0x00000000
[    5.949454] nand: nand_do_read_oob: from = 0x00940000, len = 64
[    5.955481] marvell-nfc pxa3xx-nand: 
[    5.955481] NDCR:  0x9d079fff
[    5.955481] NDCB0: 0x000d3000
[    5.955481] NDCB1: 0x12800000
[    5.955481] NDCB2: 0x00000000
[    5.955481] NDCB3: 0x00000000
[    5.974403] nand: nand_do_read_oob: from = 0x00960000, len = 64
[    5.980602] marvell-nfc pxa3xx-nand: 
[    5.980602] NDCR:  0x9d079fff
[    5.980602] NDCB0: 0x000d3000
[    5.980602] NDCB1: 0x12c00000
[    5.980602] NDCB2: 0x00000000
[    5.980602] NDCB3: 0x00000000
[    5.999523] nand: nand_do_read_oob: from = 0x00980000, len = 64
[    6.005555] marvell-nfc pxa3xx-nand: 
[    6.005555] NDCR:  0x9d079fff
[    6.005555] NDCB0: 0x000d3000
[    6.005555] NDCB1: 0x13000000
[    6.005555] NDCB2: 0x00000000
[    6.005555] NDCB3: 0x00000000
[    6.024485] nand: nand_do_read_oob: from = 0x009a0000, len = 64
[    6.030687] marvell-nfc pxa3xx-nand: 
[    6.030687] NDCR:  0x9d079fff
[    6.030687] NDCB0: 0x000d3000
[    6.030687] NDCB1: 0x13400000
[    6.030687] NDCB2: 0x00000000
[    6.030687] NDCB3: 0x00000000
[    6.049604] nand: nand_do_read_oob: from = 0x009c0000, len = 64
[    6.055636] marvell-nfc pxa3xx-nand: 
[    6.055636] NDCR:  0x9d079fff
[    6.055636] NDCB0: 0x000d3000
[    6.055636] NDCB1: 0x13800000
[    6.055636] NDCB2: 0x00000000
[    6.055636] NDCB3: 0x00000000
[    6.074560] nand: nand_do_read_oob: from = 0x009e0000, len = 64
[    6.080757] marvell-nfc pxa3xx-nand: 
[    6.080757] NDCR:  0x9d079fff
[    6.080757] NDCB0: 0x000d3000
[    6.080757] NDCB1: 0x13c00000
[    6.080757] NDCB2: 0x00000000
[    6.080757] NDCB3: 0x00000000
[    6.100387] nand: nand_do_read_oob: from = 0x00a00000, len = 64
[    6.106431] marvell-nfc pxa3xx-nand: 
[    6.106431] NDCR:  0x9d079fff
[    6.106431] NDCB0: 0x000d3000
[    6.106431] NDCB1: 0x14000000
[    6.106431] NDCB2: 0x00000000
[    6.106431] NDCB3: 0x00000000
[    6.125594] nand: nand_do_read_oob: from = 0x00a20000, len = 64
[    6.131995] marvell-nfc pxa3xx-nand: 
[    6.131995] NDCR:  0x9d079fff
[    6.131995] NDCB0: 0x000d3000
[    6.131995] NDCB1: 0x14400000
[    6.131995] NDCB2: 0x00000000
[    6.131995] NDCB3: 0x00000000
[    6.151138] nand: nand_do_read_oob: from = 0x00a40000, len = 64
[    6.157180] marvell-nfc pxa3xx-nand: 
[    6.157180] NDCR:  0x9d079fff
[    6.157180] NDCB0: 0x000d3000
[    6.157180] NDCB1: 0x14800000
[    6.157180] NDCB2: 0x00000000
[    6.157180] NDCB3: 0x00000000
[    6.176135] nand: nand_do_read_oob: from = 0x00a60000, len = 64
[    6.182335] marvell-nfc pxa3xx-nand: 
[    6.182335] NDCR:  0x9d079fff
[    6.182335] NDCB0: 0x000d3000
[    6.182335] NDCB1: 0x14c00000
[    6.182335] NDCB2: 0x00000000
[    6.182335] NDCB3: 0x00000000
[    6.201252] nand: nand_do_read_oob: from = 0x00a80000, len = 64
[    6.207284] marvell-nfc pxa3xx-nand: 
[    6.207284] NDCR:  0x9d079fff
[    6.207284] NDCB0: 0x000d3000
[    6.207284] NDCB1: 0x15000000
[    6.207284] NDCB2: 0x00000000
[    6.207284] NDCB3: 0x00000000
[    6.226208] nand: nand_do_read_oob: from = 0x00aa0000, len = 64
[    6.232417] marvell-nfc pxa3xx-nand: 
[    6.232417] NDCR:  0x9d079fff
[    6.232417] NDCB0: 0x000d3000
[    6.232417] NDCB1: 0x15400000
[    6.232417] NDCB2: 0x00000000
[    6.232417] NDCB3: 0x00000000
[    6.251343] nand: nand_do_read_oob: from = 0x00ac0000, len = 64
[    6.257374] marvell-nfc pxa3xx-nand: 
[    6.257374] NDCR:  0x9d079fff
[    6.257374] NDCB0: 0x000d3000
[    6.257374] NDCB1: 0x15800000
[    6.257374] NDCB2: 0x00000000
[    6.257374] NDCB3: 0x00000000
[    6.276297] nand: nand_do_read_oob: from = 0x00ae0000, len = 64
[    6.282505] marvell-nfc pxa3xx-nand: 
[    6.282505] NDCR:  0x9d079fff
[    6.282505] NDCB0: 0x000d3000
[    6.282505] NDCB1: 0x15c00000
[    6.282505] NDCB2: 0x00000000
[    6.282505] NDCB3: 0x00000000
[    6.301425] nand: nand_do_read_oob: from = 0x00b00000, len = 64
[    6.307456] marvell-nfc pxa3xx-nand: 
[    6.307456] NDCR:  0x9d079fff
[    6.307456] NDCB0: 0x000d3000
[    6.307456] NDCB1: 0x16000000
[    6.307456] NDCB2: 0x00000000
[    6.307456] NDCB3: 0x00000000
[    6.326378] nand: nand_do_read_oob: from = 0x00b20000, len = 64
[    6.332603] marvell-nfc pxa3xx-nand: 
[    6.332603] NDCR:  0x9d079fff
[    6.332603] NDCB0: 0x000d3000
[    6.332603] NDCB1: 0x16400000
[    6.332603] NDCB2: 0x00000000
[    6.332603] NDCB3: 0x00000000
[    6.351525] nand: nand_do_read_oob: from = 0x00b40000, len = 64
[    6.357553] marvell-nfc pxa3xx-nand: 
[    6.357553] NDCR:  0x9d079fff
[    6.357553] NDCB0: 0x000d3000
[    6.357553] NDCB1: 0x16800000
[    6.357553] NDCB2: 0x00000000
[    6.357553] NDCB3: 0x00000000
[    6.376477] nand: nand_do_read_oob: from = 0x00b60000, len = 64
[    6.382676] marvell-nfc pxa3xx-nand: 
[    6.382676] NDCR:  0x9d079fff
[    6.382676] NDCB0: 0x000d3000
[    6.382676] NDCB1: 0x16c00000
[    6.382676] NDCB2: 0x00000000
[    6.382676] NDCB3: 0x00000000
[    6.401595] nand: nand_do_read_oob: from = 0x00b80000, len = 64
[    6.407627] marvell-nfc pxa3xx-nand: 
[    6.407627] NDCR:  0x9d079fff
[    6.407627] NDCB0: 0x000d3000
[    6.407627] NDCB1: 0x17000000
[    6.407627] NDCB2: 0x00000000
[    6.407627] NDCB3: 0x00000000
[    6.426558] nand: nand_do_read_oob: from = 0x00ba0000, len = 64
[    6.432755] marvell-nfc pxa3xx-nand: 
[    6.432755] NDCR:  0x9d079fff
[    6.432755] NDCB0: 0x000d3000
[    6.432755] NDCB1: 0x17400000
[    6.432755] NDCB2: 0x00000000
[    6.432755] NDCB3: 0x00000000
[    6.451675] nand: nand_do_read_oob: from = 0x00bc0000, len = 64
[    6.457708] marvell-nfc pxa3xx-nand: 
[    6.457708] NDCR:  0x9d079fff
[    6.457708] NDCB0: 0x000d3000
[    6.457708] NDCB1: 0x17800000
[    6.457708] NDCB2: 0x00000000
[    6.457708] NDCB3: 0x00000000
[    6.476632] nand: nand_do_read_oob: from = 0x00be0000, len = 64
[    6.482837] marvell-nfc pxa3xx-nand: 
[    6.482837] NDCR:  0x9d079fff
[    6.482837] NDCB0: 0x000d3000
[    6.482837] NDCB1: 0x17c00000
[    6.482837] NDCB2: 0x00000000
[    6.482837] NDCB3: 0x00000000
[    6.501760] nand: nand_do_read_oob: from = 0x00c00000, len = 64
[    6.507789] marvell-nfc pxa3xx-nand: 
[    6.507789] NDCR:  0x9d079fff
[    6.507789] NDCB0: 0x000d3000
[    6.507789] NDCB1: 0x18000000
[    6.507789] NDCB2: 0x00000000
[    6.507789] NDCB3: 0x00000000
[    6.526712] nand: nand_do_read_oob: from = 0x00c20000, len = 64
[    6.532916] marvell-nfc pxa3xx-nand: 
[    6.532916] NDCR:  0x9d079fff
[    6.532916] NDCB0: 0x000d3000
[    6.532916] NDCB1: 0x18400000
[    6.532916] NDCB2: 0x00000000
[    6.532916] NDCB3: 0x00000000
[    6.551839] nand: nand_do_read_oob: from = 0x00c40000, len = 64
[    6.557871] marvell-nfc pxa3xx-nand: 
[    6.557871] NDCR:  0x9d079fff
[    6.557871] NDCB0: 0x000d3000
[    6.557871] NDCB1: 0x18800000
[    6.557871] NDCB2: 0x00000000
[    6.557871] NDCB3: 0x00000000
[    6.576801] nand: nand_do_read_oob: from = 0x00c60000, len = 64
[    6.583001] marvell-nfc pxa3xx-nand: 
[    6.583001] NDCR:  0x9d079fff
[    6.583001] NDCB0: 0x000d3000
[    6.583001] NDCB1: 0x18c00000
[    6.583001] NDCB2: 0x00000000
[    6.583001] NDCB3: 0x00000000
[    6.601918] nand: nand_do_read_oob: from = 0x00c80000, len = 64
[    6.607951] marvell-nfc pxa3xx-nand: 
[    6.607951] NDCR:  0x9d079fff
[    6.607951] NDCB0: 0x000d3000
[    6.607951] NDCB1: 0x19000000
[    6.607951] NDCB2: 0x00000000
[    6.607951] NDCB3: 0x00000000
[    6.626875] nand: nand_do_read_oob: from = 0x00ca0000, len = 64
[    6.633083] marvell-nfc pxa3xx-nand: 
[    6.633083] NDCR:  0x9d079fff
[    6.633083] NDCB0: 0x000d3000
[    6.633083] NDCB1: 0x19400000
[    6.633083] NDCB2: 0x00000000
[    6.633083] NDCB3: 0x00000000
[    6.652000] nand: nand_do_read_oob: from = 0x00cc0000, len = 64
[    6.658032] marvell-nfc pxa3xx-nand: 
[    6.658032] NDCR:  0x9d079fff
[    6.658032] NDCB0: 0x000d3000
[    6.658032] NDCB1: 0x19800000
[    6.658032] NDCB2: 0x00000000
[    6.658032] NDCB3: 0x00000000
[    6.676957] nand: nand_do_read_oob: from = 0x00ce0000, len = 64
[    6.683154] marvell-nfc pxa3xx-nand: 
[    6.683154] NDCR:  0x9d079fff
[    6.683154] NDCB0: 0x000d3000
[    6.683154] NDCB1: 0x19c00000
[    6.683154] NDCB2: 0x00000000
[    6.683154] NDCB3: 0x00000000
[    6.702072] nand: nand_do_read_oob: from = 0x00d00000, len = 64
[    6.708106] marvell-nfc pxa3xx-nand: 
[    6.708106] NDCR:  0x9d079fff
[    6.708106] NDCB0: 0x000d3000
[    6.708106] NDCB1: 0x1a000000
[    6.708106] NDCB2: 0x00000000
[    6.708106] NDCB3: 0x00000000
[    6.727028] nand: nand_do_read_oob: from = 0x00d20000, len = 64
[    6.733227] marvell-nfc pxa3xx-nand: 
[    6.733227] NDCR:  0x9d079fff
[    6.733227] NDCB0: 0x000d3000
[    6.733227] NDCB1: 0x1a400000
[    6.733227] NDCB2: 0x00000000
[    6.733227] NDCB3: 0x00000000
[    6.752146] nand: nand_do_read_oob: from = 0x00d40000, len = 64
[    6.758177] marvell-nfc pxa3xx-nand: 
[    6.758177] NDCR:  0x9d079fff
[    6.758177] NDCB0: 0x000d3000
[    6.758177] NDCB1: 0x1a800000
[    6.758177] NDCB2: 0x00000000
[    6.758177] NDCB3: 0x00000000
[    6.777073] Bad eraseblock 106 at 0x000000d40000
[    6.781928] nand: nand_do_read_oob: from = 0x00d60000, len = 64
[    6.787951] marvell-nfc pxa3xx-nand: 
[    6.787951] NDCR:  0x9d079fff
[    6.787951] NDCB0: 0x000d3000
[    6.787951] NDCB1: 0x1ac00000
[    6.787951] NDCB2: 0x00000000
[    6.787951] NDCB3: 0x00000000
[    6.806828] Bad eraseblock 107 at 0x000000d60000
[    6.811686] nand: nand_do_read_oob: from = 0x00d80000, len = 64
[    6.817711] marvell-nfc pxa3xx-nand: 
[    6.817711] NDCR:  0x9d079fff
[    6.817711] NDCB0: 0x000d3000
[    6.817711] NDCB1: 0x1b000000
[    6.817711] NDCB2: 0x00000000
[    6.817711] NDCB3: 0x00000000
[    6.836594] Bad eraseblock 108 at 0x000000d80000
[    6.841444] nand: nand_do_read_oob: from = 0x00da0000, len = 64
[    6.847469] marvell-nfc pxa3xx-nand: 
[    6.847469] NDCR:  0x9d079fff
[    6.847469] NDCB0: 0x000d3000
[    6.847469] NDCB1: 0x1b400000
[    6.847469] NDCB2: 0x00000000
[    6.847469] NDCB3: 0x00000000
[    6.866351] Bad eraseblock 109 at 0x000000da0000
[    6.871211] nand: nand_do_read_oob: from = 0x00dc0000, len = 64
[    6.877233] marvell-nfc pxa3xx-nand: 
[    6.877233] NDCR:  0x9d079fff
[    6.877233] NDCB0: 0x000d3000
[    6.877233] NDCB1: 0x1b800000
[    6.877233] NDCB2: 0x00000000
[    6.877233] NDCB3: 0x00000000
[    6.896109] Bad eraseblock 110 at 0x000000dc0000
[    6.900958] nand: nand_do_read_oob: from = 0x00de0000, len = 64
[    6.906983] marvell-nfc pxa3xx-nand: 
[    6.906983] NDCR:  0x9d079fff
[    6.906983] NDCB0: 0x000d3000
[    6.906983] NDCB1: 0x1bc00000
[    6.906983] NDCB2: 0x00000000
[    6.906983] NDCB3: 0x00000000
[    6.925856] Bad eraseblock 111 at 0x000000de0000
[    6.930708] nand: nand_do_read_oob: from = 0x00e00000, len = 64
[    6.936732] marvell-nfc pxa3xx-nand: 
[    6.936732] NDCR:  0x9d079fff
[    6.936732] NDCB0: 0x000d3000
[    6.936732] NDCB1: 0x1c000000
[    6.936732] NDCB2: 0x00000000
[    6.936732] NDCB3: 0x00000000
[    6.955620] Bad eraseblock 112 at 0x000000e00000
[    6.960474] nand: nand_do_read_oob: from = 0x00e20000, len = 64
[    6.966498] marvell-nfc pxa3xx-nand: 
[    6.966498] NDCR:  0x9d079fff
[    6.966498] NDCB0: 0x000d3000
[    6.966498] NDCB1: 0x1c400000
[    6.966498] NDCB2: 0x00000000
[    6.966498] NDCB3: 0x00000000
[    6.985403] Bad eraseblock 113 at 0x000000e20000
[    6.990259] nand: nand_do_read_oob: from = 0x00e40000, len = 64
[    6.996282] marvell-nfc pxa3xx-nand: 
[    6.996282] NDCR:  0x9d079fff
[    6.996282] NDCB0: 0x000d3000
[    6.996282] NDCB1: 0x1c800000
[    6.996282] NDCB2: 0x00000000
[    6.996282] NDCB3: 0x00000000
[    7.015181] Bad eraseblock 114 at 0x000000e40000
[    7.020031] nand: nand_do_read_oob: from = 0x00e60000, len = 64
[    7.026057] marvell-nfc pxa3xx-nand: 
[    7.026057] NDCR:  0x9d079fff
[    7.026057] NDCB0: 0x000d3000
[    7.026057] NDCB1: 0x1cc00000
[    7.026057] NDCB2: 0x00000000
[    7.026057] NDCB3: 0x00000000
[    7.044942] Bad eraseblock 115 at 0x000000e60000
[    7.049799] nand: nand_do_read_oob: from = 0x00e80000, len = 64
[    7.055822] marvell-nfc pxa3xx-nand: 
[    7.055822] NDCR:  0x9d079fff
[    7.055822] NDCB0: 0x000d3000
[    7.055822] NDCB1: 0x1d000000
[    7.055822] NDCB2: 0x00000000
[    7.055822] NDCB3: 0x00000000
[    7.074706] Bad eraseblock 116 at 0x000000e80000
[    7.079564] nand: nand_do_read_oob: from = 0x00ea0000, len = 64
[    7.085588] marvell-nfc pxa3xx-nand: 
[    7.085588] NDCR:  0x9d079fff
[    7.085588] NDCB0: 0x000d3000
[    7.085588] NDCB1: 0x1d400000
[    7.085588] NDCB2: 0x00000000
[    7.085588] NDCB3: 0x00000000
[    7.104464] Bad eraseblock 117 at 0x000000ea0000
[    7.109323] nand: nand_do_read_oob: from = 0x00ec0000, len = 64
[    7.115347] marvell-nfc pxa3xx-nand: 
[    7.115347] NDCR:  0x9d079fff
[    7.115347] NDCB0: 0x000d3000
[    7.115347] NDCB1: 0x1d800000
[    7.115347] NDCB2: 0x00000000
[    7.115347] NDCB3: 0x00000000
[    7.134230] Bad eraseblock 118 at 0x000000ec0000
[    7.139089] nand: nand_do_read_oob: from = 0x00ee0000, len = 64
[    7.145111] marvell-nfc pxa3xx-nand: 
[    7.145111] NDCR:  0x9d079fff
[    7.145111] NDCB0: 0x000d3000
[    7.145111] NDCB1: 0x1dc00000
[    7.145111] NDCB2: 0x00000000
[    7.145111] NDCB3: 0x00000000
[    7.163986] Bad eraseblock 119 at 0x000000ee0000
[    7.168847] nand: nand_do_read_oob: from = 0x00f00000, len = 64
[    7.174868] marvell-nfc pxa3xx-nand: 
[    7.174868] NDCR:  0x9d079fff
[    7.174868] NDCB0: 0x000d3000
[    7.174868] NDCB1: 0x1e000000
[    7.174868] NDCB2: 0x00000000
[    7.174868] NDCB3: 0x00000000
[    7.193745] Bad eraseblock 120 at 0x000000f00000
[    7.198446] nand: nand_do_read_oob: from = 0x00f20000, len = 64
[    7.204625] marvell-nfc pxa3xx-nand: 
[    7.204625] NDCR:  0x9d079fff
[    7.204625] NDCB0: 0x000d3000
[    7.204625] NDCB1: 0x1e400000
[    7.204625] NDCB2: 0x00000000
[    7.204625] NDCB3: 0x00000000
[    7.223514] Bad eraseblock 121 at 0x000000f20000
[    7.228211] nand: nand_do_read_oob: from = 0x00f40000, len = 64
[    7.234388] marvell-nfc pxa3xx-nand: 
[    7.234388] NDCR:  0x9d079fff
[    7.234388] NDCB0: 0x000d3000
[    7.234388] NDCB1: 0x1e800000
[    7.234388] NDCB2: 0x00000000
[    7.234388] NDCB3: 0x00000000
[    7.253281] Bad eraseblock 122 at 0x000000f40000
[    7.257975] nand: nand_do_read_oob: from = 0x00f60000, len = 64
[    7.264156] marvell-nfc pxa3xx-nand: 
[    7.264156] NDCR:  0x9d079fff
[    7.264156] NDCB0: 0x000d3000
[    7.264156] NDCB1: 0x1ec00000
[    7.264156] NDCB2: 0x00000000
[    7.264156] NDCB3: 0x00000000
[    7.283045] Bad eraseblock 123 at 0x000000f60000
[    7.287743] nand: nand_do_read_oob: from = 0x00f80000, len = 64
[    7.293923] marvell-nfc pxa3xx-nand: 
[    7.293923] NDCR:  0x9d079fff
[    7.293923] NDCB0: 0x000d3000
[    7.293923] NDCB1: 0x1f000000
[    7.293923] NDCB2: 0x00000000
[    7.293923] NDCB3: 0x00000000
[    7.312812] Bad eraseblock 124 at 0x000000f80000
[    7.317510] nand: nand_do_read_oob: from = 0x00fa0000, len = 64
[    7.323688] marvell-nfc pxa3xx-nand: 
[    7.323688] NDCR:  0x9d079fff
[    7.323688] NDCB0: 0x000d3000
[    7.323688] NDCB1: 0x1f400000
[    7.323688] NDCB2: 0x00000000
[    7.323688] NDCB3: 0x00000000
[    7.342578] Bad eraseblock 125 at 0x000000fa0000
[    7.347274] nand: nand_do_read_oob: from = 0x00fc0000, len = 64
[    7.353455] marvell-nfc pxa3xx-nand: 
[    7.353455] NDCR:  0x9d079fff
[    7.353455] NDCB0: 0x000d3000
[    7.353455] NDCB1: 0x1f800000
[    7.353455] NDCB2: 0x00000000
[    7.353455] NDCB3: 0x00000000
[    7.372344] Bad eraseblock 126 at 0x000000fc0000
[    7.377042] nand: nand_do_read_oob: from = 0x00fe0000, len = 64
[    7.383218] marvell-nfc pxa3xx-nand: 
[    7.383218] NDCR:  0x9d079fff
[    7.383218] NDCB0: 0x000d3000
[    7.383218] NDCB1: 0x1fc00000
[    7.383218] NDCB2: 0x00000000
[    7.383218] NDCB3: 0x00000000
[    7.402110] Bad eraseblock 127 at 0x000000fe0000
[    7.406807] nand: nand_do_read_oob: from = 0x01000000, len = 64
[    7.412988] marvell-nfc pxa3xx-nand: 
[    7.412988] NDCR:  0x9d079fff
[    7.412988] NDCB0: 0x000d3000
[    7.412988] NDCB1: 0x20000000
[    7.412988] NDCB2: 0x00000000
[    7.412988] NDCB3: 0x00000000
[    7.431878] Bad eraseblock 128 at 0x000001000000
[    7.436572] nand: nand_do_read_oob: from = 0x01020000, len = 64
[    7.442752] marvell-nfc pxa3xx-nand: 
[    7.442752] NDCR:  0x9d079fff
[    7.442752] NDCB0: 0x000d3000
[    7.442752] NDCB1: 0x20400000
[    7.442752] NDCB2: 0x00000000
[    7.442752] NDCB3: 0x00000000
[    7.461643] Bad eraseblock 129 at 0x000001020000
[    7.466341] nand: nand_do_read_oob: from = 0x01040000, len = 64
[    7.472520] marvell-nfc pxa3xx-nand: 
[    7.472520] NDCR:  0x9d079fff
[    7.472520] NDCB0: 0x000d3000
[    7.472520] NDCB1: 0x20800000
[    7.472520] NDCB2: 0x00000000
[    7.472520] NDCB3: 0x00000000
[    7.491406] Bad eraseblock 130 at 0x000001040000
[    7.496107] nand: nand_do_read_oob: from = 0x01060000, len = 64
[    7.502284] marvell-nfc pxa3xx-nand: 
[    7.502284] NDCR:  0x9d079fff
[    7.502284] NDCB0: 0x000d3000
[    7.502284] NDCB1: 0x20c00000
[    7.502284] NDCB2: 0x00000000
[    7.502284] NDCB3: 0x00000000
[    7.521175] Bad eraseblock 131 at 0x000001060000
[    7.525873] nand: nand_do_read_oob: from = 0x01080000, len = 64
[    7.532049] marvell-nfc pxa3xx-nand: 
[    7.532049] NDCR:  0x9d079fff
[    7.532049] NDCB0: 0x000d3000
[    7.532049] NDCB1: 0x21000000
[    7.532049] NDCB2: 0x00000000
[    7.532049] NDCB3: 0x00000000
[    7.550940] Bad eraseblock 132 at 0x000001080000
[    7.555640] nand: nand_do_read_oob: from = 0x010a0000, len = 64
[    7.561815] marvell-nfc pxa3xx-nand: 
[    7.561815] NDCR:  0x9d079fff
[    7.561815] NDCB0: 0x000d3000
[    7.561815] NDCB1: 0x21400000
[    7.561815] NDCB2: 0x00000000
[    7.561815] NDCB3: 0x00000000
[    7.580710] Bad eraseblock 133 at 0x0000010a0000
[    7.585404] nand: nand_do_read_oob: from = 0x010c0000, len = 64
[    7.591583] marvell-nfc pxa3xx-nand: 
[    7.591583] NDCR:  0x9d079fff
[    7.591583] NDCB0: 0x000d3000
[    7.591583] NDCB1: 0x21800000
[    7.591583] NDCB2: 0x00000000
[    7.591583] NDCB3: 0x00000000
[    7.610492] Bad eraseblock 134 at 0x0000010c0000
[    7.615187] nand: nand_do_read_oob: from = 0x010e0000, len = 64
[    7.621369] marvell-nfc pxa3xx-nand: 
[    7.621369] NDCR:  0x9d079fff
[    7.621369] NDCB0: 0x000d3000
[    7.621369] NDCB1: 0x21c00000
[    7.621369] NDCB2: 0x00000000
[    7.621369] NDCB3: 0x00000000
[    7.640258] Bad eraseblock 135 at 0x0000010e0000
[    7.644954] nand: nand_do_read_oob: from = 0x01100000, len = 64
[    7.651134] marvell-nfc pxa3xx-nand: 
[    7.651134] NDCR:  0x9d079fff
[    7.651134] NDCB0: 0x000d3000
[    7.651134] NDCB1: 0x22000000
[    7.651134] NDCB2: 0x00000000
[    7.651134] NDCB3: 0x00000000
[    7.670024] Bad eraseblock 136 at 0x000001100000
[    7.674721] nand: nand_do_read_oob: from = 0x01120000, len = 64
[    7.680897] marvell-nfc pxa3xx-nand: 
[    7.680897] NDCR:  0x9d079fff
[    7.680897] NDCB0: 0x000d3000
[    7.680897] NDCB1: 0x22400000
[    7.680897] NDCB2: 0x00000000
[    7.680897] NDCB3: 0x00000000
[    7.699789] Bad eraseblock 137 at 0x000001120000
[    7.704485] nand: nand_do_read_oob: from = 0x01140000, len = 64
[    7.710665] marvell-nfc pxa3xx-nand: 
[    7.710665] NDCR:  0x9d079fff
[    7.710665] NDCB0: 0x000d3000
[    7.710665] NDCB1: 0x22800000
[    7.710665] NDCB2: 0x00000000
[    7.710665] NDCB3: 0x00000000
[    7.729559] Bad eraseblock 138 at 0x000001140000
[    7.734253] nand: nand_do_read_oob: from = 0x01160000, len = 64
[    7.740432] marvell-nfc pxa3xx-nand: 
[    7.740432] NDCR:  0x9d079fff
[    7.740432] NDCB0: 0x000d3000
[    7.740432] NDCB1: 0x22c00000
[    7.740432] NDCB2: 0x00000000
[    7.740432] NDCB3: 0x00000000
[    7.759321] Bad eraseblock 139 at 0x000001160000
[    7.764019] nand: nand_do_read_oob: from = 0x01180000, len = 64
[    7.770198] marvell-nfc pxa3xx-nand: 
[    7.770198] NDCR:  0x9d079fff
[    7.770198] NDCB0: 0x000d3000
[    7.770198] NDCB1: 0x23000000
[    7.770198] NDCB2: 0x00000000
[    7.770198] NDCB3: 0x00000000
[    7.789086] Bad eraseblock 140 at 0x000001180000
[    7.793786] nand: nand_do_read_oob: from = 0x011a0000, len = 64
[    7.799963] marvell-nfc pxa3xx-nand: 
[    7.799963] NDCR:  0x9d079fff
[    7.799963] NDCB0: 0x000d3000
[    7.799963] NDCB1: 0x23400000
[    7.799963] NDCB2: 0x00000000
[    7.799963] NDCB3: 0x00000000
[    7.818901] nand: nand_do_read_oob: from = 0x011c0000, len = 64
[    7.824937] marvell-nfc pxa3xx-nand: 
[    7.824937] NDCR:  0x9d079fff
[    7.824937] NDCB0: 0x000d3000
[    7.824937] NDCB1: 0x23800000
[    7.824937] NDCB2: 0x00000000
[    7.824937] NDCB3: 0x00000000
[    7.843870] nand: nand_do_read_oob: from = 0x011e0000, len = 64
[    7.850073] marvell-nfc pxa3xx-nand: 
[    7.850073] NDCR:  0x9d079fff
[    7.850073] NDCB0: 0x000d3000
[    7.850073] NDCB1: 0x23c00000
[    7.850073] NDCB2: 0x00000000
[    7.850073] NDCB3: 0x00000000
[    7.869032] nand: nand_do_read_oob: from = 0x01200000, len = 64
[    7.875058] marvell-nfc pxa3xx-nand: 
[    7.875058] NDCR:  0x9d079fff
[    7.875058] NDCB0: 0x000d3000
[    7.875058] NDCB1: 0x24000000
[    7.875058] NDCB2: 0x00000000
[    7.875058] NDCB3: 0x00000000
[    7.893983] nand: nand_do_read_oob: from = 0x01220000, len = 64
[    7.900179] marvell-nfc pxa3xx-nand: 
[    7.900179] NDCR:  0x9d079fff
[    7.900179] NDCB0: 0x000d3000
[    7.900179] NDCB1: 0x24400000
[    7.900179] NDCB2: 0x00000000
[    7.900179] NDCB3: 0x00000000
[    7.919100] nand: nand_do_read_oob: from = 0x01240000, len = 64
[    7.925130] marvell-nfc pxa3xx-nand: 
[    7.925130] NDCR:  0x9d079fff
[    7.925130] NDCB0: 0x000d3000
[    7.925130] NDCB1: 0x24800000
[    7.925130] NDCB2: 0x00000000
[    7.925130] NDCB3: 0x00000000
[    7.944059] nand: nand_do_read_oob: from = 0x01260000, len = 64
[    7.950261] marvell-nfc pxa3xx-nand: 
[    7.950261] NDCR:  0x9d079fff
[    7.950261] NDCB0: 0x000d3000
[    7.950261] NDCB1: 0x24c00000
[    7.950261] NDCB2: 0x00000000
[    7.950261] NDCB3: 0x00000000
[    7.969181] nand: nand_do_read_oob: from = 0x01280000, len = 64
[    7.975214] marvell-nfc pxa3xx-nand: 
[    7.975214] NDCR:  0x9d079fff
[    7.975214] NDCB0: 0x000d3000
[    7.975214] NDCB1: 0x25000000
[    7.975214] NDCB2: 0x00000000
[    7.975214] NDCB3: 0x00000000
[    7.994144] nand: nand_do_read_oob: from = 0x012a0000, len = 64
[    8.000341] marvell-nfc pxa3xx-nand: 
[    8.000341] NDCR:  0x9d079fff
[    8.000341] NDCB0: 0x000d3000
[    8.000341] NDCB1: 0x25400000
[    8.000341] NDCB2: 0x00000000
[    8.000341] NDCB3: 0x00000000
[    8.019272] nand: nand_do_read_oob: from = 0x012c0000, len = 64
[    8.025304] marvell-nfc pxa3xx-nand: 
[    8.025304] NDCR:  0x9d079fff
[    8.025304] NDCB0: 0x000d3000
[    8.025304] NDCB1: 0x25800000
[    8.025304] NDCB2: 0x00000000
[    8.025304] NDCB3: 0x00000000
[    8.044235] nand: nand_do_read_oob: from = 0x012e0000, len = 64
[    8.050440] marvell-nfc pxa3xx-nand: 
[    8.050440] NDCR:  0x9d079fff
[    8.050440] NDCB0: 0x000d3000
[    8.050440] NDCB1: 0x25c00000
[    8.050440] NDCB2: 0x00000000
[    8.050440] NDCB3: 0x00000000
[    8.069360] nand: nand_do_read_oob: from = 0x01300000, len = 64
[    8.075391] marvell-nfc pxa3xx-nand: 
[    8.075391] NDCR:  0x9d079fff
[    8.075391] NDCB0: 0x000d3000
[    8.075391] NDCB1: 0x26000000
[    8.075391] NDCB2: 0x00000000
[    8.075391] NDCB3: 0x00000000
[    8.094921] nand: nand_do_read_oob: from = 0x01320000, len = 64
[    8.101167] marvell-nfc pxa3xx-nand: 
[    8.101167] NDCR:  0x9d079fff
[    8.101167] NDCB0: 0x000d3000
[    8.101167] NDCB1: 0x26400000
[    8.101167] NDCB2: 0x00000000
[    8.101167] NDCB3: 0x00000000
[    8.120098] nand: nand_do_read_oob: from = 0x01340000, len = 64
[    8.126128] marvell-nfc pxa3xx-nand: 
[    8.126128] NDCR:  0x9d079fff
[    8.126128] NDCB0: 0x000d3000
[    8.126128] NDCB1: 0x26800000
[    8.126128] NDCB2: 0x00000000
[    8.126128] NDCB3: 0x00000000
[    8.145054] nand: nand_do_read_oob: from = 0x01360000, len = 64
[    8.151260] marvell-nfc pxa3xx-nand: 
[    8.151260] NDCR:  0x9d079fff
[    8.151260] NDCB0: 0x000d3000
[    8.151260] NDCB1: 0x26c00000
[    8.151260] NDCB2: 0x00000000
[    8.151260] NDCB3: 0x00000000
[    8.170181] nand: nand_do_read_oob: from = 0x01380000, len = 64
[    8.176210] marvell-nfc pxa3xx-nand: 
[    8.176210] NDCR:  0x9d079fff
[    8.176210] NDCB0: 0x000d3000
[    8.176210] NDCB1: 0x27000000
[    8.176210] NDCB2: 0x00000000
[    8.176210] NDCB3: 0x00000000
[    8.195135] nand: nand_do_read_oob: from = 0x013a0000, len = 64
[    8.201338] marvell-nfc pxa3xx-nand: 
[    8.201338] NDCR:  0x9d079fff
[    8.201338] NDCB0: 0x000d3000
[    8.201338] NDCB1: 0x27400000
[    8.201338] NDCB2: 0x00000000
[    8.201338] NDCB3: 0x00000000
[    8.220259] nand: nand_do_read_oob: from = 0x013c0000, len = 64
[    8.226290] marvell-nfc pxa3xx-nand: 
[    8.226290] NDCR:  0x9d079fff
[    8.226290] NDCB0: 0x000d3000
[    8.226290] NDCB1: 0x27800000
[    8.226290] NDCB2: 0x00000000
[    8.226290] NDCB3: 0x00000000
[    8.245237] nand: nand_do_read_oob: from = 0x013e0000, len = 64
[    8.251438] marvell-nfc pxa3xx-nand: 
[    8.251438] NDCR:  0x9d079fff
[    8.251438] NDCB0: 0x000d3000
[    8.251438] NDCB1: 0x27c00000
[    8.251438] NDCB2: 0x00000000
[    8.251438] NDCB3: 0x00000000
[    8.270359] nand: nand_do_read_oob: from = 0x01400000, len = 64
[    8.276388] marvell-nfc pxa3xx-nand: 
[    8.276388] NDCR:  0x9d079fff
[    8.276388] NDCB0: 0x000d3000
[    8.276388] NDCB1: 0x28000000
[    8.276388] NDCB2: 0x00000000
[    8.276388] NDCB3: 0x00000000
[    8.295315] nand: nand_do_read_oob: from = 0x01420000, len = 64
[    8.301520] marvell-nfc pxa3xx-nand: 
[    8.301520] NDCR:  0x9d079fff
[    8.301520] NDCB0: 0x000d3000
[    8.301520] NDCB1: 0x28400000
[    8.301520] NDCB2: 0x00000000
[    8.301520] NDCB3: 0x00000000
[    8.320439] nand: nand_do_read_oob: from = 0x01440000, len = 64
[    8.326470] marvell-nfc pxa3xx-nand: 
[    8.326470] NDCR:  0x9d079fff
[    8.326470] NDCB0: 0x000d3000
[    8.326470] NDCB1: 0x28800000
[    8.326470] NDCB2: 0x00000000
[    8.326470] NDCB3: 0x00000000
[    8.345396] nand: nand_do_read_oob: from = 0x01460000, len = 64
[    8.351599] marvell-nfc pxa3xx-nand: 
[    8.351599] NDCR:  0x9d079fff
[    8.351599] NDCB0: 0x000d3000
[    8.351599] NDCB1: 0x28c00000
[    8.351599] NDCB2: 0x00000000
[    8.351599] NDCB3: 0x00000000
[    8.370521] nand: nand_do_read_oob: from = 0x01480000, len = 64
[    8.376552] marvell-nfc pxa3xx-nand: 
[    8.376552] NDCR:  0x9d079fff
[    8.376552] NDCB0: 0x000d3000
[    8.376552] NDCB1: 0x29000000
[    8.376552] NDCB2: 0x00000000
[    8.376552] NDCB3: 0x00000000
[    8.395475] nand: nand_do_read_oob: from = 0x014a0000, len = 64
[    8.401671] marvell-nfc pxa3xx-nand: 
[    8.401671] NDCR:  0x9d079fff
[    8.401671] NDCB0: 0x000d3000
[    8.401671] NDCB1: 0x29400000
[    8.401671] NDCB2: 0x00000000
[    8.401671] NDCB3: 0x00000000
[    8.420591] nand: nand_do_read_oob: from = 0x014c0000, len = 64
[    8.426625] marvell-nfc pxa3xx-nand: 
[    8.426625] NDCR:  0x9d079fff
[    8.426625] NDCB0: 0x000d3000
[    8.426625] NDCB1: 0x29800000
[    8.426625] NDCB2: 0x00000000
[    8.426625] NDCB3: 0x00000000
[    8.445558] nand: nand_do_read_oob: from = 0x014e0000, len = 64
[    8.451760] marvell-nfc pxa3xx-nand: 
[    8.451760] NDCR:  0x9d079fff
[    8.451760] NDCB0: 0x000d3000
[    8.451760] NDCB1: 0x29c00000
[    8.451760] NDCB2: 0x00000000
[    8.451760] NDCB3: 0x00000000
[    8.470686] nand: nand_do_read_oob: from = 0x01500000, len = 64
[    8.476715] marvell-nfc pxa3xx-nand: 
[    8.476715] NDCR:  0x9d079fff
[    8.476715] NDCB0: 0x000d3000
[    8.476715] NDCB1: 0x2a000000
[    8.476715] NDCB2: 0x00000000
[    8.476715] NDCB3: 0x00000000
[    8.495649] nand: nand_do_read_oob: from = 0x01520000, len = 64
[    8.501852] marvell-nfc pxa3xx-nand: 
[    8.501852] NDCR:  0x9d079fff
[    8.501852] NDCB0: 0x000d3000
[    8.501852] NDCB1: 0x2a400000
[    8.501852] NDCB2: 0x00000000
[    8.501852] NDCB3: 0x00000000
[    8.520778] nand: nand_do_read_oob: from = 0x01540000, len = 64
[    8.526815] marvell-nfc pxa3xx-nand: 
[    8.526815] NDCR:  0x9d079fff
[    8.526815] NDCB0: 0x000d3000
[    8.526815] NDCB1: 0x2a800000
[    8.526815] NDCB2: 0x00000000
[    8.526815] NDCB3: 0x00000000
[    8.545750] nand: nand_do_read_oob: from = 0x01560000, len = 64
[    8.551951] marvell-nfc pxa3xx-nand: 
[    8.551951] NDCR:  0x9d079fff
[    8.551951] NDCB0: 0x000d3000
[    8.551951] NDCB1: 0x2ac00000
[    8.551951] NDCB2: 0x00000000
[    8.551951] NDCB3: 0x00000000
[    8.570873] nand: nand_do_read_oob: from = 0x01580000, len = 64
[    8.576904] marvell-nfc pxa3xx-nand: 
[    8.576904] NDCR:  0x9d079fff
[    8.576904] NDCB0: 0x000d3000
[    8.576904] NDCB1: 0x2b000000
[    8.576904] NDCB2: 0x00000000
[    8.576904] NDCB3: 0x00000000
[    8.595838] nand: nand_do_read_oob: from = 0x015a0000, len = 64
[    8.602043] marvell-nfc pxa3xx-nand: 
[    8.602043] NDCR:  0x9d079fff
[    8.602043] NDCB0: 0x000d3000
[    8.602043] NDCB1: 0x2b400000
[    8.602043] NDCB2: 0x00000000
[    8.602043] NDCB3: 0x00000000
[    8.620971] nand: nand_do_read_oob: from = 0x015c0000, len = 64
[    8.627001] marvell-nfc pxa3xx-nand: 
[    8.627001] NDCR:  0x9d079fff
[    8.627001] NDCB0: 0x000d3000
[    8.627001] NDCB1: 0x2b800000
[    8.627001] NDCB2: 0x00000000
[    8.627001] NDCB3: 0x00000000
[    8.645925] nand: nand_do_read_oob: from = 0x015e0000, len = 64
[    8.652130] marvell-nfc pxa3xx-nand: 
[    8.652130] NDCR:  0x9d079fff
[    8.652130] NDCB0: 0x000d3000
[    8.652130] NDCB1: 0x2bc00000
[    8.652130] NDCB2: 0x00000000
[    8.652130] NDCB3: 0x00000000
[    8.671050] nand: nand_do_read_oob: from = 0x01600000, len = 64
[    8.677083] marvell-nfc pxa3xx-nand: 
[    8.677083] NDCR:  0x9d079fff
[    8.677083] NDCB0: 0x000d3000
[    8.677083] NDCB1: 0x2c000000
[    8.677083] NDCB2: 0x00000000
[    8.677083] NDCB3: 0x00000000
[    8.696005] nand: nand_do_read_oob: from = 0x01620000, len = 64
[    8.702203] marvell-nfc pxa3xx-nand: 
[    8.702203] NDCR:  0x9d079fff
[    8.702203] NDCB0: 0x000d3000
[    8.702203] NDCB1: 0x2c400000
[    8.702203] NDCB2: 0x00000000
[    8.702203] NDCB3: 0x00000000
[    8.721125] nand: nand_do_read_oob: from = 0x01640000, len = 64
[    8.727154] marvell-nfc pxa3xx-nand: 
[    8.727154] NDCR:  0x9d079fff
[    8.727154] NDCB0: 0x000d3000
[    8.727154] NDCB1: 0x2c800000
[    8.727154] NDCB2: 0x00000000
[    8.727154] NDCB3: 0x00000000
[    8.746081] nand: nand_do_read_oob: from = 0x01660000, len = 64
[    8.752284] marvell-nfc pxa3xx-nand: 
[    8.752284] NDCR:  0x9d079fff
[    8.752284] NDCB0: 0x000d3000
[    8.752284] NDCB1: 0x2cc00000
[    8.752284] NDCB2: 0x00000000
[    8.752284] NDCB3: 0x00000000
[    8.771175] Bad eraseblock 179 at 0x000001660000
[    8.775871] nand: nand_do_read_oob: from = 0x01680000, len = 64
[    8.782048] marvell-nfc pxa3xx-nand: 
[    8.782048] NDCR:  0x9d079fff
[    8.782048] NDCB0: 0x000d3000
[    8.782048] NDCB1: 0x2d000000
[    8.782048] NDCB2: 0x00000000
[    8.782048] NDCB3: 0x00000000
[    8.800940] Bad eraseblock 180 at 0x000001680000
[    8.805635] nand: nand_do_read_oob: from = 0x016a0000, len = 64
[    8.811815] marvell-nfc pxa3xx-nand: 
[    8.811815] NDCR:  0x9d079fff
[    8.811815] NDCB0: 0x000d3000
[    8.811815] NDCB1: 0x2d400000
[    8.811815] NDCB2: 0x00000000
[    8.811815] NDCB3: 0x00000000
[    8.830704] Bad eraseblock 181 at 0x0000016a0000
[    8.835402] nand: nand_do_read_oob: from = 0x016c0000, len = 64
[    8.841583] marvell-nfc pxa3xx-nand: 
[    8.841583] NDCR:  0x9d079fff
[    8.841583] NDCB0: 0x000d3000
[    8.841583] NDCB1: 0x2d800000
[    8.841583] NDCB2: 0x00000000
[    8.841583] NDCB3: 0x00000000
[    8.860473] Bad eraseblock 182 at 0x0000016c0000
[    8.865168] nand: nand_do_read_oob: from = 0x016e0000, len = 64
[    8.871347] marvell-nfc pxa3xx-nand: 
[    8.871347] NDCR:  0x9d079fff
[    8.871347] NDCB0: 0x000d3000
[    8.871347] NDCB1: 0x2dc00000
[    8.871347] NDCB2: 0x00000000
[    8.871347] NDCB3: 0x00000000
[    8.890257] Bad eraseblock 183 at 0x0000016e0000
[    8.894953] nand: nand_do_read_oob: from = 0x01700000, len = 64
[    8.901132] marvell-nfc pxa3xx-nand: 
[    8.901132] NDCR:  0x9d079fff
[    8.901132] NDCB0: 0x000d3000
[    8.901132] NDCB1: 0x2e000000
[    8.901132] NDCB2: 0x00000000
[    8.901132] NDCB3: 0x00000000
[    8.920020] Bad eraseblock 184 at 0x000001700000
[    8.924718] nand: nand_do_read_oob: from = 0x01720000, len = 64
[    8.930895] marvell-nfc pxa3xx-nand: 
[    8.930895] NDCR:  0x9d079fff
[    8.930895] NDCB0: 0x000d3000
[    8.930895] NDCB1: 0x2e400000
[    8.930895] NDCB2: 0x00000000
[    8.930895] NDCB3: 0x00000000
[    8.949786] Bad eraseblock 185 at 0x000001720000
[    8.954485] nand: nand_do_read_oob: from = 0x01740000, len = 64
[    8.960662] marvell-nfc pxa3xx-nand: 
[    8.960662] NDCR:  0x9d079fff
[    8.960662] NDCB0: 0x000d3000
[    8.960662] NDCB1: 0x2e800000
[    8.960662] NDCB2: 0x00000000
[    8.960662] NDCB3: 0x00000000
[    8.979554] Bad eraseblock 186 at 0x000001740000
[    8.984250] nand: nand_do_read_oob: from = 0x01760000, len = 64
[    8.990427] marvell-nfc pxa3xx-nand: 
[    8.990427] NDCR:  0x9d079fff
[    8.990427] NDCB0: 0x000d3000
[    8.990427] NDCB1: 0x2ec00000
[    8.990427] NDCB2: 0x00000000
[    8.990427] NDCB3: 0x00000000
[    9.009331] Bad eraseblock 187 at 0x000001760000
[    9.014025] nand: nand_do_read_oob: from = 0x01780000, len = 64
[    9.020206] marvell-nfc pxa3xx-nand: 
[    9.020206] NDCR:  0x9d079fff
[    9.020206] NDCB0: 0x000d3000
[    9.020206] NDCB1: 0x2f000000
[    9.020206] NDCB2: 0x00000000
[    9.020206] NDCB3: 0x00000000
[    9.039094] Bad eraseblock 188 at 0x000001780000
[    9.043792] nand: nand_do_read_oob: from = 0x017a0000, len = 64
[    9.049970] marvell-nfc pxa3xx-nand: 
[    9.049970] NDCR:  0x9d079fff
[    9.049970] NDCB0: 0x000d3000
[    9.049970] NDCB1: 0x2f400000
[    9.049970] NDCB2: 0x00000000
[    9.049970] NDCB3: 0x00000000
[    9.068867] Bad eraseblock 189 at 0x0000017a0000
[    9.073569] nand: nand_do_read_oob: from = 0x017c0000, len = 64
[    9.079741] marvell-nfc pxa3xx-nand: 
[    9.079741] NDCR:  0x9d079fff
[    9.079741] NDCB0: 0x000d3000
[    9.079741] NDCB1: 0x2f800000
[    9.079741] NDCB2: 0x00000000
[    9.079741] NDCB3: 0x00000000
[    9.098623] Bad eraseblock 190 at 0x0000017c0000
[    9.103465] nand: nand_do_read_oob: from = 0x017e0000, len = 64
[    9.109624] marvell-nfc pxa3xx-nand: 
[    9.109624] NDCR:  0x9d079fff
[    9.109624] NDCB0: 0x000d3000
[    9.109624] NDCB1: 0x2fc00000
[    9.109624] NDCB2: 0x00000000
[    9.109624] NDCB3: 0x00000000
[    9.128502] Bad eraseblock 191 at 0x0000017e0000
[    9.133362] nand: nand_do_read_oob: from = 0x01800000, len = 64
[    9.139533] marvell-nfc pxa3xx-nand: 
[    9.139533] NDCR:  0x9d079fff
[    9.139533] NDCB0: 0x000d3000
[    9.139533] NDCB1: 0x30000000
[    9.139533] NDCB2: 0x00000000
[    9.139533] NDCB3: 0x00000000
[    9.158414] Bad eraseblock 192 at 0x000001800000
[    9.163264] nand: nand_do_read_oob: from = 0x01820000, len = 64
[    9.169438] marvell-nfc pxa3xx-nand: 
[    9.169438] NDCR:  0x9d079fff
[    9.169438] NDCB0: 0x000d3000
[    9.169438] NDCB1: 0x30400000
[    9.169438] NDCB2: 0x00000000
[    9.169438] NDCB3: 0x00000000
[    9.188319] Bad eraseblock 193 at 0x000001820000
[    9.193177] nand: nand_do_read_oob: from = 0x01840000, len = 64
[    9.199354] marvell-nfc pxa3xx-nand: 
[    9.199354] NDCR:  0x9d079fff
[    9.199354] NDCB0: 0x000d3000
[    9.199354] NDCB1: 0x30800000
[    9.199354] NDCB2: 0x00000000
[    9.199354] NDCB3: 0x00000000
[    9.218231] Bad eraseblock 194 at 0x000001840000
[    9.223090] nand: nand_do_read_oob: from = 0x01860000, len = 64
[    9.229262] marvell-nfc pxa3xx-nand: 
[    9.229262] NDCR:  0x9d079fff
[    9.229262] NDCB0: 0x000d3000
[    9.229262] NDCB1: 0x30c00000
[    9.229262] NDCB2: 0x00000000
[    9.229262] NDCB3: 0x00000000
[    9.248142] Bad eraseblock 195 at 0x000001860000
[    9.252993] nand: nand_do_read_oob: from = 0x01880000, len = 64
[    9.259168] marvell-nfc pxa3xx-nand: 
[    9.259168] NDCR:  0x9d079fff
[    9.259168] NDCB0: 0x000d3000
[    9.259168] NDCB1: 0x31000000
[    9.259168] NDCB2: 0x00000000
[    9.259168] NDCB3: 0x00000000
[    9.278047] Bad eraseblock 196 at 0x000001880000
[    9.282898] nand: nand_do_read_oob: from = 0x018a0000, len = 64
[    9.289072] marvell-nfc pxa3xx-nand: 
[    9.289072] NDCR:  0x9d079fff
[    9.289072] NDCB0: 0x000d3000
[    9.289072] NDCB1: 0x31400000
[    9.289072] NDCB2: 0x00000000
[    9.289072] NDCB3: 0x00000000
[    9.307953] Bad eraseblock 197 at 0x0000018a0000
[    9.312811] nand: nand_do_read_oob: from = 0x018c0000, len = 64
[    9.318985] marvell-nfc pxa3xx-nand: 
[    9.318985] NDCR:  0x9d079fff
[    9.318985] NDCB0: 0x000d3000
[    9.318985] NDCB1: 0x31800000
[    9.318985] NDCB2: 0x00000000
[    9.318985] NDCB3: 0x00000000
[    9.337863] Bad eraseblock 198 at 0x0000018c0000
[    9.342715] nand: nand_do_read_oob: from = 0x018e0000, len = 64
[    9.348889] marvell-nfc pxa3xx-nand: 
[    9.348889] NDCR:  0x9d079fff
[    9.348889] NDCB0: 0x000d3000
[    9.348889] NDCB1: 0x31c00000
[    9.348889] NDCB2: 0x00000000
[    9.348889] NDCB3: 0x00000000
[    9.367767] Bad eraseblock 199 at 0x0000018e0000
[    9.372618] nand: nand_do_read_oob: from = 0x01900000, len = 64
[    9.378794] marvell-nfc pxa3xx-nand: 
[    9.378794] NDCR:  0x9d079fff
[    9.378794] NDCB0: 0x000d3000
[    9.378794] NDCB1: 0x32000000
[    9.378794] NDCB2: 0x00000000
[    9.378794] NDCB3: 0x00000000
[    9.397663] Bad eraseblock 200 at 0x000001900000
[    9.402530] nand: nand_do_read_oob: from = 0x01920000, len = 64
[    9.408554] marvell-nfc pxa3xx-nand: 
[    9.408554] NDCR:  0x9d079fff
[    9.408554] NDCB0: 0x000d3000
[    9.408554] NDCB1: 0x32400000
[    9.408554] NDCB2: 0x00000000
[    9.408554] NDCB3: 0x00000000
[    9.427438] Bad eraseblock 201 at 0x000001920000
[    9.432289] nand: nand_do_read_oob: from = 0x01940000, len = 64
[    9.438313] marvell-nfc pxa3xx-nand: 
[    9.438313] NDCR:  0x9d079fff
[    9.438313] NDCB0: 0x000d3000
[    9.438313] NDCB1: 0x32800000
[    9.438313] NDCB2: 0x00000000
[    9.438313] NDCB3: 0x00000000
[    9.457195] Bad eraseblock 202 at 0x000001940000
[    9.462047] nand: nand_do_read_oob: from = 0x01960000, len = 64
[    9.468069] marvell-nfc pxa3xx-nand: 
[    9.468069] NDCR:  0x9d079fff
[    9.468069] NDCB0: 0x000d3000
[    9.468069] NDCB1: 0x32c00000
[    9.468069] NDCB2: 0x00000000
[    9.468069] NDCB3: 0x00000000
[    9.486945] Bad eraseblock 203 at 0x000001960000
[    9.491807] nand: nand_do_read_oob: from = 0x01980000, len = 64
[    9.497826] marvell-nfc pxa3xx-nand: 
[    9.497826] NDCR:  0x9d079fff
[    9.497826] NDCB0: 0x000d3000
[    9.497826] NDCB1: 0x33000000
[    9.497826] NDCB2: 0x00000000
[    9.497826] NDCB3: 0x00000000
[    9.516702] Bad eraseblock 204 at 0x000001980000
[    9.521563] nand: nand_do_read_oob: from = 0x019a0000, len = 64
[    9.527585] marvell-nfc pxa3xx-nand: 
[    9.527585] NDCR:  0x9d079fff
[    9.527585] NDCB0: 0x000d3000
[    9.527585] NDCB1: 0x33400000
[    9.527585] NDCB2: 0x00000000
[    9.527585] NDCB3: 0x00000000
[    9.546470] Bad eraseblock 205 at 0x0000019a0000
[    9.551328] nand: nand_do_read_oob: from = 0x019c0000, len = 64
[    9.557350] marvell-nfc pxa3xx-nand: 
[    9.557350] NDCR:  0x9d079fff
[    9.557350] NDCB0: 0x000d3000
[    9.557350] NDCB1: 0x33800000
[    9.557350] NDCB2: 0x00000000
[    9.557350] NDCB3: 0x00000000
[    9.576226] Bad eraseblock 206 at 0x0000019c0000
[    9.581084] nand: nand_do_read_oob: from = 0x019e0000, len = 64
[    9.587109] marvell-nfc pxa3xx-nand: 
[    9.587109] NDCR:  0x9d079fff
[    9.587109] NDCB0: 0x000d3000
[    9.587109] NDCB1: 0x33c00000
[    9.587109] NDCB2: 0x00000000
[    9.587109] NDCB3: 0x00000000
[    9.605994] Bad eraseblock 207 at 0x0000019e0000
[    9.610854] nand: nand_do_read_oob: from = 0x01a00000, len = 64
[    9.616874] marvell-nfc pxa3xx-nand: 
[    9.616874] NDCR:  0x9d079fff
[    9.616874] NDCB0: 0x000d3000
[    9.616874] NDCB1: 0x34000000
[    9.616874] NDCB2: 0x00000000
[    9.616874] NDCB3: 0x00000000
[    9.635751] Bad eraseblock 208 at 0x000001a00000
[    9.640608] nand: nand_do_read_oob: from = 0x01a20000, len = 64
[    9.646633] marvell-nfc pxa3xx-nand: 
[    9.646633] NDCR:  0x9d079fff
[    9.646633] NDCB0: 0x000d3000
[    9.646633] NDCB1: 0x34400000
[    9.646633] NDCB2: 0x00000000
[    9.646633] NDCB3: 0x00000000
[    9.665517] Bad eraseblock 209 at 0x000001a20000
[    9.670375] nand: nand_do_read_oob: from = 0x01a40000, len = 64
[    9.676397] marvell-nfc pxa3xx-nand: 
[    9.676397] NDCR:  0x9d079fff
[    9.676397] NDCB0: 0x000d3000
[    9.676397] NDCB1: 0x34800000
[    9.676397] NDCB2: 0x00000000
[    9.676397] NDCB3: 0x00000000
[    9.695274] Bad eraseblock 210 at 0x000001a40000
[    9.700130] nand: nand_do_read_oob: from = 0x01a60000, len = 64
[    9.706155] marvell-nfc pxa3xx-nand: 
[    9.706155] NDCR:  0x9d079fff
[    9.706155] NDCB0: 0x000d3000
[    9.706155] NDCB1: 0x34c00000
[    9.706155] NDCB2: 0x00000000
[    9.706155] NDCB3: 0x00000000
[    9.725032] Bad eraseblock 211 at 0x000001a60000
[    9.729891] nand: nand_do_read_oob: from = 0x01a80000, len = 64
[    9.735912] marvell-nfc pxa3xx-nand: 
[    9.735912] NDCR:  0x9d079fff
[    9.735912] NDCB0: 0x000d3000
[    9.735912] NDCB1: 0x35000000
[    9.735912] NDCB2: 0x00000000
[    9.735912] NDCB3: 0x00000000
[    9.754791] Bad eraseblock 212 at 0x000001a80000
[    9.759646] nand: nand_do_read_oob: from = 0x01aa0000, len = 64
[    9.765671] marvell-nfc pxa3xx-nand: 
[    9.765671] NDCR:  0x9d079fff
[    9.765671] NDCB0: 0x000d3000
[    9.765671] NDCB1: 0x35400000
[    9.765671] NDCB2: 0x00000000
[    9.765671] NDCB3: 0x00000000
[    9.784546] Bad eraseblock 213 at 0x000001aa0000
[    9.789405] nand: nand_do_read_oob: from = 0x01ac0000, len = 64
[    9.795428] marvell-nfc pxa3xx-nand: 
[    9.795428] NDCR:  0x9d079fff
[    9.795428] NDCB0: 0x000d3000
[    9.795428] NDCB1: 0x35800000
[    9.795428] NDCB2: 0x00000000
[    9.795428] NDCB3: 0x00000000
[    9.814303] Bad eraseblock 214 at 0x000001ac0000
[    9.819164] nand: nand_do_read_oob: from = 0x01ae0000, len = 64
[    9.825186] marvell-nfc pxa3xx-nand: 
[    9.825186] NDCR:  0x9d079fff
[    9.825186] NDCB0: 0x000d3000
[    9.825186] NDCB1: 0x35c00000
[    9.825186] NDCB2: 0x00000000
[    9.825186] NDCB3: 0x00000000
[    9.844070] Bad eraseblock 215 at 0x000001ae0000
[    9.848921] nand: nand_do_read_oob: from = 0x01b00000, len = 64
[    9.854943] marvell-nfc pxa3xx-nand: 
[    9.854943] NDCR:  0x9d079fff
[    9.854943] NDCB0: 0x000d3000
[    9.854943] NDCB1: 0x36000000
[    9.854943] NDCB2: 0x00000000
[    9.854943] NDCB3: 0x00000000
[    9.873819] Bad eraseblock 216 at 0x000001b00000
[    9.878521] nand: nand_do_read_oob: from = 0x01b20000, len = 64
[    9.884699] marvell-nfc pxa3xx-nand: 
[    9.884699] NDCR:  0x9d079fff
[    9.884699] NDCB0: 0x000d3000
[    9.884699] NDCB1: 0x36400000
[    9.884699] NDCB2: 0x00000000
[    9.884699] NDCB3: 0x00000000
[    9.903587] Bad eraseblock 217 at 0x000001b20000
[    9.908284] nand: nand_do_read_oob: from = 0x01b40000, len = 64
[    9.914463] marvell-nfc pxa3xx-nand: 
[    9.914463] NDCR:  0x9d079fff
[    9.914463] NDCB0: 0x000d3000
[    9.914463] NDCB1: 0x36800000
[    9.914463] NDCB2: 0x00000000
[    9.914463] NDCB3: 0x00000000
[    9.933355] Bad eraseblock 218 at 0x000001b40000
[    9.938052] nand: nand_do_read_oob: from = 0x01b60000, len = 64
[    9.944230] marvell-nfc pxa3xx-nand: 
[    9.944230] NDCR:  0x9d079fff
[    9.944230] NDCB0: 0x000d3000
[    9.944230] NDCB1: 0x36c00000
[    9.944230] NDCB2: 0x00000000
[    9.944230] NDCB3: 0x00000000
[    9.963121] Bad eraseblock 219 at 0x000001b60000
[    9.967817] nand: nand_do_read_oob: from = 0x01b80000, len = 64
[    9.973996] marvell-nfc pxa3xx-nand: 
[    9.973996] NDCR:  0x9d079fff
[    9.973996] NDCB0: 0x000d3000
[    9.973996] NDCB1: 0x37000000
[    9.973996] NDCB2: 0x00000000
[    9.973996] NDCB3: 0x00000000
[    9.992886] Bad eraseblock 220 at 0x000001b80000
[    9.997584] nand: nand_do_read_oob: from = 0x01ba0000, len = 64
[   10.003762] marvell-nfc pxa3xx-nand: 
[   10.003762] NDCR:  0x9d079fff
[   10.003762] NDCB0: 0x000d3000
[   10.003762] NDCB1: 0x37400000
[   10.003762] NDCB2: 0x00000000
[   10.003762] NDCB3: 0x00000000
[   10.022661] Bad eraseblock 221 at 0x000001ba0000
[   10.027358] nand: nand_do_read_oob: from = 0x01bc0000, len = 64
[   10.033541] marvell-nfc pxa3xx-nand: 
[   10.033541] NDCR:  0x9d079fff
[   10.033541] NDCB0: 0x000d3000
[   10.033541] NDCB1: 0x37800000
[   10.033541] NDCB2: 0x00000000
[   10.033541] NDCB3: 0x00000000
[   10.052456] Bad eraseblock 222 at 0x000001bc0000
[   10.057151] nand: nand_do_read_oob: from = 0x01be0000, len = 64
[   10.063329] marvell-nfc pxa3xx-nand: 
[   10.063329] NDCR:  0x9d079fff
[   10.063329] NDCB0: 0x000d3000
[   10.063329] NDCB1: 0x37c00000
[   10.063329] NDCB2: 0x00000000
[   10.063329] NDCB3: 0x00000000
[   10.082230] Bad eraseblock 223 at 0x000001be0000
[   10.086925] nand: nand_do_read_oob: from = 0x01c00000, len = 64
[   10.093541] marvell-nfc pxa3xx-nand: 
[   10.093541] NDCR:  0x9d079fff
[   10.093541] NDCB0: 0x000d3000
[   10.093541] NDCB1: 0x38000000
[   10.093541] NDCB2: 0x00000000
[   10.093541] NDCB3: 0x00000000
[   10.112522] Bad eraseblock 224 at 0x000001c00000
[   10.117221] nand: nand_do_read_oob: from = 0x01c20000, len = 64
[   10.123407] marvell-nfc pxa3xx-nand: 
[   10.123407] NDCR:  0x9d079fff
[   10.123407] NDCB0: 0x000d3000
[   10.123407] NDCB1: 0x38400000
[   10.123407] NDCB2: 0x00000000
[   10.123407] NDCB3: 0x00000000
[   10.142307] Bad eraseblock 225 at 0x000001c20000
[   10.147009] nand: nand_do_read_oob: from = 0x01c40000, len = 64
[   10.153187] marvell-nfc pxa3xx-nand: 
[   10.153187] NDCR:  0x9d079fff
[   10.153187] NDCB0: 0x000d3000
[   10.153187] NDCB1: 0x38800000
[   10.153187] NDCB2: 0x00000000
[   10.153187] NDCB3: 0x00000000
[   10.172087] Bad eraseblock 226 at 0x000001c40000
[   10.176784] nand: nand_do_read_oob: from = 0x01c60000, len = 64
[   10.182963] marvell-nfc pxa3xx-nand: 
[   10.182963] NDCR:  0x9d079fff
[   10.182963] NDCB0: 0x000d3000
[   10.182963] NDCB1: 0x38c00000
[   10.182963] NDCB2: 0x00000000
[   10.182963] NDCB3: 0x00000000
[   10.201861] Bad eraseblock 227 at 0x000001c60000
[   10.206558] nand: nand_do_read_oob: from = 0x01c80000, len = 64
[   10.212737] marvell-nfc pxa3xx-nand: 
[   10.212737] NDCR:  0x9d079fff
[   10.212737] NDCB0: 0x000d3000
[   10.212737] NDCB1: 0x39000000
[   10.212737] NDCB2: 0x00000000
[   10.212737] NDCB3: 0x00000000
[   10.231639] Bad eraseblock 228 at 0x000001c80000
[   10.236333] nand: nand_do_read_oob: from = 0x01ca0000, len = 64
[   10.242510] marvell-nfc pxa3xx-nand: 
[   10.242510] NDCR:  0x9d079fff
[   10.242510] NDCB0: 0x000d3000
[   10.242510] NDCB1: 0x39400000
[   10.242510] NDCB2: 0x00000000
[   10.242510] NDCB3: 0x00000000
[   10.261400] Bad eraseblock 229 at 0x000001ca0000
[   10.266099] nand: nand_do_read_oob: from = 0x01cc0000, len = 64
[   10.272278] marvell-nfc pxa3xx-nand: 
[   10.272278] NDCR:  0x9d079fff
[   10.272278] NDCB0: 0x000d3000
[   10.272278] NDCB1: 0x39800000
[   10.272278] NDCB2: 0x00000000
[   10.272278] NDCB3: 0x00000000
[   10.291176] Bad eraseblock 230 at 0x000001cc0000
[   10.295877] nand: nand_do_read_oob: from = 0x01ce0000, len = 64
[   10.302060] marvell-nfc pxa3xx-nand: 
[   10.302060] NDCR:  0x9d079fff
[   10.302060] NDCB0: 0x000d3000
[   10.302060] NDCB1: 0x39c00000
[   10.302060] NDCB2: 0x00000000
[   10.302060] NDCB3: 0x00000000
[   10.320960] Bad eraseblock 231 at 0x000001ce0000
[   10.325658] nand: nand_do_read_oob: from = 0x01d00000, len = 64
[   10.331836] marvell-nfc pxa3xx-nand: 
[   10.331836] NDCR:  0x9d079fff
[   10.331836] NDCB0: 0x000d3000
[   10.331836] NDCB1: 0x3a000000
[   10.331836] NDCB2: 0x00000000
[   10.331836] NDCB3: 0x00000000
[   10.350735] Bad eraseblock 232 at 0x000001d00000
[   10.355433] nand: nand_do_read_oob: from = 0x01d20000, len = 64
[   10.361611] marvell-nfc pxa3xx-nand: 
[   10.361611] NDCR:  0x9d079fff
[   10.361611] NDCB0: 0x000d3000
[   10.361611] NDCB1: 0x3a400000
[   10.361611] NDCB2: 0x00000000
[   10.361611] NDCB3: 0x00000000
[   10.380512] Bad eraseblock 233 at 0x000001d20000
[   10.385207] nand: nand_do_read_oob: from = 0x01d40000, len = 64
[   10.391387] marvell-nfc pxa3xx-nand: 
[   10.391387] NDCR:  0x9d079fff
[   10.391387] NDCB0: 0x000d3000
[   10.391387] NDCB1: 0x3a800000
[   10.391387] NDCB2: 0x00000000
[   10.391387] NDCB3: 0x00000000
[   10.410286] Bad eraseblock 234 at 0x000001d40000
[   10.414983] nand: nand_do_read_oob: from = 0x01d60000, len = 64
[   10.421161] marvell-nfc pxa3xx-nand: 
[   10.421161] NDCR:  0x9d079fff
[   10.421161] NDCB0: 0x000d3000
[   10.421161] NDCB1: 0x3ac00000
[   10.421161] NDCB2: 0x00000000
[   10.421161] NDCB3: 0x00000000
[   10.440059] Bad eraseblock 235 at 0x000001d60000
[   10.444759] nand: nand_do_read_oob: from = 0x01d80000, len = 64
[   10.450935] marvell-nfc pxa3xx-nand: 
[   10.450935] NDCR:  0x9d079fff
[   10.450935] NDCB0: 0x000d3000
[   10.450935] NDCB1: 0x3b000000
[   10.450935] NDCB2: 0x00000000
[   10.450935] NDCB3: 0x00000000
[   10.469837] Bad eraseblock 236 at 0x000001d80000
[   10.474531] nand: nand_do_read_oob: from = 0x01da0000, len = 64
[   10.480709] marvell-nfc pxa3xx-nand: 
[   10.480709] NDCR:  0x9d079fff
[   10.480709] NDCB0: 0x000d3000
[   10.480709] NDCB1: 0x3b400000
[   10.480709] NDCB2: 0x00000000
[   10.480709] NDCB3: 0x00000000
[   10.499610] Bad eraseblock 237 at 0x000001da0000
[   10.504306] nand: nand_do_read_oob: from = 0x01dc0000, len = 64
[   10.510483] marvell-nfc pxa3xx-nand: 
[   10.510483] NDCR:  0x9d079fff
[   10.510483] NDCB0: 0x000d3000
[   10.510483] NDCB1: 0x3b800000
[   10.510483] NDCB2: 0x00000000
[   10.510483] NDCB3: 0x00000000
[   10.529383] Bad eraseblock 238 at 0x000001dc0000
[   10.534081] nand: nand_do_read_oob: from = 0x01de0000, len = 64
[   10.540259] marvell-nfc pxa3xx-nand: 
[   10.540259] NDCR:  0x9d079fff
[   10.540259] NDCB0: 0x000d3000
[   10.540259] NDCB1: 0x3bc00000
[   10.540259] NDCB2: 0x00000000
[   10.540259] NDCB3: 0x00000000
[   10.559159] Bad eraseblock 239 at 0x000001de0000
[   10.563856] nand: nand_do_read_oob: from = 0x01e00000, len = 64
[   10.570034] marvell-nfc pxa3xx-nand: 
[   10.570034] NDCR:  0x9d079fff
[   10.570034] NDCB0: 0x000d3000
[   10.570034] NDCB1: 0x3c000000
[   10.570034] NDCB2: 0x00000000
[   10.570034] NDCB3: 0x00000000
[   10.588971] Bad eraseblock 240 at 0x000001e00000
[   10.593675] nand: nand_do_read_oob: from = 0x01e20000, len = 64
[   10.599851] marvell-nfc pxa3xx-nand: 
[   10.599851] NDCR:  0x9d079fff
[   10.599851] NDCB0: 0x000d3000
[   10.599851] NDCB1: 0x3c400000
[   10.599851] NDCB2: 0x00000000
[   10.599851] NDCB3: 0x00000000
[   10.618811] Bad eraseblock 241 at 0x000001e20000
[   10.623511] nand: nand_do_read_oob: from = 0x01e40000, len = 64
[   10.629689] marvell-nfc pxa3xx-nand: 
[   10.629689] NDCR:  0x9d079fff
[   10.629689] NDCB0: 0x000d3000
[   10.629689] NDCB1: 0x3c800000
[   10.629689] NDCB2: 0x00000000
[   10.629689] NDCB3: 0x00000000
[   10.648573] Bad eraseblock 242 at 0x000001e40000
[   10.653415] nand: nand_do_read_oob: from = 0x01e60000, len = 64
[   10.659598] marvell-nfc pxa3xx-nand: 
[   10.659598] NDCR:  0x9d079fff
[   10.659598] NDCB0: 0x000d3000
[   10.659598] NDCB1: 0x3cc00000
[   10.659598] NDCB2: 0x00000000
[   10.659598] NDCB3: 0x00000000
[   10.678480] Bad eraseblock 243 at 0x000001e60000
[   10.683333] nand: nand_do_read_oob: from = 0x01e80000, len = 64
[   10.689511] marvell-nfc pxa3xx-nand: 
[   10.689511] NDCR:  0x9d079fff
[   10.689511] NDCB0: 0x000d3000
[   10.689511] NDCB1: 0x3d000000
[   10.689511] NDCB2: 0x00000000
[   10.689511] NDCB3: 0x00000000
[   10.708391] Bad eraseblock 244 at 0x000001e80000
[   10.713249] nand: nand_do_read_oob: from = 0x01ea0000, len = 64
[   10.719423] marvell-nfc pxa3xx-nand: 
[   10.719423] NDCR:  0x9d079fff
[   10.719423] NDCB0: 0x000d3000
[   10.719423] NDCB1: 0x3d400000
[   10.719423] NDCB2: 0x00000000
[   10.719423] NDCB3: 0x00000000
[   10.738306] Bad eraseblock 245 at 0x000001ea0000
[   10.743159] nand: nand_do_read_oob: from = 0x01ec0000, len = 64
[   10.749336] marvell-nfc pxa3xx-nand: 
[   10.749336] NDCR:  0x9d079fff
[   10.749336] NDCB0: 0x000d3000
[   10.749336] NDCB1: 0x3d800000
[   10.749336] NDCB2: 0x00000000
[   10.749336] NDCB3: 0x00000000
[   10.768217] Bad eraseblock 246 at 0x000001ec0000
[   10.773071] nand: nand_do_read_oob: from = 0x01ee0000, len = 64
[   10.779248] marvell-nfc pxa3xx-nand: 
[   10.779248] NDCR:  0x9d079fff
[   10.779248] NDCB0: 0x000d3000
[   10.779248] NDCB1: 0x3dc00000
[   10.779248] NDCB2: 0x00000000
[   10.779248] NDCB3: 0x00000000
[   10.798129] Bad eraseblock 247 at 0x000001ee0000
[   10.802985] nand: nand_do_read_oob: from = 0x01f00000, len = 64
[   10.809163] marvell-nfc pxa3xx-nand: 
[   10.809163] NDCR:  0x9d079fff
[   10.809163] NDCB0: 0x000d3000
[   10.809163] NDCB1: 0x3e000000
[   10.809163] NDCB2: 0x00000000
[   10.809163] NDCB3: 0x00000000
[   10.828050] Bad eraseblock 248 at 0x000001f00000
[   10.832908] nand: nand_do_read_oob: from = 0x01f20000, len = 64
[   10.839079] marvell-nfc pxa3xx-nand: 
[   10.839079] NDCR:  0x9d079fff
[   10.839079] NDCB0: 0x000d3000
[   10.839079] NDCB1: 0x3e400000
[   10.839079] NDCB2: 0x00000000
[   10.839079] NDCB3: 0x00000000
[   10.857967] Bad eraseblock 249 at 0x000001f20000
[   10.862820] nand: nand_do_read_oob: from = 0x01f40000, len = 64
[   10.868995] marvell-nfc pxa3xx-nand: 
[   10.868995] NDCR:  0x9d079fff
[   10.868995] NDCB0: 0x000d3000
[   10.868995] NDCB1: 0x3e800000
[   10.868995] NDCB2: 0x00000000
[   10.868995] NDCB3: 0x00000000
[   10.887877] Bad eraseblock 250 at 0x000001f40000
[   10.892733] nand: nand_do_read_oob: from = 0x01f60000, len = 64
[   10.898908] marvell-nfc pxa3xx-nand: 
[   10.898908] NDCR:  0x9d079fff
[   10.898908] NDCB0: 0x000d3000
[   10.898908] NDCB1: 0x3ec00000
[   10.898908] NDCB2: 0x00000000
[   10.898908] NDCB3: 0x00000000
[   10.917786] Bad eraseblock 251 at 0x000001f60000
[   10.922645] nand: nand_do_read_oob: from = 0x01f80000, len = 64
[   10.928821] marvell-nfc pxa3xx-nand: 
[   10.928821] NDCR:  0x9d079fff
[   10.928821] NDCB0: 0x000d3000
[   10.928821] NDCB1: 0x3f000000
[   10.928821] NDCB2: 0x00000000
[   10.928821] NDCB3: 0x00000000
[   10.947705] Bad eraseblock 252 at 0x000001f80000
[   10.952560] nand: nand_do_read_oob: from = 0x01fa0000, len = 64
[   10.958582] marvell-nfc pxa3xx-nand: 
[   10.958582] NDCR:  0x9d079fff
[   10.958582] NDCB0: 0x000d3000
[   10.958582] NDCB1: 0x3f400000
[   10.958582] NDCB2: 0x00000000
[   10.958582] NDCB3: 0x00000000
[   10.977575] Bad eraseblock 253 at 0x000001fa0000
[   10.982426] nand: nand_do_read_oob: from = 0x01fc0000, len = 64
[   10.988452] marvell-nfc pxa3xx-nand: 
[   10.988452] NDCR:  0x9d079fff
[   10.988452] NDCB0: 0x000d3000
[   10.988452] NDCB1: 0x3f800000
[   10.988452] NDCB2: 0x00000000
[   10.988452] NDCB3: 0x00000000
[   11.007336] Bad eraseblock 254 at 0x000001fc0000
[   11.012204] nand: nand_do_read_oob: from = 0x01fe0000, len = 64
[   11.018226] marvell-nfc pxa3xx-nand: 
[   11.018226] NDCR:  0x9d079fff
[   11.018226] NDCB0: 0x000d3000
[   11.018226] NDCB1: 0x3fc00000
[   11.018226] NDCB2: 0x00000000
[   11.018226] NDCB3: 0x00000000
[   11.037111] Bad eraseblock 255 at 0x000001fe0000
[   11.041971] nand: nand_do_read_oob: from = 0x02000000, len = 64
[   11.047994] marvell-nfc pxa3xx-nand: 
[   11.047994] NDCR:  0x9d079fff
[   11.047994] NDCB0: 0x000d3000
[   11.047994] NDCB1: 0x40000000
[   11.047994] NDCB2: 0x00000000
[   11.047994] NDCB3: 0x00000000
[   11.066878] Bad eraseblock 256 at 0x000002000000
[   11.071736] nand: nand_do_read_oob: from = 0x02020000, len = 64
[   11.077758] marvell-nfc pxa3xx-nand: 
[   11.077758] NDCR:  0x9d079fff
[   11.077758] NDCB0: 0x000d3000
[   11.077758] NDCB1: 0x40400000
[   11.077758] NDCB2: 0x00000000
[   11.077758] NDCB3: 0x00000000
[   11.096643] Bad eraseblock 257 at 0x000002020000
[   11.101500] nand: nand_do_read_oob: from = 0x02040000, len = 64
[   11.107524] marvell-nfc pxa3xx-nand: 
[   11.107524] NDCR:  0x9d079fff
[   11.107524] NDCB0: 0x000d3000
[   11.107524] NDCB1: 0x40800000
[   11.107524] NDCB2: 0x00000000
[   11.107524] NDCB3: 0x00000000
[   11.126407] Bad eraseblock 258 at 0x000002040000
[   11.131260] nand: nand_do_read_oob: from = 0x02060000, len = 64
[   11.137283] marvell-nfc pxa3xx-nand: 
[   11.137283] NDCR:  0x9d079fff
[   11.137283] NDCB0: 0x000d3000
[   11.137283] NDCB1: 0x40c00000
[   11.137283] NDCB2: 0x00000000
[   11.137283] NDCB3: 0x00000000
[   11.156165] Bad eraseblock 259 at 0x000002060000
[   11.161024] nand: nand_do_read_oob: from = 0x02080000, len = 64
[   11.167050] marvell-nfc pxa3xx-nand: 
[   11.167050] NDCR:  0x9d079fff
[   11.167050] NDCB0: 0x000d3000
[   11.167050] NDCB1: 0x41000000
[   11.167050] NDCB2: 0x00000000
[   11.167050] NDCB3: 0x00000000
[   11.185934] Bad eraseblock 260 at 0x000002080000
[   11.190810] nand: nand_do_read_oob: from = 0x020a0000, len = 64
[   11.196833] marvell-nfc pxa3xx-nand: 
[   11.196833] NDCR:  0x9d079fff
[   11.196833] NDCB0: 0x000d3000
[   11.196833] NDCB1: 0x41400000
[   11.196833] NDCB2: 0x00000000
[   11.196833] NDCB3: 0x00000000
[   11.215718] Bad eraseblock 261 at 0x0000020a0000
[   11.220575] nand: nand_do_read_oob: from = 0x020c0000, len = 64
[   11.226599] marvell-nfc pxa3xx-nand: 
[   11.226599] NDCR:  0x9d079fff
[   11.226599] NDCB0: 0x000d3000
[   11.226599] NDCB1: 0x41800000
[   11.226599] NDCB2: 0x00000000
[   11.226599] NDCB3: 0x00000000
[   11.245482] Bad eraseblock 262 at 0x0000020c0000
[   11.250340] nand: nand_do_read_oob: from = 0x020e0000, len = 64
[   11.256364] marvell-nfc pxa3xx-nand: 
[   11.256364] NDCR:  0x9d079fff
[   11.256364] NDCB0: 0x000d3000
[   11.256364] NDCB1: 0x41c00000
[   11.256364] NDCB2: 0x00000000
[   11.256364] NDCB3: 0x00000000
[   11.275246] Bad eraseblock 263 at 0x0000020e0000
[   11.280108] nand: nand_do_read_oob: from = 0x02100000, len = 64
[   11.286131] marvell-nfc pxa3xx-nand: 
[   11.286131] NDCR:  0x9d079fff
[   11.286131] NDCB0: 0x000d3000
[   11.286131] NDCB1: 0x42000000
[   11.286131] NDCB2: 0x00000000
[   11.286131] NDCB3: 0x00000000
[   11.305013] Bad eraseblock 264 at 0x000002100000
[   11.309866] nand: nand_do_read_oob: from = 0x02120000, len = 64
[   11.315888] marvell-nfc pxa3xx-nand: 
[   11.315888] NDCR:  0x9d079fff
[   11.315888] NDCB0: 0x000d3000
[   11.315888] NDCB1: 0x42400000
[   11.315888] NDCB2: 0x00000000
[   11.315888] NDCB3: 0x00000000
[   11.334770] Bad eraseblock 265 at 0x000002120000
[   11.339622] nand: nand_do_read_oob: from = 0x02140000, len = 64
[   11.345645] marvell-nfc pxa3xx-nand: 
[   11.345645] NDCR:  0x9d079fff
[   11.345645] NDCB0: 0x000d3000
[   11.345645] NDCB1: 0x42800000
[   11.345645] NDCB2: 0x00000000
[   11.345645] NDCB3: 0x00000000
[   11.364528] Bad eraseblock 266 at 0x000002140000
[   11.369389] nand: nand_do_read_oob: from = 0x02160000, len = 64
[   11.375411] marvell-nfc pxa3xx-nand: 
[   11.375411] NDCR:  0x9d079fff
[   11.375411] NDCB0: 0x000d3000
[   11.375411] NDCB1: 0x42c00000
[   11.375411] NDCB2: 0x00000000
[   11.375411] NDCB3: 0x00000000
[   11.394297] Bad eraseblock 267 at 0x000002160000
[   11.399156] nand: nand_do_read_oob: from = 0x02180000, len = 64
[   11.405178] marvell-nfc pxa3xx-nand: 
[   11.405178] NDCR:  0x9d079fff
[   11.405178] NDCB0: 0x000d3000
[   11.405178] NDCB1: 0x43000000
[   11.405178] NDCB2: 0x00000000
[   11.405178] NDCB3: 0x00000000
[   11.424063] Bad eraseblock 268 at 0x000002180000
[   11.428921] nand: nand_do_read_oob: from = 0x021a0000, len = 64
[   11.434944] marvell-nfc pxa3xx-nand: 
[   11.434944] NDCR:  0x9d079fff
[   11.434944] NDCB0: 0x000d3000
[   11.434944] NDCB1: 0x43400000
[   11.434944] NDCB2: 0x00000000
[   11.434944] NDCB3: 0x00000000
[   11.453828] Bad eraseblock 269 at 0x0000021a0000
[   11.458530] nand: nand_do_read_oob: from = 0x021c0000, len = 64
[   11.464707] marvell-nfc pxa3xx-nand: 
[   11.464707] NDCR:  0x9d079fff
[   11.464707] NDCB0: 0x000d3000
[   11.464707] NDCB1: 0x43800000
[   11.464707] NDCB2: 0x00000000
[   11.464707] NDCB3: 0x00000000
[   11.483605] Bad eraseblock 270 at 0x0000021c0000
[   11.488303] nand: nand_do_read_oob: from = 0x021e0000, len = 64
[   11.494480] marvell-nfc pxa3xx-nand: 
[   11.494480] NDCR:  0x9d079fff
[   11.494480] NDCB0: 0x000d3000
[   11.494480] NDCB1: 0x43c00000
[   11.494480] NDCB2: 0x00000000
[   11.494480] NDCB3: 0x00000000
[   11.513370] Bad eraseblock 271 at 0x0000021e0000
[   11.518070] nand: nand_do_read_oob: from = 0x02200000, len = 64
[   11.524247] marvell-nfc pxa3xx-nand: 
[   11.524247] NDCR:  0x9d079fff
[   11.524247] NDCB0: 0x000d3000
[   11.524247] NDCB1: 0x44000000
[   11.524247] NDCB2: 0x00000000
[   11.524247] NDCB3: 0x00000000
[   11.543147] Bad eraseblock 272 at 0x000002200000
[   11.547845] nand: nand_do_read_oob: from = 0x02220000, len = 64
[   11.554024] marvell-nfc pxa3xx-nand: 
[   11.554024] NDCR:  0x9d079fff
[   11.554024] NDCB0: 0x000d3000
[   11.554024] NDCB1: 0x44400000
[   11.554024] NDCB2: 0x00000000
[   11.554024] NDCB3: 0x00000000
[   11.572920] Bad eraseblock 273 at 0x000002220000
[   11.577619] nand: nand_do_read_oob: from = 0x02240000, len = 64
[   11.583797] marvell-nfc pxa3xx-nand: 
[   11.583797] NDCR:  0x9d079fff
[   11.583797] NDCB0: 0x000d3000
[   11.583797] NDCB1: 0x44800000
[   11.583797] NDCB2: 0x00000000
[   11.583797] NDCB3: 0x00000000
[   11.602698] Bad eraseblock 274 at 0x000002240000
[   11.607394] nand: nand_do_read_oob: from = 0x02260000, len = 64
[   11.613570] marvell-nfc pxa3xx-nand: 
[   11.613570] NDCR:  0x9d079fff
[   11.613570] NDCB0: 0x000d3000
[   11.613570] NDCB1: 0x44c00000
[   11.613570] NDCB2: 0x00000000
[   11.613570] NDCB3: 0x00000000
[   11.632467] Bad eraseblock 275 at 0x000002260000
[   11.637169] nand: nand_do_read_oob: from = 0x02280000, len = 64
[   11.643350] marvell-nfc pxa3xx-nand: 
[   11.643350] NDCR:  0x9d079fff
[   11.643350] NDCB0: 0x000d3000
[   11.643350] NDCB1: 0x45000000
[   11.643350] NDCB2: 0x00000000
[   11.643350] NDCB3: 0x00000000
[   11.662246] Bad eraseblock 276 at 0x000002280000
[   11.666944] nand: nand_do_read_oob: from = 0x022a0000, len = 64
[   11.673121] marvell-nfc pxa3xx-nand: 
[   11.673121] NDCR:  0x9d079fff
[   11.673121] NDCB0: 0x000d3000
[   11.673121] NDCB1: 0x45400000
[   11.673121] NDCB2: 0x00000000
[   11.673121] NDCB3: 0x00000000
[   11.692022] Bad eraseblock 277 at 0x0000022a0000
[   11.696719] nand: nand_do_read_oob: from = 0x022c0000, len = 64
[   11.702897] marvell-nfc pxa3xx-nand: 
[   11.702897] NDCR:  0x9d079fff
[   11.702897] NDCB0: 0x000d3000
[   11.702897] NDCB1: 0x45800000
[   11.702897] NDCB2: 0x00000000
[   11.702897] NDCB3: 0x00000000
[   11.721798] Bad eraseblock 278 at 0x0000022c0000
[   11.726494] nand: nand_do_read_oob: from = 0x022e0000, len = 64
[   11.732674] marvell-nfc pxa3xx-nand: 
[   11.732674] NDCR:  0x9d079fff
[   11.732674] NDCB0: 0x000d3000
[   11.732674] NDCB1: 0x45c00000
[   11.732674] NDCB2: 0x00000000
[   11.732674] NDCB3: 0x00000000
[   11.751568] Bad eraseblock 279 at 0x0000022e0000
[   11.756268] nand: nand_do_read_oob: from = 0x02300000, len = 64
[   11.762447] marvell-nfc pxa3xx-nand: 
[   11.762447] NDCR:  0x9d079fff
[   11.762447] NDCB0: 0x000d3000
[   11.762447] NDCB1: 0x46000000
[   11.762447] NDCB2: 0x00000000
[   11.762447] NDCB3: 0x00000000
[   11.781346] Bad eraseblock 280 at 0x000002300000
[   11.786041] nand: nand_do_read_oob: from = 0x02320000, len = 64
[   11.792220] marvell-nfc pxa3xx-nand: 
[   11.792220] NDCR:  0x9d079fff
[   11.792220] NDCB0: 0x000d3000
[   11.792220] NDCB1: 0x46400000
[   11.792220] NDCB2: 0x00000000
[   11.792220] NDCB3: 0x00000000
[   11.811110] Bad eraseblock 281 at 0x000002320000
[   11.815809] nand: nand_do_read_oob: from = 0x02340000, len = 64
[   11.821987] marvell-nfc pxa3xx-nand: 
[   11.821987] NDCR:  0x9d079fff
[   11.821987] NDCB0: 0x000d3000
[   11.821987] NDCB1: 0x46800000
[   11.821987] NDCB2: 0x00000000
[   11.821987] NDCB3: 0x00000000
[   11.840906] Bad eraseblock 282 at 0x000002340000
[   11.845602] nand: nand_do_read_oob: from = 0x02360000, len = 64
[   11.851778] marvell-nfc pxa3xx-nand: 
[   11.851778] NDCR:  0x9d079fff
[   11.851778] NDCB0: 0x000d3000
[   11.851778] NDCB1: 0x46c00000
[   11.851778] NDCB2: 0x00000000
[   11.851778] NDCB3: 0x00000000
[   11.870669] Bad eraseblock 283 at 0x000002360000
[   11.875367] nand: nand_do_read_oob: from = 0x02380000, len = 64
[   11.881544] marvell-nfc pxa3xx-nand: 
[   11.881544] NDCR:  0x9d079fff
[   11.881544] NDCB0: 0x000d3000
[   11.881544] NDCB1: 0x47000000
[   11.881544] NDCB2: 0x00000000
[   11.881544] NDCB3: 0x00000000
[   11.900435] Bad eraseblock 284 at 0x000002380000
[   11.905133] nand: nand_do_read_oob: from = 0x023a0000, len = 64
[   11.911311] marvell-nfc pxa3xx-nand: 
[   11.911311] NDCR:  0x9d079fff
[   11.911311] NDCB0: 0x000d3000
[   11.911311] NDCB1: 0x47400000
[   11.911311] NDCB2: 0x00000000
[   11.911311] NDCB3: 0x00000000
[   11.930211] Bad eraseblock 285 at 0x0000023a0000
[   11.934907] nand: nand_do_read_oob: from = 0x023c0000, len = 64
[   11.941085] marvell-nfc pxa3xx-nand: 
[   11.941085] NDCR:  0x9d079fff
[   11.941085] NDCB0: 0x000d3000
[   11.941085] NDCB1: 0x47800000
[   11.941085] NDCB2: 0x00000000
[   11.941085] NDCB3: 0x00000000
[   11.959983] Bad eraseblock 286 at 0x0000023c0000
[   11.964681] nand: nand_do_read_oob: from = 0x023e0000, len = 64
[   11.970859] marvell-nfc pxa3xx-nand: 
[   11.970859] NDCR:  0x9d079fff
[   11.970859] NDCB0: 0x000d3000
[   11.970859] NDCB1: 0x47c00000
[   11.970859] NDCB2: 0x00000000
[   11.970859] NDCB3: 0x00000000
[   11.989751] Bad eraseblock 287 at 0x0000023e0000
[   11.994449] nand: nand_do_read_oob: from = 0x02400000, len = 64
[   12.000627] marvell-nfc pxa3xx-nand: 
[   12.000627] NDCR:  0x9d079fff
[   12.000627] NDCB0: 0x000d3000
[   12.000627] NDCB1: 0x48000000
[   12.000627] NDCB2: 0x00000000
[   12.000627] NDCB3: 0x00000000
[   12.019526] Bad eraseblock 288 at 0x000002400000
[   12.024224] nand: nand_do_read_oob: from = 0x02420000, len = 64
[   12.030401] marvell-nfc pxa3xx-nand: 
[   12.030401] NDCR:  0x9d079fff
[   12.030401] NDCB0: 0x000d3000
[   12.030401] NDCB1: 0x48400000
[   12.030401] NDCB2: 0x00000000
[   12.030401] NDCB3: 0x00000000
[   12.049300] Bad eraseblock 289 at 0x000002420000
[   12.053998] nand: nand_do_read_oob: from = 0x02440000, len = 64
[   12.060175] marvell-nfc pxa3xx-nand: 
[   12.060175] NDCR:  0x9d079fff
[   12.060175] NDCB0: 0x000d3000
[   12.060175] NDCB1: 0x48800000
[   12.060175] NDCB2: 0x00000000
[   12.060175] NDCB3: 0x00000000
[   12.079067] Bad eraseblock 290 at 0x000002440000
[   12.083765] nand: nand_do_read_oob: from = 0x02460000, len = 64
[   12.090461] marvell-nfc pxa3xx-nand: 
[   12.090461] NDCR:  0x9d079fff
[   12.090461] NDCB0: 0x000d3000
[   12.090461] NDCB1: 0x48c00000
[   12.090461] NDCB2: 0x00000000
[   12.090461] NDCB3: 0x00000000
[   12.109442] Bad eraseblock 291 at 0x000002460000
[   12.114147] nand: nand_do_read_oob: from = 0x02480000, len = 64
[   12.120332] marvell-nfc pxa3xx-nand: 
[   12.120332] NDCR:  0x9d079fff
[   12.120332] NDCB0: 0x000d3000
[   12.120332] NDCB1: 0x49000000
[   12.120332] NDCB2: 0x00000000
[   12.120332] NDCB3: 0x00000000
[   12.139228] Bad eraseblock 292 at 0x000002480000
[   12.143925] nand: nand_do_read_oob: from = 0x024a0000, len = 64
[   12.150105] marvell-nfc pxa3xx-nand: 
[   12.150105] NDCR:  0x9d079fff
[   12.150105] NDCB0: 0x000d3000
[   12.150105] NDCB1: 0x49400000
[   12.150105] NDCB2: 0x00000000
[   12.150105] NDCB3: 0x00000000
[   12.169004] Bad eraseblock 293 at 0x0000024a0000
[   12.173701] nand: nand_do_read_oob: from = 0x024c0000, len = 64
[   12.179880] marvell-nfc pxa3xx-nand: 
[   12.179880] NDCR:  0x9d079fff
[   12.179880] NDCB0: 0x000d3000
[   12.179880] NDCB1: 0x49800000
[   12.179880] NDCB2: 0x00000000
[   12.179880] NDCB3: 0x00000000
[   12.198842] Bad eraseblock 294 at 0x0000024c0000
[   12.203547] nand: nand_do_read_oob: from = 0x024e0000, len = 64
[   12.209724] marvell-nfc pxa3xx-nand: 
[   12.209724] NDCR:  0x9d079fff
[   12.209724] NDCB0: 0x000d3000
[   12.209724] NDCB1: 0x49c00000
[   12.209724] NDCB2: 0x00000000
[   12.209724] NDCB3: 0x00000000
[   12.228610] Bad eraseblock 295 at 0x0000024e0000
[   12.233452] nand: nand_do_read_oob: from = 0x02500000, len = 64
[   12.239612] marvell-nfc pxa3xx-nand: 
[   12.239612] NDCR:  0x9d079fff
[   12.239612] NDCB0: 0x000d3000
[   12.239612] NDCB1: 0x4a000000
[   12.239612] NDCB2: 0x00000000
[   12.239612] NDCB3: 0x00000000
[   12.258498] Bad eraseblock 296 at 0x000002500000
[   12.263355] nand: nand_do_read_oob: from = 0x02520000, len = 64
[   12.269528] marvell-nfc pxa3xx-nand: 
[   12.269528] NDCR:  0x9d079fff
[   12.269528] NDCB0: 0x000d3000
[   12.269528] NDCB1: 0x4a400000
[   12.269528] NDCB2: 0x00000000
[   12.269528] NDCB3: 0x00000000
[   12.288410] Bad eraseblock 297 at 0x000002520000
[   12.293266] nand: nand_do_read_oob: from = 0x02540000, len = 64
[   12.299439] marvell-nfc pxa3xx-nand: 
[   12.299439] NDCR:  0x9d079fff
[   12.299439] NDCB0: 0x000d3000
[   12.299439] NDCB1: 0x4a800000
[   12.299439] NDCB2: 0x00000000
[   12.299439] NDCB3: 0x00000000
[   12.318322] Bad eraseblock 298 at 0x000002540000
[   12.323180] nand: nand_do_read_oob: from = 0x02560000, len = 64
[   12.329354] marvell-nfc pxa3xx-nand: 
[   12.329354] NDCR:  0x9d079fff
[   12.329354] NDCB0: 0x000d3000
[   12.329354] NDCB1: 0x4ac00000
[   12.329354] NDCB2: 0x00000000
[   12.329354] NDCB3: 0x00000000
[   12.348234] Bad eraseblock 299 at 0x000002560000
[   12.353093] nand: nand_do_read_oob: from = 0x02580000, len = 64
[   12.359268] marvell-nfc pxa3xx-nand: 
[   12.359268] NDCR:  0x9d079fff
[   12.359268] NDCB0: 0x000d3000
[   12.359268] NDCB1: 0x4b000000
[   12.359268] NDCB2: 0x00000000
[   12.359268] NDCB3: 0x00000000
[   12.378157] Bad eraseblock 300 at 0x000002580000
[   12.383014] nand: nand_do_read_oob: from = 0x025a0000, len = 64
[   12.389189] marvell-nfc pxa3xx-nand: 
[   12.389189] NDCR:  0x9d079fff
[   12.389189] NDCB0: 0x000d3000
[   12.389189] NDCB1: 0x4b400000
[   12.389189] NDCB2: 0x00000000
[   12.389189] NDCB3: 0x00000000
[   12.408093] Bad eraseblock 301 at 0x0000025a0000
[   12.412952] nand: nand_do_read_oob: from = 0x025c0000, len = 64
[   12.419127] marvell-nfc pxa3xx-nand: 
[   12.419127] NDCR:  0x9d079fff
[   12.419127] NDCB0: 0x000d3000
[   12.419127] NDCB1: 0x4b800000
[   12.419127] NDCB2: 0x00000000
[   12.419127] NDCB3: 0x00000000
[   12.438008] Bad eraseblock 302 at 0x0000025c0000
[   12.442864] nand: nand_do_read_oob: from = 0x025e0000, len = 64
[   12.449039] marvell-nfc pxa3xx-nand: 
[   12.449039] NDCR:  0x9d079fff
[   12.449039] NDCB0: 0x000d3000
[   12.449039] NDCB1: 0x4bc00000
[   12.449039] NDCB2: 0x00000000
[   12.449039] NDCB3: 0x00000000
[   12.467919] Bad eraseblock 303 at 0x0000025e0000
[   12.472777] nand: nand_do_read_oob: from = 0x02600000, len = 64
[   12.478952] marvell-nfc pxa3xx-nand: 
[   12.478952] NDCR:  0x9d079fff
[   12.478952] NDCB0: 0x000d3000
[   12.478952] NDCB1: 0x4c000000
[   12.478952] NDCB2: 0x00000000
[   12.478952] NDCB3: 0x00000000
[   12.497834] Bad eraseblock 304 at 0x000002600000
[   12.502690] nand: nand_do_read_oob: from = 0x02620000, len = 64
[   12.508864] marvell-nfc pxa3xx-nand: 
[   12.508864] NDCR:  0x9d079fff
[   12.508864] NDCB0: 0x000d3000
[   12.508864] NDCB1: 0x4c400000
[   12.508864] NDCB2: 0x00000000
[   12.508864] NDCB3: 0x00000000
[   12.527745] Bad eraseblock 305 at 0x000002620000
[   12.532601] nand: nand_do_read_oob: from = 0x02640000, len = 64
[   12.538626] marvell-nfc pxa3xx-nand: 
[   12.538626] NDCR:  0x9d079fff
[   12.538626] NDCB0: 0x000d3000
[   12.538626] NDCB1: 0x4c800000
[   12.538626] NDCB2: 0x00000000
[   12.538626] NDCB3: 0x00000000
[   12.557622] Bad eraseblock 306 at 0x000002640000
[   12.562479] nand: nand_do_read_oob: from = 0x02660000, len = 64
[   12.568505] marvell-nfc pxa3xx-nand: 
[   12.568505] NDCR:  0x9d079fff
[   12.568505] NDCB0: 0x000d3000
[   12.568505] NDCB1: 0x4cc00000
[   12.568505] NDCB2: 0x00000000
[   12.568505] NDCB3: 0x00000000
[   12.587389] Bad eraseblock 307 at 0x000002660000
[   12.592247] nand: nand_do_read_oob: from = 0x02680000, len = 64
[   12.598272] marvell-nfc pxa3xx-nand: 
[   12.598272] NDCR:  0x9d079fff
[   12.598272] NDCB0: 0x000d3000
[   12.598272] NDCB1: 0x4d000000
[   12.598272] NDCB2: 0x00000000
[   12.598272] NDCB3: 0x00000000
[   12.617155] Bad eraseblock 308 at 0x000002680000
[   12.622013] nand: nand_do_read_oob: from = 0x026a0000, len = 64
[   12.628038] marvell-nfc pxa3xx-nand: 
[   12.628038] NDCR:  0x9d079fff
[   12.628038] NDCB0: 0x000d3000
[   12.628038] NDCB1: 0x4d400000
[   12.628038] NDCB2: 0x00000000
[   12.628038] NDCB3: 0x00000000
[   12.646920] Bad eraseblock 309 at 0x0000026a0000
[   12.651782] nand: nand_do_read_oob: from = 0x026c0000, len = 64
[   12.657804] marvell-nfc pxa3xx-nand: 
[   12.657804] NDCR:  0x9d079fff
[   12.657804] NDCB0: 0x000d3000
[   12.657804] NDCB1: 0x4d800000
[   12.657804] NDCB2: 0x00000000
[   12.657804] NDCB3: 0x00000000
[   12.676689] Bad eraseblock 310 at 0x0000026c0000
[   12.681547] nand: nand_do_read_oob: from = 0x026e0000, len = 64
[   12.687570] marvell-nfc pxa3xx-nand: 
[   12.687570] NDCR:  0x9d079fff
[   12.687570] NDCB0: 0x000d3000
[   12.687570] NDCB1: 0x4dc00000
[   12.687570] NDCB2: 0x00000000
[   12.687570] NDCB3: 0x00000000
[   12.706453] Bad eraseblock 311 at 0x0000026e0000
[   12.711313] nand: nand_do_read_oob: from = 0x02700000, len = 64
[   12.717336] marvell-nfc pxa3xx-nand: 
[   12.717336] NDCR:  0x9d079fff
[   12.717336] NDCB0: 0x000d3000
[   12.717336] NDCB1: 0x4e000000
[   12.717336] NDCB2: 0x00000000
[   12.717336] NDCB3: 0x00000000
[   12.736219] Bad eraseblock 312 at 0x000002700000
[   12.741078] nand: nand_do_read_oob: from = 0x02720000, len = 64
[   12.747101] marvell-nfc pxa3xx-nand: 
[   12.747101] NDCR:  0x9d079fff
[   12.747101] NDCB0: 0x000d3000
[   12.747101] NDCB1: 0x4e400000
[   12.747101] NDCB2: 0x00000000
[   12.747101] NDCB3: 0x00000000
[   12.765985] Bad eraseblock 313 at 0x000002720000
[   12.770844] nand: nand_do_read_oob: from = 0x02740000, len = 64
[   12.776867] marvell-nfc pxa3xx-nand: 
[   12.776867] NDCR:  0x9d079fff
[   12.776867] NDCB0: 0x000d3000
[   12.776867] NDCB1: 0x4e800000
[   12.776867] NDCB2: 0x00000000
[   12.776867] NDCB3: 0x00000000
[   12.795751] Bad eraseblock 314 at 0x000002740000
[   12.800612] nand: nand_do_read_oob: from = 0x02760000, len = 64
[   12.806634] marvell-nfc pxa3xx-nand: 
[   12.806634] NDCR:  0x9d079fff
[   12.806634] NDCB0: 0x000d3000
[   12.806634] NDCB1: 0x4ec00000
[   12.806634] NDCB2: 0x00000000
[   12.806634] NDCB3: 0x00000000
[   12.825517] Bad eraseblock 315 at 0x000002760000
[   12.830377] nand: nand_do_read_oob: from = 0x02780000, len = 64
[   12.836399] marvell-nfc pxa3xx-nand: 
[   12.836399] NDCR:  0x9d079fff
[   12.836399] NDCB0: 0x000d3000
[   12.836399] NDCB1: 0x4f000000
[   12.836399] NDCB2: 0x00000000
[   12.836399] NDCB3: 0x00000000
[   12.855284] Bad eraseblock 316 at 0x000002780000
[   12.860143] nand: nand_do_read_oob: from = 0x027a0000, len = 64
[   12.866167] marvell-nfc pxa3xx-nand: 
[   12.866167] NDCR:  0x9d079fff
[   12.866167] NDCB0: 0x000d3000
[   12.866167] NDCB1: 0x4f400000
[   12.866167] NDCB2: 0x00000000
[   12.866167] NDCB3: 0x00000000
[   12.885052] Bad eraseblock 317 at 0x0000027a0000
[   12.889910] nand: nand_do_read_oob: from = 0x027c0000, len = 64
[   12.895931] marvell-nfc pxa3xx-nand: 
[   12.895931] NDCR:  0x9d079fff
[   12.895931] NDCB0: 0x000d3000
[   12.895931] NDCB1: 0x4f800000
[   12.895931] NDCB2: 0x00000000
[   12.895931] NDCB3: 0x00000000
[   12.914817] Bad eraseblock 318 at 0x0000027c0000
[   12.919674] nand: nand_do_read_oob: from = 0x027e0000, len = 64
[   12.925698] marvell-nfc pxa3xx-nand: 
[   12.925698] NDCR:  0x9d079fff
[   12.925698] NDCB0: 0x000d3000
[   12.925698] NDCB1: 0x4fc00000
[   12.925698] NDCB2: 0x00000000
[   12.925698] NDCB3: 0x00000000
[   12.944581] Bad eraseblock 319 at 0x0000027e0000
[   12.949443] nand: nand_do_read_oob: from = 0x02800000, len = 64
[   12.955465] marvell-nfc pxa3xx-nand: 
[   12.955465] NDCR:  0x9d079fff
[   12.955465] NDCB0: 0x000d3000
[   12.955465] NDCB1: 0x50000000
[   12.955465] NDCB2: 0x00000000
[   12.955465] NDCB3: 0x00000000
[   12.974349] Bad eraseblock 320 at 0x000002800000
[   12.979225] nand: nand_do_read_oob: from = 0x02820000, len = 64
[   12.985249] marvell-nfc pxa3xx-nand: 
[   12.985249] NDCR:  0x9d079fff
[   12.985249] NDCB0: 0x000d3000
[   12.985249] NDCB1: 0x50400000
[   12.985249] NDCB2: 0x00000000
[   12.985249] NDCB3: 0x00000000
[   13.004132] Bad eraseblock 321 at 0x000002820000
[   13.008999] nand: nand_do_read_oob: from = 0x02840000, len = 64
[   13.015023] marvell-nfc pxa3xx-nand: 
[   13.015023] NDCR:  0x9d079fff
[   13.015023] NDCB0: 0x000d3000
[   13.015023] NDCB1: 0x50800000
[   13.015023] NDCB2: 0x00000000
[   13.015023] NDCB3: 0x00000000
[   13.033943] nand: nand_do_read_oob: from = 0x02860000, len = 64
[   13.040143] marvell-nfc pxa3xx-nand: 
[   13.040143] NDCR:  0x9d079fff
[   13.040143] NDCB0: 0x000d3000
[   13.040143] NDCB1: 0x50c00000
[   13.040143] NDCB2: 0x00000000
[   13.040143] NDCB3: 0x00000000
[   13.059073] nand: nand_do_read_oob: from = 0x02880000, len = 64
[   13.065105] marvell-nfc pxa3xx-nand: 
[   13.065105] NDCR:  0x9d079fff
[   13.065105] NDCB0: 0x000d3000
[   13.065105] NDCB1: 0x51000000
[   13.065105] NDCB2: 0x00000000
[   13.065105] NDCB3: 0x00000000
[   13.084035] nand: nand_do_read_oob: from = 0x028a0000, len = 64
[   13.090243] marvell-nfc pxa3xx-nand: 
[   13.090243] NDCR:  0x9d079fff
[   13.090243] NDCB0: 0x000d3000
[   13.090243] NDCB1: 0x51400000
[   13.090243] NDCB2: 0x00000000
[   13.090243] NDCB3: 0x00000000
[   13.109171] nand: nand_do_read_oob: from = 0x028c0000, len = 64
[   13.115203] marvell-nfc pxa3xx-nand: 
[   13.115203] NDCR:  0x9d079fff
[   13.115203] NDCB0: 0x000d3000
[   13.115203] NDCB1: 0x51800000
[   13.115203] NDCB2: 0x00000000
[   13.115203] NDCB3: 0x00000000
[   13.134135] nand: nand_do_read_oob: from = 0x028e0000, len = 64
[   13.140342] marvell-nfc pxa3xx-nand: 
[   13.140342] NDCR:  0x9d079fff
[   13.140342] NDCB0: 0x000d3000
[   13.140342] NDCB1: 0x51c00000
[   13.140342] NDCB2: 0x00000000
[   13.140342] NDCB3: 0x00000000
[   13.159271] nand: nand_do_read_oob: from = 0x02900000, len = 64
[   13.165301] marvell-nfc pxa3xx-nand: 
[   13.165301] NDCR:  0x9d079fff
[   13.165301] NDCB0: 0x000d3000
[   13.165301] NDCB1: 0x52000000
[   13.165301] NDCB2: 0x00000000
[   13.165301] NDCB3: 0x00000000
[   13.184240] nand: nand_do_read_oob: from = 0x02920000, len = 64
[   13.190443] marvell-nfc pxa3xx-nand: 
[   13.190443] NDCR:  0x9d079fff
[   13.190443] NDCB0: 0x000d3000
[   13.190443] NDCB1: 0x52400000
[   13.190443] NDCB2: 0x00000000
[   13.190443] NDCB3: 0x00000000
[   13.209368] nand: nand_do_read_oob: from = 0x02940000, len = 64
[   13.215400] marvell-nfc pxa3xx-nand: 
[   13.215400] NDCR:  0x9d079fff
[   13.215400] NDCB0: 0x000d3000
[   13.215400] NDCB1: 0x52800000
[   13.215400] NDCB2: 0x00000000
[   13.215400] NDCB3: 0x00000000
[   13.234332] nand: nand_do_read_oob: from = 0x02960000, len = 64
[   13.240539] marvell-nfc pxa3xx-nand: 
[   13.240539] NDCR:  0x9d079fff
[   13.240539] NDCB0: 0x000d3000
[   13.240539] NDCB1: 0x52c00000
[   13.240539] NDCB2: 0x00000000
[   13.240539] NDCB3: 0x00000000
[   13.259465] nand: nand_do_read_oob: from = 0x02980000, len = 64
[   13.265498] marvell-nfc pxa3xx-nand: 
[   13.265498] NDCR:  0x9d079fff
[   13.265498] NDCB0: 0x000d3000
[   13.265498] NDCB1: 0x53000000
[   13.265498] NDCB2: 0x00000000
[   13.265498] NDCB3: 0x00000000
[   13.284434] nand: nand_do_read_oob: from = 0x029a0000, len = 64
[   13.290639] marvell-nfc pxa3xx-nand: 
[   13.290639] NDCR:  0x9d079fff
[   13.290639] NDCB0: 0x000d3000
[   13.290639] NDCB1: 0x53400000
[   13.290639] NDCB2: 0x00000000
[   13.290639] NDCB3: 0x00000000
[   13.309566] nand: nand_do_read_oob: from = 0x029c0000, len = 64
[   13.315596] marvell-nfc pxa3xx-nand: 
[   13.315596] NDCR:  0x9d079fff
[   13.315596] NDCB0: 0x000d3000
[   13.315596] NDCB1: 0x53800000
[   13.315596] NDCB2: 0x00000000
[   13.315596] NDCB3: 0x00000000
[   13.334532] nand: nand_do_read_oob: from = 0x029e0000, len = 64
[   13.340734] marvell-nfc pxa3xx-nand: 
[   13.340734] NDCR:  0x9d079fff
[   13.340734] NDCB0: 0x000d3000
[   13.340734] NDCB1: 0x53c00000
[   13.340734] NDCB2: 0x00000000
[   13.340734] NDCB3: 0x00000000
[   13.359662] nand: nand_do_read_oob: from = 0x02a00000, len = 64
[   13.365696] marvell-nfc pxa3xx-nand: 
[   13.365696] NDCR:  0x9d079fff
[   13.365696] NDCB0: 0x000d3000
[   13.365696] NDCB1: 0x54000000
[   13.365696] NDCB2: 0x00000000
[   13.365696] NDCB3: 0x00000000
[   13.384629] nand: nand_do_read_oob: from = 0x02a20000, len = 64
[   13.390833] marvell-nfc pxa3xx-nand: 
[   13.390833] NDCR:  0x9d079fff
[   13.390833] NDCB0: 0x000d3000
[   13.390833] NDCB1: 0x54400000
[   13.390833] NDCB2: 0x00000000
[   13.390833] NDCB3: 0x00000000
[   13.409766] nand: nand_do_read_oob: from = 0x02a40000, len = 64
[   13.415802] marvell-nfc pxa3xx-nand: 
[   13.415802] NDCR:  0x9d079fff
[   13.415802] NDCB0: 0x000d3000
[   13.415802] NDCB1: 0x54800000
[   13.415802] NDCB2: 0x00000000
[   13.415802] NDCB3: 0x00000000
[   13.434704] Bad eraseblock 338 at 0x000002a40000
[   13.439564] nand: nand_do_read_oob: from = 0x02a60000, len = 64
[   13.445586] marvell-nfc pxa3xx-nand: 
[   13.445586] NDCR:  0x9d079fff
[   13.445586] NDCB0: 0x000d3000
[   13.445586] NDCB1: 0x54c00000
[   13.445586] NDCB2: 0x00000000
[   13.445586] NDCB3: 0x00000000
[   13.464468] Bad eraseblock 339 at 0x000002a60000
[   13.469328] nand: nand_do_read_oob: from = 0x02a80000, len = 64
[   13.475351] marvell-nfc pxa3xx-nand: 
[   13.475351] NDCR:  0x9d079fff
[   13.475351] NDCB0: 0x000d3000
[   13.475351] NDCB1: 0x55000000
[   13.475351] NDCB2: 0x00000000
[   13.475351] NDCB3: 0x00000000
[   13.494267] nand: nand_do_read_oob: from = 0x02aa0000, len = 64
[   13.500473] marvell-nfc pxa3xx-nand: 
[   13.500473] NDCR:  0x9d079fff
[   13.500473] NDCB0: 0x000d3000
[   13.500473] NDCB1: 0x55400000
[   13.500473] NDCB2: 0x00000000
[   13.500473] NDCB3: 0x00000000
[   13.519403] nand: nand_do_read_oob: from = 0x02ac0000, len = 64
[   13.525432] marvell-nfc pxa3xx-nand: 
[   13.525432] NDCR:  0x9d079fff
[   13.525432] NDCB0: 0x000d3000
[   13.525432] NDCB1: 0x55800000
[   13.525432] NDCB2: 0x00000000
[   13.525432] NDCB3: 0x00000000
[   13.544366] nand: nand_do_read_oob: from = 0x02ae0000, len = 64
[   13.550575] marvell-nfc pxa3xx-nand: 
[   13.550575] NDCR:  0x9d079fff
[   13.550575] NDCB0: 0x000d3000
[   13.550575] NDCB1: 0x55c00000
[   13.550575] NDCB2: 0x00000000
[   13.550575] NDCB3: 0x00000000
[   13.569499] nand: nand_do_read_oob: from = 0x02b00000, len = 64
[   13.575532] marvell-nfc pxa3xx-nand: 
[   13.575532] NDCR:  0x9d079fff
[   13.575532] NDCB0: 0x000d3000
[   13.575532] NDCB1: 0x56000000
[   13.575532] NDCB2: 0x00000000
[   13.575532] NDCB3: 0x00000000
[   13.594464] nand: nand_do_read_oob: from = 0x02b20000, len = 64
[   13.600669] marvell-nfc pxa3xx-nand: 
[   13.600669] NDCR:  0x9d079fff
[   13.600669] NDCB0: 0x000d3000
[   13.600669] NDCB1: 0x56400000
[   13.600669] NDCB2: 0x00000000
[   13.600669] NDCB3: 0x00000000
[   13.619617] nand: nand_do_read_oob: from = 0x02b40000, len = 64
[   13.625647] marvell-nfc pxa3xx-nand: 
[   13.625647] NDCR:  0x9d079fff
[   13.625647] NDCB0: 0x000d3000
[   13.625647] NDCB1: 0x56800000
[   13.625647] NDCB2: 0x00000000
[   13.625647] NDCB3: 0x00000000
[   13.644583] nand: nand_do_read_oob: from = 0x02b60000, len = 64
[   13.650786] marvell-nfc pxa3xx-nand: 
[   13.650786] NDCR:  0x9d079fff
[   13.650786] NDCB0: 0x000d3000
[   13.650786] NDCB1: 0x56c00000
[   13.650786] NDCB2: 0x00000000
[   13.650786] NDCB3: 0x00000000
[   13.669715] nand: nand_do_read_oob: from = 0x02b80000, len = 64
[   13.675744] marvell-nfc pxa3xx-nand: 
[   13.675744] NDCR:  0x9d079fff
[   13.675744] NDCB0: 0x000d3000
[   13.675744] NDCB1: 0x57000000
[   13.675744] NDCB2: 0x00000000
[   13.675744] NDCB3: 0x00000000
[   13.694679] nand: nand_do_read_oob: from = 0x02ba0000, len = 64
[   13.700886] marvell-nfc pxa3xx-nand: 
[   13.700886] NDCR:  0x9d079fff
[   13.700886] NDCB0: 0x000d3000
[   13.700886] NDCB1: 0x57400000
[   13.700886] NDCB2: 0x00000000
[   13.700886] NDCB3: 0x00000000
[   13.719813] nand: nand_do_read_oob: from = 0x02bc0000, len = 64
[   13.725845] marvell-nfc pxa3xx-nand: 
[   13.725845] NDCR:  0x9d079fff
[   13.725845] NDCB0: 0x000d3000
[   13.725845] NDCB1: 0x57800000
[   13.725845] NDCB2: 0x00000000
[   13.725845] NDCB3: 0x00000000
[   13.744747] Bad eraseblock 350 at 0x000002bc0000
[   13.749607] nand: nand_do_read_oob: from = 0x02be0000, len = 64
[   13.755627] marvell-nfc pxa3xx-nand: 
[   13.755627] NDCR:  0x9d079fff
[   13.755627] NDCB0: 0x000d3000
[   13.755627] NDCB1: 0x57c00000
[   13.755627] NDCB2: 0x00000000
[   13.755627] NDCB3: 0x00000000
[   13.774541] nand: nand_do_read_oob: from = 0x02c00000, len = 64
[   13.780740] marvell-nfc pxa3xx-nand: 
[   13.780740] NDCR:  0x9d079fff
[   13.780740] NDCB0: 0x000d3000
[   13.780740] NDCB1: 0x58000000
[   13.780740] NDCB2: 0x00000000
[   13.780740] NDCB3: 0x00000000
[   13.799669] nand: nand_do_read_oob: from = 0x02c20000, len = 64
[   13.805700] marvell-nfc pxa3xx-nand: 
[   13.805700] NDCR:  0x9d079fff
[   13.805700] NDCB0: 0x000d3000
[   13.805700] NDCB1: 0x58400000
[   13.805700] NDCB2: 0x00000000
[   13.805700] NDCB3: 0x00000000
[   13.824633] nand: nand_do_read_oob: from = 0x02c40000, len = 64
[   13.830838] marvell-nfc pxa3xx-nand: 
[   13.830838] NDCR:  0x9d079fff
[   13.830838] NDCB0: 0x000d3000
[   13.830838] NDCB1: 0x58800000
[   13.830838] NDCB2: 0x00000000
[   13.830838] NDCB3: 0x00000000
[   13.849736] Bad eraseblock 354 at 0x000002c40000
[   13.854434] nand: nand_do_read_oob: from = 0x02c60000, len = 64
[   13.860612] marvell-nfc pxa3xx-nand: 
[   13.860612] NDCR:  0x9d079fff
[   13.860612] NDCB0: 0x000d3000
[   13.860612] NDCB1: 0x58c00000
[   13.860612] NDCB2: 0x00000000
[   13.860612] NDCB3: 0x00000000
[   13.879510] Bad eraseblock 355 at 0x000002c60000
[   13.884206] nand: nand_do_read_oob: from = 0x02c80000, len = 64
[   13.890386] marvell-nfc pxa3xx-nand: 
[   13.890386] NDCR:  0x9d079fff
[   13.890386] NDCB0: 0x000d3000
[   13.890386] NDCB1: 0x59000000
[   13.890386] NDCB2: 0x00000000
[   13.890386] NDCB3: 0x00000000
[   13.909286] Bad eraseblock 356 at 0x000002c80000
[   13.913982] nand: nand_do_read_oob: from = 0x02ca0000, len = 64
[   13.920160] marvell-nfc pxa3xx-nand: 
[   13.920160] NDCR:  0x9d079fff
[   13.920160] NDCB0: 0x000d3000
[   13.920160] NDCB1: 0x59400000
[   13.920160] NDCB2: 0x00000000
[   13.920160] NDCB3: 0x00000000
[   13.939059] Bad eraseblock 357 at 0x000002ca0000
[   13.943758] nand: nand_do_read_oob: from = 0x02cc0000, len = 64
[   13.949935] marvell-nfc pxa3xx-nand: 
[   13.949935] NDCR:  0x9d079fff
[   13.949935] NDCB0: 0x000d3000
[   13.949935] NDCB1: 0x59800000
[   13.949935] NDCB2: 0x00000000
[   13.949935] NDCB3: 0x00000000
[   13.968867] Bad eraseblock 358 at 0x000002cc0000
[   13.973569] nand: nand_do_read_oob: from = 0x02ce0000, len = 64
[   13.979741] marvell-nfc pxa3xx-nand: 
[   13.979741] NDCR:  0x9d079fff
[   13.979741] NDCB0: 0x000d3000
[   13.979741] NDCB1: 0x59c00000
[   13.979741] NDCB2: 0x00000000
[   13.979741] NDCB3: 0x00000000
[   13.998625] Bad eraseblock 359 at 0x000002ce0000
[   14.003465] nand: nand_do_read_oob: from = 0x02d00000, len = 64
[   14.009636] marvell-nfc pxa3xx-nand: 
[   14.009636] NDCR:  0x9d079fff
[   14.009636] NDCB0: 0x000d3000
[   14.009636] NDCB1: 0x5a000000
[   14.009636] NDCB2: 0x00000000
[   14.009636] NDCB3: 0x00000000
[   14.028522] Bad eraseblock 360 at 0x000002d00000
[   14.033379] nand: nand_do_read_oob: from = 0x02d20000, len = 64
[   14.039551] marvell-nfc pxa3xx-nand: 
[   14.039551] NDCR:  0x9d079fff
[   14.039551] NDCB0: 0x000d3000
[   14.039551] NDCB1: 0x5a400000
[   14.039551] NDCB2: 0x00000000
[   14.039551] NDCB3: 0x00000000
[   14.058430] Bad eraseblock 361 at 0x000002d20000
[   14.063289] nand: nand_do_read_oob: from = 0x02d40000, len = 64
[   14.069463] marvell-nfc pxa3xx-nand: 
[   14.069463] NDCR:  0x9d079fff
[   14.069463] NDCB0: 0x000d3000
[   14.069463] NDCB1: 0x5a800000
[   14.069463] NDCB2: 0x00000000
[   14.069463] NDCB3: 0x00000000
[   14.088345] Bad eraseblock 362 at 0x000002d40000
[   14.093533] nand: nand_do_read_oob: from = 0x02d60000, len = 64
[   14.099766] marvell-nfc pxa3xx-nand: 
[   14.099766] NDCR:  0x9d079fff
[   14.099766] NDCB0: 0x000d3000
[   14.099766] NDCB1: 0x5ac00000
[   14.099766] NDCB2: 0x00000000
[   14.099766] NDCB3: 0x00000000
[   14.118873] Bad eraseblock 363 at 0x000002d60000
[   14.123585] nand: nand_do_read_oob: from = 0x02d80000, len = 64
[   14.129771] marvell-nfc pxa3xx-nand: 
[   14.129771] NDCR:  0x9d079fff
[   14.129771] NDCB0: 0x000d3000
[   14.129771] NDCB1: 0x5b000000
[   14.129771] NDCB2: 0x00000000
[   14.129771] NDCB3: 0x00000000
[   14.148757] Bad eraseblock 364 at 0x000002d80000
[   14.153462] nand: nand_do_read_oob: from = 0x02da0000, len = 64
[   14.159630] marvell-nfc pxa3xx-nand: 
[   14.159630] NDCR:  0x9d079fff
[   14.159630] NDCB0: 0x000d3000
[   14.159630] NDCB1: 0x5b400000
[   14.159630] NDCB2: 0x00000000
[   14.159630] NDCB3: 0x00000000
[   14.178515] Bad eraseblock 365 at 0x000002da0000
[   14.183394] nand: nand_do_read_oob: from = 0x02dc0000, len = 64
[   14.189573] marvell-nfc pxa3xx-nand: 
[   14.189573] NDCR:  0x9d079fff
[   14.189573] NDCB0: 0x000d3000
[   14.189573] NDCB1: 0x5b800000
[   14.189573] NDCB2: 0x00000000
[   14.189573] NDCB3: 0x00000000
[   14.208459] Bad eraseblock 366 at 0x000002dc0000
[   14.213319] nand: nand_do_read_oob: from = 0x02de0000, len = 64
[   14.219491] marvell-nfc pxa3xx-nand: 
[   14.219491] NDCR:  0x9d079fff
[   14.219491] NDCB0: 0x000d3000
[   14.219491] NDCB1: 0x5bc00000
[   14.219491] NDCB2: 0x00000000
[   14.219491] NDCB3: 0x00000000
[   14.238369] Bad eraseblock 367 at 0x000002de0000
[   14.243221] nand: nand_do_read_oob: from = 0x02e00000, len = 64
[   14.249395] marvell-nfc pxa3xx-nand: 
[   14.249395] NDCR:  0x9d079fff
[   14.249395] NDCB0: 0x000d3000
[   14.249395] NDCB1: 0x5c000000
[   14.249395] NDCB2: 0x00000000
[   14.249395] NDCB3: 0x00000000
[   14.268278] Bad eraseblock 368 at 0x000002e00000
[   14.273135] nand: nand_do_read_oob: from = 0x02e20000, len = 64
[   14.279309] marvell-nfc pxa3xx-nand: 
[   14.279309] NDCR:  0x9d079fff
[   14.279309] NDCB0: 0x000d3000
[   14.279309] NDCB1: 0x5c400000
[   14.279309] NDCB2: 0x00000000
[   14.279309] NDCB3: 0x00000000
[   14.298188] Bad eraseblock 369 at 0x000002e20000
[   14.303049] nand: nand_do_read_oob: from = 0x02e40000, len = 64
[   14.309222] marvell-nfc pxa3xx-nand: 
[   14.309222] NDCR:  0x9d079fff
[   14.309222] NDCB0: 0x000d3000
[   14.309222] NDCB1: 0x5c800000
[   14.309222] NDCB2: 0x00000000
[   14.309222] NDCB3: 0x00000000
[   14.328099] Bad eraseblock 370 at 0x000002e40000
[   14.332952] nand: nand_do_read_oob: from = 0x02e60000, len = 64
[   14.339124] marvell-nfc pxa3xx-nand: 
[   14.339124] NDCR:  0x9d079fff
[   14.339124] NDCB0: 0x000d3000
[   14.339124] NDCB1: 0x5cc00000
[   14.339124] NDCB2: 0x00000000
[   14.339124] NDCB3: 0x00000000
[   14.358005] Bad eraseblock 371 at 0x000002e60000
[   14.362864] nand: nand_do_read_oob: from = 0x02e80000, len = 64
[   14.369038] marvell-nfc pxa3xx-nand: 
[   14.369038] NDCR:  0x9d079fff
[   14.369038] NDCB0: 0x000d3000
[   14.369038] NDCB1: 0x5d000000
[   14.369038] NDCB2: 0x00000000
[   14.369038] NDCB3: 0x00000000
[   14.387917] Bad eraseblock 372 at 0x000002e80000
[   14.392775] nand: nand_do_read_oob: from = 0x02ea0000, len = 64
[   14.398949] marvell-nfc pxa3xx-nand: 
[   14.398949] NDCR:  0x9d079fff
[   14.398949] NDCB0: 0x000d3000
[   14.398949] NDCB1: 0x5d400000
[   14.398949] NDCB2: 0x00000000
[   14.398949] NDCB3: 0x00000000
[   14.417829] Bad eraseblock 373 at 0x000002ea0000
[   14.422689] nand: nand_do_read_oob: from = 0x02ec0000, len = 64
[   14.428863] marvell-nfc pxa3xx-nand: 
[   14.428863] NDCR:  0x9d079fff
[   14.428863] NDCB0: 0x000d3000
[   14.428863] NDCB1: 0x5d800000
[   14.428863] NDCB2: 0x00000000
[   14.428863] NDCB3: 0x00000000
[   14.447745] Bad eraseblock 374 at 0x000002ec0000
[   14.452599] nand: nand_do_read_oob: from = 0x02ee0000, len = 64
[   14.458626] marvell-nfc pxa3xx-nand: 
[   14.458626] NDCR:  0x9d079fff
[   14.458626] NDCB0: 0x000d3000
[   14.458626] NDCB1: 0x5dc00000
[   14.458626] NDCB2: 0x00000000
[   14.458626] NDCB3: 0x00000000
[   14.477616] Bad eraseblock 375 at 0x000002ee0000
[   14.482471] nand: nand_do_read_oob: from = 0x02f00000, len = 64
[   14.488494] marvell-nfc pxa3xx-nand: 
[   14.488494] NDCR:  0x9d079fff
[   14.488494] NDCB0: 0x000d3000
[   14.488494] NDCB1: 0x5e000000
[   14.488494] NDCB2: 0x00000000
[   14.488494] NDCB3: 0x00000000
[   14.507377] Bad eraseblock 376 at 0x000002f00000
[   14.512238] nand: nand_do_read_oob: from = 0x02f20000, len = 64
[   14.518261] marvell-nfc pxa3xx-nand: 
[   14.518261] NDCR:  0x9d079fff
[   14.518261] NDCB0: 0x000d3000
[   14.518261] NDCB1: 0x5e400000
[   14.518261] NDCB2: 0x00000000
[   14.518261] NDCB3: 0x00000000
[   14.537141] Bad eraseblock 377 at 0x000002f20000
[   14.541995] nand: nand_do_read_oob: from = 0x02f40000, len = 64
[   14.548019] marvell-nfc pxa3xx-nand: 
[   14.548019] NDCR:  0x9d079fff
[   14.548019] NDCB0: 0x000d3000
[   14.548019] NDCB1: 0x5e800000
[   14.548019] NDCB2: 0x00000000
[   14.548019] NDCB3: 0x00000000
[   14.566900] Bad eraseblock 378 at 0x000002f40000
[   14.571753] nand: nand_do_read_oob: from = 0x02f60000, len = 64
[   14.577775] marvell-nfc pxa3xx-nand: 
[   14.577775] NDCR:  0x9d079fff
[   14.577775] NDCB0: 0x000d3000
[   14.577775] NDCB1: 0x5ec00000
[   14.577775] NDCB2: 0x00000000
[   14.577775] NDCB3: 0x00000000
[   14.596659] Bad eraseblock 379 at 0x000002f60000
[   14.601510] nand: nand_do_read_oob: from = 0x02f80000, len = 64
[   14.607534] marvell-nfc pxa3xx-nand: 
[   14.607534] NDCR:  0x9d079fff
[   14.607534] NDCB0: 0x000d3000
[   14.607534] NDCB1: 0x5f000000
[   14.607534] NDCB2: 0x00000000
[   14.607534] NDCB3: 0x00000000
[   14.626415] Bad eraseblock 380 at 0x000002f80000
[   14.631268] nand: nand_do_read_oob: from = 0x02fa0000, len = 64
[   14.637290] marvell-nfc pxa3xx-nand: 
[   14.637290] NDCR:  0x9d079fff
[   14.637290] NDCB0: 0x000d3000
[   14.637290] NDCB1: 0x5f400000
[   14.637290] NDCB2: 0x00000000
[   14.637290] NDCB3: 0x00000000
[   14.656171] Bad eraseblock 381 at 0x000002fa0000
[   14.661027] nand: nand_do_read_oob: from = 0x02fc0000, len = 64
[   14.667048] marvell-nfc pxa3xx-nand: 
[   14.667048] NDCR:  0x9d079fff
[   14.667048] NDCB0: 0x000d3000
[   14.667048] NDCB1: 0x5f800000
[   14.667048] NDCB2: 0x00000000
[   14.667048] NDCB3: 0x00000000
[   14.685931] Bad eraseblock 382 at 0x000002fc0000
[   14.690792] nand: nand_do_read_oob: from = 0x02fe0000, len = 64
[   14.696815] marvell-nfc pxa3xx-nand: 
[   14.696815] NDCR:  0x9d079fff
[   14.696815] NDCB0: 0x000d3000
[   14.696815] NDCB1: 0x5fc00000
[   14.696815] NDCB2: 0x00000000
[   14.696815] NDCB3: 0x00000000
[   14.715697] Bad eraseblock 383 at 0x000002fe0000
[   14.720575] nand: nand_do_read_oob: from = 0x03000000, len = 64
[   14.726598] marvell-nfc pxa3xx-nand: 
[   14.726598] NDCR:  0x9d079fff
[   14.726598] NDCB0: 0x000d3000
[   14.726598] NDCB1: 0x60000000
[   14.726598] NDCB2: 0x00000000
[   14.726598] NDCB3: 0x00000000
[   14.745487] Bad eraseblock 384 at 0x000003000000
[   14.750344] nand: nand_do_read_oob: from = 0x03020000, len = 64
[   14.756365] marvell-nfc pxa3xx-nand: 
[   14.756365] NDCR:  0x9d079fff
[   14.756365] NDCB0: 0x000d3000
[   14.756365] NDCB1: 0x60400000
[   14.756365] NDCB2: 0x00000000
[   14.756365] NDCB3: 0x00000000
[   14.775252] Bad eraseblock 385 at 0x000003020000
[   14.780107] nand: nand_do_read_oob: from = 0x03040000, len = 64
[   14.786131] marvell-nfc pxa3xx-nand: 
[   14.786131] NDCR:  0x9d079fff
[   14.786131] NDCB0: 0x000d3000
[   14.786131] NDCB1: 0x60800000
[   14.786131] NDCB2: 0x00000000
[   14.786131] NDCB3: 0x00000000
[   14.805015] Bad eraseblock 386 at 0x000003040000
[   14.809873] nand: nand_do_read_oob: from = 0x03060000, len = 64
[   14.815897] marvell-nfc pxa3xx-nand: 
[   14.815897] NDCR:  0x9d079fff
[   14.815897] NDCB0: 0x000d3000
[   14.815897] NDCB1: 0x60c00000
[   14.815897] NDCB2: 0x00000000
[   14.815897] NDCB3: 0x00000000
[   14.834782] Bad eraseblock 387 at 0x000003060000
[   14.839640] nand: nand_do_read_oob: from = 0x03080000, len = 64
[   14.845663] marvell-nfc pxa3xx-nand: 
[   14.845663] NDCR:  0x9d079fff
[   14.845663] NDCB0: 0x000d3000
[   14.845663] NDCB1: 0x61000000
[   14.845663] NDCB2: 0x00000000
[   14.845663] NDCB3: 0x00000000
[   14.864548] Bad eraseblock 388 at 0x000003080000
[   14.869407] nand: nand_do_read_oob: from = 0x030a0000, len = 64
[   14.875429] marvell-nfc pxa3xx-nand: 
[   14.875429] NDCR:  0x9d079fff
[   14.875429] NDCB0: 0x000d3000
[   14.875429] NDCB1: 0x61400000
[   14.875429] NDCB2: 0x00000000
[   14.875429] NDCB3: 0x00000000
[   14.894311] Bad eraseblock 389 at 0x0000030a0000
[   14.899163] nand: nand_do_read_oob: from = 0x030c0000, len = 64
[   14.905187] marvell-nfc pxa3xx-nand: 
[   14.905187] NDCR:  0x9d079fff
[   14.905187] NDCB0: 0x000d3000
[   14.905187] NDCB1: 0x61800000
[   14.905187] NDCB2: 0x00000000
[   14.905187] NDCB3: 0x00000000
[   14.924069] Bad eraseblock 390 at 0x0000030c0000
[   14.928930] nand: nand_do_read_oob: from = 0x030e0000, len = 64
[   14.934954] marvell-nfc pxa3xx-nand: 
[   14.934954] NDCR:  0x9d079fff
[   14.934954] NDCB0: 0x000d3000
[   14.934954] NDCB1: 0x61c00000
[   14.934954] NDCB2: 0x00000000
[   14.934954] NDCB3: 0x00000000
[   14.953835] Bad eraseblock 391 at 0x0000030e0000
[   14.958538] nand: nand_do_read_oob: from = 0x03100000, len = 64
[   14.964718] marvell-nfc pxa3xx-nand: 
[   14.964718] NDCR:  0x9d079fff
[   14.964718] NDCB0: 0x000d3000
[   14.964718] NDCB1: 0x62000000
[   14.964718] NDCB2: 0x00000000
[   14.964718] NDCB3: 0x00000000
[   14.983615] Bad eraseblock 392 at 0x000003100000
[   14.988312] nand: nand_do_read_oob: from = 0x03120000, len = 64
[   14.994491] marvell-nfc pxa3xx-nand: 
[   14.994491] NDCR:  0x9d079fff
[   14.994491] NDCB0: 0x000d3000
[   14.994491] NDCB1: 0x62400000
[   14.994491] NDCB2: 0x00000000
[   14.994491] NDCB3: 0x00000000
[   15.013402] Bad eraseblock 393 at 0x000003120000
[   15.018106] nand: nand_do_read_oob: from = 0x03140000, len = 64
[   15.024291] marvell-nfc pxa3xx-nand: 
[   15.024291] NDCR:  0x9d079fff
[   15.024291] NDCB0: 0x000d3000
[   15.024291] NDCB1: 0x62800000
[   15.024291] NDCB2: 0x00000000
[   15.024291] NDCB3: 0x00000000
[   15.043190] Bad eraseblock 394 at 0x000003140000
[   15.047888] nand: nand_do_read_oob: from = 0x03160000, len = 64
[   15.054068] marvell-nfc pxa3xx-nand: 
[   15.054068] NDCR:  0x9d079fff
[   15.054068] NDCB0: 0x000d3000
[   15.054068] NDCB1: 0x62c00000
[   15.054068] NDCB2: 0x00000000
[   15.054068] NDCB3: 0x00000000
[   15.072964] Bad eraseblock 395 at 0x000003160000
[   15.077661] nand: nand_do_read_oob: from = 0x03180000, len = 64
[   15.083840] marvell-nfc pxa3xx-nand: 
[   15.083840] NDCR:  0x9d079fff
[   15.083840] NDCB0: 0x000d3000
[   15.083840] NDCB1: 0x63000000
[   15.083840] NDCB2: 0x00000000
[   15.083840] NDCB3: 0x00000000
[   15.102738] Bad eraseblock 396 at 0x000003180000
[   15.107438] nand: nand_do_read_oob: from = 0x031a0000, len = 64
[   15.113614] marvell-nfc pxa3xx-nand: 
[   15.113614] NDCR:  0x9d079fff
[   15.113614] NDCB0: 0x000d3000
[   15.113614] NDCB1: 0x63400000
[   15.113614] NDCB2: 0x00000000
[   15.113614] NDCB3: 0x00000000
[   15.132513] Bad eraseblock 397 at 0x0000031a0000
[   15.137211] nand: nand_do_read_oob: from = 0x031c0000, len = 64
[   15.143391] marvell-nfc pxa3xx-nand: 
[   15.143391] NDCR:  0x9d079fff
[   15.143391] NDCB0: 0x000d3000
[   15.143391] NDCB1: 0x63800000
[   15.143391] NDCB2: 0x00000000
[   15.143391] NDCB3: 0x00000000
[   15.162287] Bad eraseblock 398 at 0x0000031c0000
[   15.166986] nand: nand_do_read_oob: from = 0x031e0000, len = 64
[   15.173164] marvell-nfc pxa3xx-nand: 
[   15.173164] NDCR:  0x9d079fff
[   15.173164] NDCB0: 0x000d3000
[   15.173164] NDCB1: 0x63c00000
[   15.173164] NDCB2: 0x00000000
[   15.173164] NDCB3: 0x00000000
[   15.192064] Bad eraseblock 399 at 0x0000031e0000
[   15.196761] nand: nand_do_read_oob: from = 0x03200000, len = 64
[   15.202939] marvell-nfc pxa3xx-nand: 
[   15.202939] NDCR:  0x9d079fff
[   15.202939] NDCB0: 0x000d3000
[   15.202939] NDCB1: 0x64000000
[   15.202939] NDCB2: 0x00000000
[   15.202939] NDCB3: 0x00000000
[   15.221831] Bad eraseblock 400 at 0x000003200000
[   15.226527] nand: nand_do_read_oob: from = 0x03220000, len = 64
[   15.232706] marvell-nfc pxa3xx-nand: 
[   15.232706] NDCR:  0x9d079fff
[   15.232706] NDCB0: 0x000d3000
[   15.232706] NDCB1: 0x64400000
[   15.232706] NDCB2: 0x00000000
[   15.232706] NDCB3: 0x00000000
[   15.251605] Bad eraseblock 401 at 0x000003220000
[   15.256301] nand: nand_do_read_oob: from = 0x03240000, len = 64
[   15.262479] marvell-nfc pxa3xx-nand: 
[   15.262479] NDCR:  0x9d079fff
[   15.262479] NDCB0: 0x000d3000
[   15.262479] NDCB1: 0x64800000
[   15.262479] NDCB2: 0x00000000
[   15.262479] NDCB3: 0x00000000
[   15.281371] Bad eraseblock 402 at 0x000003240000
[   15.286068] nand: nand_do_read_oob: from = 0x03260000, len = 64
[   15.292246] marvell-nfc pxa3xx-nand: 
[   15.292246] NDCR:  0x9d079fff
[   15.292246] NDCB0: 0x000d3000
[   15.292246] NDCB1: 0x64c00000
[   15.292246] NDCB2: 0x00000000
[   15.292246] NDCB3: 0x00000000
[   15.311177] nand: nand_do_read_oob: from = 0x03280000, len = 64
[   15.317209] marvell-nfc pxa3xx-nand: 
[   15.317209] NDCR:  0x9d079fff
[   15.317209] NDCB0: 0x000d3000
[   15.317209] NDCB1: 0x65000000
[   15.317209] NDCB2: 0x00000000
[   15.317209] NDCB3: 0x00000000
[   15.336142] nand: nand_do_read_oob: from = 0x032a0000, len = 64
[   15.342347] marvell-nfc pxa3xx-nand: 
[   15.342347] NDCR:  0x9d079fff
[   15.342347] NDCB0: 0x000d3000
[   15.342347] NDCB1: 0x65400000
[   15.342347] NDCB2: 0x00000000
[   15.342347] NDCB3: 0x00000000
[   15.361294] nand: nand_do_read_oob: from = 0x032c0000, len = 64
[   15.367324] marvell-nfc pxa3xx-nand: 
[   15.367324] NDCR:  0x9d079fff
[   15.367324] NDCB0: 0x000d3000
[   15.367324] NDCB1: 0x65800000
[   15.367324] NDCB2: 0x00000000
[   15.367324] NDCB3: 0x00000000
[   15.386260] nand: nand_do_read_oob: from = 0x032e0000, len = 64
[   15.392463] marvell-nfc pxa3xx-nand: 
[   15.392463] NDCR:  0x9d079fff
[   15.392463] NDCB0: 0x000d3000
[   15.392463] NDCB1: 0x65c00000
[   15.392463] NDCB2: 0x00000000
[   15.392463] NDCB3: 0x00000000
[   15.411391] nand: nand_do_read_oob: from = 0x03300000, len = 64
[   15.417424] marvell-nfc pxa3xx-nand: 
[   15.417424] NDCR:  0x9d079fff
[   15.417424] NDCB0: 0x000d3000
[   15.417424] NDCB1: 0x66000000
[   15.417424] NDCB2: 0x00000000
[   15.417424] NDCB3: 0x00000000
[   15.436353] nand: nand_do_read_oob: from = 0x03320000, len = 64
[   15.442555] marvell-nfc pxa3xx-nand: 
[   15.442555] NDCR:  0x9d079fff
[   15.442555] NDCB0: 0x000d3000
[   15.442555] NDCB1: 0x66400000
[   15.442555] NDCB2: 0x00000000
[   15.442555] NDCB3: 0x00000000
[   15.461482] nand: nand_do_read_oob: from = 0x03340000, len = 64
[   15.467512] marvell-nfc pxa3xx-nand: 
[   15.467512] NDCR:  0x9d079fff
[   15.467512] NDCB0: 0x000d3000
[   15.467512] NDCB1: 0x66800000
[   15.467512] NDCB2: 0x00000000
[   15.467512] NDCB3: 0x00000000
[   15.486447] nand: nand_do_read_oob: from = 0x03360000, len = 64
[   15.492651] marvell-nfc pxa3xx-nand: 
[   15.492651] NDCR:  0x9d079fff
[   15.492651] NDCB0: 0x000d3000
[   15.492651] NDCB1: 0x66c00000
[   15.492651] NDCB2: 0x00000000
[   15.492651] NDCB3: 0x00000000
[   15.511580] nand: nand_do_read_oob: from = 0x03380000, len = 64
[   15.517610] marvell-nfc pxa3xx-nand: 
[   15.517610] NDCR:  0x9d079fff
[   15.517610] NDCB0: 0x000d3000
[   15.517610] NDCB1: 0x67000000
[   15.517610] NDCB2: 0x00000000
[   15.517610] NDCB3: 0x00000000
[   15.536551] nand: nand_do_read_oob: from = 0x033a0000, len = 64
[   15.542750] marvell-nfc pxa3xx-nand: 
[   15.542750] NDCR:  0x9d079fff
[   15.542750] NDCB0: 0x000d3000
[   15.542750] NDCB1: 0x67400000
[   15.542750] NDCB2: 0x00000000
[   15.542750] NDCB3: 0x00000000
[   15.561678] nand: nand_do_read_oob: from = 0x033c0000, len = 64
[   15.567711] marvell-nfc pxa3xx-nand: 
[   15.567711] NDCR:  0x9d079fff
[   15.567711] NDCB0: 0x000d3000
[   15.567711] NDCB1: 0x67800000
[   15.567711] NDCB2: 0x00000000
[   15.567711] NDCB3: 0x00000000
[   15.586643] nand: nand_do_read_oob: from = 0x033e0000, len = 64
[   15.592851] marvell-nfc pxa3xx-nand: 
[   15.592851] NDCR:  0x9d079fff
[   15.592851] NDCB0: 0x000d3000
[   15.592851] NDCB1: 0x67c00000
[   15.592851] NDCB2: 0x00000000
[   15.592851] NDCB3: 0x00000000
[   15.611775] nand: nand_do_read_oob: from = 0x03400000, len = 64
[   15.617808] marvell-nfc pxa3xx-nand: 
[   15.617808] NDCR:  0x9d079fff
[   15.617808] NDCB0: 0x000d3000
[   15.617808] NDCB1: 0x68000000
[   15.617808] NDCB2: 0x00000000
[   15.617808] NDCB3: 0x00000000
[   15.636743] nand: nand_do_read_oob: from = 0x03420000, len = 64
[   15.642945] marvell-nfc pxa3xx-nand: 
[   15.642945] NDCR:  0x9d079fff
[   15.642945] NDCB0: 0x000d3000
[   15.642945] NDCB1: 0x68400000
[   15.642945] NDCB2: 0x00000000
[   15.642945] NDCB3: 0x00000000
[   15.661875] nand: nand_do_read_oob: from = 0x03440000, len = 64
[   15.667906] marvell-nfc pxa3xx-nand: 
[   15.667906] NDCR:  0x9d079fff
[   15.667906] NDCB0: 0x000d3000
[   15.667906] NDCB1: 0x68800000
[   15.667906] NDCB2: 0x00000000
[   15.667906] NDCB3: 0x00000000
[   15.686838] nand: nand_do_read_oob: from = 0x03460000, len = 64
[   15.693038] marvell-nfc pxa3xx-nand: 
[   15.693038] NDCR:  0x9d079fff
[   15.693038] NDCB0: 0x000d3000
[   15.693038] NDCB1: 0x68c00000
[   15.693038] NDCB2: 0x00000000
[   15.693038] NDCB3: 0x00000000
[   15.711963] nand: nand_do_read_oob: from = 0x03480000, len = 64
[   15.717998] marvell-nfc pxa3xx-nand: 
[   15.717998] NDCR:  0x9d079fff
[   15.717998] NDCB0: 0x000d3000
[   15.717998] NDCB1: 0x69000000
[   15.717998] NDCB2: 0x00000000
[   15.717998] NDCB3: 0x00000000
[   15.736929] nand: nand_do_read_oob: from = 0x034a0000, len = 64
[   15.743137] marvell-nfc pxa3xx-nand: 
[   15.743137] NDCR:  0x9d079fff
[   15.743137] NDCB0: 0x000d3000
[   15.743137] NDCB1: 0x69400000
[   15.743137] NDCB2: 0x00000000
[   15.743137] NDCB3: 0x00000000
[   15.762067] nand: nand_do_read_oob: from = 0x034c0000, len = 64
[   15.768095] marvell-nfc pxa3xx-nand: 
[   15.768095] NDCR:  0x9d079fff
[   15.768095] NDCB0: 0x000d3000
[   15.768095] NDCB1: 0x69800000
[   15.768095] NDCB2: 0x00000000
[   15.768095] NDCB3: 0x00000000
[   15.787028] nand: nand_do_read_oob: from = 0x034e0000, len = 64
[   15.793233] marvell-nfc pxa3xx-nand: 
[   15.793233] NDCR:  0x9d079fff
[   15.793233] NDCB0: 0x000d3000
[   15.793233] NDCB1: 0x69c00000
[   15.793233] NDCB2: 0x00000000
[   15.793233] NDCB3: 0x00000000
[   15.812162] nand: nand_do_read_oob: from = 0x03500000, len = 64
[   15.818194] marvell-nfc pxa3xx-nand: 
[   15.818194] NDCR:  0x9d079fff
[   15.818194] NDCB0: 0x000d3000
[   15.818194] NDCB1: 0x6a000000
[   15.818194] NDCB2: 0x00000000
[   15.818194] NDCB3: 0x00000000
[   15.837126] nand: nand_do_read_oob: from = 0x03520000, len = 64
[   15.843332] marvell-nfc pxa3xx-nand: 
[   15.843332] NDCR:  0x9d079fff
[   15.843332] NDCB0: 0x000d3000
[   15.843332] NDCB1: 0x6a400000
[   15.843332] NDCB2: 0x00000000
[   15.843332] NDCB3: 0x00000000
[   15.862261] nand: nand_do_read_oob: from = 0x03540000, len = 64
[   15.868293] marvell-nfc pxa3xx-nand: 
[   15.868293] NDCR:  0x9d079fff
[   15.868293] NDCB0: 0x000d3000
[   15.868293] NDCB1: 0x6a800000
[   15.868293] NDCB2: 0x00000000
[   15.868293] NDCB3: 0x00000000
[   15.887223] nand: nand_do_read_oob: from = 0x03560000, len = 64
[   15.893432] marvell-nfc pxa3xx-nand: 
[   15.893432] NDCR:  0x9d079fff
[   15.893432] NDCB0: 0x000d3000
[   15.893432] NDCB1: 0x6ac00000
[   15.893432] NDCB2: 0x00000000
[   15.893432] NDCB3: 0x00000000
[   15.912358] nand: nand_do_read_oob: from = 0x03580000, len = 64
[   15.918389] marvell-nfc pxa3xx-nand: 
[   15.918389] NDCR:  0x9d079fff
[   15.918389] NDCB0: 0x000d3000
[   15.918389] NDCB1: 0x6b000000
[   15.918389] NDCB2: 0x00000000
[   15.918389] NDCB3: 0x00000000
[   15.937323] nand: nand_do_read_oob: from = 0x035a0000, len = 64
[   15.943528] marvell-nfc pxa3xx-nand: 
[   15.943528] NDCR:  0x9d079fff
[   15.943528] NDCB0: 0x000d3000
[   15.943528] NDCB1: 0x6b400000
[   15.943528] NDCB2: 0x00000000
[   15.943528] NDCB3: 0x00000000
[   15.962458] nand: nand_do_read_oob: from = 0x035c0000, len = 64
[   15.968490] marvell-nfc pxa3xx-nand: 
[   15.968490] NDCR:  0x9d079fff
[   15.968490] NDCB0: 0x000d3000
[   15.968490] NDCB1: 0x6b800000
[   15.968490] NDCB2: 0x00000000
[   15.968490] NDCB3: 0x00000000
[   15.987421] nand: nand_do_read_oob: from = 0x035e0000, len = 64
[   15.993628] marvell-nfc pxa3xx-nand: 
[   15.993628] NDCR:  0x9d079fff
[   15.993628] NDCB0: 0x000d3000
[   15.993628] NDCB1: 0x6bc00000
[   15.993628] NDCB2: 0x00000000
[   15.993628] NDCB3: 0x00000000
[   16.012583] nand: nand_do_read_oob: from = 0x03600000, len = 64
[   16.018614] marvell-nfc pxa3xx-nand: 
[   16.018614] NDCR:  0x9d079fff
[   16.018614] NDCB0: 0x000d3000
[   16.018614] NDCB1: 0x6c000000
[   16.018614] NDCB2: 0x00000000
[   16.018614] NDCB3: 0x00000000
[   16.037664] nand: nand_do_read_oob: from = 0x03620000, len = 64
[   16.043862] marvell-nfc pxa3xx-nand: 
[   16.043862] NDCR:  0x9d079fff
[   16.043862] NDCB0: 0x000d3000
[   16.043862] NDCB1: 0x6c400000
[   16.043862] NDCB2: 0x00000000
[   16.043862] NDCB3: 0x00000000
[   16.062792] nand: nand_do_read_oob: from = 0x03640000, len = 64
[   16.068995] marvell-nfc pxa3xx-nand: 
[   16.068995] NDCR:  0x9d079fff
[   16.068995] NDCB0: 0x000d3000
[   16.068995] NDCB1: 0x6c800000
[   16.068995] NDCB2: 0x00000000
[   16.068995] NDCB3: 0x00000000
[   16.087911] nand: nand_do_read_oob: from = 0x03660000, len = 64
[   16.094597] marvell-nfc pxa3xx-nand: 
[   16.094597] NDCR:  0x9d079fff
[   16.094597] NDCB0: 0x000d3000
[   16.094597] NDCB1: 0x6cc00000
[   16.094597] NDCB2: 0x00000000
[   16.094597] NDCB3: 0x00000000
[   16.113619] nand: nand_do_read_oob: from = 0x03680000, len = 64
[   16.119819] marvell-nfc pxa3xx-nand: 
[   16.119819] NDCR:  0x9d079fff
[   16.119819] NDCB0: 0x000d3000
[   16.119819] NDCB1: 0x6d000000
[   16.119819] NDCB2: 0x00000000
[   16.119819] NDCB3: 0x00000000
[   16.138936] nand: nand_do_read_oob: from = 0x036a0000, len = 64
[   16.144980] marvell-nfc pxa3xx-nand: 
[   16.144980] NDCR:  0x9d079fff
[   16.144980] NDCB0: 0x000d3000
[   16.144980] NDCB1: 0x6d400000
[   16.144980] NDCB2: 0x00000000
[   16.144980] NDCB3: 0x00000000
[   16.163932] nand: nand_do_read_oob: from = 0x036c0000, len = 64
[   16.170140] marvell-nfc pxa3xx-nand: 
[   16.170140] NDCR:  0x9d079fff
[   16.170140] NDCB0: 0x000d3000
[   16.170140] NDCB1: 0x6d800000
[   16.170140] NDCB2: 0x00000000
[   16.170140] NDCB3: 0x00000000
[   16.189067] nand: nand_do_read_oob: from = 0x036e0000, len = 64
[   16.195099] marvell-nfc pxa3xx-nand: 
[   16.195099] NDCR:  0x9d079fff
[   16.195099] NDCB0: 0x000d3000
[   16.195099] NDCB1: 0x6dc00000
[   16.195099] NDCB2: 0x00000000
[   16.195099] NDCB3: 0x00000000
[   16.214034] nand: nand_do_read_oob: from = 0x03700000, len = 64
[   16.220239] marvell-nfc pxa3xx-nand: 
[   16.220239] NDCR:  0x9d079fff
[   16.220239] NDCB0: 0x000d3000
[   16.220239] NDCB1: 0x6e000000
[   16.220239] NDCB2: 0x00000000
[   16.220239] NDCB3: 0x00000000
[   16.239166] nand: nand_do_read_oob: from = 0x03720000, len = 64
[   16.245199] marvell-nfc pxa3xx-nand: 
[   16.245199] NDCR:  0x9d079fff
[   16.245199] NDCB0: 0x000d3000
[   16.245199] NDCB1: 0x6e400000
[   16.245199] NDCB2: 0x00000000
[   16.245199] NDCB3: 0x00000000
[   16.264131] nand: nand_do_read_oob: from = 0x03740000, len = 64
[   16.270338] marvell-nfc pxa3xx-nand: 
[   16.270338] NDCR:  0x9d079fff
[   16.270338] NDCB0: 0x000d3000
[   16.270338] NDCB1: 0x6e800000
[   16.270338] NDCB2: 0x00000000
[   16.270338] NDCB3: 0x00000000
[   16.289263] nand: nand_do_read_oob: from = 0x03760000, len = 64
[   16.295298] marvell-nfc pxa3xx-nand: 
[   16.295298] NDCR:  0x9d079fff
[   16.295298] NDCB0: 0x000d3000
[   16.295298] NDCB1: 0x6ec00000
[   16.295298] NDCB2: 0x00000000
[   16.295298] NDCB3: 0x00000000
[   16.314230] nand: nand_do_read_oob: from = 0x03780000, len = 64
[   16.320435] marvell-nfc pxa3xx-nand: 
[   16.320435] NDCR:  0x9d079fff
[   16.320435] NDCB0: 0x000d3000
[   16.320435] NDCB1: 0x6f000000
[   16.320435] NDCB2: 0x00000000
[   16.320435] NDCB3: 0x00000000
[   16.339368] nand: nand_do_read_oob: from = 0x037a0000, len = 64
[   16.345403] marvell-nfc pxa3xx-nand: 
[   16.345403] NDCR:  0x9d079fff
[   16.345403] NDCB0: 0x000d3000
[   16.345403] NDCB1: 0x6f400000
[   16.345403] NDCB2: 0x00000000
[   16.345403] NDCB3: 0x00000000
[   16.364339] nand: nand_do_read_oob: from = 0x037c0000, len = 64
[   16.370541] marvell-nfc pxa3xx-nand: 
[   16.370541] NDCR:  0x9d079fff
[   16.370541] NDCB0: 0x000d3000
[   16.370541] NDCB1: 0x6f800000
[   16.370541] NDCB2: 0x00000000
[   16.370541] NDCB3: 0x00000000
[   16.389471] nand: nand_do_read_oob: from = 0x037e0000, len = 64
[   16.395504] marvell-nfc pxa3xx-nand: 
[   16.395504] NDCR:  0x9d079fff
[   16.395504] NDCB0: 0x000d3000
[   16.395504] NDCB1: 0x6fc00000
[   16.395504] NDCB2: 0x00000000
[   16.395504] NDCB3: 0x00000000
[   16.414434] nand: nand_do_read_oob: from = 0x03800000, len = 64
[   16.420642] marvell-nfc pxa3xx-nand: 
[   16.420642] NDCR:  0x9d079fff
[   16.420642] NDCB0: 0x000d3000
[   16.420642] NDCB1: 0x70000000
[   16.420642] NDCB2: 0x00000000
[   16.420642] NDCB3: 0x00000000
[   16.439569] nand: nand_do_read_oob: from = 0x03820000, len = 64
[   16.445602] marvell-nfc pxa3xx-nand: 
[   16.445602] NDCR:  0x9d079fff
[   16.445602] NDCB0: 0x000d3000
[   16.445602] NDCB1: 0x70400000
[   16.445602] NDCB2: 0x00000000
[   16.445602] NDCB3: 0x00000000
[   16.464534] nand: nand_do_read_oob: from = 0x03840000, len = 64
[   16.470738] marvell-nfc pxa3xx-nand: 
[   16.470738] NDCR:  0x9d079fff
[   16.470738] NDCB0: 0x000d3000
[   16.470738] NDCB1: 0x70800000
[   16.470738] NDCB2: 0x00000000
[   16.470738] NDCB3: 0x00000000
[   16.489668] nand: nand_do_read_oob: from = 0x03860000, len = 64
[   16.495698] marvell-nfc pxa3xx-nand: 
[   16.495698] NDCR:  0x9d079fff
[   16.495698] NDCB0: 0x000d3000
[   16.495698] NDCB1: 0x70c00000
[   16.495698] NDCB2: 0x00000000
[   16.495698] NDCB3: 0x00000000
[   16.514633] nand: nand_do_read_oob: from = 0x03880000, len = 64
[   16.520836] marvell-nfc pxa3xx-nand: 
[   16.520836] NDCR:  0x9d079fff
[   16.520836] NDCB0: 0x000d3000
[   16.520836] NDCB1: 0x71000000
[   16.520836] NDCB2: 0x00000000
[   16.520836] NDCB3: 0x00000000
[   16.539765] nand: nand_do_read_oob: from = 0x038a0000, len = 64
[   16.545799] marvell-nfc pxa3xx-nand: 
[   16.545799] NDCR:  0x9d079fff
[   16.545799] NDCB0: 0x000d3000
[   16.545799] NDCB1: 0x71400000
[   16.545799] NDCB2: 0x00000000
[   16.545799] NDCB3: 0x00000000
[   16.564735] nand: nand_do_read_oob: from = 0x038c0000, len = 64
[   16.570937] marvell-nfc pxa3xx-nand: 
[   16.570937] NDCR:  0x9d079fff
[   16.570937] NDCB0: 0x000d3000
[   16.570937] NDCB1: 0x71800000
[   16.570937] NDCB2: 0x00000000
[   16.570937] NDCB3: 0x00000000
[   16.589863] nand: nand_do_read_oob: from = 0x038e0000, len = 64
[   16.595896] marvell-nfc pxa3xx-nand: 
[   16.595896] NDCR:  0x9d079fff
[   16.595896] NDCB0: 0x000d3000
[   16.595896] NDCB1: 0x71c00000
[   16.595896] NDCB2: 0x00000000
[   16.595896] NDCB3: 0x00000000
[   16.614851] nand: nand_do_read_oob: from = 0x03900000, len = 64
[   16.621051] marvell-nfc pxa3xx-nand: 
[   16.621051] NDCR:  0x9d079fff
[   16.621051] NDCB0: 0x000d3000
[   16.621051] NDCB1: 0x72000000
[   16.621051] NDCB2: 0x00000000
[   16.621051] NDCB3: 0x00000000
[   16.639979] nand: nand_do_read_oob: from = 0x03920000, len = 64
[   16.646011] marvell-nfc pxa3xx-nand: 
[   16.646011] NDCR:  0x9d079fff
[   16.646011] NDCB0: 0x000d3000
[   16.646011] NDCB1: 0x72400000
[   16.646011] NDCB2: 0x00000000
[   16.646011] NDCB3: 0x00000000
[   16.664947] nand: nand_do_read_oob: from = 0x03940000, len = 64
[   16.671151] marvell-nfc pxa3xx-nand: 
[   16.671151] NDCR:  0x9d079fff
[   16.671151] NDCB0: 0x000d3000
[   16.671151] NDCB1: 0x72800000
[   16.671151] NDCB2: 0x00000000
[   16.671151] NDCB3: 0x00000000
[   16.690079] nand: nand_do_read_oob: from = 0x03960000, len = 64
[   16.696110] marvell-nfc pxa3xx-nand: 
[   16.696110] NDCR:  0x9d079fff
[   16.696110] NDCB0: 0x000d3000
[   16.696110] NDCB1: 0x72c00000
[   16.696110] NDCB2: 0x00000000
[   16.696110] NDCB3: 0x00000000
[   16.715040] nand: nand_do_read_oob: from = 0x03980000, len = 64
[   16.721242] marvell-nfc pxa3xx-nand: 
[   16.721242] NDCR:  0x9d079fff
[   16.721242] NDCB0: 0x000d3000
[   16.721242] NDCB1: 0x73000000
[   16.721242] NDCB2: 0x00000000
[   16.721242] NDCB3: 0x00000000
[   16.740169] nand: nand_do_read_oob: from = 0x039a0000, len = 64
[   16.746199] marvell-nfc pxa3xx-nand: 
[   16.746199] NDCR:  0x9d079fff
[   16.746199] NDCB0: 0x000d3000
[   16.746199] NDCB1: 0x73400000
[   16.746199] NDCB2: 0x00000000
[   16.746199] NDCB3: 0x00000000
[   16.765132] nand: nand_do_read_oob: from = 0x039c0000, len = 64
[   16.771339] marvell-nfc pxa3xx-nand: 
[   16.771339] NDCR:  0x9d079fff
[   16.771339] NDCB0: 0x000d3000
[   16.771339] NDCB1: 0x73800000
[   16.771339] NDCB2: 0x00000000
[   16.771339] NDCB3: 0x00000000
[   16.790267] nand: nand_do_read_oob: from = 0x039e0000, len = 64
[   16.796298] marvell-nfc pxa3xx-nand: 
[   16.796298] NDCR:  0x9d079fff
[   16.796298] NDCB0: 0x000d3000
[   16.796298] NDCB1: 0x73c00000
[   16.796298] NDCB2: 0x00000000
[   16.796298] NDCB3: 0x00000000
[   16.815233] nand: nand_do_read_oob: from = 0x03a00000, len = 64
[   16.821436] marvell-nfc pxa3xx-nand: 
[   16.821436] NDCR:  0x9d079fff
[   16.821436] NDCB0: 0x000d3000
[   16.821436] NDCB1: 0x74000000
[   16.821436] NDCB2: 0x00000000
[   16.821436] NDCB3: 0x00000000
[   16.840365] nand: nand_do_read_oob: from = 0x03a20000, len = 64
[   16.846398] marvell-nfc pxa3xx-nand: 
[   16.846398] NDCR:  0x9d079fff
[   16.846398] NDCB0: 0x000d3000
[   16.846398] NDCB1: 0x74400000
[   16.846398] NDCB2: 0x00000000
[   16.846398] NDCB3: 0x00000000
[   16.865330] nand: nand_do_read_oob: from = 0x03a40000, len = 64
[   16.871536] marvell-nfc pxa3xx-nand: 
[   16.871536] NDCR:  0x9d079fff
[   16.871536] NDCB0: 0x000d3000
[   16.871536] NDCB1: 0x74800000
[   16.871536] NDCB2: 0x00000000
[   16.871536] NDCB3: 0x00000000
[   16.890461] nand: nand_do_read_oob: from = 0x03a60000, len = 64
[   16.896496] marvell-nfc pxa3xx-nand: 
[   16.896496] NDCR:  0x9d079fff
[   16.896496] NDCB0: 0x000d3000
[   16.896496] NDCB1: 0x74c00000
[   16.896496] NDCB2: 0x00000000
[   16.896496] NDCB3: 0x00000000
[   16.915426] nand: nand_do_read_oob: from = 0x03a80000, len = 64
[   16.921635] marvell-nfc pxa3xx-nand: 
[   16.921635] NDCR:  0x9d079fff
[   16.921635] NDCB0: 0x000d3000
[   16.921635] NDCB1: 0x75000000
[   16.921635] NDCB2: 0x00000000
[   16.921635] NDCB3: 0x00000000
[   16.940561] nand: nand_do_read_oob: from = 0x03aa0000, len = 64
[   16.946594] marvell-nfc pxa3xx-nand: 
[   16.946594] NDCR:  0x9d079fff
[   16.946594] NDCB0: 0x000d3000
[   16.946594] NDCB1: 0x75400000
[   16.946594] NDCB2: 0x00000000
[   16.946594] NDCB3: 0x00000000
[   16.965526] nand: nand_do_read_oob: from = 0x03ac0000, len = 64
[   16.971733] marvell-nfc pxa3xx-nand: 
[   16.971733] NDCR:  0x9d079fff
[   16.971733] NDCB0: 0x000d3000
[   16.971733] NDCB1: 0x75800000
[   16.971733] NDCB2: 0x00000000
[   16.971733] NDCB3: 0x00000000
[   16.990660] nand: nand_do_read_oob: from = 0x03ae0000, len = 64
[   16.996693] marvell-nfc pxa3xx-nand: 
[   16.996693] NDCR:  0x9d079fff
[   16.996693] NDCB0: 0x000d3000
[   16.996693] NDCB1: 0x75c00000
[   16.996693] NDCB2: 0x00000000
[   16.996693] NDCB3: 0x00000000
[   17.015635] nand: nand_do_read_oob: from = 0x03b00000, len = 64
[   17.021843] marvell-nfc pxa3xx-nand: 
[   17.021843] NDCR:  0x9d079fff
[   17.021843] NDCB0: 0x000d3000
[   17.021843] NDCB1: 0x76000000
[   17.021843] NDCB2: 0x00000000
[   17.021843] NDCB3: 0x00000000
[   17.040767] nand: nand_do_read_oob: from = 0x03b20000, len = 64
[   17.046800] marvell-nfc pxa3xx-nand: 
[   17.046800] NDCR:  0x9d079fff
[   17.046800] NDCB0: 0x000d3000
[   17.046800] NDCB1: 0x76400000
[   17.046800] NDCB2: 0x00000000
[   17.046800] NDCB3: 0x00000000
[   17.065733] nand: nand_do_read_oob: from = 0x03b40000, len = 64
[   17.071938] marvell-nfc pxa3xx-nand: 
[   17.071938] NDCR:  0x9d079fff
[   17.071938] NDCB0: 0x000d3000
[   17.071938] NDCB1: 0x76800000
[   17.071938] NDCB2: 0x00000000
[   17.071938] NDCB3: 0x00000000
[   17.090865] nand: nand_do_read_oob: from = 0x03b60000, len = 64
[   17.096897] marvell-nfc pxa3xx-nand: 
[   17.096897] NDCR:  0x9d079fff
[   17.096897] NDCB0: 0x000d3000
[   17.096897] NDCB1: 0x76c00000
[   17.096897] NDCB2: 0x00000000
[   17.096897] NDCB3: 0x00000000
[   17.115833] nand: nand_do_read_oob: from = 0x03b80000, len = 64
[   17.122035] marvell-nfc pxa3xx-nand: 
[   17.122035] NDCR:  0x9d079fff
[   17.122035] NDCB0: 0x000d3000
[   17.122035] NDCB1: 0x77000000
[   17.122035] NDCB2: 0x00000000
[   17.122035] NDCB3: 0x00000000
[   17.140965] nand: nand_do_read_oob: from = 0x03ba0000, len = 64
[   17.146995] marvell-nfc pxa3xx-nand: 
[   17.146995] NDCR:  0x9d079fff
[   17.146995] NDCB0: 0x000d3000
[   17.146995] NDCB1: 0x77400000
[   17.146995] NDCB2: 0x00000000
[   17.146995] NDCB3: 0x00000000
[   17.165931] nand: nand_do_read_oob: from = 0x03bc0000, len = 64
[   17.172135] marvell-nfc pxa3xx-nand: 
[   17.172135] NDCR:  0x9d079fff
[   17.172135] NDCB0: 0x000d3000
[   17.172135] NDCB1: 0x77800000
[   17.172135] NDCB2: 0x00000000
[   17.172135] NDCB3: 0x00000000
[   17.191063] nand: nand_do_read_oob: from = 0x03be0000, len = 64
[   17.197096] marvell-nfc pxa3xx-nand: 
[   17.197096] NDCR:  0x9d079fff
[   17.197096] NDCB0: 0x000d3000
[   17.197096] NDCB1: 0x77c00000
[   17.197096] NDCB2: 0x00000000
[   17.197096] NDCB3: 0x00000000
[   17.216028] nand: nand_do_read_oob: from = 0x03c00000, len = 64
[   17.222235] marvell-nfc pxa3xx-nand: 
[   17.222235] NDCR:  0x9d079fff
[   17.222235] NDCB0: 0x000d3000
[   17.222235] NDCB1: 0x78000000
[   17.222235] NDCB2: 0x00000000
[   17.222235] NDCB3: 0x00000000
[   17.241159] nand: nand_do_read_oob: from = 0x03c20000, len = 64
[   17.247193] marvell-nfc pxa3xx-nand: 
[   17.247193] NDCR:  0x9d079fff
[   17.247193] NDCB0: 0x000d3000
[   17.247193] NDCB1: 0x78400000
[   17.247193] NDCB2: 0x00000000
[   17.247193] NDCB3: 0x00000000
[   17.266142] nand: nand_do_read_oob: from = 0x03c40000, len = 64
[   17.272349] marvell-nfc pxa3xx-nand: 
[   17.272349] NDCR:  0x9d079fff
[   17.272349] NDCB0: 0x000d3000
[   17.272349] NDCB1: 0x78800000
[   17.272349] NDCB2: 0x00000000
[   17.272349] NDCB3: 0x00000000
[   17.291275] nand: nand_do_read_oob: from = 0x03c60000, len = 64
[   17.297308] marvell-nfc pxa3xx-nand: 
[   17.297308] NDCR:  0x9d079fff
[   17.297308] NDCB0: 0x000d3000
[   17.297308] NDCB1: 0x78c00000
[   17.297308] NDCB2: 0x00000000
[   17.297308] NDCB3: 0x00000000
[   17.316239] nand: nand_do_read_oob: from = 0x03c80000, len = 64
[   17.322439] marvell-nfc pxa3xx-nand: 
[   17.322439] NDCR:  0x9d079fff
[   17.322439] NDCB0: 0x000d3000
[   17.322439] NDCB1: 0x79000000
[   17.322439] NDCB2: 0x00000000
[   17.322439] NDCB3: 0x00000000
[   17.341366] nand: nand_do_read_oob: from = 0x03ca0000, len = 64
[   17.347400] marvell-nfc pxa3xx-nand: 
[   17.347400] NDCR:  0x9d079fff
[   17.347400] NDCB0: 0x000d3000
[   17.347400] NDCB1: 0x79400000
[   17.347400] NDCB2: 0x00000000
[   17.347400] NDCB3: 0x00000000
[   17.366333] nand: nand_do_read_oob: from = 0x03cc0000, len = 64
[   17.372538] marvell-nfc pxa3xx-nand: 
[   17.372538] NDCR:  0x9d079fff
[   17.372538] NDCB0: 0x000d3000
[   17.372538] NDCB1: 0x79800000
[   17.372538] NDCB2: 0x00000000
[   17.372538] NDCB3: 0x00000000
[   17.391466] nand: nand_do_read_oob: from = 0x03ce0000, len = 64
[   17.397496] marvell-nfc pxa3xx-nand: 
[   17.397496] NDCR:  0x9d079fff
[   17.397496] NDCB0: 0x000d3000
[   17.397496] NDCB1: 0x79c00000
[   17.397496] NDCB2: 0x00000000
[   17.397496] NDCB3: 0x00000000
[   17.416429] nand: nand_do_read_oob: from = 0x03d00000, len = 64
[   17.422635] marvell-nfc pxa3xx-nand: 
[   17.422635] NDCR:  0x9d079fff
[   17.422635] NDCB0: 0x000d3000
[   17.422635] NDCB1: 0x7a000000
[   17.422635] NDCB2: 0x00000000
[   17.422635] NDCB3: 0x00000000
[   17.441563] nand: nand_do_read_oob: from = 0x03d20000, len = 64
[   17.447596] marvell-nfc pxa3xx-nand: 
[   17.447596] NDCR:  0x9d079fff
[   17.447596] NDCB0: 0x000d3000
[   17.447596] NDCB1: 0x7a400000
[   17.447596] NDCB2: 0x00000000
[   17.447596] NDCB3: 0x00000000
[   17.466528] nand: nand_do_read_oob: from = 0x03d40000, len = 64
[   17.472736] marvell-nfc pxa3xx-nand: 
[   17.472736] NDCR:  0x9d079fff
[   17.472736] NDCB0: 0x000d3000
[   17.472736] NDCB1: 0x7a800000
[   17.472736] NDCB2: 0x00000000
[   17.472736] NDCB3: 0x00000000
[   17.491664] nand: nand_do_read_oob: from = 0x03d60000, len = 64
[   17.497695] marvell-nfc pxa3xx-nand: 
[   17.497695] NDCR:  0x9d079fff
[   17.497695] NDCB0: 0x000d3000
[   17.497695] NDCB1: 0x7ac00000
[   17.497695] NDCB2: 0x00000000
[   17.497695] NDCB3: 0x00000000
[   17.516626] nand: nand_do_read_oob: from = 0x03d80000, len = 64
[   17.522832] marvell-nfc pxa3xx-nand: 
[   17.522832] NDCR:  0x9d079fff
[   17.522832] NDCB0: 0x000d3000
[   17.522832] NDCB1: 0x7b000000
[   17.522832] NDCB2: 0x00000000
[   17.522832] NDCB3: 0x00000000
[   17.541762] nand: nand_do_read_oob: from = 0x03da0000, len = 64
[   17.547793] marvell-nfc pxa3xx-nand: 
[   17.547793] NDCR:  0x9d079fff
[   17.547793] NDCB0: 0x000d3000
[   17.547793] NDCB1: 0x7b400000
[   17.547793] NDCB2: 0x00000000
[   17.547793] NDCB3: 0x00000000
[   17.566726] nand: nand_do_read_oob: from = 0x03dc0000, len = 64
[   17.572931] marvell-nfc pxa3xx-nand: 
[   17.572931] NDCR:  0x9d079fff
[   17.572931] NDCB0: 0x000d3000
[   17.572931] NDCB1: 0x7b800000
[   17.572931] NDCB2: 0x00000000
[   17.572931] NDCB3: 0x00000000
[   17.591858] nand: nand_do_read_oob: from = 0x03de0000, len = 64
[   17.597892] marvell-nfc pxa3xx-nand: 
[   17.597892] NDCR:  0x9d079fff
[   17.597892] NDCB0: 0x000d3000
[   17.597892] NDCB1: 0x7bc00000
[   17.597892] NDCB2: 0x00000000
[   17.597892] NDCB3: 0x00000000
[   17.616823] nand: nand_do_read_oob: from = 0x03e00000, len = 64
[   17.623028] marvell-nfc pxa3xx-nand: 
[   17.623028] NDCR:  0x9d079fff
[   17.623028] NDCB0: 0x000d3000
[   17.623028] NDCB1: 0x7c000000
[   17.623028] NDCB2: 0x00000000
[   17.623028] NDCB3: 0x00000000
[   17.641958] nand: nand_do_read_oob: from = 0x03e20000, len = 64
[   17.647990] marvell-nfc pxa3xx-nand: 
[   17.647990] NDCR:  0x9d079fff
[   17.647990] NDCB0: 0x000d3000
[   17.647990] NDCB1: 0x7c400000
[   17.647990] NDCB2: 0x00000000
[   17.647990] NDCB3: 0x00000000
[   17.666921] nand: nand_do_read_oob: from = 0x03e40000, len = 64
[   17.673120] marvell-nfc pxa3xx-nand: 
[   17.673120] NDCR:  0x9d079fff
[   17.673120] NDCB0: 0x000d3000
[   17.673120] NDCB1: 0x7c800000
[   17.673120] NDCB2: 0x00000000
[   17.673120] NDCB3: 0x00000000
[   17.692046] nand: nand_do_read_oob: from = 0x03e60000, len = 64
[   17.698079] marvell-nfc pxa3xx-nand: 
[   17.698079] NDCR:  0x9d079fff
[   17.698079] NDCB0: 0x000d3000
[   17.698079] NDCB1: 0x7cc00000
[   17.698079] NDCB2: 0x00000000
[   17.698079] NDCB3: 0x00000000
[   17.717011] nand: nand_do_read_oob: from = 0x03e80000, len = 64
[   17.723220] marvell-nfc pxa3xx-nand: 
[   17.723220] NDCR:  0x9d079fff
[   17.723220] NDCB0: 0x000d3000
[   17.723220] NDCB1: 0x7d000000
[   17.723220] NDCB2: 0x00000000
[   17.723220] NDCB3: 0x00000000
[   17.742146] nand: nand_do_read_oob: from = 0x03ea0000, len = 64
[   17.748176] marvell-nfc pxa3xx-nand: 
[   17.748176] NDCR:  0x9d079fff
[   17.748176] NDCB0: 0x000d3000
[   17.748176] NDCB1: 0x7d400000
[   17.748176] NDCB2: 0x00000000
[   17.748176] NDCB3: 0x00000000
[   17.767108] nand: nand_do_read_oob: from = 0x03ec0000, len = 64
[   17.773307] marvell-nfc pxa3xx-nand: 
[   17.773307] NDCR:  0x9d079fff
[   17.773307] NDCB0: 0x000d3000
[   17.773307] NDCB1: 0x7d800000
[   17.773307] NDCB2: 0x00000000
[   17.773307] NDCB3: 0x00000000
[   17.792235] nand: nand_do_read_oob: from = 0x03ee0000, len = 64
[   17.798267] marvell-nfc pxa3xx-nand: 
[   17.798267] NDCR:  0x9d079fff
[   17.798267] NDCB0: 0x000d3000
[   17.798267] NDCB1: 0x7dc00000
[   17.798267] NDCB2: 0x00000000
[   17.798267] NDCB3: 0x00000000
[   17.817199] nand: nand_do_read_oob: from = 0x03f00000, len = 64
[   17.823398] marvell-nfc pxa3xx-nand: 
[   17.823398] NDCR:  0x9d079fff
[   17.823398] NDCB0: 0x000d3000
[   17.823398] NDCB1: 0x7e000000
[   17.823398] NDCB2: 0x00000000
[   17.823398] NDCB3: 0x00000000
[   17.842325] nand: nand_do_read_oob: from = 0x03f20000, len = 64
[   17.848357] marvell-nfc pxa3xx-nand: 
[   17.848357] NDCR:  0x9d079fff
[   17.848357] NDCB0: 0x000d3000
[   17.848357] NDCB1: 0x7e400000
[   17.848357] NDCB2: 0x00000000
[   17.848357] NDCB3: 0x00000000
[   17.867288] nand: nand_do_read_oob: from = 0x03f40000, len = 64
[   17.873487] marvell-nfc pxa3xx-nand: 
[   17.873487] NDCR:  0x9d079fff
[   17.873487] NDCB0: 0x000d3000
[   17.873487] NDCB1: 0x7e800000
[   17.873487] NDCB2: 0x00000000
[   17.873487] NDCB3: 0x00000000
[   17.892431] nand: nand_do_read_oob: from = 0x03f60000, len = 64
[   17.898464] marvell-nfc pxa3xx-nand: 
[   17.898464] NDCR:  0x9d079fff
[   17.898464] NDCB0: 0x000d3000
[   17.898464] NDCB1: 0x7ec00000
[   17.898464] NDCB2: 0x00000000
[   17.898464] NDCB3: 0x00000000
[   17.917396] nand: nand_do_read_oob: from = 0x03f80000, len = 64
[   17.923603] marvell-nfc pxa3xx-nand: 
[   17.923603] NDCR:  0x9d079fff
[   17.923603] NDCB0: 0x000d3000
[   17.923603] NDCB1: 0x7f000000
[   17.923603] NDCB2: 0x00000000
[   17.923603] NDCB3: 0x00000000
[   17.942535] nand: nand_do_read_oob: from = 0x03fa0000, len = 64
[   17.948572] marvell-nfc pxa3xx-nand: 
[   17.948572] NDCR:  0x9d079fff
[   17.948572] NDCB0: 0x000d3000
[   17.948572] NDCB1: 0x7f400000
[   17.948572] NDCB2: 0x00000000
[   17.948572] NDCB3: 0x00000000
[   17.967624] nand: nand_do_read_oob: from = 0x03fc0000, len = 64
[   17.973831] marvell-nfc pxa3xx-nand: 
[   17.973831] NDCR:  0x9d079fff
[   17.973831] NDCB0: 0x000d3000
[   17.973831] NDCB1: 0x7f800000
[   17.973831] NDCB2: 0x00000000
[   17.973831] NDCB3: 0x00000000
[   17.992757] nand: nand_do_read_oob: from = 0x03fe0000, len = 64
[   17.998961] marvell-nfc pxa3xx-nand: 
[   17.998961] NDCR:  0x9d079fff
[   17.998961] NDCB0: 0x000d3000
[   17.998961] NDCB1: 0x7fc00000
[   17.998961] NDCB2: 0x00000000
[   17.998961] NDCB3: 0x00000000
[   18.017891] nand: nand_do_read_oob: from = 0x04000000, len = 64
[   18.024093] marvell-nfc pxa3xx-nand: 
[   18.024093] NDCR:  0x9d079fff
[   18.024093] NDCB0: 0x000d3000
[   18.024093] NDCB1: 0x80000000
[   18.024093] NDCB2: 0x00000000
[   18.024093] NDCB3: 0x00000000
[   18.043020] nand: nand_do_read_oob: from = 0x04020000, len = 64
[   18.049223] marvell-nfc pxa3xx-nand: 
[   18.049223] NDCR:  0x9d079fff
[   18.049223] NDCB0: 0x000d3000
[   18.049223] NDCB1: 0x80400000
[   18.049223] NDCB2: 0x00000000
[   18.049223] NDCB3: 0x00000000
[   18.068142] nand: nand_do_read_oob: from = 0x04040000, len = 64
[   18.074345] marvell-nfc pxa3xx-nand: 
[   18.074345] NDCR:  0x9d079fff
[   18.074345] NDCB0: 0x000d3000
[   18.074345] NDCB1: 0x80800000
[   18.074345] NDCB2: 0x00000000
[   18.074345] NDCB3: 0x00000000
[   18.093622] nand: nand_do_read_oob: from = 0x04060000, len = 64
[   18.099858] marvell-nfc pxa3xx-nand: 
[   18.099858] NDCR:  0x9d079fff
[   18.099858] NDCB0: 0x000d3000
[   18.099858] NDCB1: 0x80c00000
[   18.099858] NDCB2: 0x00000000
[   18.099858] NDCB3: 0x00000000
[   18.118850] nand: nand_do_read_oob: from = 0x04080000, len = 64
[   18.124890] marvell-nfc pxa3xx-nand: 
[   18.124890] NDCR:  0x9d079fff
[   18.124890] NDCB0: 0x000d3000
[   18.124890] NDCB1: 0x81000000
[   18.124890] NDCB2: 0x00000000
[   18.124890] NDCB3: 0x00000000
[   18.143819] nand: nand_do_read_oob: from = 0x040a0000, len = 64
[   18.150025] marvell-nfc pxa3xx-nand: 
[   18.150025] NDCR:  0x9d079fff
[   18.150025] NDCB0: 0x000d3000
[   18.150025] NDCB1: 0x81400000
[   18.150025] NDCB2: 0x00000000
[   18.150025] NDCB3: 0x00000000
[   18.169138] nand: nand_do_read_oob: from = 0x040c0000, len = 64
[   18.175176] marvell-nfc pxa3xx-nand: 
[   18.175176] NDCR:  0x9d079fff
[   18.175176] NDCB0: 0x000d3000
[   18.175176] NDCB1: 0x81800000
[   18.175176] NDCB2: 0x00000000
[   18.175176] NDCB3: 0x00000000
[   18.194125] nand: nand_do_read_oob: from = 0x040e0000, len = 64
[   18.200329] marvell-nfc pxa3xx-nand: 
[   18.200329] NDCR:  0x9d079fff
[   18.200329] NDCB0: 0x000d3000
[   18.200329] NDCB1: 0x81c00000
[   18.200329] NDCB2: 0x00000000
[   18.200329] NDCB3: 0x00000000
[   18.219258] nand: nand_do_read_oob: from = 0x04100000, len = 64
[   18.225289] marvell-nfc pxa3xx-nand: 
[   18.225289] NDCR:  0x9d079fff
[   18.225289] NDCB0: 0x000d3000
[   18.225289] NDCB1: 0x82000000
[   18.225289] NDCB2: 0x00000000
[   18.225289] NDCB3: 0x00000000
[   18.244221] nand: nand_do_read_oob: from = 0x04120000, len = 64
[   18.250430] marvell-nfc pxa3xx-nand: 
[   18.250430] NDCR:  0x9d079fff
[   18.250430] NDCB0: 0x000d3000
[   18.250430] NDCB1: 0x82400000
[   18.250430] NDCB2: 0x00000000
[   18.250430] NDCB3: 0x00000000
[   18.269353] nand: nand_do_read_oob: from = 0x04140000, len = 64
[   18.275388] marvell-nfc pxa3xx-nand: 
[   18.275388] NDCR:  0x9d079fff
[   18.275388] NDCB0: 0x000d3000
[   18.275388] NDCB1: 0x82800000
[   18.275388] NDCB2: 0x00000000
[   18.275388] NDCB3: 0x00000000
[   18.294322] nand: nand_do_read_oob: from = 0x04160000, len = 64
[   18.300526] marvell-nfc pxa3xx-nand: 
[   18.300526] NDCR:  0x9d079fff
[   18.300526] NDCB0: 0x000d3000
[   18.300526] NDCB1: 0x82c00000
[   18.300526] NDCB2: 0x00000000
[   18.300526] NDCB3: 0x00000000
[   18.319453] nand: nand_do_read_oob: from = 0x04180000, len = 64
[   18.325486] marvell-nfc pxa3xx-nand: 
[   18.325486] NDCR:  0x9d079fff
[   18.325486] NDCB0: 0x000d3000
[   18.325486] NDCB1: 0x83000000
[   18.325486] NDCB2: 0x00000000
[   18.325486] NDCB3: 0x00000000
[   18.344419] nand: nand_do_read_oob: from = 0x041a0000, len = 64
[   18.350626] marvell-nfc pxa3xx-nand: 
[   18.350626] NDCR:  0x9d079fff
[   18.350626] NDCB0: 0x000d3000
[   18.350626] NDCB1: 0x83400000
[   18.350626] NDCB2: 0x00000000
[   18.350626] NDCB3: 0x00000000
[   18.369553] nand: nand_do_read_oob: from = 0x041c0000, len = 64
[   18.375583] marvell-nfc pxa3xx-nand: 
[   18.375583] NDCR:  0x9d079fff
[   18.375583] NDCB0: 0x000d3000
[   18.375583] NDCB1: 0x83800000
[   18.375583] NDCB2: 0x00000000
[   18.375583] NDCB3: 0x00000000
[   18.394516] nand: nand_do_read_oob: from = 0x041e0000, len = 64
[   18.400721] marvell-nfc pxa3xx-nand: 
[   18.400721] NDCR:  0x9d079fff
[   18.400721] NDCB0: 0x000d3000
[   18.400721] NDCB1: 0x83c00000
[   18.400721] NDCB2: 0x00000000
[   18.400721] NDCB3: 0x00000000
[   18.419652] nand: nand_do_read_oob: from = 0x04200000, len = 64
[   18.425684] marvell-nfc pxa3xx-nand: 
[   18.425684] NDCR:  0x9d079fff
[   18.425684] NDCB0: 0x000d3000
[   18.425684] NDCB1: 0x84000000
[   18.425684] NDCB2: 0x00000000
[   18.425684] NDCB3: 0x00000000
[   18.444614] nand: nand_do_read_oob: from = 0x04220000, len = 64
[   18.450822] marvell-nfc pxa3xx-nand: 
[   18.450822] NDCR:  0x9d079fff
[   18.450822] NDCB0: 0x000d3000
[   18.450822] NDCB1: 0x84400000
[   18.450822] NDCB2: 0x00000000
[   18.450822] NDCB3: 0x00000000
[   18.469750] nand: nand_do_read_oob: from = 0x04240000, len = 64
[   18.475780] marvell-nfc pxa3xx-nand: 
[   18.475780] NDCR:  0x9d079fff
[   18.475780] NDCB0: 0x000d3000
[   18.475780] NDCB1: 0x84800000
[   18.475780] NDCB2: 0x00000000
[   18.475780] NDCB3: 0x00000000
[   18.494735] nand: nand_do_read_oob: from = 0x04260000, len = 64
[   18.500935] marvell-nfc pxa3xx-nand: 
[   18.500935] NDCR:  0x9d079fff
[   18.500935] NDCB0: 0x000d3000
[   18.500935] NDCB1: 0x84c00000
[   18.500935] NDCB2: 0x00000000
[   18.500935] NDCB3: 0x00000000
[   18.519864] nand: nand_do_read_oob: from = 0x04280000, len = 64
[   18.525897] marvell-nfc pxa3xx-nand: 
[   18.525897] NDCR:  0x9d079fff
[   18.525897] NDCB0: 0x000d3000
[   18.525897] NDCB1: 0x85000000
[   18.525897] NDCB2: 0x00000000
[   18.525897] NDCB3: 0x00000000
[   18.544830] nand: nand_do_read_oob: from = 0x042a0000, len = 64
[   18.551034] marvell-nfc pxa3xx-nand: 
[   18.551034] NDCR:  0x9d079fff
[   18.551034] NDCB0: 0x000d3000
[   18.551034] NDCB1: 0x85400000
[   18.551034] NDCB2: 0x00000000
[   18.551034] NDCB3: 0x00000000
[   18.569963] nand: nand_do_read_oob: from = 0x042c0000, len = 64
[   18.575995] marvell-nfc pxa3xx-nand: 
[   18.575995] NDCR:  0x9d079fff
[   18.575995] NDCB0: 0x000d3000
[   18.575995] NDCB1: 0x85800000
[   18.575995] NDCB2: 0x00000000
[   18.575995] NDCB3: 0x00000000
[   18.594927] nand: nand_do_read_oob: from = 0x042e0000, len = 64
[   18.601124] marvell-nfc pxa3xx-nand: 
[   18.601124] NDCR:  0x9d079fff
[   18.601124] NDCB0: 0x000d3000
[   18.601124] NDCB1: 0x85c00000
[   18.601124] NDCB2: 0x00000000
[   18.601124] NDCB3: 0x00000000
[   18.620051] nand: nand_do_read_oob: from = 0x04300000, len = 64
[   18.626085] marvell-nfc pxa3xx-nand: 
[   18.626085] NDCR:  0x9d079fff
[   18.626085] NDCB0: 0x000d3000
[   18.626085] NDCB1: 0x86000000
[   18.626085] NDCB2: 0x00000000
[   18.626085] NDCB3: 0x00000000
[   18.645017] nand: nand_do_read_oob: from = 0x04320000, len = 64
[   18.651221] marvell-nfc pxa3xx-nand: 
[   18.651221] NDCR:  0x9d079fff
[   18.651221] NDCB0: 0x000d3000
[   18.651221] NDCB1: 0x86400000
[   18.651221] NDCB2: 0x00000000
[   18.651221] NDCB3: 0x00000000
[   18.670152] nand: nand_do_read_oob: from = 0x04340000, len = 64
[   18.676184] marvell-nfc pxa3xx-nand: 
[   18.676184] NDCR:  0x9d079fff
[   18.676184] NDCB0: 0x000d3000
[   18.676184] NDCB1: 0x86800000
[   18.676184] NDCB2: 0x00000000
[   18.676184] NDCB3: 0x00000000
[   18.695116] nand: nand_do_read_oob: from = 0x04360000, len = 64
[   18.701320] marvell-nfc pxa3xx-nand: 
[   18.701320] NDCR:  0x9d079fff
[   18.701320] NDCB0: 0x000d3000
[   18.701320] NDCB1: 0x86c00000
[   18.701320] NDCB2: 0x00000000
[   18.701320] NDCB3: 0x00000000
[   18.720253] nand: nand_do_read_oob: from = 0x04380000, len = 64
[   18.726282] marvell-nfc pxa3xx-nand: 
[   18.726282] NDCR:  0x9d079fff
[   18.726282] NDCB0: 0x000d3000
[   18.726282] NDCB1: 0x87000000
[   18.726282] NDCB2: 0x00000000
[   18.726282] NDCB3: 0x00000000
[   18.745218] nand: nand_do_read_oob: from = 0x043a0000, len = 64
[   18.751419] marvell-nfc pxa3xx-nand: 
[   18.751419] NDCR:  0x9d079fff
[   18.751419] NDCB0: 0x000d3000
[   18.751419] NDCB1: 0x87400000
[   18.751419] NDCB2: 0x00000000
[   18.751419] NDCB3: 0x00000000
[   18.770352] nand: nand_do_read_oob: from = 0x043c0000, len = 64
[   18.776381] marvell-nfc pxa3xx-nand: 
[   18.776381] NDCR:  0x9d079fff
[   18.776381] NDCB0: 0x000d3000
[   18.776381] NDCB1: 0x87800000
[   18.776381] NDCB2: 0x00000000
[   18.776381] NDCB3: 0x00000000
[   18.795312] nand: nand_do_read_oob: from = 0x043e0000, len = 64
[   18.801519] marvell-nfc pxa3xx-nand: 
[   18.801519] NDCR:  0x9d079fff
[   18.801519] NDCB0: 0x000d3000
[   18.801519] NDCB1: 0x87c00000
[   18.801519] NDCB2: 0x00000000
[   18.801519] NDCB3: 0x00000000
[   18.820449] nand: nand_do_read_oob: from = 0x04400000, len = 64
[   18.826479] marvell-nfc pxa3xx-nand: 
[   18.826479] NDCR:  0x9d079fff
[   18.826479] NDCB0: 0x000d3000
[   18.826479] NDCB1: 0x88000000
[   18.826479] NDCB2: 0x00000000
[   18.826479] NDCB3: 0x00000000
[   18.845411] nand: nand_do_read_oob: from = 0x04420000, len = 64
[   18.851615] marvell-nfc pxa3xx-nand: 
[   18.851615] NDCR:  0x9d079fff
[   18.851615] NDCB0: 0x000d3000
[   18.851615] NDCB1: 0x88400000
[   18.851615] NDCB2: 0x00000000
[   18.851615] NDCB3: 0x00000000
[   18.870547] nand: nand_do_read_oob: from = 0x04440000, len = 64
[   18.876578] marvell-nfc pxa3xx-nand: 
[   18.876578] NDCR:  0x9d079fff
[   18.876578] NDCB0: 0x000d3000
[   18.876578] NDCB1: 0x88800000
[   18.876578] NDCB2: 0x00000000
[   18.876578] NDCB3: 0x00000000
[   18.895510] nand: nand_do_read_oob: from = 0x04460000, len = 64
[   18.901716] marvell-nfc pxa3xx-nand: 
[   18.901716] NDCR:  0x9d079fff
[   18.901716] NDCB0: 0x000d3000
[   18.901716] NDCB1: 0x88c00000
[   18.901716] NDCB2: 0x00000000
[   18.901716] NDCB3: 0x00000000
[   18.920645] nand: nand_do_read_oob: from = 0x04480000, len = 64
[   18.926675] marvell-nfc pxa3xx-nand: 
[   18.926675] NDCR:  0x9d079fff
[   18.926675] NDCB0: 0x000d3000
[   18.926675] NDCB1: 0x89000000
[   18.926675] NDCB2: 0x00000000
[   18.926675] NDCB3: 0x00000000
[   18.945611] nand: nand_do_read_oob: from = 0x044a0000, len = 64
[   18.951814] marvell-nfc pxa3xx-nand: 
[   18.951814] NDCR:  0x9d079fff
[   18.951814] NDCB0: 0x000d3000
[   18.951814] NDCB1: 0x89400000
[   18.951814] NDCB2: 0x00000000
[   18.951814] NDCB3: 0x00000000
[   18.970742] nand: nand_do_read_oob: from = 0x044c0000, len = 64
[   18.976775] marvell-nfc pxa3xx-nand: 
[   18.976775] NDCR:  0x9d079fff
[   18.976775] NDCB0: 0x000d3000
[   18.976775] NDCB1: 0x89800000
[   18.976775] NDCB2: 0x00000000
[   18.976775] NDCB3: 0x00000000
[   18.995706] nand: nand_do_read_oob: from = 0x044e0000, len = 64
[   19.001914] marvell-nfc pxa3xx-nand: 
[   19.001914] NDCR:  0x9d079fff
[   19.001914] NDCB0: 0x000d3000
[   19.001914] NDCB1: 0x89c00000
[   19.001914] NDCB2: 0x00000000
[   19.001914] NDCB3: 0x00000000
[   19.020852] nand: nand_do_read_oob: from = 0x04500000, len = 64
[   19.026882] marvell-nfc pxa3xx-nand: 
[   19.026882] NDCR:  0x9d079fff
[   19.026882] NDCB0: 0x000d3000
[   19.026882] NDCB1: 0x8a000000
[   19.026882] NDCB2: 0x00000000
[   19.026882] NDCB3: 0x00000000
[   19.045816] nand: nand_do_read_oob: from = 0x04520000, len = 64
[   19.052021] marvell-nfc pxa3xx-nand: 
[   19.052021] NDCR:  0x9d079fff
[   19.052021] NDCB0: 0x000d3000
[   19.052021] NDCB1: 0x8a400000
[   19.052021] NDCB2: 0x00000000
[   19.052021] NDCB3: 0x00000000
[   19.070947] nand: nand_do_read_oob: from = 0x04540000, len = 64
[   19.076981] marvell-nfc pxa3xx-nand: 
[   19.076981] NDCR:  0x9d079fff
[   19.076981] NDCB0: 0x000d3000
[   19.076981] NDCB1: 0x8a800000
[   19.076981] NDCB2: 0x00000000
[   19.076981] NDCB3: 0x00000000
[   19.095913] nand: nand_do_read_oob: from = 0x04560000, len = 64
[   19.102117] marvell-nfc pxa3xx-nand: 
[   19.102117] NDCR:  0x9d079fff
[   19.102117] NDCB0: 0x000d3000
[   19.102117] NDCB1: 0x8ac00000
[   19.102117] NDCB2: 0x00000000
[   19.102117] NDCB3: 0x00000000
[   19.121062] nand: nand_do_read_oob: from = 0x04580000, len = 64
[   19.127097] marvell-nfc pxa3xx-nand: 
[   19.127097] NDCR:  0x9d079fff
[   19.127097] NDCB0: 0x000d3000
[   19.127097] NDCB1: 0x8b000000
[   19.127097] NDCB2: 0x00000000
[   19.127097] NDCB3: 0x00000000
[   19.146031] nand: nand_do_read_oob: from = 0x045a0000, len = 64
[   19.152232] marvell-nfc pxa3xx-nand: 
[   19.152232] NDCR:  0x9d079fff
[   19.152232] NDCB0: 0x000d3000
[   19.152232] NDCB1: 0x8b400000
[   19.152232] NDCB2: 0x00000000
[   19.152232] NDCB3: 0x00000000
[   19.171165] nand: nand_do_read_oob: from = 0x045c0000, len = 64
[   19.177195] marvell-nfc pxa3xx-nand: 
[   19.177195] NDCR:  0x9d079fff
[   19.177195] NDCB0: 0x000d3000
[   19.177195] NDCB1: 0x8b800000
[   19.177195] NDCB2: 0x00000000
[   19.177195] NDCB3: 0x00000000
[   19.196127] nand: nand_do_read_oob: from = 0x045e0000, len = 64
[   19.202330] marvell-nfc pxa3xx-nand: 
[   19.202330] NDCR:  0x9d079fff
[   19.202330] NDCB0: 0x000d3000
[   19.202330] NDCB1: 0x8bc00000
[   19.202330] NDCB2: 0x00000000
[   19.202330] NDCB3: 0x00000000
[   19.221261] nand: nand_do_read_oob: from = 0x04600000, len = 64
[   19.227293] marvell-nfc pxa3xx-nand: 
[   19.227293] NDCR:  0x9d079fff
[   19.227293] NDCB0: 0x000d3000
[   19.227293] NDCB1: 0x8c000000
[   19.227293] NDCB2: 0x00000000
[   19.227293] NDCB3: 0x00000000
[   19.246223] nand: nand_do_read_oob: from = 0x04620000, len = 64
[   19.252421] marvell-nfc pxa3xx-nand: 
[   19.252421] NDCR:  0x9d079fff
[   19.252421] NDCB0: 0x000d3000
[   19.252421] NDCB1: 0x8c400000
[   19.252421] NDCB2: 0x00000000
[   19.252421] NDCB3: 0x00000000
[   19.271348] nand: nand_do_read_oob: from = 0x04640000, len = 64
[   19.277383] marvell-nfc pxa3xx-nand: 
[   19.277383] NDCR:  0x9d079fff
[   19.277383] NDCB0: 0x000d3000
[   19.277383] NDCB1: 0x8c800000
[   19.277383] NDCB2: 0x00000000
[   19.277383] NDCB3: 0x00000000
[   19.296316] nand: nand_do_read_oob: from = 0x04660000, len = 64
[   19.302521] marvell-nfc pxa3xx-nand: 
[   19.302521] NDCR:  0x9d079fff
[   19.302521] NDCB0: 0x000d3000
[   19.302521] NDCB1: 0x8cc00000
[   19.302521] NDCB2: 0x00000000
[   19.302521] NDCB3: 0x00000000
[   19.321450] nand: nand_do_read_oob: from = 0x04680000, len = 64
[   19.327482] marvell-nfc pxa3xx-nand: 
[   19.327482] NDCR:  0x9d079fff
[   19.327482] NDCB0: 0x000d3000
[   19.327482] NDCB1: 0x8d000000
[   19.327482] NDCB2: 0x00000000
[   19.327482] NDCB3: 0x00000000
[   19.346415] nand: nand_do_read_oob: from = 0x046a0000, len = 64
[   19.352619] marvell-nfc pxa3xx-nand: 
[   19.352619] NDCR:  0x9d079fff
[   19.352619] NDCB0: 0x000d3000
[   19.352619] NDCB1: 0x8d400000
[   19.352619] NDCB2: 0x00000000
[   19.352619] NDCB3: 0x00000000
[   19.371548] nand: nand_do_read_oob: from = 0x046c0000, len = 64
[   19.377579] marvell-nfc pxa3xx-nand: 
[   19.377579] NDCR:  0x9d079fff
[   19.377579] NDCB0: 0x000d3000
[   19.377579] NDCB1: 0x8d800000
[   19.377579] NDCB2: 0x00000000
[   19.377579] NDCB3: 0x00000000
[   19.396512] nand: nand_do_read_oob: from = 0x046e0000, len = 64
[   19.402716] marvell-nfc pxa3xx-nand: 
[   19.402716] NDCR:  0x9d079fff
[   19.402716] NDCB0: 0x000d3000
[   19.402716] NDCB1: 0x8dc00000
[   19.402716] NDCB2: 0x00000000
[   19.402716] NDCB3: 0x00000000
[   19.421645] nand: nand_do_read_oob: from = 0x04700000, len = 64
[   19.427679] marvell-nfc pxa3xx-nand: 
[   19.427679] NDCR:  0x9d079fff
[   19.427679] NDCB0: 0x000d3000
[   19.427679] NDCB1: 0x8e000000
[   19.427679] NDCB2: 0x00000000
[   19.427679] NDCB3: 0x00000000
[   19.446611] nand: nand_do_read_oob: from = 0x04720000, len = 64
[   19.452815] marvell-nfc pxa3xx-nand: 
[   19.452815] NDCR:  0x9d079fff
[   19.452815] NDCB0: 0x000d3000
[   19.452815] NDCB1: 0x8e400000
[   19.452815] NDCB2: 0x00000000
[   19.452815] NDCB3: 0x00000000
[   19.471747] nand: nand_do_read_oob: from = 0x04740000, len = 64
[   19.477777] marvell-nfc pxa3xx-nand: 
[   19.477777] NDCR:  0x9d079fff
[   19.477777] NDCB0: 0x000d3000
[   19.477777] NDCB1: 0x8e800000
[   19.477777] NDCB2: 0x00000000
[   19.477777] NDCB3: 0x00000000
[   19.496711] nand: nand_do_read_oob: from = 0x04760000, len = 64
[   19.502915] marvell-nfc pxa3xx-nand: 
[   19.502915] NDCR:  0x9d079fff
[   19.502915] NDCB0: 0x000d3000
[   19.502915] NDCB1: 0x8ec00000
[   19.502915] NDCB2: 0x00000000
[   19.502915] NDCB3: 0x00000000
[   19.521847] nand: nand_do_read_oob: from = 0x04780000, len = 64
[   19.527875] marvell-nfc pxa3xx-nand: 
[   19.527875] NDCR:  0x9d079fff
[   19.527875] NDCB0: 0x000d3000
[   19.527875] NDCB1: 0x8f000000
[   19.527875] NDCB2: 0x00000000
[   19.527875] NDCB3: 0x00000000
[   19.546811] nand: nand_do_read_oob: from = 0x047a0000, len = 64
[   19.553012] marvell-nfc pxa3xx-nand: 
[   19.553012] NDCR:  0x9d079fff
[   19.553012] NDCB0: 0x000d3000
[   19.553012] NDCB1: 0x8f400000
[   19.553012] NDCB2: 0x00000000
[   19.553012] NDCB3: 0x00000000
[   19.571940] nand: nand_do_read_oob: from = 0x047c0000, len = 64
[   19.577974] marvell-nfc pxa3xx-nand: 
[   19.577974] NDCR:  0x9d079fff
[   19.577974] NDCB0: 0x000d3000
[   19.577974] NDCB1: 0x8f800000
[   19.577974] NDCB2: 0x00000000
[   19.577974] NDCB3: 0x00000000
[   19.596905] nand: nand_do_read_oob: from = 0x047e0000, len = 64
[   19.603111] marvell-nfc pxa3xx-nand: 
[   19.603111] NDCR:  0x9d079fff
[   19.603111] NDCB0: 0x000d3000
[   19.603111] NDCB1: 0x8fc00000
[   19.603111] NDCB2: 0x00000000
[   19.603111] NDCB3: 0x00000000
[   19.622041] nand: nand_do_read_oob: from = 0x04800000, len = 64
[   19.628071] marvell-nfc pxa3xx-nand: 
[   19.628071] NDCR:  0x9d079fff
[   19.628071] NDCB0: 0x000d3000
[   19.628071] NDCB1: 0x90000000
[   19.628071] NDCB2: 0x00000000
[   19.628071] NDCB3: 0x00000000
[   19.647004] nand: nand_do_read_oob: from = 0x04820000, len = 64
[   19.653208] marvell-nfc pxa3xx-nand: 
[   19.653208] NDCR:  0x9d079fff
[   19.653208] NDCB0: 0x000d3000
[   19.653208] NDCB1: 0x90400000
[   19.653208] NDCB2: 0x00000000
[   19.653208] NDCB3: 0x00000000
[   19.672139] nand: nand_do_read_oob: from = 0x04840000, len = 64
[   19.678169] marvell-nfc pxa3xx-nand: 
[   19.678169] NDCR:  0x9d079fff
[   19.678169] NDCB0: 0x000d3000
[   19.678169] NDCB1: 0x90800000
[   19.678169] NDCB2: 0x00000000
[   19.678169] NDCB3: 0x00000000
[   19.697104] nand: nand_do_read_oob: from = 0x04860000, len = 64
[   19.703307] marvell-nfc pxa3xx-nand: 
[   19.703307] NDCR:  0x9d079fff
[   19.703307] NDCB0: 0x000d3000
[   19.703307] NDCB1: 0x90c00000
[   19.703307] NDCB2: 0x00000000
[   19.703307] NDCB3: 0x00000000
[   19.722237] nand: nand_do_read_oob: from = 0x04880000, len = 64
[   19.728270] marvell-nfc pxa3xx-nand: 
[   19.728270] NDCR:  0x9d079fff
[   19.728270] NDCB0: 0x000d3000
[   19.728270] NDCB1: 0x91000000
[   19.728270] NDCB2: 0x00000000
[   19.728270] NDCB3: 0x00000000
[   19.747203] nand: nand_do_read_oob: from = 0x048a0000, len = 64
[   19.753406] marvell-nfc pxa3xx-nand: 
[   19.753406] NDCR:  0x9d079fff
[   19.753406] NDCB0: 0x000d3000
[   19.753406] NDCB1: 0x91400000
[   19.753406] NDCB2: 0x00000000
[   19.753406] NDCB3: 0x00000000
[   19.772354] nand: nand_do_read_oob: from = 0x048c0000, len = 64
[   19.778384] marvell-nfc pxa3xx-nand: 
[   19.778384] NDCR:  0x9d079fff
[   19.778384] NDCB0: 0x000d3000
[   19.778384] NDCB1: 0x91800000
[   19.778384] NDCB2: 0x00000000
[   19.778384] NDCB3: 0x00000000
[   19.797319] nand: nand_do_read_oob: from = 0x048e0000, len = 64
[   19.803522] marvell-nfc pxa3xx-nand: 
[   19.803522] NDCR:  0x9d079fff
[   19.803522] NDCB0: 0x000d3000
[   19.803522] NDCB1: 0x91c00000
[   19.803522] NDCB2: 0x00000000
[   19.803522] NDCB3: 0x00000000
[   19.822451] nand: nand_do_read_oob: from = 0x04900000, len = 64
[   19.828483] marvell-nfc pxa3xx-nand: 
[   19.828483] NDCR:  0x9d079fff
[   19.828483] NDCB0: 0x000d3000
[   19.828483] NDCB1: 0x92000000
[   19.828483] NDCB2: 0x00000000
[   19.828483] NDCB3: 0x00000000
[   19.847415] nand: nand_do_read_oob: from = 0x04920000, len = 64
[   19.853622] marvell-nfc pxa3xx-nand: 
[   19.853622] NDCR:  0x9d079fff
[   19.853622] NDCB0: 0x000d3000
[   19.853622] NDCB1: 0x92400000
[   19.853622] NDCB2: 0x00000000
[   19.853622] NDCB3: 0x00000000
[   19.872550] nand: nand_do_read_oob: from = 0x04940000, len = 64
[   19.878582] marvell-nfc pxa3xx-nand: 
[   19.878582] NDCR:  0x9d079fff
[   19.878582] NDCB0: 0x000d3000
[   19.878582] NDCB1: 0x92800000
[   19.878582] NDCB2: 0x00000000
[   19.878582] NDCB3: 0x00000000
[   19.897623] nand: nand_do_read_oob: from = 0x04960000, len = 64
[   19.903821] marvell-nfc pxa3xx-nand: 
[   19.903821] NDCR:  0x9d079fff
[   19.903821] NDCB0: 0x000d3000
[   19.903821] NDCB1: 0x92c00000
[   19.903821] NDCB2: 0x00000000
[   19.903821] NDCB3: 0x00000000
[   19.922750] nand: nand_do_read_oob: from = 0x04980000, len = 64
[   19.928953] marvell-nfc pxa3xx-nand: 
[   19.928953] NDCR:  0x9d079fff
[   19.928953] NDCB0: 0x000d3000
[   19.928953] NDCB1: 0x93000000
[   19.928953] NDCB2: 0x00000000
[   19.928953] NDCB3: 0x00000000
[   19.947873] nand: nand_do_read_oob: from = 0x049a0000, len = 64
[   19.954076] marvell-nfc pxa3xx-nand: 
[   19.954076] NDCR:  0x9d079fff
[   19.954076] NDCB0: 0x000d3000
[   19.954076] NDCB1: 0x93400000
[   19.954076] NDCB2: 0x00000000
[   19.954076] NDCB3: 0x00000000
[   19.973005] nand: nand_do_read_oob: from = 0x049c0000, len = 64
[   19.979207] marvell-nfc pxa3xx-nand: 
[   19.979207] NDCR:  0x9d079fff
[   19.979207] NDCB0: 0x000d3000
[   19.979207] NDCB1: 0x93800000
[   19.979207] NDCB2: 0x00000000
[   19.979207] NDCB3: 0x00000000
[   19.998127] nand: nand_do_read_oob: from = 0x049e0000, len = 64
[   20.004328] marvell-nfc pxa3xx-nand: 
[   20.004328] NDCR:  0x9d079fff
[   20.004328] NDCB0: 0x000d3000
[   20.004328] NDCB1: 0x93c00000
[   20.004328] NDCB2: 0x00000000
[   20.004328] NDCB3: 0x00000000
[   20.023259] nand: nand_do_read_oob: from = 0x04a00000, len = 64
[   20.029461] marvell-nfc pxa3xx-nand: 
[   20.029461] NDCR:  0x9d079fff
[   20.029461] NDCB0: 0x000d3000
[   20.029461] NDCB1: 0x94000000
[   20.029461] NDCB2: 0x00000000
[   20.029461] NDCB3: 0x00000000
[   20.048382] nand: nand_do_read_oob: from = 0x04a20000, len = 64
[   20.054584] marvell-nfc pxa3xx-nand: 
[   20.054584] NDCR:  0x9d079fff
[   20.054584] NDCB0: 0x000d3000
[   20.054584] NDCB1: 0x94400000
[   20.054584] NDCB2: 0x00000000
[   20.054584] NDCB3: 0x00000000
[   20.073513] nand: nand_do_read_oob: from = 0x04a40000, len = 64
[   20.079714] marvell-nfc pxa3xx-nand: 
[   20.079714] NDCR:  0x9d079fff
[   20.079714] NDCB0: 0x000d3000
[   20.079714] NDCB1: 0x94800000
[   20.079714] NDCB2: 0x00000000
[   20.079714] NDCB3: 0x00000000
[   20.099204] nand: nand_do_read_oob: from = 0x04a60000, len = 64
[   20.105249] marvell-nfc pxa3xx-nand: 
[   20.105249] NDCR:  0x9d079fff
[   20.105249] NDCB0: 0x000d3000
[   20.105249] NDCB1: 0x94c00000
[   20.105249] NDCB2: 0x00000000
[   20.105249] NDCB3: 0x00000000
[   20.124202] nand: nand_do_read_oob: from = 0x04a80000, len = 64
[   20.130406] marvell-nfc pxa3xx-nand: 
[   20.130406] NDCR:  0x9d079fff
[   20.130406] NDCB0: 0x000d3000
[   20.130406] NDCB1: 0x95000000
[   20.130406] NDCB2: 0x00000000
[   20.130406] NDCB3: 0x00000000
[   20.149339] nand: nand_do_read_oob: from = 0x04aa0000, len = 64
[   20.155367] marvell-nfc pxa3xx-nand: 
[   20.155367] NDCR:  0x9d079fff
[   20.155367] NDCB0: 0x000d3000
[   20.155367] NDCB1: 0x95400000
[   20.155367] NDCB2: 0x00000000
[   20.155367] NDCB3: 0x00000000
[   20.174300] nand: nand_do_read_oob: from = 0x04ac0000, len = 64
[   20.180506] marvell-nfc pxa3xx-nand: 
[   20.180506] NDCR:  0x9d079fff
[   20.180506] NDCB0: 0x000d3000
[   20.180506] NDCB1: 0x95800000
[   20.180506] NDCB2: 0x00000000
[   20.180506] NDCB3: 0x00000000
[   20.199435] nand: nand_do_read_oob: from = 0x04ae0000, len = 64
[   20.205466] marvell-nfc pxa3xx-nand: 
[   20.205466] NDCR:  0x9d079fff
[   20.205466] NDCB0: 0x000d3000
[   20.205466] NDCB1: 0x95c00000
[   20.205466] NDCB2: 0x00000000
[   20.205466] NDCB3: 0x00000000
[   20.224398] nand: nand_do_read_oob: from = 0x04b00000, len = 64
[   20.230595] marvell-nfc pxa3xx-nand: 
[   20.230595] NDCR:  0x9d079fff
[   20.230595] NDCB0: 0x000d3000
[   20.230595] NDCB1: 0x96000000
[   20.230595] NDCB2: 0x00000000
[   20.230595] NDCB3: 0x00000000
[   20.249526] nand: nand_do_read_oob: from = 0x04b20000, len = 64
[   20.255556] marvell-nfc pxa3xx-nand: 
[   20.255556] NDCR:  0x9d079fff
[   20.255556] NDCB0: 0x000d3000
[   20.255556] NDCB1: 0x96400000
[   20.255556] NDCB2: 0x00000000
[   20.255556] NDCB3: 0x00000000
[   20.274489] nand: nand_do_read_oob: from = 0x04b40000, len = 64
[   20.280694] marvell-nfc pxa3xx-nand: 
[   20.280694] NDCR:  0x9d079fff
[   20.280694] NDCB0: 0x000d3000
[   20.280694] NDCB1: 0x96800000
[   20.280694] NDCB2: 0x00000000
[   20.280694] NDCB3: 0x00000000
[   20.299624] nand: nand_do_read_oob: from = 0x04b60000, len = 64
[   20.305656] marvell-nfc pxa3xx-nand: 
[   20.305656] NDCR:  0x9d079fff
[   20.305656] NDCB0: 0x000d3000
[   20.305656] NDCB1: 0x96c00000
[   20.305656] NDCB2: 0x00000000
[   20.305656] NDCB3: 0x00000000
[   20.324591] nand: nand_do_read_oob: from = 0x04b80000, len = 64
[   20.330794] marvell-nfc pxa3xx-nand: 
[   20.330794] NDCR:  0x9d079fff
[   20.330794] NDCB0: 0x000d3000
[   20.330794] NDCB1: 0x97000000
[   20.330794] NDCB2: 0x00000000
[   20.330794] NDCB3: 0x00000000
[   20.349743] nand: nand_do_read_oob: from = 0x04ba0000, len = 64
[   20.355778] marvell-nfc pxa3xx-nand: 
[   20.355778] NDCR:  0x9d079fff
[   20.355778] NDCB0: 0x000d3000
[   20.355778] NDCB1: 0x97400000
[   20.355778] NDCB2: 0x00000000
[   20.355778] NDCB3: 0x00000000
[   20.374714] nand: nand_do_read_oob: from = 0x04bc0000, len = 64
[   20.380920] marvell-nfc pxa3xx-nand: 
[   20.380920] NDCR:  0x9d079fff
[   20.380920] NDCB0: 0x000d3000
[   20.380920] NDCB1: 0x97800000
[   20.380920] NDCB2: 0x00000000
[   20.380920] NDCB3: 0x00000000
[   20.399846] nand: nand_do_read_oob: from = 0x04be0000, len = 64
[   20.405878] marvell-nfc pxa3xx-nand: 
[   20.405878] NDCR:  0x9d079fff
[   20.405878] NDCB0: 0x000d3000
[   20.405878] NDCB1: 0x97c00000
[   20.405878] NDCB2: 0x00000000
[   20.405878] NDCB3: 0x00000000
[   20.424811] nand: nand_do_read_oob: from = 0x04c00000, len = 64
[   20.431017] marvell-nfc pxa3xx-nand: 
[   20.431017] NDCR:  0x9d079fff
[   20.431017] NDCB0: 0x000d3000
[   20.431017] NDCB1: 0x98000000
[   20.431017] NDCB2: 0x00000000
[   20.431017] NDCB3: 0x00000000
[   20.449946] nand: nand_do_read_oob: from = 0x04c20000, len = 64
[   20.455976] marvell-nfc pxa3xx-nand: 
[   20.455976] NDCR:  0x9d079fff
[   20.455976] NDCB0: 0x000d3000
[   20.455976] NDCB1: 0x98400000
[   20.455976] NDCB2: 0x00000000
[   20.455976] NDCB3: 0x00000000
[   20.474907] nand: nand_do_read_oob: from = 0x04c40000, len = 64
[   20.481105] marvell-nfc pxa3xx-nand: 
[   20.481105] NDCR:  0x9d079fff
[   20.481105] NDCB0: 0x000d3000
[   20.481105] NDCB1: 0x98800000
[   20.481105] NDCB2: 0x00000000
[   20.481105] NDCB3: 0x00000000
[   20.500035] nand: nand_do_read_oob: from = 0x04c60000, len = 64
[   20.506065] marvell-nfc pxa3xx-nand: 
[   20.506065] NDCR:  0x9d079fff
[   20.506065] NDCB0: 0x000d3000
[   20.506065] NDCB1: 0x98c00000
[   20.506065] NDCB2: 0x00000000
[   20.506065] NDCB3: 0x00000000
[   20.525001] nand: nand_do_read_oob: from = 0x04c80000, len = 64
[   20.531206] marvell-nfc pxa3xx-nand: 
[   20.531206] NDCR:  0x9d079fff
[   20.531206] NDCB0: 0x000d3000
[   20.531206] NDCB1: 0x99000000
[   20.531206] NDCB2: 0x00000000
[   20.531206] NDCB3: 0x00000000
[   20.550132] nand: nand_do_read_oob: from = 0x04ca0000, len = 64
[   20.556164] marvell-nfc pxa3xx-nand: 
[   20.556164] NDCR:  0x9d079fff
[   20.556164] NDCB0: 0x000d3000
[   20.556164] NDCB1: 0x99400000
[   20.556164] NDCB2: 0x00000000
[   20.556164] NDCB3: 0x00000000
[   20.575095] nand: nand_do_read_oob: from = 0x04cc0000, len = 64
[   20.581301] marvell-nfc pxa3xx-nand: 
[   20.581301] NDCR:  0x9d079fff
[   20.581301] NDCB0: 0x000d3000
[   20.581301] NDCB1: 0x99800000
[   20.581301] NDCB2: 0x00000000
[   20.581301] NDCB3: 0x00000000
[   20.600230] nand: nand_do_read_oob: from = 0x04ce0000, len = 64
[   20.606263] marvell-nfc pxa3xx-nand: 
[   20.606263] NDCR:  0x9d079fff
[   20.606263] NDCB0: 0x000d3000
[   20.606263] NDCB1: 0x99c00000
[   20.606263] NDCB2: 0x00000000
[   20.606263] NDCB3: 0x00000000
[   20.625194] nand: nand_do_read_oob: from = 0x04d00000, len = 64
[   20.631401] marvell-nfc pxa3xx-nand: 
[   20.631401] NDCR:  0x9d079fff
[   20.631401] NDCB0: 0x000d3000
[   20.631401] NDCB1: 0x9a000000
[   20.631401] NDCB2: 0x00000000
[   20.631401] NDCB3: 0x00000000
[   20.650328] nand: nand_do_read_oob: from = 0x04d20000, len = 64
[   20.656361] marvell-nfc pxa3xx-nand: 
[   20.656361] NDCR:  0x9d079fff
[   20.656361] NDCB0: 0x000d3000
[   20.656361] NDCB1: 0x9a400000
[   20.656361] NDCB2: 0x00000000
[   20.656361] NDCB3: 0x00000000
[   20.675294] nand: nand_do_read_oob: from = 0x04d40000, len = 64
[   20.681497] marvell-nfc pxa3xx-nand: 
[   20.681497] NDCR:  0x9d079fff
[   20.681497] NDCB0: 0x000d3000
[   20.681497] NDCB1: 0x9a800000
[   20.681497] NDCB2: 0x00000000
[   20.681497] NDCB3: 0x00000000
[   20.700426] nand: nand_do_read_oob: from = 0x04d60000, len = 64
[   20.706460] marvell-nfc pxa3xx-nand: 
[   20.706460] NDCR:  0x9d079fff
[   20.706460] NDCB0: 0x000d3000
[   20.706460] NDCB1: 0x9ac00000
[   20.706460] NDCB2: 0x00000000
[   20.706460] NDCB3: 0x00000000
[   20.725393] nand: nand_do_read_oob: from = 0x04d80000, len = 64
[   20.731598] marvell-nfc pxa3xx-nand: 
[   20.731598] NDCR:  0x9d079fff
[   20.731598] NDCB0: 0x000d3000
[   20.731598] NDCB1: 0x9b000000
[   20.731598] NDCB2: 0x00000000
[   20.731598] NDCB3: 0x00000000
[   20.750528] nand: nand_do_read_oob: from = 0x04da0000, len = 64
[   20.756559] marvell-nfc pxa3xx-nand: 
[   20.756559] NDCR:  0x9d079fff
[   20.756559] NDCB0: 0x000d3000
[   20.756559] NDCB1: 0x9b400000
[   20.756559] NDCB2: 0x00000000
[   20.756559] NDCB3: 0x00000000
[   20.775492] nand: nand_do_read_oob: from = 0x04dc0000, len = 64
[   20.781697] marvell-nfc pxa3xx-nand: 
[   20.781697] NDCR:  0x9d079fff
[   20.781697] NDCB0: 0x000d3000
[   20.781697] NDCB1: 0x9b800000
[   20.781697] NDCB2: 0x00000000
[   20.781697] NDCB3: 0x00000000
[   20.800624] nand: nand_do_read_oob: from = 0x04de0000, len = 64
[   20.806657] marvell-nfc pxa3xx-nand: 
[   20.806657] NDCR:  0x9d079fff
[   20.806657] NDCB0: 0x000d3000
[   20.806657] NDCB1: 0x9bc00000
[   20.806657] NDCB2: 0x00000000
[   20.806657] NDCB3: 0x00000000
[   20.825589] nand: nand_do_read_oob: from = 0x04e00000, len = 64
[   20.831793] marvell-nfc pxa3xx-nand: 
[   20.831793] NDCR:  0x9d079fff
[   20.831793] NDCB0: 0x000d3000
[   20.831793] NDCB1: 0x9c000000
[   20.831793] NDCB2: 0x00000000
[   20.831793] NDCB3: 0x00000000
[   20.850723] nand: nand_do_read_oob: from = 0x04e20000, len = 64
[   20.856756] marvell-nfc pxa3xx-nand: 
[   20.856756] NDCR:  0x9d079fff
[   20.856756] NDCB0: 0x000d3000
[   20.856756] NDCB1: 0x9c400000
[   20.856756] NDCB2: 0x00000000
[   20.856756] NDCB3: 0x00000000
[   20.875687] nand: nand_do_read_oob: from = 0x04e40000, len = 64
[   20.881891] marvell-nfc pxa3xx-nand: 
[   20.881891] NDCR:  0x9d079fff
[   20.881891] NDCB0: 0x000d3000
[   20.881891] NDCB1: 0x9c800000
[   20.881891] NDCB2: 0x00000000
[   20.881891] NDCB3: 0x00000000
[   20.900823] nand: nand_do_read_oob: from = 0x04e60000, len = 64
[   20.906854] marvell-nfc pxa3xx-nand: 
[   20.906854] NDCR:  0x9d079fff
[   20.906854] NDCB0: 0x000d3000
[   20.906854] NDCB1: 0x9cc00000
[   20.906854] NDCB2: 0x00000000
[   20.906854] NDCB3: 0x00000000
[   20.925784] nand: nand_do_read_oob: from = 0x04e80000, len = 64
[   20.931982] marvell-nfc pxa3xx-nand: 
[   20.931982] NDCR:  0x9d079fff
[   20.931982] NDCB0: 0x000d3000
[   20.931982] NDCB1: 0x9d000000
[   20.931982] NDCB2: 0x00000000
[   20.931982] NDCB3: 0x00000000
[   20.950911] nand: nand_do_read_oob: from = 0x04ea0000, len = 64
[   20.956944] marvell-nfc pxa3xx-nand: 
[   20.956944] NDCR:  0x9d079fff
[   20.956944] NDCB0: 0x000d3000
[   20.956944] NDCB1: 0x9d400000
[   20.956944] NDCB2: 0x00000000
[   20.956944] NDCB3: 0x00000000
[   20.975876] nand: nand_do_read_oob: from = 0x04ec0000, len = 64
[   20.982081] marvell-nfc pxa3xx-nand: 
[   20.982081] NDCR:  0x9d079fff
[   20.982081] NDCB0: 0x000d3000
[   20.982081] NDCB1: 0x9d800000
[   20.982081] NDCB2: 0x00000000
[   20.982081] NDCB3: 0x00000000
[   21.001026] nand: nand_do_read_oob: from = 0x04ee0000, len = 64
[   21.007059] marvell-nfc pxa3xx-nand: 
[   21.007059] NDCR:  0x9d079fff
[   21.007059] NDCB0: 0x000d3000
[   21.007059] NDCB1: 0x9dc00000
[   21.007059] NDCB2: 0x00000000
[   21.007059] NDCB3: 0x00000000
[   21.026003] nand: nand_do_read_oob: from = 0x04f00000, len = 64
[   21.032208] marvell-nfc pxa3xx-nand: 
[   21.032208] NDCR:  0x9d079fff
[   21.032208] NDCB0: 0x000d3000
[   21.032208] NDCB1: 0x9e000000
[   21.032208] NDCB2: 0x00000000
[   21.032208] NDCB3: 0x00000000
[   21.051135] nand: nand_do_read_oob: from = 0x04f20000, len = 64
[   21.057166] marvell-nfc pxa3xx-nand: 
[   21.057166] NDCR:  0x9d079fff
[   21.057166] NDCB0: 0x000d3000
[   21.057166] NDCB1: 0x9e400000
[   21.057166] NDCB2: 0x00000000
[   21.057166] NDCB3: 0x00000000
[   21.076100] nand: nand_do_read_oob: from = 0x04f40000, len = 64
[   21.082305] marvell-nfc pxa3xx-nand: 
[   21.082305] NDCR:  0x9d079fff
[   21.082305] NDCB0: 0x000d3000
[   21.082305] NDCB1: 0x9e800000
[   21.082305] NDCB2: 0x00000000
[   21.082305] NDCB3: 0x00000000
[   21.101232] nand: nand_do_read_oob: from = 0x04f60000, len = 64
[   21.107264] marvell-nfc pxa3xx-nand: 
[   21.107264] NDCR:  0x9d079fff
[   21.107264] NDCB0: 0x000d3000
[   21.107264] NDCB1: 0x9ec00000
[   21.107264] NDCB2: 0x00000000
[   21.107264] NDCB3: 0x00000000
[   21.126199] nand: nand_do_read_oob: from = 0x04f80000, len = 64
[   21.132404] marvell-nfc pxa3xx-nand: 
[   21.132404] NDCR:  0x9d079fff
[   21.132404] NDCB0: 0x000d3000
[   21.132404] NDCB1: 0x9f000000
[   21.132404] NDCB2: 0x00000000
[   21.132404] NDCB3: 0x00000000
[   21.151330] nand: nand_do_read_oob: from = 0x04fa0000, len = 64
[   21.157363] marvell-nfc pxa3xx-nand: 
[   21.157363] NDCR:  0x9d079fff
[   21.157363] NDCB0: 0x000d3000
[   21.157363] NDCB1: 0x9f400000
[   21.157363] NDCB2: 0x00000000
[   21.157363] NDCB3: 0x00000000
[   21.176296] nand: nand_do_read_oob: from = 0x04fc0000, len = 64
[   21.182504] marvell-nfc pxa3xx-nand: 
[   21.182504] NDCR:  0x9d079fff
[   21.182504] NDCB0: 0x000d3000
[   21.182504] NDCB1: 0x9f800000
[   21.182504] NDCB2: 0x00000000
[   21.182504] NDCB3: 0x00000000
[   21.201429] nand: nand_do_read_oob: from = 0x04fe0000, len = 64
[   21.207462] marvell-nfc pxa3xx-nand: 
[   21.207462] NDCR:  0x9d079fff
[   21.207462] NDCB0: 0x000d3000
[   21.207462] NDCB1: 0x9fc00000
[   21.207462] NDCB2: 0x00000000
[   21.207462] NDCB3: 0x00000000
[   21.226393] nand: nand_do_read_oob: from = 0x05000000, len = 64
[   21.232601] marvell-nfc pxa3xx-nand: 
[   21.232601] NDCR:  0x9d079fff
[   21.232601] NDCB0: 0x000d3000
[   21.232601] NDCB1: 0xa0000000
[   21.232601] NDCB2: 0x00000000
[   21.232601] NDCB3: 0x00000000
[   21.251528] nand: nand_do_read_oob: from = 0x05020000, len = 64
[   21.257559] marvell-nfc pxa3xx-nand: 
[   21.257559] NDCR:  0x9d079fff
[   21.257559] NDCB0: 0x000d3000
[   21.257559] NDCB1: 0xa0400000
[   21.257559] NDCB2: 0x00000000
[   21.257559] NDCB3: 0x00000000
[   21.276492] nand: nand_do_read_oob: from = 0x05040000, len = 64
[   21.282698] marvell-nfc pxa3xx-nand: 
[   21.282698] NDCR:  0x9d079fff
[   21.282698] NDCB0: 0x000d3000
[   21.282698] NDCB1: 0xa0800000
[   21.282698] NDCB2: 0x00000000
[   21.282698] NDCB3: 0x00000000
[   21.301627] nand: nand_do_read_oob: from = 0x05060000, len = 64
[   21.307657] marvell-nfc pxa3xx-nand: 
[   21.307657] NDCR:  0x9d079fff
[   21.307657] NDCB0: 0x000d3000
[   21.307657] NDCB1: 0xa0c00000
[   21.307657] NDCB2: 0x00000000
[   21.307657] NDCB3: 0x00000000
[   21.326591] nand: nand_do_read_oob: from = 0x05080000, len = 64
[   21.332799] marvell-nfc pxa3xx-nand: 
[   21.332799] NDCR:  0x9d079fff
[   21.332799] NDCB0: 0x000d3000
[   21.332799] NDCB1: 0xa1000000
[   21.332799] NDCB2: 0x00000000
[   21.332799] NDCB3: 0x00000000
[   21.351724] nand: nand_do_read_oob: from = 0x050a0000, len = 64
[   21.357757] marvell-nfc pxa3xx-nand: 
[   21.357757] NDCR:  0x9d079fff
[   21.357757] NDCB0: 0x000d3000
[   21.357757] NDCB1: 0xa1400000
[   21.357757] NDCB2: 0x00000000
[   21.357757] NDCB3: 0x00000000
[   21.376688] nand: nand_do_read_oob: from = 0x050c0000, len = 64
[   21.382895] marvell-nfc pxa3xx-nand: 
[   21.382895] NDCR:  0x9d079fff
[   21.382895] NDCB0: 0x000d3000
[   21.382895] NDCB1: 0xa1800000
[   21.382895] NDCB2: 0x00000000
[   21.382895] NDCB3: 0x00000000
[   21.401823] nand: nand_do_read_oob: from = 0x050e0000, len = 64
[   21.407856] marvell-nfc pxa3xx-nand: 
[   21.407856] NDCR:  0x9d079fff
[   21.407856] NDCB0: 0x000d3000
[   21.407856] NDCB1: 0xa1c00000
[   21.407856] NDCB2: 0x00000000
[   21.407856] NDCB3: 0x00000000
[   21.426787] nand: nand_do_read_oob: from = 0x05100000, len = 64
[   21.432994] marvell-nfc pxa3xx-nand: 
[   21.432994] NDCR:  0x9d079fff
[   21.432994] NDCB0: 0x000d3000
[   21.432994] NDCB1: 0xa2000000
[   21.432994] NDCB2: 0x00000000
[   21.432994] NDCB3: 0x00000000
[   21.451923] nand: nand_do_read_oob: from = 0x05120000, len = 64
[   21.457953] marvell-nfc pxa3xx-nand: 
[   21.457953] NDCR:  0x9d079fff
[   21.457953] NDCB0: 0x000d3000
[   21.457953] NDCB1: 0xa2400000
[   21.457953] NDCB2: 0x00000000
[   21.457953] NDCB3: 0x00000000
[   21.476885] nand: nand_do_read_oob: from = 0x05140000, len = 64
[   21.483093] marvell-nfc pxa3xx-nand: 
[   21.483093] NDCR:  0x9d079fff
[   21.483093] NDCB0: 0x000d3000
[   21.483093] NDCB1: 0xa2800000
[   21.483093] NDCB2: 0x00000000
[   21.483093] NDCB3: 0x00000000
[   21.502021] nand: nand_do_read_oob: from = 0x05160000, len = 64
[   21.508052] marvell-nfc pxa3xx-nand: 
[   21.508052] NDCR:  0x9d079fff
[   21.508052] NDCB0: 0x000d3000
[   21.508052] NDCB1: 0xa2c00000
[   21.508052] NDCB2: 0x00000000
[   21.508052] NDCB3: 0x00000000
[   21.526984] nand: nand_do_read_oob: from = 0x05180000, len = 64
[   21.533192] marvell-nfc pxa3xx-nand: 
[   21.533192] NDCR:  0x9d079fff
[   21.533192] NDCB0: 0x000d3000
[   21.533192] NDCB1: 0xa3000000
[   21.533192] NDCB2: 0x00000000
[   21.533192] NDCB3: 0x00000000
[   21.552119] nand: nand_do_read_oob: from = 0x051a0000, len = 64
[   21.558151] marvell-nfc pxa3xx-nand: 
[   21.558151] NDCR:  0x9d079fff
[   21.558151] NDCB0: 0x000d3000
[   21.558151] NDCB1: 0xa3400000
[   21.558151] NDCB2: 0x00000000
[   21.558151] NDCB3: 0x00000000
[   21.577083] nand: nand_do_read_oob: from = 0x051c0000, len = 64
[   21.583289] marvell-nfc pxa3xx-nand: 
[   21.583289] NDCR:  0x9d079fff
[   21.583289] NDCB0: 0x000d3000
[   21.583289] NDCB1: 0xa3800000
[   21.583289] NDCB2: 0x00000000
[   21.583289] NDCB3: 0x00000000
[   21.602219] nand: nand_do_read_oob: from = 0x051e0000, len = 64
[   21.608249] marvell-nfc pxa3xx-nand: 
[   21.608249] NDCR:  0x9d079fff
[   21.608249] NDCB0: 0x000d3000
[   21.608249] NDCB1: 0xa3c00000
[   21.608249] NDCB2: 0x00000000
[   21.608249] NDCB3: 0x00000000
[   21.627182] nand: nand_do_read_oob: from = 0x05200000, len = 64
[   21.633406] marvell-nfc pxa3xx-nand: 
[   21.633406] NDCR:  0x9d079fff
[   21.633406] NDCB0: 0x000d3000
[   21.633406] NDCB1: 0xa4000000
[   21.633406] NDCB2: 0x00000000
[   21.633406] NDCB3: 0x00000000
[   21.652336] nand: nand_do_read_oob: from = 0x05220000, len = 64
[   21.658364] marvell-nfc pxa3xx-nand: 
[   21.658364] NDCR:  0x9d079fff
[   21.658364] NDCB0: 0x000d3000
[   21.658364] NDCB1: 0xa4400000
[   21.658364] NDCB2: 0x00000000
[   21.658364] NDCB3: 0x00000000
[   21.677298] nand: nand_do_read_oob: from = 0x05240000, len = 64
[   21.683503] marvell-nfc pxa3xx-nand: 
[   21.683503] NDCR:  0x9d079fff
[   21.683503] NDCB0: 0x000d3000
[   21.683503] NDCB1: 0xa4800000
[   21.683503] NDCB2: 0x00000000
[   21.683503] NDCB3: 0x00000000
[   21.702432] nand: nand_do_read_oob: from = 0x05260000, len = 64
[   21.708462] marvell-nfc pxa3xx-nand: 
[   21.708462] NDCR:  0x9d079fff
[   21.708462] NDCB0: 0x000d3000
[   21.708462] NDCB1: 0xa4c00000
[   21.708462] NDCB2: 0x00000000
[   21.708462] NDCB3: 0x00000000
[   21.727395] nand: nand_do_read_oob: from = 0x05280000, len = 64
[   21.733601] marvell-nfc pxa3xx-nand: 
[   21.733601] NDCR:  0x9d079fff
[   21.733601] NDCB0: 0x000d3000
[   21.733601] NDCB1: 0xa5000000
[   21.733601] NDCB2: 0x00000000
[   21.733601] NDCB3: 0x00000000
[   21.752532] nand: nand_do_read_oob: from = 0x052a0000, len = 64
[   21.758561] marvell-nfc pxa3xx-nand: 
[   21.758561] NDCR:  0x9d079fff
[   21.758561] NDCB0: 0x000d3000
[   21.758561] NDCB1: 0xa5400000
[   21.758561] NDCB2: 0x00000000
[   21.758561] NDCB3: 0x00000000
[   21.777495] nand: nand_do_read_oob: from = 0x052c0000, len = 64
[   21.783700] marvell-nfc pxa3xx-nand: 
[   21.783700] NDCR:  0x9d079fff
[   21.783700] NDCB0: 0x000d3000
[   21.783700] NDCB1: 0xa5800000
[   21.783700] NDCB2: 0x00000000
[   21.783700] NDCB3: 0x00000000
[   21.802630] nand: nand_do_read_oob: from = 0x052e0000, len = 64
[   21.808831] marvell-nfc pxa3xx-nand: 
[   21.808831] NDCR:  0x9d079fff
[   21.808831] NDCB0: 0x000d3000
[   21.808831] NDCB1: 0xa5c00000
[   21.808831] NDCB2: 0x00000000
[   21.808831] NDCB3: 0x00000000
[   21.827742] nand: nand_do_read_oob: from = 0x05300000, len = 64
[   21.833943] marvell-nfc pxa3xx-nand: 
[   21.833943] NDCR:  0x9d079fff
[   21.833943] NDCB0: 0x000d3000
[   21.833943] NDCB1: 0xa6000000
[   21.833943] NDCB2: 0x00000000
[   21.833943] NDCB3: 0x00000000
[   21.852875] nand: nand_do_read_oob: from = 0x05320000, len = 64
[   21.859075] marvell-nfc pxa3xx-nand: 
[   21.859075] NDCR:  0x9d079fff
[   21.859075] NDCB0: 0x000d3000
[   21.859075] NDCB1: 0xa6400000
[   21.859075] NDCB2: 0x00000000
[   21.859075] NDCB3: 0x00000000
[   21.877997] nand: nand_do_read_oob: from = 0x05340000, len = 64
[   21.884198] marvell-nfc pxa3xx-nand: 
[   21.884198] NDCR:  0x9d079fff
[   21.884198] NDCB0: 0x000d3000
[   21.884198] NDCB1: 0xa6800000
[   21.884198] NDCB2: 0x00000000
[   21.884198] NDCB3: 0x00000000
[   21.903130] nand: nand_do_read_oob: from = 0x05360000, len = 64
[   21.909328] marvell-nfc pxa3xx-nand: 
[   21.909328] NDCR:  0x9d079fff
[   21.909328] NDCB0: 0x000d3000
[   21.909328] NDCB1: 0xa6c00000
[   21.909328] NDCB2: 0x00000000
[   21.909328] NDCB3: 0x00000000
[   21.928250] nand: nand_do_read_oob: from = 0x05380000, len = 64
[   21.934453] marvell-nfc pxa3xx-nand: 
[   21.934453] NDCR:  0x9d079fff
[   21.934453] NDCB0: 0x000d3000
[   21.934453] NDCB1: 0xa7000000
[   21.934453] NDCB2: 0x00000000
[   21.934453] NDCB3: 0x00000000
[   21.953384] nand: nand_do_read_oob: from = 0x053a0000, len = 64
[   21.959583] marvell-nfc pxa3xx-nand: 
[   21.959583] NDCR:  0x9d079fff
[   21.959583] NDCB0: 0x000d3000
[   21.959583] NDCB1: 0xa7400000
[   21.959583] NDCB2: 0x00000000
[   21.959583] NDCB3: 0x00000000
[   21.978503] nand: nand_do_read_oob: from = 0x053c0000, len = 64
[   21.984706] marvell-nfc pxa3xx-nand: 
[   21.984706] NDCR:  0x9d079fff
[   21.984706] NDCB0: 0x000d3000
[   21.984706] NDCB1: 0xa7800000
[   21.984706] NDCB2: 0x00000000
[   21.984706] NDCB3: 0x00000000
[   22.003635] nand: nand_do_read_oob: from = 0x053e0000, len = 64
[   22.009842] marvell-nfc pxa3xx-nand: 
[   22.009842] NDCR:  0x9d079fff
[   22.009842] NDCB0: 0x000d3000
[   22.009842] NDCB1: 0xa7c00000
[   22.009842] NDCB2: 0x00000000
[   22.009842] NDCB3: 0x00000000
[   22.028841] nand: nand_do_read_oob: from = 0x05400000, len = 64
[   22.034878] marvell-nfc pxa3xx-nand: 
[   22.034878] NDCR:  0x9d079fff
[   22.034878] NDCB0: 0x000d3000
[   22.034878] NDCB1: 0xa8000000
[   22.034878] NDCB2: 0x00000000
[   22.034878] NDCB3: 0x00000000
[   22.053811] nand: nand_do_read_oob: from = 0x05420000, len = 64
[   22.060013] marvell-nfc pxa3xx-nand: 
[   22.060013] NDCR:  0x9d079fff
[   22.060013] NDCB0: 0x000d3000
[   22.060013] NDCB1: 0xa8400000
[   22.060013] NDCB2: 0x00000000
[   22.060013] NDCB3: 0x00000000
[   22.079132] nand: nand_do_read_oob: from = 0x05440000, len = 64
[   22.085172] marvell-nfc pxa3xx-nand: 
[   22.085172] NDCR:  0x9d079fff
[   22.085172] NDCB0: 0x000d3000
[   22.085172] NDCB1: 0xa8800000
[   22.085172] NDCB2: 0x00000000
[   22.085172] NDCB3: 0x00000000
[   22.104450] nand: nand_do_read_oob: from = 0x05460000, len = 64
[   22.110686] marvell-nfc pxa3xx-nand: 
[   22.110686] NDCR:  0x9d079fff
[   22.110686] NDCB0: 0x000d3000
[   22.110686] NDCB1: 0xa8c00000
[   22.110686] NDCB2: 0x00000000
[   22.110686] NDCB3: 0x00000000
[   22.129626] nand: nand_do_read_oob: from = 0x05480000, len = 64
[   22.135656] marvell-nfc pxa3xx-nand: 
[   22.135656] NDCR:  0x9d079fff
[   22.135656] NDCB0: 0x000d3000
[   22.135656] NDCB1: 0xa9000000
[   22.135656] NDCB2: 0x00000000
[   22.135656] NDCB3: 0x00000000
[   22.154590] nand: nand_do_read_oob: from = 0x054a0000, len = 64
[   22.160794] marvell-nfc pxa3xx-nand: 
[   22.160794] NDCR:  0x9d079fff
[   22.160794] NDCB0: 0x000d3000
[   22.160794] NDCB1: 0xa9400000
[   22.160794] NDCB2: 0x00000000
[   22.160794] NDCB3: 0x00000000
[   22.179727] nand: nand_do_read_oob: from = 0x054c0000, len = 64
[   22.185755] marvell-nfc pxa3xx-nand: 
[   22.185755] NDCR:  0x9d079fff
[   22.185755] NDCB0: 0x000d3000
[   22.185755] NDCB1: 0xa9800000
[   22.185755] NDCB2: 0x00000000
[   22.185755] NDCB3: 0x00000000
[   22.204688] nand: nand_do_read_oob: from = 0x054e0000, len = 64
[   22.210917] marvell-nfc pxa3xx-nand: 
[   22.210917] NDCR:  0x9d079fff
[   22.210917] NDCB0: 0x000d3000
[   22.210917] NDCB1: 0xa9c00000
[   22.210917] NDCB2: 0x00000000
[   22.210917] NDCB3: 0x00000000
[   22.229850] nand: nand_do_read_oob: from = 0x05500000, len = 64
[   22.235880] marvell-nfc pxa3xx-nand: 
[   22.235880] NDCR:  0x9d079fff
[   22.235880] NDCB0: 0x000d3000
[   22.235880] NDCB1: 0xaa000000
[   22.235880] NDCB2: 0x00000000
[   22.235880] NDCB3: 0x00000000
[   22.254813] nand: nand_do_read_oob: from = 0x05520000, len = 64
[   22.261019] marvell-nfc pxa3xx-nand: 
[   22.261019] NDCR:  0x9d079fff
[   22.261019] NDCB0: 0x000d3000
[   22.261019] NDCB1: 0xaa400000
[   22.261019] NDCB2: 0x00000000
[   22.261019] NDCB3: 0x00000000
[   22.279948] nand: nand_do_read_oob: from = 0x05540000, len = 64
[   22.285978] marvell-nfc pxa3xx-nand: 
[   22.285978] NDCR:  0x9d079fff
[   22.285978] NDCB0: 0x000d3000
[   22.285978] NDCB1: 0xaa800000
[   22.285978] NDCB2: 0x00000000
[   22.285978] NDCB3: 0x00000000
[   22.304912] nand: nand_do_read_oob: from = 0x05560000, len = 64
[   22.311116] marvell-nfc pxa3xx-nand: 
[   22.311116] NDCR:  0x9d079fff
[   22.311116] NDCB0: 0x000d3000
[   22.311116] NDCB1: 0xaac00000
[   22.311116] NDCB2: 0x00000000
[   22.311116] NDCB3: 0x00000000
[   22.330047] nand: nand_do_read_oob: from = 0x05580000, len = 64
[   22.336076] marvell-nfc pxa3xx-nand: 
[   22.336076] NDCR:  0x9d079fff
[   22.336076] NDCB0: 0x000d3000
[   22.336076] NDCB1: 0xab000000
[   22.336076] NDCB2: 0x00000000
[   22.336076] NDCB3: 0x00000000
[   22.355012] nand: nand_do_read_oob: from = 0x055a0000, len = 64
[   22.361214] marvell-nfc pxa3xx-nand: 
[   22.361214] NDCR:  0x9d079fff
[   22.361214] NDCB0: 0x000d3000
[   22.361214] NDCB1: 0xab400000
[   22.361214] NDCB2: 0x00000000
[   22.361214] NDCB3: 0x00000000
[   22.380143] nand: nand_do_read_oob: from = 0x055c0000, len = 64
[   22.386175] marvell-nfc pxa3xx-nand: 
[   22.386175] NDCR:  0x9d079fff
[   22.386175] NDCB0: 0x000d3000
[   22.386175] NDCB1: 0xab800000
[   22.386175] NDCB2: 0x00000000
[   22.386175] NDCB3: 0x00000000
[   22.405106] nand: nand_do_read_oob: from = 0x055e0000, len = 64
[   22.411303] marvell-nfc pxa3xx-nand: 
[   22.411303] NDCR:  0x9d079fff
[   22.411303] NDCB0: 0x000d3000
[   22.411303] NDCB1: 0xabc00000
[   22.411303] NDCB2: 0x00000000
[   22.411303] NDCB3: 0x00000000
[   22.430224] nand: nand_do_read_oob: from = 0x05600000, len = 64
[   22.436256] marvell-nfc pxa3xx-nand: 
[   22.436256] NDCR:  0x9d079fff
[   22.436256] NDCB0: 0x000d3000
[   22.436256] NDCB1: 0xac000000
[   22.436256] NDCB2: 0x00000000
[   22.436256] NDCB3: 0x00000000
[   22.455189] nand: nand_do_read_oob: from = 0x05620000, len = 64
[   22.461395] marvell-nfc pxa3xx-nand: 
[   22.461395] NDCR:  0x9d079fff
[   22.461395] NDCB0: 0x000d3000
[   22.461395] NDCB1: 0xac400000
[   22.461395] NDCB2: 0x00000000
[   22.461395] NDCB3: 0x00000000
[   22.480324] nand: nand_do_read_oob: from = 0x05640000, len = 64
[   22.486355] marvell-nfc pxa3xx-nand: 
[   22.486355] NDCR:  0x9d079fff
[   22.486355] NDCB0: 0x000d3000
[   22.486355] NDCB1: 0xac800000
[   22.486355] NDCB2: 0x00000000
[   22.486355] NDCB3: 0x00000000
[   22.505288] nand: nand_do_read_oob: from = 0x05660000, len = 64
[   22.511493] marvell-nfc pxa3xx-nand: 
[   22.511493] NDCR:  0x9d079fff
[   22.511493] NDCB0: 0x000d3000
[   22.511493] NDCB1: 0xacc00000
[   22.511493] NDCB2: 0x00000000
[   22.511493] NDCB3: 0x00000000
[   22.530421] nand: nand_do_read_oob: from = 0x05680000, len = 64
[   22.536453] marvell-nfc pxa3xx-nand: 
[   22.536453] NDCR:  0x9d079fff
[   22.536453] NDCB0: 0x000d3000
[   22.536453] NDCB1: 0xad000000
[   22.536453] NDCB2: 0x00000000
[   22.536453] NDCB3: 0x00000000
[   22.555387] nand: nand_do_read_oob: from = 0x056a0000, len = 64
[   22.561591] marvell-nfc pxa3xx-nand: 
[   22.561591] NDCR:  0x9d079fff
[   22.561591] NDCB0: 0x000d3000
[   22.561591] NDCB1: 0xad400000
[   22.561591] NDCB2: 0x00000000
[   22.561591] NDCB3: 0x00000000
[   22.580520] nand: nand_do_read_oob: from = 0x056c0000, len = 64
[   22.586552] marvell-nfc pxa3xx-nand: 
[   22.586552] NDCR:  0x9d079fff
[   22.586552] NDCB0: 0x000d3000
[   22.586552] NDCB1: 0xad800000
[   22.586552] NDCB2: 0x00000000
[   22.586552] NDCB3: 0x00000000
[   22.605486] nand: nand_do_read_oob: from = 0x056e0000, len = 64
[   22.611689] marvell-nfc pxa3xx-nand: 
[   22.611689] NDCR:  0x9d079fff
[   22.611689] NDCB0: 0x000d3000
[   22.611689] NDCB1: 0xadc00000
[   22.611689] NDCB2: 0x00000000
[   22.611689] NDCB3: 0x00000000
[   22.630620] nand: nand_do_read_oob: from = 0x05700000, len = 64
[   22.636650] marvell-nfc pxa3xx-nand: 
[   22.636650] NDCR:  0x9d079fff
[   22.636650] NDCB0: 0x000d3000
[   22.636650] NDCB1: 0xae000000
[   22.636650] NDCB2: 0x00000000
[   22.636650] NDCB3: 0x00000000
[   22.655583] nand: nand_do_read_oob: from = 0x05720000, len = 64
[   22.661789] marvell-nfc pxa3xx-nand: 
[   22.661789] NDCR:  0x9d079fff
[   22.661789] NDCB0: 0x000d3000
[   22.661789] NDCB1: 0xae400000
[   22.661789] NDCB2: 0x00000000
[   22.661789] NDCB3: 0x00000000
[   22.680718] nand: nand_do_read_oob: from = 0x05740000, len = 64
[   22.686748] marvell-nfc pxa3xx-nand: 
[   22.686748] NDCR:  0x9d079fff
[   22.686748] NDCB0: 0x000d3000
[   22.686748] NDCB1: 0xae800000
[   22.686748] NDCB2: 0x00000000
[   22.686748] NDCB3: 0x00000000
[   22.705687] nand: nand_do_read_oob: from = 0x05760000, len = 64
[   22.711887] marvell-nfc pxa3xx-nand: 
[   22.711887] NDCR:  0x9d079fff
[   22.711887] NDCB0: 0x000d3000
[   22.711887] NDCB1: 0xaec00000
[   22.711887] NDCB2: 0x00000000
[   22.711887] NDCB3: 0x00000000
[   22.730816] nand: nand_do_read_oob: from = 0x05780000, len = 64
[   22.736846] marvell-nfc pxa3xx-nand: 
[   22.736846] NDCR:  0x9d079fff
[   22.736846] NDCB0: 0x000d3000
[   22.736846] NDCB1: 0xaf000000
[   22.736846] NDCB2: 0x00000000
[   22.736846] NDCB3: 0x00000000
[   22.755779] nand: nand_do_read_oob: from = 0x057a0000, len = 64
[   22.761985] marvell-nfc pxa3xx-nand: 
[   22.761985] NDCR:  0x9d079fff
[   22.761985] NDCB0: 0x000d3000
[   22.761985] NDCB1: 0xaf400000
[   22.761985] NDCB2: 0x00000000
[   22.761985] NDCB3: 0x00000000
[   22.780915] nand: nand_do_read_oob: from = 0x057c0000, len = 64
[   22.786945] marvell-nfc pxa3xx-nand: 
[   22.786945] NDCR:  0x9d079fff
[   22.786945] NDCB0: 0x000d3000
[   22.786945] NDCB1: 0xaf800000
[   22.786945] NDCB2: 0x00000000
[   22.786945] NDCB3: 0x00000000
[   22.805881] nand: nand_do_read_oob: from = 0x057e0000, len = 64
[   22.812084] marvell-nfc pxa3xx-nand: 
[   22.812084] NDCR:  0x9d079fff
[   22.812084] NDCB0: 0x000d3000
[   22.812084] NDCB1: 0xafc00000
[   22.812084] NDCB2: 0x00000000
[   22.812084] NDCB3: 0x00000000
[   22.831015] nand: nand_do_read_oob: from = 0x05800000, len = 64
[   22.837043] marvell-nfc pxa3xx-nand: 
[   22.837043] NDCR:  0x9d079fff
[   22.837043] NDCB0: 0x000d3000
[   22.837043] NDCB1: 0xb0000000
[   22.837043] NDCB2: 0x00000000
[   22.837043] NDCB3: 0x00000000
[   22.855995] nand: nand_do_read_oob: from = 0x05820000, len = 64
[   22.862200] marvell-nfc pxa3xx-nand: 
[   22.862200] NDCR:  0x9d079fff
[   22.862200] NDCB0: 0x000d3000
[   22.862200] NDCB1: 0xb0400000
[   22.862200] NDCB2: 0x00000000
[   22.862200] NDCB3: 0x00000000
[   22.881131] nand: nand_do_read_oob: from = 0x05840000, len = 64
[   22.887159] marvell-nfc pxa3xx-nand: 
[   22.887159] NDCR:  0x9d079fff
[   22.887159] NDCB0: 0x000d3000
[   22.887159] NDCB1: 0xb0800000
[   22.887159] NDCB2: 0x00000000
[   22.887159] NDCB3: 0x00000000
[   22.906094] nand: nand_do_read_oob: from = 0x05860000, len = 64
[   22.912298] marvell-nfc pxa3xx-nand: 
[   22.912298] NDCR:  0x9d079fff
[   22.912298] NDCB0: 0x000d3000
[   22.912298] NDCB1: 0xb0c00000
[   22.912298] NDCB2: 0x00000000
[   22.912298] NDCB3: 0x00000000
[   22.931228] nand: nand_do_read_oob: from = 0x05880000, len = 64
[   22.937259] marvell-nfc pxa3xx-nand: 
[   22.937259] NDCR:  0x9d079fff
[   22.937259] NDCB0: 0x000d3000
[   22.937259] NDCB1: 0xb1000000
[   22.937259] NDCB2: 0x00000000
[   22.937259] NDCB3: 0x00000000
[   22.956190] nand: nand_do_read_oob: from = 0x058a0000, len = 64
[   22.962397] marvell-nfc pxa3xx-nand: 
[   22.962397] NDCR:  0x9d079fff
[   22.962397] NDCB0: 0x000d3000
[   22.962397] NDCB1: 0xb1400000
[   22.962397] NDCB2: 0x00000000
[   22.962397] NDCB3: 0x00000000
[   22.981325] nand: nand_do_read_oob: from = 0x058c0000, len = 64
[   22.987356] marvell-nfc pxa3xx-nand: 
[   22.987356] NDCR:  0x9d079fff
[   22.987356] NDCB0: 0x000d3000
[   22.987356] NDCB1: 0xb1800000
[   22.987356] NDCB2: 0x00000000
[   22.987356] NDCB3: 0x00000000
[   23.006291] nand: nand_do_read_oob: from = 0x058e0000, len = 64
[   23.012504] marvell-nfc pxa3xx-nand: 
[   23.012504] NDCR:  0x9d079fff
[   23.012504] NDCB0: 0x000d3000
[   23.012504] NDCB1: 0xb1c00000
[   23.012504] NDCB2: 0x00000000
[   23.012504] NDCB3: 0x00000000
[   23.031434] nand: nand_do_read_oob: from = 0x05900000, len = 64
[   23.037464] marvell-nfc pxa3xx-nand: 
[   23.037464] NDCR:  0x9d079fff
[   23.037464] NDCB0: 0x000d3000
[   23.037464] NDCB1: 0xb2000000
[   23.037464] NDCB2: 0x00000000
[   23.037464] NDCB3: 0x00000000
[   23.056397] nand: nand_do_read_oob: from = 0x05920000, len = 64
[   23.062602] marvell-nfc pxa3xx-nand: 
[   23.062602] NDCR:  0x9d079fff
[   23.062602] NDCB0: 0x000d3000
[   23.062602] NDCB1: 0xb2400000
[   23.062602] NDCB2: 0x00000000
[   23.062602] NDCB3: 0x00000000
[   23.081530] nand: nand_do_read_oob: from = 0x05940000, len = 64
[   23.087563] marvell-nfc pxa3xx-nand: 
[   23.087563] NDCR:  0x9d079fff
[   23.087563] NDCB0: 0x000d3000
[   23.087563] NDCB1: 0xb2800000
[   23.087563] NDCB2: 0x00000000
[   23.087563] NDCB3: 0x00000000
[   23.106495] nand: nand_do_read_oob: from = 0x05960000, len = 64
[   23.112698] marvell-nfc pxa3xx-nand: 
[   23.112698] NDCR:  0x9d079fff
[   23.112698] NDCB0: 0x000d3000
[   23.112698] NDCB1: 0xb2c00000
[   23.112698] NDCB2: 0x00000000
[   23.112698] NDCB3: 0x00000000
[   23.131629] nand: nand_do_read_oob: from = 0x05980000, len = 64
[   23.137661] marvell-nfc pxa3xx-nand: 
[   23.137661] NDCR:  0x9d079fff
[   23.137661] NDCB0: 0x000d3000
[   23.137661] NDCB1: 0xb3000000
[   23.137661] NDCB2: 0x00000000
[   23.137661] NDCB3: 0x00000000
[   23.156593] nand: nand_do_read_oob: from = 0x059a0000, len = 64
[   23.162801] marvell-nfc pxa3xx-nand: 
[   23.162801] NDCR:  0x9d079fff
[   23.162801] NDCB0: 0x000d3000
[   23.162801] NDCB1: 0xb3400000
[   23.162801] NDCB2: 0x00000000
[   23.162801] NDCB3: 0x00000000
[   23.181727] nand: nand_do_read_oob: from = 0x059c0000, len = 64
[   23.187758] marvell-nfc pxa3xx-nand: 
[   23.187758] NDCR:  0x9d079fff
[   23.187758] NDCB0: 0x000d3000
[   23.187758] NDCB1: 0xb3800000
[   23.187758] NDCB2: 0x00000000
[   23.187758] NDCB3: 0x00000000
[   23.206692] nand: nand_do_read_oob: from = 0x059e0000, len = 64
[   23.212897] marvell-nfc pxa3xx-nand: 
[   23.212897] NDCR:  0x9d079fff
[   23.212897] NDCB0: 0x000d3000
[   23.212897] NDCB1: 0xb3c00000
[   23.212897] NDCB2: 0x00000000
[   23.212897] NDCB3: 0x00000000
[   23.231825] nand: nand_do_read_oob: from = 0x05a00000, len = 64
[   23.237859] marvell-nfc pxa3xx-nand: 
[   23.237859] NDCR:  0x9d079fff
[   23.237859] NDCB0: 0x000d3000
[   23.237859] NDCB1: 0xb4000000
[   23.237859] NDCB2: 0x00000000
[   23.237859] NDCB3: 0x00000000
[   23.256787] nand: nand_do_read_oob: from = 0x05a20000, len = 64
[   23.262986] marvell-nfc pxa3xx-nand: 
[   23.262986] NDCR:  0x9d079fff
[   23.262986] NDCB0: 0x000d3000
[   23.262986] NDCB1: 0xb4400000
[   23.262986] NDCB2: 0x00000000
[   23.262986] NDCB3: 0x00000000
[   23.281915] nand: nand_do_read_oob: from = 0x05a40000, len = 64
[   23.287948] marvell-nfc pxa3xx-nand: 
[   23.287948] NDCR:  0x9d079fff
[   23.287948] NDCB0: 0x000d3000
[   23.287948] NDCB1: 0xb4800000
[   23.287948] NDCB2: 0x00000000
[   23.287948] NDCB3: 0x00000000
[   23.306880] nand: nand_do_read_oob: from = 0x05a60000, len = 64
[   23.313086] marvell-nfc pxa3xx-nand: 
[   23.313086] NDCR:  0x9d079fff
[   23.313086] NDCB0: 0x000d3000
[   23.313086] NDCB1: 0xb4c00000
[   23.313086] NDCB2: 0x00000000
[   23.313086] NDCB3: 0x00000000
[   23.332015] nand: nand_do_read_oob: from = 0x05a80000, len = 64
[   23.338046] marvell-nfc pxa3xx-nand: 
[   23.338046] NDCR:  0x9d079fff
[   23.338046] NDCB0: 0x000d3000
[   23.338046] NDCB1: 0xb5000000
[   23.338046] NDCB2: 0x00000000
[   23.338046] NDCB3: 0x00000000
[   23.356978] nand: nand_do_read_oob: from = 0x05aa0000, len = 64
[   23.363184] marvell-nfc pxa3xx-nand: 
[   23.363184] NDCR:  0x9d079fff
[   23.363184] NDCB0: 0x000d3000
[   23.363184] NDCB1: 0xb5400000
[   23.363184] NDCB2: 0x00000000
[   23.363184] NDCB3: 0x00000000
[   23.382113] nand: nand_do_read_oob: from = 0x05ac0000, len = 64
[   23.388145] marvell-nfc pxa3xx-nand: 
[   23.388145] NDCR:  0x9d079fff
[   23.388145] NDCB0: 0x000d3000
[   23.388145] NDCB1: 0xb5800000
[   23.388145] NDCB2: 0x00000000
[   23.388145] NDCB3: 0x00000000
[   23.407075] nand: nand_do_read_oob: from = 0x05ae0000, len = 64
[   23.413274] marvell-nfc pxa3xx-nand: 
[   23.413274] NDCR:  0x9d079fff
[   23.413274] NDCB0: 0x000d3000
[   23.413274] NDCB1: 0xb5c00000
[   23.413274] NDCB2: 0x00000000
[   23.413274] NDCB3: 0x00000000
[   23.432201] nand: nand_do_read_oob: from = 0x05b00000, len = 64
[   23.438234] marvell-nfc pxa3xx-nand: 
[   23.438234] NDCR:  0x9d079fff
[   23.438234] NDCB0: 0x000d3000
[   23.438234] NDCB1: 0xb6000000
[   23.438234] NDCB2: 0x00000000
[   23.438234] NDCB3: 0x00000000
[   23.457167] nand: nand_do_read_oob: from = 0x05b20000, len = 64
[   23.463372] marvell-nfc pxa3xx-nand: 
[   23.463372] NDCR:  0x9d079fff
[   23.463372] NDCB0: 0x000d3000
[   23.463372] NDCB1: 0xb6400000
[   23.463372] NDCB2: 0x00000000
[   23.463372] NDCB3: 0x00000000
[   23.482301] nand: nand_do_read_oob: from = 0x05b40000, len = 64
[   23.488332] marvell-nfc pxa3xx-nand: 
[   23.488332] NDCR:  0x9d079fff
[   23.488332] NDCB0: 0x000d3000
[   23.488332] NDCB1: 0xb6800000
[   23.488332] NDCB2: 0x00000000
[   23.488332] NDCB3: 0x00000000
[   23.507285] nand: nand_do_read_oob: from = 0x05b60000, len = 64
[   23.513489] marvell-nfc pxa3xx-nand: 
[   23.513489] NDCR:  0x9d079fff
[   23.513489] NDCB0: 0x000d3000
[   23.513489] NDCB1: 0xb6c00000
[   23.513489] NDCB2: 0x00000000
[   23.513489] NDCB3: 0x00000000
[   23.532416] nand: nand_do_read_oob: from = 0x05b80000, len = 64
[   23.538449] marvell-nfc pxa3xx-nand: 
[   23.538449] NDCR:  0x9d079fff
[   23.538449] NDCB0: 0x000d3000
[   23.538449] NDCB1: 0xb7000000
[   23.538449] NDCB2: 0x00000000
[   23.538449] NDCB3: 0x00000000
[   23.557381] nand: nand_do_read_oob: from = 0x05ba0000, len = 64
[   23.563587] marvell-nfc pxa3xx-nand: 
[   23.563587] NDCR:  0x9d079fff
[   23.563587] NDCB0: 0x000d3000
[   23.563587] NDCB1: 0xb7400000
[   23.563587] NDCB2: 0x00000000
[   23.563587] NDCB3: 0x00000000
[   23.582513] nand: nand_do_read_oob: from = 0x05bc0000, len = 64
[   23.588548] marvell-nfc pxa3xx-nand: 
[   23.588548] NDCR:  0x9d079fff
[   23.588548] NDCB0: 0x000d3000
[   23.588548] NDCB1: 0xb7800000
[   23.588548] NDCB2: 0x00000000
[   23.588548] NDCB3: 0x00000000
[   23.607479] nand: nand_do_read_oob: from = 0x05be0000, len = 64
[   23.613687] marvell-nfc pxa3xx-nand: 
[   23.613687] NDCR:  0x9d079fff
[   23.613687] NDCB0: 0x000d3000
[   23.613687] NDCB1: 0xb7c00000
[   23.613687] NDCB2: 0x00000000
[   23.613687] NDCB3: 0x00000000
[   23.632614] nand: nand_do_read_oob: from = 0x05c00000, len = 64
[   23.638819] marvell-nfc pxa3xx-nand: 
[   23.638819] NDCR:  0x9d079fff
[   23.638819] NDCB0: 0x000d3000
[   23.638819] NDCB1: 0xb8000000
[   23.638819] NDCB2: 0x00000000
[   23.638819] NDCB3: 0x00000000
[   23.657722] nand: nand_do_read_oob: from = 0x05c20000, len = 64
[   23.663920] marvell-nfc pxa3xx-nand: 
[   23.663920] NDCR:  0x9d079fff
[   23.663920] NDCB0: 0x000d3000
[   23.663920] NDCB1: 0xb8400000
[   23.663920] NDCB2: 0x00000000
[   23.663920] NDCB3: 0x00000000
[   23.682847] nand: nand_do_read_oob: from = 0x05c40000, len = 64
[   23.689054] marvell-nfc pxa3xx-nand: 
[   23.689054] NDCR:  0x9d079fff
[   23.689054] NDCB0: 0x000d3000
[   23.689054] NDCB1: 0xb8800000
[   23.689054] NDCB2: 0x00000000
[   23.689054] NDCB3: 0x00000000
[   23.707971] nand: nand_do_read_oob: from = 0x05c60000, len = 64
[   23.714176] marvell-nfc pxa3xx-nand: 
[   23.714176] NDCR:  0x9d079fff
[   23.714176] NDCB0: 0x000d3000
[   23.714176] NDCB1: 0xb8c00000
[   23.714176] NDCB2: 0x00000000
[   23.714176] NDCB3: 0x00000000
[   23.733103] nand: nand_do_read_oob: from = 0x05c80000, len = 64
[   23.739307] marvell-nfc pxa3xx-nand: 
[   23.739307] NDCR:  0x9d079fff
[   23.739307] NDCB0: 0x000d3000
[   23.739307] NDCB1: 0xb9000000
[   23.739307] NDCB2: 0x00000000
[   23.739307] NDCB3: 0x00000000
[   23.758224] nand: nand_do_read_oob: from = 0x05ca0000, len = 64
[   23.764430] marvell-nfc pxa3xx-nand: 
[   23.764430] NDCR:  0x9d079fff
[   23.764430] NDCB0: 0x000d3000
[   23.764430] NDCB1: 0xb9400000
[   23.764430] NDCB2: 0x00000000
[   23.764430] NDCB3: 0x00000000
[   23.783358] nand: nand_do_read_oob: from = 0x05cc0000, len = 64
[   23.789559] marvell-nfc pxa3xx-nand: 
[   23.789559] NDCR:  0x9d079fff
[   23.789559] NDCB0: 0x000d3000
[   23.789559] NDCB1: 0xb9800000
[   23.789559] NDCB2: 0x00000000
[   23.789559] NDCB3: 0x00000000
[   23.808477] nand: nand_do_read_oob: from = 0x05ce0000, len = 64
[   23.814682] marvell-nfc pxa3xx-nand: 
[   23.814682] NDCR:  0x9d079fff
[   23.814682] NDCB0: 0x000d3000
[   23.814682] NDCB1: 0xb9c00000
[   23.814682] NDCB2: 0x00000000
[   23.814682] NDCB3: 0x00000000
[   23.833610] nand: nand_do_read_oob: from = 0x05d00000, len = 64
[   23.839813] marvell-nfc pxa3xx-nand: 
[   23.839813] NDCR:  0x9d079fff
[   23.839813] NDCB0: 0x000d3000
[   23.839813] NDCB1: 0xba000000
[   23.839813] NDCB2: 0x00000000
[   23.839813] NDCB3: 0x00000000
[   23.858935] nand: nand_do_read_oob: from = 0x05d20000, len = 64
[   23.864979] marvell-nfc pxa3xx-nand: 
[   23.864979] NDCR:  0x9d079fff
[   23.864979] NDCB0: 0x000d3000
[   23.864979] NDCB1: 0xba400000
[   23.864979] NDCB2: 0x00000000
[   23.864979] NDCB3: 0x00000000
[   23.883928] nand: nand_do_read_oob: from = 0x05d40000, len = 64
[   23.890127] marvell-nfc pxa3xx-nand: 
[   23.890127] NDCR:  0x9d079fff
[   23.890127] NDCB0: 0x000d3000
[   23.890127] NDCB1: 0xba800000
[   23.890127] NDCB2: 0x00000000
[   23.890127] NDCB3: 0x00000000
[   23.909053] nand: nand_do_read_oob: from = 0x05d60000, len = 64
[   23.915087] marvell-nfc pxa3xx-nand: 
[   23.915087] NDCR:  0x9d079fff
[   23.915087] NDCB0: 0x000d3000
[   23.915087] NDCB1: 0xbac00000
[   23.915087] NDCB2: 0x00000000
[   23.915087] NDCB3: 0x00000000
[   23.934020] nand: nand_do_read_oob: from = 0x05d80000, len = 64
[   23.940224] marvell-nfc pxa3xx-nand: 
[   23.940224] NDCR:  0x9d079fff
[   23.940224] NDCB0: 0x000d3000
[   23.940224] NDCB1: 0xbb000000
[   23.940224] NDCB2: 0x00000000
[   23.940224] NDCB3: 0x00000000
[   23.959150] nand: nand_do_read_oob: from = 0x05da0000, len = 64
[   23.965186] marvell-nfc pxa3xx-nand: 
[   23.965186] NDCR:  0x9d079fff
[   23.965186] NDCB0: 0x000d3000
[   23.965186] NDCB1: 0xbb400000
[   23.965186] NDCB2: 0x00000000
[   23.965186] NDCB3: 0x00000000
[   23.984117] nand: nand_do_read_oob: from = 0x05dc0000, len = 64
[   23.990323] marvell-nfc pxa3xx-nand: 
[   23.990323] NDCR:  0x9d079fff
[   23.990323] NDCB0: 0x000d3000
[   23.990323] NDCB1: 0xbb800000
[   23.990323] NDCB2: 0x00000000
[   23.990323] NDCB3: 0x00000000
[   24.009262] nand: nand_do_read_oob: from = 0x05de0000, len = 64
[   24.015293] marvell-nfc pxa3xx-nand: 
[   24.015293] NDCR:  0x9d079fff
[   24.015293] NDCB0: 0x000d3000
[   24.015293] NDCB1: 0xbbc00000
[   24.015293] NDCB2: 0x00000000
[   24.015293] NDCB3: 0x00000000
[   24.034223] nand: nand_do_read_oob: from = 0x05e00000, len = 64
[   24.040423] marvell-nfc pxa3xx-nand: 
[   24.040423] NDCR:  0x9d079fff
[   24.040423] NDCB0: 0x000d3000
[   24.040423] NDCB1: 0xbc000000
[   24.040423] NDCB2: 0x00000000
[   24.040423] NDCB3: 0x00000000
[   24.059348] nand: nand_do_read_oob: from = 0x05e20000, len = 64
[   24.065383] marvell-nfc pxa3xx-nand: 
[   24.065383] NDCR:  0x9d079fff
[   24.065383] NDCB0: 0x000d3000
[   24.065383] NDCB1: 0xbc400000
[   24.065383] NDCB2: 0x00000000
[   24.065383] NDCB3: 0x00000000
[   24.084334] nand: nand_do_read_oob: from = 0x05e40000, len = 64
[   24.090926] marvell-nfc pxa3xx-nand: 
[   24.090926] NDCR:  0x9d079fff
[   24.090926] NDCB0: 0x000d3000
[   24.090926] NDCB1: 0xbc800000
[   24.090926] NDCB2: 0x00000000
[   24.090926] NDCB3: 0x00000000
[   24.109932] nand: nand_do_read_oob: from = 0x05e60000, len = 64
[   24.115963] marvell-nfc pxa3xx-nand: 
[   24.115963] NDCR:  0x9d079fff
[   24.115963] NDCB0: 0x000d3000
[   24.115963] NDCB1: 0xbcc00000
[   24.115963] NDCB2: 0x00000000
[   24.115963] NDCB3: 0x00000000
[   24.134899] nand: nand_do_read_oob: from = 0x05e80000, len = 64
[   24.141102] marvell-nfc pxa3xx-nand: 
[   24.141102] NDCR:  0x9d079fff
[   24.141102] NDCB0: 0x000d3000
[   24.141102] NDCB1: 0xbd000000
[   24.141102] NDCB2: 0x00000000
[   24.141102] NDCB3: 0x00000000
[   24.160031] nand: nand_do_read_oob: from = 0x05ea0000, len = 64
[   24.166062] marvell-nfc pxa3xx-nand: 
[   24.166062] NDCR:  0x9d079fff
[   24.166062] NDCB0: 0x000d3000
[   24.166062] NDCB1: 0xbd400000
[   24.166062] NDCB2: 0x00000000
[   24.166062] NDCB3: 0x00000000
[   24.184995] nand: nand_do_read_oob: from = 0x05ec0000, len = 64
[   24.191201] marvell-nfc pxa3xx-nand: 
[   24.191201] NDCR:  0x9d079fff
[   24.191201] NDCB0: 0x000d3000
[   24.191201] NDCB1: 0xbd800000
[   24.191201] NDCB2: 0x00000000
[   24.191201] NDCB3: 0x00000000
[   24.210128] nand: nand_do_read_oob: from = 0x05ee0000, len = 64
[   24.216161] marvell-nfc pxa3xx-nand: 
[   24.216161] NDCR:  0x9d079fff
[   24.216161] NDCB0: 0x000d3000
[   24.216161] NDCB1: 0xbdc00000
[   24.216161] NDCB2: 0x00000000
[   24.216161] NDCB3: 0x00000000
[   24.235092] nand: nand_do_read_oob: from = 0x05f00000, len = 64
[   24.241301] marvell-nfc pxa3xx-nand: 
[   24.241301] NDCR:  0x9d079fff
[   24.241301] NDCB0: 0x000d3000
[   24.241301] NDCB1: 0xbe000000
[   24.241301] NDCB2: 0x00000000
[   24.241301] NDCB3: 0x00000000
[   24.260227] nand: nand_do_read_oob: from = 0x05f20000, len = 64
[   24.266259] marvell-nfc pxa3xx-nand: 
[   24.266259] NDCR:  0x9d079fff
[   24.266259] NDCB0: 0x000d3000
[   24.266259] NDCB1: 0xbe400000
[   24.266259] NDCB2: 0x00000000
[   24.266259] NDCB3: 0x00000000
[   24.285192] nand: nand_do_read_oob: from = 0x05f40000, len = 64
[   24.291397] marvell-nfc pxa3xx-nand: 
[   24.291397] NDCR:  0x9d079fff
[   24.291397] NDCB0: 0x000d3000
[   24.291397] NDCB1: 0xbe800000
[   24.291397] NDCB2: 0x00000000
[   24.291397] NDCB3: 0x00000000
[   24.310331] nand: nand_do_read_oob: from = 0x05f60000, len = 64
[   24.316365] marvell-nfc pxa3xx-nand: 
[   24.316365] NDCR:  0x9d079fff
[   24.316365] NDCB0: 0x000d3000
[   24.316365] NDCB1: 0xbec00000
[   24.316365] NDCB2: 0x00000000
[   24.316365] NDCB3: 0x00000000
[   24.335304] nand: nand_do_read_oob: from = 0x05f80000, len = 64
[   24.341505] marvell-nfc pxa3xx-nand: 
[   24.341505] NDCR:  0x9d079fff
[   24.341505] NDCB0: 0x000d3000
[   24.341505] NDCB1: 0xbf000000
[   24.341505] NDCB2: 0x00000000
[   24.341505] NDCB3: 0x00000000
[   24.360432] nand: nand_do_read_oob: from = 0x05fa0000, len = 64
[   24.366466] marvell-nfc pxa3xx-nand: 
[   24.366466] NDCR:  0x9d079fff
[   24.366466] NDCB0: 0x000d3000
[   24.366466] NDCB1: 0xbf400000
[   24.366466] NDCB2: 0x00000000
[   24.366466] NDCB3: 0x00000000
[   24.385399] nand: nand_do_read_oob: from = 0x05fc0000, len = 64
[   24.391604] marvell-nfc pxa3xx-nand: 
[   24.391604] NDCR:  0x9d079fff
[   24.391604] NDCB0: 0x000d3000
[   24.391604] NDCB1: 0xbf800000
[   24.391604] NDCB2: 0x00000000
[   24.391604] NDCB3: 0x00000000
[   24.410533] nand: nand_do_read_oob: from = 0x05fe0000, len = 64
[   24.416563] marvell-nfc pxa3xx-nand: 
[   24.416563] NDCR:  0x9d079fff
[   24.416563] NDCB0: 0x000d3000
[   24.416563] NDCB1: 0xbfc00000
[   24.416563] NDCB2: 0x00000000
[   24.416563] NDCB3: 0x00000000
[   24.435496] nand: nand_do_read_oob: from = 0x06000000, len = 64
[   24.441701] marvell-nfc pxa3xx-nand: 
[   24.441701] NDCR:  0x9d079fff
[   24.441701] NDCB0: 0x000d3000
[   24.441701] NDCB1: 0xc0000000
[   24.441701] NDCB2: 0x00000000
[   24.441701] NDCB3: 0x00000000
[   24.460628] nand: nand_do_read_oob: from = 0x06020000, len = 64
[   24.466661] marvell-nfc pxa3xx-nand: 
[   24.466661] NDCR:  0x9d079fff
[   24.466661] NDCB0: 0x000d3000
[   24.466661] NDCB1: 0xc0400000
[   24.466661] NDCB2: 0x00000000
[   24.466661] NDCB3: 0x00000000
[   24.485592] nand: nand_do_read_oob: from = 0x06040000, len = 64
[   24.491792] marvell-nfc pxa3xx-nand: 
[   24.491792] NDCR:  0x9d079fff
[   24.491792] NDCB0: 0x000d3000
[   24.491792] NDCB1: 0xc0800000
[   24.491792] NDCB2: 0x00000000
[   24.491792] NDCB3: 0x00000000
[   24.510721] nand: nand_do_read_oob: from = 0x06060000, len = 64
[   24.516751] marvell-nfc pxa3xx-nand: 
[   24.516751] NDCR:  0x9d079fff
[   24.516751] NDCB0: 0x000d3000
[   24.516751] NDCB1: 0xc0c00000
[   24.516751] NDCB2: 0x00000000
[   24.516751] NDCB3: 0x00000000
[   24.535687] nand: nand_do_read_oob: from = 0x06080000, len = 64
[   24.541891] marvell-nfc pxa3xx-nand: 
[   24.541891] NDCR:  0x9d079fff
[   24.541891] NDCB0: 0x000d3000
[   24.541891] NDCB1: 0xc1000000
[   24.541891] NDCB2: 0x00000000
[   24.541891] NDCB3: 0x00000000
[   24.560820] nand: nand_do_read_oob: from = 0x060a0000, len = 64
[   24.566849] marvell-nfc pxa3xx-nand: 
[   24.566849] NDCR:  0x9d079fff
[   24.566849] NDCB0: 0x000d3000
[   24.566849] NDCB1: 0xc1400000
[   24.566849] NDCB2: 0x00000000
[   24.566849] NDCB3: 0x00000000
[   24.585782] nand: nand_do_read_oob: from = 0x060c0000, len = 64
[   24.591989] marvell-nfc pxa3xx-nand: 
[   24.591989] NDCR:  0x9d079fff
[   24.591989] NDCB0: 0x000d3000
[   24.591989] NDCB1: 0xc1800000
[   24.591989] NDCB2: 0x00000000
[   24.591989] NDCB3: 0x00000000
[   24.610918] nand: nand_do_read_oob: from = 0x060e0000, len = 64
[   24.616951] marvell-nfc pxa3xx-nand: 
[   24.616951] NDCR:  0x9d079fff
[   24.616951] NDCB0: 0x000d3000
[   24.616951] NDCB1: 0xc1c00000
[   24.616951] NDCB2: 0x00000000
[   24.616951] NDCB3: 0x00000000
[   24.635888] nand: nand_do_read_oob: from = 0x06100000, len = 64
[   24.642096] marvell-nfc pxa3xx-nand: 
[   24.642096] NDCR:  0x9d079fff
[   24.642096] NDCB0: 0x000d3000
[   24.642096] NDCB1: 0xc2000000
[   24.642096] NDCB2: 0x00000000
[   24.642096] NDCB3: 0x00000000
[   24.661026] nand: nand_do_read_oob: from = 0x06120000, len = 64
[   24.667054] marvell-nfc pxa3xx-nand: 
[   24.667054] NDCR:  0x9d079fff
[   24.667054] NDCB0: 0x000d3000
[   24.667054] NDCB1: 0xc2400000
[   24.667054] NDCB2: 0x00000000
[   24.667054] NDCB3: 0x00000000
[   24.685988] nand: nand_do_read_oob: from = 0x06140000, len = 64
[   24.692192] marvell-nfc pxa3xx-nand: 
[   24.692192] NDCR:  0x9d079fff
[   24.692192] NDCB0: 0x000d3000
[   24.692192] NDCB1: 0xc2800000
[   24.692192] NDCB2: 0x00000000
[   24.692192] NDCB3: 0x00000000
[   24.711122] nand: nand_do_read_oob: from = 0x06160000, len = 64
[   24.717153] marvell-nfc pxa3xx-nand: 
[   24.717153] NDCR:  0x9d079fff
[   24.717153] NDCB0: 0x000d3000
[   24.717153] NDCB1: 0xc2c00000
[   24.717153] NDCB2: 0x00000000
[   24.717153] NDCB3: 0x00000000
[   24.736108] nand: nand_do_read_oob: from = 0x06180000, len = 64
[   24.742309] marvell-nfc pxa3xx-nand: 
[   24.742309] NDCR:  0x9d079fff
[   24.742309] NDCB0: 0x000d3000
[   24.742309] NDCB1: 0xc3000000
[   24.742309] NDCB2: 0x00000000
[   24.742309] NDCB3: 0x00000000
[   24.761239] nand: nand_do_read_oob: from = 0x061a0000, len = 64
[   24.767270] marvell-nfc pxa3xx-nand: 
[   24.767270] NDCR:  0x9d079fff
[   24.767270] NDCB0: 0x000d3000
[   24.767270] NDCB1: 0xc3400000
[   24.767270] NDCB2: 0x00000000
[   24.767270] NDCB3: 0x00000000
[   24.786202] nand: nand_do_read_oob: from = 0x061c0000, len = 64
[   24.792407] marvell-nfc pxa3xx-nand: 
[   24.792407] NDCR:  0x9d079fff
[   24.792407] NDCB0: 0x000d3000
[   24.792407] NDCB1: 0xc3800000
[   24.792407] NDCB2: 0x00000000
[   24.792407] NDCB3: 0x00000000
[   24.811339] nand: nand_do_read_oob: from = 0x061e0000, len = 64
[   24.817367] marvell-nfc pxa3xx-nand: 
[   24.817367] NDCR:  0x9d079fff
[   24.817367] NDCB0: 0x000d3000
[   24.817367] NDCB1: 0xc3c00000
[   24.817367] NDCB2: 0x00000000
[   24.817367] NDCB3: 0x00000000
[   24.836302] nand: nand_do_read_oob: from = 0x06200000, len = 64
[   24.842506] marvell-nfc pxa3xx-nand: 
[   24.842506] NDCR:  0x9d079fff
[   24.842506] NDCB0: 0x000d3000
[   24.842506] NDCB1: 0xc4000000
[   24.842506] NDCB2: 0x00000000
[   24.842506] NDCB3: 0x00000000
[   24.861437] nand: nand_do_read_oob: from = 0x06220000, len = 64
[   24.867467] marvell-nfc pxa3xx-nand: 
[   24.867467] NDCR:  0x9d079fff
[   24.867467] NDCB0: 0x000d3000
[   24.867467] NDCB1: 0xc4400000
[   24.867467] NDCB2: 0x00000000
[   24.867467] NDCB3: 0x00000000
[   24.886399] nand: nand_do_read_oob: from = 0x06240000, len = 64
[   24.892604] marvell-nfc pxa3xx-nand: 
[   24.892604] NDCR:  0x9d079fff
[   24.892604] NDCB0: 0x000d3000
[   24.892604] NDCB1: 0xc4800000
[   24.892604] NDCB2: 0x00000000
[   24.892604] NDCB3: 0x00000000
[   24.911533] nand: nand_do_read_oob: from = 0x06260000, len = 64
[   24.917564] marvell-nfc pxa3xx-nand: 
[   24.917564] NDCR:  0x9d079fff
[   24.917564] NDCB0: 0x000d3000
[   24.917564] NDCB1: 0xc4c00000
[   24.917564] NDCB2: 0x00000000
[   24.917564] NDCB3: 0x00000000
[   24.936498] nand: nand_do_read_oob: from = 0x06280000, len = 64
[   24.942701] marvell-nfc pxa3xx-nand: 
[   24.942701] NDCR:  0x9d079fff
[   24.942701] NDCB0: 0x000d3000
[   24.942701] NDCB1: 0xc5000000
[   24.942701] NDCB2: 0x00000000
[   24.942701] NDCB3: 0x00000000
[   24.961631] nand: nand_do_read_oob: from = 0x062a0000, len = 64
[   24.967664] marvell-nfc pxa3xx-nand: 
[   24.967664] NDCR:  0x9d079fff
[   24.967664] NDCB0: 0x000d3000
[   24.967664] NDCB1: 0xc5400000
[   24.967664] NDCB2: 0x00000000
[   24.967664] NDCB3: 0x00000000
[   24.986598] nand: nand_do_read_oob: from = 0x062c0000, len = 64
[   24.992800] marvell-nfc pxa3xx-nand: 
[   24.992800] NDCR:  0x9d079fff
[   24.992800] NDCB0: 0x000d3000
[   24.992800] NDCB1: 0xc5800000
[   24.992800] NDCB2: 0x00000000
[   24.992800] NDCB3: 0x00000000
[   25.011742] nand: nand_do_read_oob: from = 0x062e0000, len = 64
[   25.017771] marvell-nfc pxa3xx-nand: 
[   25.017771] NDCR:  0x9d079fff
[   25.017771] NDCB0: 0x000d3000
[   25.017771] NDCB1: 0xc5c00000
[   25.017771] NDCB2: 0x00000000
[   25.017771] NDCB3: 0x00000000
[   25.036704] nand: nand_do_read_oob: from = 0x06300000, len = 64
[   25.042909] marvell-nfc pxa3xx-nand: 
[   25.042909] NDCR:  0x9d079fff
[   25.042909] NDCB0: 0x000d3000
[   25.042909] NDCB1: 0xc6000000
[   25.042909] NDCB2: 0x00000000
[   25.042909] NDCB3: 0x00000000
[   25.061840] nand: nand_do_read_oob: from = 0x06320000, len = 64
[   25.067868] marvell-nfc pxa3xx-nand: 
[   25.067868] NDCR:  0x9d079fff
[   25.067868] NDCB0: 0x000d3000
[   25.067868] NDCB1: 0xc6400000
[   25.067868] NDCB2: 0x00000000
[   25.067868] NDCB3: 0x00000000
[   25.086807] nand: nand_do_read_oob: from = 0x06340000, len = 64
[   25.093007] marvell-nfc pxa3xx-nand: 
[   25.093007] NDCR:  0x9d079fff
[   25.093007] NDCB0: 0x000d3000
[   25.093007] NDCB1: 0xc6800000
[   25.093007] NDCB2: 0x00000000
[   25.093007] NDCB3: 0x00000000
[   25.111938] nand: nand_do_read_oob: from = 0x06360000, len = 64
[   25.117967] marvell-nfc pxa3xx-nand: 
[   25.117967] NDCR:  0x9d079fff
[   25.117967] NDCB0: 0x000d3000
[   25.117967] NDCB1: 0xc6c00000
[   25.117967] NDCB2: 0x00000000
[   25.117967] NDCB3: 0x00000000
[   25.136901] nand: nand_do_read_oob: from = 0x06380000, len = 64
[   25.143106] marvell-nfc pxa3xx-nand: 
[   25.143106] NDCR:  0x9d079fff
[   25.143106] NDCB0: 0x000d3000
[   25.143106] NDCB1: 0xc7000000
[   25.143106] NDCB2: 0x00000000
[   25.143106] NDCB3: 0x00000000
[   25.162036] nand: nand_do_read_oob: from = 0x063a0000, len = 64
[   25.168067] marvell-nfc pxa3xx-nand: 
[   25.168067] NDCR:  0x9d079fff
[   25.168067] NDCB0: 0x000d3000
[   25.168067] NDCB1: 0xc7400000
[   25.168067] NDCB2: 0x00000000
[   25.168067] NDCB3: 0x00000000
[   25.187002] nand: nand_do_read_oob: from = 0x063c0000, len = 64
[   25.193203] marvell-nfc pxa3xx-nand: 
[   25.193203] NDCR:  0x9d079fff
[   25.193203] NDCB0: 0x000d3000
[   25.193203] NDCB1: 0xc7800000
[   25.193203] NDCB2: 0x00000000
[   25.193203] NDCB3: 0x00000000
[   25.212134] nand: nand_do_read_oob: from = 0x063e0000, len = 64
[   25.218164] marvell-nfc pxa3xx-nand: 
[   25.218164] NDCR:  0x9d079fff
[   25.218164] NDCB0: 0x000d3000
[   25.218164] NDCB1: 0xc7c00000
[   25.218164] NDCB2: 0x00000000
[   25.218164] NDCB3: 0x00000000
[   25.237097] nand: nand_do_read_oob: from = 0x06400000, len = 64
[   25.243303] marvell-nfc pxa3xx-nand: 
[   25.243303] NDCR:  0x9d079fff
[   25.243303] NDCB0: 0x000d3000
[   25.243303] NDCB1: 0xc8000000
[   25.243303] NDCB2: 0x00000000
[   25.243303] NDCB3: 0x00000000
[   25.262230] nand: nand_do_read_oob: from = 0x06420000, len = 64
[   25.268262] marvell-nfc pxa3xx-nand: 
[   25.268262] NDCR:  0x9d079fff
[   25.268262] NDCB0: 0x000d3000
[   25.268262] NDCB1: 0xc8400000
[   25.268262] NDCB2: 0x00000000
[   25.268262] NDCB3: 0x00000000
[   25.287196] nand: nand_do_read_oob: from = 0x06440000, len = 64
[   25.293401] marvell-nfc pxa3xx-nand: 
[   25.293401] NDCR:  0x9d079fff
[   25.293401] NDCB0: 0x000d3000
[   25.293401] NDCB1: 0xc8800000
[   25.293401] NDCB2: 0x00000000
[   25.293401] NDCB3: 0x00000000
[   25.312330] nand: nand_do_read_oob: from = 0x06460000, len = 64
[   25.318361] marvell-nfc pxa3xx-nand: 
[   25.318361] NDCR:  0x9d079fff
[   25.318361] NDCB0: 0x000d3000
[   25.318361] NDCB1: 0xc8c00000
[   25.318361] NDCB2: 0x00000000
[   25.318361] NDCB3: 0x00000000
[   25.337293] nand: nand_do_read_oob: from = 0x06480000, len = 64
[   25.343499] marvell-nfc pxa3xx-nand: 
[   25.343499] NDCR:  0x9d079fff
[   25.343499] NDCB0: 0x000d3000
[   25.343499] NDCB1: 0xc9000000
[   25.343499] NDCB2: 0x00000000
[   25.343499] NDCB3: 0x00000000
[   25.362446] nand: nand_do_read_oob: from = 0x064a0000, len = 64
[   25.368478] marvell-nfc pxa3xx-nand: 
[   25.368478] NDCR:  0x9d079fff
[   25.368478] NDCB0: 0x000d3000
[   25.368478] NDCB1: 0xc9400000
[   25.368478] NDCB2: 0x00000000
[   25.368478] NDCB3: 0x00000000
[   25.387413] nand: nand_do_read_oob: from = 0x064c0000, len = 64
[   25.393617] marvell-nfc pxa3xx-nand: 
[   25.393617] NDCR:  0x9d079fff
[   25.393617] NDCB0: 0x000d3000
[   25.393617] NDCB1: 0xc9800000
[   25.393617] NDCB2: 0x00000000
[   25.393617] NDCB3: 0x00000000
[   25.412545] nand: nand_do_read_oob: from = 0x064e0000, len = 64
[   25.418575] marvell-nfc pxa3xx-nand: 
[   25.418575] NDCR:  0x9d079fff
[   25.418575] NDCB0: 0x000d3000
[   25.418575] NDCB1: 0xc9c00000
[   25.418575] NDCB2: 0x00000000
[   25.418575] NDCB3: 0x00000000
[   25.437618] nand: nand_do_read_oob: from = 0x06500000, len = 64
[   25.443823] marvell-nfc pxa3xx-nand: 
[   25.443823] NDCR:  0x9d079fff
[   25.443823] NDCB0: 0x000d3000
[   25.443823] NDCB1: 0xca000000
[   25.443823] NDCB2: 0x00000000
[   25.443823] NDCB3: 0x00000000
[   25.462756] nand: nand_do_read_oob: from = 0x06520000, len = 64
[   25.468956] marvell-nfc pxa3xx-nand: 
[   25.468956] NDCR:  0x9d079fff
[   25.468956] NDCB0: 0x000d3000
[   25.468956] NDCB1: 0xca400000
[   25.468956] NDCB2: 0x00000000
[   25.468956] NDCB3: 0x00000000
[   25.487878] nand: nand_do_read_oob: from = 0x06540000, len = 64
[   25.494080] marvell-nfc pxa3xx-nand: 
[   25.494080] NDCR:  0x9d079fff
[   25.494080] NDCB0: 0x000d3000
[   25.494080] NDCB1: 0xca800000
[   25.494080] NDCB2: 0x00000000
[   25.494080] NDCB3: 0x00000000
[   25.513008] nand: nand_do_read_oob: from = 0x06560000, len = 64
[   25.519209] marvell-nfc pxa3xx-nand: 
[   25.519209] NDCR:  0x9d079fff
[   25.519209] NDCB0: 0x000d3000
[   25.519209] NDCB1: 0xcac00000
[   25.519209] NDCB2: 0x00000000
[   25.519209] NDCB3: 0x00000000
[   25.538130] nand: nand_do_read_oob: from = 0x06580000, len = 64
[   25.544332] marvell-nfc pxa3xx-nand: 
[   25.544332] NDCR:  0x9d079fff
[   25.544332] NDCB0: 0x000d3000
[   25.544332] NDCB1: 0xcb000000
[   25.544332] NDCB2: 0x00000000
[   25.544332] NDCB3: 0x00000000
[   25.563262] nand: nand_do_read_oob: from = 0x065a0000, len = 64
[   25.569461] marvell-nfc pxa3xx-nand: 
[   25.569461] NDCR:  0x9d079fff
[   25.569461] NDCB0: 0x000d3000
[   25.569461] NDCB1: 0xcb400000
[   25.569461] NDCB2: 0x00000000
[   25.569461] NDCB3: 0x00000000
[   25.588383] nand: nand_do_read_oob: from = 0x065c0000, len = 64
[   25.594587] marvell-nfc pxa3xx-nand: 
[   25.594587] NDCR:  0x9d079fff
[   25.594587] NDCB0: 0x000d3000
[   25.594587] NDCB1: 0xcb800000
[   25.594587] NDCB2: 0x00000000
[   25.594587] NDCB3: 0x00000000
[   25.613516] nand: nand_do_read_oob: from = 0x065e0000, len = 64
[   25.619718] marvell-nfc pxa3xx-nand: 
[   25.619718] NDCR:  0x9d079fff
[   25.619718] NDCB0: 0x000d3000
[   25.619718] NDCB1: 0xcbc00000
[   25.619718] NDCB2: 0x00000000
[   25.619718] NDCB3: 0x00000000
[   25.638638] nand: nand_do_read_oob: from = 0x06600000, len = 64
[   25.644824] marvell-nfc pxa3xx-nand: 
[   25.644824] NDCR:  0x9d079fff
[   25.644824] NDCB0: 0x000d3000
[   25.644824] NDCB1: 0xcc000000
[   25.644824] NDCB2: 0x00000000
[   25.644824] NDCB3: 0x00000000
[   25.663739] nand: nand_do_read_oob: from = 0x06620000, len = 64
[   25.669943] marvell-nfc pxa3xx-nand: 
[   25.669943] NDCR:  0x9d079fff
[   25.669943] NDCB0: 0x000d3000
[   25.669943] NDCB1: 0xcc400000
[   25.669943] NDCB2: 0x00000000
[   25.669943] NDCB3: 0x00000000
[   25.688899] nand: nand_do_read_oob: from = 0x06640000, len = 64
[   25.694935] marvell-nfc pxa3xx-nand: 
[   25.694935] NDCR:  0x9d079fff
[   25.694935] NDCB0: 0x000d3000
[   25.694935] NDCB1: 0xcc800000
[   25.694935] NDCB2: 0x00000000
[   25.694935] NDCB3: 0x00000000
[   25.713873] nand: nand_do_read_oob: from = 0x06660000, len = 64
[   25.720078] marvell-nfc pxa3xx-nand: 
[   25.720078] NDCR:  0x9d079fff
[   25.720078] NDCB0: 0x000d3000
[   25.720078] NDCB1: 0xccc00000
[   25.720078] NDCB2: 0x00000000
[   25.720078] NDCB3: 0x00000000
[   25.739046] nand: nand_do_read_oob: from = 0x06680000, len = 64
[   25.745080] marvell-nfc pxa3xx-nand: 
[   25.745080] NDCR:  0x9d079fff
[   25.745080] NDCB0: 0x000d3000
[   25.745080] NDCB1: 0xcd000000
[   25.745080] NDCB2: 0x00000000
[   25.745080] NDCB3: 0x00000000
[   25.764014] nand: nand_do_read_oob: from = 0x066a0000, len = 64
[   25.770220] marvell-nfc pxa3xx-nand: 
[   25.770220] NDCR:  0x9d079fff
[   25.770220] NDCB0: 0x000d3000
[   25.770220] NDCB1: 0xcd400000
[   25.770220] NDCB2: 0x00000000
[   25.770220] NDCB3: 0x00000000
[   25.789144] nand: nand_do_read_oob: from = 0x066c0000, len = 64
[   25.795180] marvell-nfc pxa3xx-nand: 
[   25.795180] NDCR:  0x9d079fff
[   25.795180] NDCB0: 0x000d3000
[   25.795180] NDCB1: 0xcd800000
[   25.795180] NDCB2: 0x00000000
[   25.795180] NDCB3: 0x00000000
[   25.814114] nand: nand_do_read_oob: from = 0x066e0000, len = 64
[   25.820318] marvell-nfc pxa3xx-nand: 
[   25.820318] NDCR:  0x9d079fff
[   25.820318] NDCB0: 0x000d3000
[   25.820318] NDCB1: 0xcdc00000
[   25.820318] NDCB2: 0x00000000
[   25.820318] NDCB3: 0x00000000
[   25.839247] nand: nand_do_read_oob: from = 0x06700000, len = 64
[   25.845278] marvell-nfc pxa3xx-nand: 
[   25.845278] NDCR:  0x9d079fff
[   25.845278] NDCB0: 0x000d3000
[   25.845278] NDCB1: 0xce000000
[   25.845278] NDCB2: 0x00000000
[   25.845278] NDCB3: 0x00000000
[   25.864211] nand: nand_do_read_oob: from = 0x06720000, len = 64
[   25.870419] marvell-nfc pxa3xx-nand: 
[   25.870419] NDCR:  0x9d079fff
[   25.870419] NDCB0: 0x000d3000
[   25.870419] NDCB1: 0xce400000
[   25.870419] NDCB2: 0x00000000
[   25.870419] NDCB3: 0x00000000
[   25.889351] nand: nand_do_read_oob: from = 0x06740000, len = 64
[   25.895386] marvell-nfc pxa3xx-nand: 
[   25.895386] NDCR:  0x9d079fff
[   25.895386] NDCB0: 0x000d3000
[   25.895386] NDCB1: 0xce800000
[   25.895386] NDCB2: 0x00000000
[   25.895386] NDCB3: 0x00000000
[   25.914320] nand: nand_do_read_oob: from = 0x06760000, len = 64
[   25.920524] marvell-nfc pxa3xx-nand: 
[   25.920524] NDCR:  0x9d079fff
[   25.920524] NDCB0: 0x000d3000
[   25.920524] NDCB1: 0xcec00000
[   25.920524] NDCB2: 0x00000000
[   25.920524] NDCB3: 0x00000000
[   25.939469] nand: nand_do_read_oob: from = 0x06780000, len = 64
[   25.945500] marvell-nfc pxa3xx-nand: 
[   25.945500] NDCR:  0x9d079fff
[   25.945500] NDCB0: 0x000d3000
[   25.945500] NDCB1: 0xcf000000
[   25.945500] NDCB2: 0x00000000
[   25.945500] NDCB3: 0x00000000
[   25.964434] nand: nand_do_read_oob: from = 0x067a0000, len = 64
[   25.970641] marvell-nfc pxa3xx-nand: 
[   25.970641] NDCR:  0x9d079fff
[   25.970641] NDCB0: 0x000d3000
[   25.970641] NDCB1: 0xcf400000
[   25.970641] NDCB2: 0x00000000
[   25.970641] NDCB3: 0x00000000
[   25.989570] nand: nand_do_read_oob: from = 0x067c0000, len = 64
[   25.995599] marvell-nfc pxa3xx-nand: 
[   25.995599] NDCR:  0x9d079fff
[   25.995599] NDCB0: 0x000d3000
[   25.995599] NDCB1: 0xcf800000
[   25.995599] NDCB2: 0x00000000
[   25.995599] NDCB3: 0x00000000
[   26.014541] nand: nand_do_read_oob: from = 0x067e0000, len = 64
[   26.020747] marvell-nfc pxa3xx-nand: 
[   26.020747] NDCR:  0x9d079fff
[   26.020747] NDCB0: 0x000d3000
[   26.020747] NDCB1: 0xcfc00000
[   26.020747] NDCB2: 0x00000000
[   26.020747] NDCB3: 0x00000000
[   26.039677] nand: nand_do_read_oob: from = 0x06800000, len = 64
[   26.045706] marvell-nfc pxa3xx-nand: 
[   26.045706] NDCR:  0x9d079fff
[   26.045706] NDCB0: 0x000d3000
[   26.045706] NDCB1: 0xd0000000
[   26.045706] NDCB2: 0x00000000
[   26.045706] NDCB3: 0x00000000
[   26.064637] nand: nand_do_read_oob: from = 0x06820000, len = 64
[   26.070836] marvell-nfc pxa3xx-nand: 
[   26.070836] NDCR:  0x9d079fff
[   26.070836] NDCB0: 0x000d3000
[   26.070836] NDCB1: 0xd0400000
[   26.070836] NDCB2: 0x00000000
[   26.070836] NDCB3: 0x00000000
[   26.090106] nand: nand_do_read_oob: from = 0x06840000, len = 64
[   26.096145] marvell-nfc pxa3xx-nand: 
[   26.096145] NDCR:  0x9d079fff
[   26.096145] NDCB0: 0x000d3000
[   26.096145] NDCB1: 0xd0800000
[   26.096145] NDCB2: 0x00000000
[   26.096145] NDCB3: 0x00000000
[   26.115109] nand: nand_do_read_oob: from = 0x06860000, len = 64
[   26.121313] marvell-nfc pxa3xx-nand: 
[   26.121313] NDCR:  0x9d079fff
[   26.121313] NDCB0: 0x000d3000
[   26.121313] NDCB1: 0xd0c00000
[   26.121313] NDCB2: 0x00000000
[   26.121313] NDCB3: 0x00000000
[   26.140243] nand: nand_do_read_oob: from = 0x06880000, len = 64
[   26.146272] marvell-nfc pxa3xx-nand: 
[   26.146272] NDCR:  0x9d079fff
[   26.146272] NDCB0: 0x000d3000
[   26.146272] NDCB1: 0xd1000000
[   26.146272] NDCB2: 0x00000000
[   26.146272] NDCB3: 0x00000000
[   26.165208] nand: nand_do_read_oob: from = 0x068a0000, len = 64
[   26.171411] marvell-nfc pxa3xx-nand: 
[   26.171411] NDCR:  0x9d079fff
[   26.171411] NDCB0: 0x000d3000
[   26.171411] NDCB1: 0xd1400000
[   26.171411] NDCB2: 0x00000000
[   26.171411] NDCB3: 0x00000000
[   26.190341] nand: nand_do_read_oob: from = 0x068c0000, len = 64
[   26.196372] marvell-nfc pxa3xx-nand: 
[   26.196372] NDCR:  0x9d079fff
[   26.196372] NDCB0: 0x000d3000
[   26.196372] NDCB1: 0xd1800000
[   26.196372] NDCB2: 0x00000000
[   26.196372] NDCB3: 0x00000000
[   26.215306] nand: nand_do_read_oob: from = 0x068e0000, len = 64
[   26.221511] marvell-nfc pxa3xx-nand: 
[   26.221511] NDCR:  0x9d079fff
[   26.221511] NDCB0: 0x000d3000
[   26.221511] NDCB1: 0xd1c00000
[   26.221511] NDCB2: 0x00000000
[   26.221511] NDCB3: 0x00000000
[   26.240439] nand: nand_do_read_oob: from = 0x06900000, len = 64
[   26.246471] marvell-nfc pxa3xx-nand: 
[   26.246471] NDCR:  0x9d079fff
[   26.246471] NDCB0: 0x000d3000
[   26.246471] NDCB1: 0xd2000000
[   26.246471] NDCB2: 0x00000000
[   26.246471] NDCB3: 0x00000000
[   26.265403] nand: nand_do_read_oob: from = 0x06920000, len = 64
[   26.271608] marvell-nfc pxa3xx-nand: 
[   26.271608] NDCR:  0x9d079fff
[   26.271608] NDCB0: 0x000d3000
[   26.271608] NDCB1: 0xd2400000
[   26.271608] NDCB2: 0x00000000
[   26.271608] NDCB3: 0x00000000
[   26.290538] nand: nand_do_read_oob: from = 0x06940000, len = 64
[   26.296569] marvell-nfc pxa3xx-nand: 
[   26.296569] NDCR:  0x9d079fff
[   26.296569] NDCB0: 0x000d3000
[   26.296569] NDCB1: 0xd2800000
[   26.296569] NDCB2: 0x00000000
[   26.296569] NDCB3: 0x00000000
[   26.315502] nand: nand_do_read_oob: from = 0x06960000, len = 64
[   26.321707] marvell-nfc pxa3xx-nand: 
[   26.321707] NDCR:  0x9d079fff
[   26.321707] NDCB0: 0x000d3000
[   26.321707] NDCB1: 0xd2c00000
[   26.321707] NDCB2: 0x00000000
[   26.321707] NDCB3: 0x00000000
[   26.340635] nand: nand_do_read_oob: from = 0x06980000, len = 64
[   26.346669] marvell-nfc pxa3xx-nand: 
[   26.346669] NDCR:  0x9d079fff
[   26.346669] NDCB0: 0x000d3000
[   26.346669] NDCB1: 0xd3000000
[   26.346669] NDCB2: 0x00000000
[   26.346669] NDCB3: 0x00000000
[   26.365601] nand: nand_do_read_oob: from = 0x069a0000, len = 64
[   26.371806] marvell-nfc pxa3xx-nand: 
[   26.371806] NDCR:  0x9d079fff
[   26.371806] NDCB0: 0x000d3000
[   26.371806] NDCB1: 0xd3400000
[   26.371806] NDCB2: 0x00000000
[   26.371806] NDCB3: 0x00000000
[   26.390734] nand: nand_do_read_oob: from = 0x069c0000, len = 64
[   26.396767] marvell-nfc pxa3xx-nand: 
[   26.396767] NDCR:  0x9d079fff
[   26.396767] NDCB0: 0x000d3000
[   26.396767] NDCB1: 0xd3800000
[   26.396767] NDCB2: 0x00000000
[   26.396767] NDCB3: 0x00000000
[   26.415698] nand: nand_do_read_oob: from = 0x069e0000, len = 64
[   26.421904] marvell-nfc pxa3xx-nand: 
[   26.421904] NDCR:  0x9d079fff
[   26.421904] NDCB0: 0x000d3000
[   26.421904] NDCB1: 0xd3c00000
[   26.421904] NDCB2: 0x00000000
[   26.421904] NDCB3: 0x00000000
[   26.440832] nand: nand_do_read_oob: from = 0x06a00000, len = 64
[   26.446863] marvell-nfc pxa3xx-nand: 
[   26.446863] NDCR:  0x9d079fff
[   26.446863] NDCB0: 0x000d3000
[   26.446863] NDCB1: 0xd4000000
[   26.446863] NDCB2: 0x00000000
[   26.446863] NDCB3: 0x00000000
[   26.465798] nand: nand_do_read_oob: from = 0x06a20000, len = 64
[   26.472002] marvell-nfc pxa3xx-nand: 
[   26.472002] NDCR:  0x9d079fff
[   26.472002] NDCB0: 0x000d3000
[   26.472002] NDCB1: 0xd4400000
[   26.472002] NDCB2: 0x00000000
[   26.472002] NDCB3: 0x00000000
[   26.490930] nand: nand_do_read_oob: from = 0x06a40000, len = 64
[   26.496963] marvell-nfc pxa3xx-nand: 
[   26.496963] NDCR:  0x9d079fff
[   26.496963] NDCB0: 0x000d3000
[   26.496963] NDCB1: 0xd4800000
[   26.496963] NDCB2: 0x00000000
[   26.496963] NDCB3: 0x00000000
[   26.515894] nand: nand_do_read_oob: from = 0x06a60000, len = 64
[   26.522092] marvell-nfc pxa3xx-nand: 
[   26.522092] NDCR:  0x9d079fff
[   26.522092] NDCB0: 0x000d3000
[   26.522092] NDCB1: 0xd4c00000
[   26.522092] NDCB2: 0x00000000
[   26.522092] NDCB3: 0x00000000
[   26.541022] nand: nand_do_read_oob: from = 0x06a80000, len = 64
[   26.547052] marvell-nfc pxa3xx-nand: 
[   26.547052] NDCR:  0x9d079fff
[   26.547052] NDCB0: 0x000d3000
[   26.547052] NDCB1: 0xd5000000
[   26.547052] NDCB2: 0x00000000
[   26.547052] NDCB3: 0x00000000
[   26.565986] nand: nand_do_read_oob: from = 0x06aa0000, len = 64
[   26.572194] marvell-nfc pxa3xx-nand: 
[   26.572194] NDCR:  0x9d079fff
[   26.572194] NDCB0: 0x000d3000
[   26.572194] NDCB1: 0xd5400000
[   26.572194] NDCB2: 0x00000000
[   26.572194] NDCB3: 0x00000000
[   26.591141] nand: nand_do_read_oob: from = 0x06ac0000, len = 64
[   26.597178] marvell-nfc pxa3xx-nand: 
[   26.597178] NDCR:  0x9d079fff
[   26.597178] NDCB0: 0x000d3000
[   26.597178] NDCB1: 0xd5800000
[   26.597178] NDCB2: 0x00000000
[   26.597178] NDCB3: 0x00000000
[   26.616109] nand: nand_do_read_oob: from = 0x06ae0000, len = 64
[   26.622316] marvell-nfc pxa3xx-nand: 
[   26.622316] NDCR:  0x9d079fff
[   26.622316] NDCB0: 0x000d3000
[   26.622316] NDCB1: 0xd5c00000
[   26.622316] NDCB2: 0x00000000
[   26.622316] NDCB3: 0x00000000
[   26.641244] nand: nand_do_read_oob: from = 0x06b00000, len = 64
[   26.647276] marvell-nfc pxa3xx-nand: 
[   26.647276] NDCR:  0x9d079fff
[   26.647276] NDCB0: 0x000d3000
[   26.647276] NDCB1: 0xd6000000
[   26.647276] NDCB2: 0x00000000
[   26.647276] NDCB3: 0x00000000
[   26.666208] nand: nand_do_read_oob: from = 0x06b20000, len = 64
[   26.672412] marvell-nfc pxa3xx-nand: 
[   26.672412] NDCR:  0x9d079fff
[   26.672412] NDCB0: 0x000d3000
[   26.672412] NDCB1: 0xd6400000
[   26.672412] NDCB2: 0x00000000
[   26.672412] NDCB3: 0x00000000
[   26.691343] nand: nand_do_read_oob: from = 0x06b40000, len = 64
[   26.697375] marvell-nfc pxa3xx-nand: 
[   26.697375] NDCR:  0x9d079fff
[   26.697375] NDCB0: 0x000d3000
[   26.697375] NDCB1: 0xd6800000
[   26.697375] NDCB2: 0x00000000
[   26.697375] NDCB3: 0x00000000
[   26.716310] nand: nand_do_read_oob: from = 0x06b60000, len = 64
[   26.722513] marvell-nfc pxa3xx-nand: 
[   26.722513] NDCR:  0x9d079fff
[   26.722513] NDCB0: 0x000d3000
[   26.722513] NDCB1: 0xd6c00000
[   26.722513] NDCB2: 0x00000000
[   26.722513] NDCB3: 0x00000000
[   26.741440] nand: nand_do_read_oob: from = 0x06b80000, len = 64
[   26.747474] marvell-nfc pxa3xx-nand: 
[   26.747474] NDCR:  0x9d079fff
[   26.747474] NDCB0: 0x000d3000
[   26.747474] NDCB1: 0xd7000000
[   26.747474] NDCB2: 0x00000000
[   26.747474] NDCB3: 0x00000000
[   26.766408] nand: nand_do_read_oob: from = 0x06ba0000, len = 64
[   26.772613] marvell-nfc pxa3xx-nand: 
[   26.772613] NDCR:  0x9d079fff
[   26.772613] NDCB0: 0x000d3000
[   26.772613] NDCB1: 0xd7400000
[   26.772613] NDCB2: 0x00000000
[   26.772613] NDCB3: 0x00000000
[   26.791540] nand: nand_do_read_oob: from = 0x06bc0000, len = 64
[   26.797571] marvell-nfc pxa3xx-nand: 
[   26.797571] NDCR:  0x9d079fff
[   26.797571] NDCB0: 0x000d3000
[   26.797571] NDCB1: 0xd7800000
[   26.797571] NDCB2: 0x00000000
[   26.797571] NDCB3: 0x00000000
[   26.816504] nand: nand_do_read_oob: from = 0x06be0000, len = 64
[   26.822709] marvell-nfc pxa3xx-nand: 
[   26.822709] NDCR:  0x9d079fff
[   26.822709] NDCB0: 0x000d3000
[   26.822709] NDCB1: 0xd7c00000
[   26.822709] NDCB2: 0x00000000
[   26.822709] NDCB3: 0x00000000
[   26.841637] nand: nand_do_read_oob: from = 0x06c00000, len = 64
[   26.847670] marvell-nfc pxa3xx-nand: 
[   26.847670] NDCR:  0x9d079fff
[   26.847670] NDCB0: 0x000d3000
[   26.847670] NDCB1: 0xd8000000
[   26.847670] NDCB2: 0x00000000
[   26.847670] NDCB3: 0x00000000
[   26.866601] nand: nand_do_read_oob: from = 0x06c20000, len = 64
[   26.872810] marvell-nfc pxa3xx-nand: 
[   26.872810] NDCR:  0x9d079fff
[   26.872810] NDCB0: 0x000d3000
[   26.872810] NDCB1: 0xd8400000
[   26.872810] NDCB2: 0x00000000
[   26.872810] NDCB3: 0x00000000
[   26.891738] nand: nand_do_read_oob: from = 0x06c40000, len = 64
[   26.897767] marvell-nfc pxa3xx-nand: 
[   26.897767] NDCR:  0x9d079fff
[   26.897767] NDCB0: 0x000d3000
[   26.897767] NDCB1: 0xd8800000
[   26.897767] NDCB2: 0x00000000
[   26.897767] NDCB3: 0x00000000
[   26.916703] nand: nand_do_read_oob: from = 0x06c60000, len = 64
[   26.922905] marvell-nfc pxa3xx-nand: 
[   26.922905] NDCR:  0x9d079fff
[   26.922905] NDCB0: 0x000d3000
[   26.922905] NDCB1: 0xd8c00000
[   26.922905] NDCB2: 0x00000000
[   26.922905] NDCB3: 0x00000000
[   26.941834] nand: nand_do_read_oob: from = 0x06c80000, len = 64
[   26.947867] marvell-nfc pxa3xx-nand: 
[   26.947867] NDCR:  0x9d079fff
[   26.947867] NDCB0: 0x000d3000
[   26.947867] NDCB1: 0xd9000000
[   26.947867] NDCB2: 0x00000000
[   26.947867] NDCB3: 0x00000000
[   26.966798] nand: nand_do_read_oob: from = 0x06ca0000, len = 64
[   26.973006] marvell-nfc pxa3xx-nand: 
[   26.973006] NDCR:  0x9d079fff
[   26.973006] NDCB0: 0x000d3000
[   26.973006] NDCB1: 0xd9400000
[   26.973006] NDCB2: 0x00000000
[   26.973006] NDCB3: 0x00000000
[   26.991934] nand: nand_do_read_oob: from = 0x06cc0000, len = 64
[   26.997965] marvell-nfc pxa3xx-nand: 
[   26.997965] NDCR:  0x9d079fff
[   26.997965] NDCB0: 0x000d3000
[   26.997965] NDCB1: 0xd9800000
[   26.997965] NDCB2: 0x00000000
[   26.997965] NDCB3: 0x00000000
[   27.016907] nand: nand_do_read_oob: from = 0x06ce0000, len = 64
[   27.023114] marvell-nfc pxa3xx-nand: 
[   27.023114] NDCR:  0x9d079fff
[   27.023114] NDCB0: 0x000d3000
[   27.023114] NDCB1: 0xd9c00000
[   27.023114] NDCB2: 0x00000000
[   27.023114] NDCB3: 0x00000000
[   27.042039] nand: nand_do_read_oob: from = 0x06d00000, len = 64
[   27.048071] marvell-nfc pxa3xx-nand: 
[   27.048071] NDCR:  0x9d079fff
[   27.048071] NDCB0: 0x000d3000
[   27.048071] NDCB1: 0xda000000
[   27.048071] NDCB2: 0x00000000
[   27.048071] NDCB3: 0x00000000
[   27.067005] nand: nand_do_read_oob: from = 0x06d20000, len = 64
[   27.073211] marvell-nfc pxa3xx-nand: 
[   27.073211] NDCR:  0x9d079fff
[   27.073211] NDCB0: 0x000d3000
[   27.073211] NDCB1: 0xda400000
[   27.073211] NDCB2: 0x00000000
[   27.073211] NDCB3: 0x00000000
[   27.092136] nand: nand_do_read_oob: from = 0x06d40000, len = 64
[   27.098171] marvell-nfc pxa3xx-nand: 
[   27.098171] NDCR:  0x9d079fff
[   27.098171] NDCB0: 0x000d3000
[   27.098171] NDCB1: 0xda800000
[   27.098171] NDCB2: 0x00000000
[   27.098171] NDCB3: 0x00000000
[   27.117101] nand: nand_do_read_oob: from = 0x06d60000, len = 64
[   27.123300] marvell-nfc pxa3xx-nand: 
[   27.123300] NDCR:  0x9d079fff
[   27.123300] NDCB0: 0x000d3000
[   27.123300] NDCB1: 0xdac00000
[   27.123300] NDCB2: 0x00000000
[   27.123300] NDCB3: 0x00000000
[   27.142227] nand: nand_do_read_oob: from = 0x06d80000, len = 64
[   27.148260] marvell-nfc pxa3xx-nand: 
[   27.148260] NDCR:  0x9d079fff
[   27.148260] NDCB0: 0x000d3000
[   27.148260] NDCB1: 0xdb000000
[   27.148260] NDCB2: 0x00000000
[   27.148260] NDCB3: 0x00000000
[   27.167192] nand: nand_do_read_oob: from = 0x06da0000, len = 64
[   27.173398] marvell-nfc pxa3xx-nand: 
[   27.173398] NDCR:  0x9d079fff
[   27.173398] NDCB0: 0x000d3000
[   27.173398] NDCB1: 0xdb400000
[   27.173398] NDCB2: 0x00000000
[   27.173398] NDCB3: 0x00000000
[   27.192326] nand: nand_do_read_oob: from = 0x06dc0000, len = 64
[   27.198359] marvell-nfc pxa3xx-nand: 
[   27.198359] NDCR:  0x9d079fff
[   27.198359] NDCB0: 0x000d3000
[   27.198359] NDCB1: 0xdb800000
[   27.198359] NDCB2: 0x00000000
[   27.198359] NDCB3: 0x00000000
[   27.217290] nand: nand_do_read_oob: from = 0x06de0000, len = 64
[   27.223517] marvell-nfc pxa3xx-nand: 
[   27.223517] NDCR:  0x9d079fff
[   27.223517] NDCB0: 0x000d3000
[   27.223517] NDCB1: 0xdbc00000
[   27.223517] NDCB2: 0x00000000
[   27.223517] NDCB3: 0x00000000
[   27.242446] nand: nand_do_read_oob: from = 0x06e00000, len = 64
[   27.248475] marvell-nfc pxa3xx-nand: 
[   27.248475] NDCR:  0x9d079fff
[   27.248475] NDCB0: 0x000d3000
[   27.248475] NDCB1: 0xdc000000
[   27.248475] NDCB2: 0x00000000
[   27.248475] NDCB3: 0x00000000
[   27.267405] nand: nand_do_read_oob: from = 0x06e20000, len = 64
[   27.273605] marvell-nfc pxa3xx-nand: 
[   27.273605] NDCR:  0x9d079fff
[   27.273605] NDCB0: 0x000d3000
[   27.273605] NDCB1: 0xdc400000
[   27.273605] NDCB2: 0x00000000
[   27.273605] NDCB3: 0x00000000
[   27.292532] nand: nand_do_read_oob: from = 0x06e40000, len = 64
[   27.298563] marvell-nfc pxa3xx-nand: 
[   27.298563] NDCR:  0x9d079fff
[   27.298563] NDCB0: 0x000d3000
[   27.298563] NDCB1: 0xdc800000
[   27.298563] NDCB2: 0x00000000
[   27.298563] NDCB3: 0x00000000
[   27.317497] nand: nand_do_read_oob: from = 0x06e60000, len = 64
[   27.323702] marvell-nfc pxa3xx-nand: 
[   27.323702] NDCR:  0x9d079fff
[   27.323702] NDCB0: 0x000d3000
[   27.323702] NDCB1: 0xdcc00000
[   27.323702] NDCB2: 0x00000000
[   27.323702] NDCB3: 0x00000000
[   27.342630] nand: nand_do_read_oob: from = 0x06e80000, len = 64
[   27.348836] marvell-nfc pxa3xx-nand: 
[   27.348836] NDCR:  0x9d079fff
[   27.348836] NDCB0: 0x000d3000
[   27.348836] NDCB1: 0xdd000000
[   27.348836] NDCB2: 0x00000000
[   27.348836] NDCB3: 0x00000000
[   27.367746] nand: nand_do_read_oob: from = 0x06ea0000, len = 64
[   27.373948] marvell-nfc pxa3xx-nand: 
[   27.373948] NDCR:  0x9d079fff
[   27.373948] NDCB0: 0x000d3000
[   27.373948] NDCB1: 0xdd400000
[   27.373948] NDCB2: 0x00000000
[   27.373948] NDCB3: 0x00000000
[   27.392877] nand: nand_do_read_oob: from = 0x06ec0000, len = 64
[   27.399076] marvell-nfc pxa3xx-nand: 
[   27.399076] NDCR:  0x9d079fff
[   27.399076] NDCB0: 0x000d3000
[   27.399076] NDCB1: 0xdd800000
[   27.399076] NDCB2: 0x00000000
[   27.399076] NDCB3: 0x00000000
[   27.417998] nand: nand_do_read_oob: from = 0x06ee0000, len = 64
[   27.424199] marvell-nfc pxa3xx-nand: 
[   27.424199] NDCR:  0x9d079fff
[   27.424199] NDCB0: 0x000d3000
[   27.424199] NDCB1: 0xddc00000
[   27.424199] NDCB2: 0x00000000
[   27.424199] NDCB3: 0x00000000
[   27.443130] nand: nand_do_read_oob: from = 0x06f00000, len = 64
[   27.449332] marvell-nfc pxa3xx-nand: 
[   27.449332] NDCR:  0x9d079fff
[   27.449332] NDCB0: 0x000d3000
[   27.449332] NDCB1: 0xde000000
[   27.449332] NDCB2: 0x00000000
[   27.449332] NDCB3: 0x00000000
[   27.468253] nand: nand_do_read_oob: from = 0x06f20000, len = 64
[   27.474454] marvell-nfc pxa3xx-nand: 
[   27.474454] NDCR:  0x9d079fff
[   27.474454] NDCB0: 0x000d3000
[   27.474454] NDCB1: 0xde400000
[   27.474454] NDCB2: 0x00000000
[   27.474454] NDCB3: 0x00000000
[   27.493384] nand: nand_do_read_oob: from = 0x06f40000, len = 64
[   27.499585] marvell-nfc pxa3xx-nand: 
[   27.499585] NDCR:  0x9d079fff
[   27.499585] NDCB0: 0x000d3000
[   27.499585] NDCB1: 0xde800000
[   27.499585] NDCB2: 0x00000000
[   27.499585] NDCB3: 0x00000000
[   27.518504] nand: nand_do_read_oob: from = 0x06f60000, len = 64
[   27.524707] marvell-nfc pxa3xx-nand: 
[   27.524707] NDCR:  0x9d079fff
[   27.524707] NDCB0: 0x000d3000
[   27.524707] NDCB1: 0xdec00000
[   27.524707] NDCB2: 0x00000000
[   27.524707] NDCB3: 0x00000000
[   27.543638] nand: nand_do_read_oob: from = 0x06f80000, len = 64
[   27.549837] marvell-nfc pxa3xx-nand: 
[   27.549837] NDCR:  0x9d079fff
[   27.549837] NDCB0: 0x000d3000
[   27.549837] NDCB1: 0xdf000000
[   27.549837] NDCB2: 0x00000000
[   27.549837] NDCB3: 0x00000000
[   27.568841] nand: nand_do_read_oob: from = 0x06fa0000, len = 64
[   27.574880] marvell-nfc pxa3xx-nand: 
[   27.574880] NDCR:  0x9d079fff
[   27.574880] NDCB0: 0x000d3000
[   27.574880] NDCB1: 0xdf400000
[   27.574880] NDCB2: 0x00000000
[   27.574880] NDCB3: 0x00000000
[   27.593809] nand: nand_do_read_oob: from = 0x06fc0000, len = 64
[   27.600018] marvell-nfc pxa3xx-nand: 
[   27.600018] NDCR:  0x9d079fff
[   27.600018] NDCB0: 0x000d3000
[   27.600018] NDCB1: 0xdf800000
[   27.600018] NDCB2: 0x00000000
[   27.600018] NDCB3: 0x00000000
[   27.619130] nand: nand_do_read_oob: from = 0x06fe0000, len = 64
[   27.625167] marvell-nfc pxa3xx-nand: 
[   27.625167] NDCR:  0x9d079fff
[   27.625167] NDCB0: 0x000d3000
[   27.625167] NDCB1: 0xdfc00000
[   27.625167] NDCB2: 0x00000000
[   27.625167] NDCB3: 0x00000000
[   27.644107] nand: nand_do_read_oob: from = 0x07000000, len = 64
[   27.650314] marvell-nfc pxa3xx-nand: 
[   27.650314] NDCR:  0x9d079fff
[   27.650314] NDCB0: 0x000d3000
[   27.650314] NDCB1: 0xe0000000
[   27.650314] NDCB2: 0x00000000
[   27.650314] NDCB3: 0x00000000
[   27.669240] nand: nand_do_read_oob: from = 0x07020000, len = 64
[   27.675272] marvell-nfc pxa3xx-nand: 
[   27.675272] NDCR:  0x9d079fff
[   27.675272] NDCB0: 0x000d3000
[   27.675272] NDCB1: 0xe0400000
[   27.675272] NDCB2: 0x00000000
[   27.675272] NDCB3: 0x00000000
[   27.694205] nand: nand_do_read_oob: from = 0x07040000, len = 64
[   27.700411] marvell-nfc pxa3xx-nand: 
[   27.700411] NDCR:  0x9d079fff
[   27.700411] NDCB0: 0x000d3000
[   27.700411] NDCB1: 0xe0800000
[   27.700411] NDCB2: 0x00000000
[   27.700411] NDCB3: 0x00000000
[   27.719337] nand: nand_do_read_oob: from = 0x07060000, len = 64
[   27.725370] marvell-nfc pxa3xx-nand: 
[   27.725370] NDCR:  0x9d079fff
[   27.725370] NDCB0: 0x000d3000
[   27.725370] NDCB1: 0xe0c00000
[   27.725370] NDCB2: 0x00000000
[   27.725370] NDCB3: 0x00000000
[   27.744301] nand: nand_do_read_oob: from = 0x07080000, len = 64
[   27.750500] marvell-nfc pxa3xx-nand: 
[   27.750500] NDCR:  0x9d079fff
[   27.750500] NDCB0: 0x000d3000
[   27.750500] NDCB1: 0xe1000000
[   27.750500] NDCB2: 0x00000000
[   27.750500] NDCB3: 0x00000000
[   27.769428] nand: nand_do_read_oob: from = 0x070a0000, len = 64
[   27.775460] marvell-nfc pxa3xx-nand: 
[   27.775460] NDCR:  0x9d079fff
[   27.775460] NDCB0: 0x000d3000
[   27.775460] NDCB1: 0xe1400000
[   27.775460] NDCB2: 0x00000000
[   27.775460] NDCB3: 0x00000000
[   27.794390] nand: nand_do_read_oob: from = 0x070c0000, len = 64
[   27.800612] marvell-nfc pxa3xx-nand: 
[   27.800612] NDCR:  0x9d079fff
[   27.800612] NDCB0: 0x000d3000
[   27.800612] NDCB1: 0xe1800000
[   27.800612] NDCB2: 0x00000000
[   27.800612] NDCB3: 0x00000000
[   27.819547] nand: nand_do_read_oob: from = 0x070e0000, len = 64
[   27.825576] marvell-nfc pxa3xx-nand: 
[   27.825576] NDCR:  0x9d079fff
[   27.825576] NDCB0: 0x000d3000
[   27.825576] NDCB1: 0xe1c00000
[   27.825576] NDCB2: 0x00000000
[   27.825576] NDCB3: 0x00000000
[   27.844508] nand: nand_do_read_oob: from = 0x07100000, len = 64
[   27.850714] marvell-nfc pxa3xx-nand: 
[   27.850714] NDCR:  0x9d079fff
[   27.850714] NDCB0: 0x000d3000
[   27.850714] NDCB1: 0xe2000000
[   27.850714] NDCB2: 0x00000000
[   27.850714] NDCB3: 0x00000000
[   27.869641] nand: nand_do_read_oob: from = 0x07120000, len = 64
[   27.875675] marvell-nfc pxa3xx-nand: 
[   27.875675] NDCR:  0x9d079fff
[   27.875675] NDCB0: 0x000d3000
[   27.875675] NDCB1: 0xe2400000
[   27.875675] NDCB2: 0x00000000
[   27.875675] NDCB3: 0x00000000
[   27.894604] nand: nand_do_read_oob: from = 0x07140000, len = 64
[   27.900803] marvell-nfc pxa3xx-nand: 
[   27.900803] NDCR:  0x9d079fff
[   27.900803] NDCB0: 0x000d3000
[   27.900803] NDCB1: 0xe2800000
[   27.900803] NDCB2: 0x00000000
[   27.900803] NDCB3: 0x00000000
[   27.919734] nand: nand_do_read_oob: from = 0x07160000, len = 64
[   27.925764] marvell-nfc pxa3xx-nand: 
[   27.925764] NDCR:  0x9d079fff
[   27.925764] NDCB0: 0x000d3000
[   27.925764] NDCB1: 0xe2c00000
[   27.925764] NDCB2: 0x00000000
[   27.925764] NDCB3: 0x00000000
[   27.944696] nand: nand_do_read_oob: from = 0x07180000, len = 64
[   27.950902] marvell-nfc pxa3xx-nand: 
[   27.950902] NDCR:  0x9d079fff
[   27.950902] NDCB0: 0x000d3000
[   27.950902] NDCB1: 0xe3000000
[   27.950902] NDCB2: 0x00000000
[   27.950902] NDCB3: 0x00000000
[   27.969831] nand: nand_do_read_oob: from = 0x071a0000, len = 64
[   27.975860] marvell-nfc pxa3xx-nand: 
[   27.975860] NDCR:  0x9d079fff
[   27.975860] NDCB0: 0x000d3000
[   27.975860] NDCB1: 0xe3400000
[   27.975860] NDCB2: 0x00000000
[   27.975860] NDCB3: 0x00000000
[   27.994796] nand: nand_do_read_oob: from = 0x071c0000, len = 64
[   28.000998] marvell-nfc pxa3xx-nand: 
[   28.000998] NDCR:  0x9d079fff
[   28.000998] NDCB0: 0x000d3000
[   28.000998] NDCB1: 0xe3800000
[   28.000998] NDCB2: 0x00000000
[   28.000998] NDCB3: 0x00000000
[   28.019940] nand: nand_do_read_oob: from = 0x071e0000, len = 64
[   28.025971] marvell-nfc pxa3xx-nand: 
[   28.025971] NDCR:  0x9d079fff
[   28.025971] NDCB0: 0x000d3000
[   28.025971] NDCB1: 0xe3c00000
[   28.025971] NDCB2: 0x00000000
[   28.025971] NDCB3: 0x00000000
[   28.044903] nand: nand_do_read_oob: from = 0x07200000, len = 64
[   28.051109] marvell-nfc pxa3xx-nand: 
[   28.051109] NDCR:  0x9d079fff
[   28.051109] NDCB0: 0x000d3000
[   28.051109] NDCB1: 0xe4000000
[   28.051109] NDCB2: 0x00000000
[   28.051109] NDCB3: 0x00000000
[   28.070037] nand: nand_do_read_oob: from = 0x07220000, len = 64
[   28.076068] marvell-nfc pxa3xx-nand: 
[   28.076068] NDCR:  0x9d079fff
[   28.076068] NDCB0: 0x000d3000
[   28.076068] NDCB1: 0xe4400000
[   28.076068] NDCB2: 0x00000000
[   28.076068] NDCB3: 0x00000000
[   28.095434] nand: nand_do_read_oob: from = 0x07240000, len = 64
[   28.101671] marvell-nfc pxa3xx-nand: 
[   28.101671] NDCR:  0x9d079fff
[   28.101671] NDCB0: 0x000d3000
[   28.101671] NDCB1: 0xe4800000
[   28.101671] NDCB2: 0x00000000
[   28.101671] NDCB3: 0x00000000
[   28.120611] nand: nand_do_read_oob: from = 0x07260000, len = 64
[   28.126640] marvell-nfc pxa3xx-nand: 
[   28.126640] NDCR:  0x9d079fff
[   28.126640] NDCB0: 0x000d3000
[   28.126640] NDCB1: 0xe4c00000
[   28.126640] NDCB2: 0x00000000
[   28.126640] NDCB3: 0x00000000
[   28.145571] nand: nand_do_read_oob: from = 0x07280000, len = 64
[   28.151769] marvell-nfc pxa3xx-nand: 
[   28.151769] NDCR:  0x9d079fff
[   28.151769] NDCB0: 0x000d3000
[   28.151769] NDCB1: 0xe5000000
[   28.151769] NDCB2: 0x00000000
[   28.151769] NDCB3: 0x00000000
[   28.170698] nand: nand_do_read_oob: from = 0x072a0000, len = 64
[   28.176731] marvell-nfc pxa3xx-nand: 
[   28.176731] NDCR:  0x9d079fff
[   28.176731] NDCB0: 0x000d3000
[   28.176731] NDCB1: 0xe5400000
[   28.176731] NDCB2: 0x00000000
[   28.176731] NDCB3: 0x00000000
[   28.195663] nand: nand_do_read_oob: from = 0x072c0000, len = 64
[   28.201868] marvell-nfc pxa3xx-nand: 
[   28.201868] NDCR:  0x9d079fff
[   28.201868] NDCB0: 0x000d3000
[   28.201868] NDCB1: 0xe5800000
[   28.201868] NDCB2: 0x00000000
[   28.201868] NDCB3: 0x00000000
[   28.220798] nand: nand_do_read_oob: from = 0x072e0000, len = 64
[   28.226829] marvell-nfc pxa3xx-nand: 
[   28.226829] NDCR:  0x9d079fff
[   28.226829] NDCB0: 0x000d3000
[   28.226829] NDCB1: 0xe5c00000
[   28.226829] NDCB2: 0x00000000
[   28.226829] NDCB3: 0x00000000
[   28.245763] nand: nand_do_read_oob: from = 0x07300000, len = 64
[   28.251966] marvell-nfc pxa3xx-nand: 
[   28.251966] NDCR:  0x9d079fff
[   28.251966] NDCB0: 0x000d3000
[   28.251966] NDCB1: 0xe6000000
[   28.251966] NDCB2: 0x00000000
[   28.251966] NDCB3: 0x00000000
[   28.270902] nand: nand_do_read_oob: from = 0x07320000, len = 64
[   28.276935] marvell-nfc pxa3xx-nand: 
[   28.276935] NDCR:  0x9d079fff
[   28.276935] NDCB0: 0x000d3000
[   28.276935] NDCB1: 0xe6400000
[   28.276935] NDCB2: 0x00000000
[   28.276935] NDCB3: 0x00000000
[   28.295873] nand: nand_do_read_oob: from = 0x07340000, len = 64
[   28.302075] marvell-nfc pxa3xx-nand: 
[   28.302075] NDCR:  0x9d079fff
[   28.302075] NDCB0: 0x000d3000
[   28.302075] NDCB1: 0xe6800000
[   28.302075] NDCB2: 0x00000000
[   28.302075] NDCB3: 0x00000000
[   28.321004] nand: nand_do_read_oob: from = 0x07360000, len = 64
[   28.327035] marvell-nfc pxa3xx-nand: 
[   28.327035] NDCR:  0x9d079fff
[   28.327035] NDCB0: 0x000d3000
[   28.327035] NDCB1: 0xe6c00000
[   28.327035] NDCB2: 0x00000000
[   28.327035] NDCB3: 0x00000000
[   28.345967] nand: nand_do_read_oob: from = 0x07380000, len = 64
[   28.352174] marvell-nfc pxa3xx-nand: 
[   28.352174] NDCR:  0x9d079fff
[   28.352174] NDCB0: 0x000d3000
[   28.352174] NDCB1: 0xe7000000
[   28.352174] NDCB2: 0x00000000
[   28.352174] NDCB3: 0x00000000
[   28.371103] nand: nand_do_read_oob: from = 0x073a0000, len = 64
[   28.377134] marvell-nfc pxa3xx-nand: 
[   28.377134] NDCR:  0x9d079fff
[   28.377134] NDCB0: 0x000d3000
[   28.377134] NDCB1: 0xe7400000
[   28.377134] NDCB2: 0x00000000
[   28.377134] NDCB3: 0x00000000
[   28.396067] nand: nand_do_read_oob: from = 0x073c0000, len = 64
[   28.402271] marvell-nfc pxa3xx-nand: 
[   28.402271] NDCR:  0x9d079fff
[   28.402271] NDCB0: 0x000d3000
[   28.402271] NDCB1: 0xe7800000
[   28.402271] NDCB2: 0x00000000
[   28.402271] NDCB3: 0x00000000
[   28.421201] nand: nand_do_read_oob: from = 0x073e0000, len = 64
[   28.427231] marvell-nfc pxa3xx-nand: 
[   28.427231] NDCR:  0x9d079fff
[   28.427231] NDCB0: 0x000d3000
[   28.427231] NDCB1: 0xe7c00000
[   28.427231] NDCB2: 0x00000000
[   28.427231] NDCB3: 0x00000000
[   28.446189] nand: nand_do_read_oob: from = 0x07400000, len = 64
[   28.452395] marvell-nfc pxa3xx-nand: 
[   28.452395] NDCR:  0x9d079fff
[   28.452395] NDCB0: 0x000d3000
[   28.452395] NDCB1: 0xe8000000
[   28.452395] NDCB2: 0x00000000
[   28.452395] NDCB3: 0x00000000
[   28.471327] nand: nand_do_read_oob: from = 0x07420000, len = 64
[   28.477365] marvell-nfc pxa3xx-nand: 
[   28.477365] NDCR:  0x9d079fff
[   28.477365] NDCB0: 0x000d3000
[   28.477365] NDCB1: 0xe8400000
[   28.477365] NDCB2: 0x00000000
[   28.477365] NDCB3: 0x00000000
[   28.496300] nand: nand_do_read_oob: from = 0x07440000, len = 64
[   28.502502] marvell-nfc pxa3xx-nand: 
[   28.502502] NDCR:  0x9d079fff
[   28.502502] NDCB0: 0x000d3000
[   28.502502] NDCB1: 0xe8800000
[   28.502502] NDCB2: 0x00000000
[   28.502502] NDCB3: 0x00000000
[   28.521431] nand: nand_do_read_oob: from = 0x07460000, len = 64
[   28.527463] marvell-nfc pxa3xx-nand: 
[   28.527463] NDCR:  0x9d079fff
[   28.527463] NDCB0: 0x000d3000
[   28.527463] NDCB1: 0xe8c00000
[   28.527463] NDCB2: 0x00000000
[   28.527463] NDCB3: 0x00000000
[   28.546395] nand: nand_do_read_oob: from = 0x07480000, len = 64
[   28.552599] marvell-nfc pxa3xx-nand: 
[   28.552599] NDCR:  0x9d079fff
[   28.552599] NDCB0: 0x000d3000
[   28.552599] NDCB1: 0xe9000000
[   28.552599] NDCB2: 0x00000000
[   28.552599] NDCB3: 0x00000000
[   28.571530] nand: nand_do_read_oob: from = 0x074a0000, len = 64
[   28.577562] marvell-nfc pxa3xx-nand: 
[   28.577562] NDCR:  0x9d079fff
[   28.577562] NDCB0: 0x000d3000
[   28.577562] NDCB1: 0xe9400000
[   28.577562] NDCB2: 0x00000000
[   28.577562] NDCB3: 0x00000000
[   28.596495] nand: nand_do_read_oob: from = 0x074c0000, len = 64
[   28.602698] marvell-nfc pxa3xx-nand: 
[   28.602698] NDCR:  0x9d079fff
[   28.602698] NDCB0: 0x000d3000
[   28.602698] NDCB1: 0xe9800000
[   28.602698] NDCB2: 0x00000000
[   28.602698] NDCB3: 0x00000000
[   28.621629] nand: nand_do_read_oob: from = 0x074e0000, len = 64
[   28.627660] marvell-nfc pxa3xx-nand: 
[   28.627660] NDCR:  0x9d079fff
[   28.627660] NDCB0: 0x000d3000
[   28.627660] NDCB1: 0xe9c00000
[   28.627660] NDCB2: 0x00000000
[   28.627660] NDCB3: 0x00000000
[   28.646593] nand: nand_do_read_oob: from = 0x07500000, len = 64
[   28.652797] marvell-nfc pxa3xx-nand: 
[   28.652797] NDCR:  0x9d079fff
[   28.652797] NDCB0: 0x000d3000
[   28.652797] NDCB1: 0xea000000
[   28.652797] NDCB2: 0x00000000
[   28.652797] NDCB3: 0x00000000
[   28.671727] nand: nand_do_read_oob: from = 0x07520000, len = 64
[   28.677758] marvell-nfc pxa3xx-nand: 
[   28.677758] NDCR:  0x9d079fff
[   28.677758] NDCB0: 0x000d3000
[   28.677758] NDCB1: 0xea400000
[   28.677758] NDCB2: 0x00000000
[   28.677758] NDCB3: 0x00000000
[   28.696690] nand: nand_do_read_oob: from = 0x07540000, len = 64
[   28.702896] marvell-nfc pxa3xx-nand: 
[   28.702896] NDCR:  0x9d079fff
[   28.702896] NDCB0: 0x000d3000
[   28.702896] NDCB1: 0xea800000
[   28.702896] NDCB2: 0x00000000
[   28.702896] NDCB3: 0x00000000
[   28.721826] nand: nand_do_read_oob: from = 0x07560000, len = 64
[   28.727857] marvell-nfc pxa3xx-nand: 
[   28.727857] NDCR:  0x9d079fff
[   28.727857] NDCB0: 0x000d3000
[   28.727857] NDCB1: 0xeac00000
[   28.727857] NDCB2: 0x00000000
[   28.727857] NDCB3: 0x00000000
[   28.746788] nand: nand_do_read_oob: from = 0x07580000, len = 64
[   28.752993] marvell-nfc pxa3xx-nand: 
[   28.752993] NDCR:  0x9d079fff
[   28.752993] NDCB0: 0x000d3000
[   28.752993] NDCB1: 0xeb000000
[   28.752993] NDCB2: 0x00000000
[   28.752993] NDCB3: 0x00000000
[   28.771924] nand: nand_do_read_oob: from = 0x075a0000, len = 64
[   28.777955] marvell-nfc pxa3xx-nand: 
[   28.777955] NDCR:  0x9d079fff
[   28.777955] NDCB0: 0x000d3000
[   28.777955] NDCB1: 0xeb400000
[   28.777955] NDCB2: 0x00000000
[   28.777955] NDCB3: 0x00000000
[   28.796887] nand: nand_do_read_oob: from = 0x075c0000, len = 64
[   28.803092] marvell-nfc pxa3xx-nand: 
[   28.803092] NDCR:  0x9d079fff
[   28.803092] NDCB0: 0x000d3000
[   28.803092] NDCB1: 0xeb800000
[   28.803092] NDCB2: 0x00000000
[   28.803092] NDCB3: 0x00000000
[   28.822020] nand: nand_do_read_oob: from = 0x075e0000, len = 64
[   28.828053] marvell-nfc pxa3xx-nand: 
[   28.828053] NDCR:  0x9d079fff
[   28.828053] NDCB0: 0x000d3000
[   28.828053] NDCB1: 0xebc00000
[   28.828053] NDCB2: 0x00000000
[   28.828053] NDCB3: 0x00000000
[   28.846987] nand: nand_do_read_oob: from = 0x07600000, len = 64
[   28.853193] marvell-nfc pxa3xx-nand: 
[   28.853193] NDCR:  0x9d079fff
[   28.853193] NDCB0: 0x000d3000
[   28.853193] NDCB1: 0xec000000
[   28.853193] NDCB2: 0x00000000
[   28.853193] NDCB3: 0x00000000
[   28.872122] nand: nand_do_read_oob: from = 0x07620000, len = 64
[   28.878151] marvell-nfc pxa3xx-nand: 
[   28.878151] NDCR:  0x9d079fff
[   28.878151] NDCB0: 0x000d3000
[   28.878151] NDCB1: 0xec400000
[   28.878151] NDCB2: 0x00000000
[   28.878151] NDCB3: 0x00000000
[   28.897086] nand: nand_do_read_oob: from = 0x07640000, len = 64
[   28.903291] marvell-nfc pxa3xx-nand: 
[   28.903291] NDCR:  0x9d079fff
[   28.903291] NDCB0: 0x000d3000
[   28.903291] NDCB1: 0xec800000
[   28.903291] NDCB2: 0x00000000
[   28.903291] NDCB3: 0x00000000
[   28.922220] nand: nand_do_read_oob: from = 0x07660000, len = 64
[   28.928250] marvell-nfc pxa3xx-nand: 
[   28.928250] NDCR:  0x9d079fff
[   28.928250] NDCB0: 0x000d3000
[   28.928250] NDCB1: 0xecc00000
[   28.928250] NDCB2: 0x00000000
[   28.928250] NDCB3: 0x00000000
[   28.947184] nand: nand_do_read_oob: from = 0x07680000, len = 64
[   28.953390] marvell-nfc pxa3xx-nand: 
[   28.953390] NDCR:  0x9d079fff
[   28.953390] NDCB0: 0x000d3000
[   28.953390] NDCB1: 0xed000000
[   28.953390] NDCB2: 0x00000000
[   28.953390] NDCB3: 0x00000000
[   28.972318] nand: nand_do_read_oob: from = 0x076a0000, len = 64
[   28.978348] marvell-nfc pxa3xx-nand: 
[   28.978348] NDCR:  0x9d079fff
[   28.978348] NDCB0: 0x000d3000
[   28.978348] NDCB1: 0xed400000
[   28.978348] NDCB2: 0x00000000
[   28.978348] NDCB3: 0x00000000
[   28.997279] nand: nand_do_read_oob: from = 0x076c0000, len = 64
[   29.003476] marvell-nfc pxa3xx-nand: 
[   29.003476] NDCR:  0x9d079fff
[   29.003476] NDCB0: 0x000d3000
[   29.003476] NDCB1: 0xed800000
[   29.003476] NDCB2: 0x00000000
[   29.003476] NDCB3: 0x00000000
[   29.022420] nand: nand_do_read_oob: from = 0x076e0000, len = 64
[   29.028448] marvell-nfc pxa3xx-nand: 
[   29.028448] NDCR:  0x9d079fff
[   29.028448] NDCB0: 0x000d3000
[   29.028448] NDCB1: 0xedc00000
[   29.028448] NDCB2: 0x00000000
[   29.028448] NDCB3: 0x00000000
[   29.047381] nand: nand_do_read_oob: from = 0x07700000, len = 64
[   29.053585] marvell-nfc pxa3xx-nand: 
[   29.053585] NDCR:  0x9d079fff
[   29.053585] NDCB0: 0x000d3000
[   29.053585] NDCB1: 0xee000000
[   29.053585] NDCB2: 0x00000000
[   29.053585] NDCB3: 0x00000000
[   29.072517] nand: nand_do_read_oob: from = 0x07720000, len = 64
[   29.078545] marvell-nfc pxa3xx-nand: 
[   29.078545] NDCR:  0x9d079fff
[   29.078545] NDCB0: 0x000d3000
[   29.078545] NDCB1: 0xee400000
[   29.078545] NDCB2: 0x00000000
[   29.078545] NDCB3: 0x00000000
[   29.097499] nand: nand_do_read_oob: from = 0x07740000, len = 64
[   29.103703] marvell-nfc pxa3xx-nand: 
[   29.103703] NDCR:  0x9d079fff
[   29.103703] NDCB0: 0x000d3000
[   29.103703] NDCB1: 0xee800000
[   29.103703] NDCB2: 0x00000000
[   29.103703] NDCB3: 0x00000000
[   29.122630] nand: nand_do_read_oob: from = 0x07760000, len = 64
[   29.128834] marvell-nfc pxa3xx-nand: 
[   29.128834] NDCR:  0x9d079fff
[   29.128834] NDCB0: 0x000d3000
[   29.128834] NDCB1: 0xeec00000
[   29.128834] NDCB2: 0x00000000
[   29.128834] NDCB3: 0x00000000
[   29.147744] nand: nand_do_read_oob: from = 0x07780000, len = 64
[   29.153944] marvell-nfc pxa3xx-nand: 
[   29.153944] NDCR:  0x9d079fff
[   29.153944] NDCB0: 0x000d3000
[   29.153944] NDCB1: 0xef000000
[   29.153944] NDCB2: 0x00000000
[   29.153944] NDCB3: 0x00000000
[   29.172876] nand: nand_do_read_oob: from = 0x077a0000, len = 64
[   29.179077] marvell-nfc pxa3xx-nand: 
[   29.179077] NDCR:  0x9d079fff
[   29.179077] NDCB0: 0x000d3000
[   29.179077] NDCB1: 0xef400000
[   29.179077] NDCB2: 0x00000000
[   29.179077] NDCB3: 0x00000000
[   29.197999] nand: nand_do_read_oob: from = 0x077c0000, len = 64
[   29.204198] marvell-nfc pxa3xx-nand: 
[   29.204198] NDCR:  0x9d079fff
[   29.204198] NDCB0: 0x000d3000
[   29.204198] NDCB1: 0xef800000
[   29.204198] NDCB2: 0x00000000
[   29.204198] NDCB3: 0x00000000
[   29.223128] nand: nand_do_read_oob: from = 0x077e0000, len = 64
[   29.229328] marvell-nfc pxa3xx-nand: 
[   29.229328] NDCR:  0x9d079fff
[   29.229328] NDCB0: 0x000d3000
[   29.229328] NDCB1: 0xefc00000
[   29.229328] NDCB2: 0x00000000
[   29.229328] NDCB3: 0x00000000
[   29.248252] nand: nand_do_read_oob: from = 0x07800000, len = 64
[   29.254452] marvell-nfc pxa3xx-nand: 
[   29.254452] NDCR:  0x9d079fff
[   29.254452] NDCB0: 0x000d3000
[   29.254452] NDCB1: 0xf0000000
[   29.254452] NDCB2: 0x00000000
[   29.254452] NDCB3: 0x00000000
[   29.273384] nand: nand_do_read_oob: from = 0x07820000, len = 64
[   29.279582] marvell-nfc pxa3xx-nand: 
[   29.279582] NDCR:  0x9d079fff
[   29.279582] NDCB0: 0x000d3000
[   29.279582] NDCB1: 0xf0400000
[   29.279582] NDCB2: 0x00000000
[   29.279582] NDCB3: 0x00000000
[   29.298824] nand: nand_do_read_oob: from = 0x07840000, len = 64
[   29.304868] marvell-nfc pxa3xx-nand: 
[   29.304868] NDCR:  0x9d079fff
[   29.304868] NDCB0: 0x000d3000
[   29.304868] NDCB1: 0xf0800000
[   29.304868] NDCB2: 0x00000000
[   29.304868] NDCB3: 0x00000000
[   29.323796] nand: nand_do_read_oob: from = 0x07860000, len = 64
[   29.330003] marvell-nfc pxa3xx-nand: 
[   29.330003] NDCR:  0x9d079fff
[   29.330003] NDCB0: 0x000d3000
[   29.330003] NDCB1: 0xf0c00000
[   29.330003] NDCB2: 0x00000000
[   29.330003] NDCB3: 0x00000000
[   29.348991] nand: nand_do_read_oob: from = 0x07880000, len = 64
[   29.355023] marvell-nfc pxa3xx-nand: 
[   29.355023] NDCR:  0x9d079fff
[   29.355023] NDCB0: 0x000d3000
[   29.355023] NDCB1: 0xf1000000
[   29.355023] NDCB2: 0x00000000
[   29.355023] NDCB3: 0x00000000
[   29.373955] nand: nand_do_read_oob: from = 0x078a0000, len = 64
[   29.380161] marvell-nfc pxa3xx-nand: 
[   29.380161] NDCR:  0x9d079fff
[   29.380161] NDCB0: 0x000d3000
[   29.380161] NDCB1: 0xf1400000
[   29.380161] NDCB2: 0x00000000
[   29.380161] NDCB3: 0x00000000
[   29.399089] nand: nand_do_read_oob: from = 0x078c0000, len = 64
[   29.405120] marvell-nfc pxa3xx-nand: 
[   29.405120] NDCR:  0x9d079fff
[   29.405120] NDCB0: 0x000d3000
[   29.405120] NDCB1: 0xf1800000
[   29.405120] NDCB2: 0x00000000
[   29.405120] NDCB3: 0x00000000
[   29.424052] nand: nand_do_read_oob: from = 0x078e0000, len = 64
[   29.430260] marvell-nfc pxa3xx-nand: 
[   29.430260] NDCR:  0x9d079fff
[   29.430260] NDCB0: 0x000d3000
[   29.430260] NDCB1: 0xf1c00000
[   29.430260] NDCB2: 0x00000000
[   29.430260] NDCB3: 0x00000000
[   29.449188] nand: nand_do_read_oob: from = 0x07900000, len = 64
[   29.455218] marvell-nfc pxa3xx-nand: 
[   29.455218] NDCR:  0x9d079fff
[   29.455218] NDCB0: 0x000d3000
[   29.455218] NDCB1: 0xf2000000
[   29.455218] NDCB2: 0x00000000
[   29.455218] NDCB3: 0x00000000
[   29.474151] nand: nand_do_read_oob: from = 0x07920000, len = 64
[   29.480357] marvell-nfc pxa3xx-nand: 
[   29.480357] NDCR:  0x9d079fff
[   29.480357] NDCB0: 0x000d3000
[   29.480357] NDCB1: 0xf2400000
[   29.480357] NDCB2: 0x00000000
[   29.480357] NDCB3: 0x00000000
[   29.499286] nand: nand_do_read_oob: from = 0x07940000, len = 64
[   29.505317] marvell-nfc pxa3xx-nand: 
[   29.505317] NDCR:  0x9d079fff
[   29.505317] NDCB0: 0x000d3000
[   29.505317] NDCB1: 0xf2800000
[   29.505317] NDCB2: 0x00000000
[   29.505317] NDCB3: 0x00000000
[   29.524250] nand: nand_do_read_oob: from = 0x07960000, len = 64
[   29.530454] marvell-nfc pxa3xx-nand: 
[   29.530454] NDCR:  0x9d079fff
[   29.530454] NDCB0: 0x000d3000
[   29.530454] NDCB1: 0xf2c00000
[   29.530454] NDCB2: 0x00000000
[   29.530454] NDCB3: 0x00000000
[   29.549385] nand: nand_do_read_oob: from = 0x07980000, len = 64
[   29.555416] marvell-nfc pxa3xx-nand: 
[   29.555416] NDCR:  0x9d079fff
[   29.555416] NDCB0: 0x000d3000
[   29.555416] NDCB1: 0xf3000000
[   29.555416] NDCB2: 0x00000000
[   29.555416] NDCB3: 0x00000000
[   29.574347] nand: nand_do_read_oob: from = 0x079a0000, len = 64
[   29.580546] marvell-nfc pxa3xx-nand: 
[   29.580546] NDCR:  0x9d079fff
[   29.580546] NDCB0: 0x000d3000
[   29.580546] NDCB1: 0xf3400000
[   29.580546] NDCB2: 0x00000000
[   29.580546] NDCB3: 0x00000000
[   29.599474] nand: nand_do_read_oob: from = 0x079c0000, len = 64
[   29.605507] marvell-nfc pxa3xx-nand: 
[   29.605507] NDCR:  0x9d079fff
[   29.605507] NDCB0: 0x000d3000
[   29.605507] NDCB1: 0xf3800000
[   29.605507] NDCB2: 0x00000000
[   29.605507] NDCB3: 0x00000000
[   29.624438] nand: nand_do_read_oob: from = 0x079e0000, len = 64
[   29.630643] marvell-nfc pxa3xx-nand: 
[   29.630643] NDCR:  0x9d079fff
[   29.630643] NDCB0: 0x000d3000
[   29.630643] NDCB1: 0xf3c00000
[   29.630643] NDCB2: 0x00000000
[   29.630643] NDCB3: 0x00000000
[   29.649573] nand: nand_do_read_oob: from = 0x07a00000, len = 64
[   29.655605] marvell-nfc pxa3xx-nand: 
[   29.655605] NDCR:  0x9d079fff
[   29.655605] NDCB0: 0x000d3000
[   29.655605] NDCB1: 0xf4000000
[   29.655605] NDCB2: 0x00000000
[   29.655605] NDCB3: 0x00000000
[   29.674557] nand: nand_do_read_oob: from = 0x07a20000, len = 64
[   29.680759] marvell-nfc pxa3xx-nand: 
[   29.680759] NDCR:  0x9d079fff
[   29.680759] NDCB0: 0x000d3000
[   29.680759] NDCB1: 0xf4400000
[   29.680759] NDCB2: 0x00000000
[   29.680759] NDCB3: 0x00000000
[   29.699688] nand: nand_do_read_oob: from = 0x07a40000, len = 64
[   29.705720] marvell-nfc pxa3xx-nand: 
[   29.705720] NDCR:  0x9d079fff
[   29.705720] NDCB0: 0x000d3000
[   29.705720] NDCB1: 0xf4800000
[   29.705720] NDCB2: 0x00000000
[   29.705720] NDCB3: 0x00000000
[   29.724651] nand: nand_do_read_oob: from = 0x07a60000, len = 64
[   29.730851] marvell-nfc pxa3xx-nand: 
[   29.730851] NDCR:  0x9d079fff
[   29.730851] NDCB0: 0x000d3000
[   29.730851] NDCB1: 0xf4c00000
[   29.730851] NDCB2: 0x00000000
[   29.730851] NDCB3: 0x00000000
[   29.749779] nand: nand_do_read_oob: from = 0x07a80000, len = 64
[   29.755808] marvell-nfc pxa3xx-nand: 
[   29.755808] NDCR:  0x9d079fff
[   29.755808] NDCB0: 0x000d3000
[   29.755808] NDCB1: 0xf5000000
[   29.755808] NDCB2: 0x00000000
[   29.755808] NDCB3: 0x00000000
[   29.774743] nand: nand_do_read_oob: from = 0x07aa0000, len = 64
[   29.780949] marvell-nfc pxa3xx-nand: 
[   29.780949] NDCR:  0x9d079fff
[   29.780949] NDCB0: 0x000d3000
[   29.780949] NDCB1: 0xf5400000
[   29.780949] NDCB2: 0x00000000
[   29.780949] NDCB3: 0x00000000
[   29.799876] nand: nand_do_read_oob: from = 0x07ac0000, len = 64
[   29.805909] marvell-nfc pxa3xx-nand: 
[   29.805909] NDCR:  0x9d079fff
[   29.805909] NDCB0: 0x000d3000
[   29.805909] NDCB1: 0xf5800000
[   29.805909] NDCB2: 0x00000000
[   29.805909] NDCB3: 0x00000000
[   29.824842] nand: nand_do_read_oob: from = 0x07ae0000, len = 64
[   29.831048] marvell-nfc pxa3xx-nand: 
[   29.831048] NDCR:  0x9d079fff
[   29.831048] NDCB0: 0x000d3000
[   29.831048] NDCB1: 0xf5c00000
[   29.831048] NDCB2: 0x00000000
[   29.831048] NDCB3: 0x00000000
[   29.849975] nand: nand_do_read_oob: from = 0x07b00000, len = 64
[   29.856007] marvell-nfc pxa3xx-nand: 
[   29.856007] NDCR:  0x9d079fff
[   29.856007] NDCB0: 0x000d3000
[   29.856007] NDCB1: 0xf6000000
[   29.856007] NDCB2: 0x00000000
[   29.856007] NDCB3: 0x00000000
[   29.874944] nand: nand_do_read_oob: from = 0x07b20000, len = 64
[   29.881147] marvell-nfc pxa3xx-nand: 
[   29.881147] NDCR:  0x9d079fff
[   29.881147] NDCB0: 0x000d3000
[   29.881147] NDCB1: 0xf6400000
[   29.881147] NDCB2: 0x00000000
[   29.881147] NDCB3: 0x00000000
[   29.900075] nand: nand_do_read_oob: from = 0x07b40000, len = 64
[   29.906105] marvell-nfc pxa3xx-nand: 
[   29.906105] NDCR:  0x9d079fff
[   29.906105] NDCB0: 0x000d3000
[   29.906105] NDCB1: 0xf6800000
[   29.906105] NDCB2: 0x00000000
[   29.906105] NDCB3: 0x00000000
[   29.925038] nand: nand_do_read_oob: from = 0x07b60000, len = 64
[   29.931245] marvell-nfc pxa3xx-nand: 
[   29.931245] NDCR:  0x9d079fff
[   29.931245] NDCB0: 0x000d3000
[   29.931245] NDCB1: 0xf6c00000
[   29.931245] NDCB2: 0x00000000
[   29.931245] NDCB3: 0x00000000
[   29.950173] nand: nand_do_read_oob: from = 0x07b80000, len = 64
[   29.956205] marvell-nfc pxa3xx-nand: 
[   29.956205] NDCR:  0x9d079fff
[   29.956205] NDCB0: 0x000d3000
[   29.956205] NDCB1: 0xf7000000
[   29.956205] NDCB2: 0x00000000
[   29.956205] NDCB3: 0x00000000
[   29.975136] nand: nand_do_read_oob: from = 0x07ba0000, len = 64
[   29.981341] marvell-nfc pxa3xx-nand: 
[   29.981341] NDCR:  0x9d079fff
[   29.981341] NDCB0: 0x000d3000
[   29.981341] NDCB1: 0xf7400000
[   29.981341] NDCB2: 0x00000000
[   29.981341] NDCB3: 0x00000000
[   30.000271] nand: nand_do_read_oob: from = 0x07bc0000, len = 64
[   30.006303] marvell-nfc pxa3xx-nand: 
[   30.006303] NDCR:  0x9d079fff
[   30.006303] NDCB0: 0x000d3000
[   30.006303] NDCB1: 0xf7800000
[   30.006303] NDCB2: 0x00000000
[   30.006303] NDCB3: 0x00000000
[   30.025242] nand: nand_do_read_oob: from = 0x07be0000, len = 64
[   30.031450] marvell-nfc pxa3xx-nand: 
[   30.031450] NDCR:  0x9d079fff
[   30.031450] NDCB0: 0x000d3000
[   30.031450] NDCB1: 0xf7c00000
[   30.031450] NDCB2: 0x00000000
[   30.031450] NDCB3: 0x00000000
[   30.050378] nand: nand_do_read_oob: from = 0x07c00000, len = 64
[   30.056409] marvell-nfc pxa3xx-nand: 
[   30.056409] NDCR:  0x9d079fff
[   30.056409] NDCB0: 0x000d3000
[   30.056409] NDCB1: 0xf8000000
[   30.056409] NDCB2: 0x00000000
[   30.056409] NDCB3: 0x00000000
[   30.075347] nand: nand_do_read_oob: from = 0x07c20000, len = 64
[   30.081549] marvell-nfc pxa3xx-nand: 
[   30.081549] NDCR:  0x9d079fff
[   30.081549] NDCB0: 0x000d3000
[   30.081549] NDCB1: 0xf8400000
[   30.081549] NDCB2: 0x00000000
[   30.081549] NDCB3: 0x00000000
[   30.100810] nand: nand_do_read_oob: from = 0x07c40000, len = 64
[   30.106850] marvell-nfc pxa3xx-nand: 
[   30.106850] NDCR:  0x9d079fff
[   30.106850] NDCB0: 0x000d3000
[   30.106850] NDCB1: 0xf8800000
[   30.106850] NDCB2: 0x00000000
[   30.106850] NDCB3: 0x00000000
[   30.125809] nand: nand_do_read_oob: from = 0x07c60000, len = 64
[   30.132009] marvell-nfc pxa3xx-nand: 
[   30.132009] NDCR:  0x9d079fff
[   30.132009] NDCB0: 0x000d3000
[   30.132009] NDCB1: 0xf8c00000
[   30.132009] NDCB2: 0x00000000
[   30.132009] NDCB3: 0x00000000
[   30.150936] nand: nand_do_read_oob: from = 0x07c80000, len = 64
[   30.156969] marvell-nfc pxa3xx-nand: 
[   30.156969] NDCR:  0x9d079fff
[   30.156969] NDCB0: 0x000d3000
[   30.156969] NDCB1: 0xf9000000
[   30.156969] NDCB2: 0x00000000
[   30.156969] NDCB3: 0x00000000
[   30.175903] nand: nand_do_read_oob: from = 0x07ca0000, len = 64
[   30.182106] marvell-nfc pxa3xx-nand: 
[   30.182106] NDCR:  0x9d079fff
[   30.182106] NDCB0: 0x000d3000
[   30.182106] NDCB1: 0xf9400000
[   30.182106] NDCB2: 0x00000000
[   30.182106] NDCB3: 0x00000000
[   30.201034] nand: nand_do_read_oob: from = 0x07cc0000, len = 64
[   30.207066] marvell-nfc pxa3xx-nand: 
[   30.207066] NDCR:  0x9d079fff
[   30.207066] NDCB0: 0x000d3000
[   30.207066] NDCB1: 0xf9800000
[   30.207066] NDCB2: 0x00000000
[   30.207066] NDCB3: 0x00000000
[   30.225997] nand: nand_do_read_oob: from = 0x07ce0000, len = 64
[   30.232197] marvell-nfc pxa3xx-nand: 
[   30.232197] NDCR:  0x9d079fff
[   30.232197] NDCB0: 0x000d3000
[   30.232197] NDCB1: 0xf9c00000
[   30.232197] NDCB2: 0x00000000
[   30.232197] NDCB3: 0x00000000
[   30.251124] nand: nand_do_read_oob: from = 0x07d00000, len = 64
[   30.257156] marvell-nfc pxa3xx-nand: 
[   30.257156] NDCR:  0x9d079fff
[   30.257156] NDCB0: 0x000d3000
[   30.257156] NDCB1: 0xfa000000
[   30.257156] NDCB2: 0x00000000
[   30.257156] NDCB3: 0x00000000
[   30.276087] nand: nand_do_read_oob: from = 0x07d20000, len = 64
[   30.282295] marvell-nfc pxa3xx-nand: 
[   30.282295] NDCR:  0x9d079fff
[   30.282295] NDCB0: 0x000d3000
[   30.282295] NDCB1: 0xfa400000
[   30.282295] NDCB2: 0x00000000
[   30.282295] NDCB3: 0x00000000
[   30.301223] nand: nand_do_read_oob: from = 0x07d40000, len = 64
[   30.307254] marvell-nfc pxa3xx-nand: 
[   30.307254] NDCR:  0x9d079fff
[   30.307254] NDCB0: 0x000d3000
[   30.307254] NDCB1: 0xfa800000
[   30.307254] NDCB2: 0x00000000
[   30.307254] NDCB3: 0x00000000
[   30.326208] nand: nand_do_read_oob: from = 0x07d60000, len = 64
[   30.332412] marvell-nfc pxa3xx-nand: 
[   30.332412] NDCR:  0x9d079fff
[   30.332412] NDCB0: 0x000d3000
[   30.332412] NDCB1: 0xfac00000
[   30.332412] NDCB2: 0x00000000
[   30.332412] NDCB3: 0x00000000
[   30.351339] nand: nand_do_read_oob: from = 0x07d80000, len = 64
[   30.357370] marvell-nfc pxa3xx-nand: 
[   30.357370] NDCR:  0x9d079fff
[   30.357370] NDCB0: 0x000d3000
[   30.357370] NDCB1: 0xfb000000
[   30.357370] NDCB2: 0x00000000
[   30.357370] NDCB3: 0x00000000
[   30.376303] nand: nand_do_read_oob: from = 0x07da0000, len = 64
[   30.382509] marvell-nfc pxa3xx-nand: 
[   30.382509] NDCR:  0x9d079fff
[   30.382509] NDCB0: 0x000d3000
[   30.382509] NDCB1: 0xfb400000
[   30.382509] NDCB2: 0x00000000
[   30.382509] NDCB3: 0x00000000
[   30.401437] nand: nand_do_read_oob: from = 0x07dc0000, len = 64
[   30.407468] marvell-nfc pxa3xx-nand: 
[   30.407468] NDCR:  0x9d079fff
[   30.407468] NDCB0: 0x000d3000
[   30.407468] NDCB1: 0xfb800000
[   30.407468] NDCB2: 0x00000000
[   30.407468] NDCB3: 0x00000000
[   30.426400] nand: nand_do_read_oob: from = 0x07de0000, len = 64
[   30.432608] marvell-nfc pxa3xx-nand: 
[   30.432608] NDCR:  0x9d079fff
[   30.432608] NDCB0: 0x000d3000
[   30.432608] NDCB1: 0xfbc00000
[   30.432608] NDCB2: 0x00000000
[   30.432608] NDCB3: 0x00000000
[   30.451537] nand: nand_do_read_oob: from = 0x07e00000, len = 64
[   30.457568] marvell-nfc pxa3xx-nand: 
[   30.457568] NDCR:  0x9d079fff
[   30.457568] NDCB0: 0x000d3000
[   30.457568] NDCB1: 0xfc000000
[   30.457568] NDCB2: 0x00000000
[   30.457568] NDCB3: 0x00000000
[   30.476498] nand: nand_do_read_oob: from = 0x07e20000, len = 64
[   30.482695] marvell-nfc pxa3xx-nand: 
[   30.482695] NDCR:  0x9d079fff
[   30.482695] NDCB0: 0x000d3000
[   30.482695] NDCB1: 0xfc400000
[   30.482695] NDCB2: 0x00000000
[   30.482695] NDCB3: 0x00000000
[   30.501625] nand: nand_do_read_oob: from = 0x07e40000, len = 64
[   30.507657] marvell-nfc pxa3xx-nand: 
[   30.507657] NDCR:  0x9d079fff
[   30.507657] NDCB0: 0x000d3000
[   30.507657] NDCB1: 0xfc800000
[   30.507657] NDCB2: 0x00000000
[   30.507657] NDCB3: 0x00000000
[   30.526589] nand: nand_do_read_oob: from = 0x07e60000, len = 64
[   30.532794] marvell-nfc pxa3xx-nand: 
[   30.532794] NDCR:  0x9d079fff
[   30.532794] NDCB0: 0x000d3000
[   30.532794] NDCB1: 0xfcc00000
[   30.532794] NDCB2: 0x00000000
[   30.532794] NDCB3: 0x00000000
[   30.551723] nand: nand_do_read_oob: from = 0x07e80000, len = 64
[   30.557755] marvell-nfc pxa3xx-nand: 
[   30.557755] NDCR:  0x9d079fff
[   30.557755] NDCB0: 0x000d3000
[   30.557755] NDCB1: 0xfd000000
[   30.557755] NDCB2: 0x00000000
[   30.557755] NDCB3: 0x00000000
[   30.576689] nand: nand_do_read_oob: from = 0x07ea0000, len = 64
[   30.582895] marvell-nfc pxa3xx-nand: 
[   30.582895] NDCR:  0x9d079fff
[   30.582895] NDCB0: 0x000d3000
[   30.582895] NDCB1: 0xfd400000
[   30.582895] NDCB2: 0x00000000
[   30.582895] NDCB3: 0x00000000
[   30.601822] nand: nand_do_read_oob: from = 0x07ec0000, len = 64
[   30.607855] marvell-nfc pxa3xx-nand: 
[   30.607855] NDCR:  0x9d079fff
[   30.607855] NDCB0: 0x000d3000
[   30.607855] NDCB1: 0xfd800000
[   30.607855] NDCB2: 0x00000000
[   30.607855] NDCB3: 0x00000000
[   30.626788] nand: nand_do_read_oob: from = 0x07ee0000, len = 64
[   30.632994] marvell-nfc pxa3xx-nand: 
[   30.632994] NDCR:  0x9d079fff
[   30.632994] NDCB0: 0x000d3000
[   30.632994] NDCB1: 0xfdc00000
[   30.632994] NDCB2: 0x00000000
[   30.632994] NDCB3: 0x00000000
[   30.651920] nand: nand_do_read_oob: from = 0x07f00000, len = 64
[   30.657953] marvell-nfc pxa3xx-nand: 
[   30.657953] NDCR:  0x9d079fff
[   30.657953] NDCB0: 0x000d3000
[   30.657953] NDCB1: 0xfe000000
[   30.657953] NDCB2: 0x00000000
[   30.657953] NDCB3: 0x00000000
[   30.676890] nand: nand_do_read_oob: from = 0x07f20000, len = 64
[   30.683091] marvell-nfc pxa3xx-nand: 
[   30.683091] NDCR:  0x9d079fff
[   30.683091] NDCB0: 0x000d3000
[   30.683091] NDCB1: 0xfe400000
[   30.683091] NDCB2: 0x00000000
[   30.683091] NDCB3: 0x00000000
[   30.702019] nand: nand_do_read_oob: from = 0x07f40000, len = 64
[   30.708052] marvell-nfc pxa3xx-nand: 
[   30.708052] NDCR:  0x9d079fff
[   30.708052] NDCB0: 0x000d3000
[   30.708052] NDCB1: 0xfe800000
[   30.708052] NDCB2: 0x00000000
[   30.708052] NDCB3: 0x00000000
[   30.726984] nand: nand_do_read_oob: from = 0x07f60000, len = 64
[   30.733194] marvell-nfc pxa3xx-nand: 
[   30.733194] NDCR:  0x9d079fff
[   30.733194] NDCB0: 0x000d3000
[   30.733194] NDCB1: 0xfec00000
[   30.733194] NDCB2: 0x00000000
[   30.733194] NDCB3: 0x00000000
[   30.752117] nand: nand_do_read_oob: from = 0x07f80000, len = 64
[   30.758150] marvell-nfc pxa3xx-nand: 
[   30.758150] NDCR:  0x9d079fff
[   30.758150] NDCB0: 0x000d3000
[   30.758150] NDCB1: 0xff000000
[   30.758150] NDCB2: 0x00000000
[   30.758150] NDCB3: 0x00000000
[   30.777082] nand: nand_do_read_oob: from = 0x07fa0000, len = 64
[   30.783289] marvell-nfc pxa3xx-nand: 
[   30.783289] NDCR:  0x9d079fff
[   30.783289] NDCB0: 0x000d3000
[   30.783289] NDCB1: 0xff400000
[   30.783289] NDCB2: 0x00000000
[   30.783289] NDCB3: 0x00000000
[   30.802215] nand: nand_do_read_oob: from = 0x07fc0000, len = 64
[   30.808248] marvell-nfc pxa3xx-nand: 
[   30.808248] NDCR:  0x9d079fff
[   30.808248] NDCB0: 0x000d3000
[   30.808248] NDCB1: 0xff800000
[   30.808248] NDCB2: 0x00000000
[   30.808248] NDCB3: 0x00000000
[   30.827180] nand: nand_do_read_oob: from = 0x07fe0000, len = 64
[   30.833387] marvell-nfc pxa3xx-nand: 
[   30.833387] NDCR:  0x9d079fff
[   30.833387] NDCB0: 0x000d3000
[   30.833387] NDCB1: 0xffc00000
[   30.833387] NDCB2: 0x00000000
[   30.833387] NDCB3: 0x00000000
[   30.852314] nand: nand_do_read_oob: from = 0x08000000, len = 64
[   30.858343] marvell-nfc pxa3xx-nand: 
[   30.858343] NDCR:  0x9d079fff
[   30.858343] NDCB0: 0x000d3000
[   30.858343] NDCB1: 0x00000000
[   30.858343] NDCB2: 0x00000001
[   30.858343] NDCB3: 0x00000000
[   30.877280] nand: nand_do_read_oob: from = 0x08020000, len = 64
[   30.883486] marvell-nfc pxa3xx-nand: 
[   30.883486] NDCR:  0x9d079fff
[   30.883486] NDCB0: 0x000d3000
[   30.883486] NDCB1: 0x00400000
[   30.883486] NDCB2: 0x00000001
[   30.883486] NDCB3: 0x00000000
[   30.902417] nand: nand_do_read_oob: from = 0x08040000, len = 64
[   30.908445] marvell-nfc pxa3xx-nand: 
[   30.908445] NDCR:  0x9d079fff
[   30.908445] NDCB0: 0x000d3000
[   30.908445] NDCB1: 0x00800000
[   30.908445] NDCB2: 0x00000001
[   30.908445] NDCB3: 0x00000000
[   30.927379] nand: nand_do_read_oob: from = 0x08060000, len = 64
[   30.933580] marvell-nfc pxa3xx-nand: 
[   30.933580] NDCR:  0x9d079fff
[   30.933580] NDCB0: 0x000d3000
[   30.933580] NDCB1: 0x00c00000
[   30.933580] NDCB2: 0x00000001
[   30.933580] NDCB3: 0x00000000
[   30.952528] nand: nand_do_read_oob: from = 0x08080000, len = 64
[   30.958561] marvell-nfc pxa3xx-nand: 
[   30.958561] NDCR:  0x9d079fff
[   30.958561] NDCB0: 0x000d3000
[   30.958561] NDCB1: 0x01000000
[   30.958561] NDCB2: 0x00000001
[   30.958561] NDCB3: 0x00000000
[   30.977494] nand: nand_do_read_oob: from = 0x080a0000, len = 64
[   30.983701] marvell-nfc pxa3xx-nand: 
[   30.983701] NDCR:  0x9d079fff
[   30.983701] NDCB0: 0x000d3000
[   30.983701] NDCB1: 0x01400000
[   30.983701] NDCB2: 0x00000001
[   30.983701] NDCB3: 0x00000000
[   31.002627] nand: nand_do_read_oob: from = 0x080c0000, len = 64
[   31.008841] marvell-nfc pxa3xx-nand: 
[   31.008841] NDCR:  0x9d079fff
[   31.008841] NDCB0: 0x000d3000
[   31.008841] NDCB1: 0x01800000
[   31.008841] NDCB2: 0x00000001
[   31.008841] NDCB3: 0x00000000
[   31.027751] nand: nand_do_read_oob: from = 0x080e0000, len = 64
[   31.033952] marvell-nfc pxa3xx-nand: 
[   31.033952] NDCR:  0x9d079fff
[   31.033952] NDCB0: 0x000d3000
[   31.033952] NDCB1: 0x01c00000
[   31.033952] NDCB2: 0x00000001
[   31.033952] NDCB3: 0x00000000
[   31.052881] nand: nand_do_read_oob: from = 0x08100000, len = 64
[   31.059081] marvell-nfc pxa3xx-nand: 
[   31.059081] NDCR:  0x9d079fff
[   31.059081] NDCB0: 0x000d3000
[   31.059081] NDCB1: 0x02000000
[   31.059081] NDCB2: 0x00000001
[   31.059081] NDCB3: 0x00000000
[   31.078003] nand: nand_do_read_oob: from = 0x08120000, len = 64
[   31.084204] marvell-nfc pxa3xx-nand: 
[   31.084204] NDCR:  0x9d079fff
[   31.084204] NDCB0: 0x000d3000
[   31.084204] NDCB1: 0x02400000
[   31.084204] NDCB2: 0x00000001
[   31.084204] NDCB3: 0x00000000
[   31.103138] nand: nand_do_read_oob: from = 0x08140000, len = 64
[   31.109336] marvell-nfc pxa3xx-nand: 
[   31.109336] NDCR:  0x9d079fff
[   31.109336] NDCB0: 0x000d3000
[   31.109336] NDCB1: 0x02800000
[   31.109336] NDCB2: 0x00000001
[   31.109336] NDCB3: 0x00000000
[   31.128257] nand: nand_do_read_oob: from = 0x08160000, len = 64
[   31.134456] marvell-nfc pxa3xx-nand: 
[   31.134456] NDCR:  0x9d079fff
[   31.134456] NDCB0: 0x000d3000
[   31.134456] NDCB1: 0x02c00000
[   31.134456] NDCB2: 0x00000001
[   31.134456] NDCB3: 0x00000000
[   31.153388] nand: nand_do_read_oob: from = 0x08180000, len = 64
[   31.159590] marvell-nfc pxa3xx-nand: 
[   31.159590] NDCR:  0x9d079fff
[   31.159590] NDCB0: 0x000d3000
[   31.159590] NDCB1: 0x03000000
[   31.159590] NDCB2: 0x00000001
[   31.159590] NDCB3: 0x00000000
[   31.178511] nand: nand_do_read_oob: from = 0x081a0000, len = 64
[   31.184711] marvell-nfc pxa3xx-nand: 
[   31.184711] NDCR:  0x9d079fff
[   31.184711] NDCB0: 0x000d3000
[   31.184711] NDCB1: 0x03400000
[   31.184711] NDCB2: 0x00000001
[   31.184711] NDCB3: 0x00000000
[   31.203642] nand: nand_do_read_oob: from = 0x081c0000, len = 64
[   31.210027] marvell-nfc pxa3xx-nand: 
[   31.210027] NDCR:  0x9d079fff
[   31.210027] NDCB0: 0x000d3000
[   31.210027] NDCB1: 0x03800000
[   31.210027] NDCB2: 0x00000001
[   31.210027] NDCB3: 0x00000000
[   31.229051] nand: nand_do_read_oob: from = 0x081e0000, len = 64
[   31.235077] marvell-nfc pxa3xx-nand: 
[   31.235077] NDCR:  0x9d079fff
[   31.235077] NDCB0: 0x000d3000
[   31.235077] NDCB1: 0x03c00000
[   31.235077] NDCB2: 0x00000001
[   31.235077] NDCB3: 0x00000000
[   31.254015] nand: nand_do_read_oob: from = 0x08200000, len = 64
[   31.260215] marvell-nfc pxa3xx-nand: 
[   31.260215] NDCR:  0x9d079fff
[   31.260215] NDCB0: 0x000d3000
[   31.260215] NDCB1: 0x04000000
[   31.260215] NDCB2: 0x00000001
[   31.260215] NDCB3: 0x00000000
[   31.279136] nand: nand_do_read_oob: from = 0x08220000, len = 64
[   31.285169] marvell-nfc pxa3xx-nand: 
[   31.285169] NDCR:  0x9d079fff
[   31.285169] NDCB0: 0x000d3000
[   31.285169] NDCB1: 0x04400000
[   31.285169] NDCB2: 0x00000001
[   31.285169] NDCB3: 0x00000000
[   31.304103] nand: nand_do_read_oob: from = 0x08240000, len = 64
[   31.310308] marvell-nfc pxa3xx-nand: 
[   31.310308] NDCR:  0x9d079fff
[   31.310308] NDCB0: 0x000d3000
[   31.310308] NDCB1: 0x04800000
[   31.310308] NDCB2: 0x00000001
[   31.310308] NDCB3: 0x00000000
[   31.329239] nand: nand_do_read_oob: from = 0x08260000, len = 64
[   31.335267] marvell-nfc pxa3xx-nand: 
[   31.335267] NDCR:  0x9d079fff
[   31.335267] NDCB0: 0x000d3000
[   31.335267] NDCB1: 0x04c00000
[   31.335267] NDCB2: 0x00000001
[   31.335267] NDCB3: 0x00000000
[   31.354200] nand: nand_do_read_oob: from = 0x08280000, len = 64
[   31.360406] marvell-nfc pxa3xx-nand: 
[   31.360406] NDCR:  0x9d079fff
[   31.360406] NDCB0: 0x000d3000
[   31.360406] NDCB1: 0x05000000
[   31.360406] NDCB2: 0x00000001
[   31.360406] NDCB3: 0x00000000
[   31.379335] nand: nand_do_read_oob: from = 0x082a0000, len = 64
[   31.385365] marvell-nfc pxa3xx-nand: 
[   31.385365] NDCR:  0x9d079fff
[   31.385365] NDCB0: 0x000d3000
[   31.385365] NDCB1: 0x05400000
[   31.385365] NDCB2: 0x00000001
[   31.385365] NDCB3: 0x00000000
[   31.404300] nand: nand_do_read_oob: from = 0x082c0000, len = 64
[   31.410506] marvell-nfc pxa3xx-nand: 
[   31.410506] NDCR:  0x9d079fff
[   31.410506] NDCB0: 0x000d3000
[   31.410506] NDCB1: 0x05800000
[   31.410506] NDCB2: 0x00000001
[   31.410506] NDCB3: 0x00000000
[   31.429434] nand: nand_do_read_oob: from = 0x082e0000, len = 64
[   31.435464] marvell-nfc pxa3xx-nand: 
[   31.435464] NDCR:  0x9d079fff
[   31.435464] NDCB0: 0x000d3000
[   31.435464] NDCB1: 0x05c00000
[   31.435464] NDCB2: 0x00000001
[   31.435464] NDCB3: 0x00000000
[   31.454406] nand: nand_do_read_oob: from = 0x08300000, len = 64
[   31.460611] marvell-nfc pxa3xx-nand: 
[   31.460611] NDCR:  0x9d079fff
[   31.460611] NDCB0: 0x000d3000
[   31.460611] NDCB1: 0x06000000
[   31.460611] NDCB2: 0x00000001
[   31.460611] NDCB3: 0x00000000
[   31.479540] nand: nand_do_read_oob: from = 0x08320000, len = 64
[   31.485571] marvell-nfc pxa3xx-nand: 
[   31.485571] NDCR:  0x9d079fff
[   31.485571] NDCB0: 0x000d3000
[   31.485571] NDCB1: 0x06400000
[   31.485571] NDCB2: 0x00000001
[   31.485571] NDCB3: 0x00000000
[   31.504506] nand: nand_do_read_oob: from = 0x08340000, len = 64
[   31.510709] marvell-nfc pxa3xx-nand: 
[   31.510709] NDCR:  0x9d079fff
[   31.510709] NDCB0: 0x000d3000
[   31.510709] NDCB1: 0x06800000
[   31.510709] NDCB2: 0x00000001
[   31.510709] NDCB3: 0x00000000
[   31.529640] nand: nand_do_read_oob: from = 0x08360000, len = 64
[   31.535669] marvell-nfc pxa3xx-nand: 
[   31.535669] NDCR:  0x9d079fff
[   31.535669] NDCB0: 0x000d3000
[   31.535669] NDCB1: 0x06c00000
[   31.535669] NDCB2: 0x00000001
[   31.535669] NDCB3: 0x00000000
[   31.554628] nand: nand_do_read_oob: from = 0x08380000, len = 64
[   31.560835] marvell-nfc pxa3xx-nand: 
[   31.560835] NDCR:  0x9d079fff
[   31.560835] NDCB0: 0x000d3000
[   31.560835] NDCB1: 0x07000000
[   31.560835] NDCB2: 0x00000001
[   31.560835] NDCB3: 0x00000000
[   31.579763] nand: nand_do_read_oob: from = 0x083a0000, len = 64
[   31.585793] marvell-nfc pxa3xx-nand: 
[   31.585793] NDCR:  0x9d079fff
[   31.585793] NDCB0: 0x000d3000
[   31.585793] NDCB1: 0x07400000
[   31.585793] NDCB2: 0x00000001
[   31.585793] NDCB3: 0x00000000
[   31.604727] nand: nand_do_read_oob: from = 0x083c0000, len = 64
[   31.610934] marvell-nfc pxa3xx-nand: 
[   31.610934] NDCR:  0x9d079fff
[   31.610934] NDCB0: 0x000d3000
[   31.610934] NDCB1: 0x07800000
[   31.610934] NDCB2: 0x00000001
[   31.610934] NDCB3: 0x00000000
[   31.629862] nand: nand_do_read_oob: from = 0x083e0000, len = 64
[   31.635893] marvell-nfc pxa3xx-nand: 
[   31.635893] NDCR:  0x9d079fff
[   31.635893] NDCB0: 0x000d3000
[   31.635893] NDCB1: 0x07c00000
[   31.635893] NDCB2: 0x00000001
[   31.635893] NDCB3: 0x00000000
[   31.654828] nand: nand_do_read_oob: from = 0x08400000, len = 64
[   31.661031] marvell-nfc pxa3xx-nand: 
[   31.661031] NDCR:  0x9d079fff
[   31.661031] NDCB0: 0x000d3000
[   31.661031] NDCB1: 0x08000000
[   31.661031] NDCB2: 0x00000001
[   31.661031] NDCB3: 0x00000000
[   31.679962] nand: nand_do_read_oob: from = 0x08420000, len = 64
[   31.685992] marvell-nfc pxa3xx-nand: 
[   31.685992] NDCR:  0x9d079fff
[   31.685992] NDCB0: 0x000d3000
[   31.685992] NDCB1: 0x08400000
[   31.685992] NDCB2: 0x00000001
[   31.685992] NDCB3: 0x00000000
[   31.704925] nand: nand_do_read_oob: from = 0x08440000, len = 64
[   31.711130] marvell-nfc pxa3xx-nand: 
[   31.711130] NDCR:  0x9d079fff
[   31.711130] NDCB0: 0x000d3000
[   31.711130] NDCB1: 0x08800000
[   31.711130] NDCB2: 0x00000001
[   31.711130] NDCB3: 0x00000000
[   31.730058] nand: nand_do_read_oob: from = 0x08460000, len = 64
[   31.736090] marvell-nfc pxa3xx-nand: 
[   31.736090] NDCR:  0x9d079fff
[   31.736090] NDCB0: 0x000d3000
[   31.736090] NDCB1: 0x08c00000
[   31.736090] NDCB2: 0x00000001
[   31.736090] NDCB3: 0x00000000
[   31.755025] nand: nand_do_read_oob: from = 0x08480000, len = 64
[   31.761229] marvell-nfc pxa3xx-nand: 
[   31.761229] NDCR:  0x9d079fff
[   31.761229] NDCB0: 0x000d3000
[   31.761229] NDCB1: 0x09000000
[   31.761229] NDCB2: 0x00000001
[   31.761229] NDCB3: 0x00000000
[   31.780159] nand: nand_do_read_oob: from = 0x084a0000, len = 64
[   31.786189] marvell-nfc pxa3xx-nand: 
[   31.786189] NDCR:  0x9d079fff
[   31.786189] NDCB0: 0x000d3000
[   31.786189] NDCB1: 0x09400000
[   31.786189] NDCB2: 0x00000001
[   31.786189] NDCB3: 0x00000000
[   31.805120] nand: nand_do_read_oob: from = 0x084c0000, len = 64
[   31.811325] marvell-nfc pxa3xx-nand: 
[   31.811325] NDCR:  0x9d079fff
[   31.811325] NDCB0: 0x000d3000
[   31.811325] NDCB1: 0x09800000
[   31.811325] NDCB2: 0x00000001
[   31.811325] NDCB3: 0x00000000
[   31.830258] nand: nand_do_read_oob: from = 0x084e0000, len = 64
[   31.836287] marvell-nfc pxa3xx-nand: 
[   31.836287] NDCR:  0x9d079fff
[   31.836287] NDCB0: 0x000d3000
[   31.836287] NDCB1: 0x09c00000
[   31.836287] NDCB2: 0x00000001
[   31.836287] NDCB3: 0x00000000
[   31.855221] nand: nand_do_read_oob: from = 0x08500000, len = 64
[   31.861425] marvell-nfc pxa3xx-nand: 
[   31.861425] NDCR:  0x9d079fff
[   31.861425] NDCB0: 0x000d3000
[   31.861425] NDCB1: 0x0a000000
[   31.861425] NDCB2: 0x00000001
[   31.861425] NDCB3: 0x00000000
[   31.880356] nand: nand_do_read_oob: from = 0x08520000, len = 64
[   31.886384] marvell-nfc pxa3xx-nand: 
[   31.886384] NDCR:  0x9d079fff
[   31.886384] NDCB0: 0x000d3000
[   31.886384] NDCB1: 0x0a400000
[   31.886384] NDCB2: 0x00000001
[   31.886384] NDCB3: 0x00000000
[   31.905319] nand: nand_do_read_oob: from = 0x08540000, len = 64
[   31.911523] marvell-nfc pxa3xx-nand: 
[   31.911523] NDCR:  0x9d079fff
[   31.911523] NDCB0: 0x000d3000
[   31.911523] NDCB1: 0x0a800000
[   31.911523] NDCB2: 0x00000001
[   31.911523] NDCB3: 0x00000000
[   31.930451] nand: nand_do_read_oob: from = 0x08560000, len = 64
[   31.936483] marvell-nfc pxa3xx-nand: 
[   31.936483] NDCR:  0x9d079fff
[   31.936483] NDCB0: 0x000d3000
[   31.936483] NDCB1: 0x0ac00000
[   31.936483] NDCB2: 0x00000001
[   31.936483] NDCB3: 0x00000000
[   31.955416] nand: nand_do_read_oob: from = 0x08580000, len = 64
[   31.961620] marvell-nfc pxa3xx-nand: 
[   31.961620] NDCR:  0x9d079fff
[   31.961620] NDCB0: 0x000d3000
[   31.961620] NDCB1: 0x0b000000
[   31.961620] NDCB2: 0x00000001
[   31.961620] NDCB3: 0x00000000
[   31.980541] nand: nand_do_read_oob: from = 0x085a0000, len = 64
[   31.986575] marvell-nfc pxa3xx-nand: 
[   31.986575] NDCR:  0x9d079fff
[   31.986575] NDCB0: 0x000d3000
[   31.986575] NDCB1: 0x0b400000
[   31.986575] NDCB2: 0x00000001
[   31.986575] NDCB3: 0x00000000
[   32.005507] nand: nand_do_read_oob: from = 0x085c0000, len = 64
[   32.011723] marvell-nfc pxa3xx-nand: 
[   32.011723] NDCR:  0x9d079fff
[   32.011723] NDCB0: 0x000d3000
[   32.011723] NDCB1: 0x0b800000
[   32.011723] NDCB2: 0x00000001
[   32.011723] NDCB3: 0x00000000
[   32.030652] nand: nand_do_read_oob: from = 0x085e0000, len = 64
[   32.036680] marvell-nfc pxa3xx-nand: 
[   32.036680] NDCR:  0x9d079fff
[   32.036680] NDCB0: 0x000d3000
[   32.036680] NDCB1: 0x0bc00000
[   32.036680] NDCB2: 0x00000001
[   32.036680] NDCB3: 0x00000000
[   32.055615] nand: nand_do_read_oob: from = 0x08600000, len = 64
[   32.061819] marvell-nfc pxa3xx-nand: 
[   32.061819] NDCR:  0x9d079fff
[   32.061819] NDCB0: 0x000d3000
[   32.061819] NDCB1: 0x0c000000
[   32.061819] NDCB2: 0x00000001
[   32.061819] NDCB3: 0x00000000
[   32.080747] nand: nand_do_read_oob: from = 0x08620000, len = 64
[   32.086778] marvell-nfc pxa3xx-nand: 
[   32.086778] NDCR:  0x9d079fff
[   32.086778] NDCB0: 0x000d3000
[   32.086778] NDCB1: 0x0c400000
[   32.086778] NDCB2: 0x00000001
[   32.086778] NDCB3: 0x00000000
[   32.106146] nand: nand_do_read_oob: from = 0x08640000, len = 64
[   32.112385] marvell-nfc pxa3xx-nand: 
[   32.112385] NDCR:  0x9d079fff
[   32.112385] NDCB0: 0x000d3000
[   32.112385] NDCB1: 0x0c800000
[   32.112385] NDCB2: 0x00000001
[   32.112385] NDCB3: 0x00000000
[   32.131320] nand: nand_do_read_oob: from = 0x08660000, len = 64
[   32.137351] marvell-nfc pxa3xx-nand: 
[   32.137351] NDCR:  0x9d079fff
[   32.137351] NDCB0: 0x000d3000
[   32.137351] NDCB1: 0x0cc00000
[   32.137351] NDCB2: 0x00000001
[   32.137351] NDCB3: 0x00000000
[   32.156286] nand: nand_do_read_oob: from = 0x08680000, len = 64
[   32.162490] marvell-nfc pxa3xx-nand: 
[   32.162490] NDCR:  0x9d079fff
[   32.162490] NDCB0: 0x000d3000
[   32.162490] NDCB1: 0x0d000000
[   32.162490] NDCB2: 0x00000001
[   32.162490] NDCB3: 0x00000000
[   32.181420] nand: nand_do_read_oob: from = 0x086a0000, len = 64
[   32.187450] marvell-nfc pxa3xx-nand: 
[   32.187450] NDCR:  0x9d079fff
[   32.187450] NDCB0: 0x000d3000
[   32.187450] NDCB1: 0x0d400000
[   32.187450] NDCB2: 0x00000001
[   32.187450] NDCB3: 0x00000000
[   32.206405] nand: nand_do_read_oob: from = 0x086c0000, len = 64
[   32.212607] marvell-nfc pxa3xx-nand: 
[   32.212607] NDCR:  0x9d079fff
[   32.212607] NDCB0: 0x000d3000
[   32.212607] NDCB1: 0x0d800000
[   32.212607] NDCB2: 0x00000001
[   32.212607] NDCB3: 0x00000000
[   32.231534] nand: nand_do_read_oob: from = 0x086e0000, len = 64
[   32.237566] marvell-nfc pxa3xx-nand: 
[   32.237566] NDCR:  0x9d079fff
[   32.237566] NDCB0: 0x000d3000
[   32.237566] NDCB1: 0x0dc00000
[   32.237566] NDCB2: 0x00000001
[   32.237566] NDCB3: 0x00000000
[   32.256503] nand: nand_do_read_oob: from = 0x08700000, len = 64
[   32.262705] marvell-nfc pxa3xx-nand: 
[   32.262705] NDCR:  0x9d079fff
[   32.262705] NDCB0: 0x000d3000
[   32.262705] NDCB1: 0x0e000000
[   32.262705] NDCB2: 0x00000001
[   32.262705] NDCB3: 0x00000000
[   32.281635] nand: nand_do_read_oob: from = 0x08720000, len = 64
[   32.287665] marvell-nfc pxa3xx-nand: 
[   32.287665] NDCR:  0x9d079fff
[   32.287665] NDCB0: 0x000d3000
[   32.287665] NDCB1: 0x0e400000
[   32.287665] NDCB2: 0x00000001
[   32.287665] NDCB3: 0x00000000
[   32.306597] nand: nand_do_read_oob: from = 0x08740000, len = 64
[   32.312804] marvell-nfc pxa3xx-nand: 
[   32.312804] NDCR:  0x9d079fff
[   32.312804] NDCB0: 0x000d3000
[   32.312804] NDCB1: 0x0e800000
[   32.312804] NDCB2: 0x00000001
[   32.312804] NDCB3: 0x00000000
[   32.331734] nand: nand_do_read_oob: from = 0x08760000, len = 64
[   32.337762] marvell-nfc pxa3xx-nand: 
[   32.337762] NDCR:  0x9d079fff
[   32.337762] NDCB0: 0x000d3000
[   32.337762] NDCB1: 0x0ec00000
[   32.337762] NDCB2: 0x00000001
[   32.337762] NDCB3: 0x00000000
[   32.356700] nand: nand_do_read_oob: from = 0x08780000, len = 64
[   32.362900] marvell-nfc pxa3xx-nand: 
[   32.362900] NDCR:  0x9d079fff
[   32.362900] NDCB0: 0x000d3000
[   32.362900] NDCB1: 0x0f000000
[   32.362900] NDCB2: 0x00000001
[   32.362900] NDCB3: 0x00000000
[   32.381831] nand: nand_do_read_oob: from = 0x087a0000, len = 64
[   32.387860] marvell-nfc pxa3xx-nand: 
[   32.387860] NDCR:  0x9d079fff
[   32.387860] NDCB0: 0x000d3000
[   32.387860] NDCB1: 0x0f400000
[   32.387860] NDCB2: 0x00000001
[   32.387860] NDCB3: 0x00000000
[   32.406794] nand: nand_do_read_oob: from = 0x087c0000, len = 64
[   32.412999] marvell-nfc pxa3xx-nand: 
[   32.412999] NDCR:  0x9d079fff
[   32.412999] NDCB0: 0x000d3000
[   32.412999] NDCB1: 0x0f800000
[   32.412999] NDCB2: 0x00000001
[   32.412999] NDCB3: 0x00000000
[   32.431929] nand: nand_do_read_oob: from = 0x087e0000, len = 64
[   32.437959] marvell-nfc pxa3xx-nand: 
[   32.437959] NDCR:  0x9d079fff
[   32.437959] NDCB0: 0x000d3000
[   32.437959] NDCB1: 0x0fc00000
[   32.437959] NDCB2: 0x00000001
[   32.437959] NDCB3: 0x00000000
[   32.456892] nand: nand_do_read_oob: from = 0x08800000, len = 64
[   32.463097] marvell-nfc pxa3xx-nand: 
[   32.463097] NDCR:  0x9d079fff
[   32.463097] NDCB0: 0x000d3000
[   32.463097] NDCB1: 0x10000000
[   32.463097] NDCB2: 0x00000001
[   32.463097] NDCB3: 0x00000000
[   32.482027] nand: nand_do_read_oob: from = 0x08820000, len = 64
[   32.488057] marvell-nfc pxa3xx-nand: 
[   32.488057] NDCR:  0x9d079fff
[   32.488057] NDCB0: 0x000d3000
[   32.488057] NDCB1: 0x10400000
[   32.488057] NDCB2: 0x00000001
[   32.488057] NDCB3: 0x00000000
[   32.506990] nand: nand_do_read_oob: from = 0x08840000, len = 64
[   32.513196] marvell-nfc pxa3xx-nand: 
[   32.513196] NDCR:  0x9d079fff
[   32.513196] NDCB0: 0x000d3000
[   32.513196] NDCB1: 0x10800000
[   32.513196] NDCB2: 0x00000001
[   32.513196] NDCB3: 0x00000000
[   32.532126] nand: nand_do_read_oob: from = 0x08860000, len = 64
[   32.538157] marvell-nfc pxa3xx-nand: 
[   32.538157] NDCR:  0x9d079fff
[   32.538157] NDCB0: 0x000d3000
[   32.538157] NDCB1: 0x10c00000
[   32.538157] NDCB2: 0x00000001
[   32.538157] NDCB3: 0x00000000
[   32.557089] nand: nand_do_read_oob: from = 0x08880000, len = 64
[   32.563296] marvell-nfc pxa3xx-nand: 
[   32.563296] NDCR:  0x9d079fff
[   32.563296] NDCB0: 0x000d3000
[   32.563296] NDCB1: 0x11000000
[   32.563296] NDCB2: 0x00000001
[   32.563296] NDCB3: 0x00000000
[   32.582223] nand: nand_do_read_oob: from = 0x088a0000, len = 64
[   32.588256] marvell-nfc pxa3xx-nand: 
[   32.588256] NDCR:  0x9d079fff
[   32.588256] NDCB0: 0x000d3000
[   32.588256] NDCB1: 0x11400000
[   32.588256] NDCB2: 0x00000001
[   32.588256] NDCB3: 0x00000000
[   32.607188] nand: nand_do_read_oob: from = 0x088c0000, len = 64
[   32.613393] marvell-nfc pxa3xx-nand: 
[   32.613393] NDCR:  0x9d079fff
[   32.613393] NDCB0: 0x000d3000
[   32.613393] NDCB1: 0x11800000
[   32.613393] NDCB2: 0x00000001
[   32.613393] NDCB3: 0x00000000
[   32.632322] nand: nand_do_read_oob: from = 0x088e0000, len = 64
[   32.638353] marvell-nfc pxa3xx-nand: 
[   32.638353] NDCR:  0x9d079fff
[   32.638353] NDCB0: 0x000d3000
[   32.638353] NDCB1: 0x11c00000
[   32.638353] NDCB2: 0x00000001
[   32.638353] NDCB3: 0x00000000
[   32.657286] nand: nand_do_read_oob: from = 0x08900000, len = 64
[   32.663491] marvell-nfc pxa3xx-nand: 
[   32.663491] NDCR:  0x9d079fff
[   32.663491] NDCB0: 0x000d3000
[   32.663491] NDCB1: 0x12000000
[   32.663491] NDCB2: 0x00000001
[   32.663491] NDCB3: 0x00000000
[   32.682418] nand: nand_do_read_oob: from = 0x08920000, len = 64
[   32.688451] marvell-nfc pxa3xx-nand: 
[   32.688451] NDCR:  0x9d079fff
[   32.688451] NDCB0: 0x000d3000
[   32.688451] NDCB1: 0x12400000
[   32.688451] NDCB2: 0x00000001
[   32.688451] NDCB3: 0x00000000
[   32.707383] nand: nand_do_read_oob: from = 0x08940000, len = 64
[   32.713581] marvell-nfc pxa3xx-nand: 
[   32.713581] NDCR:  0x9d079fff
[   32.713581] NDCB0: 0x000d3000
[   32.713581] NDCB1: 0x12800000
[   32.713581] NDCB2: 0x00000001
[   32.713581] NDCB3: 0x00000000
[   32.732510] nand: nand_do_read_oob: from = 0x08960000, len = 64
[   32.738543] marvell-nfc pxa3xx-nand: 
[   32.738543] NDCR:  0x9d079fff
[   32.738543] NDCB0: 0x000d3000
[   32.738543] NDCB1: 0x12c00000
[   32.738543] NDCB2: 0x00000001
[   32.738543] NDCB3: 0x00000000
[   32.757474] nand: nand_do_read_oob: from = 0x08980000, len = 64
[   32.763681] marvell-nfc pxa3xx-nand: 
[   32.763681] NDCR:  0x9d079fff
[   32.763681] NDCB0: 0x000d3000
[   32.763681] NDCB1: 0x13000000
[   32.763681] NDCB2: 0x00000001
[   32.763681] NDCB3: 0x00000000
[   32.782609] nand: nand_do_read_oob: from = 0x089a0000, len = 64
[   32.788814] marvell-nfc pxa3xx-nand: 
[   32.788814] NDCR:  0x9d079fff
[   32.788814] NDCB0: 0x000d3000
[   32.788814] NDCB1: 0x13400000
[   32.788814] NDCB2: 0x00000001
[   32.788814] NDCB3: 0x00000000
[   32.807719] nand: nand_do_read_oob: from = 0x089c0000, len = 64
[   32.813926] marvell-nfc pxa3xx-nand: 
[   32.813926] NDCR:  0x9d079fff
[   32.813926] NDCB0: 0x000d3000
[   32.813926] NDCB1: 0x13800000
[   32.813926] NDCB2: 0x00000001
[   32.813926] NDCB3: 0x00000000
[   32.832870] nand: nand_do_read_oob: from = 0x089e0000, len = 64
[   32.839074] marvell-nfc pxa3xx-nand: 
[   32.839074] NDCR:  0x9d079fff
[   32.839074] NDCB0: 0x000d3000
[   32.839074] NDCB1: 0x13c00000
[   32.839074] NDCB2: 0x00000001
[   32.839074] NDCB3: 0x00000000
[   32.857994] nand: nand_do_read_oob: from = 0x08a00000, len = 64
[   32.864195] marvell-nfc pxa3xx-nand: 
[   32.864195] NDCR:  0x9d079fff
[   32.864195] NDCB0: 0x000d3000
[   32.864195] NDCB1: 0x14000000
[   32.864195] NDCB2: 0x00000001
[   32.864195] NDCB3: 0x00000000
[   32.883123] nand: nand_do_read_oob: from = 0x08a20000, len = 64
[   32.889325] marvell-nfc pxa3xx-nand: 
[   32.889325] NDCR:  0x9d079fff
[   32.889325] NDCB0: 0x000d3000
[   32.889325] NDCB1: 0x14400000
[   32.889325] NDCB2: 0x00000001
[   32.889325] NDCB3: 0x00000000
[   32.908245] nand: nand_do_read_oob: from = 0x08a40000, len = 64
[   32.914448] marvell-nfc pxa3xx-nand: 
[   32.914448] NDCR:  0x9d079fff
[   32.914448] NDCB0: 0x000d3000
[   32.914448] NDCB1: 0x14800000
[   32.914448] NDCB2: 0x00000001
[   32.914448] NDCB3: 0x00000000
[   32.933376] nand: nand_do_read_oob: from = 0x08a60000, len = 64
[   32.939580] marvell-nfc pxa3xx-nand: 
[   32.939580] NDCR:  0x9d079fff
[   32.939580] NDCB0: 0x000d3000
[   32.939580] NDCB1: 0x14c00000
[   32.939580] NDCB2: 0x00000001
[   32.939580] NDCB3: 0x00000000
[   32.958499] nand: nand_do_read_oob: from = 0x08a80000, len = 64
[   32.964701] marvell-nfc pxa3xx-nand: 
[   32.964701] NDCR:  0x9d079fff
[   32.964701] NDCB0: 0x000d3000
[   32.964701] NDCB1: 0x15000000
[   32.964701] NDCB2: 0x00000001
[   32.964701] NDCB3: 0x00000000
[   32.983631] nand: nand_do_read_oob: from = 0x08aa0000, len = 64
[   32.989833] marvell-nfc pxa3xx-nand: 
[   32.989833] NDCR:  0x9d079fff
[   32.989833] NDCB0: 0x000d3000
[   32.989833] NDCB1: 0x15400000
[   32.989833] NDCB2: 0x00000001
[   32.989833] NDCB3: 0x00000000
[   33.008852] nand: nand_do_read_oob: from = 0x08ac0000, len = 64
[   33.014885] marvell-nfc pxa3xx-nand: 
[   33.014885] NDCR:  0x9d079fff
[   33.014885] NDCB0: 0x000d3000
[   33.014885] NDCB1: 0x15800000
[   33.014885] NDCB2: 0x00000001
[   33.014885] NDCB3: 0x00000000
[   33.033814] nand: nand_do_read_oob: from = 0x08ae0000, len = 64
[   33.040021] marvell-nfc pxa3xx-nand: 
[   33.040021] NDCR:  0x9d079fff
[   33.040021] NDCB0: 0x000d3000
[   33.040021] NDCB1: 0x15c00000
[   33.040021] NDCB2: 0x00000001
[   33.040021] NDCB3: 0x00000000
[   33.059139] nand: nand_do_read_oob: from = 0x08b00000, len = 64
[   33.065180] marvell-nfc pxa3xx-nand: 
[   33.065180] NDCR:  0x9d079fff
[   33.065180] NDCB0: 0x000d3000
[   33.065180] NDCB1: 0x16000000
[   33.065180] NDCB2: 0x00000001
[   33.065180] NDCB3: 0x00000000
[   33.084130] nand: nand_do_read_oob: from = 0x08b20000, len = 64
[   33.090334] marvell-nfc pxa3xx-nand: 
[   33.090334] NDCR:  0x9d079fff
[   33.090334] NDCB0: 0x000d3000
[   33.090334] NDCB1: 0x16400000
[   33.090334] NDCB2: 0x00000001
[   33.090334] NDCB3: 0x00000000
[   33.109260] nand: nand_do_read_oob: from = 0x08b40000, len = 64
[   33.115293] marvell-nfc pxa3xx-nand: 
[   33.115293] NDCR:  0x9d079fff
[   33.115293] NDCB0: 0x000d3000
[   33.115293] NDCB1: 0x16800000
[   33.115293] NDCB2: 0x00000001
[   33.115293] NDCB3: 0x00000000
[   33.134226] nand: nand_do_read_oob: from = 0x08b60000, len = 64
[   33.140431] marvell-nfc pxa3xx-nand: 
[   33.140431] NDCR:  0x9d079fff
[   33.140431] NDCB0: 0x000d3000
[   33.140431] NDCB1: 0x16c00000
[   33.140431] NDCB2: 0x00000001
[   33.140431] NDCB3: 0x00000000
[   33.159357] nand: nand_do_read_oob: from = 0x08b80000, len = 64
[   33.165393] marvell-nfc pxa3xx-nand: 
[   33.165393] NDCR:  0x9d079fff
[   33.165393] NDCB0: 0x000d3000
[   33.165393] NDCB1: 0x17000000
[   33.165393] NDCB2: 0x00000001
[   33.165393] NDCB3: 0x00000000
[   33.184323] nand: nand_do_read_oob: from = 0x08ba0000, len = 64
[   33.190529] marvell-nfc pxa3xx-nand: 
[   33.190529] NDCR:  0x9d079fff
[   33.190529] NDCB0: 0x000d3000
[   33.190529] NDCB1: 0x17400000
[   33.190529] NDCB2: 0x00000001
[   33.190529] NDCB3: 0x00000000
[   33.209457] nand: nand_do_read_oob: from = 0x08bc0000, len = 64
[   33.215489] marvell-nfc pxa3xx-nand: 
[   33.215489] NDCR:  0x9d079fff
[   33.215489] NDCB0: 0x000d3000
[   33.215489] NDCB1: 0x17800000
[   33.215489] NDCB2: 0x00000001
[   33.215489] NDCB3: 0x00000000
[   33.234423] nand: nand_do_read_oob: from = 0x08be0000, len = 64
[   33.240628] marvell-nfc pxa3xx-nand: 
[   33.240628] NDCR:  0x9d079fff
[   33.240628] NDCB0: 0x000d3000
[   33.240628] NDCB1: 0x17c00000
[   33.240628] NDCB2: 0x00000001
[   33.240628] NDCB3: 0x00000000
[   33.259556] nand: nand_do_read_oob: from = 0x08c00000, len = 64
[   33.265587] marvell-nfc pxa3xx-nand: 
[   33.265587] NDCR:  0x9d079fff
[   33.265587] NDCB0: 0x000d3000
[   33.265587] NDCB1: 0x18000000
[   33.265587] NDCB2: 0x00000001
[   33.265587] NDCB3: 0x00000000
[   33.284521] nand: nand_do_read_oob: from = 0x08c20000, len = 64
[   33.290727] marvell-nfc pxa3xx-nand: 
[   33.290727] NDCR:  0x9d079fff
[   33.290727] NDCB0: 0x000d3000
[   33.290727] NDCB1: 0x18400000
[   33.290727] NDCB2: 0x00000001
[   33.290727] NDCB3: 0x00000000
[   33.309653] nand: nand_do_read_oob: from = 0x08c40000, len = 64
[   33.315686] marvell-nfc pxa3xx-nand: 
[   33.315686] NDCR:  0x9d079fff
[   33.315686] NDCB0: 0x000d3000
[   33.315686] NDCB1: 0x18800000
[   33.315686] NDCB2: 0x00000001
[   33.315686] NDCB3: 0x00000000
[   33.334618] nand: nand_do_read_oob: from = 0x08c60000, len = 64
[   33.340825] marvell-nfc pxa3xx-nand: 
[   33.340825] NDCR:  0x9d079fff
[   33.340825] NDCB0: 0x000d3000
[   33.340825] NDCB1: 0x18c00000
[   33.340825] NDCB2: 0x00000001
[   33.340825] NDCB3: 0x00000000
[   33.359752] nand: nand_do_read_oob: from = 0x08c80000, len = 64
[   33.365785] marvell-nfc pxa3xx-nand: 
[   33.365785] NDCR:  0x9d079fff
[   33.365785] NDCB0: 0x000d3000
[   33.365785] NDCB1: 0x19000000
[   33.365785] NDCB2: 0x00000001
[   33.365785] NDCB3: 0x00000000
[   33.384714] nand: nand_do_read_oob: from = 0x08ca0000, len = 64
[   33.390914] marvell-nfc pxa3xx-nand: 
[   33.390914] NDCR:  0x9d079fff
[   33.390914] NDCB0: 0x000d3000
[   33.390914] NDCB1: 0x19400000
[   33.390914] NDCB2: 0x00000001
[   33.390914] NDCB3: 0x00000000
[   33.409864] nand: nand_do_read_oob: from = 0x08cc0000, len = 64
[   33.415892] marvell-nfc pxa3xx-nand: 
[   33.415892] NDCR:  0x9d079fff
[   33.415892] NDCB0: 0x000d3000
[   33.415892] NDCB1: 0x19800000
[   33.415892] NDCB2: 0x00000001
[   33.415892] NDCB3: 0x00000000
[   33.434822] nand: nand_do_read_oob: from = 0x08ce0000, len = 64
[   33.441022] marvell-nfc pxa3xx-nand: 
[   33.441022] NDCR:  0x9d079fff
[   33.441022] NDCB0: 0x000d3000
[   33.441022] NDCB1: 0x19c00000
[   33.441022] NDCB2: 0x00000001
[   33.441022] NDCB3: 0x00000000
[   33.459949] nand: nand_do_read_oob: from = 0x08d00000, len = 64
[   33.465981] marvell-nfc pxa3xx-nand: 
[   33.465981] NDCR:  0x9d079fff
[   33.465981] NDCB0: 0x000d3000
[   33.465981] NDCB1: 0x1a000000
[   33.465981] NDCB2: 0x00000001
[   33.465981] NDCB3: 0x00000000
[   33.484914] nand: nand_do_read_oob: from = 0x08d20000, len = 64
[   33.491119] marvell-nfc pxa3xx-nand: 
[   33.491119] NDCR:  0x9d079fff
[   33.491119] NDCB0: 0x000d3000
[   33.491119] NDCB1: 0x1a400000
[   33.491119] NDCB2: 0x00000001
[   33.491119] NDCB3: 0x00000000
[   33.510047] nand: nand_do_read_oob: from = 0x08d40000, len = 64
[   33.516081] marvell-nfc pxa3xx-nand: 
[   33.516081] NDCR:  0x9d079fff
[   33.516081] NDCB0: 0x000d3000
[   33.516081] NDCB1: 0x1a800000
[   33.516081] NDCB2: 0x00000001
[   33.516081] NDCB3: 0x00000000
[   33.535011] nand: nand_do_read_oob: from = 0x08d60000, len = 64
[   33.541219] marvell-nfc pxa3xx-nand: 
[   33.541219] NDCR:  0x9d079fff
[   33.541219] NDCB0: 0x000d3000
[   33.541219] NDCB1: 0x1ac00000
[   33.541219] NDCB2: 0x00000001
[   33.541219] NDCB3: 0x00000000
[   33.560144] nand: nand_do_read_oob: from = 0x08d80000, len = 64
[   33.566179] marvell-nfc pxa3xx-nand: 
[   33.566179] NDCR:  0x9d079fff
[   33.566179] NDCB0: 0x000d3000
[   33.566179] NDCB1: 0x1b000000
[   33.566179] NDCB2: 0x00000001
[   33.566179] NDCB3: 0x00000000
[   33.585109] nand: nand_do_read_oob: from = 0x08da0000, len = 64
[   33.591310] marvell-nfc pxa3xx-nand: 
[   33.591310] NDCR:  0x9d079fff
[   33.591310] NDCB0: 0x000d3000
[   33.591310] NDCB1: 0x1b400000
[   33.591310] NDCB2: 0x00000001
[   33.591310] NDCB3: 0x00000000
[   33.610236] nand: nand_do_read_oob: from = 0x08dc0000, len = 64
[   33.616269] marvell-nfc pxa3xx-nand: 
[   33.616269] NDCR:  0x9d079fff
[   33.616269] NDCB0: 0x000d3000
[   33.616269] NDCB1: 0x1b800000
[   33.616269] NDCB2: 0x00000001
[   33.616269] NDCB3: 0x00000000
[   33.635198] nand: nand_do_read_oob: from = 0x08de0000, len = 64
[   33.641395] marvell-nfc pxa3xx-nand: 
[   33.641395] NDCR:  0x9d079fff
[   33.641395] NDCB0: 0x000d3000
[   33.641395] NDCB1: 0x1bc00000
[   33.641395] NDCB2: 0x00000001
[   33.641395] NDCB3: 0x00000000
[   33.660317] nand: nand_do_read_oob: from = 0x08e00000, len = 64
[   33.666350] marvell-nfc pxa3xx-nand: 
[   33.666350] NDCR:  0x9d079fff
[   33.666350] NDCB0: 0x000d3000
[   33.666350] NDCB1: 0x1c000000
[   33.666350] NDCB2: 0x00000001
[   33.666350] NDCB3: 0x00000000
[   33.685280] nand: nand_do_read_oob: from = 0x08e20000, len = 64
[   33.691480] marvell-nfc pxa3xx-nand: 
[   33.691480] NDCR:  0x9d079fff
[   33.691480] NDCB0: 0x000d3000
[   33.691480] NDCB1: 0x1c400000
[   33.691480] NDCB2: 0x00000001
[   33.691480] NDCB3: 0x00000000
[   33.710406] nand: nand_do_read_oob: from = 0x08e40000, len = 64
[   33.716441] marvell-nfc pxa3xx-nand: 
[   33.716441] NDCR:  0x9d079fff
[   33.716441] NDCB0: 0x000d3000
[   33.716441] NDCB1: 0x1c800000
[   33.716441] NDCB2: 0x00000001
[   33.716441] NDCB3: 0x00000000
[   33.735371] nand: nand_do_read_oob: from = 0x08e60000, len = 64
[   33.741567] marvell-nfc pxa3xx-nand: 
[   33.741567] NDCR:  0x9d079fff
[   33.741567] NDCB0: 0x000d3000
[   33.741567] NDCB1: 0x1cc00000
[   33.741567] NDCB2: 0x00000001
[   33.741567] NDCB3: 0x00000000
[   33.760498] nand: nand_do_read_oob: from = 0x08e80000, len = 64
[   33.766528] marvell-nfc pxa3xx-nand: 
[   33.766528] NDCR:  0x9d079fff
[   33.766528] NDCB0: 0x000d3000
[   33.766528] NDCB1: 0x1d000000
[   33.766528] NDCB2: 0x00000001
[   33.766528] NDCB3: 0x00000000
[   33.785461] nand: nand_do_read_oob: from = 0x08ea0000, len = 64
[   33.791669] marvell-nfc pxa3xx-nand: 
[   33.791669] NDCR:  0x9d079fff
[   33.791669] NDCB0: 0x000d3000
[   33.791669] NDCB1: 0x1d400000
[   33.791669] NDCB2: 0x00000001
[   33.791669] NDCB3: 0x00000000
[   33.810595] nand: nand_do_read_oob: from = 0x08ec0000, len = 64
[   33.816628] marvell-nfc pxa3xx-nand: 
[   33.816628] NDCR:  0x9d079fff
[   33.816628] NDCB0: 0x000d3000
[   33.816628] NDCB1: 0x1d800000
[   33.816628] NDCB2: 0x00000001
[   33.816628] NDCB3: 0x00000000
[   33.835559] nand: nand_do_read_oob: from = 0x08ee0000, len = 64
[   33.841767] marvell-nfc pxa3xx-nand: 
[   33.841767] NDCR:  0x9d079fff
[   33.841767] NDCB0: 0x000d3000
[   33.841767] NDCB1: 0x1dc00000
[   33.841767] NDCB2: 0x00000001
[   33.841767] NDCB3: 0x00000000
[   33.860697] nand: nand_do_read_oob: from = 0x08f00000, len = 64
[   33.866727] marvell-nfc pxa3xx-nand: 
[   33.866727] NDCR:  0x9d079fff
[   33.866727] NDCB0: 0x000d3000
[   33.866727] NDCB1: 0x1e000000
[   33.866727] NDCB2: 0x00000001
[   33.866727] NDCB3: 0x00000000
[   33.885660] nand: nand_do_read_oob: from = 0x08f20000, len = 64
[   33.891866] marvell-nfc pxa3xx-nand: 
[   33.891866] NDCR:  0x9d079fff
[   33.891866] NDCB0: 0x000d3000
[   33.891866] NDCB1: 0x1e400000
[   33.891866] NDCB2: 0x00000001
[   33.891866] NDCB3: 0x00000000
[   33.910793] nand: nand_do_read_oob: from = 0x08f40000, len = 64
[   33.916827] marvell-nfc pxa3xx-nand: 
[   33.916827] NDCR:  0x9d079fff
[   33.916827] NDCB0: 0x000d3000
[   33.916827] NDCB1: 0x1e800000
[   33.916827] NDCB2: 0x00000001
[   33.916827] NDCB3: 0x00000000
[   33.935755] nand: nand_do_read_oob: from = 0x08f60000, len = 64
[   33.941955] marvell-nfc pxa3xx-nand: 
[   33.941955] NDCR:  0x9d079fff
[   33.941955] NDCB0: 0x000d3000
[   33.941955] NDCB1: 0x1ec00000
[   33.941955] NDCB2: 0x00000001
[   33.941955] NDCB3: 0x00000000
[   33.960883] nand: nand_do_read_oob: from = 0x08f80000, len = 64
[   33.966914] marvell-nfc pxa3xx-nand: 
[   33.966914] NDCR:  0x9d079fff
[   33.966914] NDCB0: 0x000d3000
[   33.966914] NDCB1: 0x1f000000
[   33.966914] NDCB2: 0x00000001
[   33.966914] NDCB3: 0x00000000
[   33.985845] nand: nand_do_read_oob: from = 0x08fa0000, len = 64
[   33.992043] marvell-nfc pxa3xx-nand: 
[   33.992043] NDCR:  0x9d079fff
[   33.992043] NDCB0: 0x000d3000
[   33.992043] NDCB1: 0x1f400000
[   33.992043] NDCB2: 0x00000001
[   33.992043] NDCB3: 0x00000000
[   34.010983] nand: nand_do_read_oob: from = 0x08fc0000, len = 64
[   34.017014] marvell-nfc pxa3xx-nand: 
[   34.017014] NDCR:  0x9d079fff
[   34.017014] NDCB0: 0x000d3000
[   34.017014] NDCB1: 0x1f800000
[   34.017014] NDCB2: 0x00000001
[   34.017014] NDCB3: 0x00000000
[   34.035945] nand: nand_do_read_oob: from = 0x08fe0000, len = 64
[   34.042153] marvell-nfc pxa3xx-nand: 
[   34.042153] NDCR:  0x9d079fff
[   34.042153] NDCB0: 0x000d3000
[   34.042153] NDCB1: 0x1fc00000
[   34.042153] NDCB2: 0x00000001
[   34.042153] NDCB3: 0x00000000
[   34.061101] nand: nand_do_read_oob: from = 0x09000000, len = 64
[   34.067138] marvell-nfc pxa3xx-nand: 
[   34.067138] NDCR:  0x9d079fff
[   34.067138] NDCB0: 0x000d3000
[   34.067138] NDCB1: 0x20000000
[   34.067138] NDCB2: 0x00000001
[   34.067138] NDCB3: 0x00000000
[   34.086073] nand: nand_do_read_oob: from = 0x09020000, len = 64
[   34.092563] marvell-nfc pxa3xx-nand: 
[   34.092563] NDCR:  0x9d079fff
[   34.092563] NDCB0: 0x000d3000
[   34.092563] NDCB1: 0x20400000
[   34.092563] NDCB2: 0x00000001
[   34.092563] NDCB3: 0x00000000
[   34.111561] nand: nand_do_read_oob: from = 0x09040000, len = 64
[   34.117591] marvell-nfc pxa3xx-nand: 
[   34.117591] NDCR:  0x9d079fff
[   34.117591] NDCB0: 0x000d3000
[   34.117591] NDCB1: 0x20800000
[   34.117591] NDCB2: 0x00000001
[   34.117591] NDCB3: 0x00000000
[   34.136523] nand: nand_do_read_oob: from = 0x09060000, len = 64
[   34.142727] marvell-nfc pxa3xx-nand: 
[   34.142727] NDCR:  0x9d079fff
[   34.142727] NDCB0: 0x000d3000
[   34.142727] NDCB1: 0x20c00000
[   34.142727] NDCB2: 0x00000001
[   34.142727] NDCB3: 0x00000000
[   34.161657] nand: nand_do_read_oob: from = 0x09080000, len = 64
[   34.167691] marvell-nfc pxa3xx-nand: 
[   34.167691] NDCR:  0x9d079fff
[   34.167691] NDCB0: 0x000d3000
[   34.167691] NDCB1: 0x21000000
[   34.167691] NDCB2: 0x00000001
[   34.167691] NDCB3: 0x00000000
[   34.186632] nand: nand_do_read_oob: from = 0x090a0000, len = 64
[   34.192836] marvell-nfc pxa3xx-nand: 
[   34.192836] NDCR:  0x9d079fff
[   34.192836] NDCB0: 0x000d3000
[   34.192836] NDCB1: 0x21400000
[   34.192836] NDCB2: 0x00000001
[   34.192836] NDCB3: 0x00000000
[   34.211766] nand: nand_do_read_oob: from = 0x090c0000, len = 64
[   34.217794] marvell-nfc pxa3xx-nand: 
[   34.217794] NDCR:  0x9d079fff
[   34.217794] NDCB0: 0x000d3000
[   34.217794] NDCB1: 0x21800000
[   34.217794] NDCB2: 0x00000001
[   34.217794] NDCB3: 0x00000000
[   34.236728] nand: nand_do_read_oob: from = 0x090e0000, len = 64
[   34.242933] marvell-nfc pxa3xx-nand: 
[   34.242933] NDCR:  0x9d079fff
[   34.242933] NDCB0: 0x000d3000
[   34.242933] NDCB1: 0x21c00000
[   34.242933] NDCB2: 0x00000001
[   34.242933] NDCB3: 0x00000000
[   34.261864] nand: nand_do_read_oob: from = 0x09100000, len = 64
[   34.267892] marvell-nfc pxa3xx-nand: 
[   34.267892] NDCR:  0x9d079fff
[   34.267892] NDCB0: 0x000d3000
[   34.267892] NDCB1: 0x22000000
[   34.267892] NDCB2: 0x00000001
[   34.267892] NDCB3: 0x00000000
[   34.286828] nand: nand_do_read_oob: from = 0x09120000, len = 64
[   34.293031] marvell-nfc pxa3xx-nand: 
[   34.293031] NDCR:  0x9d079fff
[   34.293031] NDCB0: 0x000d3000
[   34.293031] NDCB1: 0x22400000
[   34.293031] NDCB2: 0x00000001
[   34.293031] NDCB3: 0x00000000
[   34.311960] nand: nand_do_read_oob: from = 0x09140000, len = 64
[   34.317992] marvell-nfc pxa3xx-nand: 
[   34.317992] NDCR:  0x9d079fff
[   34.317992] NDCB0: 0x000d3000
[   34.317992] NDCB1: 0x22800000
[   34.317992] NDCB2: 0x00000001
[   34.317992] NDCB3: 0x00000000
[   34.336926] nand: nand_do_read_oob: from = 0x09160000, len = 64
[   34.343129] marvell-nfc pxa3xx-nand: 
[   34.343129] NDCR:  0x9d079fff
[   34.343129] NDCB0: 0x000d3000
[   34.343129] NDCB1: 0x22c00000
[   34.343129] NDCB2: 0x00000001
[   34.343129] NDCB3: 0x00000000
[   34.362057] nand: nand_do_read_oob: from = 0x09180000, len = 64
[   34.368089] marvell-nfc pxa3xx-nand: 
[   34.368089] NDCR:  0x9d079fff
[   34.368089] NDCB0: 0x000d3000
[   34.368089] NDCB1: 0x23000000
[   34.368089] NDCB2: 0x00000001
[   34.368089] NDCB3: 0x00000000
[   34.387023] nand: nand_do_read_oob: from = 0x091a0000, len = 64
[   34.393227] marvell-nfc pxa3xx-nand: 
[   34.393227] NDCR:  0x9d079fff
[   34.393227] NDCB0: 0x000d3000
[   34.393227] NDCB1: 0x23400000
[   34.393227] NDCB2: 0x00000001
[   34.393227] NDCB3: 0x00000000
[   34.412160] nand: nand_do_read_oob: from = 0x091c0000, len = 64
[   34.418187] marvell-nfc pxa3xx-nand: 
[   34.418187] NDCR:  0x9d079fff
[   34.418187] NDCB0: 0x000d3000
[   34.418187] NDCB1: 0x23800000
[   34.418187] NDCB2: 0x00000001
[   34.418187] NDCB3: 0x00000000
[   34.437121] nand: nand_do_read_oob: from = 0x091e0000, len = 64
[   34.443326] marvell-nfc pxa3xx-nand: 
[   34.443326] NDCR:  0x9d079fff
[   34.443326] NDCB0: 0x000d3000
[   34.443326] NDCB1: 0x23c00000
[   34.443326] NDCB2: 0x00000001
[   34.443326] NDCB3: 0x00000000
[   34.462258] nand: nand_do_read_oob: from = 0x09200000, len = 64
[   34.468286] marvell-nfc pxa3xx-nand: 
[   34.468286] NDCR:  0x9d079fff
[   34.468286] NDCB0: 0x000d3000
[   34.468286] NDCB1: 0x24000000
[   34.468286] NDCB2: 0x00000001
[   34.468286] NDCB3: 0x00000000
[   34.487219] nand: nand_do_read_oob: from = 0x09220000, len = 64
[   34.493425] marvell-nfc pxa3xx-nand: 
[   34.493425] NDCR:  0x9d079fff
[   34.493425] NDCB0: 0x000d3000
[   34.493425] NDCB1: 0x24400000
[   34.493425] NDCB2: 0x00000001
[   34.493425] NDCB3: 0x00000000
[   34.512356] nand: nand_do_read_oob: from = 0x09240000, len = 64
[   34.518384] marvell-nfc pxa3xx-nand: 
[   34.518384] NDCR:  0x9d079fff
[   34.518384] NDCB0: 0x000d3000
[   34.518384] NDCB1: 0x24800000
[   34.518384] NDCB2: 0x00000001
[   34.518384] NDCB3: 0x00000000
[   34.537317] nand: nand_do_read_oob: from = 0x09260000, len = 64
[   34.543522] marvell-nfc pxa3xx-nand: 
[   34.543522] NDCR:  0x9d079fff
[   34.543522] NDCB0: 0x000d3000
[   34.543522] NDCB1: 0x24c00000
[   34.543522] NDCB2: 0x00000001
[   34.543522] NDCB3: 0x00000000
[   34.562454] nand: nand_do_read_oob: from = 0x09280000, len = 64
[   34.568484] marvell-nfc pxa3xx-nand: 
[   34.568484] NDCR:  0x9d079fff
[   34.568484] NDCB0: 0x000d3000
[   34.568484] NDCB1: 0x25000000
[   34.568484] NDCB2: 0x00000001
[   34.568484] NDCB3: 0x00000000
[   34.587416] nand: nand_do_read_oob: from = 0x092a0000, len = 64
[   34.593623] marvell-nfc pxa3xx-nand: 
[   34.593623] NDCR:  0x9d079fff
[   34.593623] NDCB0: 0x000d3000
[   34.593623] NDCB1: 0x25400000
[   34.593623] NDCB2: 0x00000001
[   34.593623] NDCB3: 0x00000000
[   34.612553] nand: nand_do_read_oob: from = 0x092c0000, len = 64
[   34.618581] marvell-nfc pxa3xx-nand: 
[   34.618581] NDCR:  0x9d079fff
[   34.618581] NDCB0: 0x000d3000
[   34.618581] NDCB1: 0x25800000
[   34.618581] NDCB2: 0x00000001
[   34.618581] NDCB3: 0x00000000
[   34.637625] nand: nand_do_read_oob: from = 0x092e0000, len = 64
[   34.643833] marvell-nfc pxa3xx-nand: 
[   34.643833] NDCR:  0x9d079fff
[   34.643833] NDCB0: 0x000d3000
[   34.643833] NDCB1: 0x25c00000
[   34.643833] NDCB2: 0x00000001
[   34.643833] NDCB3: 0x00000000
[   34.662763] nand: nand_do_read_oob: from = 0x09300000, len = 64
[   34.668963] marvell-nfc pxa3xx-nand: 
[   34.668963] NDCR:  0x9d079fff
[   34.668963] NDCB0: 0x000d3000
[   34.668963] NDCB1: 0x26000000
[   34.668963] NDCB2: 0x00000001
[   34.668963] NDCB3: 0x00000000
[   34.687904] nand: nand_do_read_oob: from = 0x09320000, len = 64
[   34.694104] marvell-nfc pxa3xx-nand: 
[   34.694104] NDCR:  0x9d079fff
[   34.694104] NDCB0: 0x000d3000
[   34.694104] NDCB1: 0x26400000
[   34.694104] NDCB2: 0x00000001
[   34.694104] NDCB3: 0x00000000
[   34.713035] nand: nand_do_read_oob: from = 0x09340000, len = 64
[   34.719235] marvell-nfc pxa3xx-nand: 
[   34.719235] NDCR:  0x9d079fff
[   34.719235] NDCB0: 0x000d3000
[   34.719235] NDCB1: 0x26800000
[   34.719235] NDCB2: 0x00000001
[   34.719235] NDCB3: 0x00000000
[   34.738155] nand: nand_do_read_oob: from = 0x09360000, len = 64
[   34.744356] marvell-nfc pxa3xx-nand: 
[   34.744356] NDCR:  0x9d079fff
[   34.744356] NDCB0: 0x000d3000
[   34.744356] NDCB1: 0x26c00000
[   34.744356] NDCB2: 0x00000001
[   34.744356] NDCB3: 0x00000000
[   34.763288] nand: nand_do_read_oob: from = 0x09380000, len = 64
[   34.769488] marvell-nfc pxa3xx-nand: 
[   34.769488] NDCR:  0x9d079fff
[   34.769488] NDCB0: 0x000d3000
[   34.769488] NDCB1: 0x27000000
[   34.769488] NDCB2: 0x00000001
[   34.769488] NDCB3: 0x00000000
[   34.788408] nand: nand_do_read_oob: from = 0x093a0000, len = 64
[   34.794608] marvell-nfc pxa3xx-nand: 
[   34.794608] NDCR:  0x9d079fff
[   34.794608] NDCB0: 0x000d3000
[   34.794608] NDCB1: 0x27400000
[   34.794608] NDCB2: 0x00000001
[   34.794608] NDCB3: 0x00000000
[   34.813541] nand: nand_do_read_oob: from = 0x093c0000, len = 64
[   34.819740] marvell-nfc pxa3xx-nand: 
[   34.819740] NDCR:  0x9d079fff
[   34.819740] NDCB0: 0x000d3000
[   34.819740] NDCB1: 0x27800000
[   34.819740] NDCB2: 0x00000001
[   34.819740] NDCB3: 0x00000000
[   34.838761] nand: nand_do_read_oob: from = 0x093e0000, len = 64
[   34.844800] marvell-nfc pxa3xx-nand: 
[   34.844800] NDCR:  0x9d079fff
[   34.844800] NDCB0: 0x000d3000
[   34.844800] NDCB1: 0x27c00000
[   34.844800] NDCB2: 0x00000001
[   34.844800] NDCB3: 0x00000000
[   34.863716] nand: nand_do_read_oob: from = 0x09400000, len = 64
[   34.869919] marvell-nfc pxa3xx-nand: 
[   34.869919] NDCR:  0x9d079fff
[   34.869919] NDCB0: 0x000d3000
[   34.869919] NDCB1: 0x28000000
[   34.869919] NDCB2: 0x00000001
[   34.869919] NDCB3: 0x00000000
[   34.888900] nand: nand_do_read_oob: from = 0x09420000, len = 64
[   34.894933] marvell-nfc pxa3xx-nand: 
[   34.894933] NDCR:  0x9d079fff
[   34.894933] NDCB0: 0x000d3000
[   34.894933] NDCB1: 0x28400000
[   34.894933] NDCB2: 0x00000001
[   34.894933] NDCB3: 0x00000000
[   34.913873] nand: nand_do_read_oob: from = 0x09440000, len = 64
[   34.920075] marvell-nfc pxa3xx-nand: 
[   34.920075] NDCR:  0x9d079fff
[   34.920075] NDCB0: 0x000d3000
[   34.920075] NDCB1: 0x28800000
[   34.920075] NDCB2: 0x00000001
[   34.920075] NDCB3: 0x00000000
[   34.939043] nand: nand_do_read_oob: from = 0x09460000, len = 64
[   34.945071] marvell-nfc pxa3xx-nand: 
[   34.945071] NDCR:  0x9d079fff
[   34.945071] NDCB0: 0x000d3000
[   34.945071] NDCB1: 0x28c00000
[   34.945071] NDCB2: 0x00000001
[   34.945071] NDCB3: 0x00000000
[   34.964004] nand: nand_do_read_oob: from = 0x09480000, len = 64
[   34.970209] marvell-nfc pxa3xx-nand: 
[   34.970209] NDCR:  0x9d079fff
[   34.970209] NDCB0: 0x000d3000
[   34.970209] NDCB1: 0x29000000
[   34.970209] NDCB2: 0x00000001
[   34.970209] NDCB3: 0x00000000
[   34.989138] nand: nand_do_read_oob: from = 0x094a0000, len = 64
[   34.995170] marvell-nfc pxa3xx-nand: 
[   34.995170] NDCR:  0x9d079fff
[   34.995170] NDCB0: 0x000d3000
[   34.995170] NDCB1: 0x29400000
[   34.995170] NDCB2: 0x00000001
[   34.995170] NDCB3: 0x00000000
[   35.014111] nand: nand_do_read_oob: from = 0x094c0000, len = 64
[   35.020319] marvell-nfc pxa3xx-nand: 
[   35.020319] NDCR:  0x9d079fff
[   35.020319] NDCB0: 0x000d3000
[   35.020319] NDCB1: 0x29800000
[   35.020319] NDCB2: 0x00000001
[   35.020319] NDCB3: 0x00000000
[   35.039246] nand: nand_do_read_oob: from = 0x094e0000, len = 64
[   35.045275] marvell-nfc pxa3xx-nand: 
[   35.045275] NDCR:  0x9d079fff
[   35.045275] NDCB0: 0x000d3000
[   35.045275] NDCB1: 0x29c00000
[   35.045275] NDCB2: 0x00000001
[   35.045275] NDCB3: 0x00000000
[   35.064210] nand: nand_do_read_oob: from = 0x09500000, len = 64
[   35.070415] marvell-nfc pxa3xx-nand: 
[   35.070415] NDCR:  0x9d079fff
[   35.070415] NDCB0: 0x000d3000
[   35.070415] NDCB1: 0x2a000000
[   35.070415] NDCB2: 0x00000001
[   35.070415] NDCB3: 0x00000000
[   35.089346] nand: nand_do_read_oob: from = 0x09520000, len = 64
[   35.095375] marvell-nfc pxa3xx-nand: 
[   35.095375] NDCR:  0x9d079fff
[   35.095375] NDCB0: 0x000d3000
[   35.095375] NDCB1: 0x2a400000
[   35.095375] NDCB2: 0x00000001
[   35.095375] NDCB3: 0x00000000
[   35.114308] nand: nand_do_read_oob: from = 0x09540000, len = 64
[   35.120514] marvell-nfc pxa3xx-nand: 
[   35.120514] NDCR:  0x9d079fff
[   35.120514] NDCB0: 0x000d3000
[   35.120514] NDCB1: 0x2a800000
[   35.120514] NDCB2: 0x00000001
[   35.120514] NDCB3: 0x00000000
[   35.139442] nand: nand_do_read_oob: from = 0x09560000, len = 64
[   35.145473] marvell-nfc pxa3xx-nand: 
[   35.145473] NDCR:  0x9d079fff
[   35.145473] NDCB0: 0x000d3000
[   35.145473] NDCB1: 0x2ac00000
[   35.145473] NDCB2: 0x00000001
[   35.145473] NDCB3: 0x00000000
[   35.164408] nand: nand_do_read_oob: from = 0x09580000, len = 64
[   35.170614] marvell-nfc pxa3xx-nand: 
[   35.170614] NDCR:  0x9d079fff
[   35.170614] NDCB0: 0x000d3000
[   35.170614] NDCB1: 0x2b000000
[   35.170614] NDCB2: 0x00000001
[   35.170614] NDCB3: 0x00000000
[   35.189544] nand: nand_do_read_oob: from = 0x095a0000, len = 64
[   35.195571] marvell-nfc pxa3xx-nand: 
[   35.195571] NDCR:  0x9d079fff
[   35.195571] NDCB0: 0x000d3000
[   35.195571] NDCB1: 0x2b400000
[   35.195571] NDCB2: 0x00000001
[   35.195571] NDCB3: 0x00000000
[   35.214506] nand: nand_do_read_oob: from = 0x095c0000, len = 64
[   35.220710] marvell-nfc pxa3xx-nand: 
[   35.220710] NDCR:  0x9d079fff
[   35.220710] NDCB0: 0x000d3000
[   35.220710] NDCB1: 0x2b800000
[   35.220710] NDCB2: 0x00000001
[   35.220710] NDCB3: 0x00000000
[   35.239640] nand: nand_do_read_oob: from = 0x095e0000, len = 64
[   35.245669] marvell-nfc pxa3xx-nand: 
[   35.245669] NDCR:  0x9d079fff
[   35.245669] NDCB0: 0x000d3000
[   35.245669] NDCB1: 0x2bc00000
[   35.245669] NDCB2: 0x00000001
[   35.245669] NDCB3: 0x00000000
[   35.264602] nand: nand_do_read_oob: from = 0x09600000, len = 64
[   35.270820] marvell-nfc pxa3xx-nand: 
[   35.270820] NDCR:  0x9d079fff
[   35.270820] NDCB0: 0x000d3000
[   35.270820] NDCB1: 0x2c000000
[   35.270820] NDCB2: 0x00000001
[   35.270820] NDCB3: 0x00000000
[   35.289750] nand: nand_do_read_oob: from = 0x09620000, len = 64
[   35.295777] marvell-nfc pxa3xx-nand: 
[   35.295777] NDCR:  0x9d079fff
[   35.295777] NDCB0: 0x000d3000
[   35.295777] NDCB1: 0x2c400000
[   35.295777] NDCB2: 0x00000001
[   35.295777] NDCB3: 0x00000000
[   35.314712] nand: nand_do_read_oob: from = 0x09640000, len = 64
[   35.320915] marvell-nfc pxa3xx-nand: 
[   35.320915] NDCR:  0x9d079fff
[   35.320915] NDCB0: 0x000d3000
[   35.320915] NDCB1: 0x2c800000
[   35.320915] NDCB2: 0x00000001
[   35.320915] NDCB3: 0x00000000
[   35.339848] nand: nand_do_read_oob: from = 0x09660000, len = 64
[   35.345875] marvell-nfc pxa3xx-nand: 
[   35.345875] NDCR:  0x9d079fff
[   35.345875] NDCB0: 0x000d3000
[   35.345875] NDCB1: 0x2cc00000
[   35.345875] NDCB2: 0x00000001
[   35.345875] NDCB3: 0x00000000
[   35.364810] nand: nand_do_read_oob: from = 0x09680000, len = 64
[   35.371014] marvell-nfc pxa3xx-nand: 
[   35.371014] NDCR:  0x9d079fff
[   35.371014] NDCB0: 0x000d3000
[   35.371014] NDCB1: 0x2d000000
[   35.371014] NDCB2: 0x00000001
[   35.371014] NDCB3: 0x00000000
[   35.389943] nand: nand_do_read_oob: from = 0x096a0000, len = 64
[   35.395975] marvell-nfc pxa3xx-nand: 
[   35.395975] NDCR:  0x9d079fff
[   35.395975] NDCB0: 0x000d3000
[   35.395975] NDCB1: 0x2d400000
[   35.395975] NDCB2: 0x00000001
[   35.395975] NDCB3: 0x00000000
[   35.414909] nand: nand_do_read_oob: from = 0x096c0000, len = 64
[   35.421113] marvell-nfc pxa3xx-nand: 
[   35.421113] NDCR:  0x9d079fff
[   35.421113] NDCB0: 0x000d3000
[   35.421113] NDCB1: 0x2d800000
[   35.421113] NDCB2: 0x00000001
[   35.421113] NDCB3: 0x00000000
[   35.440046] nand: nand_do_read_oob: from = 0x096e0000, len = 64
[   35.446080] marvell-nfc pxa3xx-nand: 
[   35.446080] NDCR:  0x9d079fff
[   35.446080] NDCB0: 0x000d3000
[   35.446080] NDCB1: 0x2dc00000
[   35.446080] NDCB2: 0x00000001
[   35.446080] NDCB3: 0x00000000
[   35.465018] nand: nand_do_read_oob: from = 0x09700000, len = 64
[   35.471220] marvell-nfc pxa3xx-nand: 
[   35.471220] NDCR:  0x9d079fff
[   35.471220] NDCB0: 0x000d3000
[   35.471220] NDCB1: 0x2e000000
[   35.471220] NDCB2: 0x00000001
[   35.471220] NDCB3: 0x00000000
[   35.490151] nand: nand_do_read_oob: from = 0x09720000, len = 64
[   35.496179] marvell-nfc pxa3xx-nand: 
[   35.496179] NDCR:  0x9d079fff
[   35.496179] NDCB0: 0x000d3000
[   35.496179] NDCB1: 0x2e400000
[   35.496179] NDCB2: 0x00000001
[   35.496179] NDCB3: 0x00000000
[   35.515111] nand: nand_do_read_oob: from = 0x09740000, len = 64
[   35.521320] marvell-nfc pxa3xx-nand: 
[   35.521320] NDCR:  0x9d079fff
[   35.521320] NDCB0: 0x000d3000
[   35.521320] NDCB1: 0x2e800000
[   35.521320] NDCB2: 0x00000001
[   35.521320] NDCB3: 0x00000000
[   35.540249] nand: nand_do_read_oob: from = 0x09760000, len = 64
[   35.546277] marvell-nfc pxa3xx-nand: 
[   35.546277] NDCR:  0x9d079fff
[   35.546277] NDCB0: 0x000d3000
[   35.546277] NDCB1: 0x2ec00000
[   35.546277] NDCB2: 0x00000001
[   35.546277] NDCB3: 0x00000000
[   35.565211] nand: nand_do_read_oob: from = 0x09780000, len = 64
[   35.571416] marvell-nfc pxa3xx-nand: 
[   35.571416] NDCR:  0x9d079fff
[   35.571416] NDCB0: 0x000d3000
[   35.571416] NDCB1: 0x2f000000
[   35.571416] NDCB2: 0x00000001
[   35.571416] NDCB3: 0x00000000
[   35.590347] nand: nand_do_read_oob: from = 0x097a0000, len = 64
[   35.596376] marvell-nfc pxa3xx-nand: 
[   35.596376] NDCR:  0x9d079fff
[   35.596376] NDCB0: 0x000d3000
[   35.596376] NDCB1: 0x2f400000
[   35.596376] NDCB2: 0x00000001
[   35.596376] NDCB3: 0x00000000
[   35.615311] nand: nand_do_read_oob: from = 0x097c0000, len = 64
[   35.621514] marvell-nfc pxa3xx-nand: 
[   35.621514] NDCR:  0x9d079fff
[   35.621514] NDCB0: 0x000d3000
[   35.621514] NDCB1: 0x2f800000
[   35.621514] NDCB2: 0x00000001
[   35.621514] NDCB3: 0x00000000
[   35.640446] nand: nand_do_read_oob: from = 0x097e0000, len = 64
[   35.646475] marvell-nfc pxa3xx-nand: 
[   35.646475] NDCR:  0x9d079fff
[   35.646475] NDCB0: 0x000d3000
[   35.646475] NDCB1: 0x2fc00000
[   35.646475] NDCB2: 0x00000001
[   35.646475] NDCB3: 0x00000000
[   35.665411] nand: nand_do_read_oob: from = 0x09800000, len = 64
[   35.671612] marvell-nfc pxa3xx-nand: 
[   35.671612] NDCR:  0x9d079fff
[   35.671612] NDCB0: 0x000d3000
[   35.671612] NDCB1: 0x30000000
[   35.671612] NDCB2: 0x00000001
[   35.671612] NDCB3: 0x00000000
[   35.690545] nand: nand_do_read_oob: from = 0x09820000, len = 64
[   35.696573] marvell-nfc pxa3xx-nand: 
[   35.696573] NDCR:  0x9d079fff
[   35.696573] NDCB0: 0x000d3000
[   35.696573] NDCB1: 0x30400000
[   35.696573] NDCB2: 0x00000001
[   35.696573] NDCB3: 0x00000000
[   35.715507] nand: nand_do_read_oob: from = 0x09840000, len = 64
[   35.721712] marvell-nfc pxa3xx-nand: 
[   35.721712] NDCR:  0x9d079fff
[   35.721712] NDCB0: 0x000d3000
[   35.721712] NDCB1: 0x30800000
[   35.721712] NDCB2: 0x00000001
[   35.721712] NDCB3: 0x00000000
[   35.740641] nand: nand_do_read_oob: from = 0x09860000, len = 64
[   35.746673] marvell-nfc pxa3xx-nand: 
[   35.746673] NDCR:  0x9d079fff
[   35.746673] NDCB0: 0x000d3000
[   35.746673] NDCB1: 0x30c00000
[   35.746673] NDCB2: 0x00000001
[   35.746673] NDCB3: 0x00000000
[   35.765607] nand: nand_do_read_oob: from = 0x09880000, len = 64
[   35.771811] marvell-nfc pxa3xx-nand: 
[   35.771811] NDCR:  0x9d079fff
[   35.771811] NDCB0: 0x000d3000
[   35.771811] NDCB1: 0x31000000
[   35.771811] NDCB2: 0x00000001
[   35.771811] NDCB3: 0x00000000
[   35.790740] nand: nand_do_read_oob: from = 0x098a0000, len = 64
[   35.796771] marvell-nfc pxa3xx-nand: 
[   35.796771] NDCR:  0x9d079fff
[   35.796771] NDCB0: 0x000d3000
[   35.796771] NDCB1: 0x31400000
[   35.796771] NDCB2: 0x00000001
[   35.796771] NDCB3: 0x00000000
[   35.815706] nand: nand_do_read_oob: from = 0x098c0000, len = 64
[   35.821908] marvell-nfc pxa3xx-nand: 
[   35.821908] NDCR:  0x9d079fff
[   35.821908] NDCB0: 0x000d3000
[   35.821908] NDCB1: 0x31800000
[   35.821908] NDCB2: 0x00000001
[   35.821908] NDCB3: 0x00000000
[   35.840839] nand: nand_do_read_oob: from = 0x098e0000, len = 64
[   35.846869] marvell-nfc pxa3xx-nand: 
[   35.846869] NDCR:  0x9d079fff
[   35.846869] NDCB0: 0x000d3000
[   35.846869] NDCB1: 0x31c00000
[   35.846869] NDCB2: 0x00000001
[   35.846869] NDCB3: 0x00000000
[   35.865801] nand: nand_do_read_oob: from = 0x09900000, len = 64
[   35.872006] marvell-nfc pxa3xx-nand: 
[   35.872006] NDCR:  0x9d079fff
[   35.872006] NDCB0: 0x000d3000
[   35.872006] NDCB1: 0x32000000
[   35.872006] NDCB2: 0x00000001
[   35.872006] NDCB3: 0x00000000
[   35.890935] nand: nand_do_read_oob: from = 0x09920000, len = 64
[   35.896967] marvell-nfc pxa3xx-nand: 
[   35.896967] NDCR:  0x9d079fff
[   35.896967] NDCB0: 0x000d3000
[   35.896967] NDCB1: 0x32400000
[   35.896967] NDCB2: 0x00000001
[   35.896967] NDCB3: 0x00000000
[   35.915916] nand: nand_do_read_oob: from = 0x09940000, len = 64
[   35.922125] marvell-nfc pxa3xx-nand: 
[   35.922125] NDCR:  0x9d079fff
[   35.922125] NDCB0: 0x000d3000
[   35.922125] NDCB1: 0x32800000
[   35.922125] NDCB2: 0x00000001
[   35.922125] NDCB3: 0x00000000
[   35.941052] nand: nand_do_read_oob: from = 0x09960000, len = 64
[   35.947084] marvell-nfc pxa3xx-nand: 
[   35.947084] NDCR:  0x9d079fff
[   35.947084] NDCB0: 0x000d3000
[   35.947084] NDCB1: 0x32c00000
[   35.947084] NDCB2: 0x00000001
[   35.947084] NDCB3: 0x00000000
[   35.966015] nand: nand_do_read_oob: from = 0x09980000, len = 64
[   35.972215] marvell-nfc pxa3xx-nand: 
[   35.972215] NDCR:  0x9d079fff
[   35.972215] NDCB0: 0x000d3000
[   35.972215] NDCB1: 0x33000000
[   35.972215] NDCB2: 0x00000001
[   35.972215] NDCB3: 0x00000000
[   35.991142] nand: nand_do_read_oob: from = 0x099a0000, len = 64
[   35.997172] marvell-nfc pxa3xx-nand: 
[   35.997172] NDCR:  0x9d079fff
[   35.997172] NDCB0: 0x000d3000
[   35.997172] NDCB1: 0x33400000
[   35.997172] NDCB2: 0x00000001
[   35.997172] NDCB3: 0x00000000
[   36.016114] nand: nand_do_read_oob: from = 0x099c0000, len = 64
[   36.022320] marvell-nfc pxa3xx-nand: 
[   36.022320] NDCR:  0x9d079fff
[   36.022320] NDCB0: 0x000d3000
[   36.022320] NDCB1: 0x33800000
[   36.022320] NDCB2: 0x00000001
[   36.022320] NDCB3: 0x00000000
[   36.041247] nand: nand_do_read_oob: from = 0x099e0000, len = 64
[   36.047280] marvell-nfc pxa3xx-nand: 
[   36.047280] NDCR:  0x9d079fff
[   36.047280] NDCB0: 0x000d3000
[   36.047280] NDCB1: 0x33c00000
[   36.047280] NDCB2: 0x00000001
[   36.047280] NDCB3: 0x00000000
[   36.066215] nand: nand_do_read_oob: from = 0x09a00000, len = 64
[   36.072419] marvell-nfc pxa3xx-nand: 
[   36.072419] NDCR:  0x9d079fff
[   36.072419] NDCB0: 0x000d3000
[   36.072419] NDCB1: 0x34000000
[   36.072419] NDCB2: 0x00000001
[   36.072419] NDCB3: 0x00000000
[   36.091682] nand: nand_do_read_oob: from = 0x09a20000, len = 64
[   36.097730] marvell-nfc pxa3xx-nand: 
[   36.097730] NDCR:  0x9d079fff
[   36.097730] NDCB0: 0x000d3000
[   36.097730] NDCB1: 0x34400000
[   36.097730] NDCB2: 0x00000001
[   36.097730] NDCB3: 0x00000000
[   36.116690] nand: nand_do_read_oob: from = 0x09a40000, len = 64
[   36.122887] marvell-nfc pxa3xx-nand: 
[   36.122887] NDCR:  0x9d079fff
[   36.122887] NDCB0: 0x000d3000
[   36.122887] NDCB1: 0x34800000
[   36.122887] NDCB2: 0x00000001
[   36.122887] NDCB3: 0x00000000
[   36.141817] nand: nand_do_read_oob: from = 0x09a60000, len = 64
[   36.147849] marvell-nfc pxa3xx-nand: 
[   36.147849] NDCR:  0x9d079fff
[   36.147849] NDCB0: 0x000d3000
[   36.147849] NDCB1: 0x34c00000
[   36.147849] NDCB2: 0x00000001
[   36.147849] NDCB3: 0x00000000
[   36.166783] nand: nand_do_read_oob: from = 0x09a80000, len = 64
[   36.172987] marvell-nfc pxa3xx-nand: 
[   36.172987] NDCR:  0x9d079fff
[   36.172987] NDCB0: 0x000d3000
[   36.172987] NDCB1: 0x35000000
[   36.172987] NDCB2: 0x00000001
[   36.172987] NDCB3: 0x00000000
[   36.191915] nand: nand_do_read_oob: from = 0x09aa0000, len = 64
[   36.197947] marvell-nfc pxa3xx-nand: 
[   36.197947] NDCR:  0x9d079fff
[   36.197947] NDCB0: 0x000d3000
[   36.197947] NDCB1: 0x35400000
[   36.197947] NDCB2: 0x00000001
[   36.197947] NDCB3: 0x00000000
[   36.216879] nand: nand_do_read_oob: from = 0x09ac0000, len = 64
[   36.223085] marvell-nfc pxa3xx-nand: 
[   36.223085] NDCR:  0x9d079fff
[   36.223085] NDCB0: 0x000d3000
[   36.223085] NDCB1: 0x35800000
[   36.223085] NDCB2: 0x00000001
[   36.223085] NDCB3: 0x00000000
[   36.242014] nand: nand_do_read_oob: from = 0x09ae0000, len = 64
[   36.248045] marvell-nfc pxa3xx-nand: 
[   36.248045] NDCR:  0x9d079fff
[   36.248045] NDCB0: 0x000d3000
[   36.248045] NDCB1: 0x35c00000
[   36.248045] NDCB2: 0x00000001
[   36.248045] NDCB3: 0x00000000
[   36.266980] nand: nand_do_read_oob: from = 0x09b00000, len = 64
[   36.273183] marvell-nfc pxa3xx-nand: 
[   36.273183] NDCR:  0x9d079fff
[   36.273183] NDCB0: 0x000d3000
[   36.273183] NDCB1: 0x36000000
[   36.273183] NDCB2: 0x00000001
[   36.273183] NDCB3: 0x00000000
[   36.292111] nand: nand_do_read_oob: from = 0x09b20000, len = 64
[   36.298145] marvell-nfc pxa3xx-nand: 
[   36.298145] NDCR:  0x9d079fff
[   36.298145] NDCB0: 0x000d3000
[   36.298145] NDCB1: 0x36400000
[   36.298145] NDCB2: 0x00000001
[   36.298145] NDCB3: 0x00000000
[   36.317079] nand: nand_do_read_oob: from = 0x09b40000, len = 64
[   36.323283] marvell-nfc pxa3xx-nand: 
[   36.323283] NDCR:  0x9d079fff
[   36.323283] NDCB0: 0x000d3000
[   36.323283] NDCB1: 0x36800000
[   36.323283] NDCB2: 0x00000001
[   36.323283] NDCB3: 0x00000000
[   36.342211] nand: nand_do_read_oob: from = 0x09b60000, len = 64
[   36.348241] marvell-nfc pxa3xx-nand: 
[   36.348241] NDCR:  0x9d079fff
[   36.348241] NDCB0: 0x000d3000
[   36.348241] NDCB1: 0x36c00000
[   36.348241] NDCB2: 0x00000001
[   36.348241] NDCB3: 0x00000000
[   36.367173] nand: nand_do_read_oob: from = 0x09b80000, len = 64
[   36.373371] marvell-nfc pxa3xx-nand: 
[   36.373371] NDCR:  0x9d079fff
[   36.373371] NDCB0: 0x000d3000
[   36.373371] NDCB1: 0x37000000
[   36.373371] NDCB2: 0x00000001
[   36.373371] NDCB3: 0x00000000
[   36.392299] nand: nand_do_read_oob: from = 0x09ba0000, len = 64
[   36.398332] marvell-nfc pxa3xx-nand: 
[   36.398332] NDCR:  0x9d079fff
[   36.398332] NDCB0: 0x000d3000
[   36.398332] NDCB1: 0x37400000
[   36.398332] NDCB2: 0x00000001
[   36.398332] NDCB3: 0x00000000
[   36.417264] nand: nand_do_read_oob: from = 0x09bc0000, len = 64
[   36.423471] marvell-nfc pxa3xx-nand: 
[   36.423471] NDCR:  0x9d079fff
[   36.423471] NDCB0: 0x000d3000
[   36.423471] NDCB1: 0x37800000
[   36.423471] NDCB2: 0x00000001
[   36.423471] NDCB3: 0x00000000
[   36.442400] nand: nand_do_read_oob: from = 0x09be0000, len = 64
[   36.448429] marvell-nfc pxa3xx-nand: 
[   36.448429] NDCR:  0x9d079fff
[   36.448429] NDCB0: 0x000d3000
[   36.448429] NDCB1: 0x37c00000
[   36.448429] NDCB2: 0x00000001
[   36.448429] NDCB3: 0x00000000
[   36.467366] nand: nand_do_read_oob: from = 0x09c00000, len = 64
[   36.473569] marvell-nfc pxa3xx-nand: 
[   36.473569] NDCR:  0x9d079fff
[   36.473569] NDCB0: 0x000d3000
[   36.473569] NDCB1: 0x38000000
[   36.473569] NDCB2: 0x00000001
[   36.473569] NDCB3: 0x00000000
[   36.492498] nand: nand_do_read_oob: from = 0x09c20000, len = 64
[   36.498529] marvell-nfc pxa3xx-nand: 
[   36.498529] NDCR:  0x9d079fff
[   36.498529] NDCB0: 0x000d3000
[   36.498529] NDCB1: 0x38400000
[   36.498529] NDCB2: 0x00000001
[   36.498529] NDCB3: 0x00000000
[   36.517459] nand: nand_do_read_oob: from = 0x09c40000, len = 64
[   36.523659] marvell-nfc pxa3xx-nand: 
[   36.523659] NDCR:  0x9d079fff
[   36.523659] NDCB0: 0x000d3000
[   36.523659] NDCB1: 0x38800000
[   36.523659] NDCB2: 0x00000001
[   36.523659] NDCB3: 0x00000000
[   36.542587] nand: nand_do_read_oob: from = 0x09c60000, len = 64
[   36.548618] marvell-nfc pxa3xx-nand: 
[   36.548618] NDCR:  0x9d079fff
[   36.548618] NDCB0: 0x000d3000
[   36.548618] NDCB1: 0x38c00000
[   36.548618] NDCB2: 0x00000001
[   36.548618] NDCB3: 0x00000000
[   36.567690] nand: nand_do_read_oob: from = 0x09c80000, len = 64
[   36.573895] marvell-nfc pxa3xx-nand: 
[   36.573895] NDCR:  0x9d079fff
[   36.573895] NDCB0: 0x000d3000
[   36.573895] NDCB1: 0x39000000
[   36.573895] NDCB2: 0x00000001
[   36.573895] NDCB3: 0x00000000
[   36.592823] nand: nand_do_read_oob: from = 0x09ca0000, len = 64
[   36.599025] marvell-nfc pxa3xx-nand: 
[   36.599025] NDCR:  0x9d079fff
[   36.599025] NDCB0: 0x000d3000
[   36.599025] NDCB1: 0x39400000
[   36.599025] NDCB2: 0x00000001
[   36.599025] NDCB3: 0x00000000
[   36.617945] nand: nand_do_read_oob: from = 0x09cc0000, len = 64
[   36.624147] marvell-nfc pxa3xx-nand: 
[   36.624147] NDCR:  0x9d079fff
[   36.624147] NDCB0: 0x000d3000
[   36.624147] NDCB1: 0x39800000
[   36.624147] NDCB2: 0x00000001
[   36.624147] NDCB3: 0x00000000
[   36.643076] nand: nand_do_read_oob: from = 0x09ce0000, len = 64
[   36.649278] marvell-nfc pxa3xx-nand: 
[   36.649278] NDCR:  0x9d079fff
[   36.649278] NDCB0: 0x000d3000
[   36.649278] NDCB1: 0x39c00000
[   36.649278] NDCB2: 0x00000001
[   36.649278] NDCB3: 0x00000000
[   36.668199] nand: nand_do_read_oob: from = 0x09d00000, len = 64
[   36.674401] marvell-nfc pxa3xx-nand: 
[   36.674401] NDCR:  0x9d079fff
[   36.674401] NDCB0: 0x000d3000
[   36.674401] NDCB1: 0x3a000000
[   36.674401] NDCB2: 0x00000001
[   36.674401] NDCB3: 0x00000000
[   36.693332] nand: nand_do_read_oob: from = 0x09d20000, len = 64
[   36.699531] marvell-nfc pxa3xx-nand: 
[   36.699531] NDCR:  0x9d079fff
[   36.699531] NDCB0: 0x000d3000
[   36.699531] NDCB1: 0x3a400000
[   36.699531] NDCB2: 0x00000001
[   36.699531] NDCB3: 0x00000000
[   36.718454] nand: nand_do_read_oob: from = 0x09d40000, len = 64
[   36.724654] marvell-nfc pxa3xx-nand: 
[   36.724654] NDCR:  0x9d079fff
[   36.724654] NDCB0: 0x000d3000
[   36.724654] NDCB1: 0x3a800000
[   36.724654] NDCB2: 0x00000001
[   36.724654] NDCB3: 0x00000000
[   36.743583] nand: nand_do_read_oob: from = 0x09d60000, len = 64
[   36.749786] marvell-nfc pxa3xx-nand: 
[   36.749786] NDCR:  0x9d079fff
[   36.749786] NDCB0: 0x000d3000
[   36.749786] NDCB1: 0x3ac00000
[   36.749786] NDCB2: 0x00000001
[   36.749786] NDCB3: 0x00000000
[   36.768912] nand: nand_do_read_oob: from = 0x09d80000, len = 64
[   36.774959] marvell-nfc pxa3xx-nand: 
[   36.774959] NDCR:  0x9d079fff
[   36.774959] NDCB0: 0x000d3000
[   36.774959] NDCB1: 0x3b000000
[   36.774959] NDCB2: 0x00000001
[   36.774959] NDCB3: 0x00000000
[   36.793907] nand: nand_do_read_oob: from = 0x09da0000, len = 64
[   36.800109] marvell-nfc pxa3xx-nand: 
[   36.800109] NDCR:  0x9d079fff
[   36.800109] NDCB0: 0x000d3000
[   36.800109] NDCB1: 0x3b400000
[   36.800109] NDCB2: 0x00000001
[   36.800109] NDCB3: 0x00000000
[   36.819035] nand: nand_do_read_oob: from = 0x09dc0000, len = 64
[   36.825070] marvell-nfc pxa3xx-nand: 
[   36.825070] NDCR:  0x9d079fff
[   36.825070] NDCB0: 0x000d3000
[   36.825070] NDCB1: 0x3b800000
[   36.825070] NDCB2: 0x00000001
[   36.825070] NDCB3: 0x00000000
[   36.844002] nand: nand_do_read_oob: from = 0x09de0000, len = 64
[   36.850208] marvell-nfc pxa3xx-nand: 
[   36.850208] NDCR:  0x9d079fff
[   36.850208] NDCB0: 0x000d3000
[   36.850208] NDCB1: 0x3bc00000
[   36.850208] NDCB2: 0x00000001
[   36.850208] NDCB3: 0x00000000
[   36.869133] nand: nand_do_read_oob: from = 0x09e00000, len = 64
[   36.875168] marvell-nfc pxa3xx-nand: 
[   36.875168] NDCR:  0x9d079fff
[   36.875168] NDCB0: 0x000d3000
[   36.875168] NDCB1: 0x3c000000
[   36.875168] NDCB2: 0x00000001
[   36.875168] NDCB3: 0x00000000
[   36.894099] nand: nand_do_read_oob: from = 0x09e20000, len = 64
[   36.900295] marvell-nfc pxa3xx-nand: 
[   36.900295] NDCR:  0x9d079fff
[   36.900295] NDCB0: 0x000d3000
[   36.900295] NDCB1: 0x3c400000
[   36.900295] NDCB2: 0x00000001
[   36.900295] NDCB3: 0x00000000
[   36.919223] nand: nand_do_read_oob: from = 0x09e40000, len = 64
[   36.925258] marvell-nfc pxa3xx-nand: 
[   36.925258] NDCR:  0x9d079fff
[   36.925258] NDCB0: 0x000d3000
[   36.925258] NDCB1: 0x3c800000
[   36.925258] NDCB2: 0x00000001
[   36.925258] NDCB3: 0x00000000
[   36.944188] nand: nand_do_read_oob: from = 0x09e60000, len = 64
[   36.950386] marvell-nfc pxa3xx-nand: 
[   36.950386] NDCR:  0x9d079fff
[   36.950386] NDCB0: 0x000d3000
[   36.950386] NDCB1: 0x3cc00000
[   36.950386] NDCB2: 0x00000001
[   36.950386] NDCB3: 0x00000000
[   36.969314] nand: nand_do_read_oob: from = 0x09e80000, len = 64
[   36.975347] marvell-nfc pxa3xx-nand: 
[   36.975347] NDCR:  0x9d079fff
[   36.975347] NDCB0: 0x000d3000
[   36.975347] NDCB1: 0x3d000000
[   36.975347] NDCB2: 0x00000001
[   36.975347] NDCB3: 0x00000000
[   36.994281] nand: nand_do_read_oob: from = 0x09ea0000, len = 64
[   37.000486] marvell-nfc pxa3xx-nand: 
[   37.000486] NDCR:  0x9d079fff
[   37.000486] NDCB0: 0x000d3000
[   37.000486] NDCB1: 0x3d400000
[   37.000486] NDCB2: 0x00000001
[   37.000486] NDCB3: 0x00000000
[   37.019428] nand: nand_do_read_oob: from = 0x09ec0000, len = 64
[   37.025464] marvell-nfc pxa3xx-nand: 
[   37.025464] NDCR:  0x9d079fff
[   37.025464] NDCB0: 0x000d3000
[   37.025464] NDCB1: 0x3d800000
[   37.025464] NDCB2: 0x00000001
[   37.025464] NDCB3: 0x00000000
[   37.044401] nand: nand_do_read_oob: from = 0x09ee0000, len = 64
[   37.050603] marvell-nfc pxa3xx-nand: 
[   37.050603] NDCR:  0x9d079fff
[   37.050603] NDCB0: 0x000d3000
[   37.050603] NDCB1: 0x3dc00000
[   37.050603] NDCB2: 0x00000001
[   37.050603] NDCB3: 0x00000000
[   37.069528] nand: nand_do_read_oob: from = 0x09f00000, len = 64
[   37.075561] marvell-nfc pxa3xx-nand: 
[   37.075561] NDCR:  0x9d079fff
[   37.075561] NDCB0: 0x000d3000
[   37.075561] NDCB1: 0x3e000000
[   37.075561] NDCB2: 0x00000001
[   37.075561] NDCB3: 0x00000000
[   37.094492] nand: nand_do_read_oob: from = 0x09f20000, len = 64
[   37.100701] marvell-nfc pxa3xx-nand: 
[   37.100701] NDCR:  0x9d079fff
[   37.100701] NDCB0: 0x000d3000
[   37.100701] NDCB1: 0x3e400000
[   37.100701] NDCB2: 0x00000001
[   37.100701] NDCB3: 0x00000000
[   37.119627] nand: nand_do_read_oob: from = 0x09f40000, len = 64
[   37.125661] marvell-nfc pxa3xx-nand: 
[   37.125661] NDCR:  0x9d079fff
[   37.125661] NDCB0: 0x000d3000
[   37.125661] NDCB1: 0x3e800000
[   37.125661] NDCB2: 0x00000001
[   37.125661] NDCB3: 0x00000000
[   37.144615] nand: nand_do_read_oob: from = 0x09f60000, len = 64
[   37.150818] marvell-nfc pxa3xx-nand: 
[   37.150818] NDCR:  0x9d079fff
[   37.150818] NDCB0: 0x000d3000
[   37.150818] NDCB1: 0x3ec00000
[   37.150818] NDCB2: 0x00000001
[   37.150818] NDCB3: 0x00000000
[   37.169746] nand: nand_do_read_oob: from = 0x09f80000, len = 64
[   37.175775] marvell-nfc pxa3xx-nand: 
[   37.175775] NDCR:  0x9d079fff
[   37.175775] NDCB0: 0x000d3000
[   37.175775] NDCB1: 0x3f000000
[   37.175775] NDCB2: 0x00000001
[   37.175775] NDCB3: 0x00000000
[   37.194708] nand: nand_do_read_oob: from = 0x09fa0000, len = 64
[   37.200914] marvell-nfc pxa3xx-nand: 
[   37.200914] NDCR:  0x9d079fff
[   37.200914] NDCB0: 0x000d3000
[   37.200914] NDCB1: 0x3f400000
[   37.200914] NDCB2: 0x00000001
[   37.200914] NDCB3: 0x00000000
[   37.219841] nand: nand_do_read_oob: from = 0x09fc0000, len = 64
[   37.225873] marvell-nfc pxa3xx-nand: 
[   37.225873] NDCR:  0x9d079fff
[   37.225873] NDCB0: 0x000d3000
[   37.225873] NDCB1: 0x3f800000
[   37.225873] NDCB2: 0x00000001
[   37.225873] NDCB3: 0x00000000
[   37.244805] nand: nand_do_read_oob: from = 0x09fe0000, len = 64
[   37.251015] marvell-nfc pxa3xx-nand: 
[   37.251015] NDCR:  0x9d079fff
[   37.251015] NDCB0: 0x000d3000
[   37.251015] NDCB1: 0x3fc00000
[   37.251015] NDCB2: 0x00000001
[   37.251015] NDCB3: 0x00000000
[   37.269942] nand: nand_do_read_oob: from = 0x0a000000, len = 64
[   37.275972] marvell-nfc pxa3xx-nand: 
[   37.275972] NDCR:  0x9d079fff
[   37.275972] NDCB0: 0x000d3000
[   37.275972] NDCB1: 0x40000000
[   37.275972] NDCB2: 0x00000001
[   37.275972] NDCB3: 0x00000000
[   37.294904] nand: nand_do_read_oob: from = 0x0a020000, len = 64
[   37.301112] marvell-nfc pxa3xx-nand: 
[   37.301112] NDCR:  0x9d079fff
[   37.301112] NDCB0: 0x000d3000
[   37.301112] NDCB1: 0x40400000
[   37.301112] NDCB2: 0x00000001
[   37.301112] NDCB3: 0x00000000
[   37.320038] nand: nand_do_read_oob: from = 0x0a040000, len = 64
[   37.326070] marvell-nfc pxa3xx-nand: 
[   37.326070] NDCR:  0x9d079fff
[   37.326070] NDCB0: 0x000d3000
[   37.326070] NDCB1: 0x40800000
[   37.326070] NDCB2: 0x00000001
[   37.326070] NDCB3: 0x00000000
[   37.345001] nand: nand_do_read_oob: from = 0x0a060000, len = 64
[   37.351202] marvell-nfc pxa3xx-nand: 
[   37.351202] NDCR:  0x9d079fff
[   37.351202] NDCB0: 0x000d3000
[   37.351202] NDCB1: 0x40c00000
[   37.351202] NDCB2: 0x00000001
[   37.351202] NDCB3: 0x00000000
[   37.370131] nand: nand_do_read_oob: from = 0x0a080000, len = 64
[   37.376160] marvell-nfc pxa3xx-nand: 
[   37.376160] NDCR:  0x9d079fff
[   37.376160] NDCB0: 0x000d3000
[   37.376160] NDCB1: 0x41000000
[   37.376160] NDCB2: 0x00000001
[   37.376160] NDCB3: 0x00000000
[   37.395091] nand: nand_do_read_oob: from = 0x0a0a0000, len = 64
[   37.401299] marvell-nfc pxa3xx-nand: 
[   37.401299] NDCR:  0x9d079fff
[   37.401299] NDCB0: 0x000d3000
[   37.401299] NDCB1: 0x41400000
[   37.401299] NDCB2: 0x00000001
[   37.401299] NDCB3: 0x00000000
[   37.420226] nand: nand_do_read_oob: from = 0x0a0c0000, len = 64
[   37.426258] marvell-nfc pxa3xx-nand: 
[   37.426258] NDCR:  0x9d079fff
[   37.426258] NDCB0: 0x000d3000
[   37.426258] NDCB1: 0x41800000
[   37.426258] NDCB2: 0x00000001
[   37.426258] NDCB3: 0x00000000
[   37.445191] nand: nand_do_read_oob: from = 0x0a0e0000, len = 64
[   37.451388] marvell-nfc pxa3xx-nand: 
[   37.451388] NDCR:  0x9d079fff
[   37.451388] NDCB0: 0x000d3000
[   37.451388] NDCB1: 0x41c00000
[   37.451388] NDCB2: 0x00000001
[   37.451388] NDCB3: 0x00000000
[   37.470319] nand: nand_do_read_oob: from = 0x0a100000, len = 64
[   37.476349] marvell-nfc pxa3xx-nand: 
[   37.476349] NDCR:  0x9d079fff
[   37.476349] NDCB0: 0x000d3000
[   37.476349] NDCB1: 0x42000000
[   37.476349] NDCB2: 0x00000001
[   37.476349] NDCB3: 0x00000000
[   37.495281] nand: nand_do_read_oob: from = 0x0a120000, len = 64
[   37.501487] marvell-nfc pxa3xx-nand: 
[   37.501487] NDCR:  0x9d079fff
[   37.501487] NDCB0: 0x000d3000
[   37.501487] NDCB1: 0x42400000
[   37.501487] NDCB2: 0x00000001
[   37.501487] NDCB3: 0x00000000
[   37.520417] nand: nand_do_read_oob: from = 0x0a140000, len = 64
[   37.526448] marvell-nfc pxa3xx-nand: 
[   37.526448] NDCR:  0x9d079fff
[   37.526448] NDCB0: 0x000d3000
[   37.526448] NDCB1: 0x42800000
[   37.526448] NDCB2: 0x00000001
[   37.526448] NDCB3: 0x00000000
[   37.545379] nand: nand_do_read_oob: from = 0x0a160000, len = 64
[   37.551584] marvell-nfc pxa3xx-nand: 
[   37.551584] NDCR:  0x9d079fff
[   37.551584] NDCB0: 0x000d3000
[   37.551584] NDCB1: 0x42c00000
[   37.551584] NDCB2: 0x00000001
[   37.551584] NDCB3: 0x00000000
[   37.570514] nand: nand_do_read_oob: from = 0x0a180000, len = 64
[   37.576546] marvell-nfc pxa3xx-nand: 
[   37.576546] NDCR:  0x9d079fff
[   37.576546] NDCB0: 0x000d3000
[   37.576546] NDCB1: 0x43000000
[   37.576546] NDCB2: 0x00000001
[   37.576546] NDCB3: 0x00000000
[   37.595477] nand: nand_do_read_oob: from = 0x0a1a0000, len = 64
[   37.601676] marvell-nfc pxa3xx-nand: 
[   37.601676] NDCR:  0x9d079fff
[   37.601676] NDCB0: 0x000d3000
[   37.601676] NDCB1: 0x43400000
[   37.601676] NDCB2: 0x00000001
[   37.601676] NDCB3: 0x00000000
[   37.620605] nand: nand_do_read_oob: from = 0x0a1c0000, len = 64
[   37.626635] marvell-nfc pxa3xx-nand: 
[   37.626635] NDCR:  0x9d079fff
[   37.626635] NDCB0: 0x000d3000
[   37.626635] NDCB1: 0x43800000
[   37.626635] NDCB2: 0x00000001
[   37.626635] NDCB3: 0x00000000
[   37.645567] nand: nand_do_read_oob: from = 0x0a1e0000, len = 64
[   37.651764] marvell-nfc pxa3xx-nand: 
[   37.651764] NDCR:  0x9d079fff
[   37.651764] NDCB0: 0x000d3000
[   37.651764] NDCB1: 0x43c00000
[   37.651764] NDCB2: 0x00000001
[   37.651764] NDCB3: 0x00000000
[   37.670692] nand: nand_do_read_oob: from = 0x0a200000, len = 64
[   37.676724] marvell-nfc pxa3xx-nand: 
[   37.676724] NDCR:  0x9d079fff
[   37.676724] NDCB0: 0x000d3000
[   37.676724] NDCB1: 0x44000000
[   37.676724] NDCB2: 0x00000001
[   37.676724] NDCB3: 0x00000000
[   37.695659] nand: nand_do_read_oob: from = 0x0a220000, len = 64
[   37.701863] marvell-nfc pxa3xx-nand: 
[   37.701863] NDCR:  0x9d079fff
[   37.701863] NDCB0: 0x000d3000
[   37.701863] NDCB1: 0x44400000
[   37.701863] NDCB2: 0x00000001
[   37.701863] NDCB3: 0x00000000
[   37.720792] nand: nand_do_read_oob: from = 0x0a240000, len = 64
[   37.726824] marvell-nfc pxa3xx-nand: 
[   37.726824] NDCR:  0x9d079fff
[   37.726824] NDCB0: 0x000d3000
[   37.726824] NDCB1: 0x44800000
[   37.726824] NDCB2: 0x00000001
[   37.726824] NDCB3: 0x00000000
[   37.745757] nand: nand_do_read_oob: from = 0x0a260000, len = 64
[   37.751963] marvell-nfc pxa3xx-nand: 
[   37.751963] NDCR:  0x9d079fff
[   37.751963] NDCB0: 0x000d3000
[   37.751963] NDCB1: 0x44c00000
[   37.751963] NDCB2: 0x00000001
[   37.751963] NDCB3: 0x00000000
[   37.770891] nand: nand_do_read_oob: from = 0x0a280000, len = 64
[   37.776922] marvell-nfc pxa3xx-nand: 
[   37.776922] NDCR:  0x9d079fff
[   37.776922] NDCB0: 0x000d3000
[   37.776922] NDCB1: 0x45000000
[   37.776922] NDCB2: 0x00000001
[   37.776922] NDCB3: 0x00000000
[   37.795872] nand: nand_do_read_oob: from = 0x0a2a0000, len = 64
[   37.802078] marvell-nfc pxa3xx-nand: 
[   37.802078] NDCR:  0x9d079fff
[   37.802078] NDCB0: 0x000d3000
[   37.802078] NDCB1: 0x45400000
[   37.802078] NDCB2: 0x00000001
[   37.802078] NDCB3: 0x00000000
[   37.821010] nand: nand_do_read_oob: from = 0x0a2c0000, len = 64
[   37.827038] marvell-nfc pxa3xx-nand: 
[   37.827038] NDCR:  0x9d079fff
[   37.827038] NDCB0: 0x000d3000
[   37.827038] NDCB1: 0x45800000
[   37.827038] NDCB2: 0x00000001
[   37.827038] NDCB3: 0x00000000
[   37.845971] nand: nand_do_read_oob: from = 0x0a2e0000, len = 64
[   37.852176] marvell-nfc pxa3xx-nand: 
[   37.852176] NDCR:  0x9d079fff
[   37.852176] NDCB0: 0x000d3000
[   37.852176] NDCB1: 0x45c00000
[   37.852176] NDCB2: 0x00000001
[   37.852176] NDCB3: 0x00000000
[   37.871105] nand: nand_do_read_oob: from = 0x0a300000, len = 64
[   37.877136] marvell-nfc pxa3xx-nand: 
[   37.877136] NDCR:  0x9d079fff
[   37.877136] NDCB0: 0x000d3000
[   37.877136] NDCB1: 0x46000000
[   37.877136] NDCB2: 0x00000001
[   37.877136] NDCB3: 0x00000000
[   37.896069] nand: nand_do_read_oob: from = 0x0a320000, len = 64
[   37.902275] marvell-nfc pxa3xx-nand: 
[   37.902275] NDCR:  0x9d079fff
[   37.902275] NDCB0: 0x000d3000
[   37.902275] NDCB1: 0x46400000
[   37.902275] NDCB2: 0x00000001
[   37.902275] NDCB3: 0x00000000
[   37.921202] nand: nand_do_read_oob: from = 0x0a340000, len = 64
[   37.927235] marvell-nfc pxa3xx-nand: 
[   37.927235] NDCR:  0x9d079fff
[   37.927235] NDCB0: 0x000d3000
[   37.927235] NDCB1: 0x46800000
[   37.927235] NDCB2: 0x00000001
[   37.927235] NDCB3: 0x00000000
[   37.946167] nand: nand_do_read_oob: from = 0x0a360000, len = 64
[   37.952371] marvell-nfc pxa3xx-nand: 
[   37.952371] NDCR:  0x9d079fff
[   37.952371] NDCB0: 0x000d3000
[   37.952371] NDCB1: 0x46c00000
[   37.952371] NDCB2: 0x00000001
[   37.952371] NDCB3: 0x00000000
[   37.971303] nand: nand_do_read_oob: from = 0x0a380000, len = 64
[   37.977334] marvell-nfc pxa3xx-nand: 
[   37.977334] NDCR:  0x9d079fff
[   37.977334] NDCB0: 0x000d3000
[   37.977334] NDCB1: 0x47000000
[   37.977334] NDCB2: 0x00000001
[   37.977334] NDCB3: 0x00000000
[   37.996265] nand: nand_do_read_oob: from = 0x0a3a0000, len = 64
[   38.002463] marvell-nfc pxa3xx-nand: 
[   38.002463] NDCR:  0x9d079fff
[   38.002463] NDCB0: 0x000d3000
[   38.002463] NDCB1: 0x47400000
[   38.002463] NDCB2: 0x00000001
[   38.002463] NDCB3: 0x00000000
[   38.021403] nand: nand_do_read_oob: from = 0x0a3c0000, len = 64
[   38.027442] marvell-nfc pxa3xx-nand: 
[   38.027442] NDCR:  0x9d079fff
[   38.027442] NDCB0: 0x000d3000
[   38.027442] NDCB1: 0x47800000
[   38.027442] NDCB2: 0x00000001
[   38.027442] NDCB3: 0x00000000
[   38.046374] nand: nand_do_read_oob: from = 0x0a3e0000, len = 64
[   38.052579] marvell-nfc pxa3xx-nand: 
[   38.052579] NDCR:  0x9d079fff
[   38.052579] NDCB0: 0x000d3000
[   38.052579] NDCB1: 0x47c00000
[   38.052579] NDCB2: 0x00000001
[   38.052579] NDCB3: 0x00000000
[   38.071508] nand: nand_do_read_oob: from = 0x0a400000, len = 64
[   38.077538] marvell-nfc pxa3xx-nand: 
[   38.077538] NDCR:  0x9d079fff
[   38.077538] NDCB0: 0x000d3000
[   38.077538] NDCB1: 0x48000000
[   38.077538] NDCB2: 0x00000001
[   38.077538] NDCB3: 0x00000000
[   38.096902] nand: nand_do_read_oob: from = 0x0a420000, len = 64
[   38.103144] marvell-nfc pxa3xx-nand: 
[   38.103144] NDCR:  0x9d079fff
[   38.103144] NDCB0: 0x000d3000
[   38.103144] NDCB1: 0x48400000
[   38.103144] NDCB2: 0x00000001
[   38.103144] NDCB3: 0x00000000
[   38.122080] nand: nand_do_read_oob: from = 0x0a440000, len = 64
[   38.128111] marvell-nfc pxa3xx-nand: 
[   38.128111] NDCR:  0x9d079fff
[   38.128111] NDCB0: 0x000d3000
[   38.128111] NDCB1: 0x48800000
[   38.128111] NDCB2: 0x00000001
[   38.128111] NDCB3: 0x00000000
[   38.147043] nand: nand_do_read_oob: from = 0x0a460000, len = 64
[   38.153250] marvell-nfc pxa3xx-nand: 
[   38.153250] NDCR:  0x9d079fff
[   38.153250] NDCB0: 0x000d3000
[   38.153250] NDCB1: 0x48c00000
[   38.153250] NDCB2: 0x00000001
[   38.153250] NDCB3: 0x00000000
[   38.172179] nand: nand_do_read_oob: from = 0x0a480000, len = 64
[   38.178209] marvell-nfc pxa3xx-nand: 
[   38.178209] NDCR:  0x9d079fff
[   38.178209] NDCB0: 0x000d3000
[   38.178209] NDCB1: 0x49000000
[   38.178209] NDCB2: 0x00000001
[   38.178209] NDCB3: 0x00000000
[   38.197142] nand: nand_do_read_oob: from = 0x0a4a0000, len = 64
[   38.203349] marvell-nfc pxa3xx-nand: 
[   38.203349] NDCR:  0x9d079fff
[   38.203349] NDCB0: 0x000d3000
[   38.203349] NDCB1: 0x49400000
[   38.203349] NDCB2: 0x00000001
[   38.203349] NDCB3: 0x00000000
[   38.222277] nand: nand_do_read_oob: from = 0x0a4c0000, len = 64
[   38.228307] marvell-nfc pxa3xx-nand: 
[   38.228307] NDCR:  0x9d079fff
[   38.228307] NDCB0: 0x000d3000
[   38.228307] NDCB1: 0x49800000
[   38.228307] NDCB2: 0x00000001
[   38.228307] NDCB3: 0x00000000
[   38.247241] nand: nand_do_read_oob: from = 0x0a4e0000, len = 64
[   38.253447] marvell-nfc pxa3xx-nand: 
[   38.253447] NDCR:  0x9d079fff
[   38.253447] NDCB0: 0x000d3000
[   38.253447] NDCB1: 0x49c00000
[   38.253447] NDCB2: 0x00000001
[   38.253447] NDCB3: 0x00000000
[   38.272377] nand: nand_do_read_oob: from = 0x0a500000, len = 64
[   38.278406] marvell-nfc pxa3xx-nand: 
[   38.278406] NDCR:  0x9d079fff
[   38.278406] NDCB0: 0x000d3000
[   38.278406] NDCB1: 0x4a000000
[   38.278406] NDCB2: 0x00000001
[   38.278406] NDCB3: 0x00000000
[   38.297339] nand: nand_do_read_oob: from = 0x0a520000, len = 64
[   38.303545] marvell-nfc pxa3xx-nand: 
[   38.303545] NDCR:  0x9d079fff
[   38.303545] NDCB0: 0x000d3000
[   38.303545] NDCB1: 0x4a400000
[   38.303545] NDCB2: 0x00000001
[   38.303545] NDCB3: 0x00000000
[   38.322475] nand: nand_do_read_oob: from = 0x0a540000, len = 64
[   38.328505] marvell-nfc pxa3xx-nand: 
[   38.328505] NDCR:  0x9d079fff
[   38.328505] NDCB0: 0x000d3000
[   38.328505] NDCB1: 0x4a800000
[   38.328505] NDCB2: 0x00000001
[   38.328505] NDCB3: 0x00000000
[   38.347438] nand: nand_do_read_oob: from = 0x0a560000, len = 64
[   38.353645] marvell-nfc pxa3xx-nand: 
[   38.353645] NDCR:  0x9d079fff
[   38.353645] NDCB0: 0x000d3000
[   38.353645] NDCB1: 0x4ac00000
[   38.353645] NDCB2: 0x00000001
[   38.353645] NDCB3: 0x00000000
[   38.372572] nand: nand_do_read_oob: from = 0x0a580000, len = 64
[   38.378603] marvell-nfc pxa3xx-nand: 
[   38.378603] NDCR:  0x9d079fff
[   38.378603] NDCB0: 0x000d3000
[   38.378603] NDCB1: 0x4b000000
[   38.378603] NDCB2: 0x00000001
[   38.378603] NDCB3: 0x00000000
[   38.397645] nand: nand_do_read_oob: from = 0x0a5a0000, len = 64
[   38.403844] marvell-nfc pxa3xx-nand: 
[   38.403844] NDCR:  0x9d079fff
[   38.403844] NDCB0: 0x000d3000
[   38.403844] NDCB1: 0x4b400000
[   38.403844] NDCB2: 0x00000001
[   38.403844] NDCB3: 0x00000000
[   38.422795] nand: nand_do_read_oob: from = 0x0a5c0000, len = 64
[   38.429001] marvell-nfc pxa3xx-nand: 
[   38.429001] NDCR:  0x9d079fff
[   38.429001] NDCB0: 0x000d3000
[   38.429001] NDCB1: 0x4b800000
[   38.429001] NDCB2: 0x00000001
[   38.429001] NDCB3: 0x00000000
[   38.447922] nand: nand_do_read_oob: from = 0x0a5e0000, len = 64
[   38.454123] marvell-nfc pxa3xx-nand: 
[   38.454123] NDCR:  0x9d079fff
[   38.454123] NDCB0: 0x000d3000
[   38.454123] NDCB1: 0x4bc00000
[   38.454123] NDCB2: 0x00000001
[   38.454123] NDCB3: 0x00000000
[   38.473053] nand: nand_do_read_oob: from = 0x0a600000, len = 64
[   38.479255] marvell-nfc pxa3xx-nand: 
[   38.479255] NDCR:  0x9d079fff
[   38.479255] NDCB0: 0x000d3000
[   38.479255] NDCB1: 0x4c000000
[   38.479255] NDCB2: 0x00000001
[   38.479255] NDCB3: 0x00000000
[   38.498176] nand: nand_do_read_oob: from = 0x0a620000, len = 64
[   38.504375] marvell-nfc pxa3xx-nand: 
[   38.504375] NDCR:  0x9d079fff
[   38.504375] NDCB0: 0x000d3000
[   38.504375] NDCB1: 0x4c400000
[   38.504375] NDCB2: 0x00000001
[   38.504375] NDCB3: 0x00000000
[   38.523300] nand: nand_do_read_oob: from = 0x0a640000, len = 64
[   38.529501] marvell-nfc pxa3xx-nand: 
[   38.529501] NDCR:  0x9d079fff
[   38.529501] NDCB0: 0x000d3000
[   38.529501] NDCB1: 0x4c800000
[   38.529501] NDCB2: 0x00000001
[   38.529501] NDCB3: 0x00000000
[   38.548419] nand: nand_do_read_oob: from = 0x0a660000, len = 64
[   38.554621] marvell-nfc pxa3xx-nand: 
[   38.554621] NDCR:  0x9d079fff
[   38.554621] NDCB0: 0x000d3000
[   38.554621] NDCB1: 0x4cc00000
[   38.554621] NDCB2: 0x00000001
[   38.554621] NDCB3: 0x00000000
[   38.573555] nand: nand_do_read_oob: from = 0x0a680000, len = 64
[   38.579753] marvell-nfc pxa3xx-nand: 
[   38.579753] NDCR:  0x9d079fff
[   38.579753] NDCB0: 0x000d3000
[   38.579753] NDCB1: 0x4d000000
[   38.579753] NDCB2: 0x00000001
[   38.579753] NDCB3: 0x00000000
[   38.598772] nand: nand_do_read_oob: from = 0x0a6a0000, len = 64
[   38.604805] marvell-nfc pxa3xx-nand: 
[   38.604805] NDCR:  0x9d079fff
[   38.604805] NDCB0: 0x000d3000
[   38.604805] NDCB1: 0x4d400000
[   38.604805] NDCB2: 0x00000001
[   38.604805] NDCB3: 0x00000000
[   38.623728] nand: nand_do_read_oob: from = 0x0a6c0000, len = 64
[   38.629930] marvell-nfc pxa3xx-nand: 
[   38.629930] NDCR:  0x9d079fff
[   38.629930] NDCB0: 0x000d3000
[   38.629930] NDCB1: 0x4d800000
[   38.629930] NDCB2: 0x00000001
[   38.629930] NDCB3: 0x00000000
[   38.648899] nand: nand_do_read_oob: from = 0x0a6e0000, len = 64
[   38.654937] marvell-nfc pxa3xx-nand: 
[   38.654937] NDCR:  0x9d079fff
[   38.654937] NDCB0: 0x000d3000
[   38.654937] NDCB1: 0x4dc00000
[   38.654937] NDCB2: 0x00000001
[   38.654937] NDCB3: 0x00000000
[   38.673877] nand: nand_do_read_oob: from = 0x0a700000, len = 64
[   38.680080] marvell-nfc pxa3xx-nand: 
[   38.680080] NDCR:  0x9d079fff
[   38.680080] NDCB0: 0x000d3000
[   38.680080] NDCB1: 0x4e000000
[   38.680080] NDCB2: 0x00000001
[   38.680080] NDCB3: 0x00000000
[   38.699048] nand: nand_do_read_oob: from = 0x0a720000, len = 64
[   38.705084] marvell-nfc pxa3xx-nand: 
[   38.705084] NDCR:  0x9d079fff
[   38.705084] NDCB0: 0x000d3000
[   38.705084] NDCB1: 0x4e400000
[   38.705084] NDCB2: 0x00000001
[   38.705084] NDCB3: 0x00000000
[   38.724019] nand: nand_do_read_oob: from = 0x0a740000, len = 64
[   38.730222] marvell-nfc pxa3xx-nand: 
[   38.730222] NDCR:  0x9d079fff
[   38.730222] NDCB0: 0x000d3000
[   38.730222] NDCB1: 0x4e800000
[   38.730222] NDCB2: 0x00000001
[   38.730222] NDCB3: 0x00000000
[   38.749149] nand: nand_do_read_oob: from = 0x0a760000, len = 64
[   38.755183] marvell-nfc pxa3xx-nand: 
[   38.755183] NDCR:  0x9d079fff
[   38.755183] NDCB0: 0x000d3000
[   38.755183] NDCB1: 0x4ec00000
[   38.755183] NDCB2: 0x00000001
[   38.755183] NDCB3: 0x00000000
[   38.774115] nand: nand_do_read_oob: from = 0x0a780000, len = 64
[   38.780322] marvell-nfc pxa3xx-nand: 
[   38.780322] NDCR:  0x9d079fff
[   38.780322] NDCB0: 0x000d3000
[   38.780322] NDCB1: 0x4f000000
[   38.780322] NDCB2: 0x00000001
[   38.780322] NDCB3: 0x00000000
[   38.799251] nand: nand_do_read_oob: from = 0x0a7a0000, len = 64
[   38.805280] marvell-nfc pxa3xx-nand: 
[   38.805280] NDCR:  0x9d079fff
[   38.805280] NDCB0: 0x000d3000
[   38.805280] NDCB1: 0x4f400000
[   38.805280] NDCB2: 0x00000001
[   38.805280] NDCB3: 0x00000000
[   38.824215] nand: nand_do_read_oob: from = 0x0a7c0000, len = 64
[   38.830420] marvell-nfc pxa3xx-nand: 
[   38.830420] NDCR:  0x9d079fff
[   38.830420] NDCB0: 0x000d3000
[   38.830420] NDCB1: 0x4f800000
[   38.830420] NDCB2: 0x00000001
[   38.830420] NDCB3: 0x00000000
[   38.849349] nand: nand_do_read_oob: from = 0x0a7e0000, len = 64
[   38.855378] marvell-nfc pxa3xx-nand: 
[   38.855378] NDCR:  0x9d079fff
[   38.855378] NDCB0: 0x000d3000
[   38.855378] NDCB1: 0x4fc00000
[   38.855378] NDCB2: 0x00000001
[   38.855378] NDCB3: 0x00000000
[   38.874311] nand: nand_do_read_oob: from = 0x0a800000, len = 64
[   38.880517] marvell-nfc pxa3xx-nand: 
[   38.880517] NDCR:  0x9d079fff
[   38.880517] NDCB0: 0x000d3000
[   38.880517] NDCB1: 0x50000000
[   38.880517] NDCB2: 0x00000001
[   38.880517] NDCB3: 0x00000000
[   38.899447] nand: nand_do_read_oob: from = 0x0a820000, len = 64
[   38.905478] marvell-nfc pxa3xx-nand: 
[   38.905478] NDCR:  0x9d079fff
[   38.905478] NDCB0: 0x000d3000
[   38.905478] NDCB1: 0x50400000
[   38.905478] NDCB2: 0x00000001
[   38.905478] NDCB3: 0x00000000
[   38.924410] nand: nand_do_read_oob: from = 0x0a840000, len = 64
[   38.930616] marvell-nfc pxa3xx-nand: 
[   38.930616] NDCR:  0x9d079fff
[   38.930616] NDCB0: 0x000d3000
[   38.930616] NDCB1: 0x50800000
[   38.930616] NDCB2: 0x00000001
[   38.930616] NDCB3: 0x00000000
[   38.949543] nand: nand_do_read_oob: from = 0x0a860000, len = 64
[   38.955576] marvell-nfc pxa3xx-nand: 
[   38.955576] NDCR:  0x9d079fff
[   38.955576] NDCB0: 0x000d3000
[   38.955576] NDCB1: 0x50c00000
[   38.955576] NDCB2: 0x00000001
[   38.955576] NDCB3: 0x00000000
[   38.974508] nand: nand_do_read_oob: from = 0x0a880000, len = 64
[   38.980714] marvell-nfc pxa3xx-nand: 
[   38.980714] NDCR:  0x9d079fff
[   38.980714] NDCB0: 0x000d3000
[   38.980714] NDCB1: 0x51000000
[   38.980714] NDCB2: 0x00000001
[   38.980714] NDCB3: 0x00000000
[   38.999659] nand: nand_do_read_oob: from = 0x0a8a0000, len = 64
[   39.005692] marvell-nfc pxa3xx-nand: 
[   39.005692] NDCR:  0x9d079fff
[   39.005692] NDCB0: 0x000d3000
[   39.005692] NDCB1: 0x51400000
[   39.005692] NDCB2: 0x00000001
[   39.005692] NDCB3: 0x00000000
[   39.024633] nand: nand_do_read_oob: from = 0x0a8c0000, len = 64
[   39.030840] marvell-nfc pxa3xx-nand: 
[   39.030840] NDCR:  0x9d079fff
[   39.030840] NDCB0: 0x000d3000
[   39.030840] NDCB1: 0x51800000
[   39.030840] NDCB2: 0x00000001
[   39.030840] NDCB3: 0x00000000
[   39.049768] nand: nand_do_read_oob: from = 0x0a8e0000, len = 64
[   39.055799] marvell-nfc pxa3xx-nand: 
[   39.055799] NDCR:  0x9d079fff
[   39.055799] NDCB0: 0x000d3000
[   39.055799] NDCB1: 0x51c00000
[   39.055799] NDCB2: 0x00000001
[   39.055799] NDCB3: 0x00000000
[   39.074734] nand: nand_do_read_oob: from = 0x0a900000, len = 64
[   39.080938] marvell-nfc pxa3xx-nand: 
[   39.080938] NDCR:  0x9d079fff
[   39.080938] NDCB0: 0x000d3000
[   39.080938] NDCB1: 0x52000000
[   39.080938] NDCB2: 0x00000001
[   39.080938] NDCB3: 0x00000000
[   39.099865] nand: nand_do_read_oob: from = 0x0a920000, len = 64
[   39.105898] marvell-nfc pxa3xx-nand: 
[   39.105898] NDCR:  0x9d079fff
[   39.105898] NDCB0: 0x000d3000
[   39.105898] NDCB1: 0x52400000
[   39.105898] NDCB2: 0x00000001
[   39.105898] NDCB3: 0x00000000
[   39.124831] nand: nand_do_read_oob: from = 0x0a940000, len = 64
[   39.131037] marvell-nfc pxa3xx-nand: 
[   39.131037] NDCR:  0x9d079fff
[   39.131037] NDCB0: 0x000d3000
[   39.131037] NDCB1: 0x52800000
[   39.131037] NDCB2: 0x00000001
[   39.131037] NDCB3: 0x00000000
[   39.149964] nand: nand_do_read_oob: from = 0x0a960000, len = 64
[   39.155996] marvell-nfc pxa3xx-nand: 
[   39.155996] NDCR:  0x9d079fff
[   39.155996] NDCB0: 0x000d3000
[   39.155996] NDCB1: 0x52c00000
[   39.155996] NDCB2: 0x00000001
[   39.155996] NDCB3: 0x00000000
[   39.174928] nand: nand_do_read_oob: from = 0x0a980000, len = 64
[   39.181134] marvell-nfc pxa3xx-nand: 
[   39.181134] NDCR:  0x9d079fff
[   39.181134] NDCB0: 0x000d3000
[   39.181134] NDCB1: 0x53000000
[   39.181134] NDCB2: 0x00000001
[   39.181134] NDCB3: 0x00000000
[   39.200063] nand: nand_do_read_oob: from = 0x0a9a0000, len = 64
[   39.206094] marvell-nfc pxa3xx-nand: 
[   39.206094] NDCR:  0x9d079fff
[   39.206094] NDCB0: 0x000d3000
[   39.206094] NDCB1: 0x53400000
[   39.206094] NDCB2: 0x00000001
[   39.206094] NDCB3: 0x00000000
[   39.225030] nand: nand_do_read_oob: from = 0x0a9c0000, len = 64
[   39.231233] marvell-nfc pxa3xx-nand: 
[   39.231233] NDCR:  0x9d079fff
[   39.231233] NDCB0: 0x000d3000
[   39.231233] NDCB1: 0x53800000
[   39.231233] NDCB2: 0x00000001
[   39.231233] NDCB3: 0x00000000
[   39.250160] nand: nand_do_read_oob: from = 0x0a9e0000, len = 64
[   39.256192] marvell-nfc pxa3xx-nand: 
[   39.256192] NDCR:  0x9d079fff
[   39.256192] NDCB0: 0x000d3000
[   39.256192] NDCB1: 0x53c00000
[   39.256192] NDCB2: 0x00000001
[   39.256192] NDCB3: 0x00000000
[   39.275126] nand: nand_do_read_oob: from = 0x0aa00000, len = 64
[   39.281332] marvell-nfc pxa3xx-nand: 
[   39.281332] NDCR:  0x9d079fff
[   39.281332] NDCB0: 0x000d3000
[   39.281332] NDCB1: 0x54000000
[   39.281332] NDCB2: 0x00000001
[   39.281332] NDCB3: 0x00000000
[   39.300261] nand: nand_do_read_oob: from = 0x0aa20000, len = 64
[   39.306291] marvell-nfc pxa3xx-nand: 
[   39.306291] NDCR:  0x9d079fff
[   39.306291] NDCB0: 0x000d3000
[   39.306291] NDCB1: 0x54400000
[   39.306291] NDCB2: 0x00000001
[   39.306291] NDCB3: 0x00000000
[   39.325224] nand: nand_do_read_oob: from = 0x0aa40000, len = 64
[   39.331429] marvell-nfc pxa3xx-nand: 
[   39.331429] NDCR:  0x9d079fff
[   39.331429] NDCB0: 0x000d3000
[   39.331429] NDCB1: 0x54800000
[   39.331429] NDCB2: 0x00000001
[   39.331429] NDCB3: 0x00000000
[   39.350358] nand: nand_do_read_oob: from = 0x0aa60000, len = 64
[   39.356391] marvell-nfc pxa3xx-nand: 
[   39.356391] NDCR:  0x9d079fff
[   39.356391] NDCB0: 0x000d3000
[   39.356391] NDCB1: 0x54c00000
[   39.356391] NDCB2: 0x00000001
[   39.356391] NDCB3: 0x00000000
[   39.375321] nand: nand_do_read_oob: from = 0x0aa80000, len = 64
[   39.381520] marvell-nfc pxa3xx-nand: 
[   39.381520] NDCR:  0x9d079fff
[   39.381520] NDCB0: 0x000d3000
[   39.381520] NDCB1: 0x55000000
[   39.381520] NDCB2: 0x00000001
[   39.381520] NDCB3: 0x00000000
[   39.400448] nand: nand_do_read_oob: from = 0x0aaa0000, len = 64
[   39.406480] marvell-nfc pxa3xx-nand: 
[   39.406480] NDCR:  0x9d079fff
[   39.406480] NDCB0: 0x000d3000
[   39.406480] NDCB1: 0x55400000
[   39.406480] NDCB2: 0x00000001
[   39.406480] NDCB3: 0x00000000
[   39.425416] nand: nand_do_read_oob: from = 0x0aac0000, len = 64
[   39.431618] marvell-nfc pxa3xx-nand: 
[   39.431618] NDCR:  0x9d079fff
[   39.431618] NDCB0: 0x000d3000
[   39.431618] NDCB1: 0x55800000
[   39.431618] NDCB2: 0x00000001
[   39.431618] NDCB3: 0x00000000
[   39.450547] nand: nand_do_read_oob: from = 0x0aae0000, len = 64
[   39.456578] marvell-nfc pxa3xx-nand: 
[   39.456578] NDCR:  0x9d079fff
[   39.456578] NDCB0: 0x000d3000
[   39.456578] NDCB1: 0x55c00000
[   39.456578] NDCB2: 0x00000001
[   39.456578] NDCB3: 0x00000000
[   39.475509] nand: nand_do_read_oob: from = 0x0ab00000, len = 64
[   39.481708] marvell-nfc pxa3xx-nand: 
[   39.481708] NDCR:  0x9d079fff
[   39.481708] NDCB0: 0x000d3000
[   39.481708] NDCB1: 0x56000000
[   39.481708] NDCB2: 0x00000001
[   39.481708] NDCB3: 0x00000000
[   39.500634] nand: nand_do_read_oob: from = 0x0ab20000, len = 64
[   39.506668] marvell-nfc pxa3xx-nand: 
[   39.506668] NDCR:  0x9d079fff
[   39.506668] NDCB0: 0x000d3000
[   39.506668] NDCB1: 0x56400000
[   39.506668] NDCB2: 0x00000001
[   39.506668] NDCB3: 0x00000000
[   39.525600] nand: nand_do_read_oob: from = 0x0ab40000, len = 64
[   39.531806] marvell-nfc pxa3xx-nand: 
[   39.531806] NDCR:  0x9d079fff
[   39.531806] NDCB0: 0x000d3000
[   39.531806] NDCB1: 0x56800000
[   39.531806] NDCB2: 0x00000001
[   39.531806] NDCB3: 0x00000000
[   39.550734] nand: nand_do_read_oob: from = 0x0ab60000, len = 64
[   39.556766] marvell-nfc pxa3xx-nand: 
[   39.556766] NDCR:  0x9d079fff
[   39.556766] NDCB0: 0x000d3000
[   39.556766] NDCB1: 0x56c00000
[   39.556766] NDCB2: 0x00000001
[   39.556766] NDCB3: 0x00000000
[   39.575697] nand: nand_do_read_oob: from = 0x0ab80000, len = 64
[   39.581895] marvell-nfc pxa3xx-nand: 
[   39.581895] NDCR:  0x9d079fff
[   39.581895] NDCB0: 0x000d3000
[   39.581895] NDCB1: 0x57000000
[   39.581895] NDCB2: 0x00000001
[   39.581895] NDCB3: 0x00000000
[   39.600822] nand: nand_do_read_oob: from = 0x0aba0000, len = 64
[   39.606855] marvell-nfc pxa3xx-nand: 
[   39.606855] NDCR:  0x9d079fff
[   39.606855] NDCB0: 0x000d3000
[   39.606855] NDCB1: 0x57400000
[   39.606855] NDCB2: 0x00000001
[   39.606855] NDCB3: 0x00000000
[   39.625789] nand: nand_do_read_oob: from = 0x0abc0000, len = 64
[   39.631992] marvell-nfc pxa3xx-nand: 
[   39.631992] NDCR:  0x9d079fff
[   39.631992] NDCB0: 0x000d3000
[   39.631992] NDCB1: 0x57800000
[   39.631992] NDCB2: 0x00000001
[   39.631992] NDCB3: 0x00000000
[   39.650939] nand: nand_do_read_oob: from = 0x0abe0000, len = 64
[   39.656971] marvell-nfc pxa3xx-nand: 
[   39.656971] NDCR:  0x9d079fff
[   39.656971] NDCB0: 0x000d3000
[   39.656971] NDCB1: 0x57c00000
[   39.656971] NDCB2: 0x00000001
[   39.656971] NDCB3: 0x00000000
[   39.675903] nand: nand_do_read_oob: from = 0x0ac00000, len = 64
[   39.682101] marvell-nfc pxa3xx-nand: 
[   39.682101] NDCR:  0x9d079fff
[   39.682101] NDCB0: 0x000d3000
[   39.682101] NDCB1: 0x58000000
[   39.682101] NDCB2: 0x00000001
[   39.682101] NDCB3: 0x00000000
[   39.701028] nand: nand_do_read_oob: from = 0x0ac20000, len = 64
[   39.707061] marvell-nfc pxa3xx-nand: 
[   39.707061] NDCR:  0x9d079fff
[   39.707061] NDCB0: 0x000d3000
[   39.707061] NDCB1: 0x58400000
[   39.707061] NDCB2: 0x00000001
[   39.707061] NDCB3: 0x00000000
[   39.725994] nand: nand_do_read_oob: from = 0x0ac40000, len = 64
[   39.732201] marvell-nfc pxa3xx-nand: 
[   39.732201] NDCR:  0x9d079fff
[   39.732201] NDCB0: 0x000d3000
[   39.732201] NDCB1: 0x58800000
[   39.732201] NDCB2: 0x00000001
[   39.732201] NDCB3: 0x00000000
[   39.751128] nand: nand_do_read_oob: from = 0x0ac60000, len = 64
[   39.757161] marvell-nfc pxa3xx-nand: 
[   39.757161] NDCR:  0x9d079fff
[   39.757161] NDCB0: 0x000d3000
[   39.757161] NDCB1: 0x58c00000
[   39.757161] NDCB2: 0x00000001
[   39.757161] NDCB3: 0x00000000
[   39.776092] nand: nand_do_read_oob: from = 0x0ac80000, len = 64
[   39.782289] marvell-nfc pxa3xx-nand: 
[   39.782289] NDCR:  0x9d079fff
[   39.782289] NDCB0: 0x000d3000
[   39.782289] NDCB1: 0x59000000
[   39.782289] NDCB2: 0x00000001
[   39.782289] NDCB3: 0x00000000
[   39.801217] nand: nand_do_read_oob: from = 0x0aca0000, len = 64
[   39.807248] marvell-nfc pxa3xx-nand: 
[   39.807248] NDCR:  0x9d079fff
[   39.807248] NDCB0: 0x000d3000
[   39.807248] NDCB1: 0x59400000
[   39.807248] NDCB2: 0x00000001
[   39.807248] NDCB3: 0x00000000
[   39.826180] nand: nand_do_read_oob: from = 0x0acc0000, len = 64
[   39.832380] marvell-nfc pxa3xx-nand: 
[   39.832380] NDCR:  0x9d079fff
[   39.832380] NDCB0: 0x000d3000
[   39.832380] NDCB1: 0x59800000
[   39.832380] NDCB2: 0x00000001
[   39.832380] NDCB3: 0x00000000
[   39.851310] nand: nand_do_read_oob: from = 0x0ace0000, len = 64
[   39.857339] marvell-nfc pxa3xx-nand: 
[   39.857339] NDCR:  0x9d079fff
[   39.857339] NDCB0: 0x000d3000
[   39.857339] NDCB1: 0x59c00000
[   39.857339] NDCB2: 0x00000001
[   39.857339] NDCB3: 0x00000000
[   39.876270] nand: nand_do_read_oob: from = 0x0ad00000, len = 64
[   39.882468] marvell-nfc pxa3xx-nand: 
[   39.882468] NDCR:  0x9d079fff
[   39.882468] NDCB0: 0x000d3000
[   39.882468] NDCB1: 0x5a000000
[   39.882468] NDCB2: 0x00000001
[   39.882468] NDCB3: 0x00000000
[   39.901398] nand: nand_do_read_oob: from = 0x0ad20000, len = 64
[   39.907430] marvell-nfc pxa3xx-nand: 
[   39.907430] NDCR:  0x9d079fff
[   39.907430] NDCB0: 0x000d3000
[   39.907430] NDCB1: 0x5a400000
[   39.907430] NDCB2: 0x00000001
[   39.907430] NDCB3: 0x00000000
[   39.926360] nand: nand_do_read_oob: from = 0x0ad40000, len = 64
[   39.932559] marvell-nfc pxa3xx-nand: 
[   39.932559] NDCR:  0x9d079fff
[   39.932559] NDCB0: 0x000d3000
[   39.932559] NDCB1: 0x5a800000
[   39.932559] NDCB2: 0x00000001
[   39.932559] NDCB3: 0x00000000
[   39.951489] nand: nand_do_read_oob: from = 0x0ad60000, len = 64
[   39.957520] marvell-nfc pxa3xx-nand: 
[   39.957520] NDCR:  0x9d079fff
[   39.957520] NDCB0: 0x000d3000
[   39.957520] NDCB1: 0x5ac00000
[   39.957520] NDCB2: 0x00000001
[   39.957520] NDCB3: 0x00000000
[   39.976451] nand: nand_do_read_oob: from = 0x0ad80000, len = 64
[   39.982649] marvell-nfc pxa3xx-nand: 
[   39.982649] NDCR:  0x9d079fff
[   39.982649] NDCB0: 0x000d3000
[   39.982649] NDCB1: 0x5b000000
[   39.982649] NDCB2: 0x00000001
[   39.982649] NDCB3: 0x00000000
[   40.001578] nand: nand_do_read_oob: from = 0x0ada0000, len = 64
[   40.007608] marvell-nfc pxa3xx-nand: 
[   40.007608] NDCR:  0x9d079fff
[   40.007608] NDCB0: 0x000d3000
[   40.007608] NDCB1: 0x5b400000
[   40.007608] NDCB2: 0x00000001
[   40.007608] NDCB3: 0x00000000
[   40.026551] nand: nand_do_read_oob: from = 0x0adc0000, len = 64
[   40.032756] marvell-nfc pxa3xx-nand: 
[   40.032756] NDCR:  0x9d079fff
[   40.032756] NDCB0: 0x000d3000
[   40.032756] NDCB1: 0x5b800000
[   40.032756] NDCB2: 0x00000001
[   40.032756] NDCB3: 0x00000000
[   40.051686] nand: nand_do_read_oob: from = 0x0ade0000, len = 64
[   40.057715] marvell-nfc pxa3xx-nand: 
[   40.057715] NDCR:  0x9d079fff
[   40.057715] NDCB0: 0x000d3000
[   40.057715] NDCB1: 0x5bc00000
[   40.057715] NDCB2: 0x00000001
[   40.057715] NDCB3: 0x00000000
[   40.076649] nand: nand_do_read_oob: from = 0x0ae00000, len = 64
[   40.082853] marvell-nfc pxa3xx-nand: 
[   40.082853] NDCR:  0x9d079fff
[   40.082853] NDCB0: 0x000d3000
[   40.082853] NDCB1: 0x5c000000
[   40.082853] NDCB2: 0x00000001
[   40.082853] NDCB3: 0x00000000
[   40.102129] nand: nand_do_read_oob: from = 0x0ae20000, len = 64
[   40.108173] marvell-nfc pxa3xx-nand: 
[   40.108173] NDCR:  0x9d079fff
[   40.108173] NDCB0: 0x000d3000
[   40.108173] NDCB1: 0x5c400000
[   40.108173] NDCB2: 0x00000001
[   40.108173] NDCB3: 0x00000000
[   40.127132] nand: nand_do_read_oob: from = 0x0ae40000, len = 64
[   40.133331] marvell-nfc pxa3xx-nand: 
[   40.133331] NDCR:  0x9d079fff
[   40.133331] NDCB0: 0x000d3000
[   40.133331] NDCB1: 0x5c800000
[   40.133331] NDCB2: 0x00000001
[   40.133331] NDCB3: 0x00000000
[   40.152260] nand: nand_do_read_oob: from = 0x0ae60000, len = 64
[   40.158294] marvell-nfc pxa3xx-nand: 
[   40.158294] NDCR:  0x9d079fff
[   40.158294] NDCB0: 0x000d3000
[   40.158294] NDCB1: 0x5cc00000
[   40.158294] NDCB2: 0x00000001
[   40.158294] NDCB3: 0x00000000
[   40.177228] nand: nand_do_read_oob: from = 0x0ae80000, len = 64
[   40.183432] marvell-nfc pxa3xx-nand: 
[   40.183432] NDCR:  0x9d079fff
[   40.183432] NDCB0: 0x000d3000
[   40.183432] NDCB1: 0x5d000000
[   40.183432] NDCB2: 0x00000001
[   40.183432] NDCB3: 0x00000000
[   40.202360] nand: nand_do_read_oob: from = 0x0aea0000, len = 64
[   40.208391] marvell-nfc pxa3xx-nand: 
[   40.208391] NDCR:  0x9d079fff
[   40.208391] NDCB0: 0x000d3000
[   40.208391] NDCB1: 0x5d400000
[   40.208391] NDCB2: 0x00000001
[   40.208391] NDCB3: 0x00000000
[   40.227328] nand: nand_do_read_oob: from = 0x0aec0000, len = 64
[   40.233529] marvell-nfc pxa3xx-nand: 
[   40.233529] NDCR:  0x9d079fff
[   40.233529] NDCB0: 0x000d3000
[   40.233529] NDCB1: 0x5d800000
[   40.233529] NDCB2: 0x00000001
[   40.233529] NDCB3: 0x00000000
[   40.252458] nand: nand_do_read_oob: from = 0x0aee0000, len = 64
[   40.258490] marvell-nfc pxa3xx-nand: 
[   40.258490] NDCR:  0x9d079fff
[   40.258490] NDCB0: 0x000d3000
[   40.258490] NDCB1: 0x5dc00000
[   40.258490] NDCB2: 0x00000001
[   40.258490] NDCB3: 0x00000000
[   40.277423] nand: nand_do_read_oob: from = 0x0af00000, len = 64
[   40.283653] marvell-nfc pxa3xx-nand: 
[   40.283653] NDCR:  0x9d079fff
[   40.283653] NDCB0: 0x000d3000
[   40.283653] NDCB1: 0x5e000000
[   40.283653] NDCB2: 0x00000001
[   40.283653] NDCB3: 0x00000000
[   40.302581] nand: nand_do_read_oob: from = 0x0af20000, len = 64
[   40.308612] marvell-nfc pxa3xx-nand: 
[   40.308612] NDCR:  0x9d079fff
[   40.308612] NDCB0: 0x000d3000
[   40.308612] NDCB1: 0x5e400000
[   40.308612] NDCB2: 0x00000001
[   40.308612] NDCB3: 0x00000000
[   40.327655] nand: nand_do_read_oob: from = 0x0af40000, len = 64
[   40.333856] marvell-nfc pxa3xx-nand: 
[   40.333856] NDCR:  0x9d079fff
[   40.333856] NDCB0: 0x000d3000
[   40.333856] NDCB1: 0x5e800000
[   40.333856] NDCB2: 0x00000001
[   40.333856] NDCB3: 0x00000000
[   40.352781] nand: nand_do_read_oob: from = 0x0af60000, len = 64
[   40.358986] marvell-nfc pxa3xx-nand: 
[   40.358986] NDCR:  0x9d079fff
[   40.358986] NDCB0: 0x000d3000
[   40.358986] NDCB1: 0x5ec00000
[   40.358986] NDCB2: 0x00000001
[   40.358986] NDCB3: 0x00000000
[   40.377905] nand: nand_do_read_oob: from = 0x0af80000, len = 64
[   40.384108] marvell-nfc pxa3xx-nand: 
[   40.384108] NDCR:  0x9d079fff
[   40.384108] NDCB0: 0x000d3000
[   40.384108] NDCB1: 0x5f000000
[   40.384108] NDCB2: 0x00000001
[   40.384108] NDCB3: 0x00000000
[   40.403036] nand: nand_do_read_oob: from = 0x0afa0000, len = 64
[   40.409239] marvell-nfc pxa3xx-nand: 
[   40.409239] NDCR:  0x9d079fff
[   40.409239] NDCB0: 0x000d3000
[   40.409239] NDCB1: 0x5f400000
[   40.409239] NDCB2: 0x00000001
[   40.409239] NDCB3: 0x00000000
[   40.428158] nand: nand_do_read_oob: from = 0x0afc0000, len = 64
[   40.434362] marvell-nfc pxa3xx-nand: 
[   40.434362] NDCR:  0x9d079fff
[   40.434362] NDCB0: 0x000d3000
[   40.434362] NDCB1: 0x5f800000
[   40.434362] NDCB2: 0x00000001
[   40.434362] NDCB3: 0x00000000
[   40.453288] nand: nand_do_read_oob: from = 0x0afe0000, len = 64
[   40.459495] marvell-nfc pxa3xx-nand: 
[   40.459495] NDCR:  0x9d079fff
[   40.459495] NDCB0: 0x000d3000
[   40.459495] NDCB1: 0x5fc00000
[   40.459495] NDCB2: 0x00000001
[   40.459495] NDCB3: 0x00000000
[   40.478411] nand: nand_do_read_oob: from = 0x0b000000, len = 64
[   40.484616] marvell-nfc pxa3xx-nand: 
[   40.484616] NDCR:  0x9d079fff
[   40.484616] NDCB0: 0x000d3000
[   40.484616] NDCB1: 0x60000000
[   40.484616] NDCB2: 0x00000001
[   40.484616] NDCB3: 0x00000000
[   40.503546] nand: nand_do_read_oob: from = 0x0b020000, len = 64
[   40.509745] marvell-nfc pxa3xx-nand: 
[   40.509745] NDCR:  0x9d079fff
[   40.509745] NDCB0: 0x000d3000
[   40.509745] NDCB1: 0x60400000
[   40.509745] NDCB2: 0x00000001
[   40.509745] NDCB3: 0x00000000
[   40.528764] nand: nand_do_read_oob: from = 0x0b040000, len = 64
[   40.534800] marvell-nfc pxa3xx-nand: 
[   40.534800] NDCR:  0x9d079fff
[   40.534800] NDCB0: 0x000d3000
[   40.534800] NDCB1: 0x60800000
[   40.534800] NDCB2: 0x00000001
[   40.534800] NDCB3: 0x00000000
[   40.553712] nand: nand_do_read_oob: from = 0x0b060000, len = 64
[   40.559912] marvell-nfc pxa3xx-nand: 
[   40.559912] NDCR:  0x9d079fff
[   40.559912] NDCB0: 0x000d3000
[   40.559912] NDCB1: 0x60c00000
[   40.559912] NDCB2: 0x00000001
[   40.559912] NDCB3: 0x00000000
[   40.578902] nand: nand_do_read_oob: from = 0x0b080000, len = 64
[   40.584939] marvell-nfc pxa3xx-nand: 
[   40.584939] NDCR:  0x9d079fff
[   40.584939] NDCB0: 0x000d3000
[   40.584939] NDCB1: 0x61000000
[   40.584939] NDCB2: 0x00000001
[   40.584939] NDCB3: 0x00000000
[   40.603877] nand: nand_do_read_oob: from = 0x0b0a0000, len = 64
[   40.610082] marvell-nfc pxa3xx-nand: 
[   40.610082] NDCR:  0x9d079fff
[   40.610082] NDCB0: 0x000d3000
[   40.610082] NDCB1: 0x61400000
[   40.610082] NDCB2: 0x00000001
[   40.610082] NDCB3: 0x00000000
[   40.629049] nand: nand_do_read_oob: from = 0x0b0c0000, len = 64
[   40.635076] marvell-nfc pxa3xx-nand: 
[   40.635076] NDCR:  0x9d079fff
[   40.635076] NDCB0: 0x000d3000
[   40.635076] NDCB1: 0x61800000
[   40.635076] NDCB2: 0x00000001
[   40.635076] NDCB3: 0x00000000
[   40.654007] nand: nand_do_read_oob: from = 0x0b0e0000, len = 64
[   40.660206] marvell-nfc pxa3xx-nand: 
[   40.660206] NDCR:  0x9d079fff
[   40.660206] NDCB0: 0x000d3000
[   40.660206] NDCB1: 0x61c00000
[   40.660206] NDCB2: 0x00000001
[   40.660206] NDCB3: 0x00000000
[   40.679134] nand: nand_do_read_oob: from = 0x0b100000, len = 64
[   40.685166] marvell-nfc pxa3xx-nand: 
[   40.685166] NDCR:  0x9d079fff
[   40.685166] NDCB0: 0x000d3000
[   40.685166] NDCB1: 0x62000000
[   40.685166] NDCB2: 0x00000001
[   40.685166] NDCB3: 0x00000000
[   40.704098] nand: nand_do_read_oob: from = 0x0b120000, len = 64
[   40.710295] marvell-nfc pxa3xx-nand: 
[   40.710295] NDCR:  0x9d079fff
[   40.710295] NDCB0: 0x000d3000
[   40.710295] NDCB1: 0x62400000
[   40.710295] NDCB2: 0x00000001
[   40.710295] NDCB3: 0x00000000
[   40.729225] nand: nand_do_read_oob: from = 0x0b140000, len = 64
[   40.735255] marvell-nfc pxa3xx-nand: 
[   40.735255] NDCR:  0x9d079fff
[   40.735255] NDCB0: 0x000d3000
[   40.735255] NDCB1: 0x62800000
[   40.735255] NDCB2: 0x00000001
[   40.735255] NDCB3: 0x00000000
[   40.754188] nand: nand_do_read_oob: from = 0x0b160000, len = 64
[   40.760393] marvell-nfc pxa3xx-nand: 
[   40.760393] NDCR:  0x9d079fff
[   40.760393] NDCB0: 0x000d3000
[   40.760393] NDCB1: 0x62c00000
[   40.760393] NDCB2: 0x00000001
[   40.760393] NDCB3: 0x00000000
[   40.779321] nand: nand_do_read_oob: from = 0x0b180000, len = 64
[   40.785355] marvell-nfc pxa3xx-nand: 
[   40.785355] NDCR:  0x9d079fff
[   40.785355] NDCB0: 0x000d3000
[   40.785355] NDCB1: 0x63000000
[   40.785355] NDCB2: 0x00000001
[   40.785355] NDCB3: 0x00000000
[   40.804288] nand: nand_do_read_oob: from = 0x0b1a0000, len = 64
[   40.810494] marvell-nfc pxa3xx-nand: 
[   40.810494] NDCR:  0x9d079fff
[   40.810494] NDCB0: 0x000d3000
[   40.810494] NDCB1: 0x63400000
[   40.810494] NDCB2: 0x00000001
[   40.810494] NDCB3: 0x00000000
[   40.829421] nand: nand_do_read_oob: from = 0x0b1c0000, len = 64
[   40.835452] marvell-nfc pxa3xx-nand: 
[   40.835452] NDCR:  0x9d079fff
[   40.835452] NDCB0: 0x000d3000
[   40.835452] NDCB1: 0x63800000
[   40.835452] NDCB2: 0x00000001
[   40.835452] NDCB3: 0x00000000
[   40.854384] nand: nand_do_read_oob: from = 0x0b1e0000, len = 64
[   40.860609] marvell-nfc pxa3xx-nand: 
[   40.860609] NDCR:  0x9d079fff
[   40.860609] NDCB0: 0x000d3000
[   40.860609] NDCB1: 0x63c00000
[   40.860609] NDCB2: 0x00000001
[   40.860609] NDCB3: 0x00000000
[   40.879540] nand: nand_do_read_oob: from = 0x0b200000, len = 64
[   40.885567] marvell-nfc pxa3xx-nand: 
[   40.885567] NDCR:  0x9d079fff
[   40.885567] NDCB0: 0x000d3000
[   40.885567] NDCB1: 0x64000000
[   40.885567] NDCB2: 0x00000001
[   40.885567] NDCB3: 0x00000000
[   40.904499] nand: nand_do_read_oob: from = 0x0b220000, len = 64
[   40.910695] marvell-nfc pxa3xx-nand: 
[   40.910695] NDCR:  0x9d079fff
[   40.910695] NDCB0: 0x000d3000
[   40.910695] NDCB1: 0x64400000
[   40.910695] NDCB2: 0x00000001
[   40.910695] NDCB3: 0x00000000
[   40.929627] nand: nand_do_read_oob: from = 0x0b240000, len = 64
[   40.935657] marvell-nfc pxa3xx-nand: 
[   40.935657] NDCR:  0x9d079fff
[   40.935657] NDCB0: 0x000d3000
[   40.935657] NDCB1: 0x64800000
[   40.935657] NDCB2: 0x00000001
[   40.935657] NDCB3: 0x00000000
[   40.954592] nand: nand_do_read_oob: from = 0x0b260000, len = 64
[   40.960798] marvell-nfc pxa3xx-nand: 
[   40.960798] NDCR:  0x9d079fff
[   40.960798] NDCB0: 0x000d3000
[   40.960798] NDCB1: 0x64c00000
[   40.960798] NDCB2: 0x00000001
[   40.960798] NDCB3: 0x00000000
[   40.979726] nand: nand_do_read_oob: from = 0x0b280000, len = 64
[   40.985756] marvell-nfc pxa3xx-nand: 
[   40.985756] NDCR:  0x9d079fff
[   40.985756] NDCB0: 0x000d3000
[   40.985756] NDCB1: 0x65000000
[   40.985756] NDCB2: 0x00000001
[   40.985756] NDCB3: 0x00000000
[   41.004694] nand: nand_do_read_oob: from = 0x0b2a0000, len = 64
[   41.010903] marvell-nfc pxa3xx-nand: 
[   41.010903] NDCR:  0x9d079fff
[   41.010903] NDCB0: 0x000d3000
[   41.010903] NDCB1: 0x65400000
[   41.010903] NDCB2: 0x00000001
[   41.010903] NDCB3: 0x00000000
[   41.029835] nand: nand_do_read_oob: from = 0x0b2c0000, len = 64
[   41.035862] marvell-nfc pxa3xx-nand: 
[   41.035862] NDCR:  0x9d079fff
[   41.035862] NDCB0: 0x000d3000
[   41.035862] NDCB1: 0x65800000
[   41.035862] NDCB2: 0x00000001
[   41.035862] NDCB3: 0x00000000
[   41.054798] nand: nand_do_read_oob: from = 0x0b2e0000, len = 64
[   41.061002] marvell-nfc pxa3xx-nand: 
[   41.061002] NDCR:  0x9d079fff
[   41.061002] NDCB0: 0x000d3000
[   41.061002] NDCB1: 0x65c00000
[   41.061002] NDCB2: 0x00000001
[   41.061002] NDCB3: 0x00000000
[   41.079930] nand: nand_do_read_oob: from = 0x0b300000, len = 64
[   41.085962] marvell-nfc pxa3xx-nand: 
[   41.085962] NDCR:  0x9d079fff
[   41.085962] NDCB0: 0x000d3000
[   41.085962] NDCB1: 0x66000000
[   41.085962] NDCB2: 0x00000001
[   41.085962] NDCB3: 0x00000000
[   41.104899] nand: nand_do_read_oob: from = 0x0b320000, len = 64
[   41.111100] marvell-nfc pxa3xx-nand: 
[   41.111100] NDCR:  0x9d079fff
[   41.111100] NDCB0: 0x000d3000
[   41.111100] NDCB1: 0x66400000
[   41.111100] NDCB2: 0x00000001
[   41.111100] NDCB3: 0x00000000
[   41.130032] nand: nand_do_read_oob: from = 0x0b340000, len = 64
[   41.136060] marvell-nfc pxa3xx-nand: 
[   41.136060] NDCR:  0x9d079fff
[   41.136060] NDCB0: 0x000d3000
[   41.136060] NDCB1: 0x66800000
[   41.136060] NDCB2: 0x00000001
[   41.136060] NDCB3: 0x00000000
[   41.154993] nand: nand_do_read_oob: from = 0x0b360000, len = 64
[   41.161199] marvell-nfc pxa3xx-nand: 
[   41.161199] NDCR:  0x9d079fff
[   41.161199] NDCB0: 0x000d3000
[   41.161199] NDCB1: 0x66c00000
[   41.161199] NDCB2: 0x00000001
[   41.161199] NDCB3: 0x00000000
[   41.180129] nand: nand_do_read_oob: from = 0x0b380000, len = 64
[   41.186158] marvell-nfc pxa3xx-nand: 
[   41.186158] NDCR:  0x9d079fff
[   41.186158] NDCB0: 0x000d3000
[   41.186158] NDCB1: 0x67000000
[   41.186158] NDCB2: 0x00000001
[   41.186158] NDCB3: 0x00000000
[   41.205093] nand: nand_do_read_oob: from = 0x0b3a0000, len = 64
[   41.211299] marvell-nfc pxa3xx-nand: 
[   41.211299] NDCR:  0x9d079fff
[   41.211299] NDCB0: 0x000d3000
[   41.211299] NDCB1: 0x67400000
[   41.211299] NDCB2: 0x00000001
[   41.211299] NDCB3: 0x00000000
[   41.230229] nand: nand_do_read_oob: from = 0x0b3c0000, len = 64
[   41.236258] marvell-nfc pxa3xx-nand: 
[   41.236258] NDCR:  0x9d079fff
[   41.236258] NDCB0: 0x000d3000
[   41.236258] NDCB1: 0x67800000
[   41.236258] NDCB2: 0x00000001
[   41.236258] NDCB3: 0x00000000
[   41.255191] nand: nand_do_read_oob: from = 0x0b3e0000, len = 64
[   41.261395] marvell-nfc pxa3xx-nand: 
[   41.261395] NDCR:  0x9d079fff
[   41.261395] NDCB0: 0x000d3000
[   41.261395] NDCB1: 0x67c00000
[   41.261395] NDCB2: 0x00000001
[   41.261395] NDCB3: 0x00000000
[   41.280327] nand: nand_do_read_oob: from = 0x0b400000, len = 64
[   41.286357] marvell-nfc pxa3xx-nand: 
[   41.286357] NDCR:  0x9d079fff
[   41.286357] NDCB0: 0x000d3000
[   41.286357] NDCB1: 0x68000000
[   41.286357] NDCB2: 0x00000001
[   41.286357] NDCB3: 0x00000000
[   41.305290] nand: nand_do_read_oob: from = 0x0b420000, len = 64
[   41.311494] marvell-nfc pxa3xx-nand: 
[   41.311494] NDCR:  0x9d079fff
[   41.311494] NDCB0: 0x000d3000
[   41.311494] NDCB1: 0x68400000
[   41.311494] NDCB2: 0x00000001
[   41.311494] NDCB3: 0x00000000
[   41.330425] nand: nand_do_read_oob: from = 0x0b440000, len = 64
[   41.336454] marvell-nfc pxa3xx-nand: 
[   41.336454] NDCR:  0x9d079fff
[   41.336454] NDCB0: 0x000d3000
[   41.336454] NDCB1: 0x68800000
[   41.336454] NDCB2: 0x00000001
[   41.336454] NDCB3: 0x00000000
[   41.355388] nand: nand_do_read_oob: from = 0x0b460000, len = 64
[   41.361591] marvell-nfc pxa3xx-nand: 
[   41.361591] NDCR:  0x9d079fff
[   41.361591] NDCB0: 0x000d3000
[   41.361591] NDCB1: 0x68c00000
[   41.361591] NDCB2: 0x00000001
[   41.361591] NDCB3: 0x00000000
[   41.380522] nand: nand_do_read_oob: from = 0x0b480000, len = 64
[   41.386553] marvell-nfc pxa3xx-nand: 
[   41.386553] NDCR:  0x9d079fff
[   41.386553] NDCB0: 0x000d3000
[   41.386553] NDCB1: 0x69000000
[   41.386553] NDCB2: 0x00000001
[   41.386553] NDCB3: 0x00000000
[   41.405484] nand: nand_do_read_oob: from = 0x0b4a0000, len = 64
[   41.411682] marvell-nfc pxa3xx-nand: 
[   41.411682] NDCR:  0x9d079fff
[   41.411682] NDCB0: 0x000d3000
[   41.411682] NDCB1: 0x69400000
[   41.411682] NDCB2: 0x00000001
[   41.411682] NDCB3: 0x00000000
[   41.430614] nand: nand_do_read_oob: from = 0x0b4c0000, len = 64
[   41.436643] marvell-nfc pxa3xx-nand: 
[   41.436643] NDCR:  0x9d079fff
[   41.436643] NDCB0: 0x000d3000
[   41.436643] NDCB1: 0x69800000
[   41.436643] NDCB2: 0x00000001
[   41.436643] NDCB3: 0x00000000
[   41.455579] nand: nand_do_read_oob: from = 0x0b4e0000, len = 64
[   41.461779] marvell-nfc pxa3xx-nand: 
[   41.461779] NDCR:  0x9d079fff
[   41.461779] NDCB0: 0x000d3000
[   41.461779] NDCB1: 0x69c00000
[   41.461779] NDCB2: 0x00000001
[   41.461779] NDCB3: 0x00000000
[   41.480710] nand: nand_do_read_oob: from = 0x0b500000, len = 64
[   41.486740] marvell-nfc pxa3xx-nand: 
[   41.486740] NDCR:  0x9d079fff
[   41.486740] NDCB0: 0x000d3000
[   41.486740] NDCB1: 0x6a000000
[   41.486740] NDCB2: 0x00000001
[   41.486740] NDCB3: 0x00000000
[   41.505693] nand: nand_do_read_oob: from = 0x0b520000, len = 64
[   41.511897] marvell-nfc pxa3xx-nand: 
[   41.511897] NDCR:  0x9d079fff
[   41.511897] NDCB0: 0x000d3000
[   41.511897] NDCB1: 0x6a400000
[   41.511897] NDCB2: 0x00000001
[   41.511897] NDCB3: 0x00000000
[   41.530827] nand: nand_do_read_oob: from = 0x0b540000, len = 64
[   41.536856] marvell-nfc pxa3xx-nand: 
[   41.536856] NDCR:  0x9d079fff
[   41.536856] NDCB0: 0x000d3000
[   41.536856] NDCB1: 0x6a800000
[   41.536856] NDCB2: 0x00000001
[   41.536856] NDCB3: 0x00000000
[   41.555792] nand: nand_do_read_oob: from = 0x0b560000, len = 64
[   41.561995] marvell-nfc pxa3xx-nand: 
[   41.561995] NDCR:  0x9d079fff
[   41.561995] NDCB0: 0x000d3000
[   41.561995] NDCB1: 0x6ac00000
[   41.561995] NDCB2: 0x00000001
[   41.561995] NDCB3: 0x00000000
[   41.580926] nand: nand_do_read_oob: from = 0x0b580000, len = 64
[   41.586956] marvell-nfc pxa3xx-nand: 
[   41.586956] NDCR:  0x9d079fff
[   41.586956] NDCB0: 0x000d3000
[   41.586956] NDCB1: 0x6b000000
[   41.586956] NDCB2: 0x00000001
[   41.586956] NDCB3: 0x00000000
[   41.605888] nand: nand_do_read_oob: from = 0x0b5a0000, len = 64
[   41.612093] marvell-nfc pxa3xx-nand: 
[   41.612093] NDCR:  0x9d079fff
[   41.612093] NDCB0: 0x000d3000
[   41.612093] NDCB1: 0x6b400000
[   41.612093] NDCB2: 0x00000001
[   41.612093] NDCB3: 0x00000000
[   41.631022] nand: nand_do_read_oob: from = 0x0b5c0000, len = 64
[   41.637055] marvell-nfc pxa3xx-nand: 
[   41.637055] NDCR:  0x9d079fff
[   41.637055] NDCB0: 0x000d3000
[   41.637055] NDCB1: 0x6b800000
[   41.637055] NDCB2: 0x00000001
[   41.637055] NDCB3: 0x00000000
[   41.655984] nand: nand_do_read_oob: from = 0x0b5e0000, len = 64
[   41.662182] marvell-nfc pxa3xx-nand: 
[   41.662182] NDCR:  0x9d079fff
[   41.662182] NDCB0: 0x000d3000
[   41.662182] NDCB1: 0x6bc00000
[   41.662182] NDCB2: 0x00000001
[   41.662182] NDCB3: 0x00000000
[   41.681112] nand: nand_do_read_oob: from = 0x0b600000, len = 64
[   41.687144] marvell-nfc pxa3xx-nand: 
[   41.687144] NDCR:  0x9d079fff
[   41.687144] NDCB0: 0x000d3000
[   41.687144] NDCB1: 0x6c000000
[   41.687144] NDCB2: 0x00000001
[   41.687144] NDCB3: 0x00000000
[   41.706076] nand: nand_do_read_oob: from = 0x0b620000, len = 64
[   41.712272] marvell-nfc pxa3xx-nand: 
[   41.712272] NDCR:  0x9d079fff
[   41.712272] NDCB0: 0x000d3000
[   41.712272] NDCB1: 0x6c400000
[   41.712272] NDCB2: 0x00000001
[   41.712272] NDCB3: 0x00000000
[   41.731202] nand: nand_do_read_oob: from = 0x0b640000, len = 64
[   41.737232] marvell-nfc pxa3xx-nand: 
[   41.737232] NDCR:  0x9d079fff
[   41.737232] NDCB0: 0x000d3000
[   41.737232] NDCB1: 0x6c800000
[   41.737232] NDCB2: 0x00000001
[   41.737232] NDCB3: 0x00000000
[   41.756168] nand: nand_do_read_oob: from = 0x0b660000, len = 64
[   41.762374] marvell-nfc pxa3xx-nand: 
[   41.762374] NDCR:  0x9d079fff
[   41.762374] NDCB0: 0x000d3000
[   41.762374] NDCB1: 0x6cc00000
[   41.762374] NDCB2: 0x00000001
[   41.762374] NDCB3: 0x00000000
[   41.781301] nand: nand_do_read_oob: from = 0x0b680000, len = 64
[   41.787332] marvell-nfc pxa3xx-nand: 
[   41.787332] NDCR:  0x9d079fff
[   41.787332] NDCB0: 0x000d3000
[   41.787332] NDCB1: 0x6d000000
[   41.787332] NDCB2: 0x00000001
[   41.787332] NDCB3: 0x00000000
[   41.806269] nand: nand_do_read_oob: from = 0x0b6a0000, len = 64
[   41.812470] marvell-nfc pxa3xx-nand: 
[   41.812470] NDCR:  0x9d079fff
[   41.812470] NDCB0: 0x000d3000
[   41.812470] NDCB1: 0x6d400000
[   41.812470] NDCB2: 0x00000001
[   41.812470] NDCB3: 0x00000000
[   41.831399] nand: nand_do_read_oob: from = 0x0b6c0000, len = 64
[   41.837430] marvell-nfc pxa3xx-nand: 
[   41.837430] NDCR:  0x9d079fff
[   41.837430] NDCB0: 0x000d3000
[   41.837430] NDCB1: 0x6d800000
[   41.837430] NDCB2: 0x00000001
[   41.837430] NDCB3: 0x00000000
[   41.856366] nand: nand_do_read_oob: from = 0x0b6e0000, len = 64
[   41.862570] marvell-nfc pxa3xx-nand: 
[   41.862570] NDCR:  0x9d079fff
[   41.862570] NDCB0: 0x000d3000
[   41.862570] NDCB1: 0x6dc00000
[   41.862570] NDCB2: 0x00000001
[   41.862570] NDCB3: 0x00000000
[   41.881497] nand: nand_do_read_oob: from = 0x0b700000, len = 64
[   41.887529] marvell-nfc pxa3xx-nand: 
[   41.887529] NDCR:  0x9d079fff
[   41.887529] NDCB0: 0x000d3000
[   41.887529] NDCB1: 0x6e000000
[   41.887529] NDCB2: 0x00000001
[   41.887529] NDCB3: 0x00000000
[   41.906462] nand: nand_do_read_oob: from = 0x0b720000, len = 64
[   41.912666] marvell-nfc pxa3xx-nand: 
[   41.912666] NDCR:  0x9d079fff
[   41.912666] NDCB0: 0x000d3000
[   41.912666] NDCB1: 0x6e400000
[   41.912666] NDCB2: 0x00000001
[   41.912666] NDCB3: 0x00000000
[   41.931596] nand: nand_do_read_oob: from = 0x0b740000, len = 64
[   41.937626] marvell-nfc pxa3xx-nand: 
[   41.937626] NDCR:  0x9d079fff
[   41.937626] NDCB0: 0x000d3000
[   41.937626] NDCB1: 0x6e800000
[   41.937626] NDCB2: 0x00000001
[   41.937626] NDCB3: 0x00000000
[   41.956559] nand: nand_do_read_oob: from = 0x0b760000, len = 64
[   41.962757] marvell-nfc pxa3xx-nand: 
[   41.962757] NDCR:  0x9d079fff
[   41.962757] NDCB0: 0x000d3000
[   41.962757] NDCB1: 0x6ec00000
[   41.962757] NDCB2: 0x00000001
[   41.962757] NDCB3: 0x00000000
[   41.981685] nand: nand_do_read_oob: from = 0x0b780000, len = 64
[   41.987717] marvell-nfc pxa3xx-nand: 
[   41.987717] NDCR:  0x9d079fff
[   41.987717] NDCB0: 0x000d3000
[   41.987717] NDCB1: 0x6f000000
[   41.987717] NDCB2: 0x00000001
[   41.987717] NDCB3: 0x00000000
[   42.006651] nand: nand_do_read_oob: from = 0x0b7a0000, len = 64
[   42.012862] marvell-nfc pxa3xx-nand: 
[   42.012862] NDCR:  0x9d079fff
[   42.012862] NDCB0: 0x000d3000
[   42.012862] NDCB1: 0x6f400000
[   42.012862] NDCB2: 0x00000001
[   42.012862] NDCB3: 0x00000000
[   42.031798] nand: nand_do_read_oob: from = 0x0b7c0000, len = 64
[   42.037834] marvell-nfc pxa3xx-nand: 
[   42.037834] NDCR:  0x9d079fff
[   42.037834] NDCB0: 0x000d3000
[   42.037834] NDCB1: 0x6f800000
[   42.037834] NDCB2: 0x00000001
[   42.037834] NDCB3: 0x00000000
[   42.056765] nand: nand_do_read_oob: from = 0x0b7e0000, len = 64
[   42.062971] marvell-nfc pxa3xx-nand: 
[   42.062971] NDCR:  0x9d079fff
[   42.062971] NDCB0: 0x000d3000
[   42.062971] NDCB1: 0x6fc00000
[   42.062971] NDCB2: 0x00000001
[   42.062971] NDCB3: 0x00000000
[   42.081901] nand: nand_do_read_oob: from = 0x0b800000, len = 64
[   42.087932] marvell-nfc pxa3xx-nand: 
[   42.087932] NDCR:  0x9d079fff
[   42.087932] NDCB0: 0x000d3000
[   42.087932] NDCB1: 0x70000000
[   42.087932] NDCB2: 0x00000001
[   42.087932] NDCB3: 0x00000000
[   42.107299] nand: nand_do_read_oob: from = 0x0b820000, len = 64
[   42.113537] marvell-nfc pxa3xx-nand: 
[   42.113537] NDCR:  0x9d079fff
[   42.113537] NDCB0: 0x000d3000
[   42.113537] NDCB1: 0x70400000
[   42.113537] NDCB2: 0x00000001
[   42.113537] NDCB3: 0x00000000
[   42.132471] nand: nand_do_read_oob: from = 0x0b840000, len = 64
[   42.138504] marvell-nfc pxa3xx-nand: 
[   42.138504] NDCR:  0x9d079fff
[   42.138504] NDCB0: 0x000d3000
[   42.138504] NDCB1: 0x70800000
[   42.138504] NDCB2: 0x00000001
[   42.138504] NDCB3: 0x00000000
[   42.157462] nand: nand_do_read_oob: from = 0x0b860000, len = 64
[   42.163667] marvell-nfc pxa3xx-nand: 
[   42.163667] NDCR:  0x9d079fff
[   42.163667] NDCB0: 0x000d3000
[   42.163667] NDCB1: 0x70c00000
[   42.163667] NDCB2: 0x00000001
[   42.163667] NDCB3: 0x00000000
[   42.182596] nand: nand_do_read_oob: from = 0x0b880000, len = 64
[   42.188630] marvell-nfc pxa3xx-nand: 
[   42.188630] NDCR:  0x9d079fff
[   42.188630] NDCB0: 0x000d3000
[   42.188630] NDCB1: 0x71000000
[   42.188630] NDCB2: 0x00000001
[   42.188630] NDCB3: 0x00000000
[   42.207679] nand: nand_do_read_oob: from = 0x0b8a0000, len = 64
[   42.213879] marvell-nfc pxa3xx-nand: 
[   42.213879] NDCR:  0x9d079fff
[   42.213879] NDCB0: 0x000d3000
[   42.213879] NDCB1: 0x71400000
[   42.213879] NDCB2: 0x00000001
[   42.213879] NDCB3: 0x00000000
[   42.232808] nand: nand_do_read_oob: from = 0x0b8c0000, len = 64
[   42.239009] marvell-nfc pxa3xx-nand: 
[   42.239009] NDCR:  0x9d079fff
[   42.239009] NDCB0: 0x000d3000
[   42.239009] NDCB1: 0x71800000
[   42.239009] NDCB2: 0x00000001
[   42.239009] NDCB3: 0x00000000
[   42.257930] nand: nand_do_read_oob: from = 0x0b8e0000, len = 64
[   42.264130] marvell-nfc pxa3xx-nand: 
[   42.264130] NDCR:  0x9d079fff
[   42.264130] NDCB0: 0x000d3000
[   42.264130] NDCB1: 0x71c00000
[   42.264130] NDCB2: 0x00000001
[   42.264130] NDCB3: 0x00000000
[   42.283062] nand: nand_do_read_oob: from = 0x0b900000, len = 64
[   42.289262] marvell-nfc pxa3xx-nand: 
[   42.289262] NDCR:  0x9d079fff
[   42.289262] NDCB0: 0x000d3000
[   42.289262] NDCB1: 0x72000000
[   42.289262] NDCB2: 0x00000001
[   42.289262] NDCB3: 0x00000000
[   42.308182] nand: nand_do_read_oob: from = 0x0b920000, len = 64
[   42.314386] marvell-nfc pxa3xx-nand: 
[   42.314386] NDCR:  0x9d079fff
[   42.314386] NDCB0: 0x000d3000
[   42.314386] NDCB1: 0x72400000
[   42.314386] NDCB2: 0x00000001
[   42.314386] NDCB3: 0x00000000
[   42.333315] nand: nand_do_read_oob: from = 0x0b940000, len = 64
[   42.339516] marvell-nfc pxa3xx-nand: 
[   42.339516] NDCR:  0x9d079fff
[   42.339516] NDCB0: 0x000d3000
[   42.339516] NDCB1: 0x72800000
[   42.339516] NDCB2: 0x00000001
[   42.339516] NDCB3: 0x00000000
[   42.358435] nand: nand_do_read_oob: from = 0x0b960000, len = 64
[   42.364639] marvell-nfc pxa3xx-nand: 
[   42.364639] NDCR:  0x9d079fff
[   42.364639] NDCB0: 0x000d3000
[   42.364639] NDCB1: 0x72c00000
[   42.364639] NDCB2: 0x00000001
[   42.364639] NDCB3: 0x00000000
[   42.383567] nand: nand_do_read_oob: from = 0x0b980000, len = 64
[   42.389770] marvell-nfc pxa3xx-nand: 
[   42.389770] NDCR:  0x9d079fff
[   42.389770] NDCB0: 0x000d3000
[   42.389770] NDCB1: 0x73000000
[   42.389770] NDCB2: 0x00000001
[   42.389770] NDCB3: 0x00000000
[   42.408784] nand: nand_do_read_oob: from = 0x0b9a0000, len = 64
[   42.414819] marvell-nfc pxa3xx-nand: 
[   42.414819] NDCR:  0x9d079fff
[   42.414819] NDCB0: 0x000d3000
[   42.414819] NDCB1: 0x73400000
[   42.414819] NDCB2: 0x00000001
[   42.414819] NDCB3: 0x00000000
[   42.433736] nand: nand_do_read_oob: from = 0x0b9c0000, len = 64
[   42.439937] marvell-nfc pxa3xx-nand: 
[   42.439937] NDCR:  0x9d079fff
[   42.439937] NDCB0: 0x000d3000
[   42.439937] NDCB1: 0x73800000
[   42.439937] NDCB2: 0x00000001
[   42.439937] NDCB3: 0x00000000
[   42.458900] nand: nand_do_read_oob: from = 0x0b9e0000, len = 64
[   42.464937] marvell-nfc pxa3xx-nand: 
[   42.464937] NDCR:  0x9d079fff
[   42.464937] NDCB0: 0x000d3000
[   42.464937] NDCB1: 0x73c00000
[   42.464937] NDCB2: 0x00000001
[   42.464937] NDCB3: 0x00000000
[   42.483875] nand: nand_do_read_oob: from = 0x0ba00000, len = 64
[   42.490079] marvell-nfc pxa3xx-nand: 
[   42.490079] NDCR:  0x9d079fff
[   42.490079] NDCB0: 0x000d3000
[   42.490079] NDCB1: 0x74000000
[   42.490079] NDCB2: 0x00000001
[   42.490079] NDCB3: 0x00000000
[   42.509044] nand: nand_do_read_oob: from = 0x0ba20000, len = 64
[   42.515075] marvell-nfc pxa3xx-nand: 
[   42.515075] NDCR:  0x9d079fff
[   42.515075] NDCB0: 0x000d3000
[   42.515075] NDCB1: 0x74400000
[   42.515075] NDCB2: 0x00000001
[   42.515075] NDCB3: 0x00000000
[   42.534005] nand: nand_do_read_oob: from = 0x0ba40000, len = 64
[   42.540203] marvell-nfc pxa3xx-nand: 
[   42.540203] NDCR:  0x9d079fff
[   42.540203] NDCB0: 0x000d3000
[   42.540203] NDCB1: 0x74800000
[   42.540203] NDCB2: 0x00000001
[   42.540203] NDCB3: 0x00000000
[   42.559132] nand: nand_do_read_oob: from = 0x0ba60000, len = 64
[   42.565165] marvell-nfc pxa3xx-nand: 
[   42.565165] NDCR:  0x9d079fff
[   42.565165] NDCB0: 0x000d3000
[   42.565165] NDCB1: 0x74c00000
[   42.565165] NDCB2: 0x00000001
[   42.565165] NDCB3: 0x00000000
[   42.584096] nand: nand_do_read_oob: from = 0x0ba80000, len = 64
[   42.590305] marvell-nfc pxa3xx-nand: 
[   42.590305] NDCR:  0x9d079fff
[   42.590305] NDCB0: 0x000d3000
[   42.590305] NDCB1: 0x75000000
[   42.590305] NDCB2: 0x00000001
[   42.590305] NDCB3: 0x00000000
[   42.609234] nand: nand_do_read_oob: from = 0x0baa0000, len = 64
[   42.615262] marvell-nfc pxa3xx-nand: 
[   42.615262] NDCR:  0x9d079fff
[   42.615262] NDCB0: 0x000d3000
[   42.615262] NDCB1: 0x75400000
[   42.615262] NDCB2: 0x00000001
[   42.615262] NDCB3: 0x00000000
[   42.634199] nand: nand_do_read_oob: from = 0x0bac0000, len = 64
[   42.640399] marvell-nfc pxa3xx-nand: 
[   42.640399] NDCR:  0x9d079fff
[   42.640399] NDCB0: 0x000d3000
[   42.640399] NDCB1: 0x75800000
[   42.640399] NDCB2: 0x00000001
[   42.640399] NDCB3: 0x00000000
[   42.659330] nand: nand_do_read_oob: from = 0x0bae0000, len = 64
[   42.665362] marvell-nfc pxa3xx-nand: 
[   42.665362] NDCR:  0x9d079fff
[   42.665362] NDCB0: 0x000d3000
[   42.665362] NDCB1: 0x75c00000
[   42.665362] NDCB2: 0x00000001
[   42.665362] NDCB3: 0x00000000
[   42.684295] nand: nand_do_read_oob: from = 0x0bb00000, len = 64
[   42.690500] marvell-nfc pxa3xx-nand: 
[   42.690500] NDCR:  0x9d079fff
[   42.690500] NDCB0: 0x000d3000
[   42.690500] NDCB1: 0x76000000
[   42.690500] NDCB2: 0x00000001
[   42.690500] NDCB3: 0x00000000
[   42.709428] nand: nand_do_read_oob: from = 0x0bb20000, len = 64
[   42.715459] marvell-nfc pxa3xx-nand: 
[   42.715459] NDCR:  0x9d079fff
[   42.715459] NDCB0: 0x000d3000
[   42.715459] NDCB1: 0x76400000
[   42.715459] NDCB2: 0x00000001
[   42.715459] NDCB3: 0x00000000
[   42.734407] nand: nand_do_read_oob: from = 0x0bb40000, len = 64
[   42.740606] marvell-nfc pxa3xx-nand: 
[   42.740606] NDCR:  0x9d079fff
[   42.740606] NDCB0: 0x000d3000
[   42.740606] NDCB1: 0x76800000
[   42.740606] NDCB2: 0x00000001
[   42.740606] NDCB3: 0x00000000
[   42.759533] nand: nand_do_read_oob: from = 0x0bb60000, len = 64
[   42.765567] marvell-nfc pxa3xx-nand: 
[   42.765567] NDCR:  0x9d079fff
[   42.765567] NDCB0: 0x000d3000
[   42.765567] NDCB1: 0x76c00000
[   42.765567] NDCB2: 0x00000001
[   42.765567] NDCB3: 0x00000000
[   42.784499] nand: nand_do_read_oob: from = 0x0bb80000, len = 64
[   42.790706] marvell-nfc pxa3xx-nand: 
[   42.790706] NDCR:  0x9d079fff
[   42.790706] NDCB0: 0x000d3000
[   42.790706] NDCB1: 0x77000000
[   42.790706] NDCB2: 0x00000001
[   42.790706] NDCB3: 0x00000000
[   42.809636] nand: nand_do_read_oob: from = 0x0bba0000, len = 64
[   42.815674] marvell-nfc pxa3xx-nand: 
[   42.815674] NDCR:  0x9d079fff
[   42.815674] NDCB0: 0x000d3000
[   42.815674] NDCB1: 0x77400000
[   42.815674] NDCB2: 0x00000001
[   42.815674] NDCB3: 0x00000000
[   42.834607] nand: nand_do_read_oob: from = 0x0bbc0000, len = 64
[   42.840811] marvell-nfc pxa3xx-nand: 
[   42.840811] NDCR:  0x9d079fff
[   42.840811] NDCB0: 0x000d3000
[   42.840811] NDCB1: 0x77800000
[   42.840811] NDCB2: 0x00000001
[   42.840811] NDCB3: 0x00000000
[   42.859740] nand: nand_do_read_oob: from = 0x0bbe0000, len = 64
[   42.865773] marvell-nfc pxa3xx-nand: 
[   42.865773] NDCR:  0x9d079fff
[   42.865773] NDCB0: 0x000d3000
[   42.865773] NDCB1: 0x77c00000
[   42.865773] NDCB2: 0x00000001
[   42.865773] NDCB3: 0x00000000
[   42.884703] nand: nand_do_read_oob: from = 0x0bc00000, len = 64
[   42.890911] marvell-nfc pxa3xx-nand: 
[   42.890911] NDCR:  0x9d079fff
[   42.890911] NDCB0: 0x000d3000
[   42.890911] NDCB1: 0x78000000
[   42.890911] NDCB2: 0x00000001
[   42.890911] NDCB3: 0x00000000
[   42.909838] nand: nand_do_read_oob: from = 0x0bc20000, len = 64
[   42.915871] marvell-nfc pxa3xx-nand: 
[   42.915871] NDCR:  0x9d079fff
[   42.915871] NDCB0: 0x000d3000
[   42.915871] NDCB1: 0x78400000
[   42.915871] NDCB2: 0x00000001
[   42.915871] NDCB3: 0x00000000
[   42.934803] nand: nand_do_read_oob: from = 0x0bc40000, len = 64
[   42.941010] marvell-nfc pxa3xx-nand: 
[   42.941010] NDCR:  0x9d079fff
[   42.941010] NDCB0: 0x000d3000
[   42.941010] NDCB1: 0x78800000
[   42.941010] NDCB2: 0x00000001
[   42.941010] NDCB3: 0x00000000
[   42.959937] nand: nand_do_read_oob: from = 0x0bc60000, len = 64
[   42.965968] marvell-nfc pxa3xx-nand: 
[   42.965968] NDCR:  0x9d079fff
[   42.965968] NDCB0: 0x000d3000
[   42.965968] NDCB1: 0x78c00000
[   42.965968] NDCB2: 0x00000001
[   42.965968] NDCB3: 0x00000000
[   42.984902] nand: nand_do_read_oob: from = 0x0bc80000, len = 64
[   42.991106] marvell-nfc pxa3xx-nand: 
[   42.991106] NDCR:  0x9d079fff
[   42.991106] NDCB0: 0x000d3000
[   42.991106] NDCB1: 0x79000000
[   42.991106] NDCB2: 0x00000001
[   42.991106] NDCB3: 0x00000000
[   43.010048] nand: nand_do_read_oob: from = 0x0bca0000, len = 64
[   43.016076] marvell-nfc pxa3xx-nand: 
[   43.016076] NDCR:  0x9d079fff
[   43.016076] NDCB0: 0x000d3000
[   43.016076] NDCB1: 0x79400000
[   43.016076] NDCB2: 0x00000001
[   43.016076] NDCB3: 0x00000000
[   43.035007] nand: nand_do_read_oob: from = 0x0bcc0000, len = 64
[   43.041214] marvell-nfc pxa3xx-nand: 
[   43.041214] NDCR:  0x9d079fff
[   43.041214] NDCB0: 0x000d3000
[   43.041214] NDCB1: 0x79800000
[   43.041214] NDCB2: 0x00000001
[   43.041214] NDCB3: 0x00000000
[   43.060141] nand: nand_do_read_oob: from = 0x0bce0000, len = 64
[   43.066175] marvell-nfc pxa3xx-nand: 
[   43.066175] NDCR:  0x9d079fff
[   43.066175] NDCB0: 0x000d3000
[   43.066175] NDCB1: 0x79c00000
[   43.066175] NDCB2: 0x00000001
[   43.066175] NDCB3: 0x00000000
[   43.085105] nand: nand_do_read_oob: from = 0x0bd00000, len = 64
[   43.091314] marvell-nfc pxa3xx-nand: 
[   43.091314] NDCR:  0x9d079fff
[   43.091314] NDCB0: 0x000d3000
[   43.091314] NDCB1: 0x7a000000
[   43.091314] NDCB2: 0x00000001
[   43.091314] NDCB3: 0x00000000
[   43.110240] nand: nand_do_read_oob: from = 0x0bd20000, len = 64
[   43.116272] marvell-nfc pxa3xx-nand: 
[   43.116272] NDCR:  0x9d079fff
[   43.116272] NDCB0: 0x000d3000
[   43.116272] NDCB1: 0x7a400000
[   43.116272] NDCB2: 0x00000001
[   43.116272] NDCB3: 0x00000000
[   43.135204] nand: nand_do_read_oob: from = 0x0bd40000, len = 64
[   43.141411] marvell-nfc pxa3xx-nand: 
[   43.141411] NDCR:  0x9d079fff
[   43.141411] NDCB0: 0x000d3000
[   43.141411] NDCB1: 0x7a800000
[   43.141411] NDCB2: 0x00000001
[   43.141411] NDCB3: 0x00000000
[   43.160337] nand: nand_do_read_oob: from = 0x0bd60000, len = 64
[   43.166371] marvell-nfc pxa3xx-nand: 
[   43.166371] NDCR:  0x9d079fff
[   43.166371] NDCB0: 0x000d3000
[   43.166371] NDCB1: 0x7ac00000
[   43.166371] NDCB2: 0x00000001
[   43.166371] NDCB3: 0x00000000
[   43.185303] nand: nand_do_read_oob: from = 0x0bd80000, len = 64
[   43.191510] marvell-nfc pxa3xx-nand: 
[   43.191510] NDCR:  0x9d079fff
[   43.191510] NDCB0: 0x000d3000
[   43.191510] NDCB1: 0x7b000000
[   43.191510] NDCB2: 0x00000001
[   43.191510] NDCB3: 0x00000000
[   43.210440] nand: nand_do_read_oob: from = 0x0bda0000, len = 64
[   43.216470] marvell-nfc pxa3xx-nand: 
[   43.216470] NDCR:  0x9d079fff
[   43.216470] NDCB0: 0x000d3000
[   43.216470] NDCB1: 0x7b400000
[   43.216470] NDCB2: 0x00000001
[   43.216470] NDCB3: 0x00000000
[   43.235401] nand: nand_do_read_oob: from = 0x0bdc0000, len = 64
[   43.241609] marvell-nfc pxa3xx-nand: 
[   43.241609] NDCR:  0x9d079fff
[   43.241609] NDCB0: 0x000d3000
[   43.241609] NDCB1: 0x7b800000
[   43.241609] NDCB2: 0x00000001
[   43.241609] NDCB3: 0x00000000
[   43.260534] nand: nand_do_read_oob: from = 0x0bde0000, len = 64
[   43.266567] marvell-nfc pxa3xx-nand: 
[   43.266567] NDCR:  0x9d079fff
[   43.266567] NDCB0: 0x000d3000
[   43.266567] NDCB1: 0x7bc00000
[   43.266567] NDCB2: 0x00000001
[   43.266567] NDCB3: 0x00000000
[   43.285500] nand: nand_do_read_oob: from = 0x0be00000, len = 64
[   43.291706] marvell-nfc pxa3xx-nand: 
[   43.291706] NDCR:  0x9d079fff
[   43.291706] NDCB0: 0x000d3000
[   43.291706] NDCB1: 0x7c000000
[   43.291706] NDCB2: 0x00000001
[   43.291706] NDCB3: 0x00000000
[   43.310634] nand: nand_do_read_oob: from = 0x0be20000, len = 64
[   43.316667] marvell-nfc pxa3xx-nand: 
[   43.316667] NDCR:  0x9d079fff
[   43.316667] NDCB0: 0x000d3000
[   43.316667] NDCB1: 0x7c400000
[   43.316667] NDCB2: 0x00000001
[   43.316667] NDCB3: 0x00000000
[   43.335599] nand: nand_do_read_oob: from = 0x0be40000, len = 64
[   43.341803] marvell-nfc pxa3xx-nand: 
[   43.341803] NDCR:  0x9d079fff
[   43.341803] NDCB0: 0x000d3000
[   43.341803] NDCB1: 0x7c800000
[   43.341803] NDCB2: 0x00000001
[   43.341803] NDCB3: 0x00000000
[   43.360751] nand: nand_do_read_oob: from = 0x0be60000, len = 64
[   43.366783] marvell-nfc pxa3xx-nand: 
[   43.366783] NDCR:  0x9d079fff
[   43.366783] NDCB0: 0x000d3000
[   43.366783] NDCB1: 0x7cc00000
[   43.366783] NDCB2: 0x00000001
[   43.366783] NDCB3: 0x00000000
[   43.385715] nand: nand_do_read_oob: from = 0x0be80000, len = 64
[   43.391921] marvell-nfc pxa3xx-nand: 
[   43.391921] NDCR:  0x9d079fff
[   43.391921] NDCB0: 0x000d3000
[   43.391921] NDCB1: 0x7d000000
[   43.391921] NDCB2: 0x00000001
[   43.391921] NDCB3: 0x00000000
[   43.410851] nand: nand_do_read_oob: from = 0x0bea0000, len = 64
[   43.416881] marvell-nfc pxa3xx-nand: 
[   43.416881] NDCR:  0x9d079fff
[   43.416881] NDCB0: 0x000d3000
[   43.416881] NDCB1: 0x7d400000
[   43.416881] NDCB2: 0x00000001
[   43.416881] NDCB3: 0x00000000
[   43.435815] nand: nand_do_read_oob: from = 0x0bec0000, len = 64
[   43.442018] marvell-nfc pxa3xx-nand: 
[   43.442018] NDCR:  0x9d079fff
[   43.442018] NDCB0: 0x000d3000
[   43.442018] NDCB1: 0x7d800000
[   43.442018] NDCB2: 0x00000001
[   43.442018] NDCB3: 0x00000000
[   43.460946] nand: nand_do_read_oob: from = 0x0bee0000, len = 64
[   43.466980] marvell-nfc pxa3xx-nand: 
[   43.466980] NDCR:  0x9d079fff
[   43.466980] NDCB0: 0x000d3000
[   43.466980] NDCB1: 0x7dc00000
[   43.466980] NDCB2: 0x00000001
[   43.466980] NDCB3: 0x00000000
[   43.485911] nand: nand_do_read_oob: from = 0x0bf00000, len = 64
[   43.492120] marvell-nfc pxa3xx-nand: 
[   43.492120] NDCR:  0x9d079fff
[   43.492120] NDCB0: 0x000d3000
[   43.492120] NDCB1: 0x7e000000
[   43.492120] NDCB2: 0x00000001
[   43.492120] NDCB3: 0x00000000
[   43.511044] nand: nand_do_read_oob: from = 0x0bf20000, len = 64
[   43.517078] marvell-nfc pxa3xx-nand: 
[   43.517078] NDCR:  0x9d079fff
[   43.517078] NDCB0: 0x000d3000
[   43.517078] NDCB1: 0x7e400000
[   43.517078] NDCB2: 0x00000001
[   43.517078] NDCB3: 0x00000000
[   43.536008] nand: nand_do_read_oob: from = 0x0bf40000, len = 64
[   43.542207] marvell-nfc pxa3xx-nand: 
[   43.542207] NDCR:  0x9d079fff
[   43.542207] NDCB0: 0x000d3000
[   43.542207] NDCB1: 0x7e800000
[   43.542207] NDCB2: 0x00000001
[   43.542207] NDCB3: 0x00000000
[   43.561135] nand: nand_do_read_oob: from = 0x0bf60000, len = 64
[   43.567167] marvell-nfc pxa3xx-nand: 
[   43.567167] NDCR:  0x9d079fff
[   43.567167] NDCB0: 0x000d3000
[   43.567167] NDCB1: 0x7ec00000
[   43.567167] NDCB2: 0x00000001
[   43.567167] NDCB3: 0x00000000
[   43.586098] nand: nand_do_read_oob: from = 0x0bf80000, len = 64
[   43.592300] marvell-nfc pxa3xx-nand: 
[   43.592300] NDCR:  0x9d079fff
[   43.592300] NDCB0: 0x000d3000
[   43.592300] NDCB1: 0x7f000000
[   43.592300] NDCB2: 0x00000001
[   43.592300] NDCB3: 0x00000000
[   43.611226] nand: nand_do_read_oob: from = 0x0bfa0000, len = 64
[   43.617256] marvell-nfc pxa3xx-nand: 
[   43.617256] NDCR:  0x9d079fff
[   43.617256] NDCB0: 0x000d3000
[   43.617256] NDCB1: 0x7f400000
[   43.617256] NDCB2: 0x00000001
[   43.617256] NDCB3: 0x00000000
[   43.636191] nand: nand_do_read_oob: from = 0x0bfc0000, len = 64
[   43.642397] marvell-nfc pxa3xx-nand: 
[   43.642397] NDCR:  0x9d079fff
[   43.642397] NDCB0: 0x000d3000
[   43.642397] NDCB1: 0x7f800000
[   43.642397] NDCB2: 0x00000001
[   43.642397] NDCB3: 0x00000000
[   43.661323] nand: nand_do_read_oob: from = 0x0bfe0000, len = 64
[   43.667356] marvell-nfc pxa3xx-nand: 
[   43.667356] NDCR:  0x9d079fff
[   43.667356] NDCB0: 0x000d3000
[   43.667356] NDCB1: 0x7fc00000
[   43.667356] NDCB2: 0x00000001
[   43.667356] NDCB3: 0x00000000
[   43.686286] nand: nand_do_read_oob: from = 0x0c000000, len = 64
[   43.692484] marvell-nfc pxa3xx-nand: 
[   43.692484] NDCR:  0x9d079fff
[   43.692484] NDCB0: 0x000d3000
[   43.692484] NDCB1: 0x80000000
[   43.692484] NDCB2: 0x00000001
[   43.692484] NDCB3: 0x00000000
[   43.711411] nand: nand_do_read_oob: from = 0x0c020000, len = 64
[   43.717447] marvell-nfc pxa3xx-nand: 
[   43.717447] NDCR:  0x9d079fff
[   43.717447] NDCB0: 0x000d3000
[   43.717447] NDCB1: 0x80400000
[   43.717447] NDCB2: 0x00000001
[   43.717447] NDCB3: 0x00000000
[   43.736375] nand: nand_do_read_oob: from = 0x0c040000, len = 64
[   43.742575] marvell-nfc pxa3xx-nand: 
[   43.742575] NDCR:  0x9d079fff
[   43.742575] NDCB0: 0x000d3000
[   43.742575] NDCB1: 0x80800000
[   43.742575] NDCB2: 0x00000001
[   43.742575] NDCB3: 0x00000000
[   43.761504] nand: nand_do_read_oob: from = 0x0c060000, len = 64
[   43.767534] marvell-nfc pxa3xx-nand: 
[   43.767534] NDCR:  0x9d079fff
[   43.767534] NDCB0: 0x000d3000
[   43.767534] NDCB1: 0x80c00000
[   43.767534] NDCB2: 0x00000001
[   43.767534] NDCB3: 0x00000000
[   43.786468] nand: nand_do_read_oob: from = 0x0c080000, len = 64
[   43.792673] marvell-nfc pxa3xx-nand: 
[   43.792673] NDCR:  0x9d079fff
[   43.792673] NDCB0: 0x000d3000
[   43.792673] NDCB1: 0x81000000
[   43.792673] NDCB2: 0x00000001
[   43.792673] NDCB3: 0x00000000
[   43.811602] nand: nand_do_read_oob: from = 0x0c0a0000, len = 64
[   43.817633] marvell-nfc pxa3xx-nand: 
[   43.817633] NDCR:  0x9d079fff
[   43.817633] NDCB0: 0x000d3000
[   43.817633] NDCB1: 0x81400000
[   43.817633] NDCB2: 0x00000001
[   43.817633] NDCB3: 0x00000000
[   43.836567] nand: nand_do_read_oob: from = 0x0c0c0000, len = 64
[   43.842772] marvell-nfc pxa3xx-nand: 
[   43.842772] NDCR:  0x9d079fff
[   43.842772] NDCB0: 0x000d3000
[   43.842772] NDCB1: 0x81800000
[   43.842772] NDCB2: 0x00000001
[   43.842772] NDCB3: 0x00000000
[   43.861701] nand: nand_do_read_oob: from = 0x0c0e0000, len = 64
[   43.867731] marvell-nfc pxa3xx-nand: 
[   43.867731] NDCR:  0x9d079fff
[   43.867731] NDCB0: 0x000d3000
[   43.867731] NDCB1: 0x81c00000
[   43.867731] NDCB2: 0x00000001
[   43.867731] NDCB3: 0x00000000
[   43.886666] nand: nand_do_read_oob: from = 0x0c100000, len = 64
[   43.892870] marvell-nfc pxa3xx-nand: 
[   43.892870] NDCR:  0x9d079fff
[   43.892870] NDCB0: 0x000d3000
[   43.892870] NDCB1: 0x82000000
[   43.892870] NDCB2: 0x00000001
[   43.892870] NDCB3: 0x00000000
[   43.911796] nand: nand_do_read_oob: from = 0x0c120000, len = 64
[   43.917831] marvell-nfc pxa3xx-nand: 
[   43.917831] NDCR:  0x9d079fff
[   43.917831] NDCB0: 0x000d3000
[   43.917831] NDCB1: 0x82400000
[   43.917831] NDCB2: 0x00000001
[   43.917831] NDCB3: 0x00000000
[   43.936765] nand: nand_do_read_oob: from = 0x0c140000, len = 64
[   43.942969] marvell-nfc pxa3xx-nand: 
[   43.942969] NDCR:  0x9d079fff
[   43.942969] NDCB0: 0x000d3000
[   43.942969] NDCB1: 0x82800000
[   43.942969] NDCB2: 0x00000001
[   43.942969] NDCB3: 0x00000000
[   43.961898] nand: nand_do_read_oob: from = 0x0c160000, len = 64
[   43.967929] marvell-nfc pxa3xx-nand: 
[   43.967929] NDCR:  0x9d079fff
[   43.967929] NDCB0: 0x000d3000
[   43.967929] NDCB1: 0x82c00000
[   43.967929] NDCB2: 0x00000001
[   43.967929] NDCB3: 0x00000000
[   43.986862] nand: nand_do_read_oob: from = 0x0c180000, len = 64
[   43.993066] marvell-nfc pxa3xx-nand: 
[   43.993066] NDCR:  0x9d079fff
[   43.993066] NDCB0: 0x000d3000
[   43.993066] NDCB1: 0x83000000
[   43.993066] NDCB2: 0x00000001
[   43.993066] NDCB3: 0x00000000
[   44.012024] nand: nand_do_read_oob: from = 0x0c1a0000, len = 64
[   44.018054] marvell-nfc pxa3xx-nand: 
[   44.018054] NDCR:  0x9d079fff
[   44.018054] NDCB0: 0x000d3000
[   44.018054] NDCB1: 0x83400000
[   44.018054] NDCB2: 0x00000001
[   44.018054] NDCB3: 0x00000000
[   44.036985] nand: nand_do_read_oob: from = 0x0c1c0000, len = 64
[   44.043183] marvell-nfc pxa3xx-nand: 
[   44.043183] NDCR:  0x9d079fff
[   44.043183] NDCB0: 0x000d3000
[   44.043183] NDCB1: 0x83800000
[   44.043183] NDCB2: 0x00000001
[   44.043183] NDCB3: 0x00000000
[   44.062110] nand: nand_do_read_oob: from = 0x0c1e0000, len = 64
[   44.068142] marvell-nfc pxa3xx-nand: 
[   44.068142] NDCR:  0x9d079fff
[   44.068142] NDCB0: 0x000d3000
[   44.068142] NDCB1: 0x83c00000
[   44.068142] NDCB2: 0x00000001
[   44.068142] NDCB3: 0x00000000
[   44.087075] nand: nand_do_read_oob: from = 0x0c200000, len = 64
[   44.093561] marvell-nfc pxa3xx-nand: 
[   44.093561] NDCR:  0x9d079fff
[   44.093561] NDCB0: 0x000d3000
[   44.093561] NDCB1: 0x84000000
[   44.093561] NDCB2: 0x00000001
[   44.093561] NDCB3: 0x00000000
[   44.112559] nand: nand_do_read_oob: from = 0x0c220000, len = 64
[   44.118595] marvell-nfc pxa3xx-nand: 
[   44.118595] NDCR:  0x9d079fff
[   44.118595] NDCB0: 0x000d3000
[   44.118595] NDCB1: 0x84400000
[   44.118595] NDCB2: 0x00000001
[   44.118595] NDCB3: 0x00000000
[   44.137638] nand: nand_do_read_oob: from = 0x0c240000, len = 64
[   44.143845] marvell-nfc pxa3xx-nand: 
[   44.143845] NDCR:  0x9d079fff
[   44.143845] NDCB0: 0x000d3000
[   44.143845] NDCB1: 0x84800000
[   44.143845] NDCB2: 0x00000001
[   44.143845] NDCB3: 0x00000000
[   44.162773] nand: nand_do_read_oob: from = 0x0c260000, len = 64
[   44.168976] marvell-nfc pxa3xx-nand: 
[   44.168976] NDCR:  0x9d079fff
[   44.168976] NDCB0: 0x000d3000
[   44.168976] NDCB1: 0x84c00000
[   44.168976] NDCB2: 0x00000001
[   44.168976] NDCB3: 0x00000000
[   44.187900] nand: nand_do_read_oob: from = 0x0c280000, len = 64
[   44.194099] marvell-nfc pxa3xx-nand: 
[   44.194099] NDCR:  0x9d079fff
[   44.194099] NDCB0: 0x000d3000
[   44.194099] NDCB1: 0x85000000
[   44.194099] NDCB2: 0x00000001
[   44.194099] NDCB3: 0x00000000
[   44.213029] nand: nand_do_read_oob: from = 0x0c2a0000, len = 64
[   44.219229] marvell-nfc pxa3xx-nand: 
[   44.219229] NDCR:  0x9d079fff
[   44.219229] NDCB0: 0x000d3000
[   44.219229] NDCB1: 0x85400000
[   44.219229] NDCB2: 0x00000001
[   44.219229] NDCB3: 0x00000000
[   44.238150] nand: nand_do_read_oob: from = 0x0c2c0000, len = 64
[   44.244354] marvell-nfc pxa3xx-nand: 
[   44.244354] NDCR:  0x9d079fff
[   44.244354] NDCB0: 0x000d3000
[   44.244354] NDCB1: 0x85800000
[   44.244354] NDCB2: 0x00000001
[   44.244354] NDCB3: 0x00000000
[   44.263283] nand: nand_do_read_oob: from = 0x0c2e0000, len = 64
[   44.269484] marvell-nfc pxa3xx-nand: 
[   44.269484] NDCR:  0x9d079fff
[   44.269484] NDCB0: 0x000d3000
[   44.269484] NDCB1: 0x85c00000
[   44.269484] NDCB2: 0x00000001
[   44.269484] NDCB3: 0x00000000
[   44.288402] nand: nand_do_read_oob: from = 0x0c300000, len = 64
[   44.294605] marvell-nfc pxa3xx-nand: 
[   44.294605] NDCR:  0x9d079fff
[   44.294605] NDCB0: 0x000d3000
[   44.294605] NDCB1: 0x86000000
[   44.294605] NDCB2: 0x00000001
[   44.294605] NDCB3: 0x00000000
[   44.313536] nand: nand_do_read_oob: from = 0x0c320000, len = 64
[   44.319735] marvell-nfc pxa3xx-nand: 
[   44.319735] NDCR:  0x9d079fff
[   44.319735] NDCB0: 0x000d3000
[   44.319735] NDCB1: 0x86400000
[   44.319735] NDCB2: 0x00000001
[   44.319735] NDCB3: 0x00000000
[   44.338760] nand: nand_do_read_oob: from = 0x0c340000, len = 64
[   44.344797] marvell-nfc pxa3xx-nand: 
[   44.344797] NDCR:  0x9d079fff
[   44.344797] NDCB0: 0x000d3000
[   44.344797] NDCB1: 0x86800000
[   44.344797] NDCB2: 0x00000001
[   44.344797] NDCB3: 0x00000000
[   44.363708] nand: nand_do_read_oob: from = 0x0c360000, len = 64
[   44.369912] marvell-nfc pxa3xx-nand: 
[   44.369912] NDCR:  0x9d079fff
[   44.369912] NDCB0: 0x000d3000
[   44.369912] NDCB1: 0x86c00000
[   44.369912] NDCB2: 0x00000001
[   44.369912] NDCB3: 0x00000000
[   44.388900] nand: nand_do_read_oob: from = 0x0c380000, len = 64
[   44.394936] marvell-nfc pxa3xx-nand: 
[   44.394936] NDCR:  0x9d079fff
[   44.394936] NDCB0: 0x000d3000
[   44.394936] NDCB1: 0x87000000
[   44.394936] NDCB2: 0x00000001
[   44.394936] NDCB3: 0x00000000
[   44.413878] nand: nand_do_read_oob: from = 0x0c3a0000, len = 64
[   44.420079] marvell-nfc pxa3xx-nand: 
[   44.420079] NDCR:  0x9d079fff
[   44.420079] NDCB0: 0x000d3000
[   44.420079] NDCB1: 0x87400000
[   44.420079] NDCB2: 0x00000001
[   44.420079] NDCB3: 0x00000000
[   44.439048] nand: nand_do_read_oob: from = 0x0c3c0000, len = 64
[   44.445083] marvell-nfc pxa3xx-nand: 
[   44.445083] NDCR:  0x9d079fff
[   44.445083] NDCB0: 0x000d3000
[   44.445083] NDCB1: 0x87800000
[   44.445083] NDCB2: 0x00000001
[   44.445083] NDCB3: 0x00000000
[   44.464017] nand: nand_do_read_oob: from = 0x0c3e0000, len = 64
[   44.470222] marvell-nfc pxa3xx-nand: 
[   44.470222] NDCR:  0x9d079fff
[   44.470222] NDCB0: 0x000d3000
[   44.470222] NDCB1: 0x87c00000
[   44.470222] NDCB2: 0x00000001
[   44.470222] NDCB3: 0x00000000
[   44.489150] nand: nand_do_read_oob: from = 0x0c400000, len = 64
[   44.495182] marvell-nfc pxa3xx-nand: 
[   44.495182] NDCR:  0x9d079fff
[   44.495182] NDCB0: 0x000d3000
[   44.495182] NDCB1: 0x88000000
[   44.495182] NDCB2: 0x00000001
[   44.495182] NDCB3: 0x00000000
[   44.514115] nand: nand_do_read_oob: from = 0x0c420000, len = 64
[   44.520320] marvell-nfc pxa3xx-nand: 
[   44.520320] NDCR:  0x9d079fff
[   44.520320] NDCB0: 0x000d3000
[   44.520320] NDCB1: 0x88400000
[   44.520320] NDCB2: 0x00000001
[   44.520320] NDCB3: 0x00000000
[   44.539252] nand: nand_do_read_oob: from = 0x0c440000, len = 64
[   44.545279] marvell-nfc pxa3xx-nand: 
[   44.545279] NDCR:  0x9d079fff
[   44.545279] NDCB0: 0x000d3000
[   44.545279] NDCB1: 0x88800000
[   44.545279] NDCB2: 0x00000001
[   44.545279] NDCB3: 0x00000000
[   44.564215] nand: nand_do_read_oob: from = 0x0c460000, len = 64
[   44.570419] marvell-nfc pxa3xx-nand: 
[   44.570419] NDCR:  0x9d079fff
[   44.570419] NDCB0: 0x000d3000
[   44.570419] NDCB1: 0x88c00000
[   44.570419] NDCB2: 0x00000001
[   44.570419] NDCB3: 0x00000000
[   44.589370] nand: nand_do_read_oob: from = 0x0c480000, len = 64
[   44.595403] marvell-nfc pxa3xx-nand: 
[   44.595403] NDCR:  0x9d079fff
[   44.595403] NDCB0: 0x000d3000
[   44.595403] NDCB1: 0x89000000
[   44.595403] NDCB2: 0x00000001
[   44.595403] NDCB3: 0x00000000
[   44.614338] nand: nand_do_read_oob: from = 0x0c4a0000, len = 64
[   44.620542] marvell-nfc pxa3xx-nand: 
[   44.620542] NDCR:  0x9d079fff
[   44.620542] NDCB0: 0x000d3000
[   44.620542] NDCB1: 0x89400000
[   44.620542] NDCB2: 0x00000001
[   44.620542] NDCB3: 0x00000000
[   44.639473] nand: nand_do_read_oob: from = 0x0c4c0000, len = 64
[   44.645503] marvell-nfc pxa3xx-nand: 
[   44.645503] NDCR:  0x9d079fff
[   44.645503] NDCB0: 0x000d3000
[   44.645503] NDCB1: 0x89800000
[   44.645503] NDCB2: 0x00000001
[   44.645503] NDCB3: 0x00000000
[   44.664626] nand: nand_do_read_oob: from = 0x0c4e0000, len = 64
[   44.670844] marvell-nfc pxa3xx-nand: 
[   44.670844] NDCR:  0x9d079fff
[   44.670844] NDCB0: 0x000d3000
[   44.670844] NDCB1: 0x89c00000
[   44.670844] NDCB2: 0x00000001
[   44.670844] NDCB3: 0x00000000
[   44.689782] nand: nand_do_read_oob: from = 0x0c500000, len = 64
[   44.695808] marvell-nfc pxa3xx-nand: 
[   44.695808] NDCR:  0x9d079fff
[   44.695808] NDCB0: 0x000d3000
[   44.695808] NDCB1: 0x8a000000
[   44.695808] NDCB2: 0x00000001
[   44.695808] NDCB3: 0x00000000
[   44.714743] nand: nand_do_read_oob: from = 0x0c520000, len = 64
[   44.720945] marvell-nfc pxa3xx-nand: 
[   44.720945] NDCR:  0x9d079fff
[   44.720945] NDCB0: 0x000d3000
[   44.720945] NDCB1: 0x8a400000
[   44.720945] NDCB2: 0x00000001
[   44.720945] NDCB3: 0x00000000
[   44.739875] nand: nand_do_read_oob: from = 0x0c540000, len = 64
[   44.745907] marvell-nfc pxa3xx-nand: 
[   44.745907] NDCR:  0x9d079fff
[   44.745907] NDCB0: 0x000d3000
[   44.745907] NDCB1: 0x8a800000
[   44.745907] NDCB2: 0x00000001
[   44.745907] NDCB3: 0x00000000
[   44.764840] nand: nand_do_read_oob: from = 0x0c560000, len = 64
[   44.771043] marvell-nfc pxa3xx-nand: 
[   44.771043] NDCR:  0x9d079fff
[   44.771043] NDCB0: 0x000d3000
[   44.771043] NDCB1: 0x8ac00000
[   44.771043] NDCB2: 0x00000001
[   44.771043] NDCB3: 0x00000000
[   44.789974] nand: nand_do_read_oob: from = 0x0c580000, len = 64
[   44.796005] marvell-nfc pxa3xx-nand: 
[   44.796005] NDCR:  0x9d079fff
[   44.796005] NDCB0: 0x000d3000
[   44.796005] NDCB1: 0x8b000000
[   44.796005] NDCB2: 0x00000001
[   44.796005] NDCB3: 0x00000000
[   44.814939] nand: nand_do_read_oob: from = 0x0c5a0000, len = 64
[   44.821143] marvell-nfc pxa3xx-nand: 
[   44.821143] NDCR:  0x9d079fff
[   44.821143] NDCB0: 0x000d3000
[   44.821143] NDCB1: 0x8b400000
[   44.821143] NDCB2: 0x00000001
[   44.821143] NDCB3: 0x00000000
[   44.840074] nand: nand_do_read_oob: from = 0x0c5c0000, len = 64
[   44.846103] marvell-nfc pxa3xx-nand: 
[   44.846103] NDCR:  0x9d079fff
[   44.846103] NDCB0: 0x000d3000
[   44.846103] NDCB1: 0x8b800000
[   44.846103] NDCB2: 0x00000001
[   44.846103] NDCB3: 0x00000000
[   44.865038] nand: nand_do_read_oob: from = 0x0c5e0000, len = 64
[   44.871241] marvell-nfc pxa3xx-nand: 
[   44.871241] NDCR:  0x9d079fff
[   44.871241] NDCB0: 0x000d3000
[   44.871241] NDCB1: 0x8bc00000
[   44.871241] NDCB2: 0x00000001
[   44.871241] NDCB3: 0x00000000
[   44.890170] nand: nand_do_read_oob: from = 0x0c600000, len = 64
[   44.896201] marvell-nfc pxa3xx-nand: 
[   44.896201] NDCR:  0x9d079fff
[   44.896201] NDCB0: 0x000d3000
[   44.896201] NDCB1: 0x8c000000
[   44.896201] NDCB2: 0x00000001
[   44.896201] NDCB3: 0x00000000
[   44.915137] nand: nand_do_read_oob: from = 0x0c620000, len = 64
[   44.921341] marvell-nfc pxa3xx-nand: 
[   44.921341] NDCR:  0x9d079fff
[   44.921341] NDCB0: 0x000d3000
[   44.921341] NDCB1: 0x8c400000
[   44.921341] NDCB2: 0x00000001
[   44.921341] NDCB3: 0x00000000
[   44.940269] nand: nand_do_read_oob: from = 0x0c640000, len = 64
[   44.946300] marvell-nfc pxa3xx-nand: 
[   44.946300] NDCR:  0x9d079fff
[   44.946300] NDCB0: 0x000d3000
[   44.946300] NDCB1: 0x8c800000
[   44.946300] NDCB2: 0x00000001
[   44.946300] NDCB3: 0x00000000
[   44.965235] nand: nand_do_read_oob: from = 0x0c660000, len = 64
[   44.971437] marvell-nfc pxa3xx-nand: 
[   44.971437] NDCR:  0x9d079fff
[   44.971437] NDCB0: 0x000d3000
[   44.971437] NDCB1: 0x8cc00000
[   44.971437] NDCB2: 0x00000001
[   44.971437] NDCB3: 0x00000000
[   44.990370] nand: nand_do_read_oob: from = 0x0c680000, len = 64
[   44.996399] marvell-nfc pxa3xx-nand: 
[   44.996399] NDCR:  0x9d079fff
[   44.996399] NDCB0: 0x000d3000
[   44.996399] NDCB1: 0x8d000000
[   44.996399] NDCB2: 0x00000001
[   44.996399] NDCB3: 0x00000000
[   45.015345] nand: nand_do_read_oob: from = 0x0c6a0000, len = 64
[   45.021547] marvell-nfc pxa3xx-nand: 
[   45.021547] NDCR:  0x9d079fff
[   45.021547] NDCB0: 0x000d3000
[   45.021547] NDCB1: 0x8d400000
[   45.021547] NDCB2: 0x00000001
[   45.021547] NDCB3: 0x00000000
[   45.040477] nand: nand_do_read_oob: from = 0x0c6c0000, len = 64
[   45.046508] marvell-nfc pxa3xx-nand: 
[   45.046508] NDCR:  0x9d079fff
[   45.046508] NDCB0: 0x000d3000
[   45.046508] NDCB1: 0x8d800000
[   45.046508] NDCB2: 0x00000001
[   45.046508] NDCB3: 0x00000000
[   45.065439] nand: nand_do_read_oob: from = 0x0c6e0000, len = 64
[   45.071644] marvell-nfc pxa3xx-nand: 
[   45.071644] NDCR:  0x9d079fff
[   45.071644] NDCB0: 0x000d3000
[   45.071644] NDCB1: 0x8dc00000
[   45.071644] NDCB2: 0x00000001
[   45.071644] NDCB3: 0x00000000
[   45.090573] nand: nand_do_read_oob: from = 0x0c700000, len = 64
[   45.096603] marvell-nfc pxa3xx-nand: 
[   45.096603] NDCR:  0x9d079fff
[   45.096603] NDCB0: 0x000d3000
[   45.096603] NDCB1: 0x8e000000
[   45.096603] NDCB2: 0x00000001
[   45.096603] NDCB3: 0x00000000
[   45.115543] nand: nand_do_read_oob: from = 0x0c720000, len = 64
[   45.121743] marvell-nfc pxa3xx-nand: 
[   45.121743] NDCR:  0x9d079fff
[   45.121743] NDCB0: 0x000d3000
[   45.121743] NDCB1: 0x8e400000
[   45.121743] NDCB2: 0x00000001
[   45.121743] NDCB3: 0x00000000
[   45.140672] nand: nand_do_read_oob: from = 0x0c740000, len = 64
[   45.146702] marvell-nfc pxa3xx-nand: 
[   45.146702] NDCR:  0x9d079fff
[   45.146702] NDCB0: 0x000d3000
[   45.146702] NDCB1: 0x8e800000
[   45.146702] NDCB2: 0x00000001
[   45.146702] NDCB3: 0x00000000
[   45.165636] nand: nand_do_read_oob: from = 0x0c760000, len = 64
[   45.171839] marvell-nfc pxa3xx-nand: 
[   45.171839] NDCR:  0x9d079fff
[   45.171839] NDCB0: 0x000d3000
[   45.171839] NDCB1: 0x8ec00000
[   45.171839] NDCB2: 0x00000001
[   45.171839] NDCB3: 0x00000000
[   45.190770] nand: nand_do_read_oob: from = 0x0c780000, len = 64
[   45.196802] marvell-nfc pxa3xx-nand: 
[   45.196802] NDCR:  0x9d079fff
[   45.196802] NDCB0: 0x000d3000
[   45.196802] NDCB1: 0x8f000000
[   45.196802] NDCB2: 0x00000001
[   45.196802] NDCB3: 0x00000000
[   45.215735] nand: nand_do_read_oob: from = 0x0c7a0000, len = 64
[   45.221962] marvell-nfc pxa3xx-nand: 
[   45.221962] NDCR:  0x9d079fff
[   45.221962] NDCB0: 0x000d3000
[   45.221962] NDCB1: 0x8f400000
[   45.221962] NDCB2: 0x00000001
[   45.221962] NDCB3: 0x00000000
[   45.240890] nand: nand_do_read_oob: from = 0x0c7c0000, len = 64
[   45.246926] marvell-nfc pxa3xx-nand: 
[   45.246926] NDCR:  0x9d079fff
[   45.246926] NDCB0: 0x000d3000
[   45.246926] NDCB1: 0x8f800000
[   45.246926] NDCB2: 0x00000001
[   45.246926] NDCB3: 0x00000000
[   45.265858] nand: nand_do_read_oob: from = 0x0c7e0000, len = 64
[   45.272055] marvell-nfc pxa3xx-nand: 
[   45.272055] NDCR:  0x9d079fff
[   45.272055] NDCB0: 0x000d3000
[   45.272055] NDCB1: 0x8fc00000
[   45.272055] NDCB2: 0x00000001
[   45.272055] NDCB3: 0x00000000
[   45.290986] nand: nand_do_read_oob: from = 0x0c800000, len = 64
[   45.297017] marvell-nfc pxa3xx-nand: 
[   45.297017] NDCR:  0x9d079fff
[   45.297017] NDCB0: 0x000d3000
[   45.297017] NDCB1: 0x90000000
[   45.297017] NDCB2: 0x00000001
[   45.297017] NDCB3: 0x00000000
[   45.315951] nand: nand_do_read_oob: from = 0x0c820000, len = 64
[   45.322155] marvell-nfc pxa3xx-nand: 
[   45.322155] NDCR:  0x9d079fff
[   45.322155] NDCB0: 0x000d3000
[   45.322155] NDCB1: 0x90400000
[   45.322155] NDCB2: 0x00000001
[   45.322155] NDCB3: 0x00000000
[   45.341083] nand: nand_do_read_oob: from = 0x0c840000, len = 64
[   45.347114] marvell-nfc pxa3xx-nand: 
[   45.347114] NDCR:  0x9d079fff
[   45.347114] NDCB0: 0x000d3000
[   45.347114] NDCB1: 0x90800000
[   45.347114] NDCB2: 0x00000001
[   45.347114] NDCB3: 0x00000000
[   45.366048] nand: nand_do_read_oob: from = 0x0c860000, len = 64
[   45.372252] marvell-nfc pxa3xx-nand: 
[   45.372252] NDCR:  0x9d079fff
[   45.372252] NDCB0: 0x000d3000
[   45.372252] NDCB1: 0x90c00000
[   45.372252] NDCB2: 0x00000001
[   45.372252] NDCB3: 0x00000000
[   45.391181] nand: nand_do_read_oob: from = 0x0c880000, len = 64
[   45.397214] marvell-nfc pxa3xx-nand: 
[   45.397214] NDCR:  0x9d079fff
[   45.397214] NDCB0: 0x000d3000
[   45.397214] NDCB1: 0x91000000
[   45.397214] NDCB2: 0x00000001
[   45.397214] NDCB3: 0x00000000
[   45.416144] nand: nand_do_read_oob: from = 0x0c8a0000, len = 64
[   45.422344] marvell-nfc pxa3xx-nand: 
[   45.422344] NDCR:  0x9d079fff
[   45.422344] NDCB0: 0x000d3000
[   45.422344] NDCB1: 0x91400000
[   45.422344] NDCB2: 0x00000001
[   45.422344] NDCB3: 0x00000000
[   45.441271] nand: nand_do_read_oob: from = 0x0c8c0000, len = 64
[   45.447303] marvell-nfc pxa3xx-nand: 
[   45.447303] NDCR:  0x9d079fff
[   45.447303] NDCB0: 0x000d3000
[   45.447303] NDCB1: 0x91800000
[   45.447303] NDCB2: 0x00000001
[   45.447303] NDCB3: 0x00000000
[   45.466236] nand: nand_do_read_oob: from = 0x0c8e0000, len = 64
[   45.472441] marvell-nfc pxa3xx-nand: 
[   45.472441] NDCR:  0x9d079fff
[   45.472441] NDCB0: 0x000d3000
[   45.472441] NDCB1: 0x91c00000
[   45.472441] NDCB2: 0x00000001
[   45.472441] NDCB3: 0x00000000
[   45.491370] nand: nand_do_read_oob: from = 0x0c900000, len = 64
[   45.497400] marvell-nfc pxa3xx-nand: 
[   45.497400] NDCR:  0x9d079fff
[   45.497400] NDCB0: 0x000d3000
[   45.497400] NDCB1: 0x92000000
[   45.497400] NDCB2: 0x00000001
[   45.497400] NDCB3: 0x00000000
[   45.516333] nand: nand_do_read_oob: from = 0x0c920000, len = 64
[   45.522540] marvell-nfc pxa3xx-nand: 
[   45.522540] NDCR:  0x9d079fff
[   45.522540] NDCB0: 0x000d3000
[   45.522540] NDCB1: 0x92400000
[   45.522540] NDCB2: 0x00000001
[   45.522540] NDCB3: 0x00000000
[   45.541466] nand: nand_do_read_oob: from = 0x0c940000, len = 64
[   45.547499] marvell-nfc pxa3xx-nand: 
[   45.547499] NDCR:  0x9d079fff
[   45.547499] NDCB0: 0x000d3000
[   45.547499] NDCB1: 0x92800000
[   45.547499] NDCB2: 0x00000001
[   45.547499] NDCB3: 0x00000000
[   45.566431] nand: nand_do_read_oob: from = 0x0c960000, len = 64
[   45.572640] marvell-nfc pxa3xx-nand: 
[   45.572640] NDCR:  0x9d079fff
[   45.572640] NDCB0: 0x000d3000
[   45.572640] NDCB1: 0x92c00000
[   45.572640] NDCB2: 0x00000001
[   45.572640] NDCB3: 0x00000000
[   45.591565] nand: nand_do_read_oob: from = 0x0c980000, len = 64
[   45.597597] marvell-nfc pxa3xx-nand: 
[   45.597597] NDCR:  0x9d079fff
[   45.597597] NDCB0: 0x000d3000
[   45.597597] NDCB1: 0x93000000
[   45.597597] NDCB2: 0x00000001
[   45.597597] NDCB3: 0x00000000
[   45.616531] nand: nand_do_read_oob: from = 0x0c9a0000, len = 64
[   45.622738] marvell-nfc pxa3xx-nand: 
[   45.622738] NDCR:  0x9d079fff
[   45.622738] NDCB0: 0x000d3000
[   45.622738] NDCB1: 0x93400000
[   45.622738] NDCB2: 0x00000001
[   45.622738] NDCB3: 0x00000000
[   45.641664] nand: nand_do_read_oob: from = 0x0c9c0000, len = 64
[   45.647698] marvell-nfc pxa3xx-nand: 
[   45.647698] NDCR:  0x9d079fff
[   45.647698] NDCB0: 0x000d3000
[   45.647698] NDCB1: 0x93800000
[   45.647698] NDCB2: 0x00000001
[   45.647698] NDCB3: 0x00000000
[   45.666628] nand: nand_do_read_oob: from = 0x0c9e0000, len = 64
[   45.672826] marvell-nfc pxa3xx-nand: 
[   45.672826] NDCR:  0x9d079fff
[   45.672826] NDCB0: 0x000d3000
[   45.672826] NDCB1: 0x93c00000
[   45.672826] NDCB2: 0x00000001
[   45.672826] NDCB3: 0x00000000
[   45.691753] nand: nand_do_read_oob: from = 0x0ca00000, len = 64
[   45.697787] marvell-nfc pxa3xx-nand: 
[   45.697787] NDCR:  0x9d079fff
[   45.697787] NDCB0: 0x000d3000
[   45.697787] NDCB1: 0x94000000
[   45.697787] NDCB2: 0x00000001
[   45.697787] NDCB3: 0x00000000
[   45.716719] nand: nand_do_read_oob: from = 0x0ca20000, len = 64
[   45.722924] marvell-nfc pxa3xx-nand: 
[   45.722924] NDCR:  0x9d079fff
[   45.722924] NDCB0: 0x000d3000
[   45.722924] NDCB1: 0x94400000
[   45.722924] NDCB2: 0x00000001
[   45.722924] NDCB3: 0x00000000
[   45.741853] nand: nand_do_read_oob: from = 0x0ca40000, len = 64
[   45.747886] marvell-nfc pxa3xx-nand: 
[   45.747886] NDCR:  0x9d079fff
[   45.747886] NDCB0: 0x000d3000
[   45.747886] NDCB1: 0x94800000
[   45.747886] NDCB2: 0x00000001
[   45.747886] NDCB3: 0x00000000
[   45.766817] nand: nand_do_read_oob: from = 0x0ca60000, len = 64
[   45.773022] marvell-nfc pxa3xx-nand: 
[   45.773022] NDCR:  0x9d079fff
[   45.773022] NDCB0: 0x000d3000
[   45.773022] NDCB1: 0x94c00000
[   45.773022] NDCB2: 0x00000001
[   45.773022] NDCB3: 0x00000000
[   45.791951] nand: nand_do_read_oob: from = 0x0ca80000, len = 64
[   45.797983] marvell-nfc pxa3xx-nand: 
[   45.797983] NDCR:  0x9d079fff
[   45.797983] NDCB0: 0x000d3000
[   45.797983] NDCB1: 0x95000000
[   45.797983] NDCB2: 0x00000001
[   45.797983] NDCB3: 0x00000000
[   45.816918] nand: nand_do_read_oob: from = 0x0caa0000, len = 64
[   45.823121] marvell-nfc pxa3xx-nand: 
[   45.823121] NDCR:  0x9d079fff
[   45.823121] NDCB0: 0x000d3000
[   45.823121] NDCB1: 0x95400000
[   45.823121] NDCB2: 0x00000001
[   45.823121] NDCB3: 0x00000000
[   45.842051] nand: nand_do_read_oob: from = 0x0cac0000, len = 64
[   45.848082] marvell-nfc pxa3xx-nand: 
[   45.848082] NDCR:  0x9d079fff
[   45.848082] NDCB0: 0x000d3000
[   45.848082] NDCB1: 0x95800000
[   45.848082] NDCB2: 0x00000001
[   45.848082] NDCB3: 0x00000000
[   45.867030] nand: nand_do_read_oob: from = 0x0cae0000, len = 64
[   45.873241] marvell-nfc pxa3xx-nand: 
[   45.873241] NDCR:  0x9d079fff
[   45.873241] NDCB0: 0x000d3000
[   45.873241] NDCB1: 0x95c00000
[   45.873241] NDCB2: 0x00000001
[   45.873241] NDCB3: 0x00000000
[   45.892165] nand: nand_do_read_oob: from = 0x0cb00000, len = 64
[   45.898198] marvell-nfc pxa3xx-nand: 
[   45.898198] NDCR:  0x9d079fff
[   45.898198] NDCB0: 0x000d3000
[   45.898198] NDCB1: 0x96000000
[   45.898198] NDCB2: 0x00000001
[   45.898198] NDCB3: 0x00000000
[   45.917130] nand: nand_do_read_oob: from = 0x0cb20000, len = 64
[   45.923335] marvell-nfc pxa3xx-nand: 
[   45.923335] NDCR:  0x9d079fff
[   45.923335] NDCB0: 0x000d3000
[   45.923335] NDCB1: 0x96400000
[   45.923335] NDCB2: 0x00000001
[   45.923335] NDCB3: 0x00000000
[   45.942263] nand: nand_do_read_oob: from = 0x0cb40000, len = 64
[   45.948295] marvell-nfc pxa3xx-nand: 
[   45.948295] NDCR:  0x9d079fff
[   45.948295] NDCB0: 0x000d3000
[   45.948295] NDCB1: 0x96800000
[   45.948295] NDCB2: 0x00000001
[   45.948295] NDCB3: 0x00000000
[   45.967227] nand: nand_do_read_oob: from = 0x0cb60000, len = 64
[   45.973433] marvell-nfc pxa3xx-nand: 
[   45.973433] NDCR:  0x9d079fff
[   45.973433] NDCB0: 0x000d3000
[   45.973433] NDCB1: 0x96c00000
[   45.973433] NDCB2: 0x00000001
[   45.973433] NDCB3: 0x00000000
[   45.992362] nand: nand_do_read_oob: from = 0x0cb80000, len = 64
[   45.998395] marvell-nfc pxa3xx-nand: 
[   45.998395] NDCR:  0x9d079fff
[   45.998395] NDCB0: 0x000d3000
[   45.998395] NDCB1: 0x97000000
[   45.998395] NDCB2: 0x00000001
[   45.998395] NDCB3: 0x00000000
[   46.017334] nand: nand_do_read_oob: from = 0x0cba0000, len = 64
[   46.023535] marvell-nfc pxa3xx-nand: 
[   46.023535] NDCR:  0x9d079fff
[   46.023535] NDCB0: 0x000d3000
[   46.023535] NDCB1: 0x97400000
[   46.023535] NDCB2: 0x00000001
[   46.023535] NDCB3: 0x00000000
[   46.042461] nand: nand_do_read_oob: from = 0x0cbc0000, len = 64
[   46.048492] marvell-nfc pxa3xx-nand: 
[   46.048492] NDCR:  0x9d079fff
[   46.048492] NDCB0: 0x000d3000
[   46.048492] NDCB1: 0x97800000
[   46.048492] NDCB2: 0x00000001
[   46.048492] NDCB3: 0x00000000
[   46.067425] nand: nand_do_read_oob: from = 0x0cbe0000, len = 64
[   46.073630] marvell-nfc pxa3xx-nand: 
[   46.073630] NDCR:  0x9d079fff
[   46.073630] NDCB0: 0x000d3000
[   46.073630] NDCB1: 0x97c00000
[   46.073630] NDCB2: 0x00000001
[   46.073630] NDCB3: 0x00000000
[   46.092889] nand: nand_do_read_oob: from = 0x0cc00000, len = 64
[   46.099125] marvell-nfc pxa3xx-nand: 
[   46.099125] NDCR:  0x9d079fff
[   46.099125] NDCB0: 0x000d3000
[   46.099125] NDCB1: 0x98000000
[   46.099125] NDCB2: 0x00000001
[   46.099125] NDCB3: 0x00000000
[   46.118047] nand: nand_do_read_oob: from = 0x0cc20000, len = 64
[   46.124245] marvell-nfc pxa3xx-nand: 
[   46.124245] NDCR:  0x9d079fff
[   46.124245] NDCB0: 0x000d3000
[   46.124245] NDCB1: 0x98400000
[   46.124245] NDCB2: 0x00000001
[   46.124245] NDCB3: 0x00000000
[   46.143177] nand: nand_do_read_oob: from = 0x0cc40000, len = 64
[   46.149376] marvell-nfc pxa3xx-nand: 
[   46.149376] NDCR:  0x9d079fff
[   46.149376] NDCB0: 0x000d3000
[   46.149376] NDCB1: 0x98800000
[   46.149376] NDCB2: 0x00000001
[   46.149376] NDCB3: 0x00000000
[   46.168296] nand: nand_do_read_oob: from = 0x0cc60000, len = 64
[   46.174499] marvell-nfc pxa3xx-nand: 
[   46.174499] NDCR:  0x9d079fff
[   46.174499] NDCB0: 0x000d3000
[   46.174499] NDCB1: 0x98c00000
[   46.174499] NDCB2: 0x00000001
[   46.174499] NDCB3: 0x00000000
[   46.193429] nand: nand_do_read_oob: from = 0x0cc80000, len = 64
[   46.199629] marvell-nfc pxa3xx-nand: 
[   46.199629] NDCR:  0x9d079fff
[   46.199629] NDCB0: 0x000d3000
[   46.199629] NDCB1: 0x99000000
[   46.199629] NDCB2: 0x00000001
[   46.199629] NDCB3: 0x00000000
[   46.218551] nand: nand_do_read_oob: from = 0x0cca0000, len = 64
[   46.224752] marvell-nfc pxa3xx-nand: 
[   46.224752] NDCR:  0x9d079fff
[   46.224752] NDCB0: 0x000d3000
[   46.224752] NDCB1: 0x99400000
[   46.224752] NDCB2: 0x00000001
[   46.224752] NDCB3: 0x00000000
[   46.243681] nand: nand_do_read_oob: from = 0x0ccc0000, len = 64
[   46.249884] marvell-nfc pxa3xx-nand: 
[   46.249884] NDCR:  0x9d079fff
[   46.249884] NDCB0: 0x000d3000
[   46.249884] NDCB1: 0x99800000
[   46.249884] NDCB2: 0x00000001
[   46.249884] NDCB3: 0x00000000
[   46.268877] nand: nand_do_read_oob: from = 0x0cce0000, len = 64
[   46.274909] marvell-nfc pxa3xx-nand: 
[   46.274909] NDCR:  0x9d079fff
[   46.274909] NDCB0: 0x000d3000
[   46.274909] NDCB1: 0x99c00000
[   46.274909] NDCB2: 0x00000001
[   46.274909] NDCB3: 0x00000000
[   46.293845] nand: nand_do_read_oob: from = 0x0cd00000, len = 64
[   46.300044] marvell-nfc pxa3xx-nand: 
[   46.300044] NDCR:  0x9d079fff
[   46.300044] NDCB0: 0x000d3000
[   46.300044] NDCB1: 0x9a000000
[   46.300044] NDCB2: 0x00000001
[   46.300044] NDCB3: 0x00000000
[   46.319009] nand: nand_do_read_oob: from = 0x0cd20000, len = 64
[   46.325037] marvell-nfc pxa3xx-nand: 
[   46.325037] NDCR:  0x9d079fff
[   46.325037] NDCB0: 0x000d3000
[   46.325037] NDCB1: 0x9a400000
[   46.325037] NDCB2: 0x00000001
[   46.325037] NDCB3: 0x00000000
[   46.343971] nand: nand_do_read_oob: from = 0x0cd40000, len = 64
[   46.350177] marvell-nfc pxa3xx-nand: 
[   46.350177] NDCR:  0x9d079fff
[   46.350177] NDCB0: 0x000d3000
[   46.350177] NDCB1: 0x9a800000
[   46.350177] NDCB2: 0x00000001
[   46.350177] NDCB3: 0x00000000
[   46.369103] nand: nand_do_read_oob: from = 0x0cd60000, len = 64
[   46.375136] marvell-nfc pxa3xx-nand: 
[   46.375136] NDCR:  0x9d079fff
[   46.375136] NDCB0: 0x000d3000
[   46.375136] NDCB1: 0x9ac00000
[   46.375136] NDCB2: 0x00000001
[   46.375136] NDCB3: 0x00000000
[   46.394070] nand: nand_do_read_oob: from = 0x0cd80000, len = 64
[   46.400273] marvell-nfc pxa3xx-nand: 
[   46.400273] NDCR:  0x9d079fff
[   46.400273] NDCB0: 0x000d3000
[   46.400273] NDCB1: 0x9b000000
[   46.400273] NDCB2: 0x00000001
[   46.400273] NDCB3: 0x00000000
[   46.419204] nand: nand_do_read_oob: from = 0x0cda0000, len = 64
[   46.425235] marvell-nfc pxa3xx-nand: 
[   46.425235] NDCR:  0x9d079fff
[   46.425235] NDCB0: 0x000d3000
[   46.425235] NDCB1: 0x9b400000
[   46.425235] NDCB2: 0x00000001
[   46.425235] NDCB3: 0x00000000
[   46.444165] nand: nand_do_read_oob: from = 0x0cdc0000, len = 64
[   46.450364] marvell-nfc pxa3xx-nand: 
[   46.450364] NDCR:  0x9d079fff
[   46.450364] NDCB0: 0x000d3000
[   46.450364] NDCB1: 0x9b800000
[   46.450364] NDCB2: 0x00000001
[   46.450364] NDCB3: 0x00000000
[   46.469315] nand: nand_do_read_oob: from = 0x0cde0000, len = 64
[   46.475343] marvell-nfc pxa3xx-nand: 
[   46.475343] NDCR:  0x9d079fff
[   46.475343] NDCB0: 0x000d3000
[   46.475343] NDCB1: 0x9bc00000
[   46.475343] NDCB2: 0x00000001
[   46.475343] NDCB3: 0x00000000
[   46.494275] nand: nand_do_read_oob: from = 0x0ce00000, len = 64
[   46.500479] marvell-nfc pxa3xx-nand: 
[   46.500479] NDCR:  0x9d079fff
[   46.500479] NDCB0: 0x000d3000
[   46.500479] NDCB1: 0x9c000000
[   46.500479] NDCB2: 0x00000001
[   46.500479] NDCB3: 0x00000000
[   46.519408] nand: nand_do_read_oob: from = 0x0ce20000, len = 64
[   46.525441] marvell-nfc pxa3xx-nand: 
[   46.525441] NDCR:  0x9d079fff
[   46.525441] NDCB0: 0x000d3000
[   46.525441] NDCB1: 0x9c400000
[   46.525441] NDCB2: 0x00000001
[   46.525441] NDCB3: 0x00000000
[   46.544374] nand: nand_do_read_oob: from = 0x0ce40000, len = 64
[   46.550580] marvell-nfc pxa3xx-nand: 
[   46.550580] NDCR:  0x9d079fff
[   46.550580] NDCB0: 0x000d3000
[   46.550580] NDCB1: 0x9c800000
[   46.550580] NDCB2: 0x00000001
[   46.550580] NDCB3: 0x00000000
[   46.569509] nand: nand_do_read_oob: from = 0x0ce60000, len = 64
[   46.575539] marvell-nfc pxa3xx-nand: 
[   46.575539] NDCR:  0x9d079fff
[   46.575539] NDCB0: 0x000d3000
[   46.575539] NDCB1: 0x9cc00000
[   46.575539] NDCB2: 0x00000001
[   46.575539] NDCB3: 0x00000000
[   46.594475] nand: nand_do_read_oob: from = 0x0ce80000, len = 64
[   46.600677] marvell-nfc pxa3xx-nand: 
[   46.600677] NDCR:  0x9d079fff
[   46.600677] NDCB0: 0x000d3000
[   46.600677] NDCB1: 0x9d000000
[   46.600677] NDCB2: 0x00000001
[   46.600677] NDCB3: 0x00000000
[   46.619606] nand: nand_do_read_oob: from = 0x0cea0000, len = 64
[   46.625638] marvell-nfc pxa3xx-nand: 
[   46.625638] NDCR:  0x9d079fff
[   46.625638] NDCB0: 0x000d3000
[   46.625638] NDCB1: 0x9d400000
[   46.625638] NDCB2: 0x00000001
[   46.625638] NDCB3: 0x00000000
[   46.644572] nand: nand_do_read_oob: from = 0x0cec0000, len = 64
[   46.650775] marvell-nfc pxa3xx-nand: 
[   46.650775] NDCR:  0x9d079fff
[   46.650775] NDCB0: 0x000d3000
[   46.650775] NDCB1: 0x9d800000
[   46.650775] NDCB2: 0x00000001
[   46.650775] NDCB3: 0x00000000
[   46.669706] nand: nand_do_read_oob: from = 0x0cee0000, len = 64
[   46.675737] marvell-nfc pxa3xx-nand: 
[   46.675737] NDCR:  0x9d079fff
[   46.675737] NDCB0: 0x000d3000
[   46.675737] NDCB1: 0x9dc00000
[   46.675737] NDCB2: 0x00000001
[   46.675737] NDCB3: 0x00000000
[   46.694670] nand: nand_do_read_oob: from = 0x0cf00000, len = 64
[   46.700875] marvell-nfc pxa3xx-nand: 
[   46.700875] NDCR:  0x9d079fff
[   46.700875] NDCB0: 0x000d3000
[   46.700875] NDCB1: 0x9e000000
[   46.700875] NDCB2: 0x00000001
[   46.700875] NDCB3: 0x00000000
[   46.719802] nand: nand_do_read_oob: from = 0x0cf20000, len = 64
[   46.725834] marvell-nfc pxa3xx-nand: 
[   46.725834] NDCR:  0x9d079fff
[   46.725834] NDCB0: 0x000d3000
[   46.725834] NDCB1: 0x9e400000
[   46.725834] NDCB2: 0x00000001
[   46.725834] NDCB3: 0x00000000
[   46.744765] nand: nand_do_read_oob: from = 0x0cf40000, len = 64
[   46.750964] marvell-nfc pxa3xx-nand: 
[   46.750964] NDCR:  0x9d079fff
[   46.750964] NDCB0: 0x000d3000
[   46.750964] NDCB1: 0x9e800000
[   46.750964] NDCB2: 0x00000001
[   46.750964] NDCB3: 0x00000000
[   46.769892] nand: nand_do_read_oob: from = 0x0cf60000, len = 64
[   46.775924] marvell-nfc pxa3xx-nand: 
[   46.775924] NDCR:  0x9d079fff
[   46.775924] NDCB0: 0x000d3000
[   46.775924] NDCB1: 0x9ec00000
[   46.775924] NDCB2: 0x00000001
[   46.775924] NDCB3: 0x00000000
[   46.794855] nand: nand_do_read_oob: from = 0x0cf80000, len = 64
[   46.801062] marvell-nfc pxa3xx-nand: 
[   46.801062] NDCR:  0x9d079fff
[   46.801062] NDCB0: 0x000d3000
[   46.801062] NDCB1: 0x9f000000
[   46.801062] NDCB2: 0x00000001
[   46.801062] NDCB3: 0x00000000
[   46.819990] nand: nand_do_read_oob: from = 0x0cfa0000, len = 64
[   46.826022] marvell-nfc pxa3xx-nand: 
[   46.826022] NDCR:  0x9d079fff
[   46.826022] NDCB0: 0x000d3000
[   46.826022] NDCB1: 0x9f400000
[   46.826022] NDCB2: 0x00000001
[   46.826022] NDCB3: 0x00000000
[   46.844955] nand: nand_do_read_oob: from = 0x0cfc0000, len = 64
[   46.851162] marvell-nfc pxa3xx-nand: 
[   46.851162] NDCR:  0x9d079fff
[   46.851162] NDCB0: 0x000d3000
[   46.851162] NDCB1: 0x9f800000
[   46.851162] NDCB2: 0x00000001
[   46.851162] NDCB3: 0x00000000
[   46.870089] nand: nand_do_read_oob: from = 0x0cfe0000, len = 64
[   46.876122] marvell-nfc pxa3xx-nand: 
[   46.876122] NDCR:  0x9d079fff
[   46.876122] NDCB0: 0x000d3000
[   46.876122] NDCB1: 0x9fc00000
[   46.876122] NDCB2: 0x00000001
[   46.876122] NDCB3: 0x00000000
[   46.895054] nand: nand_do_read_oob: from = 0x0d000000, len = 64
[   46.901262] marvell-nfc pxa3xx-nand: 
[   46.901262] NDCR:  0x9d079fff
[   46.901262] NDCB0: 0x000d3000
[   46.901262] NDCB1: 0xa0000000
[   46.901262] NDCB2: 0x00000001
[   46.901262] NDCB3: 0x00000000
[   46.920188] nand: nand_do_read_oob: from = 0x0d020000, len = 64
[   46.926220] marvell-nfc pxa3xx-nand: 
[   46.926220] NDCR:  0x9d079fff
[   46.926220] NDCB0: 0x000d3000
[   46.926220] NDCB1: 0xa0400000
[   46.926220] NDCB2: 0x00000001
[   46.926220] NDCB3: 0x00000000
[   46.945153] nand: nand_do_read_oob: from = 0x0d040000, len = 64
[   46.951358] marvell-nfc pxa3xx-nand: 
[   46.951358] NDCR:  0x9d079fff
[   46.951358] NDCB0: 0x000d3000
[   46.951358] NDCB1: 0xa0800000
[   46.951358] NDCB2: 0x00000001
[   46.951358] NDCB3: 0x00000000
[   46.970287] nand: nand_do_read_oob: from = 0x0d060000, len = 64
[   46.976316] marvell-nfc pxa3xx-nand: 
[   46.976316] NDCR:  0x9d079fff
[   46.976316] NDCB0: 0x000d3000
[   46.976316] NDCB1: 0xa0c00000
[   46.976316] NDCB2: 0x00000001
[   46.976316] NDCB3: 0x00000000
[   46.995250] nand: nand_do_read_oob: from = 0x0d080000, len = 64
[   47.001447] marvell-nfc pxa3xx-nand: 
[   47.001447] NDCR:  0x9d079fff
[   47.001447] NDCB0: 0x000d3000
[   47.001447] NDCB1: 0xa1000000
[   47.001447] NDCB2: 0x00000001
[   47.001447] NDCB3: 0x00000000
[   47.020390] nand: nand_do_read_oob: from = 0x0d0a0000, len = 64
[   47.026425] marvell-nfc pxa3xx-nand: 
[   47.026425] NDCR:  0x9d079fff
[   47.026425] NDCB0: 0x000d3000
[   47.026425] NDCB1: 0xa1400000
[   47.026425] NDCB2: 0x00000001
[   47.026425] NDCB3: 0x00000000
[   47.045358] nand: nand_do_read_oob: from = 0x0d0c0000, len = 64
[   47.051563] marvell-nfc pxa3xx-nand: 
[   47.051563] NDCR:  0x9d079fff
[   47.051563] NDCB0: 0x000d3000
[   47.051563] NDCB1: 0xa1800000
[   47.051563] NDCB2: 0x00000001
[   47.051563] NDCB3: 0x00000000
[   47.070492] nand: nand_do_read_oob: from = 0x0d0e0000, len = 64
[   47.076524] marvell-nfc pxa3xx-nand: 
[   47.076524] NDCR:  0x9d079fff
[   47.076524] NDCB0: 0x000d3000
[   47.076524] NDCB1: 0xa1c00000
[   47.076524] NDCB2: 0x00000001
[   47.076524] NDCB3: 0x00000000
[   47.095455] nand: nand_do_read_oob: from = 0x0d100000, len = 64
[   47.101681] marvell-nfc pxa3xx-nand: 
[   47.101681] NDCR:  0x9d079fff
[   47.101681] NDCB0: 0x000d3000
[   47.101681] NDCB1: 0xa2000000
[   47.101681] NDCB2: 0x00000001
[   47.101681] NDCB3: 0x00000000
[   47.120608] nand: nand_do_read_oob: from = 0x0d120000, len = 64
[   47.126638] marvell-nfc pxa3xx-nand: 
[   47.126638] NDCR:  0x9d079fff
[   47.126638] NDCB0: 0x000d3000
[   47.126638] NDCB1: 0xa2400000
[   47.126638] NDCB2: 0x00000001
[   47.126638] NDCB3: 0x00000000
[   47.145573] nand: nand_do_read_oob: from = 0x0d140000, len = 64
[   47.151778] marvell-nfc pxa3xx-nand: 
[   47.151778] NDCR:  0x9d079fff
[   47.151778] NDCB0: 0x000d3000
[   47.151778] NDCB1: 0xa2800000
[   47.151778] NDCB2: 0x00000001
[   47.151778] NDCB3: 0x00000000
[   47.170706] nand: nand_do_read_oob: from = 0x0d160000, len = 64
[   47.176739] marvell-nfc pxa3xx-nand: 
[   47.176739] NDCR:  0x9d079fff
[   47.176739] NDCB0: 0x000d3000
[   47.176739] NDCB1: 0xa2c00000
[   47.176739] NDCB2: 0x00000001
[   47.176739] NDCB3: 0x00000000
[   47.195671] nand: nand_do_read_oob: from = 0x0d180000, len = 64
[   47.201875] marvell-nfc pxa3xx-nand: 
[   47.201875] NDCR:  0x9d079fff
[   47.201875] NDCB0: 0x000d3000
[   47.201875] NDCB1: 0xa3000000
[   47.201875] NDCB2: 0x00000001
[   47.201875] NDCB3: 0x00000000
[   47.220807] nand: nand_do_read_oob: from = 0x0d1a0000, len = 64
[   47.226835] marvell-nfc pxa3xx-nand: 
[   47.226835] NDCR:  0x9d079fff
[   47.226835] NDCB0: 0x000d3000
[   47.226835] NDCB1: 0xa3400000
[   47.226835] NDCB2: 0x00000001
[   47.226835] NDCB3: 0x00000000
[   47.245769] nand: nand_do_read_oob: from = 0x0d1c0000, len = 64
[   47.251975] marvell-nfc pxa3xx-nand: 
[   47.251975] NDCR:  0x9d079fff
[   47.251975] NDCB0: 0x000d3000
[   47.251975] NDCB1: 0xa3800000
[   47.251975] NDCB2: 0x00000001
[   47.251975] NDCB3: 0x00000000
[   47.270905] nand: nand_do_read_oob: from = 0x0d1e0000, len = 64
[   47.276935] marvell-nfc pxa3xx-nand: 
[   47.276935] NDCR:  0x9d079fff
[   47.276935] NDCB0: 0x000d3000
[   47.276935] NDCB1: 0xa3c00000
[   47.276935] NDCB2: 0x00000001
[   47.276935] NDCB3: 0x00000000
[   47.295866] nand: nand_do_read_oob: from = 0x0d200000, len = 64
[   47.302062] marvell-nfc pxa3xx-nand: 
[   47.302062] NDCR:  0x9d079fff
[   47.302062] NDCB0: 0x000d3000
[   47.302062] NDCB1: 0xa4000000
[   47.302062] NDCB2: 0x00000001
[   47.302062] NDCB3: 0x00000000
[   47.320993] nand: nand_do_read_oob: from = 0x0d220000, len = 64
[   47.327024] marvell-nfc pxa3xx-nand: 
[   47.327024] NDCR:  0x9d079fff
[   47.327024] NDCB0: 0x000d3000
[   47.327024] NDCB1: 0xa4400000
[   47.327024] NDCB2: 0x00000001
[   47.327024] NDCB3: 0x00000000
[   47.345960] nand: nand_do_read_oob: from = 0x0d240000, len = 64
[   47.352161] marvell-nfc pxa3xx-nand: 
[   47.352161] NDCR:  0x9d079fff
[   47.352161] NDCB0: 0x000d3000
[   47.352161] NDCB1: 0xa4800000
[   47.352161] NDCB2: 0x00000001
[   47.352161] NDCB3: 0x00000000
[   47.371096] nand: nand_do_read_oob: from = 0x0d260000, len = 64
[   47.377132] marvell-nfc pxa3xx-nand: 
[   47.377132] NDCR:  0x9d079fff
[   47.377132] NDCB0: 0x000d3000
[   47.377132] NDCB1: 0xa4c00000
[   47.377132] NDCB2: 0x00000001
[   47.377132] NDCB3: 0x00000000
[   47.396069] nand: nand_do_read_oob: from = 0x0d280000, len = 64
[   47.402268] marvell-nfc pxa3xx-nand: 
[   47.402268] NDCR:  0x9d079fff
[   47.402268] NDCB0: 0x000d3000
[   47.402268] NDCB1: 0xa5000000
[   47.402268] NDCB2: 0x00000001
[   47.402268] NDCB3: 0x00000000
[   47.421197] nand: nand_do_read_oob: from = 0x0d2a0000, len = 64
[   47.427230] marvell-nfc pxa3xx-nand: 
[   47.427230] NDCR:  0x9d079fff
[   47.427230] NDCB0: 0x000d3000
[   47.427230] NDCB1: 0xa5400000
[   47.427230] NDCB2: 0x00000001
[   47.427230] NDCB3: 0x00000000
[   47.446163] nand: nand_do_read_oob: from = 0x0d2c0000, len = 64
[   47.452369] marvell-nfc pxa3xx-nand: 
[   47.452369] NDCR:  0x9d079fff
[   47.452369] NDCB0: 0x000d3000
[   47.452369] NDCB1: 0xa5800000
[   47.452369] NDCB2: 0x00000001
[   47.452369] NDCB3: 0x00000000
[   47.471297] nand: nand_do_read_oob: from = 0x0d2e0000, len = 64
[   47.477328] marvell-nfc pxa3xx-nand: 
[   47.477328] NDCR:  0x9d079fff
[   47.477328] NDCB0: 0x000d3000
[   47.477328] NDCB1: 0xa5c00000
[   47.477328] NDCB2: 0x00000001
[   47.477328] NDCB3: 0x00000000
[   47.496261] nand: nand_do_read_oob: from = 0x0d300000, len = 64
[   47.502465] marvell-nfc pxa3xx-nand: 
[   47.502465] NDCR:  0x9d079fff
[   47.502465] NDCB0: 0x000d3000
[   47.502465] NDCB1: 0xa6000000
[   47.502465] NDCB2: 0x00000001
[   47.502465] NDCB3: 0x00000000
[   47.521396] nand: nand_do_read_oob: from = 0x0d320000, len = 64
[   47.527426] marvell-nfc pxa3xx-nand: 
[   47.527426] NDCR:  0x9d079fff
[   47.527426] NDCB0: 0x000d3000
[   47.527426] NDCB1: 0xa6400000
[   47.527426] NDCB2: 0x00000001
[   47.527426] NDCB3: 0x00000000
[   47.546361] nand: nand_do_read_oob: from = 0x0d340000, len = 64
[   47.552565] marvell-nfc pxa3xx-nand: 
[   47.552565] NDCR:  0x9d079fff
[   47.552565] NDCB0: 0x000d3000
[   47.552565] NDCB1: 0xa6800000
[   47.552565] NDCB2: 0x00000001
[   47.552565] NDCB3: 0x00000000
[   47.571495] nand: nand_do_read_oob: from = 0x0d360000, len = 64
[   47.577527] marvell-nfc pxa3xx-nand: 
[   47.577527] NDCR:  0x9d079fff
[   47.577527] NDCB0: 0x000d3000
[   47.577527] NDCB1: 0xa6c00000
[   47.577527] NDCB2: 0x00000001
[   47.577527] NDCB3: 0x00000000
[   47.596461] nand: nand_do_read_oob: from = 0x0d380000, len = 64
[   47.602663] marvell-nfc pxa3xx-nand: 
[   47.602663] NDCR:  0x9d079fff
[   47.602663] NDCB0: 0x000d3000
[   47.602663] NDCB1: 0xa7000000
[   47.602663] NDCB2: 0x00000001
[   47.602663] NDCB3: 0x00000000
[   47.621592] nand: nand_do_read_oob: from = 0x0d3a0000, len = 64
[   47.627622] marvell-nfc pxa3xx-nand: 
[   47.627622] NDCR:  0x9d079fff
[   47.627622] NDCB0: 0x000d3000
[   47.627622] NDCB1: 0xa7400000
[   47.627622] NDCB2: 0x00000001
[   47.627622] NDCB3: 0x00000000
[   47.646556] nand: nand_do_read_oob: from = 0x0d3c0000, len = 64
[   47.652754] marvell-nfc pxa3xx-nand: 
[   47.652754] NDCR:  0x9d079fff
[   47.652754] NDCB0: 0x000d3000
[   47.652754] NDCB1: 0xa7800000
[   47.652754] NDCB2: 0x00000001
[   47.652754] NDCB3: 0x00000000
[   47.671681] nand: nand_do_read_oob: from = 0x0d3e0000, len = 64
[   47.677713] marvell-nfc pxa3xx-nand: 
[   47.677713] NDCR:  0x9d079fff
[   47.677713] NDCB0: 0x000d3000
[   47.677713] NDCB1: 0xa7c00000
[   47.677713] NDCB2: 0x00000001
[   47.677713] NDCB3: 0x00000000
[   47.696648] nand: nand_do_read_oob: from = 0x0d400000, len = 64
[   47.702852] marvell-nfc pxa3xx-nand: 
[   47.702852] NDCR:  0x9d079fff
[   47.702852] NDCB0: 0x000d3000
[   47.702852] NDCB1: 0xa8000000
[   47.702852] NDCB2: 0x00000001
[   47.702852] NDCB3: 0x00000000
[   47.721782] nand: nand_do_read_oob: from = 0x0d420000, len = 64
[   47.727812] marvell-nfc pxa3xx-nand: 
[   47.727812] NDCR:  0x9d079fff
[   47.727812] NDCB0: 0x000d3000
[   47.727812] NDCB1: 0xa8400000
[   47.727812] NDCB2: 0x00000001
[   47.727812] NDCB3: 0x00000000
[   47.746762] nand: nand_do_read_oob: from = 0x0d440000, len = 64
[   47.752970] marvell-nfc pxa3xx-nand: 
[   47.752970] NDCR:  0x9d079fff
[   47.752970] NDCB0: 0x000d3000
[   47.752970] NDCB1: 0xa8800000
[   47.752970] NDCB2: 0x00000001
[   47.752970] NDCB3: 0x00000000
[   47.771898] nand: nand_do_read_oob: from = 0x0d460000, len = 64
[   47.777928] marvell-nfc pxa3xx-nand: 
[   47.777928] NDCR:  0x9d079fff
[   47.777928] NDCB0: 0x000d3000
[   47.777928] NDCB1: 0xa8c00000
[   47.777928] NDCB2: 0x00000001
[   47.777928] NDCB3: 0x00000000
[   47.796859] nand: nand_do_read_oob: from = 0x0d480000, len = 64
[   47.803055] marvell-nfc pxa3xx-nand: 
[   47.803055] NDCR:  0x9d079fff
[   47.803055] NDCB0: 0x000d3000
[   47.803055] NDCB1: 0xa9000000
[   47.803055] NDCB2: 0x00000001
[   47.803055] NDCB3: 0x00000000
[   47.821987] nand: nand_do_read_oob: from = 0x0d4a0000, len = 64
[   47.828016] marvell-nfc pxa3xx-nand: 
[   47.828016] NDCR:  0x9d079fff
[   47.828016] NDCB0: 0x000d3000
[   47.828016] NDCB1: 0xa9400000
[   47.828016] NDCB2: 0x00000001
[   47.828016] NDCB3: 0x00000000
[   47.846948] nand: nand_do_read_oob: from = 0x0d4c0000, len = 64
[   47.853146] marvell-nfc pxa3xx-nand: 
[   47.853146] NDCR:  0x9d079fff
[   47.853146] NDCB0: 0x000d3000
[   47.853146] NDCB1: 0xa9800000
[   47.853146] NDCB2: 0x00000001
[   47.853146] NDCB3: 0x00000000
[   47.872076] nand: nand_do_read_oob: from = 0x0d4e0000, len = 64
[   47.878107] marvell-nfc pxa3xx-nand: 
[   47.878107] NDCR:  0x9d079fff
[   47.878107] NDCB0: 0x000d3000
[   47.878107] NDCB1: 0xa9c00000
[   47.878107] NDCB2: 0x00000001
[   47.878107] NDCB3: 0x00000000
[   47.897041] nand: nand_do_read_oob: from = 0x0d500000, len = 64
[   47.903247] marvell-nfc pxa3xx-nand: 
[   47.903247] NDCR:  0x9d079fff
[   47.903247] NDCB0: 0x000d3000
[   47.903247] NDCB1: 0xaa000000
[   47.903247] NDCB2: 0x00000001
[   47.903247] NDCB3: 0x00000000
[   47.922175] nand: nand_do_read_oob: from = 0x0d520000, len = 64
[   47.928205] marvell-nfc pxa3xx-nand: 
[   47.928205] NDCR:  0x9d079fff
[   47.928205] NDCB0: 0x000d3000
[   47.928205] NDCB1: 0xaa400000
[   47.928205] NDCB2: 0x00000001
[   47.928205] NDCB3: 0x00000000
[   47.947139] nand: nand_do_read_oob: from = 0x0d540000, len = 64
[   47.953342] marvell-nfc pxa3xx-nand: 
[   47.953342] NDCR:  0x9d079fff
[   47.953342] NDCB0: 0x000d3000
[   47.953342] NDCB1: 0xaa800000
[   47.953342] NDCB2: 0x00000001
[   47.953342] NDCB3: 0x00000000
[   47.972274] nand: nand_do_read_oob: from = 0x0d560000, len = 64
[   47.978303] marvell-nfc pxa3xx-nand: 
[   47.978303] NDCR:  0x9d079fff
[   47.978303] NDCB0: 0x000d3000
[   47.978303] NDCB1: 0xaac00000
[   47.978303] NDCB2: 0x00000001
[   47.978303] NDCB3: 0x00000000
[   47.997236] nand: nand_do_read_oob: from = 0x0d580000, len = 64
[   48.003442] marvell-nfc pxa3xx-nand: 
[   48.003442] NDCR:  0x9d079fff
[   48.003442] NDCB0: 0x000d3000
[   48.003442] NDCB1: 0xab000000
[   48.003442] NDCB2: 0x00000001
[   48.003442] NDCB3: 0x00000000
[   48.022381] nand: nand_do_read_oob: from = 0x0d5a0000, len = 64
[   48.028411] marvell-nfc pxa3xx-nand: 
[   48.028411] NDCR:  0x9d079fff
[   48.028411] NDCB0: 0x000d3000
[   48.028411] NDCB1: 0xab400000
[   48.028411] NDCB2: 0x00000001
[   48.028411] NDCB3: 0x00000000
[   48.047345] nand: nand_do_read_oob: from = 0x0d5c0000, len = 64
[   48.053549] marvell-nfc pxa3xx-nand: 
[   48.053549] NDCR:  0x9d079fff
[   48.053549] NDCB0: 0x000d3000
[   48.053549] NDCB1: 0xab800000
[   48.053549] NDCB2: 0x00000001
[   48.053549] NDCB3: 0x00000000
[   48.072476] nand: nand_do_read_oob: from = 0x0d5e0000, len = 64
[   48.078509] marvell-nfc pxa3xx-nand: 
[   48.078509] NDCR:  0x9d079fff
[   48.078509] NDCB0: 0x000d3000
[   48.078509] NDCB1: 0xabc00000
[   48.078509] NDCB2: 0x00000001
[   48.078509] NDCB3: 0x00000000
[   48.097879] nand: nand_do_read_oob: from = 0x0d600000, len = 64
[   48.104114] marvell-nfc pxa3xx-nand: 
[   48.104114] NDCR:  0x9d079fff
[   48.104114] NDCB0: 0x000d3000
[   48.104114] NDCB1: 0xac000000
[   48.104114] NDCB2: 0x00000001
[   48.104114] NDCB3: 0x00000000
[   48.123053] nand: nand_do_read_oob: from = 0x0d620000, len = 64
[   48.129253] marvell-nfc pxa3xx-nand: 
[   48.129253] NDCR:  0x9d079fff
[   48.129253] NDCB0: 0x000d3000
[   48.129253] NDCB1: 0xac400000
[   48.129253] NDCB2: 0x00000001
[   48.129253] NDCB3: 0x00000000
[   48.148175] nand: nand_do_read_oob: from = 0x0d640000, len = 64
[   48.154376] marvell-nfc pxa3xx-nand: 
[   48.154376] NDCR:  0x9d079fff
[   48.154376] NDCB0: 0x000d3000
[   48.154376] NDCB1: 0xac800000
[   48.154376] NDCB2: 0x00000001
[   48.154376] NDCB3: 0x00000000
[   48.173310] nand: nand_do_read_oob: from = 0x0d660000, len = 64
[   48.179516] marvell-nfc pxa3xx-nand: 
[   48.179516] NDCR:  0x9d079fff
[   48.179516] NDCB0: 0x000d3000
[   48.179516] NDCB1: 0xacc00000
[   48.179516] NDCB2: 0x00000001
[   48.179516] NDCB3: 0x00000000
[   48.198437] nand: nand_do_read_oob: from = 0x0d680000, len = 64
[   48.204636] marvell-nfc pxa3xx-nand: 
[   48.204636] NDCR:  0x9d079fff
[   48.204636] NDCB0: 0x000d3000
[   48.204636] NDCB1: 0xad000000
[   48.204636] NDCB2: 0x00000001
[   48.204636] NDCB3: 0x00000000
[   48.223568] nand: nand_do_read_oob: from = 0x0d6a0000, len = 64
[   48.229769] marvell-nfc pxa3xx-nand: 
[   48.229769] NDCR:  0x9d079fff
[   48.229769] NDCB0: 0x000d3000
[   48.229769] NDCB1: 0xad400000
[   48.229769] NDCB2: 0x00000001
[   48.229769] NDCB3: 0x00000000
[   48.248784] nand: nand_do_read_oob: from = 0x0d6c0000, len = 64
[   48.254819] marvell-nfc pxa3xx-nand: 
[   48.254819] NDCR:  0x9d079fff
[   48.254819] NDCB0: 0x000d3000
[   48.254819] NDCB1: 0xad800000
[   48.254819] NDCB2: 0x00000001
[   48.254819] NDCB3: 0x00000000
[   48.273742] nand: nand_do_read_oob: from = 0x0d6e0000, len = 64
[   48.279946] marvell-nfc pxa3xx-nand: 
[   48.279946] NDCR:  0x9d079fff
[   48.279946] NDCB0: 0x000d3000
[   48.279946] NDCB1: 0xadc00000
[   48.279946] NDCB2: 0x00000001
[   48.279946] NDCB3: 0x00000000
[   48.298898] nand: nand_do_read_oob: from = 0x0d700000, len = 64
[   48.304935] marvell-nfc pxa3xx-nand: 
[   48.304935] NDCR:  0x9d079fff
[   48.304935] NDCB0: 0x000d3000
[   48.304935] NDCB1: 0xae000000
[   48.304935] NDCB2: 0x00000001
[   48.304935] NDCB3: 0x00000000
[   48.323875] nand: nand_do_read_oob: from = 0x0d720000, len = 64
[   48.330079] marvell-nfc pxa3xx-nand: 
[   48.330079] NDCR:  0x9d079fff
[   48.330079] NDCB0: 0x000d3000
[   48.330079] NDCB1: 0xae400000
[   48.330079] NDCB2: 0x00000001
[   48.330079] NDCB3: 0x00000000
[   48.349067] nand: nand_do_read_oob: from = 0x0d740000, len = 64
[   48.355098] marvell-nfc pxa3xx-nand: 
[   48.355098] NDCR:  0x9d079fff
[   48.355098] NDCB0: 0x000d3000
[   48.355098] NDCB1: 0xae800000
[   48.355098] NDCB2: 0x00000001
[   48.355098] NDCB3: 0x00000000
[   48.374031] nand: nand_do_read_oob: from = 0x0d760000, len = 64
[   48.380237] marvell-nfc pxa3xx-nand: 
[   48.380237] NDCR:  0x9d079fff
[   48.380237] NDCB0: 0x000d3000
[   48.380237] NDCB1: 0xaec00000
[   48.380237] NDCB2: 0x00000001
[   48.380237] NDCB3: 0x00000000
[   48.399163] nand: nand_do_read_oob: from = 0x0d780000, len = 64
[   48.405197] marvell-nfc pxa3xx-nand: 
[   48.405197] NDCR:  0x9d079fff
[   48.405197] NDCB0: 0x000d3000
[   48.405197] NDCB1: 0xaf000000
[   48.405197] NDCB2: 0x00000001
[   48.405197] NDCB3: 0x00000000
[   48.424134] nand: nand_do_read_oob: from = 0x0d7a0000, len = 64
[   48.430336] marvell-nfc pxa3xx-nand: 
[   48.430336] NDCR:  0x9d079fff
[   48.430336] NDCB0: 0x000d3000
[   48.430336] NDCB1: 0xaf400000
[   48.430336] NDCB2: 0x00000001
[   48.430336] NDCB3: 0x00000000
[   48.449263] nand: nand_do_read_oob: from = 0x0d7c0000, len = 64
[   48.455295] marvell-nfc pxa3xx-nand: 
[   48.455295] NDCR:  0x9d079fff
[   48.455295] NDCB0: 0x000d3000
[   48.455295] NDCB1: 0xaf800000
[   48.455295] NDCB2: 0x00000001
[   48.455295] NDCB3: 0x00000000
[   48.474226] nand: nand_do_read_oob: from = 0x0d7e0000, len = 64
[   48.480426] marvell-nfc pxa3xx-nand: 
[   48.480426] NDCR:  0x9d079fff
[   48.480426] NDCB0: 0x000d3000
[   48.480426] NDCB1: 0xafc00000
[   48.480426] NDCB2: 0x00000001
[   48.480426] NDCB3: 0x00000000
[   48.499354] nand: nand_do_read_oob: from = 0x0d800000, len = 64
[   48.505386] marvell-nfc pxa3xx-nand: 
[   48.505386] NDCR:  0x9d079fff
[   48.505386] NDCB0: 0x000d3000
[   48.505386] NDCB1: 0xb0000000
[   48.505386] NDCB2: 0x00000001
[   48.505386] NDCB3: 0x00000000
[   48.524317] nand: nand_do_read_oob: from = 0x0d820000, len = 64
[   48.530523] marvell-nfc pxa3xx-nand: 
[   48.530523] NDCR:  0x9d079fff
[   48.530523] NDCB0: 0x000d3000
[   48.530523] NDCB1: 0xb0400000
[   48.530523] NDCB2: 0x00000001
[   48.530523] NDCB3: 0x00000000
[   48.549450] nand: nand_do_read_oob: from = 0x0d840000, len = 64
[   48.555484] marvell-nfc pxa3xx-nand: 
[   48.555484] NDCR:  0x9d079fff
[   48.555484] NDCB0: 0x000d3000
[   48.555484] NDCB1: 0xb0800000
[   48.555484] NDCB2: 0x00000001
[   48.555484] NDCB3: 0x00000000
[   48.574414] nand: nand_do_read_oob: from = 0x0d860000, len = 64
[   48.580613] marvell-nfc pxa3xx-nand: 
[   48.580613] NDCR:  0x9d079fff
[   48.580613] NDCB0: 0x000d3000
[   48.580613] NDCB1: 0xb0c00000
[   48.580613] NDCB2: 0x00000001
[   48.580613] NDCB3: 0x00000000
[   48.599540] nand: nand_do_read_oob: from = 0x0d880000, len = 64
[   48.605573] marvell-nfc pxa3xx-nand: 
[   48.605573] NDCR:  0x9d079fff
[   48.605573] NDCB0: 0x000d3000
[   48.605573] NDCB1: 0xb1000000
[   48.605573] NDCB2: 0x00000001
[   48.605573] NDCB3: 0x00000000
[   48.624507] nand: nand_do_read_oob: from = 0x0d8a0000, len = 64
[   48.630712] marvell-nfc pxa3xx-nand: 
[   48.630712] NDCR:  0x9d079fff
[   48.630712] NDCB0: 0x000d3000
[   48.630712] NDCB1: 0xb1400000
[   48.630712] NDCB2: 0x00000001
[   48.630712] NDCB3: 0x00000000
[   48.649636] nand: nand_do_read_oob: from = 0x0d8c0000, len = 64
[   48.655671] marvell-nfc pxa3xx-nand: 
[   48.655671] NDCR:  0x9d079fff
[   48.655671] NDCB0: 0x000d3000
[   48.655671] NDCB1: 0xb1800000
[   48.655671] NDCB2: 0x00000001
[   48.655671] NDCB3: 0x00000000
[   48.674606] nand: nand_do_read_oob: from = 0x0d8e0000, len = 64
[   48.680811] marvell-nfc pxa3xx-nand: 
[   48.680811] NDCR:  0x9d079fff
[   48.680811] NDCB0: 0x000d3000
[   48.680811] NDCB1: 0xb1c00000
[   48.680811] NDCB2: 0x00000001
[   48.680811] NDCB3: 0x00000000
[   48.699737] nand: nand_do_read_oob: from = 0x0d900000, len = 64
[   48.705771] marvell-nfc pxa3xx-nand: 
[   48.705771] NDCR:  0x9d079fff
[   48.705771] NDCB0: 0x000d3000
[   48.705771] NDCB1: 0xb2000000
[   48.705771] NDCB2: 0x00000001
[   48.705771] NDCB3: 0x00000000
[   48.724702] nand: nand_do_read_oob: from = 0x0d920000, len = 64
[   48.730909] marvell-nfc pxa3xx-nand: 
[   48.730909] NDCR:  0x9d079fff
[   48.730909] NDCB0: 0x000d3000
[   48.730909] NDCB1: 0xb2400000
[   48.730909] NDCB2: 0x00000001
[   48.730909] NDCB3: 0x00000000
[   48.749835] nand: nand_do_read_oob: from = 0x0d940000, len = 64
[   48.755867] marvell-nfc pxa3xx-nand: 
[   48.755867] NDCR:  0x9d079fff
[   48.755867] NDCB0: 0x000d3000
[   48.755867] NDCB1: 0xb2800000
[   48.755867] NDCB2: 0x00000001
[   48.755867] NDCB3: 0x00000000
[   48.774801] nand: nand_do_read_oob: from = 0x0d960000, len = 64
[   48.781008] marvell-nfc pxa3xx-nand: 
[   48.781008] NDCR:  0x9d079fff
[   48.781008] NDCB0: 0x000d3000
[   48.781008] NDCB1: 0xb2c00000
[   48.781008] NDCB2: 0x00000001
[   48.781008] NDCB3: 0x00000000
[   48.799934] nand: nand_do_read_oob: from = 0x0d980000, len = 64
[   48.805966] marvell-nfc pxa3xx-nand: 
[   48.805966] NDCR:  0x9d079fff
[   48.805966] NDCB0: 0x000d3000
[   48.805966] NDCB1: 0xb3000000
[   48.805966] NDCB2: 0x00000001
[   48.805966] NDCB3: 0x00000000
[   48.824900] nand: nand_do_read_oob: from = 0x0d9a0000, len = 64
[   48.831106] marvell-nfc pxa3xx-nand: 
[   48.831106] NDCR:  0x9d079fff
[   48.831106] NDCB0: 0x000d3000
[   48.831106] NDCB1: 0xb3400000
[   48.831106] NDCB2: 0x00000001
[   48.831106] NDCB3: 0x00000000
[   48.850033] nand: nand_do_read_oob: from = 0x0d9c0000, len = 64
[   48.856066] marvell-nfc pxa3xx-nand: 
[   48.856066] NDCR:  0x9d079fff
[   48.856066] NDCB0: 0x000d3000
[   48.856066] NDCB1: 0xb3800000
[   48.856066] NDCB2: 0x00000001
[   48.856066] NDCB3: 0x00000000
[   48.874996] nand: nand_do_read_oob: from = 0x0d9e0000, len = 64
[   48.881196] marvell-nfc pxa3xx-nand: 
[   48.881196] NDCR:  0x9d079fff
[   48.881196] NDCB0: 0x000d3000
[   48.881196] NDCB1: 0xb3c00000
[   48.881196] NDCB2: 0x00000001
[   48.881196] NDCB3: 0x00000000
[   48.900126] nand: nand_do_read_oob: from = 0x0da00000, len = 64
[   48.906155] marvell-nfc pxa3xx-nand: 
[   48.906155] NDCR:  0x9d079fff
[   48.906155] NDCB0: 0x000d3000
[   48.906155] NDCB1: 0xb4000000
[   48.906155] NDCB2: 0x00000001
[   48.906155] NDCB3: 0x00000000
[   48.925088] nand: nand_do_read_oob: from = 0x0da20000, len = 64
[   48.931293] marvell-nfc pxa3xx-nand: 
[   48.931293] NDCR:  0x9d079fff
[   48.931293] NDCB0: 0x000d3000
[   48.931293] NDCB1: 0xb4400000
[   48.931293] NDCB2: 0x00000001
[   48.931293] NDCB3: 0x00000000
[   48.950222] nand: nand_do_read_oob: from = 0x0da40000, len = 64
[   48.956253] marvell-nfc pxa3xx-nand: 
[   48.956253] NDCR:  0x9d079fff
[   48.956253] NDCB0: 0x000d3000
[   48.956253] NDCB1: 0xb4800000
[   48.956253] NDCB2: 0x00000001
[   48.956253] NDCB3: 0x00000000
[   48.975194] nand: nand_do_read_oob: from = 0x0da60000, len = 64
[   48.981412] marvell-nfc pxa3xx-nand: 
[   48.981412] NDCR:  0x9d079fff
[   48.981412] NDCB0: 0x000d3000
[   48.981412] NDCB1: 0xb4c00000
[   48.981412] NDCB2: 0x00000001
[   48.981412] NDCB3: 0x00000000
[   49.000340] nand: nand_do_read_oob: from = 0x0da80000, len = 64
[   49.006369] marvell-nfc pxa3xx-nand: 
[   49.006369] NDCR:  0x9d079fff
[   49.006369] NDCB0: 0x000d3000
[   49.006369] NDCB1: 0xb5000000
[   49.006369] NDCB2: 0x00000001
[   49.006369] NDCB3: 0x00000000
[   49.025312] nand: nand_do_read_oob: from = 0x0daa0000, len = 64
[   49.031521] marvell-nfc pxa3xx-nand: 
[   49.031521] NDCR:  0x9d079fff
[   49.031521] NDCB0: 0x000d3000
[   49.031521] NDCB1: 0xb5400000
[   49.031521] NDCB2: 0x00000001
[   49.031521] NDCB3: 0x00000000
[   49.050446] nand: nand_do_read_oob: from = 0x0dac0000, len = 64
[   49.056477] marvell-nfc pxa3xx-nand: 
[   49.056477] NDCR:  0x9d079fff
[   49.056477] NDCB0: 0x000d3000
[   49.056477] NDCB1: 0xb5800000
[   49.056477] NDCB2: 0x00000001
[   49.056477] NDCB3: 0x00000000
[   49.075410] nand: nand_do_read_oob: from = 0x0dae0000, len = 64
[   49.081617] marvell-nfc pxa3xx-nand: 
[   49.081617] NDCR:  0x9d079fff
[   49.081617] NDCB0: 0x000d3000
[   49.081617] NDCB1: 0xb5c00000
[   49.081617] NDCB2: 0x00000001
[   49.081617] NDCB3: 0x00000000
[   49.100544] nand: nand_do_read_oob: from = 0x0db00000, len = 64
[   49.106576] marvell-nfc pxa3xx-nand: 
[   49.106576] NDCR:  0x9d079fff
[   49.106576] NDCB0: 0x000d3000
[   49.106576] NDCB1: 0xb6000000
[   49.106576] NDCB2: 0x00000001
[   49.106576] NDCB3: 0x00000000
[   49.125510] nand: nand_do_read_oob: from = 0x0db20000, len = 64
[   49.131714] marvell-nfc pxa3xx-nand: 
[   49.131714] NDCR:  0x9d079fff
[   49.131714] NDCB0: 0x000d3000
[   49.131714] NDCB1: 0xb6400000
[   49.131714] NDCB2: 0x00000001
[   49.131714] NDCB3: 0x00000000
[   49.150639] nand: nand_do_read_oob: from = 0x0db40000, len = 64
[   49.156675] marvell-nfc pxa3xx-nand: 
[   49.156675] NDCR:  0x9d079fff
[   49.156675] NDCB0: 0x000d3000
[   49.156675] NDCB1: 0xb6800000
[   49.156675] NDCB2: 0x00000001
[   49.156675] NDCB3: 0x00000000
[   49.175608] nand: nand_do_read_oob: from = 0x0db60000, len = 64
[   49.181812] marvell-nfc pxa3xx-nand: 
[   49.181812] NDCR:  0x9d079fff
[   49.181812] NDCB0: 0x000d3000
[   49.181812] NDCB1: 0xb6c00000
[   49.181812] NDCB2: 0x00000001
[   49.181812] NDCB3: 0x00000000
[   49.200741] nand: nand_do_read_oob: from = 0x0db80000, len = 64
[   49.206771] marvell-nfc pxa3xx-nand: 
[   49.206771] NDCR:  0x9d079fff
[   49.206771] NDCB0: 0x000d3000
[   49.206771] NDCB1: 0xb7000000
[   49.206771] NDCB2: 0x00000001
[   49.206771] NDCB3: 0x00000000
[   49.225705] nand: nand_do_read_oob: from = 0x0dba0000, len = 64
[   49.231911] marvell-nfc pxa3xx-nand: 
[   49.231911] NDCR:  0x9d079fff
[   49.231911] NDCB0: 0x000d3000
[   49.231911] NDCB1: 0xb7400000
[   49.231911] NDCB2: 0x00000001
[   49.231911] NDCB3: 0x00000000
[   49.250839] nand: nand_do_read_oob: from = 0x0dbc0000, len = 64
[   49.256871] marvell-nfc pxa3xx-nand: 
[   49.256871] NDCR:  0x9d079fff
[   49.256871] NDCB0: 0x000d3000
[   49.256871] NDCB1: 0xb7800000
[   49.256871] NDCB2: 0x00000001
[   49.256871] NDCB3: 0x00000000
[   49.275804] nand: nand_do_read_oob: from = 0x0dbe0000, len = 64
[   49.282010] marvell-nfc pxa3xx-nand: 
[   49.282010] NDCR:  0x9d079fff
[   49.282010] NDCB0: 0x000d3000
[   49.282010] NDCB1: 0xb7c00000
[   49.282010] NDCB2: 0x00000001
[   49.282010] NDCB3: 0x00000000
[   49.300936] nand: nand_do_read_oob: from = 0x0dc00000, len = 64
[   49.306970] marvell-nfc pxa3xx-nand: 
[   49.306970] NDCR:  0x9d079fff
[   49.306970] NDCB0: 0x000d3000
[   49.306970] NDCB1: 0xb8000000
[   49.306970] NDCB2: 0x00000001
[   49.306970] NDCB3: 0x00000000
[   49.325901] nand: nand_do_read_oob: from = 0x0dc20000, len = 64
[   49.332108] marvell-nfc pxa3xx-nand: 
[   49.332108] NDCR:  0x9d079fff
[   49.332108] NDCB0: 0x000d3000
[   49.332108] NDCB1: 0xb8400000
[   49.332108] NDCB2: 0x00000001
[   49.332108] NDCB3: 0x00000000
[   49.351034] nand: nand_do_read_oob: from = 0x0dc40000, len = 64
[   49.357067] marvell-nfc pxa3xx-nand: 
[   49.357067] NDCR:  0x9d079fff
[   49.357067] NDCB0: 0x000d3000
[   49.357067] NDCB1: 0xb8800000
[   49.357067] NDCB2: 0x00000001
[   49.357067] NDCB3: 0x00000000
[   49.376000] nand: nand_do_read_oob: from = 0x0dc60000, len = 64
[   49.382207] marvell-nfc pxa3xx-nand: 
[   49.382207] NDCR:  0x9d079fff
[   49.382207] NDCB0: 0x000d3000
[   49.382207] NDCB1: 0xb8c00000
[   49.382207] NDCB2: 0x00000001
[   49.382207] NDCB3: 0x00000000
[   49.401132] nand: nand_do_read_oob: from = 0x0dc80000, len = 64
[   49.407166] marvell-nfc pxa3xx-nand: 
[   49.407166] NDCR:  0x9d079fff
[   49.407166] NDCB0: 0x000d3000
[   49.407166] NDCB1: 0xb9000000
[   49.407166] NDCB2: 0x00000001
[   49.407166] NDCB3: 0x00000000
[   49.426098] nand: nand_do_read_oob: from = 0x0dca0000, len = 64
[   49.432305] marvell-nfc pxa3xx-nand: 
[   49.432305] NDCR:  0x9d079fff
[   49.432305] NDCB0: 0x000d3000
[   49.432305] NDCB1: 0xb9400000
[   49.432305] NDCB2: 0x00000001
[   49.432305] NDCB3: 0x00000000
[   49.451232] nand: nand_do_read_oob: from = 0x0dcc0000, len = 64
[   49.457265] marvell-nfc pxa3xx-nand: 
[   49.457265] NDCR:  0x9d079fff
[   49.457265] NDCB0: 0x000d3000
[   49.457265] NDCB1: 0xb9800000
[   49.457265] NDCB2: 0x00000001
[   49.457265] NDCB3: 0x00000000
[   49.476197] nand: nand_do_read_oob: from = 0x0dce0000, len = 64
[   49.482403] marvell-nfc pxa3xx-nand: 
[   49.482403] NDCR:  0x9d079fff
[   49.482403] NDCB0: 0x000d3000
[   49.482403] NDCB1: 0xb9c00000
[   49.482403] NDCB2: 0x00000001
[   49.482403] NDCB3: 0x00000000
[   49.501331] nand: nand_do_read_oob: from = 0x0dd00000, len = 64
[   49.507364] marvell-nfc pxa3xx-nand: 
[   49.507364] NDCR:  0x9d079fff
[   49.507364] NDCB0: 0x000d3000
[   49.507364] NDCB1: 0xba000000
[   49.507364] NDCB2: 0x00000001
[   49.507364] NDCB3: 0x00000000
[   49.526296] nand: nand_do_read_oob: from = 0x0dd20000, len = 64
[   49.532502] marvell-nfc pxa3xx-nand: 
[   49.532502] NDCR:  0x9d079fff
[   49.532502] NDCB0: 0x000d3000
[   49.532502] NDCB1: 0xba400000
[   49.532502] NDCB2: 0x00000001
[   49.532502] NDCB3: 0x00000000
[   49.551430] nand: nand_do_read_oob: from = 0x0dd40000, len = 64
[   49.557461] marvell-nfc pxa3xx-nand: 
[   49.557461] NDCR:  0x9d079fff
[   49.557461] NDCB0: 0x000d3000
[   49.557461] NDCB1: 0xba800000
[   49.557461] NDCB2: 0x00000001
[   49.557461] NDCB3: 0x00000000
[   49.576397] nand: nand_do_read_oob: from = 0x0dd60000, len = 64
[   49.582599] marvell-nfc pxa3xx-nand: 
[   49.582599] NDCR:  0x9d079fff
[   49.582599] NDCB0: 0x000d3000
[   49.582599] NDCB1: 0xbac00000
[   49.582599] NDCB2: 0x00000001
[   49.582599] NDCB3: 0x00000000
[   49.601527] nand: nand_do_read_oob: from = 0x0dd80000, len = 64
[   49.607560] marvell-nfc pxa3xx-nand: 
[   49.607560] NDCR:  0x9d079fff
[   49.607560] NDCB0: 0x000d3000
[   49.607560] NDCB1: 0xbb000000
[   49.607560] NDCB2: 0x00000001
[   49.607560] NDCB3: 0x00000000
[   49.626508] nand: nand_do_read_oob: from = 0x0dda0000, len = 64
[   49.632715] marvell-nfc pxa3xx-nand: 
[   49.632715] NDCR:  0x9d079fff
[   49.632715] NDCB0: 0x000d3000
[   49.632715] NDCB1: 0xbb400000
[   49.632715] NDCB2: 0x00000001
[   49.632715] NDCB3: 0x00000000
[   49.651645] nand: nand_do_read_oob: from = 0x0ddc0000, len = 64
[   49.657676] marvell-nfc pxa3xx-nand: 
[   49.657676] NDCR:  0x9d079fff
[   49.657676] NDCB0: 0x000d3000
[   49.657676] NDCB1: 0xbb800000
[   49.657676] NDCB2: 0x00000001
[   49.657676] NDCB3: 0x00000000
[   49.676607] nand: nand_do_read_oob: from = 0x0dde0000, len = 64
[   49.682815] marvell-nfc pxa3xx-nand: 
[   49.682815] NDCR:  0x9d079fff
[   49.682815] NDCB0: 0x000d3000
[   49.682815] NDCB1: 0xbbc00000
[   49.682815] NDCB2: 0x00000001
[   49.682815] NDCB3: 0x00000000
[   49.701742] nand: nand_do_read_oob: from = 0x0de00000, len = 64
[   49.707775] marvell-nfc pxa3xx-nand: 
[   49.707775] NDCR:  0x9d079fff
[   49.707775] NDCB0: 0x000d3000
[   49.707775] NDCB1: 0xbc000000
[   49.707775] NDCB2: 0x00000001
[   49.707775] NDCB3: 0x00000000
[   49.726707] nand: nand_do_read_oob: from = 0x0de20000, len = 64
[   49.732912] marvell-nfc pxa3xx-nand: 
[   49.732912] NDCR:  0x9d079fff
[   49.732912] NDCB0: 0x000d3000
[   49.732912] NDCB1: 0xbc400000
[   49.732912] NDCB2: 0x00000001
[   49.732912] NDCB3: 0x00000000
[   49.751842] nand: nand_do_read_oob: from = 0x0de40000, len = 64
[   49.757873] marvell-nfc pxa3xx-nand: 
[   49.757873] NDCR:  0x9d079fff
[   49.757873] NDCB0: 0x000d3000
[   49.757873] NDCB1: 0xbc800000
[   49.757873] NDCB2: 0x00000001
[   49.757873] NDCB3: 0x00000000
[   49.776811] nand: nand_do_read_oob: from = 0x0de60000, len = 64
[   49.783011] marvell-nfc pxa3xx-nand: 
[   49.783011] NDCR:  0x9d079fff
[   49.783011] NDCB0: 0x000d3000
[   49.783011] NDCB1: 0xbcc00000
[   49.783011] NDCB2: 0x00000001
[   49.783011] NDCB3: 0x00000000
[   49.801941] nand: nand_do_read_oob: from = 0x0de80000, len = 64
[   49.807971] marvell-nfc pxa3xx-nand: 
[   49.807971] NDCR:  0x9d079fff
[   49.807971] NDCB0: 0x000d3000
[   49.807971] NDCB1: 0xbd000000
[   49.807971] NDCB2: 0x00000001
[   49.807971] NDCB3: 0x00000000
[   49.826904] nand: nand_do_read_oob: from = 0x0dea0000, len = 64
[   49.833112] marvell-nfc pxa3xx-nand: 
[   49.833112] NDCR:  0x9d079fff
[   49.833112] NDCB0: 0x000d3000
[   49.833112] NDCB1: 0xbd400000
[   49.833112] NDCB2: 0x00000001
[   49.833112] NDCB3: 0x00000000
[   49.852038] nand: nand_do_read_oob: from = 0x0dec0000, len = 64
[   49.858069] marvell-nfc pxa3xx-nand: 
[   49.858069] NDCR:  0x9d079fff
[   49.858069] NDCB0: 0x000d3000
[   49.858069] NDCB1: 0xbd800000
[   49.858069] NDCB2: 0x00000001
[   49.858069] NDCB3: 0x00000000
[   49.877001] nand: nand_do_read_oob: from = 0x0dee0000, len = 64
[   49.883209] marvell-nfc pxa3xx-nand: 
[   49.883209] NDCR:  0x9d079fff
[   49.883209] NDCB0: 0x000d3000
[   49.883209] NDCB1: 0xbdc00000
[   49.883209] NDCB2: 0x00000001
[   49.883209] NDCB3: 0x00000000
[   49.902136] nand: nand_do_read_oob: from = 0x0df00000, len = 64
[   49.908168] marvell-nfc pxa3xx-nand: 
[   49.908168] NDCR:  0x9d079fff
[   49.908168] NDCB0: 0x000d3000
[   49.908168] NDCB1: 0xbe000000
[   49.908168] NDCB2: 0x00000001
[   49.908168] NDCB3: 0x00000000
[   49.927100] nand: nand_do_read_oob: from = 0x0df20000, len = 64
[   49.933306] marvell-nfc pxa3xx-nand: 
[   49.933306] NDCR:  0x9d079fff
[   49.933306] NDCB0: 0x000d3000
[   49.933306] NDCB1: 0xbe400000
[   49.933306] NDCB2: 0x00000001
[   49.933306] NDCB3: 0x00000000
[   49.952236] nand: nand_do_read_oob: from = 0x0df40000, len = 64
[   49.958267] marvell-nfc pxa3xx-nand: 
[   49.958267] NDCR:  0x9d079fff
[   49.958267] NDCB0: 0x000d3000
[   49.958267] NDCB1: 0xbe800000
[   49.958267] NDCB2: 0x00000001
[   49.958267] NDCB3: 0x00000000
[   49.977199] nand: nand_do_read_oob: from = 0x0df60000, len = 64
[   49.983404] marvell-nfc pxa3xx-nand: 
[   49.983404] NDCR:  0x9d079fff
[   49.983404] NDCB0: 0x000d3000
[   49.983404] NDCB1: 0xbec00000
[   49.983404] NDCB2: 0x00000001
[   49.983404] NDCB3: 0x00000000
[   50.002333] nand: nand_do_read_oob: from = 0x0df80000, len = 64
[   50.008365] marvell-nfc pxa3xx-nand: 
[   50.008365] NDCR:  0x9d079fff
[   50.008365] NDCB0: 0x000d3000
[   50.008365] NDCB1: 0xbf000000
[   50.008365] NDCB2: 0x00000001
[   50.008365] NDCB3: 0x00000000
[   50.027305] nand: nand_do_read_oob: from = 0x0dfa0000, len = 64
[   50.033512] marvell-nfc pxa3xx-nand: 
[   50.033512] NDCR:  0x9d079fff
[   50.033512] NDCB0: 0x000d3000
[   50.033512] NDCB1: 0xbf400000
[   50.033512] NDCB2: 0x00000001
[   50.033512] NDCB3: 0x00000000
[   50.052439] nand: nand_do_read_oob: from = 0x0dfc0000, len = 64
[   50.058472] marvell-nfc pxa3xx-nand: 
[   50.058472] NDCR:  0x9d079fff
[   50.058472] NDCB0: 0x000d3000
[   50.058472] NDCB1: 0xbf800000
[   50.058472] NDCB2: 0x00000001
[   50.058472] NDCB3: 0x00000000
[   50.077402] nand: nand_do_read_oob: from = 0x0dfe0000, len = 64
[   50.083603] marvell-nfc pxa3xx-nand: 
[   50.083603] NDCR:  0x9d079fff
[   50.083603] NDCB0: 0x000d3000
[   50.083603] NDCB1: 0xbfc00000
[   50.083603] NDCB2: 0x00000001
[   50.083603] NDCB3: 0x00000000
[   50.102870] nand: nand_do_read_oob: from = 0x0e000000, len = 64
[   50.109105] marvell-nfc pxa3xx-nand: 
[   50.109105] NDCR:  0x9d079fff
[   50.109105] NDCB0: 0x000d3000
[   50.109105] NDCB1: 0xc0000000
[   50.109105] NDCB2: 0x00000001
[   50.109105] NDCB3: 0x00000000
[   50.128026] nand: nand_do_read_oob: from = 0x0e020000, len = 64
[   50.134225] marvell-nfc pxa3xx-nand: 
[   50.134225] NDCR:  0x9d079fff
[   50.134225] NDCB0: 0x000d3000
[   50.134225] NDCB1: 0xc0400000
[   50.134225] NDCB2: 0x00000001
[   50.134225] NDCB3: 0x00000000
[   50.153157] nand: nand_do_read_oob: from = 0x0e040000, len = 64
[   50.159358] marvell-nfc pxa3xx-nand: 
[   50.159358] NDCR:  0x9d079fff
[   50.159358] NDCB0: 0x000d3000
[   50.159358] NDCB1: 0xc0800000
[   50.159358] NDCB2: 0x00000001
[   50.159358] NDCB3: 0x00000000
[   50.178275] nand: nand_do_read_oob: from = 0x0e060000, len = 64
[   50.184478] marvell-nfc pxa3xx-nand: 
[   50.184478] NDCR:  0x9d079fff
[   50.184478] NDCB0: 0x000d3000
[   50.184478] NDCB1: 0xc0c00000
[   50.184478] NDCB2: 0x00000001
[   50.184478] NDCB3: 0x00000000
[   50.203407] nand: nand_do_read_oob: from = 0x0e080000, len = 64
[   50.209610] marvell-nfc pxa3xx-nand: 
[   50.209610] NDCR:  0x9d079fff
[   50.209610] NDCB0: 0x000d3000
[   50.209610] NDCB1: 0xc1000000
[   50.209610] NDCB2: 0x00000001
[   50.209610] NDCB3: 0x00000000
[   50.228530] nand: nand_do_read_oob: from = 0x0e0a0000, len = 64
[   50.234753] marvell-nfc pxa3xx-nand: 
[   50.234753] NDCR:  0x9d079fff
[   50.234753] NDCB0: 0x000d3000
[   50.234753] NDCB1: 0xc1400000
[   50.234753] NDCB2: 0x00000001
[   50.234753] NDCB3: 0x00000000
[   50.253682] nand: nand_do_read_oob: from = 0x0e0c0000, len = 64
[   50.259880] marvell-nfc pxa3xx-nand: 
[   50.259880] NDCR:  0x9d079fff
[   50.259880] NDCB0: 0x000d3000
[   50.259880] NDCB1: 0xc1800000
[   50.259880] NDCB2: 0x00000001
[   50.259880] NDCB3: 0x00000000
[   50.278879] nand: nand_do_read_oob: from = 0x0e0e0000, len = 64
[   50.284914] marvell-nfc pxa3xx-nand: 
[   50.284914] NDCR:  0x9d079fff
[   50.284914] NDCB0: 0x000d3000
[   50.284914] NDCB1: 0xc1c00000
[   50.284914] NDCB2: 0x00000001
[   50.284914] NDCB3: 0x00000000
[   50.303848] nand: nand_do_read_oob: from = 0x0e100000, len = 64
[   50.310048] marvell-nfc pxa3xx-nand: 
[   50.310048] NDCR:  0x9d079fff
[   50.310048] NDCB0: 0x000d3000
[   50.310048] NDCB1: 0xc2000000
[   50.310048] NDCB2: 0x00000001
[   50.310048] NDCB3: 0x00000000
[   50.329015] nand: nand_do_read_oob: from = 0x0e120000, len = 64
[   50.335042] marvell-nfc pxa3xx-nand: 
[   50.335042] NDCR:  0x9d079fff
[   50.335042] NDCB0: 0x000d3000
[   50.335042] NDCB1: 0xc2400000
[   50.335042] NDCB2: 0x00000001
[   50.335042] NDCB3: 0x00000000
[   50.353979] nand: nand_do_read_oob: from = 0x0e140000, len = 64
[   50.360180] marvell-nfc pxa3xx-nand: 
[   50.360180] NDCR:  0x9d079fff
[   50.360180] NDCB0: 0x000d3000
[   50.360180] NDCB1: 0xc2800000
[   50.360180] NDCB2: 0x00000001
[   50.360180] NDCB3: 0x00000000
[   50.379109] nand: nand_do_read_oob: from = 0x0e160000, len = 64
[   50.385142] marvell-nfc pxa3xx-nand: 
[   50.385142] NDCR:  0x9d079fff
[   50.385142] NDCB0: 0x000d3000
[   50.385142] NDCB1: 0xc2c00000
[   50.385142] NDCB2: 0x00000001
[   50.385142] NDCB3: 0x00000000
[   50.404072] nand: nand_do_read_oob: from = 0x0e180000, len = 64
[   50.410271] marvell-nfc pxa3xx-nand: 
[   50.410271] NDCR:  0x9d079fff
[   50.410271] NDCB0: 0x000d3000
[   50.410271] NDCB1: 0xc3000000
[   50.410271] NDCB2: 0x00000001
[   50.410271] NDCB3: 0x00000000
[   50.429199] nand: nand_do_read_oob: from = 0x0e1a0000, len = 64
[   50.435230] marvell-nfc pxa3xx-nand: 
[   50.435230] NDCR:  0x9d079fff
[   50.435230] NDCB0: 0x000d3000
[   50.435230] NDCB1: 0xc3400000
[   50.435230] NDCB2: 0x00000001
[   50.435230] NDCB3: 0x00000000
[   50.454164] nand: nand_do_read_oob: from = 0x0e1c0000, len = 64
[   50.460370] marvell-nfc pxa3xx-nand: 
[   50.460370] NDCR:  0x9d079fff
[   50.460370] NDCB0: 0x000d3000
[   50.460370] NDCB1: 0xc3800000
[   50.460370] NDCB2: 0x00000001
[   50.460370] NDCB3: 0x00000000
[   50.479300] nand: nand_do_read_oob: from = 0x0e1e0000, len = 64
[   50.485329] marvell-nfc pxa3xx-nand: 
[   50.485329] NDCR:  0x9d079fff
[   50.485329] NDCB0: 0x000d3000
[   50.485329] NDCB1: 0xc3c00000
[   50.485329] NDCB2: 0x00000001
[   50.485329] NDCB3: 0x00000000
[   50.504265] nand: nand_do_read_oob: from = 0x0e200000, len = 64
[   50.510470] marvell-nfc pxa3xx-nand: 
[   50.510470] NDCR:  0x9d079fff
[   50.510470] NDCB0: 0x000d3000
[   50.510470] NDCB1: 0xc4000000
[   50.510470] NDCB2: 0x00000001
[   50.510470] NDCB3: 0x00000000
[   50.529395] nand: nand_do_read_oob: from = 0x0e220000, len = 64
[   50.535427] marvell-nfc pxa3xx-nand: 
[   50.535427] NDCR:  0x9d079fff
[   50.535427] NDCB0: 0x000d3000
[   50.535427] NDCB1: 0xc4400000
[   50.535427] NDCB2: 0x00000001
[   50.535427] NDCB3: 0x00000000
[   50.554363] nand: nand_do_read_oob: from = 0x0e240000, len = 64
[   50.560565] marvell-nfc pxa3xx-nand: 
[   50.560565] NDCR:  0x9d079fff
[   50.560565] NDCB0: 0x000d3000
[   50.560565] NDCB1: 0xc4800000
[   50.560565] NDCB2: 0x00000001
[   50.560565] NDCB3: 0x00000000
[   50.579496] nand: nand_do_read_oob: from = 0x0e260000, len = 64
[   50.585525] marvell-nfc pxa3xx-nand: 
[   50.585525] NDCR:  0x9d079fff
[   50.585525] NDCB0: 0x000d3000
[   50.585525] NDCB1: 0xc4c00000
[   50.585525] NDCB2: 0x00000001
[   50.585525] NDCB3: 0x00000000
[   50.604458] nand: nand_do_read_oob: from = 0x0e280000, len = 64
[   50.610657] marvell-nfc pxa3xx-nand: 
[   50.610657] NDCR:  0x9d079fff
[   50.610657] NDCB0: 0x000d3000
[   50.610657] NDCB1: 0xc5000000
[   50.610657] NDCB2: 0x00000001
[   50.610657] NDCB3: 0x00000000
[   50.629584] nand: nand_do_read_oob: from = 0x0e2a0000, len = 64
[   50.635616] marvell-nfc pxa3xx-nand: 
[   50.635616] NDCR:  0x9d079fff
[   50.635616] NDCB0: 0x000d3000
[   50.635616] NDCB1: 0xc5400000
[   50.635616] NDCB2: 0x00000001
[   50.635616] NDCB3: 0x00000000
[   50.654551] nand: nand_do_read_oob: from = 0x0e2c0000, len = 64
[   50.660752] marvell-nfc pxa3xx-nand: 
[   50.660752] NDCR:  0x9d079fff
[   50.660752] NDCB0: 0x000d3000
[   50.660752] NDCB1: 0xc5800000
[   50.660752] NDCB2: 0x00000001
[   50.660752] NDCB3: 0x00000000
[   50.679685] nand: nand_do_read_oob: from = 0x0e2e0000, len = 64
[   50.685714] marvell-nfc pxa3xx-nand: 
[   50.685714] NDCR:  0x9d079fff
[   50.685714] NDCB0: 0x000d3000
[   50.685714] NDCB1: 0xc5c00000
[   50.685714] NDCB2: 0x00000001
[   50.685714] NDCB3: 0x00000000
[   50.704647] nand: nand_do_read_oob: from = 0x0e300000, len = 64
[   50.710853] marvell-nfc pxa3xx-nand: 
[   50.710853] NDCR:  0x9d079fff
[   50.710853] NDCB0: 0x000d3000
[   50.710853] NDCB1: 0xc6000000
[   50.710853] NDCB2: 0x00000001
[   50.710853] NDCB3: 0x00000000
[   50.729782] nand: nand_do_read_oob: from = 0x0e320000, len = 64
[   50.735814] marvell-nfc pxa3xx-nand: 
[   50.735814] NDCR:  0x9d079fff
[   50.735814] NDCB0: 0x000d3000
[   50.735814] NDCB1: 0xc6400000
[   50.735814] NDCB2: 0x00000001
[   50.735814] NDCB3: 0x00000000
[   50.754747] nand: nand_do_read_oob: from = 0x0e340000, len = 64
[   50.760952] marvell-nfc pxa3xx-nand: 
[   50.760952] NDCR:  0x9d079fff
[   50.760952] NDCB0: 0x000d3000
[   50.760952] NDCB1: 0xc6800000
[   50.760952] NDCB2: 0x00000001
[   50.760952] NDCB3: 0x00000000
[   50.779882] nand: nand_do_read_oob: from = 0x0e360000, len = 64
[   50.785911] marvell-nfc pxa3xx-nand: 
[   50.785911] NDCR:  0x9d079fff
[   50.785911] NDCB0: 0x000d3000
[   50.785911] NDCB1: 0xc6c00000
[   50.785911] NDCB2: 0x00000001
[   50.785911] NDCB3: 0x00000000
[   50.804846] nand: nand_do_read_oob: from = 0x0e380000, len = 64
[   50.811050] marvell-nfc pxa3xx-nand: 
[   50.811050] NDCR:  0x9d079fff
[   50.811050] NDCB0: 0x000d3000
[   50.811050] NDCB1: 0xc7000000
[   50.811050] NDCB2: 0x00000001
[   50.811050] NDCB3: 0x00000000
[   50.829978] nand: nand_do_read_oob: from = 0x0e3a0000, len = 64
[   50.836010] marvell-nfc pxa3xx-nand: 
[   50.836010] NDCR:  0x9d079fff
[   50.836010] NDCB0: 0x000d3000
[   50.836010] NDCB1: 0xc7400000
[   50.836010] NDCB2: 0x00000001
[   50.836010] NDCB3: 0x00000000
[   50.854943] nand: nand_do_read_oob: from = 0x0e3c0000, len = 64
[   50.861166] marvell-nfc pxa3xx-nand: 
[   50.861166] NDCR:  0x9d079fff
[   50.861166] NDCB0: 0x000d3000
[   50.861166] NDCB1: 0xc7800000
[   50.861166] NDCB2: 0x00000001
[   50.861166] NDCB3: 0x00000000
[   50.880096] nand: nand_do_read_oob: from = 0x0e3e0000, len = 64
[   50.886126] marvell-nfc pxa3xx-nand: 
[   50.886126] NDCR:  0x9d079fff
[   50.886126] NDCB0: 0x000d3000
[   50.886126] NDCB1: 0xc7c00000
[   50.886126] NDCB2: 0x00000001
[   50.886126] NDCB3: 0x00000000
[   50.905060] nand: nand_do_read_oob: from = 0x0e400000, len = 64
[   50.911264] marvell-nfc pxa3xx-nand: 
[   50.911264] NDCR:  0x9d079fff
[   50.911264] NDCB0: 0x000d3000
[   50.911264] NDCB1: 0xc8000000
[   50.911264] NDCB2: 0x00000001
[   50.911264] NDCB3: 0x00000000
[   50.930194] nand: nand_do_read_oob: from = 0x0e420000, len = 64
[   50.936224] marvell-nfc pxa3xx-nand: 
[   50.936224] NDCR:  0x9d079fff
[   50.936224] NDCB0: 0x000d3000
[   50.936224] NDCB1: 0xc8400000
[   50.936224] NDCB2: 0x00000001
[   50.936224] NDCB3: 0x00000000
[   50.955157] nand: nand_do_read_oob: from = 0x0e440000, len = 64
[   50.961362] marvell-nfc pxa3xx-nand: 
[   50.961362] NDCR:  0x9d079fff
[   50.961362] NDCB0: 0x000d3000
[   50.961362] NDCB1: 0xc8800000
[   50.961362] NDCB2: 0x00000001
[   50.961362] NDCB3: 0x00000000
[   50.980292] nand: nand_do_read_oob: from = 0x0e460000, len = 64
[   50.986323] marvell-nfc pxa3xx-nand: 
[   50.986323] NDCR:  0x9d079fff
[   50.986323] NDCB0: 0x000d3000
[   50.986323] NDCB1: 0xc8c00000
[   50.986323] NDCB2: 0x00000001
[   50.986323] NDCB3: 0x00000000
[   51.005257] nand: nand_do_read_oob: from = 0x0e480000, len = 64
[   51.011468] marvell-nfc pxa3xx-nand: 
[   51.011468] NDCR:  0x9d079fff
[   51.011468] NDCB0: 0x000d3000
[   51.011468] NDCB1: 0xc9000000
[   51.011468] NDCB2: 0x00000001
[   51.011468] NDCB3: 0x00000000
[   51.030401] nand: nand_do_read_oob: from = 0x0e4a0000, len = 64
[   51.036430] marvell-nfc pxa3xx-nand: 
[   51.036430] NDCR:  0x9d079fff
[   51.036430] NDCB0: 0x000d3000
[   51.036430] NDCB1: 0xc9400000
[   51.036430] NDCB2: 0x00000001
[   51.036430] NDCB3: 0x00000000
[   51.055367] nand: nand_do_read_oob: from = 0x0e4c0000, len = 64
[   51.061570] marvell-nfc pxa3xx-nand: 
[   51.061570] NDCR:  0x9d079fff
[   51.061570] NDCB0: 0x000d3000
[   51.061570] NDCB1: 0xc9800000
[   51.061570] NDCB2: 0x00000001
[   51.061570] NDCB3: 0x00000000
[   51.080498] nand: nand_do_read_oob: from = 0x0e4e0000, len = 64
[   51.086528] marvell-nfc pxa3xx-nand: 
[   51.086528] NDCR:  0x9d079fff
[   51.086528] NDCB0: 0x000d3000
[   51.086528] NDCB1: 0xc9c00000
[   51.086528] NDCB2: 0x00000001
[   51.086528] NDCB3: 0x00000000
[   51.105463] nand: nand_do_read_oob: from = 0x0e500000, len = 64
[   51.111667] marvell-nfc pxa3xx-nand: 
[   51.111667] NDCR:  0x9d079fff
[   51.111667] NDCB0: 0x000d3000
[   51.111667] NDCB1: 0xca000000
[   51.111667] NDCB2: 0x00000001
[   51.111667] NDCB3: 0x00000000
[   51.130596] nand: nand_do_read_oob: from = 0x0e520000, len = 64
[   51.136626] marvell-nfc pxa3xx-nand: 
[   51.136626] NDCR:  0x9d079fff
[   51.136626] NDCB0: 0x000d3000
[   51.136626] NDCB1: 0xca400000
[   51.136626] NDCB2: 0x00000001
[   51.136626] NDCB3: 0x00000000
[   51.155559] nand: nand_do_read_oob: from = 0x0e540000, len = 64
[   51.161765] marvell-nfc pxa3xx-nand: 
[   51.161765] NDCR:  0x9d079fff
[   51.161765] NDCB0: 0x000d3000
[   51.161765] NDCB1: 0xca800000
[   51.161765] NDCB2: 0x00000001
[   51.161765] NDCB3: 0x00000000
[   51.180695] nand: nand_do_read_oob: from = 0x0e560000, len = 64
[   51.186726] marvell-nfc pxa3xx-nand: 
[   51.186726] NDCR:  0x9d079fff
[   51.186726] NDCB0: 0x000d3000
[   51.186726] NDCB1: 0xcac00000
[   51.186726] NDCB2: 0x00000001
[   51.186726] NDCB3: 0x00000000
[   51.205657] nand: nand_do_read_oob: from = 0x0e580000, len = 64
[   51.211865] marvell-nfc pxa3xx-nand: 
[   51.211865] NDCR:  0x9d079fff
[   51.211865] NDCB0: 0x000d3000
[   51.211865] NDCB1: 0xcb000000
[   51.211865] NDCB2: 0x00000001
[   51.211865] NDCB3: 0x00000000
[   51.230792] nand: nand_do_read_oob: from = 0x0e5a0000, len = 64
[   51.236823] marvell-nfc pxa3xx-nand: 
[   51.236823] NDCR:  0x9d079fff
[   51.236823] NDCB0: 0x000d3000
[   51.236823] NDCB1: 0xcb400000
[   51.236823] NDCB2: 0x00000001
[   51.236823] NDCB3: 0x00000000
[   51.255758] nand: nand_do_read_oob: from = 0x0e5c0000, len = 64
[   51.261963] marvell-nfc pxa3xx-nand: 
[   51.261963] NDCR:  0x9d079fff
[   51.261963] NDCB0: 0x000d3000
[   51.261963] NDCB1: 0xcb800000
[   51.261963] NDCB2: 0x00000001
[   51.261963] NDCB3: 0x00000000
[   51.280891] nand: nand_do_read_oob: from = 0x0e5e0000, len = 64
[   51.286921] marvell-nfc pxa3xx-nand: 
[   51.286921] NDCR:  0x9d079fff
[   51.286921] NDCB0: 0x000d3000
[   51.286921] NDCB1: 0xcbc00000
[   51.286921] NDCB2: 0x00000001
[   51.286921] NDCB3: 0x00000000
[   51.305858] nand: nand_do_read_oob: from = 0x0e600000, len = 64
[   51.312061] marvell-nfc pxa3xx-nand: 
[   51.312061] NDCR:  0x9d079fff
[   51.312061] NDCB0: 0x000d3000
[   51.312061] NDCB1: 0xcc000000
[   51.312061] NDCB2: 0x00000001
[   51.312061] NDCB3: 0x00000000
[   51.330992] nand: nand_do_read_oob: from = 0x0e620000, len = 64
[   51.337020] marvell-nfc pxa3xx-nand: 
[   51.337020] NDCR:  0x9d079fff
[   51.337020] NDCB0: 0x000d3000
[   51.337020] NDCB1: 0xcc400000
[   51.337020] NDCB2: 0x00000001
[   51.337020] NDCB3: 0x00000000
[   51.355959] nand: nand_do_read_oob: from = 0x0e640000, len = 64
[   51.362159] marvell-nfc pxa3xx-nand: 
[   51.362159] NDCR:  0x9d079fff
[   51.362159] NDCB0: 0x000d3000
[   51.362159] NDCB1: 0xcc800000
[   51.362159] NDCB2: 0x00000001
[   51.362159] NDCB3: 0x00000000
[   51.381089] nand: nand_do_read_oob: from = 0x0e660000, len = 64
[   51.387120] marvell-nfc pxa3xx-nand: 
[   51.387120] NDCR:  0x9d079fff
[   51.387120] NDCB0: 0x000d3000
[   51.387120] NDCB1: 0xccc00000
[   51.387120] NDCB2: 0x00000001
[   51.387120] NDCB3: 0x00000000
[   51.406052] nand: nand_do_read_oob: from = 0x0e680000, len = 64
[   51.412256] marvell-nfc pxa3xx-nand: 
[   51.412256] NDCR:  0x9d079fff
[   51.412256] NDCB0: 0x000d3000
[   51.412256] NDCB1: 0xcd000000
[   51.412256] NDCB2: 0x00000001
[   51.412256] NDCB3: 0x00000000
[   51.431186] nand: nand_do_read_oob: from = 0x0e6a0000, len = 64
[   51.437219] marvell-nfc pxa3xx-nand: 
[   51.437219] NDCR:  0x9d079fff
[   51.437219] NDCB0: 0x000d3000
[   51.437219] NDCB1: 0xcd400000
[   51.437219] NDCB2: 0x00000001
[   51.437219] NDCB3: 0x00000000
[   51.456155] nand: nand_do_read_oob: from = 0x0e6c0000, len = 64
[   51.462355] marvell-nfc pxa3xx-nand: 
[   51.462355] NDCR:  0x9d079fff
[   51.462355] NDCB0: 0x000d3000
[   51.462355] NDCB1: 0xcd800000
[   51.462355] NDCB2: 0x00000001
[   51.462355] NDCB3: 0x00000000
[   51.481284] nand: nand_do_read_oob: from = 0x0e6e0000, len = 64
[   51.487317] marvell-nfc pxa3xx-nand: 
[   51.487317] NDCR:  0x9d079fff
[   51.487317] NDCB0: 0x000d3000
[   51.487317] NDCB1: 0xcdc00000
[   51.487317] NDCB2: 0x00000001
[   51.487317] NDCB3: 0x00000000
[   51.506269] nand: nand_do_read_oob: from = 0x0e700000, len = 64
[   51.512474] marvell-nfc pxa3xx-nand: 
[   51.512474] NDCR:  0x9d079fff
[   51.512474] NDCB0: 0x000d3000
[   51.512474] NDCB1: 0xce000000
[   51.512474] NDCB2: 0x00000001
[   51.512474] NDCB3: 0x00000000
[   51.531400] nand: nand_do_read_oob: from = 0x0e720000, len = 64
[   51.537433] marvell-nfc pxa3xx-nand: 
[   51.537433] NDCR:  0x9d079fff
[   51.537433] NDCB0: 0x000d3000
[   51.537433] NDCB1: 0xce400000
[   51.537433] NDCB2: 0x00000001
[   51.537433] NDCB3: 0x00000000
[   51.556367] nand: nand_do_read_oob: from = 0x0e740000, len = 64
[   51.562568] marvell-nfc pxa3xx-nand: 
[   51.562568] NDCR:  0x9d079fff
[   51.562568] NDCB0: 0x000d3000
[   51.562568] NDCB1: 0xce800000
[   51.562568] NDCB2: 0x00000001
[   51.562568] NDCB3: 0x00000000
[   51.581499] nand: nand_do_read_oob: from = 0x0e760000, len = 64
[   51.587529] marvell-nfc pxa3xx-nand: 
[   51.587529] NDCR:  0x9d079fff
[   51.587529] NDCB0: 0x000d3000
[   51.587529] NDCB1: 0xcec00000
[   51.587529] NDCB2: 0x00000001
[   51.587529] NDCB3: 0x00000000
[   51.606465] nand: nand_do_read_oob: from = 0x0e780000, len = 64
[   51.612668] marvell-nfc pxa3xx-nand: 
[   51.612668] NDCR:  0x9d079fff
[   51.612668] NDCB0: 0x000d3000
[   51.612668] NDCB1: 0xcf000000
[   51.612668] NDCB2: 0x00000001
[   51.612668] NDCB3: 0x00000000
[   51.631598] nand: nand_do_read_oob: from = 0x0e7a0000, len = 64
[   51.637628] marvell-nfc pxa3xx-nand: 
[   51.637628] NDCR:  0x9d079fff
[   51.637628] NDCB0: 0x000d3000
[   51.637628] NDCB1: 0xcf400000
[   51.637628] NDCB2: 0x00000001
[   51.637628] NDCB3: 0x00000000
[   51.656560] nand: nand_do_read_oob: from = 0x0e7c0000, len = 64
[   51.662759] marvell-nfc pxa3xx-nand: 
[   51.662759] NDCR:  0x9d079fff
[   51.662759] NDCB0: 0x000d3000
[   51.662759] NDCB1: 0xcf800000
[   51.662759] NDCB2: 0x00000001
[   51.662759] NDCB3: 0x00000000
[   51.681686] nand: nand_do_read_oob: from = 0x0e7e0000, len = 64
[   51.687718] marvell-nfc pxa3xx-nand: 
[   51.687718] NDCR:  0x9d079fff
[   51.687718] NDCB0: 0x000d3000
[   51.687718] NDCB1: 0xcfc00000
[   51.687718] NDCB2: 0x00000001
[   51.687718] NDCB3: 0x00000000
[   51.706651] nand: nand_do_read_oob: from = 0x0e800000, len = 64
[   51.712858] marvell-nfc pxa3xx-nand: 
[   51.712858] NDCR:  0x9d079fff
[   51.712858] NDCB0: 0x000d3000
[   51.712858] NDCB1: 0xd0000000
[   51.712858] NDCB2: 0x00000001
[   51.712858] NDCB3: 0x00000000
[   51.731786] nand: nand_do_read_oob: from = 0x0e820000, len = 64
[   51.737817] marvell-nfc pxa3xx-nand: 
[   51.737817] NDCR:  0x9d079fff
[   51.737817] NDCB0: 0x000d3000
[   51.737817] NDCB1: 0xd0400000
[   51.737817] NDCB2: 0x00000001
[   51.737817] NDCB3: 0x00000000
[   51.756749] nand: nand_do_read_oob: from = 0x0e840000, len = 64
[   51.762947] marvell-nfc pxa3xx-nand: 
[   51.762947] NDCR:  0x9d079fff
[   51.762947] NDCB0: 0x000d3000
[   51.762947] NDCB1: 0xd0800000
[   51.762947] NDCB2: 0x00000001
[   51.762947] NDCB3: 0x00000000
[   51.781875] nand: nand_do_read_oob: from = 0x0e860000, len = 64
[   51.787906] marvell-nfc pxa3xx-nand: 
[   51.787906] NDCR:  0x9d079fff
[   51.787906] NDCB0: 0x000d3000
[   51.787906] NDCB1: 0xd0c00000
[   51.787906] NDCB2: 0x00000001
[   51.787906] NDCB3: 0x00000000
[   51.806840] nand: nand_do_read_oob: from = 0x0e880000, len = 64
[   51.813043] marvell-nfc pxa3xx-nand: 
[   51.813043] NDCR:  0x9d079fff
[   51.813043] NDCB0: 0x000d3000
[   51.813043] NDCB1: 0xd1000000
[   51.813043] NDCB2: 0x00000001
[   51.813043] NDCB3: 0x00000000
[   51.831972] nand: nand_do_read_oob: from = 0x0e8a0000, len = 64
[   51.838006] marvell-nfc pxa3xx-nand: 
[   51.838006] NDCR:  0x9d079fff
[   51.838006] NDCB0: 0x000d3000
[   51.838006] NDCB1: 0xd1400000
[   51.838006] NDCB2: 0x00000001
[   51.838006] NDCB3: 0x00000000
[   51.856936] nand: nand_do_read_oob: from = 0x0e8c0000, len = 64
[   51.863135] marvell-nfc pxa3xx-nand: 
[   51.863135] NDCR:  0x9d079fff
[   51.863135] NDCB0: 0x000d3000
[   51.863135] NDCB1: 0xd1800000
[   51.863135] NDCB2: 0x00000001
[   51.863135] NDCB3: 0x00000000
[   51.882062] nand: nand_do_read_oob: from = 0x0e8e0000, len = 64
[   51.888096] marvell-nfc pxa3xx-nand: 
[   51.888096] NDCR:  0x9d079fff
[   51.888096] NDCB0: 0x000d3000
[   51.888096] NDCB1: 0xd1c00000
[   51.888096] NDCB2: 0x00000001
[   51.888096] NDCB3: 0x00000000
[   51.907026] nand: nand_do_read_oob: from = 0x0e900000, len = 64
[   51.913225] marvell-nfc pxa3xx-nand: 
[   51.913225] NDCR:  0x9d079fff
[   51.913225] NDCB0: 0x000d3000
[   51.913225] NDCB1: 0xd2000000
[   51.913225] NDCB2: 0x00000001
[   51.913225] NDCB3: 0x00000000
[   51.932154] nand: nand_do_read_oob: from = 0x0e920000, len = 64
[   51.938185] marvell-nfc pxa3xx-nand: 
[   51.938185] NDCR:  0x9d079fff
[   51.938185] NDCB0: 0x000d3000
[   51.938185] NDCB1: 0xd2400000
[   51.938185] NDCB2: 0x00000001
[   51.938185] NDCB3: 0x00000000
[   51.957117] nand: nand_do_read_oob: from = 0x0e940000, len = 64
[   51.963323] marvell-nfc pxa3xx-nand: 
[   51.963323] NDCR:  0x9d079fff
[   51.963323] NDCB0: 0x000d3000
[   51.963323] NDCB1: 0xd2800000
[   51.963323] NDCB2: 0x00000001
[   51.963323] NDCB3: 0x00000000
[   51.982250] nand: nand_do_read_oob: from = 0x0e960000, len = 64
[   51.988282] marvell-nfc pxa3xx-nand: 
[   51.988282] NDCR:  0x9d079fff
[   51.988282] NDCB0: 0x000d3000
[   51.988282] NDCB1: 0xd2c00000
[   51.988282] NDCB2: 0x00000001
[   51.988282] NDCB3: 0x00000000
[   52.007215] nand: nand_do_read_oob: from = 0x0e980000, len = 64
[   52.013419] marvell-nfc pxa3xx-nand: 
[   52.013419] NDCR:  0x9d079fff
[   52.013419] NDCB0: 0x000d3000
[   52.013419] NDCB1: 0xd3000000
[   52.013419] NDCB2: 0x00000001
[   52.013419] NDCB3: 0x00000000
[   52.032349] nand: nand_do_read_oob: from = 0x0e9a0000, len = 64
[   52.038381] marvell-nfc pxa3xx-nand: 
[   52.038381] NDCR:  0x9d079fff
[   52.038381] NDCB0: 0x000d3000
[   52.038381] NDCB1: 0xd3400000
[   52.038381] NDCB2: 0x00000001
[   52.038381] NDCB3: 0x00000000
[   52.057315] nand: nand_do_read_oob: from = 0x0e9c0000, len = 64
[   52.063519] marvell-nfc pxa3xx-nand: 
[   52.063519] NDCR:  0x9d079fff
[   52.063519] NDCB0: 0x000d3000
[   52.063519] NDCB1: 0xd3800000
[   52.063519] NDCB2: 0x00000001
[   52.063519] NDCB3: 0x00000000
[   52.082449] nand: nand_do_read_oob: from = 0x0e9e0000, len = 64
[   52.088481] marvell-nfc pxa3xx-nand: 
[   52.088481] NDCR:  0x9d079fff
[   52.088481] NDCB0: 0x000d3000
[   52.088481] NDCB1: 0xd3c00000
[   52.088481] NDCB2: 0x00000001
[   52.088481] NDCB3: 0x00000000
[   52.107846] nand: nand_do_read_oob: from = 0x0ea00000, len = 64
[   52.114087] marvell-nfc pxa3xx-nand: 
[   52.114087] NDCR:  0x9d079fff
[   52.114087] NDCB0: 0x000d3000
[   52.114087] NDCB1: 0xd4000000
[   52.114087] NDCB2: 0x00000001
[   52.114087] NDCB3: 0x00000000
[   52.133019] nand: nand_do_read_oob: from = 0x0ea20000, len = 64
[   52.139247] marvell-nfc pxa3xx-nand: 
[   52.139247] NDCR:  0x9d079fff
[   52.139247] NDCB0: 0x000d3000
[   52.139247] NDCB1: 0xd4400000
[   52.139247] NDCB2: 0x00000001
[   52.139247] NDCB3: 0x00000000
[   52.158171] nand: nand_do_read_oob: from = 0x0ea40000, len = 64
[   52.164373] marvell-nfc pxa3xx-nand: 
[   52.164373] NDCR:  0x9d079fff
[   52.164373] NDCB0: 0x000d3000
[   52.164373] NDCB1: 0xd4800000
[   52.164373] NDCB2: 0x00000001
[   52.164373] NDCB3: 0x00000000
[   52.183302] nand: nand_do_read_oob: from = 0x0ea60000, len = 64
[   52.189503] marvell-nfc pxa3xx-nand: 
[   52.189503] NDCR:  0x9d079fff
[   52.189503] NDCB0: 0x000d3000
[   52.189503] NDCB1: 0xd4c00000
[   52.189503] NDCB2: 0x00000001
[   52.189503] NDCB3: 0x00000000
[   52.208421] nand: nand_do_read_oob: from = 0x0ea80000, len = 64
[   52.214626] marvell-nfc pxa3xx-nand: 
[   52.214626] NDCR:  0x9d079fff
[   52.214626] NDCB0: 0x000d3000
[   52.214626] NDCB1: 0xd5000000
[   52.214626] NDCB2: 0x00000001
[   52.214626] NDCB3: 0x00000000
[   52.233553] nand: nand_do_read_oob: from = 0x0eaa0000, len = 64
[   52.239759] marvell-nfc pxa3xx-nand: 
[   52.239759] NDCR:  0x9d079fff
[   52.239759] NDCB0: 0x000d3000
[   52.239759] NDCB1: 0xd5400000
[   52.239759] NDCB2: 0x00000001
[   52.239759] NDCB3: 0x00000000
[   52.258771] nand: nand_do_read_oob: from = 0x0eac0000, len = 64
[   52.264806] marvell-nfc pxa3xx-nand: 
[   52.264806] NDCR:  0x9d079fff
[   52.264806] NDCB0: 0x000d3000
[   52.264806] NDCB1: 0xd5800000
[   52.264806] NDCB2: 0x00000001
[   52.264806] NDCB3: 0x00000000
[   52.283726] nand: nand_do_read_oob: from = 0x0eae0000, len = 64
[   52.289932] marvell-nfc pxa3xx-nand: 
[   52.289932] NDCR:  0x9d079fff
[   52.289932] NDCB0: 0x000d3000
[   52.289932] NDCB1: 0xd5c00000
[   52.289932] NDCB2: 0x00000001
[   52.289932] NDCB3: 0x00000000
[   52.308900] nand: nand_do_read_oob: from = 0x0eb00000, len = 64
[   52.314939] marvell-nfc pxa3xx-nand: 
[   52.314939] NDCR:  0x9d079fff
[   52.314939] NDCB0: 0x000d3000
[   52.314939] NDCB1: 0xd6000000
[   52.314939] NDCB2: 0x00000001
[   52.314939] NDCB3: 0x00000000
[   52.333881] nand: nand_do_read_oob: from = 0x0eb20000, len = 64
[   52.340084] marvell-nfc pxa3xx-nand: 
[   52.340084] NDCR:  0x9d079fff
[   52.340084] NDCB0: 0x000d3000
[   52.340084] NDCB1: 0xd6400000
[   52.340084] NDCB2: 0x00000001
[   52.340084] NDCB3: 0x00000000
[   52.359049] nand: nand_do_read_oob: from = 0x0eb40000, len = 64
[   52.365087] marvell-nfc pxa3xx-nand: 
[   52.365087] NDCR:  0x9d079fff
[   52.365087] NDCB0: 0x000d3000
[   52.365087] NDCB1: 0xd6800000
[   52.365087] NDCB2: 0x00000001
[   52.365087] NDCB3: 0x00000000
[   52.384021] nand: nand_do_read_oob: from = 0x0eb60000, len = 64
[   52.390225] marvell-nfc pxa3xx-nand: 
[   52.390225] NDCR:  0x9d079fff
[   52.390225] NDCB0: 0x000d3000
[   52.390225] NDCB1: 0xd6c00000
[   52.390225] NDCB2: 0x00000001
[   52.390225] NDCB3: 0x00000000
[   52.409151] nand: nand_do_read_oob: from = 0x0eb80000, len = 64
[   52.415185] marvell-nfc pxa3xx-nand: 
[   52.415185] NDCR:  0x9d079fff
[   52.415185] NDCB0: 0x000d3000
[   52.415185] NDCB1: 0xd7000000
[   52.415185] NDCB2: 0x00000001
[   52.415185] NDCB3: 0x00000000
[   52.434116] nand: nand_do_read_oob: from = 0x0eba0000, len = 64
[   52.440325] marvell-nfc pxa3xx-nand: 
[   52.440325] NDCR:  0x9d079fff
[   52.440325] NDCB0: 0x000d3000
[   52.440325] NDCB1: 0xd7400000
[   52.440325] NDCB2: 0x00000001
[   52.440325] NDCB3: 0x00000000
[   52.459252] nand: nand_do_read_oob: from = 0x0ebc0000, len = 64
[   52.465283] marvell-nfc pxa3xx-nand: 
[   52.465283] NDCR:  0x9d079fff
[   52.465283] NDCB0: 0x000d3000
[   52.465283] NDCB1: 0xd7800000
[   52.465283] NDCB2: 0x00000001
[   52.465283] NDCB3: 0x00000000
[   52.484215] nand: nand_do_read_oob: from = 0x0ebe0000, len = 64
[   52.490422] marvell-nfc pxa3xx-nand: 
[   52.490422] NDCR:  0x9d079fff
[   52.490422] NDCB0: 0x000d3000
[   52.490422] NDCB1: 0xd7c00000
[   52.490422] NDCB2: 0x00000001
[   52.490422] NDCB3: 0x00000000
[   52.509349] nand: nand_do_read_oob: from = 0x0ec00000, len = 64
[   52.515381] marvell-nfc pxa3xx-nand: 
[   52.515381] NDCR:  0x9d079fff
[   52.515381] NDCB0: 0x000d3000
[   52.515381] NDCB1: 0xd8000000
[   52.515381] NDCB2: 0x00000001
[   52.515381] NDCB3: 0x00000000
[   52.534312] nand: nand_do_read_oob: from = 0x0ec20000, len = 64
[   52.540512] marvell-nfc pxa3xx-nand: 
[   52.540512] NDCR:  0x9d079fff
[   52.540512] NDCB0: 0x000d3000
[   52.540512] NDCB1: 0xd8400000
[   52.540512] NDCB2: 0x00000001
[   52.540512] NDCB3: 0x00000000
[   52.559436] nand: nand_do_read_oob: from = 0x0ec40000, len = 64
[   52.565472] marvell-nfc pxa3xx-nand: 
[   52.565472] NDCR:  0x9d079fff
[   52.565472] NDCB0: 0x000d3000
[   52.565472] NDCB1: 0xd8800000
[   52.565472] NDCB2: 0x00000001
[   52.565472] NDCB3: 0x00000000
[   52.584403] nand: nand_do_read_oob: from = 0x0ec60000, len = 64
[   52.590602] marvell-nfc pxa3xx-nand: 
[   52.590602] NDCR:  0x9d079fff
[   52.590602] NDCB0: 0x000d3000
[   52.590602] NDCB1: 0xd8c00000
[   52.590602] NDCB2: 0x00000001
[   52.590602] NDCB3: 0x00000000
[   52.609529] nand: nand_do_read_oob: from = 0x0ec80000, len = 64
[   52.615561] marvell-nfc pxa3xx-nand: 
[   52.615561] NDCR:  0x9d079fff
[   52.615561] NDCB0: 0x000d3000
[   52.615561] NDCB1: 0xd9000000
[   52.615561] NDCB2: 0x00000001
[   52.615561] NDCB3: 0x00000000
[   52.634492] nand: nand_do_read_oob: from = 0x0eca0000, len = 64
[   52.640691] marvell-nfc pxa3xx-nand: 
[   52.640691] NDCR:  0x9d079fff
[   52.640691] NDCB0: 0x000d3000
[   52.640691] NDCB1: 0xd9400000
[   52.640691] NDCB2: 0x00000001
[   52.640691] NDCB3: 0x00000000
[   52.659619] nand: nand_do_read_oob: from = 0x0ecc0000, len = 64
[   52.665651] marvell-nfc pxa3xx-nand: 
[   52.665651] NDCR:  0x9d079fff
[   52.665651] NDCB0: 0x000d3000
[   52.665651] NDCB1: 0xd9800000
[   52.665651] NDCB2: 0x00000001
[   52.665651] NDCB3: 0x00000000
[   52.684583] nand: nand_do_read_oob: from = 0x0ece0000, len = 64
[   52.690780] marvell-nfc pxa3xx-nand: 
[   52.690780] NDCR:  0x9d079fff
[   52.690780] NDCB0: 0x000d3000
[   52.690780] NDCB1: 0xd9c00000
[   52.690780] NDCB2: 0x00000001
[   52.690780] NDCB3: 0x00000000
[   52.709708] nand: nand_do_read_oob: from = 0x0ed00000, len = 64
[   52.715741] marvell-nfc pxa3xx-nand: 
[   52.715741] NDCR:  0x9d079fff
[   52.715741] NDCB0: 0x000d3000
[   52.715741] NDCB1: 0xda000000
[   52.715741] NDCB2: 0x00000001
[   52.715741] NDCB3: 0x00000000
[   52.734673] nand: nand_do_read_oob: from = 0x0ed20000, len = 64
[   52.740899] marvell-nfc pxa3xx-nand: 
[   52.740899] NDCR:  0x9d079fff
[   52.740899] NDCB0: 0x000d3000
[   52.740899] NDCB1: 0xda400000
[   52.740899] NDCB2: 0x00000001
[   52.740899] NDCB3: 0x00000000
[   52.759825] nand: nand_do_read_oob: from = 0x0ed40000, len = 64
[   52.765856] marvell-nfc pxa3xx-nand: 
[   52.765856] NDCR:  0x9d079fff
[   52.765856] NDCB0: 0x000d3000
[   52.765856] NDCB1: 0xda800000
[   52.765856] NDCB2: 0x00000001
[   52.765856] NDCB3: 0x00000000
[   52.784787] nand: nand_do_read_oob: from = 0x0ed60000, len = 64
[   52.790987] marvell-nfc pxa3xx-nand: 
[   52.790987] NDCR:  0x9d079fff
[   52.790987] NDCB0: 0x000d3000
[   52.790987] NDCB1: 0xdac00000
[   52.790987] NDCB2: 0x00000001
[   52.790987] NDCB3: 0x00000000
[   52.809915] nand: nand_do_read_oob: from = 0x0ed80000, len = 64
[   52.815947] marvell-nfc pxa3xx-nand: 
[   52.815947] NDCR:  0x9d079fff
[   52.815947] NDCB0: 0x000d3000
[   52.815947] NDCB1: 0xdb000000
[   52.815947] NDCB2: 0x00000001
[   52.815947] NDCB3: 0x00000000
[   52.834878] nand: nand_do_read_oob: from = 0x0eda0000, len = 64
[   52.841087] marvell-nfc pxa3xx-nand: 
[   52.841087] NDCR:  0x9d079fff
[   52.841087] NDCB0: 0x000d3000
[   52.841087] NDCB1: 0xdb400000
[   52.841087] NDCB2: 0x00000001
[   52.841087] NDCB3: 0x00000000
[   52.860012] nand: nand_do_read_oob: from = 0x0edc0000, len = 64
[   52.866045] marvell-nfc pxa3xx-nand: 
[   52.866045] NDCR:  0x9d079fff
[   52.866045] NDCB0: 0x000d3000
[   52.866045] NDCB1: 0xdb800000
[   52.866045] NDCB2: 0x00000001
[   52.866045] NDCB3: 0x00000000
[   52.884976] nand: nand_do_read_oob: from = 0x0ede0000, len = 64
[   52.891184] marvell-nfc pxa3xx-nand: 
[   52.891184] NDCR:  0x9d079fff
[   52.891184] NDCB0: 0x000d3000
[   52.891184] NDCB1: 0xdbc00000
[   52.891184] NDCB2: 0x00000001
[   52.891184] NDCB3: 0x00000000
[   52.910112] nand: nand_do_read_oob: from = 0x0ee00000, len = 64
[   52.916144] marvell-nfc pxa3xx-nand: 
[   52.916144] NDCR:  0x9d079fff
[   52.916144] NDCB0: 0x000d3000
[   52.916144] NDCB1: 0xdc000000
[   52.916144] NDCB2: 0x00000001
[   52.916144] NDCB3: 0x00000000
[   52.935078] nand: nand_do_read_oob: from = 0x0ee20000, len = 64
[   52.941281] marvell-nfc pxa3xx-nand: 
[   52.941281] NDCR:  0x9d079fff
[   52.941281] NDCB0: 0x000d3000
[   52.941281] NDCB1: 0xdc400000
[   52.941281] NDCB2: 0x00000001
[   52.941281] NDCB3: 0x00000000
[   52.960212] nand: nand_do_read_oob: from = 0x0ee40000, len = 64
[   52.966241] marvell-nfc pxa3xx-nand: 
[   52.966241] NDCR:  0x9d079fff
[   52.966241] NDCB0: 0x000d3000
[   52.966241] NDCB1: 0xdc800000
[   52.966241] NDCB2: 0x00000001
[   52.966241] NDCB3: 0x00000000
[   52.985178] nand: nand_do_read_oob: from = 0x0ee60000, len = 64
[   52.991382] marvell-nfc pxa3xx-nand: 
[   52.991382] NDCR:  0x9d079fff
[   52.991382] NDCB0: 0x000d3000
[   52.991382] NDCB1: 0xdcc00000
[   52.991382] NDCB2: 0x00000001
[   52.991382] NDCB3: 0x00000000
[   53.010320] nand: nand_do_read_oob: from = 0x0ee80000, len = 64
[   53.016349] marvell-nfc pxa3xx-nand: 
[   53.016349] NDCR:  0x9d079fff
[   53.016349] NDCB0: 0x000d3000
[   53.016349] NDCB1: 0xdd000000
[   53.016349] NDCB2: 0x00000001
[   53.016349] NDCB3: 0x00000000
[   53.035281] nand: nand_do_read_oob: from = 0x0eea0000, len = 64
[   53.041487] marvell-nfc pxa3xx-nand: 
[   53.041487] NDCR:  0x9d079fff
[   53.041487] NDCB0: 0x000d3000
[   53.041487] NDCB1: 0xdd400000
[   53.041487] NDCB2: 0x00000001
[   53.041487] NDCB3: 0x00000000
[   53.060415] nand: nand_do_read_oob: from = 0x0eec0000, len = 64
[   53.066448] marvell-nfc pxa3xx-nand: 
[   53.066448] NDCR:  0x9d079fff
[   53.066448] NDCB0: 0x000d3000
[   53.066448] NDCB1: 0xdd800000
[   53.066448] NDCB2: 0x00000001
[   53.066448] NDCB3: 0x00000000
[   53.085382] nand: nand_do_read_oob: from = 0x0eee0000, len = 64
[   53.091586] marvell-nfc pxa3xx-nand: 
[   53.091586] NDCR:  0x9d079fff
[   53.091586] NDCB0: 0x000d3000
[   53.091586] NDCB1: 0xddc00000
[   53.091586] NDCB2: 0x00000001
[   53.091586] NDCB3: 0x00000000
[   53.110512] nand: nand_do_read_oob: from = 0x0ef00000, len = 64
[   53.116545] marvell-nfc pxa3xx-nand: 
[   53.116545] NDCR:  0x9d079fff
[   53.116545] NDCB0: 0x000d3000
[   53.116545] NDCB1: 0xde000000
[   53.116545] NDCB2: 0x00000001
[   53.116545] NDCB3: 0x00000000
[   53.135479] nand: nand_do_read_oob: from = 0x0ef20000, len = 64
[   53.141683] marvell-nfc pxa3xx-nand: 
[   53.141683] NDCR:  0x9d079fff
[   53.141683] NDCB0: 0x000d3000
[   53.141683] NDCB1: 0xde400000
[   53.141683] NDCB2: 0x00000001
[   53.141683] NDCB3: 0x00000000
[   53.160614] nand: nand_do_read_oob: from = 0x0ef40000, len = 64
[   53.166645] marvell-nfc pxa3xx-nand: 
[   53.166645] NDCR:  0x9d079fff
[   53.166645] NDCB0: 0x000d3000
[   53.166645] NDCB1: 0xde800000
[   53.166645] NDCB2: 0x00000001
[   53.166645] NDCB3: 0x00000000
[   53.185578] nand: nand_do_read_oob: from = 0x0ef60000, len = 64
[   53.191784] marvell-nfc pxa3xx-nand: 
[   53.191784] NDCR:  0x9d079fff
[   53.191784] NDCB0: 0x000d3000
[   53.191784] NDCB1: 0xdec00000
[   53.191784] NDCB2: 0x00000001
[   53.191784] NDCB3: 0x00000000
[   53.210710] nand: nand_do_read_oob: from = 0x0ef80000, len = 64
[   53.216743] marvell-nfc pxa3xx-nand: 
[   53.216743] NDCR:  0x9d079fff
[   53.216743] NDCB0: 0x000d3000
[   53.216743] NDCB1: 0xdf000000
[   53.216743] NDCB2: 0x00000001
[   53.216743] NDCB3: 0x00000000
[   53.235675] nand: nand_do_read_oob: from = 0x0efa0000, len = 64
[   53.241883] marvell-nfc pxa3xx-nand: 
[   53.241883] NDCR:  0x9d079fff
[   53.241883] NDCB0: 0x000d3000
[   53.241883] NDCB1: 0xdf400000
[   53.241883] NDCB2: 0x00000001
[   53.241883] NDCB3: 0x00000000
[   53.260808] nand: nand_do_read_oob: from = 0x0efc0000, len = 64
[   53.266844] marvell-nfc pxa3xx-nand: 
[   53.266844] NDCR:  0x9d079fff
[   53.266844] NDCB0: 0x000d3000
[   53.266844] NDCB1: 0xdf800000
[   53.266844] NDCB2: 0x00000001
[   53.266844] NDCB3: 0x00000000
[   53.285782] nand: nand_do_read_oob: from = 0x0efe0000, len = 64
[   53.291989] marvell-nfc pxa3xx-nand: 
[   53.291989] NDCR:  0x9d079fff
[   53.291989] NDCB0: 0x000d3000
[   53.291989] NDCB1: 0xdfc00000
[   53.291989] NDCB2: 0x00000001
[   53.291989] NDCB3: 0x00000000
[   53.310918] nand: nand_do_read_oob: from = 0x0f000000, len = 64
[   53.316949] marvell-nfc pxa3xx-nand: 
[   53.316949] NDCR:  0x9d079fff
[   53.316949] NDCB0: 0x000d3000
[   53.316949] NDCB1: 0xe0000000
[   53.316949] NDCB2: 0x00000001
[   53.316949] NDCB3: 0x00000000
[   53.335880] nand: nand_do_read_oob: from = 0x0f020000, len = 64
[   53.342087] marvell-nfc pxa3xx-nand: 
[   53.342087] NDCR:  0x9d079fff
[   53.342087] NDCB0: 0x000d3000
[   53.342087] NDCB1: 0xe0400000
[   53.342087] NDCB2: 0x00000001
[   53.342087] NDCB3: 0x00000000
[   53.361015] nand: nand_do_read_oob: from = 0x0f040000, len = 64
[   53.367047] marvell-nfc pxa3xx-nand: 
[   53.367047] NDCR:  0x9d079fff
[   53.367047] NDCB0: 0x000d3000
[   53.367047] NDCB1: 0xe0800000
[   53.367047] NDCB2: 0x00000001
[   53.367047] NDCB3: 0x00000000
[   53.385996] nand: nand_do_read_oob: from = 0x0f060000, len = 64
[   53.392194] marvell-nfc pxa3xx-nand: 
[   53.392194] NDCR:  0x9d079fff
[   53.392194] NDCB0: 0x000d3000
[   53.392194] NDCB1: 0xe0c00000
[   53.392194] NDCB2: 0x00000001
[   53.392194] NDCB3: 0x00000000
[   53.411122] nand: nand_do_read_oob: from = 0x0f080000, len = 64
[   53.417152] marvell-nfc pxa3xx-nand: 
[   53.417152] NDCR:  0x9d079fff
[   53.417152] NDCB0: 0x000d3000
[   53.417152] NDCB1: 0xe1000000
[   53.417152] NDCB2: 0x00000001
[   53.417152] NDCB3: 0x00000000
[   53.436087] nand: nand_do_read_oob: from = 0x0f0a0000, len = 64
[   53.442294] marvell-nfc pxa3xx-nand: 
[   53.442294] NDCR:  0x9d079fff
[   53.442294] NDCB0: 0x000d3000
[   53.442294] NDCB1: 0xe1400000
[   53.442294] NDCB2: 0x00000001
[   53.442294] NDCB3: 0x00000000
[   53.461220] nand: nand_do_read_oob: from = 0x0f0c0000, len = 64
[   53.467251] marvell-nfc pxa3xx-nand: 
[   53.467251] NDCR:  0x9d079fff
[   53.467251] NDCB0: 0x000d3000
[   53.467251] NDCB1: 0xe1800000
[   53.467251] NDCB2: 0x00000001
[   53.467251] NDCB3: 0x00000000
[   53.486185] nand: nand_do_read_oob: from = 0x0f0e0000, len = 64
[   53.492392] marvell-nfc pxa3xx-nand: 
[   53.492392] NDCR:  0x9d079fff
[   53.492392] NDCB0: 0x000d3000
[   53.492392] NDCB1: 0xe1c00000
[   53.492392] NDCB2: 0x00000001
[   53.492392] NDCB3: 0x00000000
[   53.511318] nand: nand_do_read_oob: from = 0x0f100000, len = 64
[   53.517349] marvell-nfc pxa3xx-nand: 
[   53.517349] NDCR:  0x9d079fff
[   53.517349] NDCB0: 0x000d3000
[   53.517349] NDCB1: 0xe2000000
[   53.517349] NDCB2: 0x00000001
[   53.517349] NDCB3: 0x00000000
[   53.536283] nand: nand_do_read_oob: from = 0x0f120000, len = 64
[   53.542487] marvell-nfc pxa3xx-nand: 
[   53.542487] NDCR:  0x9d079fff
[   53.542487] NDCB0: 0x000d3000
[   53.542487] NDCB1: 0xe2400000
[   53.542487] NDCB2: 0x00000001
[   53.542487] NDCB3: 0x00000000
[   53.561416] nand: nand_do_read_oob: from = 0x0f140000, len = 64
[   53.567448] marvell-nfc pxa3xx-nand: 
[   53.567448] NDCR:  0x9d079fff
[   53.567448] NDCB0: 0x000d3000
[   53.567448] NDCB1: 0xe2800000
[   53.567448] NDCB2: 0x00000001
[   53.567448] NDCB3: 0x00000000
[   53.586382] nand: nand_do_read_oob: from = 0x0f160000, len = 64
[   53.592590] marvell-nfc pxa3xx-nand: 
[   53.592590] NDCR:  0x9d079fff
[   53.592590] NDCB0: 0x000d3000
[   53.592590] NDCB1: 0xe2c00000
[   53.592590] NDCB2: 0x00000001
[   53.592590] NDCB3: 0x00000000
[   53.611520] nand: nand_do_read_oob: from = 0x0f180000, len = 64
[   53.617557] marvell-nfc pxa3xx-nand: 
[   53.617557] NDCR:  0x9d079fff
[   53.617557] NDCB0: 0x000d3000
[   53.617557] NDCB1: 0xe3000000
[   53.617557] NDCB2: 0x00000001
[   53.617557] NDCB3: 0x00000000
[   53.636488] nand: nand_do_read_oob: from = 0x0f1a0000, len = 64
[   53.642692] marvell-nfc pxa3xx-nand: 
[   53.642692] NDCR:  0x9d079fff
[   53.642692] NDCB0: 0x000d3000
[   53.642692] NDCB1: 0xe3400000
[   53.642692] NDCB2: 0x00000001
[   53.642692] NDCB3: 0x00000000
[   53.661621] nand: nand_do_read_oob: from = 0x0f1c0000, len = 64
[   53.667654] marvell-nfc pxa3xx-nand: 
[   53.667654] NDCR:  0x9d079fff
[   53.667654] NDCB0: 0x000d3000
[   53.667654] NDCB1: 0xe3800000
[   53.667654] NDCB2: 0x00000001
[   53.667654] NDCB3: 0x00000000
[   53.686588] nand: nand_do_read_oob: from = 0x0f1e0000, len = 64
[   53.692795] marvell-nfc pxa3xx-nand: 
[   53.692795] NDCR:  0x9d079fff
[   53.692795] NDCB0: 0x000d3000
[   53.692795] NDCB1: 0xe3c00000
[   53.692795] NDCB2: 0x00000001
[   53.692795] NDCB3: 0x00000000
[   53.711723] nand: nand_do_read_oob: from = 0x0f200000, len = 64
[   53.717752] marvell-nfc pxa3xx-nand: 
[   53.717752] NDCR:  0x9d079fff
[   53.717752] NDCB0: 0x000d3000
[   53.717752] NDCB1: 0xe4000000
[   53.717752] NDCB2: 0x00000001
[   53.717752] NDCB3: 0x00000000
[   53.736690] nand: nand_do_read_oob: from = 0x0f220000, len = 64
[   53.742892] marvell-nfc pxa3xx-nand: 
[   53.742892] NDCR:  0x9d079fff
[   53.742892] NDCB0: 0x000d3000
[   53.742892] NDCB1: 0xe4400000
[   53.742892] NDCB2: 0x00000001
[   53.742892] NDCB3: 0x00000000
[   53.761820] nand: nand_do_read_oob: from = 0x0f240000, len = 64
[   53.767851] marvell-nfc pxa3xx-nand: 
[   53.767851] NDCR:  0x9d079fff
[   53.767851] NDCB0: 0x000d3000
[   53.767851] NDCB1: 0xe4800000
[   53.767851] NDCB2: 0x00000001
[   53.767851] NDCB3: 0x00000000
[   53.786788] nand: nand_do_read_oob: from = 0x0f260000, len = 64
[   53.792989] marvell-nfc pxa3xx-nand: 
[   53.792989] NDCR:  0x9d079fff
[   53.792989] NDCB0: 0x000d3000
[   53.792989] NDCB1: 0xe4c00000
[   53.792989] NDCB2: 0x00000001
[   53.792989] NDCB3: 0x00000000
[   53.811919] nand: nand_do_read_oob: from = 0x0f280000, len = 64
[   53.817949] marvell-nfc pxa3xx-nand: 
[   53.817949] NDCR:  0x9d079fff
[   53.817949] NDCB0: 0x000d3000
[   53.817949] NDCB1: 0xe5000000
[   53.817949] NDCB2: 0x00000001
[   53.817949] NDCB3: 0x00000000
[   53.836886] nand: nand_do_read_oob: from = 0x0f2a0000, len = 64
[   53.843088] marvell-nfc pxa3xx-nand: 
[   53.843088] NDCR:  0x9d079fff
[   53.843088] NDCB0: 0x000d3000
[   53.843088] NDCB1: 0xe5400000
[   53.843088] NDCB2: 0x00000001
[   53.843088] NDCB3: 0x00000000
[   53.862019] nand: nand_do_read_oob: from = 0x0f2c0000, len = 64
[   53.868047] marvell-nfc pxa3xx-nand: 
[   53.868047] NDCR:  0x9d079fff
[   53.868047] NDCB0: 0x000d3000
[   53.868047] NDCB1: 0xe5800000
[   53.868047] NDCB2: 0x00000001
[   53.868047] NDCB3: 0x00000000
[   53.886984] nand: nand_do_read_oob: from = 0x0f2e0000, len = 64
[   53.893186] marvell-nfc pxa3xx-nand: 
[   53.893186] NDCR:  0x9d079fff
[   53.893186] NDCB0: 0x000d3000
[   53.893186] NDCB1: 0xe5c00000
[   53.893186] NDCB2: 0x00000001
[   53.893186] NDCB3: 0x00000000
[   53.912115] nand: nand_do_read_oob: from = 0x0f300000, len = 64
[   53.918147] marvell-nfc pxa3xx-nand: 
[   53.918147] NDCR:  0x9d079fff
[   53.918147] NDCB0: 0x000d3000
[   53.918147] NDCB1: 0xe6000000
[   53.918147] NDCB2: 0x00000001
[   53.918147] NDCB3: 0x00000000
[   53.937080] nand: nand_do_read_oob: from = 0x0f320000, len = 64
[   53.943287] marvell-nfc pxa3xx-nand: 
[   53.943287] NDCR:  0x9d079fff
[   53.943287] NDCB0: 0x000d3000
[   53.943287] NDCB1: 0xe6400000
[   53.943287] NDCB2: 0x00000001
[   53.943287] NDCB3: 0x00000000
[   53.962214] nand: nand_do_read_oob: from = 0x0f340000, len = 64
[   53.968244] marvell-nfc pxa3xx-nand: 
[   53.968244] NDCR:  0x9d079fff
[   53.968244] NDCB0: 0x000d3000
[   53.968244] NDCB1: 0xe6800000
[   53.968244] NDCB2: 0x00000001
[   53.968244] NDCB3: 0x00000000
[   53.987179] nand: nand_do_read_oob: from = 0x0f360000, len = 64
[   53.993384] marvell-nfc pxa3xx-nand: 
[   53.993384] NDCR:  0x9d079fff
[   53.993384] NDCB0: 0x000d3000
[   53.993384] NDCB1: 0xe6c00000
[   53.993384] NDCB2: 0x00000001
[   53.993384] NDCB3: 0x00000000
[   54.012322] nand: nand_do_read_oob: from = 0x0f380000, len = 64
[   54.018353] marvell-nfc pxa3xx-nand: 
[   54.018353] NDCR:  0x9d079fff
[   54.018353] NDCB0: 0x000d3000
[   54.018353] NDCB1: 0xe7000000
[   54.018353] NDCB2: 0x00000001
[   54.018353] NDCB3: 0x00000000
[   54.037302] nand: nand_do_read_oob: from = 0x0f3a0000, len = 64
[   54.043507] marvell-nfc pxa3xx-nand: 
[   54.043507] NDCR:  0x9d079fff
[   54.043507] NDCB0: 0x000d3000
[   54.043507] NDCB1: 0xe7400000
[   54.043507] NDCB2: 0x00000001
[   54.043507] NDCB3: 0x00000000
[   54.062437] nand: nand_do_read_oob: from = 0x0f3c0000, len = 64
[   54.068467] marvell-nfc pxa3xx-nand: 
[   54.068467] NDCR:  0x9d079fff
[   54.068467] NDCB0: 0x000d3000
[   54.068467] NDCB1: 0xe7800000
[   54.068467] NDCB2: 0x00000001
[   54.068467] NDCB3: 0x00000000
[   54.087400] nand: nand_do_read_oob: from = 0x0f3e0000, len = 64
[   54.093890] marvell-nfc pxa3xx-nand: 
[   54.093890] NDCR:  0x9d079fff
[   54.093890] NDCB0: 0x000d3000
[   54.093890] NDCB1: 0xe7c00000
[   54.093890] NDCB2: 0x00000001
[   54.093890] NDCB3: 0x00000000
[   54.112895] nand: nand_do_read_oob: from = 0x0f400000, len = 64
[   54.119100] marvell-nfc pxa3xx-nand: 
[   54.119100] NDCR:  0x9d079fff
[   54.119100] NDCB0: 0x000d3000
[   54.119100] NDCB1: 0xe8000000
[   54.119100] NDCB2: 0x00000001
[   54.119100] NDCB3: 0x00000000
[   54.138017] nand: nand_do_read_oob: from = 0x0f420000, len = 64
[   54.144219] marvell-nfc pxa3xx-nand: 
[   54.144219] NDCR:  0x9d079fff
[   54.144219] NDCB0: 0x000d3000
[   54.144219] NDCB1: 0xe8400000
[   54.144219] NDCB2: 0x00000001
[   54.144219] NDCB3: 0x00000000
[   54.163151] nand: nand_do_read_oob: from = 0x0f440000, len = 64
[   54.169352] marvell-nfc pxa3xx-nand: 
[   54.169352] NDCR:  0x9d079fff
[   54.169352] NDCB0: 0x000d3000
[   54.169352] NDCB1: 0xe8800000
[   54.169352] NDCB2: 0x00000001
[   54.169352] NDCB3: 0x00000000
[   54.188273] nand: nand_do_read_oob: from = 0x0f460000, len = 64
[   54.194475] marvell-nfc pxa3xx-nand: 
[   54.194475] NDCR:  0x9d079fff
[   54.194475] NDCB0: 0x000d3000
[   54.194475] NDCB1: 0xe8c00000
[   54.194475] NDCB2: 0x00000001
[   54.194475] NDCB3: 0x00000000
[   54.213406] nand: nand_do_read_oob: from = 0x0f480000, len = 64
[   54.219604] marvell-nfc pxa3xx-nand: 
[   54.219604] NDCR:  0x9d079fff
[   54.219604] NDCB0: 0x000d3000
[   54.219604] NDCB1: 0xe9000000
[   54.219604] NDCB2: 0x00000001
[   54.219604] NDCB3: 0x00000000
[   54.238528] nand: nand_do_read_oob: from = 0x0f4a0000, len = 64
[   54.244729] marvell-nfc pxa3xx-nand: 
[   54.244729] NDCR:  0x9d079fff
[   54.244729] NDCB0: 0x000d3000
[   54.244729] NDCB1: 0xe9400000
[   54.244729] NDCB2: 0x00000001
[   54.244729] NDCB3: 0x00000000
[   54.263659] nand: nand_do_read_oob: from = 0x0f4c0000, len = 64
[   54.269860] marvell-nfc pxa3xx-nand: 
[   54.269860] NDCR:  0x9d079fff
[   54.269860] NDCB0: 0x000d3000
[   54.269860] NDCB1: 0xe9800000
[   54.269860] NDCB2: 0x00000001
[   54.269860] NDCB3: 0x00000000
[   54.288853] nand: nand_do_read_oob: from = 0x0f4e0000, len = 64
[   54.294892] marvell-nfc pxa3xx-nand: 
[   54.294892] NDCR:  0x9d079fff
[   54.294892] NDCB0: 0x000d3000
[   54.294892] NDCB1: 0xe9c00000
[   54.294892] NDCB2: 0x00000001
[   54.294892] NDCB3: 0x00000000
[   54.313824] nand: nand_do_read_oob: from = 0x0f500000, len = 64
[   54.320028] marvell-nfc pxa3xx-nand: 
[   54.320028] NDCR:  0x9d079fff
[   54.320028] NDCB0: 0x000d3000
[   54.320028] NDCB1: 0xea000000
[   54.320028] NDCB2: 0x00000001
[   54.320028] NDCB3: 0x00000000
[   54.338995] nand: nand_do_read_oob: from = 0x0f520000, len = 64
[   54.345031] marvell-nfc pxa3xx-nand: 
[   54.345031] NDCR:  0x9d079fff
[   54.345031] NDCB0: 0x000d3000
[   54.345031] NDCB1: 0xea400000
[   54.345031] NDCB2: 0x00000001
[   54.345031] NDCB3: 0x00000000
[   54.363965] nand: nand_do_read_oob: from = 0x0f540000, len = 64
[   54.370170] marvell-nfc pxa3xx-nand: 
[   54.370170] NDCR:  0x9d079fff
[   54.370170] NDCB0: 0x000d3000
[   54.370170] NDCB1: 0xea800000
[   54.370170] NDCB2: 0x00000001
[   54.370170] NDCB3: 0x00000000
[   54.389098] nand: nand_do_read_oob: from = 0x0f560000, len = 64
[   54.395127] marvell-nfc pxa3xx-nand: 
[   54.395127] NDCR:  0x9d079fff
[   54.395127] NDCB0: 0x000d3000
[   54.395127] NDCB1: 0xeac00000
[   54.395127] NDCB2: 0x00000001
[   54.395127] NDCB3: 0x00000000
[   54.414061] nand: nand_do_read_oob: from = 0x0f580000, len = 64
[   54.420269] marvell-nfc pxa3xx-nand: 
[   54.420269] NDCR:  0x9d079fff
[   54.420269] NDCB0: 0x000d3000
[   54.420269] NDCB1: 0xeb000000
[   54.420269] NDCB2: 0x00000001
[   54.420269] NDCB3: 0x00000000
[   54.439196] nand: nand_do_read_oob: from = 0x0f5a0000, len = 64
[   54.445227] marvell-nfc pxa3xx-nand: 
[   54.445227] NDCR:  0x9d079fff
[   54.445227] NDCB0: 0x000d3000
[   54.445227] NDCB1: 0xeb400000
[   54.445227] NDCB2: 0x00000001
[   54.445227] NDCB3: 0x00000000
[   54.464162] nand: nand_do_read_oob: from = 0x0f5c0000, len = 64
[   54.470366] marvell-nfc pxa3xx-nand: 
[   54.470366] NDCR:  0x9d079fff
[   54.470366] NDCB0: 0x000d3000
[   54.470366] NDCB1: 0xeb800000
[   54.470366] NDCB2: 0x00000001
[   54.470366] NDCB3: 0x00000000
[   54.489294] nand: nand_do_read_oob: from = 0x0f5e0000, len = 64
[   54.495326] marvell-nfc pxa3xx-nand: 
[   54.495326] NDCR:  0x9d079fff
[   54.495326] NDCB0: 0x000d3000
[   54.495326] NDCB1: 0xebc00000
[   54.495326] NDCB2: 0x00000001
[   54.495326] NDCB3: 0x00000000
[   54.514262] nand: nand_do_read_oob: from = 0x0f600000, len = 64
[   54.520463] marvell-nfc pxa3xx-nand: 
[   54.520463] NDCR:  0x9d079fff
[   54.520463] NDCB0: 0x000d3000
[   54.520463] NDCB1: 0xec000000
[   54.520463] NDCB2: 0x00000001
[   54.520463] NDCB3: 0x00000000
[   54.539399] nand: nand_do_read_oob: from = 0x0f620000, len = 64
[   54.545433] marvell-nfc pxa3xx-nand: 
[   54.545433] NDCR:  0x9d079fff
[   54.545433] NDCB0: 0x000d3000
[   54.545433] NDCB1: 0xec400000
[   54.545433] NDCB2: 0x00000001
[   54.545433] NDCB3: 0x00000000
[   54.564367] nand: nand_do_read_oob: from = 0x0f640000, len = 64
[   54.570571] marvell-nfc pxa3xx-nand: 
[   54.570571] NDCR:  0x9d079fff
[   54.570571] NDCB0: 0x000d3000
[   54.570571] NDCB1: 0xec800000
[   54.570571] NDCB2: 0x00000001
[   54.570571] NDCB3: 0x00000000
[   54.589501] nand: nand_do_read_oob: from = 0x0f660000, len = 64
[   54.595532] marvell-nfc pxa3xx-nand: 
[   54.595532] NDCR:  0x9d079fff
[   54.595532] NDCB0: 0x000d3000
[   54.595532] NDCB1: 0xecc00000
[   54.595532] NDCB2: 0x00000001
[   54.595532] NDCB3: 0x00000000
[   54.614466] nand: nand_do_read_oob: from = 0x0f680000, len = 64
[   54.620694] marvell-nfc pxa3xx-nand: 
[   54.620694] NDCR:  0x9d079fff
[   54.620694] NDCB0: 0x000d3000
[   54.620694] NDCB1: 0xed000000
[   54.620694] NDCB2: 0x00000001
[   54.620694] NDCB3: 0x00000000
[   54.639628] nand: nand_do_read_oob: from = 0x0f6a0000, len = 64
[   54.645655] marvell-nfc pxa3xx-nand: 
[   54.645655] NDCR:  0x9d079fff
[   54.645655] NDCB0: 0x000d3000
[   54.645655] NDCB1: 0xed400000
[   54.645655] NDCB2: 0x00000001
[   54.645655] NDCB3: 0x00000000
[   54.664589] nand: nand_do_read_oob: from = 0x0f6c0000, len = 64
[   54.670794] marvell-nfc pxa3xx-nand: 
[   54.670794] NDCR:  0x9d079fff
[   54.670794] NDCB0: 0x000d3000
[   54.670794] NDCB1: 0xed800000
[   54.670794] NDCB2: 0x00000001
[   54.670794] NDCB3: 0x00000000
[   54.689725] nand: nand_do_read_oob: from = 0x0f6e0000, len = 64
[   54.695755] marvell-nfc pxa3xx-nand: 
[   54.695755] NDCR:  0x9d079fff
[   54.695755] NDCB0: 0x000d3000
[   54.695755] NDCB1: 0xedc00000
[   54.695755] NDCB2: 0x00000001
[   54.695755] NDCB3: 0x00000000
[   54.714687] nand: nand_do_read_oob: from = 0x0f700000, len = 64
[   54.720893] marvell-nfc pxa3xx-nand: 
[   54.720893] NDCR:  0x9d079fff
[   54.720893] NDCB0: 0x000d3000
[   54.720893] NDCB1: 0xee000000
[   54.720893] NDCB2: 0x00000001
[   54.720893] NDCB3: 0x00000000
[   54.739822] nand: nand_do_read_oob: from = 0x0f720000, len = 64
[   54.745853] marvell-nfc pxa3xx-nand: 
[   54.745853] NDCR:  0x9d079fff
[   54.745853] NDCB0: 0x000d3000
[   54.745853] NDCB1: 0xee400000
[   54.745853] NDCB2: 0x00000001
[   54.745853] NDCB3: 0x00000000
[   54.764785] nand: nand_do_read_oob: from = 0x0f740000, len = 64
[   54.770992] marvell-nfc pxa3xx-nand: 
[   54.770992] NDCR:  0x9d079fff
[   54.770992] NDCB0: 0x000d3000
[   54.770992] NDCB1: 0xee800000
[   54.770992] NDCB2: 0x00000001
[   54.770992] NDCB3: 0x00000000
[   54.789920] nand: nand_do_read_oob: from = 0x0f760000, len = 64
[   54.795952] marvell-nfc pxa3xx-nand: 
[   54.795952] NDCR:  0x9d079fff
[   54.795952] NDCB0: 0x000d3000
[   54.795952] NDCB1: 0xeec00000
[   54.795952] NDCB2: 0x00000001
[   54.795952] NDCB3: 0x00000000
[   54.814883] nand: nand_do_read_oob: from = 0x0f780000, len = 64
[   54.821090] marvell-nfc pxa3xx-nand: 
[   54.821090] NDCR:  0x9d079fff
[   54.821090] NDCB0: 0x000d3000
[   54.821090] NDCB1: 0xef000000
[   54.821090] NDCB2: 0x00000001
[   54.821090] NDCB3: 0x00000000
[   54.840019] nand: nand_do_read_oob: from = 0x0f7a0000, len = 64
[   54.846049] marvell-nfc pxa3xx-nand: 
[   54.846049] NDCR:  0x9d079fff
[   54.846049] NDCB0: 0x000d3000
[   54.846049] NDCB1: 0xef400000
[   54.846049] NDCB2: 0x00000001
[   54.846049] NDCB3: 0x00000000
[   54.864982] nand: nand_do_read_oob: from = 0x0f7c0000, len = 64
[   54.871190] marvell-nfc pxa3xx-nand: 
[   54.871190] NDCR:  0x9d079fff
[   54.871190] NDCB0: 0x000d3000
[   54.871190] NDCB1: 0xef800000
[   54.871190] NDCB2: 0x00000001
[   54.871190] NDCB3: 0x00000000
[   54.890119] nand: nand_do_read_oob: from = 0x0f7e0000, len = 64
[   54.896150] marvell-nfc pxa3xx-nand: 
[   54.896150] NDCR:  0x9d079fff
[   54.896150] NDCB0: 0x000d3000
[   54.896150] NDCB1: 0xefc00000
[   54.896150] NDCB2: 0x00000001
[   54.896150] NDCB3: 0x00000000
[   54.915080] nand: nand_do_read_oob: from = 0x0f800000, len = 64
[   54.921285] marvell-nfc pxa3xx-nand: 
[   54.921285] NDCR:  0x9d079fff
[   54.921285] NDCB0: 0x000d3000
[   54.921285] NDCB1: 0xf0000000
[   54.921285] NDCB2: 0x00000001
[   54.921285] NDCB3: 0x00000000
[   54.940215] nand: nand_do_read_oob: from = 0x0f820000, len = 64
[   54.946248] marvell-nfc pxa3xx-nand: 
[   54.946248] NDCR:  0x9d079fff
[   54.946248] NDCB0: 0x000d3000
[   54.946248] NDCB1: 0xf0400000
[   54.946248] NDCB2: 0x00000001
[   54.946248] NDCB3: 0x00000000
[   54.965179] nand: nand_do_read_oob: from = 0x0f840000, len = 64
[   54.971385] marvell-nfc pxa3xx-nand: 
[   54.971385] NDCR:  0x9d079fff
[   54.971385] NDCB0: 0x000d3000
[   54.971385] NDCB1: 0xf0800000
[   54.971385] NDCB2: 0x00000001
[   54.971385] NDCB3: 0x00000000
[   54.990312] nand: nand_do_read_oob: from = 0x0f860000, len = 64
[   54.996345] marvell-nfc pxa3xx-nand: 
[   54.996345] NDCR:  0x9d079fff
[   54.996345] NDCB0: 0x000d3000
[   54.996345] NDCB1: 0xf0c00000
[   54.996345] NDCB2: 0x00000001
[   54.996345] NDCB3: 0x00000000
[   55.015287] nand: nand_do_read_oob: from = 0x0f880000, len = 64
[   55.021492] marvell-nfc pxa3xx-nand: 
[   55.021492] NDCR:  0x9d079fff
[   55.021492] NDCB0: 0x000d3000
[   55.021492] NDCB1: 0xf1000000
[   55.021492] NDCB2: 0x00000001
[   55.021492] NDCB3: 0x00000000
[   55.040418] nand: nand_do_read_oob: from = 0x0f8a0000, len = 64
[   55.046452] marvell-nfc pxa3xx-nand: 
[   55.046452] NDCR:  0x9d079fff
[   55.046452] NDCB0: 0x000d3000
[   55.046452] NDCB1: 0xf1400000
[   55.046452] NDCB2: 0x00000001
[   55.046452] NDCB3: 0x00000000
[   55.065384] nand: nand_do_read_oob: from = 0x0f8c0000, len = 64
[   55.071591] marvell-nfc pxa3xx-nand: 
[   55.071591] NDCR:  0x9d079fff
[   55.071591] NDCB0: 0x000d3000
[   55.071591] NDCB1: 0xf1800000
[   55.071591] NDCB2: 0x00000001
[   55.071591] NDCB3: 0x00000000
[   55.090517] nand: nand_do_read_oob: from = 0x0f8e0000, len = 64
[   55.096550] marvell-nfc pxa3xx-nand: 
[   55.096550] NDCR:  0x9d079fff
[   55.096550] NDCB0: 0x000d3000
[   55.096550] NDCB1: 0xf1c00000
[   55.096550] NDCB2: 0x00000001
[   55.096550] NDCB3: 0x00000000
[   55.115481] nand: nand_do_read_oob: from = 0x0f900000, len = 64
[   55.121681] marvell-nfc pxa3xx-nand: 
[   55.121681] NDCR:  0x9d079fff
[   55.121681] NDCB0: 0x000d3000
[   55.121681] NDCB1: 0xf2000000
[   55.121681] NDCB2: 0x00000001
[   55.121681] NDCB3: 0x00000000
[   55.140611] nand: nand_do_read_oob: from = 0x0f920000, len = 64
[   55.146641] marvell-nfc pxa3xx-nand: 
[   55.146641] NDCR:  0x9d079fff
[   55.146641] NDCB0: 0x000d3000
[   55.146641] NDCB1: 0xf2400000
[   55.146641] NDCB2: 0x00000001
[   55.146641] NDCB3: 0x00000000
[   55.165574] nand: nand_do_read_oob: from = 0x0f940000, len = 64
[   55.171777] marvell-nfc pxa3xx-nand: 
[   55.171777] NDCR:  0x9d079fff
[   55.171777] NDCB0: 0x000d3000
[   55.171777] NDCB1: 0xf2800000
[   55.171777] NDCB2: 0x00000001
[   55.171777] NDCB3: 0x00000000
[   55.190706] nand: nand_do_read_oob: from = 0x0f960000, len = 64
[   55.196739] marvell-nfc pxa3xx-nand: 
[   55.196739] NDCR:  0x9d079fff
[   55.196739] NDCB0: 0x000d3000
[   55.196739] NDCB1: 0xf2c00000
[   55.196739] NDCB2: 0x00000001
[   55.196739] NDCB3: 0x00000000
[   55.215671] nand: nand_do_read_oob: from = 0x0f980000, len = 64
[   55.221880] marvell-nfc pxa3xx-nand: 
[   55.221880] NDCR:  0x9d079fff
[   55.221880] NDCB0: 0x000d3000
[   55.221880] NDCB1: 0xf3000000
[   55.221880] NDCB2: 0x00000001
[   55.221880] NDCB3: 0x00000000
[   55.240806] nand: nand_do_read_oob: from = 0x0f9a0000, len = 64
[   55.246839] marvell-nfc pxa3xx-nand: 
[   55.246839] NDCR:  0x9d079fff
[   55.246839] NDCB0: 0x000d3000
[   55.246839] NDCB1: 0xf3400000
[   55.246839] NDCB2: 0x00000001
[   55.246839] NDCB3: 0x00000000
[   55.265786] nand: nand_do_read_oob: from = 0x0f9c0000, len = 64
[   55.271996] marvell-nfc pxa3xx-nand: 
[   55.271996] NDCR:  0x9d079fff
[   55.271996] NDCB0: 0x000d3000
[   55.271996] NDCB1: 0xf3800000
[   55.271996] NDCB2: 0x00000001
[   55.271996] NDCB3: 0x00000000
[   55.290922] nand: nand_do_read_oob: from = 0x0f9e0000, len = 64
[   55.296954] marvell-nfc pxa3xx-nand: 
[   55.296954] NDCR:  0x9d079fff
[   55.296954] NDCB0: 0x000d3000
[   55.296954] NDCB1: 0xf3c00000
[   55.296954] NDCB2: 0x00000001
[   55.296954] NDCB3: 0x00000000
[   55.315886] nand: nand_do_read_oob: from = 0x0fa00000, len = 64
[   55.322092] marvell-nfc pxa3xx-nand: 
[   55.322092] NDCR:  0x9d079fff
[   55.322092] NDCB0: 0x000d3000
[   55.322092] NDCB1: 0xf4000000
[   55.322092] NDCB2: 0x00000001
[   55.322092] NDCB3: 0x00000000
[   55.341022] nand: nand_do_read_oob: from = 0x0fa20000, len = 64
[   55.347051] marvell-nfc pxa3xx-nand: 
[   55.347051] NDCR:  0x9d079fff
[   55.347051] NDCB0: 0x000d3000
[   55.347051] NDCB1: 0xf4400000
[   55.347051] NDCB2: 0x00000001
[   55.347051] NDCB3: 0x00000000
[   55.365986] nand: nand_do_read_oob: from = 0x0fa40000, len = 64
[   55.372192] marvell-nfc pxa3xx-nand: 
[   55.372192] NDCR:  0x9d079fff
[   55.372192] NDCB0: 0x000d3000
[   55.372192] NDCB1: 0xf4800000
[   55.372192] NDCB2: 0x00000001
[   55.372192] NDCB3: 0x00000000
[   55.391120] nand: nand_do_read_oob: from = 0x0fa60000, len = 64
[   55.397152] marvell-nfc pxa3xx-nand: 
[   55.397152] NDCR:  0x9d079fff
[   55.397152] NDCB0: 0x000d3000
[   55.397152] NDCB1: 0xf4c00000
[   55.397152] NDCB2: 0x00000001
[   55.397152] NDCB3: 0x00000000
[   55.416081] nand: nand_do_read_oob: from = 0x0fa80000, len = 64
[   55.422279] marvell-nfc pxa3xx-nand: 
[   55.422279] NDCR:  0x9d079fff
[   55.422279] NDCB0: 0x000d3000
[   55.422279] NDCB1: 0xf5000000
[   55.422279] NDCB2: 0x00000001
[   55.422279] NDCB3: 0x00000000
[   55.441209] nand: nand_do_read_oob: from = 0x0faa0000, len = 64
[   55.447240] marvell-nfc pxa3xx-nand: 
[   55.447240] NDCR:  0x9d079fff
[   55.447240] NDCB0: 0x000d3000
[   55.447240] NDCB1: 0xf5400000
[   55.447240] NDCB2: 0x00000001
[   55.447240] NDCB3: 0x00000000
[   55.466174] nand: nand_do_read_oob: from = 0x0fac0000, len = 64
[   55.472379] marvell-nfc pxa3xx-nand: 
[   55.472379] NDCR:  0x9d079fff
[   55.472379] NDCB0: 0x000d3000
[   55.472379] NDCB1: 0xf5800000
[   55.472379] NDCB2: 0x00000001
[   55.472379] NDCB3: 0x00000000
[   55.491306] nand: nand_do_read_oob: from = 0x0fae0000, len = 64
[   55.497339] marvell-nfc pxa3xx-nand: 
[   55.497339] NDCR:  0x9d079fff
[   55.497339] NDCB0: 0x000d3000
[   55.497339] NDCB1: 0xf5c00000
[   55.497339] NDCB2: 0x00000001
[   55.497339] NDCB3: 0x00000000
[   55.516271] nand: nand_do_read_oob: from = 0x0fb00000, len = 64
[   55.522478] marvell-nfc pxa3xx-nand: 
[   55.522478] NDCR:  0x9d079fff
[   55.522478] NDCB0: 0x000d3000
[   55.522478] NDCB1: 0xf6000000
[   55.522478] NDCB2: 0x00000001
[   55.522478] NDCB3: 0x00000000
[   55.541407] nand: nand_do_read_oob: from = 0x0fb20000, len = 64
[   55.547436] marvell-nfc pxa3xx-nand: 
[   55.547436] NDCR:  0x9d079fff
[   55.547436] NDCB0: 0x000d3000
[   55.547436] NDCB1: 0xf6400000
[   55.547436] NDCB2: 0x00000001
[   55.547436] NDCB3: 0x00000000
[   55.566369] nand: nand_do_read_oob: from = 0x0fb40000, len = 64
[   55.572574] marvell-nfc pxa3xx-nand: 
[   55.572574] NDCR:  0x9d079fff
[   55.572574] NDCB0: 0x000d3000
[   55.572574] NDCB1: 0xf6800000
[   55.572574] NDCB2: 0x00000001
[   55.572574] NDCB3: 0x00000000
[   55.591503] nand: nand_do_read_oob: from = 0x0fb60000, len = 64
[   55.597535] marvell-nfc pxa3xx-nand: 
[   55.597535] NDCR:  0x9d079fff
[   55.597535] NDCB0: 0x000d3000
[   55.597535] NDCB1: 0xf6c00000
[   55.597535] NDCB2: 0x00000001
[   55.597535] NDCB3: 0x00000000
[   55.616468] nand: nand_do_read_oob: from = 0x0fb80000, len = 64
[   55.622672] marvell-nfc pxa3xx-nand: 
[   55.622672] NDCR:  0x9d079fff
[   55.622672] NDCB0: 0x000d3000
[   55.622672] NDCB1: 0xf7000000
[   55.622672] NDCB2: 0x00000001
[   55.622672] NDCB3: 0x00000000
[   55.641603] nand: nand_do_read_oob: from = 0x0fba0000, len = 64
[   55.647634] marvell-nfc pxa3xx-nand: 
[   55.647634] NDCR:  0x9d079fff
[   55.647634] NDCB0: 0x000d3000
[   55.647634] NDCB1: 0xf7400000
[   55.647634] NDCB2: 0x00000001
[   55.647634] NDCB3: 0x00000000
[   55.666565] nand: nand_do_read_oob: from = 0x0fbc0000, len = 64
[   55.672764] marvell-nfc pxa3xx-nand: 
[   55.672764] NDCR:  0x9d079fff
[   55.672764] NDCB0: 0x000d3000
[   55.672764] NDCB1: 0xf7800000
[   55.672764] NDCB2: 0x00000001
[   55.672764] NDCB3: 0x00000000
[   55.691692] nand: nand_do_read_oob: from = 0x0fbe0000, len = 64
[   55.697725] marvell-nfc pxa3xx-nand: 
[   55.697725] NDCR:  0x9d079fff
[   55.697725] NDCB0: 0x000d3000
[   55.697725] NDCB1: 0xf7c00000
[   55.697725] NDCB2: 0x00000001
[   55.697725] NDCB3: 0x00000000
[   55.716656] nand: nand_do_read_oob: from = 0x0fc00000, len = 64
[   55.722862] marvell-nfc pxa3xx-nand: 
[   55.722862] NDCR:  0x9d079fff
[   55.722862] NDCB0: 0x000d3000
[   55.722862] NDCB1: 0xf8000000
[   55.722862] NDCB2: 0x00000001
[   55.722862] NDCB3: 0x00000000
[   55.741788] nand: nand_do_read_oob: from = 0x0fc20000, len = 64
[   55.747822] marvell-nfc pxa3xx-nand: 
[   55.747822] NDCR:  0x9d079fff
[   55.747822] NDCB0: 0x000d3000
[   55.747822] NDCB1: 0xf8400000
[   55.747822] NDCB2: 0x00000001
[   55.747822] NDCB3: 0x00000000
[   55.766756] nand: nand_do_read_oob: from = 0x0fc40000, len = 64
[   55.772959] marvell-nfc pxa3xx-nand: 
[   55.772959] NDCR:  0x9d079fff
[   55.772959] NDCB0: 0x000d3000
[   55.772959] NDCB1: 0xf8800000
[   55.772959] NDCB2: 0x00000001
[   55.772959] NDCB3: 0x00000000
[   55.791889] nand: nand_do_read_oob: from = 0x0fc60000, len = 64
[   55.797920] marvell-nfc pxa3xx-nand: 
[   55.797920] NDCR:  0x9d079fff
[   55.797920] NDCB0: 0x000d3000
[   55.797920] NDCB1: 0xf8c00000
[   55.797920] NDCB2: 0x00000001
[   55.797920] NDCB3: 0x00000000
[   55.816853] nand: nand_do_read_oob: from = 0x0fc80000, len = 64
[   55.823050] marvell-nfc pxa3xx-nand: 
[   55.823050] NDCR:  0x9d079fff
[   55.823050] NDCB0: 0x000d3000
[   55.823050] NDCB1: 0xf9000000
[   55.823050] NDCB2: 0x00000001
[   55.823050] NDCB3: 0x00000000
[   55.841979] nand: nand_do_read_oob: from = 0x0fca0000, len = 64
[   55.848011] marvell-nfc pxa3xx-nand: 
[   55.848011] NDCR:  0x9d079fff
[   55.848011] NDCB0: 0x000d3000
[   55.848011] NDCB1: 0xf9400000
[   55.848011] NDCB2: 0x00000001
[   55.848011] NDCB3: 0x00000000
[   55.866942] nand: nand_do_read_oob: from = 0x0fcc0000, len = 64
[   55.873149] marvell-nfc pxa3xx-nand: 
[   55.873149] NDCR:  0x9d079fff
[   55.873149] NDCB0: 0x000d3000
[   55.873149] NDCB1: 0xf9800000
[   55.873149] NDCB2: 0x00000001
[   55.873149] NDCB3: 0x00000000
[   55.892074] nand: nand_do_read_oob: from = 0x0fce0000, len = 64
[   55.898109] marvell-nfc pxa3xx-nand: 
[   55.898109] NDCR:  0x9d079fff
[   55.898109] NDCB0: 0x000d3000
[   55.898109] NDCB1: 0xf9c00000
[   55.898109] NDCB2: 0x00000001
[   55.898109] NDCB3: 0x00000000
[   55.917056] nand: nand_do_read_oob: from = 0x0fd00000, len = 64
[   55.923256] marvell-nfc pxa3xx-nand: 
[   55.923256] NDCR:  0x9d079fff
[   55.923256] NDCB0: 0x000d3000
[   55.923256] NDCB1: 0xfa000000
[   55.923256] NDCB2: 0x00000001
[   55.923256] NDCB3: 0x00000000
[   55.942182] nand: nand_do_read_oob: from = 0x0fd20000, len = 64
[   55.948215] marvell-nfc pxa3xx-nand: 
[   55.948215] NDCR:  0x9d079fff
[   55.948215] NDCB0: 0x000d3000
[   55.948215] NDCB1: 0xfa400000
[   55.948215] NDCB2: 0x00000001
[   55.948215] NDCB3: 0x00000000
[   55.967147] nand: nand_do_read_oob: from = 0x0fd40000, len = 64
[   55.973353] marvell-nfc pxa3xx-nand: 
[   55.973353] NDCR:  0x9d079fff
[   55.973353] NDCB0: 0x000d3000
[   55.973353] NDCB1: 0xfa800000
[   55.973353] NDCB2: 0x00000001
[   55.973353] NDCB3: 0x00000000
[   55.992284] nand: nand_do_read_oob: from = 0x0fd60000, len = 64
[   55.998314] marvell-nfc pxa3xx-nand: 
[   55.998314] NDCR:  0x9d079fff
[   55.998314] NDCB0: 0x000d3000
[   55.998314] NDCB1: 0xfac00000
[   55.998314] NDCB2: 0x00000001
[   55.998314] NDCB3: 0x00000000
[   56.017256] nand: nand_do_read_oob: from = 0x0fd80000, len = 64
[   56.023463] marvell-nfc pxa3xx-nand: 
[   56.023463] NDCR:  0x9d079fff
[   56.023463] NDCB0: 0x000d3000
[   56.023463] NDCB1: 0xfb000000
[   56.023463] NDCB2: 0x00000001
[   56.023463] NDCB3: 0x00000000
[   56.042390] nand: nand_do_read_oob: from = 0x0fda0000, len = 64
[   56.048422] marvell-nfc pxa3xx-nand: 
[   56.048422] NDCR:  0x9d079fff
[   56.048422] NDCB0: 0x000d3000
[   56.048422] NDCB1: 0xfb400000
[   56.048422] NDCB2: 0x00000001
[   56.048422] NDCB3: 0x00000000
[   56.067354] nand: nand_do_read_oob: from = 0x0fdc0000, len = 64
[   56.073560] marvell-nfc pxa3xx-nand: 
[   56.073560] NDCR:  0x9d079fff
[   56.073560] NDCB0: 0x000d3000
[   56.073560] NDCB1: 0xfb800000
[   56.073560] NDCB2: 0x00000001
[   56.073560] NDCB3: 0x00000000
[   56.092819] nand: nand_do_read_oob: from = 0x0fde0000, len = 64
[   56.099053] marvell-nfc pxa3xx-nand: 
[   56.099053] NDCR:  0x9d079fff
[   56.099053] NDCB0: 0x000d3000
[   56.099053] NDCB1: 0xfbc00000
[   56.099053] NDCB2: 0x00000001
[   56.099053] NDCB3: 0x00000000
[   56.117975] nand: nand_do_read_oob: from = 0x0fe00000, len = 64
[   56.124175] marvell-nfc pxa3xx-nand: 
[   56.124175] NDCR:  0x9d079fff
[   56.124175] NDCB0: 0x000d3000
[   56.124175] NDCB1: 0xfc000000
[   56.124175] NDCB2: 0x00000001
[   56.124175] NDCB3: 0x00000000
[   56.143109] nand: nand_do_read_oob: from = 0x0fe20000, len = 64
[   56.149315] marvell-nfc pxa3xx-nand: 
[   56.149315] NDCR:  0x9d079fff
[   56.149315] NDCB0: 0x000d3000
[   56.149315] NDCB1: 0xfc400000
[   56.149315] NDCB2: 0x00000001
[   56.149315] NDCB3: 0x00000000
[   56.168234] nand: nand_do_read_oob: from = 0x0fe40000, len = 64
[   56.174436] marvell-nfc pxa3xx-nand: 
[   56.174436] NDCR:  0x9d079fff
[   56.174436] NDCB0: 0x000d3000
[   56.174436] NDCB1: 0xfc800000
[   56.174436] NDCB2: 0x00000001
[   56.174436] NDCB3: 0x00000000
[   56.193367] nand: nand_do_read_oob: from = 0x0fe60000, len = 64
[   56.199570] marvell-nfc pxa3xx-nand: 
[   56.199570] NDCR:  0x9d079fff
[   56.199570] NDCB0: 0x000d3000
[   56.199570] NDCB1: 0xfcc00000
[   56.199570] NDCB2: 0x00000001
[   56.199570] NDCB3: 0x00000000
[   56.218489] nand: nand_do_read_oob: from = 0x0fe80000, len = 64
[   56.224691] marvell-nfc pxa3xx-nand: 
[   56.224691] NDCR:  0x9d079fff
[   56.224691] NDCB0: 0x000d3000
[   56.224691] NDCB1: 0xfd000000
[   56.224691] NDCB2: 0x00000001
[   56.224691] NDCB3: 0x00000000
[   56.243619] nand: nand_do_read_oob: from = 0x0fea0000, len = 64
[   56.249822] marvell-nfc pxa3xx-nand: 
[   56.249822] NDCR:  0x9d079fff
[   56.249822] NDCB0: 0x000d3000
[   56.249822] NDCB1: 0xfd400000
[   56.249822] NDCB2: 0x00000001
[   56.249822] NDCB3: 0x00000000
[   56.268942] nand: nand_do_read_oob: from = 0x0fec0000, len = 64
[   56.274987] marvell-nfc pxa3xx-nand: 
[   56.274987] NDCR:  0x9d079fff
[   56.274987] NDCB0: 0x000d3000
[   56.274987] NDCB1: 0xfd800000
[   56.274987] NDCB2: 0x00000001
[   56.274987] NDCB3: 0x00000000
[   56.293934] nand: nand_do_read_oob: from = 0x0fee0000, len = 64
[   56.300135] marvell-nfc pxa3xx-nand: 
[   56.300135] NDCR:  0x9d079fff
[   56.300135] NDCB0: 0x000d3000
[   56.300135] NDCB1: 0xfdc00000
[   56.300135] NDCB2: 0x00000001
[   56.300135] NDCB3: 0x00000000
[   56.319063] nand: nand_do_read_oob: from = 0x0ff00000, len = 64
[   56.325097] marvell-nfc pxa3xx-nand: 
[   56.325097] NDCR:  0x9d079fff
[   56.325097] NDCB0: 0x000d3000
[   56.325097] NDCB1: 0xfe000000
[   56.325097] NDCB2: 0x00000001
[   56.325097] NDCB3: 0x00000000
[   56.344030] nand: nand_do_read_oob: from = 0x0ff20000, len = 64
[   56.350235] marvell-nfc pxa3xx-nand: 
[   56.350235] NDCR:  0x9d079fff
[   56.350235] NDCB0: 0x000d3000
[   56.350235] NDCB1: 0xfe400000
[   56.350235] NDCB2: 0x00000001
[   56.350235] NDCB3: 0x00000000
[   56.369162] nand: nand_do_read_oob: from = 0x0ff40000, len = 64
[   56.375195] marvell-nfc pxa3xx-nand: 
[   56.375195] NDCR:  0x9d079fff
[   56.375195] NDCB0: 0x000d3000
[   56.375195] NDCB1: 0xfe800000
[   56.375195] NDCB2: 0x00000001
[   56.375195] NDCB3: 0x00000000
[   56.394124] nand: nand_do_read_oob: from = 0x0ff60000, len = 64
[   56.400324] marvell-nfc pxa3xx-nand: 
[   56.400324] NDCR:  0x9d079fff
[   56.400324] NDCB0: 0x000d3000
[   56.400324] NDCB1: 0xfec00000
[   56.400324] NDCB2: 0x00000001
[   56.400324] NDCB3: 0x00000000
[   56.419249] nand: nand_do_read_oob: from = 0x0ff80000, len = 64
[   56.425285] marvell-nfc pxa3xx-nand: 
[   56.425285] NDCR:  0x9d079fff
[   56.425285] NDCB0: 0x000d3000
[   56.425285] NDCB1: 0xff000000
[   56.425285] NDCB2: 0x00000001
[   56.425285] NDCB3: 0x00000000
[   56.444217] nand: nand_do_read_oob: from = 0x0ffa0000, len = 64
[   56.450425] marvell-nfc pxa3xx-nand: 
[   56.450425] NDCR:  0x9d079fff
[   56.450425] NDCB0: 0x000d3000
[   56.450425] NDCB1: 0xff400000
[   56.450425] NDCB2: 0x00000001
[   56.450425] NDCB3: 0x00000000
[   56.469354] nand: nand_do_read_oob: from = 0x0ffc0000, len = 64
[   56.475383] marvell-nfc pxa3xx-nand: 
[   56.475383] NDCR:  0x9d079fff
[   56.475383] NDCB0: 0x000d3000
[   56.475383] NDCB1: 0xff800000
[   56.475383] NDCB2: 0x00000001
[   56.475383] NDCB3: 0x00000000
[   56.494314] nand: nand_do_read_oob: from = 0x0ffe0000, len = 64
[   56.500545] marvell-nfc pxa3xx-nand: 
[   56.500545] NDCR:  0x9d079fff
[   56.500545] NDCB0: 0x000d3000
[   56.500545] NDCB1: 0xffc00000
[   56.500545] NDCB2: 0x00000001
[   56.500545] NDCB3: 0x00000000
[   56.519945] nand: nand_erase_nand: start = 0x00000ffe0000, len = 131072
[   56.526615] nand: executing subop:
[   56.530231] nand:     ->CMD      [0x70]
[   56.534117] nand:     ->DATA_IN  [1 B, force 8-bit]
[   56.539238] marvell-nfc pxa3xx-nand: 
[   56.539238] NDCR:  0x9d079fff
[   56.539238] NDCB0: 0x00800070
[   56.539238] NDCB1: 0x00000000
[   56.539238] NDCB2: 0x00000000
[   56.539238] NDCB3: 0x00000000
[   56.557893] nand: executing subop:
[   56.561501] nand:     ->CMD      [0x60]
[   56.565396] nand:     ->ADDR     [3 cyc: c0 ff 01]
[   56.570353] nand:     ->CMD      [0xd0]
[   56.574233] nand:     ->WAITRDY  [max 0 ms]
[   56.578516] marvell-nfc pxa3xx-nand: 
[   56.578516] NDCR:  0x9d079fff
[   56.578516] NDCB0: 0x004bd060
[   56.578516] NDCB1: 0x0001ffc0
[   56.578516] NDCB2: 0x00000000
[   56.578516] NDCB3: 0x00000000
[   56.599314] nand: executing subop:
[   56.602787] nand:     ->CMD      [0x70]
[   56.606656] nand:     ->DATA_IN  [1 B, force 8-bit]
[   56.611790] marvell-nfc pxa3xx-nand: 
[   56.611790] NDCR:  0x9d079fff
[   56.611790] NDCB0: 0x00800070
[   56.611790] NDCB1: 0x00000000
[   56.611790] NDCB2: 0x00000000
[   56.611790] NDCB3: 0x00000000
[   56.630473] nand: executing subop:
[   56.633929] nand:     ->CMD      [0x70]
[   56.637798] nand:     ->DATA_IN  [1 B, force 8-bit]
[   56.642930] marvell-nfc pxa3xx-nand: 
[   56.642930] NDCR:  0x9d079fff
[   56.642930] NDCB0: 0x00800070
[   56.642930] NDCB1: 0x00000000
[   56.642930] NDCB2: 0x00000000
[   56.642930] NDCB3: 0x00000000
[   56.661651] marvell-nfc pxa3xx-nand: 
[   56.661651] NDCR:  0xdd079fff
[   56.661651] NDCB0: 0x002d1080
[   56.661651] NDCB1: 0xffc00000
[   56.661651] NDCB2: 0x00000001
[   56.661651] NDCB3: 0x00000000
[   56.680799] Bad block table written to 0x00000ffe0000, version 0x01
[   56.687602] nand: nand_erase_nand: start = 0x00000ffc0000, len = 131072
[   56.694420] nand: executing subop:
[   56.697873] nand:     ->CMD      [0x70]
[   56.701890] nand:     ->DATA_IN  [1 B, force 8-bit]
[   56.706879] marvell-nfc pxa3xx-nand: 
[   56.706879] NDCR:  0x9d079fff
[   56.706879] NDCB0: 0x00800070
[   56.706879] NDCB1: 0x00000000
[   56.706879] NDCB2: 0x00000000
[   56.706879] NDCB3: 0x00000000
[   56.725523] nand: executing subop:
[   56.729130] nand:     ->CMD      [0x60]
[   56.733023] nand:     ->ADDR     [3 cyc: 80 ff 01]
[   56.737835] nand:     ->CMD      [0xd0]
[   56.741847] nand:     ->WAITRDY  [max 0 ms]
[   56.746151] marvell-nfc pxa3xx-nand: 
[   56.746151] NDCR:  0x9d079fff
[   56.746151] NDCB0: 0x004bd060
[   56.746151] NDCB1: 0x0001ff80
[   56.746151] NDCB2: 0x00000000
[   56.746151] NDCB3: 0x00000000
[   56.766897] nand: executing subop:
[   56.770541] nand:     ->CMD      [0x70]
[   56.774425] nand:     ->DATA_IN  [1 B, force 8-bit]
[   56.779539] marvell-nfc pxa3xx-nand: 
[   56.779539] NDCR:  0x9d079fff
[   56.779539] NDCB0: 0x00800070
[   56.779539] NDCB1: 0x00000000
[   56.779539] NDCB2: 0x00000000
[   56.779539] NDCB3: 0x00000000
[   56.798212] nand: executing subop:
[   56.801828] nand:     ->CMD      [0x70]
[   56.805715] nand:     ->DATA_IN  [1 B, force 8-bit]
[   56.810823] marvell-nfc pxa3xx-nand: 
[   56.810823] NDCR:  0x9d079fff
[   56.810823] NDCB0: 0x00800070
[   56.810823] NDCB1: 0x00000000
[   56.810823] NDCB2: 0x00000000
[   56.810823] NDCB3: 0x00000000
[   56.829547] marvell-nfc pxa3xx-nand: 
[   56.829547] NDCR:  0xdd079fff
[   56.829547] NDCB0: 0x002d1080
[   56.829547] NDCB1: 0xff800000
[   56.829547] NDCB2: 0x00000001
[   56.829547] NDCB3: 0x00000000
[   56.848813] Bad block table written to 0x00000ffc0000, version 0x01
[   56.855656] 6 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[   56.862511] Creating 6 MTD partitions on "pxa3xx_nand-0":
[   56.867999] 0x000000000000-0x000000020000 : "TIMH"
[   56.876504] 0x000000020000-0x000000040000 : "OBMI"
[   56.885961] 0x000000040000-0x000000100000 : "barebox"
[   56.895779] 0x000000100000-0x000000140000 : "barebox-env"
[   56.905831] 0x000000140000-0x000000d40000 : "kernel"
[   56.916328] 0x000000d40000-0x000003260000 : "root"
[   56.930475] smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
[   56.983081] smc91x smc91x.0 eth0: SMC91C11xFD (rev 2) at c4867300 IRQ 214
[   56.991231]  DMA c386d710 [nowait]
[   56.994784] smc91x smc91x.0 eth0: Ethernet addr: 00:0e:0c:a7:26:f7
[   57.007426] input: pxa27x-keypad as /devices/platform/pxa27x-keypad/input/input0
[   57.017305] pxa-rtc pxa-rtc: failed to find rtc clock source
[   57.024908] rtc rtc0: invalid alarm value: 0-1-1 0:0:0
[   57.032187] pxa-rtc pxa-rtc: rtc core: registered pxa-rtc as rtc0
[   57.042867] sa1100_wdt: SA1100/PXA2xx Watchdog Timer: timer margin 60 sec
[   57.094773] soc-audio soc-audio: ASoC: machine Zylonite should use snd_soc_register_card()
[   57.118303] wm9713-codec wm9713-codec: Control not supported for path Mic B Source -> [MPB] -> Mic B Pre Amp
[   57.130404] wm9713-codec wm9713-codec: ASoC: no dapm match for Mic B Source --> MPB --> Mic B Pre Amp
[   57.140110] wm9713-codec wm9713-codec: ASoC: Failed to add route Mic B Source -> MPB -> Mic B Pre Amp
[   57.152938] soc-audio soc-audio: wm9713-hifi <-> pxa2xx-ac97 mapping ok
[   57.162041] soc-audio soc-audio: wm9713-aux <-> pxa2xx-ac97-aux mapping ok
[   57.172444] soc-audio soc-audio: wm9713-voice <-> pxa-ssp-dai.2 mapping ok
[   57.181332] wm9713-codec wm9713-codec: ASoC: mux Sidetone Mux has no paths
[   57.220634] NET: Registered protocol family 17
[   57.225651] Key type dns_resolver registered
[   57.231634] XScale iWMMXt coprocessor detected.
[   57.243915] Loading compiled-in X.509 certificates
[   57.265044] ubi0: attaching mtd5
[   57.270836] marvell-nfc pxa3xx-nand: 
[   57.270836] NDCR:  0xdd079fff
[   57.270836] NDCB0: 0x000d3000
[   57.270836] NDCB1: 0x23400000
[   57.270836] NDCB2: 0x00000000
[   57.270836] NDCB3: 0x00000000
[   57.290323] marvell-nfc pxa3xx-nand: 
[   57.290323] NDCR:  0xdd079fff
[   57.290323] NDCB0: 0x000d3000
[   57.290323] NDCB1: 0x23410000
[   57.290323] NDCB2: 0x00000000
[   57.290323] NDCB3: 0x00000000
[   57.309578] marvell-nfc pxa3xx-nand: 
[   57.309578] NDCR:  0x9d079fff
[   57.309578] NDCB0: 0x000d3000
[   57.309578] NDCB1: 0x23410000
[   57.309578] NDCB2: 0x00000000
[   57.309578] NDCB3: 0x00000000
[   57.329455] marvell-nfc pxa3xx-nand: 
[   57.329455] NDCR:  0xdd079fff
[   57.329455] NDCB0: 0x000d3000
[   57.329455] NDCB1: 0x23800000
[   57.329455] NDCB2: 0x00000000
[   57.329455] NDCB3: 0x00000000
[   57.349043] marvell-nfc pxa3xx-nand: 
[   57.349043] NDCR:  0xdd079fff
[   57.349043] NDCB0: 0x000d3000
[   57.349043] NDCB1: 0x23810000
[   57.349043] NDCB2: 0x00000000
[   57.349043] NDCB3: 0x00000000
[   57.368067] marvell-nfc pxa3xx-nand: 
[   57.368067] NDCR:  0x9d079fff
[   57.368067] NDCB0: 0x000d3000
[   57.368067] NDCB1: 0x23810000
[   57.368067] NDCB2: 0x00000000
[   57.368067] NDCB3: 0x00000000
[   57.387203] marvell-nfc pxa3xx-nand: 
[   57.387203] NDCR:  0xdd079fff
[   57.387203] NDCB0: 0x000d3000
[   57.387203] NDCB1: 0x23c00000
[   57.387203] NDCB2: 0x00000000
[   57.387203] NDCB3: 0x00000000
[   57.406286] marvell-nfc pxa3xx-nand: 
[   57.406286] NDCR:  0xdd079fff
[   57.406286] NDCB0: 0x000d3000
[   57.406286] NDCB1: 0x23c10000
[   57.406286] NDCB2: 0x00000000
[   57.406286] NDCB3: 0x00000000
[   57.425279] marvell-nfc pxa3xx-nand: 
[   57.425279] NDCR:  0x9d079fff
[   57.425279] NDCB0: 0x000d3000
[   57.425279] NDCB1: 0x23c10000
[   57.425279] NDCB2: 0x00000000
[   57.425279] NDCB3: 0x00000000
[   57.444404] marvell-nfc pxa3xx-nand: 
[   57.444404] NDCR:  0xdd079fff
[   57.444404] NDCB0: 0x000d3000
[   57.444404] NDCB1: 0x24000000
[   57.444404] NDCB2: 0x00000000
[   57.444404] NDCB3: 0x00000000
[   57.463507] marvell-nfc pxa3xx-nand: 
[   57.463507] NDCR:  0xdd079fff
[   57.463507] NDCB0: 0x000d3000
[   57.463507] NDCB1: 0x24010000
[   57.463507] NDCB2: 0x00000000
[   57.463507] NDCB3: 0x00000000
[   57.482501] marvell-nfc pxa3xx-nand: 
[   57.482501] NDCR:  0x9d079fff
[   57.482501] NDCB0: 0x000d3000
[   57.482501] NDCB1: 0x24010000
[   57.482501] NDCB2: 0x00000000
[   57.482501] NDCB3: 0x00000000
[   57.501614] marvell-nfc pxa3xx-nand: 
[   57.501614] NDCR:  0xdd079fff
[   57.501614] NDCB0: 0x000d3000
[   57.501614] NDCB1: 0x24400000
[   57.501614] NDCB2: 0x00000000
[   57.501614] NDCB3: 0x00000000
[   57.520697] marvell-nfc pxa3xx-nand: 
[   57.520697] NDCR:  0xdd079fff
[   57.520697] NDCB0: 0x000d3000
[   57.520697] NDCB1: 0x24410000
[   57.520697] NDCB2: 0x00000000
[   57.520697] NDCB3: 0x00000000
[   57.539691] marvell-nfc pxa3xx-nand: 
[   57.539691] NDCR:  0x9d079fff
[   57.539691] NDCB0: 0x000d3000
[   57.539691] NDCB1: 0x24410000
[   57.539691] NDCB2: 0x00000000
[   57.539691] NDCB3: 0x00000000
[   57.558900] marvell-nfc pxa3xx-nand: 
[   57.558900] NDCR:  0xdd079fff
[   57.558900] NDCB0: 0x000d3000
[   57.558900] NDCB1: 0x24800000
[   57.558900] NDCB2: 0x00000000
[   57.558900] NDCB3: 0x00000000
[   57.577950] marvell-nfc pxa3xx-nand: 
[   57.577950] NDCR:  0xdd079fff
[   57.577950] NDCB0: 0x000d3000
[   57.577950] NDCB1: 0x24810000
[   57.577950] NDCB2: 0x00000000
[   57.577950] NDCB3: 0x00000000
[   57.596947] marvell-nfc pxa3xx-nand: 
[   57.596947] NDCR:  0x9d079fff
[   57.596947] NDCB0: 0x000d3000
[   57.596947] NDCB1: 0x24810000
[   57.596947] NDCB2: 0x00000000
[   57.596947] NDCB3: 0x00000000
[   57.616060] marvell-nfc pxa3xx-nand: 
[   57.616060] NDCR:  0xdd079fff
[   57.616060] NDCB0: 0x000d3000
[   57.616060] NDCB1: 0x24c00000
[   57.616060] NDCB2: 0x00000000
[   57.616060] NDCB3: 0x00000000
[   57.635131] marvell-nfc pxa3xx-nand: 
[   57.635131] NDCR:  0xdd079fff
[   57.635131] NDCB0: 0x000d3000
[   57.635131] NDCB1: 0x24c10000
[   57.635131] NDCB2: 0x00000000
[   57.635131] NDCB3: 0x00000000
[   57.654125] marvell-nfc pxa3xx-nand: 
[   57.654125] NDCR:  0x9d079fff
[   57.654125] NDCB0: 0x000d3000
[   57.654125] NDCB1: 0x24c10000
[   57.654125] NDCB2: 0x00000000
[   57.654125] NDCB3: 0x00000000
[   57.673242] marvell-nfc pxa3xx-nand: 
[   57.673242] NDCR:  0xdd079fff
[   57.673242] NDCB0: 0x000d3000
[   57.673242] NDCB1: 0x25000000
[   57.673242] NDCB2: 0x00000000
[   57.673242] NDCB3: 0x00000000
[   57.692323] marvell-nfc pxa3xx-nand: 
[   57.692323] NDCR:  0xdd079fff
[   57.692323] NDCB0: 0x000d3000
[   57.692323] NDCB1: 0x25010000
[   57.692323] NDCB2: 0x00000000
[   57.692323] NDCB3: 0x00000000
[   57.711315] marvell-nfc pxa3xx-nand: 
[   57.711315] NDCR:  0x9d079fff
[   57.711315] NDCB0: 0x000d3000
[   57.711315] NDCB1: 0x25010000
[   57.711315] NDCB2: 0x00000000
[   57.711315] NDCB3: 0x00000000
[   57.730429] marvell-nfc pxa3xx-nand: 
[   57.730429] NDCR:  0xdd079fff
[   57.730429] NDCB0: 0x000d3000
[   57.730429] NDCB1: 0x25400000
[   57.730429] NDCB2: 0x00000000
[   57.730429] NDCB3: 0x00000000
[   57.749501] marvell-nfc pxa3xx-nand: 
[   57.749501] NDCR:  0xdd079fff
[   57.749501] NDCB0: 0x000d3000
[   57.749501] NDCB1: 0x25410000
[   57.749501] NDCB2: 0x00000000
[   57.749501] NDCB3: 0x00000000
[   57.768488] marvell-nfc pxa3xx-nand: 
[   57.768488] NDCR:  0x9d079fff
[   57.768488] NDCB0: 0x000d3000
[   57.768488] NDCB1: 0x25410000
[   57.768488] NDCB2: 0x00000000
[   57.768488] NDCB3: 0x00000000
[   57.787603] marvell-nfc pxa3xx-nand: 
[   57.787603] NDCR:  0xdd079fff
[   57.787603] NDCB0: 0x000d3000
[   57.787603] NDCB1: 0x25800000
[   57.787603] NDCB2: 0x00000000
[   57.787603] NDCB3: 0x00000000
[   57.806684] marvell-nfc pxa3xx-nand: 
[   57.806684] NDCR:  0xdd079fff
[   57.806684] NDCB0: 0x000d3000
[   57.806684] NDCB1: 0x25810000
[   57.806684] NDCB2: 0x00000000
[   57.806684] NDCB3: 0x00000000
[   57.825678] marvell-nfc pxa3xx-nand: 
[   57.825678] NDCR:  0x9d079fff
[   57.825678] NDCB0: 0x000d3000
[   57.825678] NDCB1: 0x25810000
[   57.825678] NDCB2: 0x00000000
[   57.825678] NDCB3: 0x00000000
[   57.844790] marvell-nfc pxa3xx-nand: 
[   57.844790] NDCR:  0xdd079fff
[   57.844790] NDCB0: 0x000d3000
[   57.844790] NDCB1: 0x25c00000
[   57.844790] NDCB2: 0x00000000
[   57.844790] NDCB3: 0x00000000
[   57.863867] marvell-nfc pxa3xx-nand: 
[   57.863867] NDCR:  0xdd079fff
[   57.863867] NDCB0: 0x000d3000
[   57.863867] NDCB1: 0x25c10000
[   57.863867] NDCB2: 0x00000000
[   57.863867] NDCB3: 0x00000000
[   57.882866] marvell-nfc pxa3xx-nand: 
[   57.882866] NDCR:  0x9d079fff
[   57.882866] NDCB0: 0x000d3000
[   57.882866] NDCB1: 0x25c10000
[   57.882866] NDCB2: 0x00000000
[   57.882866] NDCB3: 0x00000000
[   57.901978] marvell-nfc pxa3xx-nand: 
[   57.901978] NDCR:  0xdd079fff
[   57.901978] NDCB0: 0x000d3000
[   57.901978] NDCB1: 0x26000000
[   57.901978] NDCB2: 0x00000000
[   57.901978] NDCB3: 0x00000000
[   57.921054] marvell-nfc pxa3xx-nand: 
[   57.921054] NDCR:  0xdd079fff
[   57.921054] NDCB0: 0x000d3000
[   57.921054] NDCB1: 0x26010000
[   57.921054] NDCB2: 0x00000000
[   57.921054] NDCB3: 0x00000000
[   57.940048] marvell-nfc pxa3xx-nand: 
[   57.940048] NDCR:  0x9d079fff
[   57.940048] NDCB0: 0x000d3000
[   57.940048] NDCB1: 0x26010000
[   57.940048] NDCB2: 0x00000000
[   57.940048] NDCB3: 0x00000000
[   57.959212] marvell-nfc pxa3xx-nand: 
[   57.959212] NDCR:  0xdd079fff
[   57.959212] NDCB0: 0x000d3000
[   57.959212] NDCB1: 0x26400000
[   57.959212] NDCB2: 0x00000000
[   57.959212] NDCB3: 0x00000000
[   57.978278] marvell-nfc pxa3xx-nand: 
[   57.978278] NDCR:  0xdd079fff
[   57.978278] NDCB0: 0x000d3000
[   57.978278] NDCB1: 0x26410000
[   57.978278] NDCB2: 0x00000000
[   57.978278] NDCB3: 0x00000000
[   57.997273] marvell-nfc pxa3xx-nand: 
[   57.997273] NDCR:  0x9d079fff
[   57.997273] NDCB0: 0x000d3000
[   57.997273] NDCB1: 0x26410000
[   57.997273] NDCB2: 0x00000000
[   57.997273] NDCB3: 0x00000000
[   58.016401] marvell-nfc pxa3xx-nand: 
[   58.016401] NDCR:  0xdd079fff
[   58.016401] NDCB0: 0x000d3000
[   58.016401] NDCB1: 0x26800000
[   58.016401] NDCB2: 0x00000000
[   58.016401] NDCB3: 0x00000000
[   58.035486] marvell-nfc pxa3xx-nand: 
[   58.035486] NDCR:  0xdd079fff
[   58.035486] NDCB0: 0x000d3000
[   58.035486] NDCB1: 0x26810000
[   58.035486] NDCB2: 0x00000000
[   58.035486] NDCB3: 0x00000000
[   58.054485] marvell-nfc pxa3xx-nand: 
[   58.054485] NDCR:  0x9d079fff
[   58.054485] NDCB0: 0x000d3000
[   58.054485] NDCB1: 0x26810000
[   58.054485] NDCB2: 0x00000000
[   58.054485] NDCB3: 0x00000000
[   58.073619] marvell-nfc pxa3xx-nand: 
[   58.073619] NDCR:  0xdd079fff
[   58.073619] NDCB0: 0x000d3000
[   58.073619] NDCB1: 0x26c00000
[   58.073619] NDCB2: 0x00000000
[   58.073619] NDCB3: 0x00000000
[   58.093171] marvell-nfc pxa3xx-nand: 
[   58.093171] NDCR:  0xdd079fff
[   58.093171] NDCB0: 0x000d3000
[   58.093171] NDCB1: 0x26c10000
[   58.093171] NDCB2: 0x00000000
[   58.093171] NDCB3: 0x00000000
[   58.112203] marvell-nfc pxa3xx-nand: 
[   58.112203] NDCR:  0x9d079fff
[   58.112203] NDCB0: 0x000d3000
[   58.112203] NDCB1: 0x26c10000
[   58.112203] NDCB2: 0x00000000
[   58.112203] NDCB3: 0x00000000
[   58.131344] marvell-nfc pxa3xx-nand: 
[   58.131344] NDCR:  0xdd079fff
[   58.131344] NDCB0: 0x000d3000
[   58.131344] NDCB1: 0x27000000
[   58.131344] NDCB2: 0x00000000
[   58.131344] NDCB3: 0x00000000
[   58.150423] marvell-nfc pxa3xx-nand: 
[   58.150423] NDCR:  0xdd079fff
[   58.150423] NDCB0: 0x000d3000
[   58.150423] NDCB1: 0x27010000
[   58.150423] NDCB2: 0x00000000
[   58.150423] NDCB3: 0x00000000
[   58.169420] marvell-nfc pxa3xx-nand: 
[   58.169420] NDCR:  0x9d079fff
[   58.169420] NDCB0: 0x000d3000
[   58.169420] NDCB1: 0x27010000
[   58.169420] NDCB2: 0x00000000
[   58.169420] NDCB3: 0x00000000
[   58.188528] marvell-nfc pxa3xx-nand: 
[   58.188528] NDCR:  0xdd079fff
[   58.188528] NDCB0: 0x000d3000
[   58.188528] NDCB1: 0x27400000
[   58.188528] NDCB2: 0x00000000
[   58.188528] NDCB3: 0x00000000
[   58.207610] marvell-nfc pxa3xx-nand: 
[   58.207610] NDCR:  0xdd079fff
[   58.207610] NDCB0: 0x000d3000
[   58.207610] NDCB1: 0x27410000
[   58.207610] NDCB2: 0x00000000
[   58.207610] NDCB3: 0x00000000
[   58.226605] marvell-nfc pxa3xx-nand: 
[   58.226605] NDCR:  0x9d079fff
[   58.226605] NDCB0: 0x000d3000
[   58.226605] NDCB1: 0x27410000
[   58.226605] NDCB2: 0x00000000
[   58.226605] NDCB3: 0x00000000
[   58.245752] marvell-nfc pxa3xx-nand: 
[   58.245752] NDCR:  0xdd079fff
[   58.245752] NDCB0: 0x000d3000
[   58.245752] NDCB1: 0x27800000
[   58.245752] NDCB2: 0x00000000
[   58.245752] NDCB3: 0x00000000
[   58.264840] marvell-nfc pxa3xx-nand: 
[   58.264840] NDCR:  0xdd079fff
[   58.264840] NDCB0: 0x000d3000
[   58.264840] NDCB1: 0x27810000
[   58.264840] NDCB2: 0x00000000
[   58.264840] NDCB3: 0x00000000
[   58.283945] marvell-nfc pxa3xx-nand: 
[   58.283945] NDCR:  0xdd079fff
[   58.283945] NDCB0: 0x000d3000
[   58.283945] NDCB1: 0x27c00000
[   58.283945] NDCB2: 0x00000000
[   58.283945] NDCB3: 0x00000000
[   58.303028] marvell-nfc pxa3xx-nand: 
[   58.303028] NDCR:  0xdd079fff
[   58.303028] NDCB0: 0x000d3000
[   58.303028] NDCB1: 0x27c10000
[   58.303028] NDCB2: 0x00000000
[   58.303028] NDCB3: 0x00000000
[   58.322017] marvell-nfc pxa3xx-nand: 
[   58.322017] NDCR:  0x9d079fff
[   58.322017] NDCB0: 0x000d3000
[   58.322017] NDCB1: 0x27c10000
[   58.322017] NDCB2: 0x00000000
[   58.322017] NDCB3: 0x00000000
[   58.341136] marvell-nfc pxa3xx-nand: 
[   58.341136] NDCR:  0xdd079fff
[   58.341136] NDCB0: 0x000d3000
[   58.341136] NDCB1: 0x28000000
[   58.341136] NDCB2: 0x00000000
[   58.341136] NDCB3: 0x00000000
[   58.360217] marvell-nfc pxa3xx-nand: 
[   58.360217] NDCR:  0xdd079fff
[   58.360217] NDCB0: 0x000d3000
[   58.360217] NDCB1: 0x28010000
[   58.360217] NDCB2: 0x00000000
[   58.360217] NDCB3: 0x00000000
[   58.379214] marvell-nfc pxa3xx-nand: 
[   58.379214] NDCR:  0x9d079fff
[   58.379214] NDCB0: 0x000d3000
[   58.379214] NDCB1: 0x28010000
[   58.379214] NDCB2: 0x00000000
[   58.379214] NDCB3: 0x00000000
[   58.398323] marvell-nfc pxa3xx-nand: 
[   58.398323] NDCR:  0xdd079fff
[   58.398323] NDCB0: 0x000d3000
[   58.398323] NDCB1: 0x28400000
[   58.398323] NDCB2: 0x00000000
[   58.398323] NDCB3: 0x00000000
[   58.417403] marvell-nfc pxa3xx-nand: 
[   58.417403] NDCR:  0xdd079fff
[   58.417403] NDCB0: 0x000d3000
[   58.417403] NDCB1: 0x28410000
[   58.417403] NDCB2: 0x00000000
[   58.417403] NDCB3: 0x00000000
[   58.436500] marvell-nfc pxa3xx-nand: 
[   58.436500] NDCR:  0xdd079fff
[   58.436500] NDCB0: 0x000d3000
[   58.436500] NDCB1: 0x28800000
[   58.436500] NDCB2: 0x00000000
[   58.436500] NDCB3: 0x00000000
[   58.455580] marvell-nfc pxa3xx-nand: 
[   58.455580] NDCR:  0xdd079fff
[   58.455580] NDCB0: 0x000d3000
[   58.455580] NDCB1: 0x28810000
[   58.455580] NDCB2: 0x00000000
[   58.455580] NDCB3: 0x00000000
[   58.474568] marvell-nfc pxa3xx-nand: 
[   58.474568] NDCR:  0x9d079fff
[   58.474568] NDCB0: 0x000d3000
[   58.474568] NDCB1: 0x28810000
[   58.474568] NDCB2: 0x00000000
[   58.474568] NDCB3: 0x00000000
[   58.493687] marvell-nfc pxa3xx-nand: 
[   58.493687] NDCR:  0xdd079fff
[   58.493687] NDCB0: 0x000d3000
[   58.493687] NDCB1: 0x28c00000
[   58.493687] NDCB2: 0x00000000
[   58.493687] NDCB3: 0x00000000
[   58.512769] marvell-nfc pxa3xx-nand: 
[   58.512769] NDCR:  0xdd079fff
[   58.512769] NDCB0: 0x000d3000
[   58.512769] NDCB1: 0x28c10000
[   58.512769] NDCB2: 0x00000000
[   58.512769] NDCB3: 0x00000000
[   58.531757] marvell-nfc pxa3xx-nand: 
[   58.531757] NDCR:  0x9d079fff
[   58.531757] NDCB0: 0x000d3000
[   58.531757] NDCB1: 0x28c10000
[   58.531757] NDCB2: 0x00000000
[   58.531757] NDCB3: 0x00000000
[   58.550873] marvell-nfc pxa3xx-nand: 
[   58.550873] NDCR:  0xdd079fff
[   58.550873] NDCB0: 0x000d3000
[   58.550873] NDCB1: 0x29000000
[   58.550873] NDCB2: 0x00000000
[   58.550873] NDCB3: 0x00000000
[   58.569948] marvell-nfc pxa3xx-nand: 
[   58.569948] NDCR:  0xdd079fff
[   58.569948] NDCB0: 0x000d3000
[   58.569948] NDCB1: 0x29010000
[   58.569948] NDCB2: 0x00000000
[   58.569948] NDCB3: 0x00000000
[   58.588930] marvell-nfc pxa3xx-nand: 
[   58.588930] NDCR:  0x9d079fff
[   58.588930] NDCB0: 0x000d3000
[   58.588930] NDCB1: 0x29010000
[   58.588930] NDCB2: 0x00000000
[   58.588930] NDCB3: 0x00000000
[   58.608033] marvell-nfc pxa3xx-nand: 
[   58.608033] NDCR:  0xdd079fff
[   58.608033] NDCB0: 0x000d3000
[   58.608033] NDCB1: 0x29400000
[   58.608033] NDCB2: 0x00000000
[   58.608033] NDCB3: 0x00000000
[   58.627106] marvell-nfc pxa3xx-nand: 
[   58.627106] NDCR:  0xdd079fff
[   58.627106] NDCB0: 0x000d3000
[   58.627106] NDCB1: 0x29410000
[   58.627106] NDCB2: 0x00000000
[   58.627106] NDCB3: 0x00000000
[   58.646099] marvell-nfc pxa3xx-nand: 
[   58.646099] NDCR:  0x9d079fff
[   58.646099] NDCB0: 0x000d3000
[   58.646099] NDCB1: 0x29410000
[   58.646099] NDCB2: 0x00000000
[   58.646099] NDCB3: 0x00000000
[   58.665244] marvell-nfc pxa3xx-nand: 
[   58.665244] NDCR:  0xdd079fff
[   58.665244] NDCB0: 0x000d3000
[   58.665244] NDCB1: 0x29800000
[   58.665244] NDCB2: 0x00000000
[   58.665244] NDCB3: 0x00000000
[   58.684328] marvell-nfc pxa3xx-nand: 
[   58.684328] NDCR:  0xdd079fff
[   58.684328] NDCB0: 0x000d3000
[   58.684328] NDCB1: 0x29810000
[   58.684328] NDCB2: 0x00000000
[   58.684328] NDCB3: 0x00000000
[   58.703327] marvell-nfc pxa3xx-nand: 
[   58.703327] NDCR:  0x9d079fff
[   58.703327] NDCB0: 0x000d3000
[   58.703327] NDCB1: 0x29810000
[   58.703327] NDCB2: 0x00000000
[   58.703327] NDCB3: 0x00000000
[   58.722442] marvell-nfc pxa3xx-nand: 
[   58.722442] NDCR:  0xdd079fff
[   58.722442] NDCB0: 0x000d3000
[   58.722442] NDCB1: 0x29c00000
[   58.722442] NDCB2: 0x00000000
[   58.722442] NDCB3: 0x00000000
[   58.741519] marvell-nfc pxa3xx-nand: 
[   58.741519] NDCR:  0xdd079fff
[   58.741519] NDCB0: 0x000d3000
[   58.741519] NDCB1: 0x29c10000
[   58.741519] NDCB2: 0x00000000
[   58.741519] NDCB3: 0x00000000
[   58.760513] marvell-nfc pxa3xx-nand: 
[   58.760513] NDCR:  0x9d079fff
[   58.760513] NDCB0: 0x000d3000
[   58.760513] NDCB1: 0x29c10000
[   58.760513] NDCB2: 0x00000000
[   58.760513] NDCB3: 0x00000000
[   58.779627] marvell-nfc pxa3xx-nand: 
[   58.779627] NDCR:  0xdd079fff
[   58.779627] NDCB0: 0x000d3000
[   58.779627] NDCB1: 0x2a000000
[   58.779627] NDCB2: 0x00000000
[   58.779627] NDCB3: 0x00000000
[   58.798812] marvell-nfc pxa3xx-nand: 
[   58.798812] NDCR:  0xdd079fff
[   58.798812] NDCB0: 0x000d3000
[   58.798812] NDCB1: 0x2a010000
[   58.798812] NDCB2: 0x00000000
[   58.798812] NDCB3: 0x00000000
[   58.817756] marvell-nfc pxa3xx-nand: 
[   58.817756] NDCR:  0x9d079fff
[   58.817756] NDCB0: 0x000d3000
[   58.817756] NDCB1: 0x2a010000
[   58.817756] NDCB2: 0x00000000
[   58.817756] NDCB3: 0x00000000
[   58.836867] marvell-nfc pxa3xx-nand: 
[   58.836867] NDCR:  0xdd079fff
[   58.836867] NDCB0: 0x000d3000
[   58.836867] NDCB1: 0x2a400000
[   58.836867] NDCB2: 0x00000000
[   58.836867] NDCB3: 0x00000000
[   58.855944] marvell-nfc pxa3xx-nand: 
[   58.855944] NDCR:  0xdd079fff
[   58.855944] NDCB0: 0x000d3000
[   58.855944] NDCB1: 0x2a410000
[   58.855944] NDCB2: 0x00000000
[   58.855944] NDCB3: 0x00000000
[   58.874934] marvell-nfc pxa3xx-nand: 
[   58.874934] NDCR:  0x9d079fff
[   58.874934] NDCB0: 0x000d3000
[   58.874934] NDCB1: 0x2a410000
[   58.874934] NDCB2: 0x00000000
[   58.874934] NDCB3: 0x00000000
[   58.894051] marvell-nfc pxa3xx-nand: 
[   58.894051] NDCR:  0xdd079fff
[   58.894051] NDCB0: 0x000d3000
[   58.894051] NDCB1: 0x2a800000
[   58.894051] NDCB2: 0x00000000
[   58.894051] NDCB3: 0x00000000
[   58.913132] marvell-nfc pxa3xx-nand: 
[   58.913132] NDCR:  0xdd079fff
[   58.913132] NDCB0: 0x000d3000
[   58.913132] NDCB1: 0x2a810000
[   58.913132] NDCB2: 0x00000000
[   58.913132] NDCB3: 0x00000000
[   58.932127] marvell-nfc pxa3xx-nand: 
[   58.932127] NDCR:  0x9d079fff
[   58.932127] NDCB0: 0x000d3000
[   58.932127] NDCB1: 0x2a810000
[   58.932127] NDCB2: 0x00000000
[   58.932127] NDCB3: 0x00000000
[   58.951248] marvell-nfc pxa3xx-nand: 
[   58.951248] NDCR:  0xdd079fff
[   58.951248] NDCB0: 0x000d3000
[   58.951248] NDCB1: 0x2ac00000
[   58.951248] NDCB2: 0x00000000
[   58.951248] NDCB3: 0x00000000
[   58.970320] marvell-nfc pxa3xx-nand: 
[   58.970320] NDCR:  0xdd079fff
[   58.970320] NDCB0: 0x000d3000
[   58.970320] NDCB1: 0x2ac10000
[   58.970320] NDCB2: 0x00000000
[   58.970320] NDCB3: 0x00000000
[   58.989315] marvell-nfc pxa3xx-nand: 
[   58.989315] NDCR:  0x9d079fff
[   58.989315] NDCB0: 0x000d3000
[   58.989315] NDCB1: 0x2ac10000
[   58.989315] NDCB2: 0x00000000
[   58.989315] NDCB3: 0x00000000
[   59.008432] marvell-nfc pxa3xx-nand: 
[   59.008432] NDCR:  0xdd079fff
[   59.008432] NDCB0: 0x000d3000
[   59.008432] NDCB1: 0x2b000000
[   59.008432] NDCB2: 0x00000000
[   59.008432] NDCB3: 0x00000000
[   59.027523] marvell-nfc pxa3xx-nand: 
[   59.027523] NDCR:  0xdd079fff
[   59.027523] NDCB0: 0x000d3000
[   59.027523] NDCB1: 0x2b010000
[   59.027523] NDCB2: 0x00000000
[   59.027523] NDCB3: 0x00000000
[   59.046521] marvell-nfc pxa3xx-nand: 
[   59.046521] NDCR:  0x9d079fff
[   59.046521] NDCB0: 0x000d3000
[   59.046521] NDCB1: 0x2b010000
[   59.046521] NDCB2: 0x00000000
[   59.046521] NDCB3: 0x00000000
[   59.065645] marvell-nfc pxa3xx-nand: 
[   59.065645] NDCR:  0xdd079fff
[   59.065645] NDCB0: 0x000d3000
[   59.065645] NDCB1: 0x2b400000
[   59.065645] NDCB2: 0x00000000
[   59.065645] NDCB3: 0x00000000
[   59.084725] marvell-nfc pxa3xx-nand: 
[   59.084725] NDCR:  0xdd079fff
[   59.084725] NDCB0: 0x000d3000
[   59.084725] NDCB1: 0x2b410000
[   59.084725] NDCB2: 0x00000000
[   59.084725] NDCB3: 0x00000000
[   59.103721] marvell-nfc pxa3xx-nand: 
[   59.103721] NDCR:  0x9d079fff
[   59.103721] NDCB0: 0x000d3000
[   59.103721] NDCB1: 0x2b410000
[   59.103721] NDCB2: 0x00000000
[   59.103721] NDCB3: 0x00000000
[   59.122840] marvell-nfc pxa3xx-nand: 
[   59.122840] NDCR:  0xdd079fff
[   59.122840] NDCB0: 0x000d3000
[   59.122840] NDCB1: 0x2b800000
[   59.122840] NDCB2: 0x00000000
[   59.122840] NDCB3: 0x00000000
[   59.141911] marvell-nfc pxa3xx-nand: 
[   59.141911] NDCR:  0xdd079fff
[   59.141911] NDCB0: 0x000d3000
[   59.141911] NDCB1: 0x2b810000
[   59.141911] NDCB2: 0x00000000
[   59.141911] NDCB3: 0x00000000
[   59.160907] marvell-nfc pxa3xx-nand: 
[   59.160907] NDCR:  0x9d079fff
[   59.160907] NDCB0: 0x000d3000
[   59.160907] NDCB1: 0x2b810000
[   59.160907] NDCB2: 0x00000000
[   59.160907] NDCB3: 0x00000000
[   59.180016] marvell-nfc pxa3xx-nand: 
[   59.180016] NDCR:  0xdd079fff
[   59.180016] NDCB0: 0x000d3000
[   59.180016] NDCB1: 0x2bc00000
[   59.180016] NDCB2: 0x00000000
[   59.180016] NDCB3: 0x00000000
[   59.199131] marvell-nfc pxa3xx-nand: 
[   59.199131] NDCR:  0xdd079fff
[   59.199131] NDCB0: 0x000d3000
[   59.199131] NDCB1: 0x2bc10000
[   59.199131] NDCB2: 0x00000000
[   59.199131] NDCB3: 0x00000000
[   59.218120] marvell-nfc pxa3xx-nand: 
[   59.218120] NDCR:  0x9d079fff
[   59.218120] NDCB0: 0x000d3000
[   59.218120] NDCB1: 0x2bc10000
[   59.218120] NDCB2: 0x00000000
[   59.218120] NDCB3: 0x00000000
[   59.237235] marvell-nfc pxa3xx-nand: 
[   59.237235] NDCR:  0xdd079fff
[   59.237235] NDCB0: 0x000d3000
[   59.237235] NDCB1: 0x2c000000
[   59.237235] NDCB2: 0x00000000
[   59.237235] NDCB3: 0x00000000
[   59.256311] marvell-nfc pxa3xx-nand: 
[   59.256311] NDCR:  0xdd079fff
[   59.256311] NDCB0: 0x000d3000
[   59.256311] NDCB1: 0x2c010000
[   59.256311] NDCB2: 0x00000000
[   59.256311] NDCB3: 0x00000000
[   59.275319] marvell-nfc pxa3xx-nand: 
[   59.275319] NDCR:  0x9d079fff
[   59.275319] NDCB0: 0x000d3000
[   59.275319] NDCB1: 0x2c010000
[   59.275319] NDCB2: 0x00000000
[   59.275319] NDCB3: 0x00000000
[   59.294431] marvell-nfc pxa3xx-nand: 
[   59.294431] NDCR:  0xdd079fff
[   59.294431] NDCB0: 0x000d3000
[   59.294431] NDCB1: 0x2c400000
[   59.294431] NDCB2: 0x00000000
[   59.294431] NDCB3: 0x00000000
[   59.313505] marvell-nfc pxa3xx-nand: 
[   59.313505] NDCR:  0xdd079fff
[   59.313505] NDCB0: 0x000d3000
[   59.313505] NDCB1: 0x2c410000
[   59.313505] NDCB2: 0x00000000
[   59.313505] NDCB3: 0x00000000
[   59.332498] marvell-nfc pxa3xx-nand: 
[   59.332498] NDCR:  0x9d079fff
[   59.332498] NDCB0: 0x000d3000
[   59.332498] NDCB1: 0x2c410000
[   59.332498] NDCB2: 0x00000000
[   59.332498] NDCB3: 0x00000000
[   59.351612] marvell-nfc pxa3xx-nand: 
[   59.351612] NDCR:  0xdd079fff
[   59.351612] NDCB0: 0x000d3000
[   59.351612] NDCB1: 0x2c800000
[   59.351612] NDCB2: 0x00000000
[   59.351612] NDCB3: 0x00000000
[   59.370686] marvell-nfc pxa3xx-nand: 
[   59.370686] NDCR:  0xdd079fff
[   59.370686] NDCB0: 0x000d3000
[   59.370686] NDCB1: 0x2c810000
[   59.370686] NDCB2: 0x00000000
[   59.370686] NDCB3: 0x00000000
[   59.389679] marvell-nfc pxa3xx-nand: 
[   59.389679] NDCR:  0x9d079fff
[   59.389679] NDCB0: 0x000d3000
[   59.389679] NDCB1: 0x2c810000
[   59.389679] NDCB2: 0x00000000
[   59.389679] NDCB3: 0x00000000
[   59.409773] marvell-nfc pxa3xx-nand: 
[   59.409773] NDCR:  0xdd079fff
[   59.409773] NDCB0: 0x000d3000
[   59.409773] NDCB1: 0x50800000
[   59.409773] NDCB2: 0x00000000
[   59.409773] NDCB3: 0x00000000
[   59.429029] marvell-nfc pxa3xx-nand: 
[   59.429029] NDCR:  0xdd079fff
[   59.429029] NDCB0: 0x000d3000
[   59.429029] NDCB1: 0x50810000
[   59.429029] NDCB2: 0x00000000
[   59.429029] NDCB3: 0x00000000
[   59.448042] marvell-nfc pxa3xx-nand: 
[   59.448042] NDCR:  0x9d079fff
[   59.448042] NDCB0: 0x000d3000
[   59.448042] NDCB1: 0x50810000
[   59.448042] NDCB2: 0x00000000
[   59.448042] NDCB3: 0x00000000
[   59.467164] marvell-nfc pxa3xx-nand: 
[   59.467164] NDCR:  0xdd079fff
[   59.467164] NDCB0: 0x000d3000
[   59.467164] NDCB1: 0x50c00000
[   59.467164] NDCB2: 0x00000000
[   59.467164] NDCB3: 0x00000000
[   59.486242] marvell-nfc pxa3xx-nand: 
[   59.486242] NDCR:  0xdd079fff
[   59.486242] NDCB0: 0x000d3000
[   59.486242] NDCB1: 0x50c10000
[   59.486242] NDCB2: 0x00000000
[   59.486242] NDCB3: 0x00000000
[   59.505235] marvell-nfc pxa3xx-nand: 
[   59.505235] NDCR:  0x9d079fff
[   59.505235] NDCB0: 0x000d3000
[   59.505235] NDCB1: 0x50c10000
[   59.505235] NDCB2: 0x00000000
[   59.505235] NDCB3: 0x00000000
[   59.524349] marvell-nfc pxa3xx-nand: 
[   59.524349] NDCR:  0xdd079fff
[   59.524349] NDCB0: 0x000d3000
[   59.524349] NDCB1: 0x51000000
[   59.524349] NDCB2: 0x00000000
[   59.524349] NDCB3: 0x00000000
[   59.543423] marvell-nfc pxa3xx-nand: 
[   59.543423] NDCR:  0xdd079fff
[   59.543423] NDCB0: 0x000d3000
[   59.543423] NDCB1: 0x51010000
[   59.543423] NDCB2: 0x00000000
[   59.543423] NDCB3: 0x00000000
[   59.562418] marvell-nfc pxa3xx-nand: 
[   59.562418] NDCR:  0x9d079fff
[   59.562418] NDCB0: 0x000d3000
[   59.562418] NDCB1: 0x51010000
[   59.562418] NDCB2: 0x00000000
[   59.562418] NDCB3: 0x00000000
[   59.581528] marvell-nfc pxa3xx-nand: 
[   59.581528] NDCR:  0xdd079fff
[   59.581528] NDCB0: 0x000d3000
[   59.581528] NDCB1: 0x51400000
[   59.581528] NDCB2: 0x00000000
[   59.581528] NDCB3: 0x00000000
[   59.600605] marvell-nfc pxa3xx-nand: 
[   59.600605] NDCR:  0xdd079fff
[   59.600605] NDCB0: 0x000d3000
[   59.600605] NDCB1: 0x51410000
[   59.600605] NDCB2: 0x00000000
[   59.600605] NDCB3: 0x00000000
[   59.619598] marvell-nfc pxa3xx-nand: 
[   59.619598] NDCR:  0x9d079fff
[   59.619598] NDCB0: 0x000d3000
[   59.619598] NDCB1: 0x51410000
[   59.619598] NDCB2: 0x00000000
[   59.619598] NDCB3: 0x00000000
[   59.638825] marvell-nfc pxa3xx-nand: 
[   59.638825] NDCR:  0xdd079fff
[   59.638825] NDCB0: 0x000d3000
[   59.638825] NDCB1: 0x51800000
[   59.638825] NDCB2: 0x00000000
[   59.638825] NDCB3: 0x00000000
[   59.657847] marvell-nfc pxa3xx-nand: 
[   59.657847] NDCR:  0xdd079fff
[   59.657847] NDCB0: 0x000d3000
[   59.657847] NDCB1: 0x51810000
[   59.657847] NDCB2: 0x00000000
[   59.657847] NDCB3: 0x00000000
[   59.676840] marvell-nfc pxa3xx-nand: 
[   59.676840] NDCR:  0x9d079fff
[   59.676840] NDCB0: 0x000d3000
[   59.676840] NDCB1: 0x51810000
[   59.676840] NDCB2: 0x00000000
[   59.676840] NDCB3: 0x00000000
[   59.695956] marvell-nfc pxa3xx-nand: 
[   59.695956] NDCR:  0xdd079fff
[   59.695956] NDCB0: 0x000d3000
[   59.695956] NDCB1: 0x51c00000
[   59.695956] NDCB2: 0x00000000
[   59.695956] NDCB3: 0x00000000
[   59.715039] marvell-nfc pxa3xx-nand: 
[   59.715039] NDCR:  0xdd079fff
[   59.715039] NDCB0: 0x000d3000
[   59.715039] NDCB1: 0x51c10000
[   59.715039] NDCB2: 0x00000000
[   59.715039] NDCB3: 0x00000000
[   59.734038] marvell-nfc pxa3xx-nand: 
[   59.734038] NDCR:  0x9d079fff
[   59.734038] NDCB0: 0x000d3000
[   59.734038] NDCB1: 0x51c10000
[   59.734038] NDCB2: 0x00000000
[   59.734038] NDCB3: 0x00000000
[   59.753156] marvell-nfc pxa3xx-nand: 
[   59.753156] NDCR:  0xdd079fff
[   59.753156] NDCB0: 0x000d3000
[   59.753156] NDCB1: 0x52000000
[   59.753156] NDCB2: 0x00000000
[   59.753156] NDCB3: 0x00000000
[   59.772234] marvell-nfc pxa3xx-nand: 
[   59.772234] NDCR:  0xdd079fff
[   59.772234] NDCB0: 0x000d3000
[   59.772234] NDCB1: 0x52010000
[   59.772234] NDCB2: 0x00000000
[   59.772234] NDCB3: 0x00000000
[   59.791225] marvell-nfc pxa3xx-nand: 
[   59.791225] NDCR:  0x9d079fff
[   59.791225] NDCB0: 0x000d3000
[   59.791225] NDCB1: 0x52010000
[   59.791225] NDCB2: 0x00000000
[   59.791225] NDCB3: 0x00000000
[   59.810348] marvell-nfc pxa3xx-nand: 
[   59.810348] NDCR:  0xdd079fff
[   59.810348] NDCB0: 0x000d3000
[   59.810348] NDCB1: 0x52400000
[   59.810348] NDCB2: 0x00000000
[   59.810348] NDCB3: 0x00000000
[   59.829430] marvell-nfc pxa3xx-nand: 
[   59.829430] NDCR:  0xdd079fff
[   59.829430] NDCB0: 0x000d3000
[   59.829430] NDCB1: 0x52410000
[   59.829430] NDCB2: 0x00000000
[   59.829430] NDCB3: 0x00000000
[   59.848437] marvell-nfc pxa3xx-nand: 
[   59.848437] NDCR:  0x9d079fff
[   59.848437] NDCB0: 0x000d3000
[   59.848437] NDCB1: 0x52410000
[   59.848437] NDCB2: 0x00000000
[   59.848437] NDCB3: 0x00000000
[   59.867556] marvell-nfc pxa3xx-nand: 
[   59.867556] NDCR:  0xdd079fff
[   59.867556] NDCB0: 0x000d3000
[   59.867556] NDCB1: 0x52800000
[   59.867556] NDCB2: 0x00000000
[   59.867556] NDCB3: 0x00000000
[   59.886635] marvell-nfc pxa3xx-nand: 
[   59.886635] NDCR:  0xdd079fff
[   59.886635] NDCB0: 0x000d3000
[   59.886635] NDCB1: 0x52810000
[   59.886635] NDCB2: 0x00000000
[   59.886635] NDCB3: 0x00000000
[   59.905631] marvell-nfc pxa3xx-nand: 
[   59.905631] NDCR:  0x9d079fff
[   59.905631] NDCB0: 0x000d3000
[   59.905631] NDCB1: 0x52810000
[   59.905631] NDCB2: 0x00000000
[   59.905631] NDCB3: 0x00000000
[   59.924745] marvell-nfc pxa3xx-nand: 
[   59.924745] NDCR:  0xdd079fff
[   59.924745] NDCB0: 0x000d3000
[   59.924745] NDCB1: 0x52c00000
[   59.924745] NDCB2: 0x00000000
[   59.924745] NDCB3: 0x00000000
[   59.943828] marvell-nfc pxa3xx-nand: 
[   59.943828] NDCR:  0xdd079fff
[   59.943828] NDCB0: 0x000d3000
[   59.943828] NDCB1: 0x52c10000
[   59.943828] NDCB2: 0x00000000
[   59.943828] NDCB3: 0x00000000
[   59.962826] marvell-nfc pxa3xx-nand: 
[   59.962826] NDCR:  0x9d079fff
[   59.962826] NDCB0: 0x000d3000
[   59.962826] NDCB1: 0x52c10000
[   59.962826] NDCB2: 0x00000000
[   59.962826] NDCB3: 0x00000000
[   59.981938] marvell-nfc pxa3xx-nand: 
[   59.981938] NDCR:  0xdd079fff
[   59.981938] NDCB0: 0x000d3000
[   59.981938] NDCB1: 0x53000000
[   59.981938] NDCB2: 0x00000000
[   59.981938] NDCB3: 0x00000000
[   60.001012] marvell-nfc pxa3xx-nand: 
[   60.001012] NDCR:  0xdd079fff
[   60.001012] NDCB0: 0x000d3000
[   60.001012] NDCB1: 0x53010000
[   60.001012] NDCB2: 0x00000000
[   60.001012] NDCB3: 0x00000000
[   60.020221] marvell-nfc pxa3xx-nand: 
[   60.020221] NDCR:  0x9d079fff
[   60.020221] NDCB0: 0x000d3000
[   60.020221] NDCB1: 0x53010000
[   60.020221] NDCB2: 0x00000000
[   60.020221] NDCB3: 0x00000000
[   60.039368] marvell-nfc pxa3xx-nand: 
[   60.039368] NDCR:  0xdd079fff
[   60.039368] NDCB0: 0x000d3000
[   60.039368] NDCB1: 0x53400000
[   60.039368] NDCB2: 0x00000000
[   60.039368] NDCB3: 0x00000000
[   60.058441] marvell-nfc pxa3xx-nand: 
[   60.058441] NDCR:  0xdd079fff
[   60.058441] NDCB0: 0x000d3000
[   60.058441] NDCB1: 0x53410000
[   60.058441] NDCB2: 0x00000000
[   60.058441] NDCB3: 0x00000000
[   60.077437] marvell-nfc pxa3xx-nand: 
[   60.077437] NDCR:  0x9d079fff
[   60.077437] NDCB0: 0x000d3000
[   60.077437] NDCB1: 0x53410000
[   60.077437] NDCB2: 0x00000000
[   60.077437] NDCB3: 0x00000000
[   60.097071] marvell-nfc pxa3xx-nand: 
[   60.097071] NDCR:  0xdd079fff
[   60.097071] NDCB0: 0x000d3000
[   60.097071] NDCB1: 0x53800000
[   60.097071] NDCB2: 0x00000000
[   60.097071] NDCB3: 0x00000000
[   60.116183] marvell-nfc pxa3xx-nand: 
[   60.116183] NDCR:  0xdd079fff
[   60.116183] NDCB0: 0x000d3000
[   60.116183] NDCB1: 0x53810000
[   60.116183] NDCB2: 0x00000000
[   60.116183] NDCB3: 0x00000000
[   60.135177] marvell-nfc pxa3xx-nand: 
[   60.135177] NDCR:  0x9d079fff
[   60.135177] NDCB0: 0x000d3000
[   60.135177] NDCB1: 0x53810000
[   60.135177] NDCB2: 0x00000000
[   60.135177] NDCB3: 0x00000000
[   60.154288] marvell-nfc pxa3xx-nand: 
[   60.154288] NDCR:  0xdd079fff
[   60.154288] NDCB0: 0x000d3000
[   60.154288] NDCB1: 0x53c00000
[   60.154288] NDCB2: 0x00000000
[   60.154288] NDCB3: 0x00000000
[   60.173365] marvell-nfc pxa3xx-nand: 
[   60.173365] NDCR:  0xdd079fff
[   60.173365] NDCB0: 0x000d3000
[   60.173365] NDCB1: 0x53c10000
[   60.173365] NDCB2: 0x00000000
[   60.173365] NDCB3: 0x00000000
[   60.192359] marvell-nfc pxa3xx-nand: 
[   60.192359] NDCR:  0x9d079fff
[   60.192359] NDCB0: 0x000d3000
[   60.192359] NDCB1: 0x53c10000
[   60.192359] NDCB2: 0x00000000
[   60.192359] NDCB3: 0x00000000
[   60.211474] marvell-nfc pxa3xx-nand: 
[   60.211474] NDCR:  0xdd079fff
[   60.211474] NDCB0: 0x000d3000
[   60.211474] NDCB1: 0x54000000
[   60.211474] NDCB2: 0x00000000
[   60.211474] NDCB3: 0x00000000
[   60.230556] marvell-nfc pxa3xx-nand: 
[   60.230556] NDCR:  0xdd079fff
[   60.230556] NDCB0: 0x000d3000
[   60.230556] NDCB1: 0x54010000
[   60.230556] NDCB2: 0x00000000
[   60.230556] NDCB3: 0x00000000
[   60.249556] marvell-nfc pxa3xx-nand: 
[   60.249556] NDCR:  0x9d079fff
[   60.249556] NDCB0: 0x000d3000
[   60.249556] NDCB1: 0x54010000
[   60.249556] NDCB2: 0x00000000
[   60.249556] NDCB3: 0x00000000
[   60.268799] marvell-nfc pxa3xx-nand: 
[   60.268799] NDCR:  0xdd079fff
[   60.268799] NDCB0: 0x000d3000
[   60.268799] NDCB1: 0x54400000
[   60.268799] NDCB2: 0x00000000
[   60.268799] NDCB3: 0x00000000
[   60.287813] marvell-nfc pxa3xx-nand: 
[   60.287813] NDCR:  0xdd079fff
[   60.287813] NDCB0: 0x000d3000
[   60.287813] NDCB1: 0x54410000
[   60.287813] NDCB2: 0x00000000
[   60.287813] NDCB3: 0x00000000
[   60.306813] marvell-nfc pxa3xx-nand: 
[   60.306813] NDCR:  0x9d079fff
[   60.306813] NDCB0: 0x000d3000
[   60.306813] NDCB1: 0x54410000
[   60.306813] NDCB2: 0x00000000
[   60.306813] NDCB3: 0x00000000
[   60.325931] marvell-nfc pxa3xx-nand: 
[   60.325931] NDCR:  0xdd079fff
[   60.325931] NDCB0: 0x000d3000
[   60.325931] NDCB1: 0x55000000
[   60.325931] NDCB2: 0x00000000
[   60.325931] NDCB3: 0x00000000
[   60.345007] marvell-nfc pxa3xx-nand: 
[   60.345007] NDCR:  0xdd079fff
[   60.345007] NDCB0: 0x000d3000
[   60.345007] NDCB1: 0x55010000
[   60.345007] NDCB2: 0x00000000
[   60.345007] NDCB3: 0x00000000
[   60.364001] marvell-nfc pxa3xx-nand: 
[   60.364001] NDCR:  0x9d079fff
[   60.364001] NDCB0: 0x000d3000
[   60.364001] NDCB1: 0x55010000
[   60.364001] NDCB2: 0x00000000
[   60.364001] NDCB3: 0x00000000
[   60.383116] marvell-nfc pxa3xx-nand: 
[   60.383116] NDCR:  0xdd079fff
[   60.383116] NDCB0: 0x000d3000
[   60.383116] NDCB1: 0x55400000
[   60.383116] NDCB2: 0x00000000
[   60.383116] NDCB3: 0x00000000
[   60.402197] marvell-nfc pxa3xx-nand: 
[   60.402197] NDCR:  0xdd079fff
[   60.402197] NDCB0: 0x000d3000
[   60.402197] NDCB1: 0x55410000
[   60.402197] NDCB2: 0x00000000
[   60.402197] NDCB3: 0x00000000
[   60.421190] marvell-nfc pxa3xx-nand: 
[   60.421190] NDCR:  0x9d079fff
[   60.421190] NDCB0: 0x000d3000
[   60.421190] NDCB1: 0x55410000
[   60.421190] NDCB2: 0x00000000
[   60.421190] NDCB3: 0x00000000
[   60.440302] marvell-nfc pxa3xx-nand: 
[   60.440302] NDCR:  0xdd079fff
[   60.440302] NDCB0: 0x000d3000
[   60.440302] NDCB1: 0x55800000
[   60.440302] NDCB2: 0x00000000
[   60.440302] NDCB3: 0x00000000
[   60.459400] marvell-nfc pxa3xx-nand: 
[   60.459400] NDCR:  0xdd079fff
[   60.459400] NDCB0: 0x000d3000
[   60.459400] NDCB1: 0x55810000
[   60.459400] NDCB2: 0x00000000
[   60.459400] NDCB3: 0x00000000
[   60.478391] marvell-nfc pxa3xx-nand: 
[   60.478391] NDCR:  0x9d079fff
[   60.478391] NDCB0: 0x000d3000
[   60.478391] NDCB1: 0x55810000
[   60.478391] NDCB2: 0x00000000
[   60.478391] NDCB3: 0x00000000
[   60.497507] marvell-nfc pxa3xx-nand: 
[   60.497507] NDCR:  0xdd079fff
[   60.497507] NDCB0: 0x000d3000
[   60.497507] NDCB1: 0x55c00000
[   60.497507] NDCB2: 0x00000000
[   60.497507] NDCB3: 0x00000000
[   60.516585] marvell-nfc pxa3xx-nand: 
[   60.516585] NDCR:  0xdd079fff
[   60.516585] NDCB0: 0x000d3000
[   60.516585] NDCB1: 0x55c10000
[   60.516585] NDCB2: 0x00000000
[   60.516585] NDCB3: 0x00000000
[   60.535578] marvell-nfc pxa3xx-nand: 
[   60.535578] NDCR:  0x9d079fff
[   60.535578] NDCB0: 0x000d3000
[   60.535578] NDCB1: 0x55c10000
[   60.535578] NDCB2: 0x00000000
[   60.535578] NDCB3: 0x00000000
[   60.554689] marvell-nfc pxa3xx-nand: 
[   60.554689] NDCR:  0xdd079fff
[   60.554689] NDCB0: 0x000d3000
[   60.554689] NDCB1: 0x56000000
[   60.554689] NDCB2: 0x00000000
[   60.554689] NDCB3: 0x00000000
[   60.573763] marvell-nfc pxa3xx-nand: 
[   60.573763] NDCR:  0xdd079fff
[   60.573763] NDCB0: 0x000d3000
[   60.573763] NDCB1: 0x56010000
[   60.573763] NDCB2: 0x00000000
[   60.573763] NDCB3: 0x00000000
[   60.592755] marvell-nfc pxa3xx-nand: 
[   60.592755] NDCR:  0x9d079fff
[   60.592755] NDCB0: 0x000d3000
[   60.592755] NDCB1: 0x56010000
[   60.592755] NDCB2: 0x00000000
[   60.592755] NDCB3: 0x00000000
[   60.611868] marvell-nfc pxa3xx-nand: 
[   60.611868] NDCR:  0xdd079fff
[   60.611868] NDCB0: 0x000d3000
[   60.611868] NDCB1: 0x56400000
[   60.611868] NDCB2: 0x00000000
[   60.611868] NDCB3: 0x00000000
[   60.630946] marvell-nfc pxa3xx-nand: 
[   60.630946] NDCR:  0xdd079fff
[   60.630946] NDCB0: 0x000d3000
[   60.630946] NDCB1: 0x56410000
[   60.630946] NDCB2: 0x00000000
[   60.630946] NDCB3: 0x00000000
[   60.649937] marvell-nfc pxa3xx-nand: 
[   60.649937] NDCR:  0x9d079fff
[   60.649937] NDCB0: 0x000d3000
[   60.649937] NDCB1: 0x56410000
[   60.649937] NDCB2: 0x00000000
[   60.649937] NDCB3: 0x00000000
[   60.669070] marvell-nfc pxa3xx-nand: 
[   60.669070] NDCR:  0xdd079fff
[   60.669070] NDCB0: 0x000d3000
[   60.669070] NDCB1: 0x56800000
[   60.669070] NDCB2: 0x00000000
[   60.669070] NDCB3: 0x00000000
[   60.688143] marvell-nfc pxa3xx-nand: 
[   60.688143] NDCR:  0xdd079fff
[   60.688143] NDCB0: 0x000d3000
[   60.688143] NDCB1: 0x56810000
[   60.688143] NDCB2: 0x00000000
[   60.688143] NDCB3: 0x00000000
[   60.707135] marvell-nfc pxa3xx-nand: 
[   60.707135] NDCR:  0x9d079fff
[   60.707135] NDCB0: 0x000d3000
[   60.707135] NDCB1: 0x56810000
[   60.707135] NDCB2: 0x00000000
[   60.707135] NDCB3: 0x00000000
[   60.726250] marvell-nfc pxa3xx-nand: 
[   60.726250] NDCR:  0xdd079fff
[   60.726250] NDCB0: 0x000d3000
[   60.726250] NDCB1: 0x56c00000
[   60.726250] NDCB2: 0x00000000
[   60.726250] NDCB3: 0x00000000
[   60.745333] marvell-nfc pxa3xx-nand: 
[   60.745333] NDCR:  0xdd079fff
[   60.745333] NDCB0: 0x000d3000
[   60.745333] NDCB1: 0x56c10000
[   60.745333] NDCB2: 0x00000000
[   60.745333] NDCB3: 0x00000000
[   60.764332] marvell-nfc pxa3xx-nand: 
[   60.764332] NDCR:  0x9d079fff
[   60.764332] NDCB0: 0x000d3000
[   60.764332] NDCB1: 0x56c10000
[   60.764332] NDCB2: 0x00000000
[   60.764332] NDCB3: 0x00000000
[   60.783447] marvell-nfc pxa3xx-nand: 
[   60.783447] NDCR:  0xdd079fff
[   60.783447] NDCB0: 0x000d3000
[   60.783447] NDCB1: 0x57000000
[   60.783447] NDCB2: 0x00000000
[   60.783447] NDCB3: 0x00000000
[   60.802527] marvell-nfc pxa3xx-nand: 
[   60.802527] NDCR:  0xdd079fff
[   60.802527] NDCB0: 0x000d3000
[   60.802527] NDCB1: 0x57010000
[   60.802527] NDCB2: 0x00000000
[   60.802527] NDCB3: 0x00000000
[   60.821520] marvell-nfc pxa3xx-nand: 
[   60.821520] NDCR:  0x9d079fff
[   60.821520] NDCB0: 0x000d3000
[   60.821520] NDCB1: 0x57010000
[   60.821520] NDCB2: 0x00000000
[   60.821520] NDCB3: 0x00000000
[   60.840635] marvell-nfc pxa3xx-nand: 
[   60.840635] NDCR:  0xdd079fff
[   60.840635] NDCB0: 0x000d3000
[   60.840635] NDCB1: 0x57400000
[   60.840635] NDCB2: 0x00000000
[   60.840635] NDCB3: 0x00000000
[   60.859718] marvell-nfc pxa3xx-nand: 
[   60.859718] NDCR:  0xdd079fff
[   60.859718] NDCB0: 0x000d3000
[   60.859718] NDCB1: 0x57410000
[   60.859718] NDCB2: 0x00000000
[   60.859718] NDCB3: 0x00000000
[   60.878796] marvell-nfc pxa3xx-nand: 
[   60.878796] NDCR:  0x9d079fff
[   60.878796] NDCB0: 0x000d3000
[   60.878796] NDCB1: 0x57410000
[   60.878796] NDCB2: 0x00000000
[   60.878796] NDCB3: 0x00000000
[   60.897886] marvell-nfc pxa3xx-nand: 
[   60.897886] NDCR:  0xdd079fff
[   60.897886] NDCB0: 0x000d3000
[   60.897886] NDCB1: 0x57c00000
[   60.897886] NDCB2: 0x00000000
[   60.897886] NDCB3: 0x00000000
[   60.916967] marvell-nfc pxa3xx-nand: 
[   60.916967] NDCR:  0xdd079fff
[   60.916967] NDCB0: 0x000d3000
[   60.916967] NDCB1: 0x57c10000
[   60.916967] NDCB2: 0x00000000
[   60.916967] NDCB3: 0x00000000
[   60.935957] marvell-nfc pxa3xx-nand: 
[   60.935957] NDCR:  0x9d079fff
[   60.935957] NDCB0: 0x000d3000
[   60.935957] NDCB1: 0x57c10000
[   60.935957] NDCB2: 0x00000000
[   60.935957] NDCB3: 0x00000000
[   60.955072] marvell-nfc pxa3xx-nand: 
[   60.955072] NDCR:  0xdd079fff
[   60.955072] NDCB0: 0x000d3000
[   60.955072] NDCB1: 0x58000000
[   60.955072] NDCB2: 0x00000000
[   60.955072] NDCB3: 0x00000000
[   60.974148] marvell-nfc pxa3xx-nand: 
[   60.974148] NDCR:  0xdd079fff
[   60.974148] NDCB0: 0x000d3000
[   60.974148] NDCB1: 0x58010000
[   60.974148] NDCB2: 0x00000000
[   60.974148] NDCB3: 0x00000000
[   60.993140] marvell-nfc pxa3xx-nand: 
[   60.993140] NDCR:  0x9d079fff
[   60.993140] NDCB0: 0x000d3000
[   60.993140] NDCB1: 0x58010000
[   60.993140] NDCB2: 0x00000000
[   60.993140] NDCB3: 0x00000000
[   61.012262] marvell-nfc pxa3xx-nand: 
[   61.012262] NDCR:  0xdd079fff
[   61.012262] NDCB0: 0x000d3000
[   61.012262] NDCB1: 0x58400000
[   61.012262] NDCB2: 0x00000000
[   61.012262] NDCB3: 0x00000000
[   61.031332] marvell-nfc pxa3xx-nand: 
[   61.031332] NDCR:  0xdd079fff
[   61.031332] NDCB0: 0x000d3000
[   61.031332] NDCB1: 0x58410000
[   61.031332] NDCB2: 0x00000000
[   61.031332] NDCB3: 0x00000000
[   61.050347] marvell-nfc pxa3xx-nand: 
[   61.050347] NDCR:  0x9d079fff
[   61.050347] NDCB0: 0x000d3000
[   61.050347] NDCB1: 0x58410000
[   61.050347] NDCB2: 0x00000000
[   61.050347] NDCB3: 0x00000000
[   61.069665] ubi0: scanning is finished
[   61.073622] ubi0 error: ubi_read_volume_table: the layout volume was not found
[   61.081178] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
[   61.088556] UBI error: cannot attach mtd5
[   61.094051] pxa-rtc pxa-rtc: setting system clock to 2000-01-01 00:01:26 UTC (946684886)
[   61.173248] smc91x smc91x.0 eth0: link down
[   63.031810] smc91x smc91x.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   63.088817] IP-Config: Complete:
[   63.092174]      device=eth0, hwaddr=00:0e:0c:a7:26:f7, ipaddr=192.168.1.232, mask=255.255.255.0, gw=255.255.255.255
[   63.102853]      host=192.168.1.232, domain=, nis-domain=(none)
[   63.108938]      bootserver=192.168.1.5, rootserver=192.168.1.5, rootpath=
[   63.117215] ALSA device list:
[   63.120674]   #0: Zylonite
[   63.146191] Freeing unused kernel memory: 2396K
[   63.151134] This architecture does not have kernel memory protection.
Starting logging: OK
Loading all the available modules: modprobe: module smc91x not found in modules.dep
modprobe: module soundcore not found in modules.dep

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-02 19:21                                 ` Robert Jarzmik
@ 2018-01-03  7:40                                     ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-03  7:40 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

On Tue, 02 Jan 2018 20:21:09 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> > I think the ECC issue you faced was related to pages being written
> > *and* empty. If this guess is right, the board should boot fine with
> > these changes.
> >
> > Otherwise, please add the DEBUG define as before in both the core
> > and the driver and do not hesitate to add another dump_stack()
> > where it crashes (if applicable).  
> 
> The problem looks still the same :
> [    3.560163] Bad block table not found for chip 0

Mmmmh ok.

Can you please add this patch:
http://code.bulix.org/61at9p-254626

Thanks,
Miquèl


> 
> Cheers.
> 
> --
> Robert
> 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-03  7:40                                     ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-03  7:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 02 Jan 2018 20:21:09 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> > I think the ECC issue you faced was related to pages being written
> > *and* empty. If this guess is right, the board should boot fine with
> > these changes.
> >
> > Otherwise, please add the DEBUG define as before in both the core
> > and the driver and do not hesitate to add another dump_stack()
> > where it crashes (if applicable).  
> 
> The problem looks still the same :
> [    3.560163] Bad block table not found for chip 0

Mmmmh ok.

Can you please add this patch:
http://code.bulix.org/61at9p-254626

Thanks,
Miqu?l


> 
> Cheers.
> 
> --
> Robert
> 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-03  7:40                                     ` Miquel RAYNAL
@ 2018-01-03 19:58                                       ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2018-01-03 19:58 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

> On Tue, 02 Jan 2018 20:21:09 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>
>> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
>> 
>> > I think the ECC issue you faced was related to pages being written
>> > *and* empty. If this guess is right, the board should boot fine with
>> > these changes.
>> >
>> > Otherwise, please add the DEBUG define as before in both the core
>> > and the driver and do not hesitate to add another dump_stack()
>> > where it crashes (if applicable).  
>> 
>> The problem looks still the same :
>> [    3.560163] Bad block table not found for chip 0
>
> Mmmmh ok.
>
> Can you please add this patch:
> http://code.bulix.org/61at9p-254626

Well, it looks a bit better, see attached log in [1].
Now the BBT is detected ...
[    3.310841] Bad block table found at page 131008, version 0x01
...
[    3.354944] Bad block table found at page 130944, version 0x01

But all blocks are considered bad ... as if the bit logic was inverted for the
meaning of "bad" or "good" block, see :
[    3.379825] nand_read_bbt: bad block at 0x000000000000

Cheers.

--
Robert

[1] Dmesg
---8>---
netconsole: port not set
netconsole: registered as netconsole-1
smc91c111 smc91c1110: chip is revision= 9, version= 2
mdio_bus: miibus0: probed
eth0: got preset MAC address: 00:0e:0c:a7:26:f7
nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0xba (ST Micro NAND 256MiB 1,8V 16-bit), 256MiB, page size: 2048, OOB size: 64
mrvl_nand mrvl_nand0: ECC strength 1, ECC step size 512
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
malloc space: 0x83700000 -> 0x83efffff (size 8 MiB)
running /env/bin/init...
magicvar: No such file or directory
magicvar: No such file or directory
magicvar: No such file or directory

Hit any key to stop autoboot:  3\b\b 2\b\b 1\b\b 0
booting net
netconsole: netconsole initialized with 255.255.255.255:6662
eth0: 100Mbps full duplex link detected
DHCP client bound to address 192.168.1.232
netconsole: netconsole initialized with 255.255.255.255:6662
could not open /mnt/tftp/none-linux-zylonite: No such file or directory
Booting net failed: No such file or directory
booting net failed: No such file or directory
boot: No such file or directory
.[1;32mbarebox@.[1;36mZylonite:/.[0m global linux.bootargs.debug=earlycon
.[1;32mbarebox@.[1;36mZylonite:/.[0m bootm /mnt/tftp/zImage_jenkins

Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00044-gb6124ba (jenkins@belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #825 PREEMPT Wed Jan 3 20:06:17 CET 2018
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4225K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04289e8   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000068] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000267] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002138] Console: colour dummy device 80x30
[    0.002297] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081017] pid_max: default: 32768 minimum: 301
[    0.081857] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081957] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085169] CPU: Testing write buffer coherency: ok
[    0.088982] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089941] Hierarchical SRCU implementation.
[    0.102960] devtmpfs: initialized
[    0.113840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.113980] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116305] NET: Registered protocol family 16
[    0.119116] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.388612] Advanced Linux Sound Architecture Driver Initialized.
[    0.392974] clocksource: Switched to clocksource oscr0
[    0.551626] NET: Registered protocol family 2
[    0.557926] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.558151] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.558332] TCP: Hash tables configured (established 1024 bind 1024)
[    0.558869] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.559048] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560201] NET: Registered protocol family 1
[    0.562229] RPC: Registered named UNIX socket transport module.
[    0.562327] RPC: Registered udp transport module.
[    0.562381] RPC: Registered tcp transport module.
[    0.562439] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.500715] Initialise system trusted keyrings
[    2.502868] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.507406] NFS: Registering the id_resolver key type
[    2.507634] Key type id_resolver registered
[    2.507695] Key type id_legacy registered
[    2.514199] Key type asymmetric registered
[    2.514303] Asymmetric key parser 'x509' registered
[    2.514462] io scheduler noop registered
[    2.514527] io scheduler deadline registered
[    2.514921] io scheduler cfq registered (default)
[    2.514992] io scheduler mq-deadline registered
[    2.515054] io scheduler kyber registered
[    2.572587] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.578330] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.053207] console [ttyS0] enabled
[    3.059557] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.072069] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.088037] nand: executing subop:
[    3.091533] nand:     ->CMD      [0xff]
[    3.098135] nand:     ->WAITRDY  [max 250 ms]
[    3.102636] marvell-nfc pxa3xx-nand: 
[    3.102636] NDCR:  0x90079fff
[    3.102636] NDCB0: 0x00a000ff
[    3.102636] NDCB1: 0x00000000
[    3.102636] NDCB2: 0x00000000
[    3.102636] NDCB3: 0x00000000
[    3.121629] nand: executing subop:
[    3.125459] nand:     ->CMD      [0x90]
[    3.129362] nand:     ->ADDR     [1 cyc: 00]
[    3.134355] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.139366] marvell-nfc pxa3xx-nand: 
[    3.139366] NDCR:  0x90079fff
[    3.139366] NDCB0: 0x00610090
[    3.139366] NDCB1: 0x00000000
[    3.139366] NDCB2: 0x00000000
[    3.139366] NDCB3: 0x00000000
[    3.158242] nand: executing subop:
[    3.161713] nand:     ->CMD      [0x90]
[    3.165930] nand:     ->ADDR     [1 cyc: 00]
[    3.170250] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.175405] marvell-nfc pxa3xx-nand: 
[    3.175405] NDCR:  0x90079fff
[    3.175405] NDCB0: 0x00610090
[    3.175405] NDCB1: 0x00000000
[    3.175405] NDCB2: 0x00000000
[    3.175405] NDCB3: 0x00000000
[    3.194083] nand: executing subop:
[    3.197532] nand:     ->CMD      [0x90]
[    3.201406] nand:     ->ADDR     [1 cyc: 20]
[    3.205851] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.210832] marvell-nfc pxa3xx-nand: 
[    3.210832] NDCR:  0x90079fff
[    3.210832] NDCB0: 0x00610090
[    3.210832] NDCB1: 0x00000020
[    3.210832] NDCB2: 0x00000000
[    3.210832] NDCB3: 0x00000000
[    3.229453] nand: executing subop:
[    3.232899] nand:     ->CMD      [0x90]
[    3.236930] nand:     ->ADDR     [1 cyc: 40]
[    3.241232] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.246335] marvell-nfc pxa3xx-nand: 
[    3.246335] NDCR:  0x90079fff
[    3.246335] NDCB0: 0x00610090
[    3.246335] NDCB1: 0x00000040
[    3.246335] NDCB2: 0x00000000
[    3.246335] NDCB3: 0x00000000
[    3.264978] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.271354] nand: ST Micro NAND 256MiB 1,8V 16-bit
[    3.276316] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.284055] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
[    3.291595] marvell-nfc pxa3xx-nand: 
[    3.291595] NDCR:  0xdd079fff
[    3.291595] NDCB0: 0x000d3000
[    3.291595] NDCB1: 0xffc00000
[    3.291595] NDCB2: 0x00000001
[    3.291595] NDCB3: 0x00000000
[    3.310841] Bad block table found at page 131008, version 0x01
[    3.316993] marvell-nfc pxa3xx-nand: 
[    3.316993] NDCR:  0xdd079fff
[    3.316993] NDCB0: 0x000d3000
[    3.316993] NDCB1: 0xffc00000
[    3.316993] NDCB2: 0x00000001
[    3.316993] NDCB3: 0x00000000
[    3.336013] marvell-nfc pxa3xx-nand: 
[    3.336013] NDCR:  0xdd079fff
[    3.336013] NDCB0: 0x000d3000
[    3.336013] NDCB1: 0xff800000
[    3.336013] NDCB2: 0x00000001
[    3.336013] NDCB3: 0x00000000
[    3.354944] Bad block table found at page 130944, version 0x01
[    3.360915] marvell-nfc pxa3xx-nand: 
[    3.360915] NDCR:  0xdd079fff
[    3.360915] NDCB0: 0x000d3000
[    3.360915] NDCB1: 0xffc00000
[    3.360915] NDCB2: 0x00000001
[    3.360915] NDCB3: 0x00000000
[    3.379825] nand_read_bbt: bad block at 0x000000000000
[    3.385158] nand_read_bbt: bad block at 0x000000040000
[    3.390320] nand_read_bbt: bad block at 0x000000060000
[    3.395587] nand_read_bbt: bad block at 0x000000080000
[    3.400743] nand_read_bbt: bad block at 0x0000000a0000
[    3.406009] nand_read_bbt: bad block at 0x0000000c0000
[    3.411169] nand_read_bbt: bad block at 0x0000000e0000
[    3.416434] nand_read_bbt: bad block at 0x000000100000
[    3.421593] nand_read_bbt: bad block at 0x000000140000
[    3.426859] nand_read_bbt: bad block at 0x000000160000
[    3.432018] nand_read_bbt: bad block at 0x000000180000
[    3.437283] nand_read_bbt: bad block at 0x0000001a0000
[    3.442442] nand_read_bbt: bad block at 0x0000001c0000
[    3.447707] nand_read_bbt: bad block at 0x0000001e0000
[    3.452867] nand_read_bbt: bad block at 0x000000200000
[    3.458133] nand_read_bbt: bad block at 0x000000220000
[    3.463404] nand_read_bbt: bad block at 0x000000240000
[    3.468564] nand_read_bbt: bad block at 0x000000260000
[    3.473830] nand_read_bbt: bad block at 0x000000280000
[    3.478990] nand_read_bbt: bad block at 0x0000002a0000
[    3.484253] nand_read_bbt: bad block at 0x0000002c0000
[    3.489414] nand_read_bbt: bad block at 0x0000002e0000
[    3.494680] nand_read_bbt: bad block at 0x000000300000
[    3.499838] nand_read_bbt: bad block at 0x000000320000
[    3.505104] nand_read_bbt: bad block at 0x000000340000
[    3.510262] nand_read_bbt: bad block at 0x000000360000
[    3.515529] nand_read_bbt: bad block at 0x000000380000
[    3.520687] nand_read_bbt: bad block at 0x0000003a0000
[    3.525955] nand_read_bbt: bad block at 0x0000003c0000
[    3.531121] nand_read_bbt: bad block at 0x0000003e0000
[    3.536386] nand_read_bbt: bad block at 0x000000400000
[    3.541544] nand_read_bbt: bad block at 0x000000420000
[    3.546811] nand_read_bbt: bad block at 0x000000440000
[    3.551970] nand_read_bbt: bad block at 0x000000460000
[    3.557234] nand_read_bbt: bad block at 0x000000480000
[    3.562394] nand_read_bbt: bad block at 0x0000004a0000
[    3.567659] nand_read_bbt: bad block at 0x0000004c0000
[    3.572819] nand_read_bbt: bad block at 0x0000004e0000
[    3.578087] nand_read_bbt: bad block at 0x000000500000
[    3.583367] nand_read_bbt: bad block at 0x000000520000
[    3.588524] nand_read_bbt: bad block at 0x000000540000
[    3.593788] nand_read_bbt: bad block at 0x000000560000
[    3.598951] nand_read_bbt: bad block at 0x000000580000
[    3.604213] nand_read_bbt: bad block at 0x0000005a0000
[    3.609373] nand_read_bbt: bad block at 0x0000005c0000
[    3.614639] nand_read_bbt: bad block at 0x0000005e0000
[    3.619799] nand_read_bbt: bad block at 0x000000600000
[    3.625064] nand_read_bbt: bad block at 0x000000620000
[    3.630224] nand_read_bbt: bad block at 0x000000640000
[    3.635488] nand_read_bbt: bad block at 0x000000660000
[    3.640648] nand_read_bbt: bad block at 0x000000680000
[    3.645914] nand_read_bbt: bad block at 0x0000006a0000
[    3.651071] nand_read_bbt: bad block at 0x0000006c0000
[    3.656337] nand_read_bbt: bad block at 0x0000006e0000
[    3.661497] nand_read_bbt: bad block at 0x000000700000
[    3.666774] nand_read_bbt: bad block at 0x000000d40000
[    3.671939] nand_read_bbt: bad block at 0x000000d60000
[    3.677206] nand_read_bbt: bad block at 0x000000d80000
[    3.682373] nand_read_bbt: bad block at 0x000000da0000
[    3.687638] nand_read_bbt: bad block at 0x000000dc0000
[    3.692796] nand_read_bbt: bad block at 0x000000de0000
[    3.698063] nand_read_bbt: bad block at 0x000000e00000
[    3.703334] nand_read_bbt: bad block at 0x000000e20000
[    3.708494] nand_read_bbt: bad block at 0x000000e40000
[    3.713759] nand_read_bbt: bad block at 0x000000e60000
[    3.718919] nand_read_bbt: bad block at 0x000000e80000
[    3.724183] nand_read_bbt: bad block at 0x000000ea0000
[    3.729343] nand_read_bbt: bad block at 0x000000ec0000
[    3.734608] nand_read_bbt: bad block at 0x000000ee0000
[    3.739769] nand_read_bbt: bad block at 0x000000f00000
[    3.745033] nand_read_bbt: bad block at 0x000000f20000
[    3.750192] nand_read_bbt: bad block at 0x000000f40000
[    3.755459] nand_read_bbt: bad block at 0x000000f60000
[    3.760617] nand_read_bbt: bad block at 0x000000f80000
[    3.765882] nand_read_bbt: bad block at 0x000000fa0000
[    3.771041] nand_read_bbt: bad block at 0x000000fc0000
[    3.776306] nand_read_bbt: bad block at 0x000000fe0000
[    3.781467] nand_read_bbt: bad block at 0x000001000000
[    3.786731] nand_read_bbt: bad block at 0x000001020000
[    3.791891] nand_read_bbt: bad block at 0x000001040000
[    3.797156] nand_read_bbt: bad block at 0x000001060000
[    3.802317] nand_read_bbt: bad block at 0x000001080000
[    3.807582] nand_read_bbt: bad block at 0x0000010a0000
[    3.812741] nand_read_bbt: bad block at 0x0000010c0000
[    3.818005] nand_read_bbt: bad block at 0x0000010e0000
[    3.823280] nand_read_bbt: bad block at 0x000001100000
[    3.828438] nand_read_bbt: bad block at 0x000001120000
[    3.833702] nand_read_bbt: bad block at 0x000001140000
[    3.838862] nand_read_bbt: bad block at 0x000001160000
[    3.844129] nand_read_bbt: bad block at 0x000001180000
[    3.849294] nand_read_bbt: bad block at 0x000001660000
[    3.854562] nand_read_bbt: bad block at 0x000001680000
[    3.859719] nand_read_bbt: bad block at 0x0000016a0000
[    3.864986] nand_read_bbt: bad block at 0x0000016c0000
[    3.870143] nand_read_bbt: bad block at 0x0000016e0000
[    3.875409] nand_read_bbt: bad block at 0x000001700000
[    3.880569] nand_read_bbt: bad block at 0x000001720000
[    3.885836] nand_read_bbt: bad block at 0x000001740000
[    3.890994] nand_read_bbt: bad block at 0x000001760000
[    3.896260] nand_read_bbt: bad block at 0x000001780000
[    3.901417] nand_read_bbt: bad block at 0x0000017a0000
[    3.906683] nand_read_bbt: bad block at 0x0000017c0000
[    3.911843] nand_read_bbt: bad block at 0x0000017e0000
[    3.917108] nand_read_bbt: bad block at 0x000001800000
[    3.922267] nand_read_bbt: bad block at 0x000001820000
[    3.927534] nand_read_bbt: bad block at 0x000001840000
[    3.932691] nand_read_bbt: bad block at 0x000001860000
[    3.937957] nand_read_bbt: bad block at 0x000001880000
[    3.943230] nand_read_bbt: bad block at 0x0000018a0000
[    3.948390] nand_read_bbt: bad block at 0x0000018c0000
[    3.953654] nand_read_bbt: bad block at 0x0000018e0000
[    3.958815] nand_read_bbt: bad block at 0x000001900000
[    3.964101] nand_read_bbt: bad block at 0x000001920000
[    3.969264] nand_read_bbt: bad block at 0x000001940000
[    3.974531] nand_read_bbt: bad block at 0x000001960000
[    3.979690] nand_read_bbt: bad block at 0x000001980000
[    3.984952] nand_read_bbt: bad block at 0x0000019a0000
[    3.990114] nand_read_bbt: bad block at 0x0000019c0000
[    3.995381] nand_read_bbt: bad block at 0x0000019e0000
[    4.000539] nand_read_bbt: bad block at 0x000001a00000
[    4.005804] nand_read_bbt: bad block at 0x000001a20000
[    4.010964] nand_read_bbt: bad block at 0x000001a40000
[    4.016236] nand_read_bbt: bad block at 0x000001a60000
[    4.021398] nand_read_bbt: bad block at 0x000001a80000
[    4.026664] nand_read_bbt: bad block at 0x000001aa0000
[    4.031822] nand_read_bbt: bad block at 0x000001ac0000
[    4.037086] nand_read_bbt: bad block at 0x000001ae0000
[    4.042247] nand_read_bbt: bad block at 0x000001b00000
[    4.047512] nand_read_bbt: bad block at 0x000001b20000
[    4.052672] nand_read_bbt: bad block at 0x000001b40000
[    4.057935] nand_read_bbt: bad block at 0x000001b60000
[    4.063211] nand_read_bbt: bad block at 0x000001b80000
[    4.068377] nand_read_bbt: bad block at 0x000001ba0000
[    4.073643] nand_read_bbt: bad block at 0x000001bc0000
[    4.078801] nand_read_bbt: bad block at 0x000001be0000
[    4.084068] nand_read_bbt: bad block at 0x000001c00000
[    4.089235] nand_read_bbt: bad block at 0x000001c20000
[    4.094836] nand_read_bbt: bad block at 0x000001c40000
[    4.100012] nand_read_bbt: bad block at 0x000001c60000
[    4.105327] nand_read_bbt: bad block at 0x000001c80000
[    4.110488] nand_read_bbt: bad block at 0x000001ca0000
[    4.115755] nand_read_bbt: bad block at 0x000001cc0000
[    4.120923] nand_read_bbt: bad block at 0x000001ce0000
[    4.126186] nand_read_bbt: bad block at 0x000001d00000
[    4.131347] nand_read_bbt: bad block at 0x000001d20000
[    4.136610] nand_read_bbt: bad block at 0x000001d40000
[    4.141770] nand_read_bbt: bad block at 0x000001d60000
[    4.147038] nand_read_bbt: bad block at 0x000001d80000
[    4.152204] nand_read_bbt: bad block at 0x000001da0000
[    4.157470] nand_read_bbt: bad block at 0x000001dc0000
[    4.162627] nand_read_bbt: bad block at 0x000001de0000
[    4.167894] nand_read_bbt: bad block at 0x000001e00000
[    4.173167] nand_read_bbt: bad block at 0x000001e20000
[    4.178325] nand_read_bbt: bad block at 0x000001e40000
[    4.183591] nand_read_bbt: bad block at 0x000001e60000
[    4.188752] nand_read_bbt: bad block at 0x000001e80000
[    4.194015] nand_read_bbt: bad block at 0x000001ea0000
[    4.199175] nand_read_bbt: bad block at 0x000001ec0000
[    4.204441] nand_read_bbt: bad block at 0x000001ee0000
[    4.209601] nand_read_bbt: bad block at 0x000001f00000
[    4.214865] nand_read_bbt: bad block at 0x000001f20000
[    4.220024] nand_read_bbt: bad block at 0x000001f40000
[    4.225290] nand_read_bbt: bad block at 0x000001f60000
[    4.230450] nand_read_bbt: bad block at 0x000001f80000
[    4.235713] nand_read_bbt: bad block at 0x000001fa0000
[    4.240874] nand_read_bbt: bad block at 0x000001fc0000
[    4.246138] nand_read_bbt: bad block at 0x000001fe0000
[    4.251299] nand_read_bbt: bad block at 0x000002000000
[    4.256564] nand_read_bbt: bad block at 0x000002020000
[    4.261723] nand_read_bbt: bad block at 0x000002040000
[    4.266988] nand_read_bbt: bad block at 0x000002060000
[    4.272148] nand_read_bbt: bad block at 0x000002080000
[    4.277412] nand_read_bbt: bad block at 0x0000020a0000
[    4.282572] nand_read_bbt: bad block at 0x0000020c0000
[    4.287837] nand_read_bbt: bad block at 0x0000020e0000
[    4.293111] nand_read_bbt: bad block at 0x000002100000
[    4.298278] nand_read_bbt: bad block at 0x000002120000
[    4.303545] nand_read_bbt: bad block at 0x000002140000
[    4.308703] nand_read_bbt: bad block at 0x000002160000
[    4.313967] nand_read_bbt: bad block at 0x000002180000
[    4.319128] nand_read_bbt: bad block at 0x0000021a0000
[    4.324391] nand_read_bbt: bad block at 0x0000021c0000
[    4.329552] nand_read_bbt: bad block at 0x0000021e0000
[    4.334818] nand_read_bbt: bad block at 0x000002200000
[    4.339977] nand_read_bbt: bad block at 0x000002220000
[    4.345242] nand_read_bbt: bad block at 0x000002240000
[    4.350402] nand_read_bbt: bad block at 0x000002260000
[    4.355667] nand_read_bbt: bad block at 0x000002280000
[    4.360826] nand_read_bbt: bad block at 0x0000022a0000
[    4.366091] nand_read_bbt: bad block at 0x0000022c0000
[    4.371251] nand_read_bbt: bad block at 0x0000022e0000
[    4.376515] nand_read_bbt: bad block at 0x000002300000
[    4.381674] nand_read_bbt: bad block at 0x000002320000
[    4.386941] nand_read_bbt: bad block at 0x000002340000
[    4.392101] nand_read_bbt: bad block at 0x000002360000
[    4.397365] nand_read_bbt: bad block at 0x000002380000
[    4.402523] nand_read_bbt: bad block at 0x0000023a0000
[    4.407789] nand_read_bbt: bad block at 0x0000023c0000
[    4.413062] nand_read_bbt: bad block at 0x0000023e0000
[    4.418223] nand_read_bbt: bad block at 0x000002400000
[    4.423485] nand_read_bbt: bad block at 0x000002420000
[    4.428646] nand_read_bbt: bad block at 0x000002440000
[    4.433907] nand_read_bbt: bad block at 0x000002460000
[    4.439071] nand_read_bbt: bad block at 0x000002480000
[    4.444336] nand_read_bbt: bad block at 0x0000024a0000
[    4.449496] nand_read_bbt: bad block at 0x0000024c0000
[    4.454759] nand_read_bbt: bad block at 0x0000024e0000
[    4.459922] nand_read_bbt: bad block at 0x000002500000
[    4.465187] nand_read_bbt: bad block at 0x000002520000
[    4.470344] nand_read_bbt: bad block at 0x000002540000
[    4.475609] nand_read_bbt: bad block at 0x000002560000
[    4.480771] nand_read_bbt: bad block at 0x000002580000
[    4.486033] nand_read_bbt: bad block at 0x0000025a0000
[    4.491194] nand_read_bbt: bad block at 0x0000025c0000
[    4.496458] nand_read_bbt: bad block at 0x0000025e0000
[    4.501619] nand_read_bbt: bad block at 0x000002600000
[    4.506882] nand_read_bbt: bad block at 0x000002620000
[    4.512042] nand_read_bbt: bad block at 0x000002640000
[    4.517307] nand_read_bbt: bad block at 0x000002660000
[    4.522468] nand_read_bbt: bad block at 0x000002680000
[    4.527732] nand_read_bbt: bad block at 0x0000026a0000
[    4.532891] nand_read_bbt: bad block at 0x0000026c0000
[    4.538162] nand_read_bbt: bad block at 0x0000026e0000
[    4.543428] nand_read_bbt: bad block at 0x000002700000
[    4.548590] nand_read_bbt: bad block at 0x000002720000
[    4.553857] nand_read_bbt: bad block at 0x000002740000
[    4.559014] nand_read_bbt: bad block at 0x000002760000
[    4.564280] nand_read_bbt: bad block at 0x000002780000
[    4.569438] nand_read_bbt: bad block at 0x0000027a0000
[    4.574705] nand_read_bbt: bad block at 0x0000027c0000
[    4.579863] nand_read_bbt: bad block at 0x0000027e0000
[    4.585129] nand_read_bbt: bad block at 0x000002800000
[    4.590288] nand_read_bbt: bad block at 0x000002820000
[    4.595558] nand_read_bbt: bad block at 0x000002a40000
[    4.600720] nand_read_bbt: bad block at 0x000002a60000
[    4.606012] nand_read_bbt: bad block at 0x000002bc0000
[    4.611182] nand_read_bbt: bad block at 0x000002c40000
[    4.616449] nand_read_bbt: bad block at 0x000002c60000
[    4.621614] nand_read_bbt: bad block at 0x000002c80000
[    4.626878] nand_read_bbt: bad block at 0x000002ca0000
[    4.632036] nand_read_bbt: bad block at 0x000002cc0000
[    4.637301] nand_read_bbt: bad block at 0x000002ce0000
[    4.642463] nand_read_bbt: bad block at 0x000002d00000
[    4.647726] nand_read_bbt: bad block at 0x000002d20000
[    4.652888] nand_read_bbt: bad block at 0x000002d40000
[    4.658167] nand_read_bbt: bad block at 0x000002d60000
[    4.663433] nand_read_bbt: bad block at 0x000002d80000
[    4.668593] nand_read_bbt: bad block at 0x000002da0000
[    4.673859] nand_read_bbt: bad block at 0x000002dc0000
[    4.679017] nand_read_bbt: bad block at 0x000002de0000
[    4.684282] nand_read_bbt: bad block at 0x000002e00000
[    4.689442] nand_read_bbt: bad block at 0x000002e20000
[    4.694707] nand_read_bbt: bad block at 0x000002e40000
[    4.699867] nand_read_bbt: bad block at 0x000002e60000
[    4.705133] nand_read_bbt: bad block at 0x000002e80000
[    4.710292] nand_read_bbt: bad block at 0x000002ea0000
[    4.715558] nand_read_bbt: bad block at 0x000002ec0000
[    4.720716] nand_read_bbt: bad block at 0x000002ee0000
[    4.725983] nand_read_bbt: bad block at 0x000002f00000
[    4.731141] nand_read_bbt: bad block at 0x000002f20000
[    4.736406] nand_read_bbt: bad block at 0x000002f40000
[    4.741566] nand_read_bbt: bad block at 0x000002f60000
[    4.746830] nand_read_bbt: bad block at 0x000002f80000
[    4.751991] nand_read_bbt: bad block at 0x000002fa0000
[    4.757255] nand_read_bbt: bad block at 0x000002fc0000
[    4.762415] nand_read_bbt: bad block at 0x000002fe0000
[    4.767681] nand_read_bbt: bad block at 0x000003000000
[    4.772839] nand_read_bbt: bad block at 0x000003020000
[    4.778104] nand_read_bbt: bad block at 0x000003040000
[    4.783378] nand_read_bbt: bad block at 0x000003060000
[    4.788536] nand_read_bbt: bad block at 0x000003080000
[    4.793802] nand_read_bbt: bad block at 0x0000030a0000
[    4.798962] nand_read_bbt: bad block at 0x0000030c0000
[    4.804224] nand_read_bbt: bad block at 0x0000030e0000
[    4.809387] nand_read_bbt: bad block at 0x000003100000
[    4.814650] nand_read_bbt: bad block at 0x000003120000
[    4.819809] nand_read_bbt: bad block at 0x000003140000
[    4.825075] nand_read_bbt: bad block at 0x000003160000
[    4.830235] nand_read_bbt: bad block at 0x000003180000
[    4.835499] nand_read_bbt: bad block at 0x0000031a0000
[    4.840661] nand_read_bbt: bad block at 0x0000031c0000
[    4.845924] nand_read_bbt: bad block at 0x0000031e0000
[    4.851085] nand_read_bbt: bad block at 0x000003200000
[    4.856350] nand_read_bbt: bad block at 0x000003220000
[    4.861510] nand_read_bbt: bad block at 0x000003240000
[    4.867593] 6 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    4.874441] Creating 6 MTD partitions on "pxa3xx_nand-0":
[    4.879899] 0x000000000000-0x000000020000 : "TIMH"
[    4.888233] 0x000000020000-0x000000040000 : "OBMI"
[    4.897663] 0x000000040000-0x000000100000 : "barebox"
[    4.907444] 0x000000100000-0x000000140000 : "barebox-env"
[    4.917447] 0x000000140000-0x000000d40000 : "kernel"
[    4.927958] 0x000000d40000-0x000003260000 : "root"
[    4.941349] smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
[    4.994377] smc91x smc91x.0 eth0: SMC91C11xFD (rev 2) at c4867300 IRQ 214
[    5.001216]  DMA c386d710 [nowait]
[    5.005891] smc91x smc91x.0 eth0: Ethernet addr: 00:0e:0c:a7:26:f7
[    5.018621] input: pxa27x-keypad as /devices/platform/pxa27x-keypad/input/input0
[    5.028503] pxa-rtc pxa-rtc: failed to find rtc clock source
[    5.036108] rtc rtc0: invalid alarm value: 0-1-1 0:0:0
[    5.043390] pxa-rtc pxa-rtc: rtc core: registered pxa-rtc as rtc0
[    5.054574] sa1100_wdt: SA1100/PXA2xx Watchdog Timer: timer margin 60 sec
[    5.106260] soc-audio soc-audio: ASoC: machine Zylonite should use snd_soc_register_card()
[    5.130166] wm9713-codec wm9713-codec: Control not supported for path Mic B Source -> [MPB] -> Mic B Pre Amp
[    5.141137] wm9713-codec wm9713-codec: ASoC: no dapm match for Mic B Source --> MPB --> Mic B Pre Amp
[    5.150835] wm9713-codec wm9713-codec: ASoC: Failed to add route Mic B Source -> MPB -> Mic B Pre Amp
[    5.164361] soc-audio soc-audio: wm9713-hifi <-> pxa2xx-ac97 mapping ok
[    5.172711] soc-audio soc-audio: wm9713-aux <-> pxa2xx-ac97-aux mapping ok
[    5.183377] soc-audio soc-audio: wm9713-voice <-> pxa-ssp-dai.2 mapping ok
[    5.191817] wm9713-codec wm9713-codec: ASoC: mux Sidetone Mux has no paths
[    5.232193] NET: Registered protocol family 17
[    5.238583] Key type dns_resolver registered
[    5.244879] XScale iWMMXt coprocessor detected.
[    5.257208] Loading compiled-in X.509 certificates
[    5.277841] ubi0: attaching mtd5
[    5.282062] marvell-nfc pxa3xx-nand: 
[    5.282062] NDCR:  0xdd079fff
[    5.282062] NDCB0: 0x000d3000
[    5.282062] NDCB1: 0x23400000
[    5.282062] NDCB2: 0x00000000
[    5.282062] NDCB3: 0x00000000
[    5.302767] marvell-nfc pxa3xx-nand: 
[    5.302767] NDCR:  0xdd079fff
[    5.302767] NDCB0: 0x000d3000
[    5.302767] NDCB1: 0x23410000
[    5.302767] NDCB2: 0x00000000
[    5.302767] NDCB3: 0x00000000
[    5.322069] marvell-nfc pxa3xx-nand: 
[    5.322069] NDCR:  0x9d079fff
[    5.322069] NDCB0: 0x000d3000
[    5.322069] NDCB1: 0x23410000
[    5.322069] NDCB2: 0x00000000
[    5.322069] NDCB3: 0x00000000
[    5.341520] marvell-nfc pxa3xx-nand: 
[    5.341520] NDCR:  0xdd079fff
[    5.341520] NDCB0: 0x000d3000
[    5.341520] NDCB1: 0x23800000
[    5.341520] NDCB2: 0x00000000
[    5.341520] NDCB3: 0x00000000
[    5.361115] marvell-nfc pxa3xx-nand: 
[    5.361115] NDCR:  0xdd079fff
[    5.361115] NDCB0: 0x000d3000
[    5.361115] NDCB1: 0x23810000
[    5.361115] NDCB2: 0x00000000
[    5.361115] NDCB3: 0x00000000
[    5.380361] marvell-nfc pxa3xx-nand: 
[    5.380361] NDCR:  0x9d079fff
[    5.380361] NDCB0: 0x000d3000
[    5.380361] NDCB1: 0x23810000
[    5.380361] NDCB2: 0x00000000
[    5.380361] NDCB3: 0x00000000
[    5.399699] marvell-nfc pxa3xx-nand: 
[    5.399699] NDCR:  0xdd079fff
[    5.399699] NDCB0: 0x000d3000
[    5.399699] NDCB1: 0x23c00000
[    5.399699] NDCB2: 0x00000000
[    5.399699] NDCB3: 0x00000000
[    5.418790] marvell-nfc pxa3xx-nand: 
[    5.418790] NDCR:  0xdd079fff
[    5.418790] NDCB0: 0x000d3000
[    5.418790] NDCB1: 0x23c10000
[    5.418790] NDCB2: 0x00000000
[    5.418790] NDCB3: 0x00000000
[    5.437771] marvell-nfc pxa3xx-nand: 
[    5.437771] NDCR:  0x9d079fff
[    5.437771] NDCB0: 0x000d3000
[    5.437771] NDCB1: 0x23c10000
[    5.437771] NDCB2: 0x00000000
[    5.437771] NDCB3: 0x00000000
[    5.456876] marvell-nfc pxa3xx-nand: 
[    5.456876] NDCR:  0xdd079fff
[    5.456876] NDCB0: 0x000d3000
[    5.456876] NDCB1: 0x24000000
[    5.456876] NDCB2: 0x00000000
[    5.456876] NDCB3: 0x00000000
[    5.475940] marvell-nfc pxa3xx-nand: 
[    5.475940] NDCR:  0xdd079fff
[    5.475940] NDCB0: 0x000d3000
[    5.475940] NDCB1: 0x24010000
[    5.475940] NDCB2: 0x00000000
[    5.475940] NDCB3: 0x00000000
[    5.494922] marvell-nfc pxa3xx-nand: 
[    5.494922] NDCR:  0x9d079fff
[    5.494922] NDCB0: 0x000d3000
[    5.494922] NDCB1: 0x24010000
[    5.494922] NDCB2: 0x00000000
[    5.494922] NDCB3: 0x00000000
[    5.514028] marvell-nfc pxa3xx-nand: 
[    5.514028] NDCR:  0xdd079fff
[    5.514028] NDCB0: 0x000d3000
[    5.514028] NDCB1: 0x24400000
[    5.514028] NDCB2: 0x00000000
[    5.514028] NDCB3: 0x00000000
[    5.533183] marvell-nfc pxa3xx-nand: 
[    5.533183] NDCR:  0xdd079fff
[    5.533183] NDCB0: 0x000d3000
[    5.533183] NDCB1: 0x24410000
[    5.533183] NDCB2: 0x00000000
[    5.533183] NDCB3: 0x00000000
[    5.552166] marvell-nfc pxa3xx-nand: 
[    5.552166] NDCR:  0x9d079fff
[    5.552166] NDCB0: 0x000d3000
[    5.552166] NDCB1: 0x24410000
[    5.552166] NDCB2: 0x00000000
[    5.552166] NDCB3: 0x00000000
[    5.571273] marvell-nfc pxa3xx-nand: 
[    5.571273] NDCR:  0xdd079fff
[    5.571273] NDCB0: 0x000d3000
[    5.571273] NDCB1: 0x24800000
[    5.571273] NDCB2: 0x00000000
[    5.571273] NDCB3: 0x00000000
[    5.590337] marvell-nfc pxa3xx-nand: 
[    5.590337] NDCR:  0xdd079fff
[    5.590337] NDCB0: 0x000d3000
[    5.590337] NDCB1: 0x24810000
[    5.590337] NDCB2: 0x00000000
[    5.590337] NDCB3: 0x00000000
[    5.609318] marvell-nfc pxa3xx-nand: 
[    5.609318] NDCR:  0x9d079fff
[    5.609318] NDCB0: 0x000d3000
[    5.609318] NDCB1: 0x24810000
[    5.609318] NDCB2: 0x00000000
[    5.609318] NDCB3: 0x00000000
[    5.628426] marvell-nfc pxa3xx-nand: 
[    5.628426] NDCR:  0xdd079fff
[    5.628426] NDCB0: 0x000d3000
[    5.628426] NDCB1: 0x24c00000
[    5.628426] NDCB2: 0x00000000
[    5.628426] NDCB3: 0x00000000
[    5.647489] marvell-nfc pxa3xx-nand: 
[    5.647489] NDCR:  0xdd079fff
[    5.647489] NDCB0: 0x000d3000
[    5.647489] NDCB1: 0x24c10000
[    5.647489] NDCB2: 0x00000000
[    5.647489] NDCB3: 0x00000000
[    5.666475] marvell-nfc pxa3xx-nand: 
[    5.666475] NDCR:  0x9d079fff
[    5.666475] NDCB0: 0x000d3000
[    5.666475] NDCB1: 0x24c10000
[    5.666475] NDCB2: 0x00000000
[    5.666475] NDCB3: 0x00000000
[    5.685575] marvell-nfc pxa3xx-nand: 
[    5.685575] NDCR:  0xdd079fff
[    5.685575] NDCB0: 0x000d3000
[    5.685575] NDCB1: 0x25000000
[    5.685575] NDCB2: 0x00000000
[    5.685575] NDCB3: 0x00000000
[    5.704632] marvell-nfc pxa3xx-nand: 
[    5.704632] NDCR:  0xdd079fff
[    5.704632] NDCB0: 0x000d3000
[    5.704632] NDCB1: 0x25010000
[    5.704632] NDCB2: 0x00000000
[    5.704632] NDCB3: 0x00000000
[    5.723609] marvell-nfc pxa3xx-nand: 
[    5.723609] NDCR:  0x9d079fff
[    5.723609] NDCB0: 0x000d3000
[    5.723609] NDCB1: 0x25010000
[    5.723609] NDCB2: 0x00000000
[    5.723609] NDCB3: 0x00000000
[    5.742713] marvell-nfc pxa3xx-nand: 
[    5.742713] NDCR:  0xdd079fff
[    5.742713] NDCB0: 0x000d3000
[    5.742713] NDCB1: 0x25400000
[    5.742713] NDCB2: 0x00000000
[    5.742713] NDCB3: 0x00000000
[    5.761769] marvell-nfc pxa3xx-nand: 
[    5.761769] NDCR:  0xdd079fff
[    5.761769] NDCB0: 0x000d3000
[    5.761769] NDCB1: 0x25410000
[    5.761769] NDCB2: 0x00000000
[    5.761769] NDCB3: 0x00000000
[    5.780750] marvell-nfc pxa3xx-nand: 
[    5.780750] NDCR:  0x9d079fff
[    5.780750] NDCB0: 0x000d3000
[    5.780750] NDCB1: 0x25410000
[    5.780750] NDCB2: 0x00000000
[    5.780750] NDCB3: 0x00000000
[    5.799855] marvell-nfc pxa3xx-nand: 
[    5.799855] NDCR:  0xdd079fff
[    5.799855] NDCB0: 0x000d3000
[    5.799855] NDCB1: 0x25800000
[    5.799855] NDCB2: 0x00000000
[    5.799855] NDCB3: 0x00000000
[    5.818918] marvell-nfc pxa3xx-nand: 
[    5.818918] NDCR:  0xdd079fff
[    5.818918] NDCB0: 0x000d3000
[    5.818918] NDCB1: 0x25810000
[    5.818918] NDCB2: 0x00000000
[    5.818918] NDCB3: 0x00000000
[    5.837903] marvell-nfc pxa3xx-nand: 
[    5.837903] NDCR:  0x9d079fff
[    5.837903] NDCB0: 0x000d3000
[    5.837903] NDCB1: 0x25810000
[    5.837903] NDCB2: 0x00000000
[    5.837903] NDCB3: 0x00000000
[    5.857009] marvell-nfc pxa3xx-nand: 
[    5.857009] NDCR:  0xdd079fff
[    5.857009] NDCB0: 0x000d3000
[    5.857009] NDCB1: 0x25c00000
[    5.857009] NDCB2: 0x00000000
[    5.857009] NDCB3: 0x00000000
[    5.876071] marvell-nfc pxa3xx-nand: 
[    5.876071] NDCR:  0xdd079fff
[    5.876071] NDCB0: 0x000d3000
[    5.876071] NDCB1: 0x25c10000
[    5.876071] NDCB2: 0x00000000
[    5.876071] NDCB3: 0x00000000
[    5.895047] marvell-nfc pxa3xx-nand: 
[    5.895047] NDCR:  0x9d079fff
[    5.895047] NDCB0: 0x000d3000
[    5.895047] NDCB1: 0x25c10000
[    5.895047] NDCB2: 0x00000000
[    5.895047] NDCB3: 0x00000000
[    5.914152] marvell-nfc pxa3xx-nand: 
[    5.914152] NDCR:  0xdd079fff
[    5.914152] NDCB0: 0x000d3000
[    5.914152] NDCB1: 0x26000000
[    5.914152] NDCB2: 0x00000000
[    5.914152] NDCB3: 0x00000000
[    5.933285] marvell-nfc pxa3xx-nand: 
[    5.933285] NDCR:  0xdd079fff
[    5.933285] NDCB0: 0x000d3000
[    5.933285] NDCB1: 0x26010000
[    5.933285] NDCB2: 0x00000000
[    5.933285] NDCB3: 0x00000000
[    5.952247] marvell-nfc pxa3xx-nand: 
[    5.952247] NDCR:  0x9d079fff
[    5.952247] NDCB0: 0x000d3000
[    5.952247] NDCB1: 0x26010000
[    5.952247] NDCB2: 0x00000000
[    5.952247] NDCB3: 0x00000000
[    5.971354] marvell-nfc pxa3xx-nand: 
[    5.971354] NDCR:  0xdd079fff
[    5.971354] NDCB0: 0x000d3000
[    5.971354] NDCB1: 0x26400000
[    5.971354] NDCB2: 0x00000000
[    5.971354] NDCB3: 0x00000000
[    5.990415] marvell-nfc pxa3xx-nand: 
[    5.990415] NDCR:  0xdd079fff
[    5.990415] NDCB0: 0x000d3000
[    5.990415] NDCB1: 0x26410000
[    5.990415] NDCB2: 0x00000000
[    5.990415] NDCB3: 0x00000000
[    6.009391] marvell-nfc pxa3xx-nand: 
[    6.009391] NDCR:  0x9d079fff
[    6.009391] NDCB0: 0x000d3000
[    6.009391] NDCB1: 0x26410000
[    6.009391] NDCB2: 0x00000000
[    6.009391] NDCB3: 0x00000000
[    6.028510] marvell-nfc pxa3xx-nand: 
[    6.028510] NDCR:  0xdd079fff
[    6.028510] NDCB0: 0x000d3000
[    6.028510] NDCB1: 0x26800000
[    6.028510] NDCB2: 0x00000000
[    6.028510] NDCB3: 0x00000000
[    6.047572] marvell-nfc pxa3xx-nand: 
[    6.047572] NDCR:  0xdd079fff
[    6.047572] NDCB0: 0x000d3000
[    6.047572] NDCB1: 0x26810000
[    6.047572] NDCB2: 0x00000000
[    6.047572] NDCB3: 0x00000000
[    6.066553] marvell-nfc pxa3xx-nand: 
[    6.066553] NDCR:  0x9d079fff
[    6.066553] NDCB0: 0x000d3000
[    6.066553] NDCB1: 0x26810000
[    6.066553] NDCB2: 0x00000000
[    6.066553] NDCB3: 0x00000000
[    6.085662] marvell-nfc pxa3xx-nand: 
[    6.085662] NDCR:  0xdd079fff
[    6.085662] NDCB0: 0x000d3000
[    6.085662] NDCB1: 0x26c00000
[    6.085662] NDCB2: 0x00000000
[    6.085662] NDCB3: 0x00000000
[    6.105275] marvell-nfc pxa3xx-nand: 
[    6.105275] NDCR:  0xdd079fff
[    6.105275] NDCB0: 0x000d3000
[    6.105275] NDCB1: 0x26c10000
[    6.105275] NDCB2: 0x00000000
[    6.105275] NDCB3: 0x00000000
[    6.124291] marvell-nfc pxa3xx-nand: 
[    6.124291] NDCR:  0x9d079fff
[    6.124291] NDCB0: 0x000d3000
[    6.124291] NDCB1: 0x26c10000
[    6.124291] NDCB2: 0x00000000
[    6.124291] NDCB3: 0x00000000
[    6.143431] marvell-nfc pxa3xx-nand: 
[    6.143431] NDCR:  0xdd079fff
[    6.143431] NDCB0: 0x000d3000
[    6.143431] NDCB1: 0x27000000
[    6.143431] NDCB2: 0x00000000
[    6.143431] NDCB3: 0x00000000
[    6.162492] marvell-nfc pxa3xx-nand: 
[    6.162492] NDCR:  0xdd079fff
[    6.162492] NDCB0: 0x000d3000
[    6.162492] NDCB1: 0x27010000
[    6.162492] NDCB2: 0x00000000
[    6.162492] NDCB3: 0x00000000
[    6.181482] marvell-nfc pxa3xx-nand: 
[    6.181482] NDCR:  0x9d079fff
[    6.181482] NDCB0: 0x000d3000
[    6.181482] NDCB1: 0x27010000
[    6.181482] NDCB2: 0x00000000
[    6.181482] NDCB3: 0x00000000
[    6.200594] marvell-nfc pxa3xx-nand: 
[    6.200594] NDCR:  0xdd079fff
[    6.200594] NDCB0: 0x000d3000
[    6.200594] NDCB1: 0x27400000
[    6.200594] NDCB2: 0x00000000
[    6.200594] NDCB3: 0x00000000
[    6.219651] marvell-nfc pxa3xx-nand: 
[    6.219651] NDCR:  0xdd079fff
[    6.219651] NDCB0: 0x000d3000
[    6.219651] NDCB1: 0x27410000
[    6.219651] NDCB2: 0x00000000
[    6.219651] NDCB3: 0x00000000
[    6.238628] marvell-nfc pxa3xx-nand: 
[    6.238628] NDCR:  0x9d079fff
[    6.238628] NDCB0: 0x000d3000
[    6.238628] NDCB1: 0x27410000
[    6.238628] NDCB2: 0x00000000
[    6.238628] NDCB3: 0x00000000
[    6.257763] marvell-nfc pxa3xx-nand: 
[    6.257763] NDCR:  0xdd079fff
[    6.257763] NDCB0: 0x000d3000
[    6.257763] NDCB1: 0x27800000
[    6.257763] NDCB2: 0x00000000
[    6.257763] NDCB3: 0x00000000
[    6.276826] marvell-nfc pxa3xx-nand: 
[    6.276826] NDCR:  0xdd079fff
[    6.276826] NDCB0: 0x000d3000
[    6.276826] NDCB1: 0x27810000
[    6.276826] NDCB2: 0x00000000
[    6.276826] NDCB3: 0x00000000
[    6.295914] marvell-nfc pxa3xx-nand: 
[    6.295914] NDCR:  0xdd079fff
[    6.295914] NDCB0: 0x000d3000
[    6.295914] NDCB1: 0x27c00000
[    6.295914] NDCB2: 0x00000000
[    6.295914] NDCB3: 0x00000000
[    6.314978] marvell-nfc pxa3xx-nand: 
[    6.314978] NDCR:  0xdd079fff
[    6.314978] NDCB0: 0x000d3000
[    6.314978] NDCB1: 0x27c10000
[    6.314978] NDCB2: 0x00000000
[    6.314978] NDCB3: 0x00000000
[    6.333957] marvell-nfc pxa3xx-nand: 
[    6.333957] NDCR:  0x9d079fff
[    6.333957] NDCB0: 0x000d3000
[    6.333957] NDCB1: 0x27c10000
[    6.333957] NDCB2: 0x00000000
[    6.333957] NDCB3: 0x00000000
[    6.353164] marvell-nfc pxa3xx-nand: 
[    6.353164] NDCR:  0xdd079fff
[    6.353164] NDCB0: 0x000d3000
[    6.353164] NDCB1: 0x28000000
[    6.353164] NDCB2: 0x00000000
[    6.353164] NDCB3: 0x00000000
[    6.372184] marvell-nfc pxa3xx-nand: 
[    6.372184] NDCR:  0xdd079fff
[    6.372184] NDCB0: 0x000d3000
[    6.372184] NDCB1: 0x28010000
[    6.372184] NDCB2: 0x00000000
[    6.372184] NDCB3: 0x00000000
[    6.391168] marvell-nfc pxa3xx-nand: 
[    6.391168] NDCR:  0x9d079fff
[    6.391168] NDCB0: 0x000d3000
[    6.391168] NDCB1: 0x28010000
[    6.391168] NDCB2: 0x00000000
[    6.391168] NDCB3: 0x00000000
[    6.410268] marvell-nfc pxa3xx-nand: 
[    6.410268] NDCR:  0xdd079fff
[    6.410268] NDCB0: 0x000d3000
[    6.410268] NDCB1: 0x28400000
[    6.410268] NDCB2: 0x00000000
[    6.410268] NDCB3: 0x00000000
[    6.429335] marvell-nfc pxa3xx-nand: 
[    6.429335] NDCR:  0xdd079fff
[    6.429335] NDCB0: 0x000d3000
[    6.429335] NDCB1: 0x28410000
[    6.429335] NDCB2: 0x00000000
[    6.429335] NDCB3: 0x00000000
[    6.448408] marvell-nfc pxa3xx-nand: 
[    6.448408] NDCR:  0xdd079fff
[    6.448408] NDCB0: 0x000d3000
[    6.448408] NDCB1: 0x28800000
[    6.448408] NDCB2: 0x00000000
[    6.448408] NDCB3: 0x00000000
[    6.467471] marvell-nfc pxa3xx-nand: 
[    6.467471] NDCR:  0xdd079fff
[    6.467471] NDCB0: 0x000d3000
[    6.467471] NDCB1: 0x28810000
[    6.467471] NDCB2: 0x00000000
[    6.467471] NDCB3: 0x00000000
[    6.486456] marvell-nfc pxa3xx-nand: 
[    6.486456] NDCR:  0x9d079fff
[    6.486456] NDCB0: 0x000d3000
[    6.486456] NDCB1: 0x28810000
[    6.486456] NDCB2: 0x00000000
[    6.486456] NDCB3: 0x00000000
[    6.505554] marvell-nfc pxa3xx-nand: 
[    6.505554] NDCR:  0xdd079fff
[    6.505554] NDCB0: 0x000d3000
[    6.505554] NDCB1: 0x28c00000
[    6.505554] NDCB2: 0x00000000
[    6.505554] NDCB3: 0x00000000
[    6.524610] marvell-nfc pxa3xx-nand: 
[    6.524610] NDCR:  0xdd079fff
[    6.524610] NDCB0: 0x000d3000
[    6.524610] NDCB1: 0x28c10000
[    6.524610] NDCB2: 0x00000000
[    6.524610] NDCB3: 0x00000000
[    6.543589] marvell-nfc pxa3xx-nand: 
[    6.543589] NDCR:  0x9d079fff
[    6.543589] NDCB0: 0x000d3000
[    6.543589] NDCB1: 0x28c10000
[    6.543589] NDCB2: 0x00000000
[    6.543589] NDCB3: 0x00000000
[    6.562688] marvell-nfc pxa3xx-nand: 
[    6.562688] NDCR:  0xdd079fff
[    6.562688] NDCB0: 0x000d3000
[    6.562688] NDCB1: 0x29000000
[    6.562688] NDCB2: 0x00000000
[    6.562688] NDCB3: 0x00000000
[    6.581750] marvell-nfc pxa3xx-nand: 
[    6.581750] NDCR:  0xdd079fff
[    6.581750] NDCB0: 0x000d3000
[    6.581750] NDCB1: 0x29010000
[    6.581750] NDCB2: 0x00000000
[    6.581750] NDCB3: 0x00000000
[    6.600735] marvell-nfc pxa3xx-nand: 
[    6.600735] NDCR:  0x9d079fff
[    6.600735] NDCB0: 0x000d3000
[    6.600735] NDCB1: 0x29010000
[    6.600735] NDCB2: 0x00000000
[    6.600735] NDCB3: 0x00000000
[    6.619839] marvell-nfc pxa3xx-nand: 
[    6.619839] NDCR:  0xdd079fff
[    6.619839] NDCB0: 0x000d3000
[    6.619839] NDCB1: 0x29400000
[    6.619839] NDCB2: 0x00000000
[    6.619839] NDCB3: 0x00000000
[    6.638902] marvell-nfc pxa3xx-nand: 
[    6.638902] NDCR:  0xdd079fff
[    6.638902] NDCB0: 0x000d3000
[    6.638902] NDCB1: 0x29410000
[    6.638902] NDCB2: 0x00000000
[    6.638902] NDCB3: 0x00000000
[    6.657879] marvell-nfc pxa3xx-nand: 
[    6.657879] NDCR:  0x9d079fff
[    6.657879] NDCB0: 0x000d3000
[    6.657879] NDCB1: 0x29410000
[    6.657879] NDCB2: 0x00000000
[    6.657879] NDCB3: 0x00000000
[    6.676983] marvell-nfc pxa3xx-nand: 
[    6.676983] NDCR:  0xdd079fff
[    6.676983] NDCB0: 0x000d3000
[    6.676983] NDCB1: 0x29800000
[    6.676983] NDCB2: 0x00000000
[    6.676983] NDCB3: 0x00000000
[    6.696050] marvell-nfc pxa3xx-nand: 
[    6.696050] NDCR:  0xdd079fff
[    6.696050] NDCB0: 0x000d3000
[    6.696050] NDCB1: 0x29810000
[    6.696050] NDCB2: 0x00000000
[    6.696050] NDCB3: 0x00000000
[    6.715033] marvell-nfc pxa3xx-nand: 
[    6.715033] NDCR:  0x9d079fff
[    6.715033] NDCB0: 0x000d3000
[    6.715033] NDCB1: 0x29810000
[    6.715033] NDCB2: 0x00000000
[    6.715033] NDCB3: 0x00000000
[    6.734141] marvell-nfc pxa3xx-nand: 
[    6.734141] NDCR:  0xdd079fff
[    6.734141] NDCB0: 0x000d3000
[    6.734141] NDCB1: 0x29c00000
[    6.734141] NDCB2: 0x00000000
[    6.734141] NDCB3: 0x00000000
[    6.753291] marvell-nfc pxa3xx-nand: 
[    6.753291] NDCR:  0xdd079fff
[    6.753291] NDCB0: 0x000d3000
[    6.753291] NDCB1: 0x29c10000
[    6.753291] NDCB2: 0x00000000
[    6.753291] NDCB3: 0x00000000
[    6.772264] marvell-nfc pxa3xx-nand: 
[    6.772264] NDCR:  0x9d079fff
[    6.772264] NDCB0: 0x000d3000
[    6.772264] NDCB1: 0x29c10000
[    6.772264] NDCB2: 0x00000000
[    6.772264] NDCB3: 0x00000000
[    6.791367] marvell-nfc pxa3xx-nand: 
[    6.791367] NDCR:  0xdd079fff
[    6.791367] NDCB0: 0x000d3000
[    6.791367] NDCB1: 0x2a000000
[    6.791367] NDCB2: 0x00000000
[    6.791367] NDCB3: 0x00000000
[    6.810425] marvell-nfc pxa3xx-nand: 
[    6.810425] NDCR:  0xdd079fff
[    6.810425] NDCB0: 0x000d3000
[    6.810425] NDCB1: 0x2a010000
[    6.810425] NDCB2: 0x00000000
[    6.810425] NDCB3: 0x00000000
[    6.829403] marvell-nfc pxa3xx-nand: 
[    6.829403] NDCR:  0x9d079fff
[    6.829403] NDCB0: 0x000d3000
[    6.829403] NDCB1: 0x2a010000
[    6.829403] NDCB2: 0x00000000
[    6.829403] NDCB3: 0x00000000
[    6.848512] marvell-nfc pxa3xx-nand: 
[    6.848512] NDCR:  0xdd079fff
[    6.848512] NDCB0: 0x000d3000
[    6.848512] NDCB1: 0x2a400000
[    6.848512] NDCB2: 0x00000000
[    6.848512] NDCB3: 0x00000000
[    6.867573] marvell-nfc pxa3xx-nand: 
[    6.867573] NDCR:  0xdd079fff
[    6.867573] NDCB0: 0x000d3000
[    6.867573] NDCB1: 0x2a410000
[    6.867573] NDCB2: 0x00000000
[    6.867573] NDCB3: 0x00000000
[    6.886550] marvell-nfc pxa3xx-nand: 
[    6.886550] NDCR:  0x9d079fff
[    6.886550] NDCB0: 0x000d3000
[    6.886550] NDCB1: 0x2a410000
[    6.886550] NDCB2: 0x00000000
[    6.886550] NDCB3: 0x00000000
[    6.905653] marvell-nfc pxa3xx-nand: 
[    6.905653] NDCR:  0xdd079fff
[    6.905653] NDCB0: 0x000d3000
[    6.905653] NDCB1: 0x2a800000
[    6.905653] NDCB2: 0x00000000
[    6.905653] NDCB3: 0x00000000
[    6.924720] marvell-nfc pxa3xx-nand: 
[    6.924720] NDCR:  0xdd079fff
[    6.924720] NDCB0: 0x000d3000
[    6.924720] NDCB1: 0x2a810000
[    6.924720] NDCB2: 0x00000000
[    6.924720] NDCB3: 0x00000000
[    6.943704] marvell-nfc pxa3xx-nand: 
[    6.943704] NDCR:  0x9d079fff
[    6.943704] NDCB0: 0x000d3000
[    6.943704] NDCB1: 0x2a810000
[    6.943704] NDCB2: 0x00000000
[    6.943704] NDCB3: 0x00000000
[    6.962806] marvell-nfc pxa3xx-nand: 
[    6.962806] NDCR:  0xdd079fff
[    6.962806] NDCB0: 0x000d3000
[    6.962806] NDCB1: 0x2ac00000
[    6.962806] NDCB2: 0x00000000
[    6.962806] NDCB3: 0x00000000
[    6.981868] marvell-nfc pxa3xx-nand: 
[    6.981868] NDCR:  0xdd079fff
[    6.981868] NDCB0: 0x000d3000
[    6.981868] NDCB1: 0x2ac10000
[    6.981868] NDCB2: 0x00000000
[    6.981868] NDCB3: 0x00000000
[    7.000848] marvell-nfc pxa3xx-nand: 
[    7.000848] NDCR:  0x9d079fff
[    7.000848] NDCB0: 0x000d3000
[    7.000848] NDCB1: 0x2ac10000
[    7.000848] NDCB2: 0x00000000
[    7.000848] NDCB3: 0x00000000
[    7.019966] marvell-nfc pxa3xx-nand: 
[    7.019966] NDCR:  0xdd079fff
[    7.019966] NDCB0: 0x000d3000
[    7.019966] NDCB1: 0x2b000000
[    7.019966] NDCB2: 0x00000000
[    7.019966] NDCB3: 0x00000000
[    7.039028] marvell-nfc pxa3xx-nand: 
[    7.039028] NDCR:  0xdd079fff
[    7.039028] NDCB0: 0x000d3000
[    7.039028] NDCB1: 0x2b010000
[    7.039028] NDCB2: 0x00000000
[    7.039028] NDCB3: 0x00000000
[    7.058002] marvell-nfc pxa3xx-nand: 
[    7.058002] NDCR:  0x9d079fff
[    7.058002] NDCB0: 0x000d3000
[    7.058002] NDCB1: 0x2b010000
[    7.058002] NDCB2: 0x00000000
[    7.058002] NDCB3: 0x00000000
[    7.077109] marvell-nfc pxa3xx-nand: 
[    7.077109] NDCR:  0xdd079fff
[    7.077109] NDCB0: 0x000d3000
[    7.077109] NDCB1: 0x2b400000
[    7.077109] NDCB2: 0x00000000
[    7.077109] NDCB3: 0x00000000
[    7.096173] marvell-nfc pxa3xx-nand: 
[    7.096173] NDCR:  0xdd079fff
[    7.096173] NDCB0: 0x000d3000
[    7.096173] NDCB1: 0x2b410000
[    7.096173] NDCB2: 0x00000000
[    7.096173] NDCB3: 0x00000000
[    7.115153] marvell-nfc pxa3xx-nand: 
[    7.115153] NDCR:  0x9d079fff
[    7.115153] NDCB0: 0x000d3000
[    7.115153] NDCB1: 0x2b410000
[    7.115153] NDCB2: 0x00000000
[    7.115153] NDCB3: 0x00000000
[    7.134255] marvell-nfc pxa3xx-nand: 
[    7.134255] NDCR:  0xdd079fff
[    7.134255] NDCB0: 0x000d3000
[    7.134255] NDCB1: 0x2b800000
[    7.134255] NDCB2: 0x00000000
[    7.134255] NDCB3: 0x00000000
[    7.153307] marvell-nfc pxa3xx-nand: 
[    7.153307] NDCR:  0xdd079fff
[    7.153307] NDCB0: 0x000d3000
[    7.153307] NDCB1: 0x2b810000
[    7.153307] NDCB2: 0x00000000
[    7.153307] NDCB3: 0x00000000
[    7.172279] marvell-nfc pxa3xx-nand: 
[    7.172279] NDCR:  0x9d079fff
[    7.172279] NDCB0: 0x000d3000
[    7.172279] NDCB1: 0x2b810000
[    7.172279] NDCB2: 0x00000000
[    7.172279] NDCB3: 0x00000000
[    7.191385] marvell-nfc pxa3xx-nand: 
[    7.191385] NDCR:  0xdd079fff
[    7.191385] NDCB0: 0x000d3000
[    7.191385] NDCB1: 0x2bc00000
[    7.191385] NDCB2: 0x00000000
[    7.191385] NDCB3: 0x00000000
[    7.210447] marvell-nfc pxa3xx-nand: 
[    7.210447] NDCR:  0xdd079fff
[    7.210447] NDCB0: 0x000d3000
[    7.210447] NDCB1: 0x2bc10000
[    7.210447] NDCB2: 0x00000000
[    7.210447] NDCB3: 0x00000000
[    7.229426] marvell-nfc pxa3xx-nand: 
[    7.229426] NDCR:  0x9d079fff
[    7.229426] NDCB0: 0x000d3000
[    7.229426] NDCB1: 0x2bc10000
[    7.229426] NDCB2: 0x00000000
[    7.229426] NDCB3: 0x00000000
[    7.248529] marvell-nfc pxa3xx-nand: 
[    7.248529] NDCR:  0xdd079fff
[    7.248529] NDCB0: 0x000d3000
[    7.248529] NDCB1: 0x2c000000
[    7.248529] NDCB2: 0x00000000
[    7.248529] NDCB3: 0x00000000
[    7.267597] marvell-nfc pxa3xx-nand: 
[    7.267597] NDCR:  0xdd079fff
[    7.267597] NDCB0: 0x000d3000
[    7.267597] NDCB1: 0x2c010000
[    7.267597] NDCB2: 0x00000000
[    7.267597] NDCB3: 0x00000000
[    7.286579] marvell-nfc pxa3xx-nand: 
[    7.286579] NDCR:  0x9d079fff
[    7.286579] NDCB0: 0x000d3000
[    7.286579] NDCB1: 0x2c010000
[    7.286579] NDCB2: 0x00000000
[    7.286579] NDCB3: 0x00000000
[    7.305683] marvell-nfc pxa3xx-nand: 
[    7.305683] NDCR:  0xdd079fff
[    7.305683] NDCB0: 0x000d3000
[    7.305683] NDCB1: 0x2c400000
[    7.305683] NDCB2: 0x00000000
[    7.305683] NDCB3: 0x00000000
[    7.324747] marvell-nfc pxa3xx-nand: 
[    7.324747] NDCR:  0xdd079fff
[    7.324747] NDCB0: 0x000d3000
[    7.324747] NDCB1: 0x2c410000
[    7.324747] NDCB2: 0x00000000
[    7.324747] NDCB3: 0x00000000
[    7.343743] marvell-nfc pxa3xx-nand: 
[    7.343743] NDCR:  0x9d079fff
[    7.343743] NDCB0: 0x000d3000
[    7.343743] NDCB1: 0x2c410000
[    7.343743] NDCB2: 0x00000000
[    7.343743] NDCB3: 0x00000000
[    7.362843] marvell-nfc pxa3xx-nand: 
[    7.362843] NDCR:  0xdd079fff
[    7.362843] NDCB0: 0x000d3000
[    7.362843] NDCB1: 0x2c800000
[    7.362843] NDCB2: 0x00000000
[    7.362843] NDCB3: 0x00000000
[    7.381905] marvell-nfc pxa3xx-nand: 
[    7.381905] NDCR:  0xdd079fff
[    7.381905] NDCB0: 0x000d3000
[    7.381905] NDCB1: 0x2c810000
[    7.381905] NDCB2: 0x00000000
[    7.381905] NDCB3: 0x00000000
[    7.400887] marvell-nfc pxa3xx-nand: 
[    7.400887] NDCR:  0x9d079fff
[    7.400887] NDCB0: 0x000d3000
[    7.400887] NDCB1: 0x2c810000
[    7.400887] NDCB2: 0x00000000
[    7.400887] NDCB3: 0x00000000
[    7.420884] marvell-nfc pxa3xx-nand: 
[    7.420884] NDCR:  0xdd079fff
[    7.420884] NDCB0: 0x000d3000
[    7.420884] NDCB1: 0x50800000
[    7.420884] NDCB2: 0x00000000
[    7.420884] NDCB3: 0x00000000
[    7.439944] marvell-nfc pxa3xx-nand: 
[    7.439944] NDCR:  0xdd079fff
[    7.439944] NDCB0: 0x000d3000
[    7.439944] NDCB1: 0x50810000
[    7.439944] NDCB2: 0x00000000
[    7.439944] NDCB3: 0x00000000
[    7.458920] marvell-nfc pxa3xx-nand: 
[    7.458920] NDCR:  0x9d079fff
[    7.458920] NDCB0: 0x000d3000
[    7.458920] NDCB1: 0x50810000
[    7.458920] NDCB2: 0x00000000
[    7.458920] NDCB3: 0x00000000
[    7.478025] marvell-nfc pxa3xx-nand: 
[    7.478025] NDCR:  0xdd079fff
[    7.478025] NDCB0: 0x000d3000
[    7.478025] NDCB1: 0x50c00000
[    7.478025] NDCB2: 0x00000000
[    7.478025] NDCB3: 0x00000000
[    7.497089] marvell-nfc pxa3xx-nand: 
[    7.497089] NDCR:  0xdd079fff
[    7.497089] NDCB0: 0x000d3000
[    7.497089] NDCB1: 0x50c10000
[    7.497089] NDCB2: 0x00000000
[    7.497089] NDCB3: 0x00000000
[    7.516067] marvell-nfc pxa3xx-nand: 
[    7.516067] NDCR:  0x9d079fff
[    7.516067] NDCB0: 0x000d3000
[    7.516067] NDCB1: 0x50c10000
[    7.516067] NDCB2: 0x00000000
[    7.516067] NDCB3: 0x00000000
[    7.535172] marvell-nfc pxa3xx-nand: 
[    7.535172] NDCR:  0xdd079fff
[    7.535172] NDCB0: 0x000d3000
[    7.535172] NDCB1: 0x51000000
[    7.535172] NDCB2: 0x00000000
[    7.535172] NDCB3: 0x00000000
[    7.554233] marvell-nfc pxa3xx-nand: 
[    7.554233] NDCR:  0xdd079fff
[    7.554233] NDCB0: 0x000d3000
[    7.554233] NDCB1: 0x51010000
[    7.554233] NDCB2: 0x00000000
[    7.554233] NDCB3: 0x00000000
[    7.573238] marvell-nfc pxa3xx-nand: 
[    7.573238] NDCR:  0x9d079fff
[    7.573238] NDCB0: 0x000d3000
[    7.573238] NDCB1: 0x51010000
[    7.573238] NDCB2: 0x00000000
[    7.573238] NDCB3: 0x00000000
[    7.592334] marvell-nfc pxa3xx-nand: 
[    7.592334] NDCR:  0xdd079fff
[    7.592334] NDCB0: 0x000d3000
[    7.592334] NDCB1: 0x51400000
[    7.592334] NDCB2: 0x00000000
[    7.592334] NDCB3: 0x00000000
[    7.611401] marvell-nfc pxa3xx-nand: 
[    7.611401] NDCR:  0xdd079fff
[    7.611401] NDCB0: 0x000d3000
[    7.611401] NDCB1: 0x51410000
[    7.611401] NDCB2: 0x00000000
[    7.611401] NDCB3: 0x00000000
[    7.630384] marvell-nfc pxa3xx-nand: 
[    7.630384] NDCR:  0x9d079fff
[    7.630384] NDCB0: 0x000d3000
[    7.630384] NDCB1: 0x51410000
[    7.630384] NDCB2: 0x00000000
[    7.630384] NDCB3: 0x00000000
[    7.649492] marvell-nfc pxa3xx-nand: 
[    7.649492] NDCR:  0xdd079fff
[    7.649492] NDCB0: 0x000d3000
[    7.649492] NDCB1: 0x51800000
[    7.649492] NDCB2: 0x00000000
[    7.649492] NDCB3: 0x00000000
[    7.668554] marvell-nfc pxa3xx-nand: 
[    7.668554] NDCR:  0xdd079fff
[    7.668554] NDCB0: 0x000d3000
[    7.668554] NDCB1: 0x51810000
[    7.668554] NDCB2: 0x00000000
[    7.668554] NDCB3: 0x00000000
[    7.687527] marvell-nfc pxa3xx-nand: 
[    7.687527] NDCR:  0x9d079fff
[    7.687527] NDCB0: 0x000d3000
[    7.687527] NDCB1: 0x51810000
[    7.687527] NDCB2: 0x00000000
[    7.687527] NDCB3: 0x00000000
[    7.706637] marvell-nfc pxa3xx-nand: 
[    7.706637] NDCR:  0xdd079fff
[    7.706637] NDCB0: 0x000d3000
[    7.706637] NDCB1: 0x51c00000
[    7.706637] NDCB2: 0x00000000
[    7.706637] NDCB3: 0x00000000
[    7.725697] marvell-nfc pxa3xx-nand: 
[    7.725697] NDCR:  0xdd079fff
[    7.725697] NDCB0: 0x000d3000
[    7.725697] NDCB1: 0x51c10000
[    7.725697] NDCB2: 0x00000000
[    7.725697] NDCB3: 0x00000000
[    7.744674] marvell-nfc pxa3xx-nand: 
[    7.744674] NDCR:  0x9d079fff
[    7.744674] NDCB0: 0x000d3000
[    7.744674] NDCB1: 0x51c10000
[    7.744674] NDCB2: 0x00000000
[    7.744674] NDCB3: 0x00000000
[    7.763781] marvell-nfc pxa3xx-nand: 
[    7.763781] NDCR:  0xdd079fff
[    7.763781] NDCB0: 0x000d3000
[    7.763781] NDCB1: 0x52000000
[    7.763781] NDCB2: 0x00000000
[    7.763781] NDCB3: 0x00000000
[    7.782838] marvell-nfc pxa3xx-nand: 
[    7.782838] NDCR:  0xdd079fff
[    7.782838] NDCB0: 0x000d3000
[    7.782838] NDCB1: 0x52010000
[    7.782838] NDCB2: 0x00000000
[    7.782838] NDCB3: 0x00000000
[    7.801814] marvell-nfc pxa3xx-nand: 
[    7.801814] NDCR:  0x9d079fff
[    7.801814] NDCB0: 0x000d3000
[    7.801814] NDCB1: 0x52010000
[    7.801814] NDCB2: 0x00000000
[    7.801814] NDCB3: 0x00000000
[    7.820919] marvell-nfc pxa3xx-nand: 
[    7.820919] NDCR:  0xdd079fff
[    7.820919] NDCB0: 0x000d3000
[    7.820919] NDCB1: 0x52400000
[    7.820919] NDCB2: 0x00000000
[    7.820919] NDCB3: 0x00000000
[    7.839984] marvell-nfc pxa3xx-nand: 
[    7.839984] NDCR:  0xdd079fff
[    7.839984] NDCB0: 0x000d3000
[    7.839984] NDCB1: 0x52410000
[    7.839984] NDCB2: 0x00000000
[    7.839984] NDCB3: 0x00000000
[    7.858968] marvell-nfc pxa3xx-nand: 
[    7.858968] NDCR:  0x9d079fff
[    7.858968] NDCB0: 0x000d3000
[    7.858968] NDCB1: 0x52410000
[    7.858968] NDCB2: 0x00000000
[    7.858968] NDCB3: 0x00000000
[    7.878070] marvell-nfc pxa3xx-nand: 
[    7.878070] NDCR:  0xdd079fff
[    7.878070] NDCB0: 0x000d3000
[    7.878070] NDCB1: 0x52800000
[    7.878070] NDCB2: 0x00000000
[    7.878070] NDCB3: 0x00000000
[    7.897127] marvell-nfc pxa3xx-nand: 
[    7.897127] NDCR:  0xdd079fff
[    7.897127] NDCB0: 0x000d3000
[    7.897127] NDCB1: 0x52810000
[    7.897127] NDCB2: 0x00000000
[    7.897127] NDCB3: 0x00000000
[    7.916104] marvell-nfc pxa3xx-nand: 
[    7.916104] NDCR:  0x9d079fff
[    7.916104] NDCB0: 0x000d3000
[    7.916104] NDCB1: 0x52810000
[    7.916104] NDCB2: 0x00000000
[    7.916104] NDCB3: 0x00000000
[    7.935231] marvell-nfc pxa3xx-nand: 
[    7.935231] NDCR:  0xdd079fff
[    7.935231] NDCB0: 0x000d3000
[    7.935231] NDCB1: 0x52c00000
[    7.935231] NDCB2: 0x00000000
[    7.935231] NDCB3: 0x00000000
[    7.954292] marvell-nfc pxa3xx-nand: 
[    7.954292] NDCR:  0xdd079fff
[    7.954292] NDCB0: 0x000d3000
[    7.954292] NDCB1: 0x52c10000
[    7.954292] NDCB2: 0x00000000
[    7.954292] NDCB3: 0x00000000
[    7.973328] marvell-nfc pxa3xx-nand: 
[    7.973328] NDCR:  0x9d079fff
[    7.973328] NDCB0: 0x000d3000
[    7.973328] NDCB1: 0x52c10000
[    7.973328] NDCB2: 0x00000000
[    7.973328] NDCB3: 0x00000000
[    7.992424] marvell-nfc pxa3xx-nand: 
[    7.992424] NDCR:  0xdd079fff
[    7.992424] NDCB0: 0x000d3000
[    7.992424] NDCB1: 0x53000000
[    7.992424] NDCB2: 0x00000000
[    7.992424] NDCB3: 0x00000000
[    8.011485] marvell-nfc pxa3xx-nand: 
[    8.011485] NDCR:  0xdd079fff
[    8.011485] NDCB0: 0x000d3000
[    8.011485] NDCB1: 0x53010000
[    8.011485] NDCB2: 0x00000000
[    8.011485] NDCB3: 0x00000000
[    8.030479] marvell-nfc pxa3xx-nand: 
[    8.030479] NDCR:  0x9d079fff
[    8.030479] NDCB0: 0x000d3000
[    8.030479] NDCB1: 0x53010000
[    8.030479] NDCB2: 0x00000000
[    8.030479] NDCB3: 0x00000000
[    8.049579] marvell-nfc pxa3xx-nand: 
[    8.049579] NDCR:  0xdd079fff
[    8.049579] NDCB0: 0x000d3000
[    8.049579] NDCB1: 0x53400000
[    8.049579] NDCB2: 0x00000000
[    8.049579] NDCB3: 0x00000000
[    8.068643] marvell-nfc pxa3xx-nand: 
[    8.068643] NDCR:  0xdd079fff
[    8.068643] NDCB0: 0x000d3000
[    8.068643] NDCB1: 0x53410000
[    8.068643] NDCB2: 0x00000000
[    8.068643] NDCB3: 0x00000000
[    8.087618] marvell-nfc pxa3xx-nand: 
[    8.087618] NDCR:  0x9d079fff
[    8.087618] NDCB0: 0x000d3000
[    8.087618] NDCB1: 0x53410000
[    8.087618] NDCB2: 0x00000000
[    8.087618] NDCB3: 0x00000000
[    8.107355] marvell-nfc pxa3xx-nand: 
[    8.107355] NDCR:  0xdd079fff
[    8.107355] NDCB0: 0x000d3000
[    8.107355] NDCB1: 0x53800000
[    8.107355] NDCB2: 0x00000000
[    8.107355] NDCB3: 0x00000000
[    8.126458] marvell-nfc pxa3xx-nand: 
[    8.126458] NDCR:  0xdd079fff
[    8.126458] NDCB0: 0x000d3000
[    8.126458] NDCB1: 0x53810000
[    8.126458] NDCB2: 0x00000000
[    8.126458] NDCB3: 0x00000000
[    8.145438] marvell-nfc pxa3xx-nand: 
[    8.145438] NDCR:  0x9d079fff
[    8.145438] NDCB0: 0x000d3000
[    8.145438] NDCB1: 0x53810000
[    8.145438] NDCB2: 0x00000000
[    8.145438] NDCB3: 0x00000000
[    8.164543] marvell-nfc pxa3xx-nand: 
[    8.164543] NDCR:  0xdd079fff
[    8.164543] NDCB0: 0x000d3000
[    8.164543] NDCB1: 0x53c00000
[    8.164543] NDCB2: 0x00000000
[    8.164543] NDCB3: 0x00000000
[    8.183607] marvell-nfc pxa3xx-nand: 
[    8.183607] NDCR:  0xdd079fff
[    8.183607] NDCB0: 0x000d3000
[    8.183607] NDCB1: 0x53c10000
[    8.183607] NDCB2: 0x00000000
[    8.183607] NDCB3: 0x00000000
[    8.202574] marvell-nfc pxa3xx-nand: 
[    8.202574] NDCR:  0x9d079fff
[    8.202574] NDCB0: 0x000d3000
[    8.202574] NDCB1: 0x53c10000
[    8.202574] NDCB2: 0x00000000
[    8.202574] NDCB3: 0x00000000
[    8.221680] marvell-nfc pxa3xx-nand: 
[    8.221680] NDCR:  0xdd079fff
[    8.221680] NDCB0: 0x000d3000
[    8.221680] NDCB1: 0x54000000
[    8.221680] NDCB2: 0x00000000
[    8.221680] NDCB3: 0x00000000
[    8.240741] marvell-nfc pxa3xx-nand: 
[    8.240741] NDCR:  0xdd079fff
[    8.240741] NDCB0: 0x000d3000
[    8.240741] NDCB1: 0x54010000
[    8.240741] NDCB2: 0x00000000
[    8.240741] NDCB3: 0x00000000
[    8.259723] marvell-nfc pxa3xx-nand: 
[    8.259723] NDCR:  0x9d079fff
[    8.259723] NDCB0: 0x000d3000
[    8.259723] NDCB1: 0x54010000
[    8.259723] NDCB2: 0x00000000
[    8.259723] NDCB3: 0x00000000
[    8.278825] marvell-nfc pxa3xx-nand: 
[    8.278825] NDCR:  0xdd079fff
[    8.278825] NDCB0: 0x000d3000
[    8.278825] NDCB1: 0x54400000
[    8.278825] NDCB2: 0x00000000
[    8.278825] NDCB3: 0x00000000
[    8.297889] marvell-nfc pxa3xx-nand: 
[    8.297889] NDCR:  0xdd079fff
[    8.297889] NDCB0: 0x000d3000
[    8.297889] NDCB1: 0x54410000
[    8.297889] NDCB2: 0x00000000
[    8.297889] NDCB3: 0x00000000
[    8.316863] marvell-nfc pxa3xx-nand: 
[    8.316863] NDCR:  0x9d079fff
[    8.316863] NDCB0: 0x000d3000
[    8.316863] NDCB1: 0x54410000
[    8.316863] NDCB2: 0x00000000
[    8.316863] NDCB3: 0x00000000
[    8.335976] marvell-nfc pxa3xx-nand: 
[    8.335976] NDCR:  0xdd079fff
[    8.335976] NDCB0: 0x000d3000
[    8.335976] NDCB1: 0x55000000
[    8.335976] NDCB2: 0x00000000
[    8.335976] NDCB3: 0x00000000
[    8.355035] marvell-nfc pxa3xx-nand: 
[    8.355035] NDCR:  0xdd079fff
[    8.355035] NDCB0: 0x000d3000
[    8.355035] NDCB1: 0x55010000
[    8.355035] NDCB2: 0x00000000
[    8.355035] NDCB3: 0x00000000
[    8.374007] marvell-nfc pxa3xx-nand: 
[    8.374007] NDCR:  0x9d079fff
[    8.374007] NDCB0: 0x000d3000
[    8.374007] NDCB1: 0x55010000
[    8.374007] NDCB2: 0x00000000
[    8.374007] NDCB3: 0x00000000
[    8.393202] marvell-nfc pxa3xx-nand: 
[    8.393202] NDCR:  0xdd079fff
[    8.393202] NDCB0: 0x000d3000
[    8.393202] NDCB1: 0x55400000
[    8.393202] NDCB2: 0x00000000
[    8.393202] NDCB3: 0x00000000
[    8.412235] marvell-nfc pxa3xx-nand: 
[    8.412235] NDCR:  0xdd079fff
[    8.412235] NDCB0: 0x000d3000
[    8.412235] NDCB1: 0x55410000
[    8.412235] NDCB2: 0x00000000
[    8.412235] NDCB3: 0x00000000
[    8.431217] marvell-nfc pxa3xx-nand: 
[    8.431217] NDCR:  0x9d079fff
[    8.431217] NDCB0: 0x000d3000
[    8.431217] NDCB1: 0x55410000
[    8.431217] NDCB2: 0x00000000
[    8.431217] NDCB3: 0x00000000
[    8.450325] marvell-nfc pxa3xx-nand: 
[    8.450325] NDCR:  0xdd079fff
[    8.450325] NDCB0: 0x000d3000
[    8.450325] NDCB1: 0x55800000
[    8.450325] NDCB2: 0x00000000
[    8.450325] NDCB3: 0x00000000
[    8.469388] marvell-nfc pxa3xx-nand: 
[    8.469388] NDCR:  0xdd079fff
[    8.469388] NDCB0: 0x000d3000
[    8.469388] NDCB1: 0x55810000
[    8.469388] NDCB2: 0x00000000
[    8.469388] NDCB3: 0x00000000
[    8.488366] marvell-nfc pxa3xx-nand: 
[    8.488366] NDCR:  0x9d079fff
[    8.488366] NDCB0: 0x000d3000
[    8.488366] NDCB1: 0x55810000
[    8.488366] NDCB2: 0x00000000
[    8.488366] NDCB3: 0x00000000
[    8.507471] marvell-nfc pxa3xx-nand: 
[    8.507471] NDCR:  0xdd079fff
[    8.507471] NDCB0: 0x000d3000
[    8.507471] NDCB1: 0x55c00000
[    8.507471] NDCB2: 0x00000000
[    8.507471] NDCB3: 0x00000000
[    8.526556] marvell-nfc pxa3xx-nand: 
[    8.526556] NDCR:  0xdd079fff
[    8.526556] NDCB0: 0x000d3000
[    8.526556] NDCB1: 0x55c10000
[    8.526556] NDCB2: 0x00000000
[    8.526556] NDCB3: 0x00000000
[    8.545537] marvell-nfc pxa3xx-nand: 
[    8.545537] NDCR:  0x9d079fff
[    8.545537] NDCB0: 0x000d3000
[    8.545537] NDCB1: 0x55c10000
[    8.545537] NDCB2: 0x00000000
[    8.545537] NDCB3: 0x00000000
[    8.564641] marvell-nfc pxa3xx-nand: 
[    8.564641] NDCR:  0xdd079fff
[    8.564641] NDCB0: 0x000d3000
[    8.564641] NDCB1: 0x56000000
[    8.564641] NDCB2: 0x00000000
[    8.564641] NDCB3: 0x00000000
[    8.583703] marvell-nfc pxa3xx-nand: 
[    8.583703] NDCR:  0xdd079fff
[    8.583703] NDCB0: 0x000d3000
[    8.583703] NDCB1: 0x56010000
[    8.583703] NDCB2: 0x00000000
[    8.583703] NDCB3: 0x00000000
[    8.602671] marvell-nfc pxa3xx-nand: 
[    8.602671] NDCR:  0x9d079fff
[    8.602671] NDCB0: 0x000d3000
[    8.602671] NDCB1: 0x56010000
[    8.602671] NDCB2: 0x00000000
[    8.602671] NDCB3: 0x00000000
[    8.621771] marvell-nfc pxa3xx-nand: 
[    8.621771] NDCR:  0xdd079fff
[    8.621771] NDCB0: 0x000d3000
[    8.621771] NDCB1: 0x56400000
[    8.621771] NDCB2: 0x00000000
[    8.621771] NDCB3: 0x00000000
[    8.640836] marvell-nfc pxa3xx-nand: 
[    8.640836] NDCR:  0xdd079fff
[    8.640836] NDCB0: 0x000d3000
[    8.640836] NDCB1: 0x56410000
[    8.640836] NDCB2: 0x00000000
[    8.640836] NDCB3: 0x00000000
[    8.659821] marvell-nfc pxa3xx-nand: 
[    8.659821] NDCR:  0x9d079fff
[    8.659821] NDCB0: 0x000d3000
[    8.659821] NDCB1: 0x56410000
[    8.659821] NDCB2: 0x00000000
[    8.659821] NDCB3: 0x00000000
[    8.678923] marvell-nfc pxa3xx-nand: 
[    8.678923] NDCR:  0xdd079fff
[    8.678923] NDCB0: 0x000d3000
[    8.678923] NDCB1: 0x56800000
[    8.678923] NDCB2: 0x00000000
[    8.678923] NDCB3: 0x00000000
[    8.697987] marvell-nfc pxa3xx-nand: 
[    8.697987] NDCR:  0xdd079fff
[    8.697987] NDCB0: 0x000d3000
[    8.697987] NDCB1: 0x56810000
[    8.697987] NDCB2: 0x00000000
[    8.697987] NDCB3: 0x00000000
[    8.716967] marvell-nfc pxa3xx-nand: 
[    8.716967] NDCR:  0x9d079fff
[    8.716967] NDCB0: 0x000d3000
[    8.716967] NDCB1: 0x56810000
[    8.716967] NDCB2: 0x00000000
[    8.716967] NDCB3: 0x00000000
[    8.736068] marvell-nfc pxa3xx-nand: 
[    8.736068] NDCR:  0xdd079fff
[    8.736068] NDCB0: 0x000d3000
[    8.736068] NDCB1: 0x56c00000
[    8.736068] NDCB2: 0x00000000
[    8.736068] NDCB3: 0x00000000
[    8.755122] marvell-nfc pxa3xx-nand: 
[    8.755122] NDCR:  0xdd079fff
[    8.755122] NDCB0: 0x000d3000
[    8.755122] NDCB1: 0x56c10000
[    8.755122] NDCB2: 0x00000000
[    8.755122] NDCB3: 0x00000000
[    8.774101] marvell-nfc pxa3xx-nand: 
[    8.774101] NDCR:  0x9d079fff
[    8.774101] NDCB0: 0x000d3000
[    8.774101] NDCB1: 0x56c10000
[    8.774101] NDCB2: 0x00000000
[    8.774101] NDCB3: 0x00000000
[    8.793417] marvell-nfc pxa3xx-nand: 
[    8.793417] NDCR:  0xdd079fff
[    8.793417] NDCB0: 0x000d3000
[    8.793417] NDCB1: 0x57000000
[    8.793417] NDCB2: 0x00000000
[    8.793417] NDCB3: 0x00000000
[    8.812493] marvell-nfc pxa3xx-nand: 
[    8.812493] NDCR:  0xdd079fff
[    8.812493] NDCB0: 0x000d3000
[    8.812493] NDCB1: 0x57010000
[    8.812493] NDCB2: 0x00000000
[    8.812493] NDCB3: 0x00000000
[    8.831475] marvell-nfc pxa3xx-nand: 
[    8.831475] NDCR:  0x9d079fff
[    8.831475] NDCB0: 0x000d3000
[    8.831475] NDCB1: 0x57010000
[    8.831475] NDCB2: 0x00000000
[    8.831475] NDCB3: 0x00000000
[    8.850578] marvell-nfc pxa3xx-nand: 
[    8.850578] NDCR:  0xdd079fff
[    8.850578] NDCB0: 0x000d3000
[    8.850578] NDCB1: 0x57400000
[    8.850578] NDCB2: 0x00000000
[    8.850578] NDCB3: 0x00000000
[    8.869639] marvell-nfc pxa3xx-nand: 
[    8.869639] NDCR:  0xdd079fff
[    8.869639] NDCB0: 0x000d3000
[    8.869639] NDCB1: 0x57410000
[    8.869639] NDCB2: 0x00000000
[    8.869639] NDCB3: 0x00000000
[    8.888614] marvell-nfc pxa3xx-nand: 
[    8.888614] NDCR:  0x9d079fff
[    8.888614] NDCB0: 0x000d3000
[    8.888614] NDCB1: 0x57410000
[    8.888614] NDCB2: 0x00000000
[    8.888614] NDCB3: 0x00000000
[    8.907721] marvell-nfc pxa3xx-nand: 
[    8.907721] NDCR:  0xdd079fff
[    8.907721] NDCB0: 0x000d3000
[    8.907721] NDCB1: 0x57c00000
[    8.907721] NDCB2: 0x00000000
[    8.907721] NDCB3: 0x00000000
[    8.926778] marvell-nfc pxa3xx-nand: 
[    8.926778] NDCR:  0xdd079fff
[    8.926778] NDCB0: 0x000d3000
[    8.926778] NDCB1: 0x57c10000
[    8.926778] NDCB2: 0x00000000
[    8.926778] NDCB3: 0x00000000
[    8.945755] marvell-nfc pxa3xx-nand: 
[    8.945755] NDCR:  0x9d079fff
[    8.945755] NDCB0: 0x000d3000
[    8.945755] NDCB1: 0x57c10000
[    8.945755] NDCB2: 0x00000000
[    8.945755] NDCB3: 0x00000000
[    8.964856] marvell-nfc pxa3xx-nand: 
[    8.964856] NDCR:  0xdd079fff
[    8.964856] NDCB0: 0x000d3000
[    8.964856] NDCB1: 0x58000000
[    8.964856] NDCB2: 0x00000000
[    8.964856] NDCB3: 0x00000000
[    8.983915] marvell-nfc pxa3xx-nand: 
[    8.983915] NDCR:  0xdd079fff
[    8.983915] NDCB0: 0x000d3000
[    8.983915] NDCB1: 0x58010000
[    8.983915] NDCB2: 0x00000000
[    8.983915] NDCB3: 0x00000000
[    9.002886] marvell-nfc pxa3xx-nand: 
[    9.002886] NDCR:  0x9d079fff
[    9.002886] NDCB0: 0x000d3000
[    9.002886] NDCB1: 0x58010000
[    9.002886] NDCB2: 0x00000000
[    9.002886] NDCB3: 0x00000000
[    9.022075] marvell-nfc pxa3xx-nand: 
[    9.022075] NDCR:  0xdd079fff
[    9.022075] NDCB0: 0x000d3000
[    9.022075] NDCB1: 0x58400000
[    9.022075] NDCB2: 0x00000000
[    9.022075] NDCB3: 0x00000000
[    9.041141] marvell-nfc pxa3xx-nand: 
[    9.041141] NDCR:  0xdd079fff
[    9.041141] NDCB0: 0x000d3000
[    9.041141] NDCB1: 0x58410000
[    9.041141] NDCB2: 0x00000000
[    9.041141] NDCB3: 0x00000000
[    9.060123] marvell-nfc pxa3xx-nand: 
[    9.060123] NDCR:  0x9d079fff
[    9.060123] NDCB0: 0x000d3000
[    9.060123] NDCB1: 0x58410000
[    9.060123] NDCB2: 0x00000000
[    9.060123] NDCB3: 0x00000000
[    9.079435] ubi0: scanning is finished
[    9.083567] ubi0 error: ubi_read_volume_table: the layout volume was not found
[    9.090953] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
[    9.098457] UBI error: cannot attach mtd5
[    9.103950] pxa-rtc pxa-rtc: setting system clock to 2000-01-01 00:00:34 UTC (946684834)
[    9.187568] smc91x smc91x.0 eth0: link down
[   11.136140] smc91x smc91x.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   11.193199] IP-Config: Complete:
[   11.196554]      device=eth0, hwaddr=00:0e:0c:a7:26:f7, ipaddr=192.168.1.232, mask=255.255.255.0, gw=255.255.255.255
[   11.207229]      host=192.168.1.232, domain=, nis-domain=(none)
[   11.213278]      bootserver=192.168.1.5, rootserver=192.168.1.5, rootpath=
[   11.221532] ALSA device list:
[   11.224983]   #0: Zylonite
[   11.250472] Freeing unused kernel memory: 2396K
[   11.255419] This architecture does not have kernel memory protection.
Starting logging: OK
Loading all the available modules: modprobe: module smc91x not found in modules.dep
modprobe: module soundcore not found in modules.dep
modprobe: module snd not found in modules.dep
modprobe: module snd-pcm not found in modules.dep
modprobe: module fat not found in modules.dep
modprobe: module vfat not found in modules.dep
modprobe: module nfs not found in modules.dep
modprobe: module nls_cp437 not found in modules.dep
modprobe: module nls_cp850 not found in modules.dep
modprobe: module nls_ascii not found in modules.dep
modprobe: module nls_utf8 not found in modules.dep
modprobe: module fixed not found in modules.dep
modprobe: module pwm-pxa not found in modules.dep
modprobe: module cpufreq_conservative not found in modules.dep
modprobe: module cpufreq_powersave not found in modules.dep
modprobe: module cpufreq-dt not found in modules.dep
modprobe: module btusb not found in modules.dep
modprobe: module i2c-dev not found in modules.dep
modprobe: module ubi not found in modules.dep
modprobe: module mt_blkdevs not found in modules.dep
modprobe: module pxa3xx_nand not found in modules.dep
modprobe: module mtdblock not found in modules.dep
modprobe: module ofpart not found in modules.dep
modprobe: module map_rom not found in modules.dep
modprobe: module jedec_probe not found in modules.dep
modprobe: module cmdlinepart not found in modules.dep
modprobe: module redboot not found in modules.dep
modprobe: module loop not found in modules.dep
modprobe: module leds-gpio not found in modules.dep
modprobe: module jedec-class not found in modules.dep
modprobe: module pxa not found in modules.dep
modprobe: module evdev not found in modules.dep
modprobe: module soc_common not found in modules.dep
modprobe: module pwm_bl not found in modules.dep
modprobe: module fbcon not found in modules.dep
modprobe: module rtc-pxa not found in modules.dep
modprobe: module rtc-sa1100 not found in modules.dep
modprobe: module smc91x not found in modules.dep
modprobe: module pda_power not found in modules.dep
modprobe: module fixed not found in modules.dep
KO
OK
Changing smcs91x MAC address to 08:00:3e:26:0a:5b: ifconfig: SIOCSIFHWADDR: Device or resource busy
KO
OK
Initializing random number generator... done.
Starting network...
ip: RTNETLINK answers: File exists
udhcpc (v1.24.1) started
Sending discover...
Sending select for 192.168.1.232...
Lease of 192.168.1.232 obtained, lease time 86400
deleting routers
adding dns 192.168.1.1
Starting dropbear sshd: OK

Welcome to Buildroot
zylonite login: 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-03 19:58                                       ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2018-01-03 19:58 UTC (permalink / raw)
  To: linux-arm-kernel

Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:

> On Tue, 02 Jan 2018 20:21:09 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>
>> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
>> 
>> > I think the ECC issue you faced was related to pages being written
>> > *and* empty. If this guess is right, the board should boot fine with
>> > these changes.
>> >
>> > Otherwise, please add the DEBUG define as before in both the core
>> > and the driver and do not hesitate to add another dump_stack()
>> > where it crashes (if applicable).  
>> 
>> The problem looks still the same :
>> [    3.560163] Bad block table not found for chip 0
>
> Mmmmh ok.
>
> Can you please add this patch:
> http://code.bulix.org/61at9p-254626

Well, it looks a bit better, see attached log in [1].
Now the BBT is detected ...
[    3.310841] Bad block table found at page 131008, version 0x01
...
[    3.354944] Bad block table found at page 130944, version 0x01

But all blocks are considered bad ... as if the bit logic was inverted for the
meaning of "bad" or "good" block, see :
[    3.379825] nand_read_bbt: bad block at 0x000000000000

Cheers.

--
Robert

[1] Dmesg
---8>---
netconsole: port not set
netconsole: registered as netconsole-1
smc91c111 smc91c1110: chip is revision= 9, version= 2
mdio_bus: miibus0: probed
eth0: got preset MAC address: 00:0e:0c:a7:26:f7
nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0xba (ST Micro NAND 256MiB 1,8V 16-bit), 256MiB, page size: 2048, OOB size: 64
mrvl_nand mrvl_nand0: ECC strength 1, ECC step size 512
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
malloc space: 0x83700000 -> 0x83efffff (size 8 MiB)
running /env/bin/init...
magicvar: No such file or directory
magicvar: No such file or directory
magicvar: No such file or directory

Hit any key to stop autoboot:  3\b\b 2\b\b 1\b\b 0
booting net
netconsole: netconsole initialized with 255.255.255.255:6662
eth0: 100Mbps full duplex link detected
DHCP client bound to address 192.168.1.232
netconsole: netconsole initialized with 255.255.255.255:6662
could not open /mnt/tftp/none-linux-zylonite: No such file or directory
Booting net failed: No such file or directory
booting net failed: No such file or directory
boot: No such file or directory
.[1;32mbarebox at .[1;36mZylonite:/.[0m global linux.bootargs.debug=earlycon
.[1;32mbarebox at .[1;36mZylonite:/.[0m bootm /mnt/tftp/zImage_jenkins

Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root)
arch_number: 1233
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.15.0-rc1-00044-gb6124ba (jenkins at belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #825 PREEMPT Wed Jan 3 20:06:17 CET 2018
[    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
[    0.000000] Ignoring tag cmdline (using the default kernel command line)
[    0.000000] Memory policy: Data cache writeback
[    0.000000] RO Mode clock: 0.00MHz
[    0.000000] Run Mode clock: 0.00MHz
[    0.000000] Turbo Mode clock: 0.00MHz
[    0.000000] System bus clock: 0.00MHz
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: fast init done
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 56856K/65536K available (4225K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04289e8   (4227 kB)
[    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
[    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
[    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
[    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
[    0.000068] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
[    0.000267] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
[    0.002138] Console: colour dummy device 80x30
[    0.002297] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
[    0.081017] pid_max: default: 32768 minimum: 301
[    0.081857] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.081957] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085169] CPU: Testing write buffer coherency: ok
[    0.088982] Setting up static identity map for 0x80008200 - 0x80008260
[    0.089941] Hierarchical SRCU implementation.
[    0.102960] devtmpfs: initialized
[    0.113840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.113980] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.116305] NET: Registered protocol family 16
[    0.119116] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.388612] Advanced Linux Sound Architecture Driver Initialized.
[    0.392974] clocksource: Switched to clocksource oscr0
[    0.551626] NET: Registered protocol family 2
[    0.557926] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.558151] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.558332] TCP: Hash tables configured (established 1024 bind 1024)
[    0.558869] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.559048] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560201] NET: Registered protocol family 1
[    0.562229] RPC: Registered named UNIX socket transport module.
[    0.562327] RPC: Registered udp transport module.
[    0.562381] RPC: Registered tcp transport module.
[    0.562439] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.500715] Initialise system trusted keyrings
[    2.502868] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    2.507406] NFS: Registering the id_resolver key type
[    2.507634] Key type id_resolver registered
[    2.507695] Key type id_legacy registered
[    2.514199] Key type asymmetric registered
[    2.514303] Asymmetric key parser 'x509' registered
[    2.514462] io scheduler noop registered
[    2.514527] io scheduler deadline registered
[    2.514921] io scheduler cfq registered (default)
[    2.514992] io scheduler mq-deadline registered
[    2.515054] io scheduler kyber registered
[    2.572587] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
[    2.578330] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
[    3.053207] console [ttyS0] enabled
[    3.059557] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
[    3.072069] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
[    3.088037] nand: executing subop:
[    3.091533] nand:     ->CMD      [0xff]
[    3.098135] nand:     ->WAITRDY  [max 250 ms]
[    3.102636] marvell-nfc pxa3xx-nand: 
[    3.102636] NDCR:  0x90079fff
[    3.102636] NDCB0: 0x00a000ff
[    3.102636] NDCB1: 0x00000000
[    3.102636] NDCB2: 0x00000000
[    3.102636] NDCB3: 0x00000000
[    3.121629] nand: executing subop:
[    3.125459] nand:     ->CMD      [0x90]
[    3.129362] nand:     ->ADDR     [1 cyc: 00]
[    3.134355] nand:     ->DATA_IN  [2 B, force 8-bit]
[    3.139366] marvell-nfc pxa3xx-nand: 
[    3.139366] NDCR:  0x90079fff
[    3.139366] NDCB0: 0x00610090
[    3.139366] NDCB1: 0x00000000
[    3.139366] NDCB2: 0x00000000
[    3.139366] NDCB3: 0x00000000
[    3.158242] nand: executing subop:
[    3.161713] nand:     ->CMD      [0x90]
[    3.165930] nand:     ->ADDR     [1 cyc: 00]
[    3.170250] nand:     ->DATA_IN  [8 B, force 8-bit]
[    3.175405] marvell-nfc pxa3xx-nand: 
[    3.175405] NDCR:  0x90079fff
[    3.175405] NDCB0: 0x00610090
[    3.175405] NDCB1: 0x00000000
[    3.175405] NDCB2: 0x00000000
[    3.175405] NDCB3: 0x00000000
[    3.194083] nand: executing subop:
[    3.197532] nand:     ->CMD      [0x90]
[    3.201406] nand:     ->ADDR     [1 cyc: 20]
[    3.205851] nand:     ->DATA_IN  [4 B, force 8-bit]
[    3.210832] marvell-nfc pxa3xx-nand: 
[    3.210832] NDCR:  0x90079fff
[    3.210832] NDCB0: 0x00610090
[    3.210832] NDCB1: 0x00000020
[    3.210832] NDCB2: 0x00000000
[    3.210832] NDCB3: 0x00000000
[    3.229453] nand: executing subop:
[    3.232899] nand:     ->CMD      [0x90]
[    3.236930] nand:     ->ADDR     [1 cyc: 40]
[    3.241232] nand:     ->DATA_IN  [5 B, force 8-bit]
[    3.246335] marvell-nfc pxa3xx-nand: 
[    3.246335] NDCR:  0x90079fff
[    3.246335] NDCB0: 0x00610090
[    3.246335] NDCB1: 0x00000040
[    3.246335] NDCB2: 0x00000000
[    3.246335] NDCB3: 0x00000000
[    3.264978] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
[    3.271354] nand: ST Micro NAND 256MiB 1,8V 16-bit
[    3.276316] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.284055] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
[    3.291595] marvell-nfc pxa3xx-nand: 
[    3.291595] NDCR:  0xdd079fff
[    3.291595] NDCB0: 0x000d3000
[    3.291595] NDCB1: 0xffc00000
[    3.291595] NDCB2: 0x00000001
[    3.291595] NDCB3: 0x00000000
[    3.310841] Bad block table found at page 131008, version 0x01
[    3.316993] marvell-nfc pxa3xx-nand: 
[    3.316993] NDCR:  0xdd079fff
[    3.316993] NDCB0: 0x000d3000
[    3.316993] NDCB1: 0xffc00000
[    3.316993] NDCB2: 0x00000001
[    3.316993] NDCB3: 0x00000000
[    3.336013] marvell-nfc pxa3xx-nand: 
[    3.336013] NDCR:  0xdd079fff
[    3.336013] NDCB0: 0x000d3000
[    3.336013] NDCB1: 0xff800000
[    3.336013] NDCB2: 0x00000001
[    3.336013] NDCB3: 0x00000000
[    3.354944] Bad block table found at page 130944, version 0x01
[    3.360915] marvell-nfc pxa3xx-nand: 
[    3.360915] NDCR:  0xdd079fff
[    3.360915] NDCB0: 0x000d3000
[    3.360915] NDCB1: 0xffc00000
[    3.360915] NDCB2: 0x00000001
[    3.360915] NDCB3: 0x00000000
[    3.379825] nand_read_bbt: bad block at 0x000000000000
[    3.385158] nand_read_bbt: bad block at 0x000000040000
[    3.390320] nand_read_bbt: bad block at 0x000000060000
[    3.395587] nand_read_bbt: bad block at 0x000000080000
[    3.400743] nand_read_bbt: bad block at 0x0000000a0000
[    3.406009] nand_read_bbt: bad block at 0x0000000c0000
[    3.411169] nand_read_bbt: bad block at 0x0000000e0000
[    3.416434] nand_read_bbt: bad block at 0x000000100000
[    3.421593] nand_read_bbt: bad block at 0x000000140000
[    3.426859] nand_read_bbt: bad block at 0x000000160000
[    3.432018] nand_read_bbt: bad block at 0x000000180000
[    3.437283] nand_read_bbt: bad block at 0x0000001a0000
[    3.442442] nand_read_bbt: bad block at 0x0000001c0000
[    3.447707] nand_read_bbt: bad block at 0x0000001e0000
[    3.452867] nand_read_bbt: bad block at 0x000000200000
[    3.458133] nand_read_bbt: bad block at 0x000000220000
[    3.463404] nand_read_bbt: bad block at 0x000000240000
[    3.468564] nand_read_bbt: bad block at 0x000000260000
[    3.473830] nand_read_bbt: bad block at 0x000000280000
[    3.478990] nand_read_bbt: bad block at 0x0000002a0000
[    3.484253] nand_read_bbt: bad block at 0x0000002c0000
[    3.489414] nand_read_bbt: bad block at 0x0000002e0000
[    3.494680] nand_read_bbt: bad block at 0x000000300000
[    3.499838] nand_read_bbt: bad block at 0x000000320000
[    3.505104] nand_read_bbt: bad block at 0x000000340000
[    3.510262] nand_read_bbt: bad block at 0x000000360000
[    3.515529] nand_read_bbt: bad block at 0x000000380000
[    3.520687] nand_read_bbt: bad block at 0x0000003a0000
[    3.525955] nand_read_bbt: bad block at 0x0000003c0000
[    3.531121] nand_read_bbt: bad block at 0x0000003e0000
[    3.536386] nand_read_bbt: bad block at 0x000000400000
[    3.541544] nand_read_bbt: bad block at 0x000000420000
[    3.546811] nand_read_bbt: bad block at 0x000000440000
[    3.551970] nand_read_bbt: bad block at 0x000000460000
[    3.557234] nand_read_bbt: bad block at 0x000000480000
[    3.562394] nand_read_bbt: bad block at 0x0000004a0000
[    3.567659] nand_read_bbt: bad block at 0x0000004c0000
[    3.572819] nand_read_bbt: bad block at 0x0000004e0000
[    3.578087] nand_read_bbt: bad block at 0x000000500000
[    3.583367] nand_read_bbt: bad block at 0x000000520000
[    3.588524] nand_read_bbt: bad block at 0x000000540000
[    3.593788] nand_read_bbt: bad block at 0x000000560000
[    3.598951] nand_read_bbt: bad block at 0x000000580000
[    3.604213] nand_read_bbt: bad block at 0x0000005a0000
[    3.609373] nand_read_bbt: bad block at 0x0000005c0000
[    3.614639] nand_read_bbt: bad block at 0x0000005e0000
[    3.619799] nand_read_bbt: bad block at 0x000000600000
[    3.625064] nand_read_bbt: bad block at 0x000000620000
[    3.630224] nand_read_bbt: bad block at 0x000000640000
[    3.635488] nand_read_bbt: bad block at 0x000000660000
[    3.640648] nand_read_bbt: bad block at 0x000000680000
[    3.645914] nand_read_bbt: bad block at 0x0000006a0000
[    3.651071] nand_read_bbt: bad block at 0x0000006c0000
[    3.656337] nand_read_bbt: bad block at 0x0000006e0000
[    3.661497] nand_read_bbt: bad block at 0x000000700000
[    3.666774] nand_read_bbt: bad block at 0x000000d40000
[    3.671939] nand_read_bbt: bad block at 0x000000d60000
[    3.677206] nand_read_bbt: bad block at 0x000000d80000
[    3.682373] nand_read_bbt: bad block at 0x000000da0000
[    3.687638] nand_read_bbt: bad block at 0x000000dc0000
[    3.692796] nand_read_bbt: bad block at 0x000000de0000
[    3.698063] nand_read_bbt: bad block at 0x000000e00000
[    3.703334] nand_read_bbt: bad block at 0x000000e20000
[    3.708494] nand_read_bbt: bad block at 0x000000e40000
[    3.713759] nand_read_bbt: bad block at 0x000000e60000
[    3.718919] nand_read_bbt: bad block at 0x000000e80000
[    3.724183] nand_read_bbt: bad block at 0x000000ea0000
[    3.729343] nand_read_bbt: bad block at 0x000000ec0000
[    3.734608] nand_read_bbt: bad block at 0x000000ee0000
[    3.739769] nand_read_bbt: bad block at 0x000000f00000
[    3.745033] nand_read_bbt: bad block at 0x000000f20000
[    3.750192] nand_read_bbt: bad block at 0x000000f40000
[    3.755459] nand_read_bbt: bad block at 0x000000f60000
[    3.760617] nand_read_bbt: bad block at 0x000000f80000
[    3.765882] nand_read_bbt: bad block at 0x000000fa0000
[    3.771041] nand_read_bbt: bad block at 0x000000fc0000
[    3.776306] nand_read_bbt: bad block at 0x000000fe0000
[    3.781467] nand_read_bbt: bad block at 0x000001000000
[    3.786731] nand_read_bbt: bad block at 0x000001020000
[    3.791891] nand_read_bbt: bad block at 0x000001040000
[    3.797156] nand_read_bbt: bad block at 0x000001060000
[    3.802317] nand_read_bbt: bad block at 0x000001080000
[    3.807582] nand_read_bbt: bad block at 0x0000010a0000
[    3.812741] nand_read_bbt: bad block at 0x0000010c0000
[    3.818005] nand_read_bbt: bad block at 0x0000010e0000
[    3.823280] nand_read_bbt: bad block at 0x000001100000
[    3.828438] nand_read_bbt: bad block at 0x000001120000
[    3.833702] nand_read_bbt: bad block at 0x000001140000
[    3.838862] nand_read_bbt: bad block at 0x000001160000
[    3.844129] nand_read_bbt: bad block at 0x000001180000
[    3.849294] nand_read_bbt: bad block at 0x000001660000
[    3.854562] nand_read_bbt: bad block at 0x000001680000
[    3.859719] nand_read_bbt: bad block at 0x0000016a0000
[    3.864986] nand_read_bbt: bad block at 0x0000016c0000
[    3.870143] nand_read_bbt: bad block at 0x0000016e0000
[    3.875409] nand_read_bbt: bad block at 0x000001700000
[    3.880569] nand_read_bbt: bad block at 0x000001720000
[    3.885836] nand_read_bbt: bad block at 0x000001740000
[    3.890994] nand_read_bbt: bad block at 0x000001760000
[    3.896260] nand_read_bbt: bad block at 0x000001780000
[    3.901417] nand_read_bbt: bad block at 0x0000017a0000
[    3.906683] nand_read_bbt: bad block at 0x0000017c0000
[    3.911843] nand_read_bbt: bad block at 0x0000017e0000
[    3.917108] nand_read_bbt: bad block at 0x000001800000
[    3.922267] nand_read_bbt: bad block at 0x000001820000
[    3.927534] nand_read_bbt: bad block at 0x000001840000
[    3.932691] nand_read_bbt: bad block at 0x000001860000
[    3.937957] nand_read_bbt: bad block at 0x000001880000
[    3.943230] nand_read_bbt: bad block at 0x0000018a0000
[    3.948390] nand_read_bbt: bad block at 0x0000018c0000
[    3.953654] nand_read_bbt: bad block at 0x0000018e0000
[    3.958815] nand_read_bbt: bad block at 0x000001900000
[    3.964101] nand_read_bbt: bad block at 0x000001920000
[    3.969264] nand_read_bbt: bad block at 0x000001940000
[    3.974531] nand_read_bbt: bad block at 0x000001960000
[    3.979690] nand_read_bbt: bad block at 0x000001980000
[    3.984952] nand_read_bbt: bad block at 0x0000019a0000
[    3.990114] nand_read_bbt: bad block at 0x0000019c0000
[    3.995381] nand_read_bbt: bad block at 0x0000019e0000
[    4.000539] nand_read_bbt: bad block at 0x000001a00000
[    4.005804] nand_read_bbt: bad block at 0x000001a20000
[    4.010964] nand_read_bbt: bad block at 0x000001a40000
[    4.016236] nand_read_bbt: bad block at 0x000001a60000
[    4.021398] nand_read_bbt: bad block at 0x000001a80000
[    4.026664] nand_read_bbt: bad block at 0x000001aa0000
[    4.031822] nand_read_bbt: bad block at 0x000001ac0000
[    4.037086] nand_read_bbt: bad block at 0x000001ae0000
[    4.042247] nand_read_bbt: bad block at 0x000001b00000
[    4.047512] nand_read_bbt: bad block at 0x000001b20000
[    4.052672] nand_read_bbt: bad block at 0x000001b40000
[    4.057935] nand_read_bbt: bad block at 0x000001b60000
[    4.063211] nand_read_bbt: bad block at 0x000001b80000
[    4.068377] nand_read_bbt: bad block at 0x000001ba0000
[    4.073643] nand_read_bbt: bad block at 0x000001bc0000
[    4.078801] nand_read_bbt: bad block at 0x000001be0000
[    4.084068] nand_read_bbt: bad block at 0x000001c00000
[    4.089235] nand_read_bbt: bad block at 0x000001c20000
[    4.094836] nand_read_bbt: bad block at 0x000001c40000
[    4.100012] nand_read_bbt: bad block at 0x000001c60000
[    4.105327] nand_read_bbt: bad block at 0x000001c80000
[    4.110488] nand_read_bbt: bad block at 0x000001ca0000
[    4.115755] nand_read_bbt: bad block at 0x000001cc0000
[    4.120923] nand_read_bbt: bad block at 0x000001ce0000
[    4.126186] nand_read_bbt: bad block at 0x000001d00000
[    4.131347] nand_read_bbt: bad block at 0x000001d20000
[    4.136610] nand_read_bbt: bad block at 0x000001d40000
[    4.141770] nand_read_bbt: bad block at 0x000001d60000
[    4.147038] nand_read_bbt: bad block at 0x000001d80000
[    4.152204] nand_read_bbt: bad block at 0x000001da0000
[    4.157470] nand_read_bbt: bad block at 0x000001dc0000
[    4.162627] nand_read_bbt: bad block at 0x000001de0000
[    4.167894] nand_read_bbt: bad block at 0x000001e00000
[    4.173167] nand_read_bbt: bad block at 0x000001e20000
[    4.178325] nand_read_bbt: bad block at 0x000001e40000
[    4.183591] nand_read_bbt: bad block at 0x000001e60000
[    4.188752] nand_read_bbt: bad block at 0x000001e80000
[    4.194015] nand_read_bbt: bad block at 0x000001ea0000
[    4.199175] nand_read_bbt: bad block at 0x000001ec0000
[    4.204441] nand_read_bbt: bad block at 0x000001ee0000
[    4.209601] nand_read_bbt: bad block at 0x000001f00000
[    4.214865] nand_read_bbt: bad block at 0x000001f20000
[    4.220024] nand_read_bbt: bad block at 0x000001f40000
[    4.225290] nand_read_bbt: bad block at 0x000001f60000
[    4.230450] nand_read_bbt: bad block at 0x000001f80000
[    4.235713] nand_read_bbt: bad block at 0x000001fa0000
[    4.240874] nand_read_bbt: bad block at 0x000001fc0000
[    4.246138] nand_read_bbt: bad block at 0x000001fe0000
[    4.251299] nand_read_bbt: bad block at 0x000002000000
[    4.256564] nand_read_bbt: bad block at 0x000002020000
[    4.261723] nand_read_bbt: bad block at 0x000002040000
[    4.266988] nand_read_bbt: bad block at 0x000002060000
[    4.272148] nand_read_bbt: bad block at 0x000002080000
[    4.277412] nand_read_bbt: bad block at 0x0000020a0000
[    4.282572] nand_read_bbt: bad block at 0x0000020c0000
[    4.287837] nand_read_bbt: bad block at 0x0000020e0000
[    4.293111] nand_read_bbt: bad block at 0x000002100000
[    4.298278] nand_read_bbt: bad block at 0x000002120000
[    4.303545] nand_read_bbt: bad block at 0x000002140000
[    4.308703] nand_read_bbt: bad block at 0x000002160000
[    4.313967] nand_read_bbt: bad block at 0x000002180000
[    4.319128] nand_read_bbt: bad block at 0x0000021a0000
[    4.324391] nand_read_bbt: bad block at 0x0000021c0000
[    4.329552] nand_read_bbt: bad block at 0x0000021e0000
[    4.334818] nand_read_bbt: bad block at 0x000002200000
[    4.339977] nand_read_bbt: bad block at 0x000002220000
[    4.345242] nand_read_bbt: bad block at 0x000002240000
[    4.350402] nand_read_bbt: bad block at 0x000002260000
[    4.355667] nand_read_bbt: bad block at 0x000002280000
[    4.360826] nand_read_bbt: bad block at 0x0000022a0000
[    4.366091] nand_read_bbt: bad block at 0x0000022c0000
[    4.371251] nand_read_bbt: bad block at 0x0000022e0000
[    4.376515] nand_read_bbt: bad block at 0x000002300000
[    4.381674] nand_read_bbt: bad block at 0x000002320000
[    4.386941] nand_read_bbt: bad block at 0x000002340000
[    4.392101] nand_read_bbt: bad block at 0x000002360000
[    4.397365] nand_read_bbt: bad block at 0x000002380000
[    4.402523] nand_read_bbt: bad block at 0x0000023a0000
[    4.407789] nand_read_bbt: bad block at 0x0000023c0000
[    4.413062] nand_read_bbt: bad block at 0x0000023e0000
[    4.418223] nand_read_bbt: bad block at 0x000002400000
[    4.423485] nand_read_bbt: bad block at 0x000002420000
[    4.428646] nand_read_bbt: bad block at 0x000002440000
[    4.433907] nand_read_bbt: bad block at 0x000002460000
[    4.439071] nand_read_bbt: bad block at 0x000002480000
[    4.444336] nand_read_bbt: bad block at 0x0000024a0000
[    4.449496] nand_read_bbt: bad block at 0x0000024c0000
[    4.454759] nand_read_bbt: bad block at 0x0000024e0000
[    4.459922] nand_read_bbt: bad block at 0x000002500000
[    4.465187] nand_read_bbt: bad block at 0x000002520000
[    4.470344] nand_read_bbt: bad block at 0x000002540000
[    4.475609] nand_read_bbt: bad block at 0x000002560000
[    4.480771] nand_read_bbt: bad block at 0x000002580000
[    4.486033] nand_read_bbt: bad block at 0x0000025a0000
[    4.491194] nand_read_bbt: bad block at 0x0000025c0000
[    4.496458] nand_read_bbt: bad block at 0x0000025e0000
[    4.501619] nand_read_bbt: bad block at 0x000002600000
[    4.506882] nand_read_bbt: bad block at 0x000002620000
[    4.512042] nand_read_bbt: bad block at 0x000002640000
[    4.517307] nand_read_bbt: bad block at 0x000002660000
[    4.522468] nand_read_bbt: bad block at 0x000002680000
[    4.527732] nand_read_bbt: bad block at 0x0000026a0000
[    4.532891] nand_read_bbt: bad block at 0x0000026c0000
[    4.538162] nand_read_bbt: bad block at 0x0000026e0000
[    4.543428] nand_read_bbt: bad block at 0x000002700000
[    4.548590] nand_read_bbt: bad block at 0x000002720000
[    4.553857] nand_read_bbt: bad block at 0x000002740000
[    4.559014] nand_read_bbt: bad block at 0x000002760000
[    4.564280] nand_read_bbt: bad block at 0x000002780000
[    4.569438] nand_read_bbt: bad block at 0x0000027a0000
[    4.574705] nand_read_bbt: bad block at 0x0000027c0000
[    4.579863] nand_read_bbt: bad block at 0x0000027e0000
[    4.585129] nand_read_bbt: bad block at 0x000002800000
[    4.590288] nand_read_bbt: bad block at 0x000002820000
[    4.595558] nand_read_bbt: bad block at 0x000002a40000
[    4.600720] nand_read_bbt: bad block at 0x000002a60000
[    4.606012] nand_read_bbt: bad block at 0x000002bc0000
[    4.611182] nand_read_bbt: bad block at 0x000002c40000
[    4.616449] nand_read_bbt: bad block at 0x000002c60000
[    4.621614] nand_read_bbt: bad block at 0x000002c80000
[    4.626878] nand_read_bbt: bad block at 0x000002ca0000
[    4.632036] nand_read_bbt: bad block at 0x000002cc0000
[    4.637301] nand_read_bbt: bad block at 0x000002ce0000
[    4.642463] nand_read_bbt: bad block at 0x000002d00000
[    4.647726] nand_read_bbt: bad block at 0x000002d20000
[    4.652888] nand_read_bbt: bad block at 0x000002d40000
[    4.658167] nand_read_bbt: bad block at 0x000002d60000
[    4.663433] nand_read_bbt: bad block at 0x000002d80000
[    4.668593] nand_read_bbt: bad block at 0x000002da0000
[    4.673859] nand_read_bbt: bad block at 0x000002dc0000
[    4.679017] nand_read_bbt: bad block at 0x000002de0000
[    4.684282] nand_read_bbt: bad block at 0x000002e00000
[    4.689442] nand_read_bbt: bad block at 0x000002e20000
[    4.694707] nand_read_bbt: bad block at 0x000002e40000
[    4.699867] nand_read_bbt: bad block at 0x000002e60000
[    4.705133] nand_read_bbt: bad block at 0x000002e80000
[    4.710292] nand_read_bbt: bad block at 0x000002ea0000
[    4.715558] nand_read_bbt: bad block at 0x000002ec0000
[    4.720716] nand_read_bbt: bad block at 0x000002ee0000
[    4.725983] nand_read_bbt: bad block at 0x000002f00000
[    4.731141] nand_read_bbt: bad block at 0x000002f20000
[    4.736406] nand_read_bbt: bad block at 0x000002f40000
[    4.741566] nand_read_bbt: bad block at 0x000002f60000
[    4.746830] nand_read_bbt: bad block at 0x000002f80000
[    4.751991] nand_read_bbt: bad block at 0x000002fa0000
[    4.757255] nand_read_bbt: bad block at 0x000002fc0000
[    4.762415] nand_read_bbt: bad block at 0x000002fe0000
[    4.767681] nand_read_bbt: bad block at 0x000003000000
[    4.772839] nand_read_bbt: bad block at 0x000003020000
[    4.778104] nand_read_bbt: bad block at 0x000003040000
[    4.783378] nand_read_bbt: bad block at 0x000003060000
[    4.788536] nand_read_bbt: bad block at 0x000003080000
[    4.793802] nand_read_bbt: bad block at 0x0000030a0000
[    4.798962] nand_read_bbt: bad block at 0x0000030c0000
[    4.804224] nand_read_bbt: bad block at 0x0000030e0000
[    4.809387] nand_read_bbt: bad block at 0x000003100000
[    4.814650] nand_read_bbt: bad block at 0x000003120000
[    4.819809] nand_read_bbt: bad block at 0x000003140000
[    4.825075] nand_read_bbt: bad block at 0x000003160000
[    4.830235] nand_read_bbt: bad block at 0x000003180000
[    4.835499] nand_read_bbt: bad block at 0x0000031a0000
[    4.840661] nand_read_bbt: bad block at 0x0000031c0000
[    4.845924] nand_read_bbt: bad block at 0x0000031e0000
[    4.851085] nand_read_bbt: bad block at 0x000003200000
[    4.856350] nand_read_bbt: bad block at 0x000003220000
[    4.861510] nand_read_bbt: bad block at 0x000003240000
[    4.867593] 6 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    4.874441] Creating 6 MTD partitions on "pxa3xx_nand-0":
[    4.879899] 0x000000000000-0x000000020000 : "TIMH"
[    4.888233] 0x000000020000-0x000000040000 : "OBMI"
[    4.897663] 0x000000040000-0x000000100000 : "barebox"
[    4.907444] 0x000000100000-0x000000140000 : "barebox-env"
[    4.917447] 0x000000140000-0x000000d40000 : "kernel"
[    4.927958] 0x000000d40000-0x000003260000 : "root"
[    4.941349] smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
[    4.994377] smc91x smc91x.0 eth0: SMC91C11xFD (rev 2) at c4867300 IRQ 214
[    5.001216]  DMA c386d710 [nowait]
[    5.005891] smc91x smc91x.0 eth0: Ethernet addr: 00:0e:0c:a7:26:f7
[    5.018621] input: pxa27x-keypad as /devices/platform/pxa27x-keypad/input/input0
[    5.028503] pxa-rtc pxa-rtc: failed to find rtc clock source
[    5.036108] rtc rtc0: invalid alarm value: 0-1-1 0:0:0
[    5.043390] pxa-rtc pxa-rtc: rtc core: registered pxa-rtc as rtc0
[    5.054574] sa1100_wdt: SA1100/PXA2xx Watchdog Timer: timer margin 60 sec
[    5.106260] soc-audio soc-audio: ASoC: machine Zylonite should use snd_soc_register_card()
[    5.130166] wm9713-codec wm9713-codec: Control not supported for path Mic B Source -> [MPB] -> Mic B Pre Amp
[    5.141137] wm9713-codec wm9713-codec: ASoC: no dapm match for Mic B Source --> MPB --> Mic B Pre Amp
[    5.150835] wm9713-codec wm9713-codec: ASoC: Failed to add route Mic B Source -> MPB -> Mic B Pre Amp
[    5.164361] soc-audio soc-audio: wm9713-hifi <-> pxa2xx-ac97 mapping ok
[    5.172711] soc-audio soc-audio: wm9713-aux <-> pxa2xx-ac97-aux mapping ok
[    5.183377] soc-audio soc-audio: wm9713-voice <-> pxa-ssp-dai.2 mapping ok
[    5.191817] wm9713-codec wm9713-codec: ASoC: mux Sidetone Mux has no paths
[    5.232193] NET: Registered protocol family 17
[    5.238583] Key type dns_resolver registered
[    5.244879] XScale iWMMXt coprocessor detected.
[    5.257208] Loading compiled-in X.509 certificates
[    5.277841] ubi0: attaching mtd5
[    5.282062] marvell-nfc pxa3xx-nand: 
[    5.282062] NDCR:  0xdd079fff
[    5.282062] NDCB0: 0x000d3000
[    5.282062] NDCB1: 0x23400000
[    5.282062] NDCB2: 0x00000000
[    5.282062] NDCB3: 0x00000000
[    5.302767] marvell-nfc pxa3xx-nand: 
[    5.302767] NDCR:  0xdd079fff
[    5.302767] NDCB0: 0x000d3000
[    5.302767] NDCB1: 0x23410000
[    5.302767] NDCB2: 0x00000000
[    5.302767] NDCB3: 0x00000000
[    5.322069] marvell-nfc pxa3xx-nand: 
[    5.322069] NDCR:  0x9d079fff
[    5.322069] NDCB0: 0x000d3000
[    5.322069] NDCB1: 0x23410000
[    5.322069] NDCB2: 0x00000000
[    5.322069] NDCB3: 0x00000000
[    5.341520] marvell-nfc pxa3xx-nand: 
[    5.341520] NDCR:  0xdd079fff
[    5.341520] NDCB0: 0x000d3000
[    5.341520] NDCB1: 0x23800000
[    5.341520] NDCB2: 0x00000000
[    5.341520] NDCB3: 0x00000000
[    5.361115] marvell-nfc pxa3xx-nand: 
[    5.361115] NDCR:  0xdd079fff
[    5.361115] NDCB0: 0x000d3000
[    5.361115] NDCB1: 0x23810000
[    5.361115] NDCB2: 0x00000000
[    5.361115] NDCB3: 0x00000000
[    5.380361] marvell-nfc pxa3xx-nand: 
[    5.380361] NDCR:  0x9d079fff
[    5.380361] NDCB0: 0x000d3000
[    5.380361] NDCB1: 0x23810000
[    5.380361] NDCB2: 0x00000000
[    5.380361] NDCB3: 0x00000000
[    5.399699] marvell-nfc pxa3xx-nand: 
[    5.399699] NDCR:  0xdd079fff
[    5.399699] NDCB0: 0x000d3000
[    5.399699] NDCB1: 0x23c00000
[    5.399699] NDCB2: 0x00000000
[    5.399699] NDCB3: 0x00000000
[    5.418790] marvell-nfc pxa3xx-nand: 
[    5.418790] NDCR:  0xdd079fff
[    5.418790] NDCB0: 0x000d3000
[    5.418790] NDCB1: 0x23c10000
[    5.418790] NDCB2: 0x00000000
[    5.418790] NDCB3: 0x00000000
[    5.437771] marvell-nfc pxa3xx-nand: 
[    5.437771] NDCR:  0x9d079fff
[    5.437771] NDCB0: 0x000d3000
[    5.437771] NDCB1: 0x23c10000
[    5.437771] NDCB2: 0x00000000
[    5.437771] NDCB3: 0x00000000
[    5.456876] marvell-nfc pxa3xx-nand: 
[    5.456876] NDCR:  0xdd079fff
[    5.456876] NDCB0: 0x000d3000
[    5.456876] NDCB1: 0x24000000
[    5.456876] NDCB2: 0x00000000
[    5.456876] NDCB3: 0x00000000
[    5.475940] marvell-nfc pxa3xx-nand: 
[    5.475940] NDCR:  0xdd079fff
[    5.475940] NDCB0: 0x000d3000
[    5.475940] NDCB1: 0x24010000
[    5.475940] NDCB2: 0x00000000
[    5.475940] NDCB3: 0x00000000
[    5.494922] marvell-nfc pxa3xx-nand: 
[    5.494922] NDCR:  0x9d079fff
[    5.494922] NDCB0: 0x000d3000
[    5.494922] NDCB1: 0x24010000
[    5.494922] NDCB2: 0x00000000
[    5.494922] NDCB3: 0x00000000
[    5.514028] marvell-nfc pxa3xx-nand: 
[    5.514028] NDCR:  0xdd079fff
[    5.514028] NDCB0: 0x000d3000
[    5.514028] NDCB1: 0x24400000
[    5.514028] NDCB2: 0x00000000
[    5.514028] NDCB3: 0x00000000
[    5.533183] marvell-nfc pxa3xx-nand: 
[    5.533183] NDCR:  0xdd079fff
[    5.533183] NDCB0: 0x000d3000
[    5.533183] NDCB1: 0x24410000
[    5.533183] NDCB2: 0x00000000
[    5.533183] NDCB3: 0x00000000
[    5.552166] marvell-nfc pxa3xx-nand: 
[    5.552166] NDCR:  0x9d079fff
[    5.552166] NDCB0: 0x000d3000
[    5.552166] NDCB1: 0x24410000
[    5.552166] NDCB2: 0x00000000
[    5.552166] NDCB3: 0x00000000
[    5.571273] marvell-nfc pxa3xx-nand: 
[    5.571273] NDCR:  0xdd079fff
[    5.571273] NDCB0: 0x000d3000
[    5.571273] NDCB1: 0x24800000
[    5.571273] NDCB2: 0x00000000
[    5.571273] NDCB3: 0x00000000
[    5.590337] marvell-nfc pxa3xx-nand: 
[    5.590337] NDCR:  0xdd079fff
[    5.590337] NDCB0: 0x000d3000
[    5.590337] NDCB1: 0x24810000
[    5.590337] NDCB2: 0x00000000
[    5.590337] NDCB3: 0x00000000
[    5.609318] marvell-nfc pxa3xx-nand: 
[    5.609318] NDCR:  0x9d079fff
[    5.609318] NDCB0: 0x000d3000
[    5.609318] NDCB1: 0x24810000
[    5.609318] NDCB2: 0x00000000
[    5.609318] NDCB3: 0x00000000
[    5.628426] marvell-nfc pxa3xx-nand: 
[    5.628426] NDCR:  0xdd079fff
[    5.628426] NDCB0: 0x000d3000
[    5.628426] NDCB1: 0x24c00000
[    5.628426] NDCB2: 0x00000000
[    5.628426] NDCB3: 0x00000000
[    5.647489] marvell-nfc pxa3xx-nand: 
[    5.647489] NDCR:  0xdd079fff
[    5.647489] NDCB0: 0x000d3000
[    5.647489] NDCB1: 0x24c10000
[    5.647489] NDCB2: 0x00000000
[    5.647489] NDCB3: 0x00000000
[    5.666475] marvell-nfc pxa3xx-nand: 
[    5.666475] NDCR:  0x9d079fff
[    5.666475] NDCB0: 0x000d3000
[    5.666475] NDCB1: 0x24c10000
[    5.666475] NDCB2: 0x00000000
[    5.666475] NDCB3: 0x00000000
[    5.685575] marvell-nfc pxa3xx-nand: 
[    5.685575] NDCR:  0xdd079fff
[    5.685575] NDCB0: 0x000d3000
[    5.685575] NDCB1: 0x25000000
[    5.685575] NDCB2: 0x00000000
[    5.685575] NDCB3: 0x00000000
[    5.704632] marvell-nfc pxa3xx-nand: 
[    5.704632] NDCR:  0xdd079fff
[    5.704632] NDCB0: 0x000d3000
[    5.704632] NDCB1: 0x25010000
[    5.704632] NDCB2: 0x00000000
[    5.704632] NDCB3: 0x00000000
[    5.723609] marvell-nfc pxa3xx-nand: 
[    5.723609] NDCR:  0x9d079fff
[    5.723609] NDCB0: 0x000d3000
[    5.723609] NDCB1: 0x25010000
[    5.723609] NDCB2: 0x00000000
[    5.723609] NDCB3: 0x00000000
[    5.742713] marvell-nfc pxa3xx-nand: 
[    5.742713] NDCR:  0xdd079fff
[    5.742713] NDCB0: 0x000d3000
[    5.742713] NDCB1: 0x25400000
[    5.742713] NDCB2: 0x00000000
[    5.742713] NDCB3: 0x00000000
[    5.761769] marvell-nfc pxa3xx-nand: 
[    5.761769] NDCR:  0xdd079fff
[    5.761769] NDCB0: 0x000d3000
[    5.761769] NDCB1: 0x25410000
[    5.761769] NDCB2: 0x00000000
[    5.761769] NDCB3: 0x00000000
[    5.780750] marvell-nfc pxa3xx-nand: 
[    5.780750] NDCR:  0x9d079fff
[    5.780750] NDCB0: 0x000d3000
[    5.780750] NDCB1: 0x25410000
[    5.780750] NDCB2: 0x00000000
[    5.780750] NDCB3: 0x00000000
[    5.799855] marvell-nfc pxa3xx-nand: 
[    5.799855] NDCR:  0xdd079fff
[    5.799855] NDCB0: 0x000d3000
[    5.799855] NDCB1: 0x25800000
[    5.799855] NDCB2: 0x00000000
[    5.799855] NDCB3: 0x00000000
[    5.818918] marvell-nfc pxa3xx-nand: 
[    5.818918] NDCR:  0xdd079fff
[    5.818918] NDCB0: 0x000d3000
[    5.818918] NDCB1: 0x25810000
[    5.818918] NDCB2: 0x00000000
[    5.818918] NDCB3: 0x00000000
[    5.837903] marvell-nfc pxa3xx-nand: 
[    5.837903] NDCR:  0x9d079fff
[    5.837903] NDCB0: 0x000d3000
[    5.837903] NDCB1: 0x25810000
[    5.837903] NDCB2: 0x00000000
[    5.837903] NDCB3: 0x00000000
[    5.857009] marvell-nfc pxa3xx-nand: 
[    5.857009] NDCR:  0xdd079fff
[    5.857009] NDCB0: 0x000d3000
[    5.857009] NDCB1: 0x25c00000
[    5.857009] NDCB2: 0x00000000
[    5.857009] NDCB3: 0x00000000
[    5.876071] marvell-nfc pxa3xx-nand: 
[    5.876071] NDCR:  0xdd079fff
[    5.876071] NDCB0: 0x000d3000
[    5.876071] NDCB1: 0x25c10000
[    5.876071] NDCB2: 0x00000000
[    5.876071] NDCB3: 0x00000000
[    5.895047] marvell-nfc pxa3xx-nand: 
[    5.895047] NDCR:  0x9d079fff
[    5.895047] NDCB0: 0x000d3000
[    5.895047] NDCB1: 0x25c10000
[    5.895047] NDCB2: 0x00000000
[    5.895047] NDCB3: 0x00000000
[    5.914152] marvell-nfc pxa3xx-nand: 
[    5.914152] NDCR:  0xdd079fff
[    5.914152] NDCB0: 0x000d3000
[    5.914152] NDCB1: 0x26000000
[    5.914152] NDCB2: 0x00000000
[    5.914152] NDCB3: 0x00000000
[    5.933285] marvell-nfc pxa3xx-nand: 
[    5.933285] NDCR:  0xdd079fff
[    5.933285] NDCB0: 0x000d3000
[    5.933285] NDCB1: 0x26010000
[    5.933285] NDCB2: 0x00000000
[    5.933285] NDCB3: 0x00000000
[    5.952247] marvell-nfc pxa3xx-nand: 
[    5.952247] NDCR:  0x9d079fff
[    5.952247] NDCB0: 0x000d3000
[    5.952247] NDCB1: 0x26010000
[    5.952247] NDCB2: 0x00000000
[    5.952247] NDCB3: 0x00000000
[    5.971354] marvell-nfc pxa3xx-nand: 
[    5.971354] NDCR:  0xdd079fff
[    5.971354] NDCB0: 0x000d3000
[    5.971354] NDCB1: 0x26400000
[    5.971354] NDCB2: 0x00000000
[    5.971354] NDCB3: 0x00000000
[    5.990415] marvell-nfc pxa3xx-nand: 
[    5.990415] NDCR:  0xdd079fff
[    5.990415] NDCB0: 0x000d3000
[    5.990415] NDCB1: 0x26410000
[    5.990415] NDCB2: 0x00000000
[    5.990415] NDCB3: 0x00000000
[    6.009391] marvell-nfc pxa3xx-nand: 
[    6.009391] NDCR:  0x9d079fff
[    6.009391] NDCB0: 0x000d3000
[    6.009391] NDCB1: 0x26410000
[    6.009391] NDCB2: 0x00000000
[    6.009391] NDCB3: 0x00000000
[    6.028510] marvell-nfc pxa3xx-nand: 
[    6.028510] NDCR:  0xdd079fff
[    6.028510] NDCB0: 0x000d3000
[    6.028510] NDCB1: 0x26800000
[    6.028510] NDCB2: 0x00000000
[    6.028510] NDCB3: 0x00000000
[    6.047572] marvell-nfc pxa3xx-nand: 
[    6.047572] NDCR:  0xdd079fff
[    6.047572] NDCB0: 0x000d3000
[    6.047572] NDCB1: 0x26810000
[    6.047572] NDCB2: 0x00000000
[    6.047572] NDCB3: 0x00000000
[    6.066553] marvell-nfc pxa3xx-nand: 
[    6.066553] NDCR:  0x9d079fff
[    6.066553] NDCB0: 0x000d3000
[    6.066553] NDCB1: 0x26810000
[    6.066553] NDCB2: 0x00000000
[    6.066553] NDCB3: 0x00000000
[    6.085662] marvell-nfc pxa3xx-nand: 
[    6.085662] NDCR:  0xdd079fff
[    6.085662] NDCB0: 0x000d3000
[    6.085662] NDCB1: 0x26c00000
[    6.085662] NDCB2: 0x00000000
[    6.085662] NDCB3: 0x00000000
[    6.105275] marvell-nfc pxa3xx-nand: 
[    6.105275] NDCR:  0xdd079fff
[    6.105275] NDCB0: 0x000d3000
[    6.105275] NDCB1: 0x26c10000
[    6.105275] NDCB2: 0x00000000
[    6.105275] NDCB3: 0x00000000
[    6.124291] marvell-nfc pxa3xx-nand: 
[    6.124291] NDCR:  0x9d079fff
[    6.124291] NDCB0: 0x000d3000
[    6.124291] NDCB1: 0x26c10000
[    6.124291] NDCB2: 0x00000000
[    6.124291] NDCB3: 0x00000000
[    6.143431] marvell-nfc pxa3xx-nand: 
[    6.143431] NDCR:  0xdd079fff
[    6.143431] NDCB0: 0x000d3000
[    6.143431] NDCB1: 0x27000000
[    6.143431] NDCB2: 0x00000000
[    6.143431] NDCB3: 0x00000000
[    6.162492] marvell-nfc pxa3xx-nand: 
[    6.162492] NDCR:  0xdd079fff
[    6.162492] NDCB0: 0x000d3000
[    6.162492] NDCB1: 0x27010000
[    6.162492] NDCB2: 0x00000000
[    6.162492] NDCB3: 0x00000000
[    6.181482] marvell-nfc pxa3xx-nand: 
[    6.181482] NDCR:  0x9d079fff
[    6.181482] NDCB0: 0x000d3000
[    6.181482] NDCB1: 0x27010000
[    6.181482] NDCB2: 0x00000000
[    6.181482] NDCB3: 0x00000000
[    6.200594] marvell-nfc pxa3xx-nand: 
[    6.200594] NDCR:  0xdd079fff
[    6.200594] NDCB0: 0x000d3000
[    6.200594] NDCB1: 0x27400000
[    6.200594] NDCB2: 0x00000000
[    6.200594] NDCB3: 0x00000000
[    6.219651] marvell-nfc pxa3xx-nand: 
[    6.219651] NDCR:  0xdd079fff
[    6.219651] NDCB0: 0x000d3000
[    6.219651] NDCB1: 0x27410000
[    6.219651] NDCB2: 0x00000000
[    6.219651] NDCB3: 0x00000000
[    6.238628] marvell-nfc pxa3xx-nand: 
[    6.238628] NDCR:  0x9d079fff
[    6.238628] NDCB0: 0x000d3000
[    6.238628] NDCB1: 0x27410000
[    6.238628] NDCB2: 0x00000000
[    6.238628] NDCB3: 0x00000000
[    6.257763] marvell-nfc pxa3xx-nand: 
[    6.257763] NDCR:  0xdd079fff
[    6.257763] NDCB0: 0x000d3000
[    6.257763] NDCB1: 0x27800000
[    6.257763] NDCB2: 0x00000000
[    6.257763] NDCB3: 0x00000000
[    6.276826] marvell-nfc pxa3xx-nand: 
[    6.276826] NDCR:  0xdd079fff
[    6.276826] NDCB0: 0x000d3000
[    6.276826] NDCB1: 0x27810000
[    6.276826] NDCB2: 0x00000000
[    6.276826] NDCB3: 0x00000000
[    6.295914] marvell-nfc pxa3xx-nand: 
[    6.295914] NDCR:  0xdd079fff
[    6.295914] NDCB0: 0x000d3000
[    6.295914] NDCB1: 0x27c00000
[    6.295914] NDCB2: 0x00000000
[    6.295914] NDCB3: 0x00000000
[    6.314978] marvell-nfc pxa3xx-nand: 
[    6.314978] NDCR:  0xdd079fff
[    6.314978] NDCB0: 0x000d3000
[    6.314978] NDCB1: 0x27c10000
[    6.314978] NDCB2: 0x00000000
[    6.314978] NDCB3: 0x00000000
[    6.333957] marvell-nfc pxa3xx-nand: 
[    6.333957] NDCR:  0x9d079fff
[    6.333957] NDCB0: 0x000d3000
[    6.333957] NDCB1: 0x27c10000
[    6.333957] NDCB2: 0x00000000
[    6.333957] NDCB3: 0x00000000
[    6.353164] marvell-nfc pxa3xx-nand: 
[    6.353164] NDCR:  0xdd079fff
[    6.353164] NDCB0: 0x000d3000
[    6.353164] NDCB1: 0x28000000
[    6.353164] NDCB2: 0x00000000
[    6.353164] NDCB3: 0x00000000
[    6.372184] marvell-nfc pxa3xx-nand: 
[    6.372184] NDCR:  0xdd079fff
[    6.372184] NDCB0: 0x000d3000
[    6.372184] NDCB1: 0x28010000
[    6.372184] NDCB2: 0x00000000
[    6.372184] NDCB3: 0x00000000
[    6.391168] marvell-nfc pxa3xx-nand: 
[    6.391168] NDCR:  0x9d079fff
[    6.391168] NDCB0: 0x000d3000
[    6.391168] NDCB1: 0x28010000
[    6.391168] NDCB2: 0x00000000
[    6.391168] NDCB3: 0x00000000
[    6.410268] marvell-nfc pxa3xx-nand: 
[    6.410268] NDCR:  0xdd079fff
[    6.410268] NDCB0: 0x000d3000
[    6.410268] NDCB1: 0x28400000
[    6.410268] NDCB2: 0x00000000
[    6.410268] NDCB3: 0x00000000
[    6.429335] marvell-nfc pxa3xx-nand: 
[    6.429335] NDCR:  0xdd079fff
[    6.429335] NDCB0: 0x000d3000
[    6.429335] NDCB1: 0x28410000
[    6.429335] NDCB2: 0x00000000
[    6.429335] NDCB3: 0x00000000
[    6.448408] marvell-nfc pxa3xx-nand: 
[    6.448408] NDCR:  0xdd079fff
[    6.448408] NDCB0: 0x000d3000
[    6.448408] NDCB1: 0x28800000
[    6.448408] NDCB2: 0x00000000
[    6.448408] NDCB3: 0x00000000
[    6.467471] marvell-nfc pxa3xx-nand: 
[    6.467471] NDCR:  0xdd079fff
[    6.467471] NDCB0: 0x000d3000
[    6.467471] NDCB1: 0x28810000
[    6.467471] NDCB2: 0x00000000
[    6.467471] NDCB3: 0x00000000
[    6.486456] marvell-nfc pxa3xx-nand: 
[    6.486456] NDCR:  0x9d079fff
[    6.486456] NDCB0: 0x000d3000
[    6.486456] NDCB1: 0x28810000
[    6.486456] NDCB2: 0x00000000
[    6.486456] NDCB3: 0x00000000
[    6.505554] marvell-nfc pxa3xx-nand: 
[    6.505554] NDCR:  0xdd079fff
[    6.505554] NDCB0: 0x000d3000
[    6.505554] NDCB1: 0x28c00000
[    6.505554] NDCB2: 0x00000000
[    6.505554] NDCB3: 0x00000000
[    6.524610] marvell-nfc pxa3xx-nand: 
[    6.524610] NDCR:  0xdd079fff
[    6.524610] NDCB0: 0x000d3000
[    6.524610] NDCB1: 0x28c10000
[    6.524610] NDCB2: 0x00000000
[    6.524610] NDCB3: 0x00000000
[    6.543589] marvell-nfc pxa3xx-nand: 
[    6.543589] NDCR:  0x9d079fff
[    6.543589] NDCB0: 0x000d3000
[    6.543589] NDCB1: 0x28c10000
[    6.543589] NDCB2: 0x00000000
[    6.543589] NDCB3: 0x00000000
[    6.562688] marvell-nfc pxa3xx-nand: 
[    6.562688] NDCR:  0xdd079fff
[    6.562688] NDCB0: 0x000d3000
[    6.562688] NDCB1: 0x29000000
[    6.562688] NDCB2: 0x00000000
[    6.562688] NDCB3: 0x00000000
[    6.581750] marvell-nfc pxa3xx-nand: 
[    6.581750] NDCR:  0xdd079fff
[    6.581750] NDCB0: 0x000d3000
[    6.581750] NDCB1: 0x29010000
[    6.581750] NDCB2: 0x00000000
[    6.581750] NDCB3: 0x00000000
[    6.600735] marvell-nfc pxa3xx-nand: 
[    6.600735] NDCR:  0x9d079fff
[    6.600735] NDCB0: 0x000d3000
[    6.600735] NDCB1: 0x29010000
[    6.600735] NDCB2: 0x00000000
[    6.600735] NDCB3: 0x00000000
[    6.619839] marvell-nfc pxa3xx-nand: 
[    6.619839] NDCR:  0xdd079fff
[    6.619839] NDCB0: 0x000d3000
[    6.619839] NDCB1: 0x29400000
[    6.619839] NDCB2: 0x00000000
[    6.619839] NDCB3: 0x00000000
[    6.638902] marvell-nfc pxa3xx-nand: 
[    6.638902] NDCR:  0xdd079fff
[    6.638902] NDCB0: 0x000d3000
[    6.638902] NDCB1: 0x29410000
[    6.638902] NDCB2: 0x00000000
[    6.638902] NDCB3: 0x00000000
[    6.657879] marvell-nfc pxa3xx-nand: 
[    6.657879] NDCR:  0x9d079fff
[    6.657879] NDCB0: 0x000d3000
[    6.657879] NDCB1: 0x29410000
[    6.657879] NDCB2: 0x00000000
[    6.657879] NDCB3: 0x00000000
[    6.676983] marvell-nfc pxa3xx-nand: 
[    6.676983] NDCR:  0xdd079fff
[    6.676983] NDCB0: 0x000d3000
[    6.676983] NDCB1: 0x29800000
[    6.676983] NDCB2: 0x00000000
[    6.676983] NDCB3: 0x00000000
[    6.696050] marvell-nfc pxa3xx-nand: 
[    6.696050] NDCR:  0xdd079fff
[    6.696050] NDCB0: 0x000d3000
[    6.696050] NDCB1: 0x29810000
[    6.696050] NDCB2: 0x00000000
[    6.696050] NDCB3: 0x00000000
[    6.715033] marvell-nfc pxa3xx-nand: 
[    6.715033] NDCR:  0x9d079fff
[    6.715033] NDCB0: 0x000d3000
[    6.715033] NDCB1: 0x29810000
[    6.715033] NDCB2: 0x00000000
[    6.715033] NDCB3: 0x00000000
[    6.734141] marvell-nfc pxa3xx-nand: 
[    6.734141] NDCR:  0xdd079fff
[    6.734141] NDCB0: 0x000d3000
[    6.734141] NDCB1: 0x29c00000
[    6.734141] NDCB2: 0x00000000
[    6.734141] NDCB3: 0x00000000
[    6.753291] marvell-nfc pxa3xx-nand: 
[    6.753291] NDCR:  0xdd079fff
[    6.753291] NDCB0: 0x000d3000
[    6.753291] NDCB1: 0x29c10000
[    6.753291] NDCB2: 0x00000000
[    6.753291] NDCB3: 0x00000000
[    6.772264] marvell-nfc pxa3xx-nand: 
[    6.772264] NDCR:  0x9d079fff
[    6.772264] NDCB0: 0x000d3000
[    6.772264] NDCB1: 0x29c10000
[    6.772264] NDCB2: 0x00000000
[    6.772264] NDCB3: 0x00000000
[    6.791367] marvell-nfc pxa3xx-nand: 
[    6.791367] NDCR:  0xdd079fff
[    6.791367] NDCB0: 0x000d3000
[    6.791367] NDCB1: 0x2a000000
[    6.791367] NDCB2: 0x00000000
[    6.791367] NDCB3: 0x00000000
[    6.810425] marvell-nfc pxa3xx-nand: 
[    6.810425] NDCR:  0xdd079fff
[    6.810425] NDCB0: 0x000d3000
[    6.810425] NDCB1: 0x2a010000
[    6.810425] NDCB2: 0x00000000
[    6.810425] NDCB3: 0x00000000
[    6.829403] marvell-nfc pxa3xx-nand: 
[    6.829403] NDCR:  0x9d079fff
[    6.829403] NDCB0: 0x000d3000
[    6.829403] NDCB1: 0x2a010000
[    6.829403] NDCB2: 0x00000000
[    6.829403] NDCB3: 0x00000000
[    6.848512] marvell-nfc pxa3xx-nand: 
[    6.848512] NDCR:  0xdd079fff
[    6.848512] NDCB0: 0x000d3000
[    6.848512] NDCB1: 0x2a400000
[    6.848512] NDCB2: 0x00000000
[    6.848512] NDCB3: 0x00000000
[    6.867573] marvell-nfc pxa3xx-nand: 
[    6.867573] NDCR:  0xdd079fff
[    6.867573] NDCB0: 0x000d3000
[    6.867573] NDCB1: 0x2a410000
[    6.867573] NDCB2: 0x00000000
[    6.867573] NDCB3: 0x00000000
[    6.886550] marvell-nfc pxa3xx-nand: 
[    6.886550] NDCR:  0x9d079fff
[    6.886550] NDCB0: 0x000d3000
[    6.886550] NDCB1: 0x2a410000
[    6.886550] NDCB2: 0x00000000
[    6.886550] NDCB3: 0x00000000
[    6.905653] marvell-nfc pxa3xx-nand: 
[    6.905653] NDCR:  0xdd079fff
[    6.905653] NDCB0: 0x000d3000
[    6.905653] NDCB1: 0x2a800000
[    6.905653] NDCB2: 0x00000000
[    6.905653] NDCB3: 0x00000000
[    6.924720] marvell-nfc pxa3xx-nand: 
[    6.924720] NDCR:  0xdd079fff
[    6.924720] NDCB0: 0x000d3000
[    6.924720] NDCB1: 0x2a810000
[    6.924720] NDCB2: 0x00000000
[    6.924720] NDCB3: 0x00000000
[    6.943704] marvell-nfc pxa3xx-nand: 
[    6.943704] NDCR:  0x9d079fff
[    6.943704] NDCB0: 0x000d3000
[    6.943704] NDCB1: 0x2a810000
[    6.943704] NDCB2: 0x00000000
[    6.943704] NDCB3: 0x00000000
[    6.962806] marvell-nfc pxa3xx-nand: 
[    6.962806] NDCR:  0xdd079fff
[    6.962806] NDCB0: 0x000d3000
[    6.962806] NDCB1: 0x2ac00000
[    6.962806] NDCB2: 0x00000000
[    6.962806] NDCB3: 0x00000000
[    6.981868] marvell-nfc pxa3xx-nand: 
[    6.981868] NDCR:  0xdd079fff
[    6.981868] NDCB0: 0x000d3000
[    6.981868] NDCB1: 0x2ac10000
[    6.981868] NDCB2: 0x00000000
[    6.981868] NDCB3: 0x00000000
[    7.000848] marvell-nfc pxa3xx-nand: 
[    7.000848] NDCR:  0x9d079fff
[    7.000848] NDCB0: 0x000d3000
[    7.000848] NDCB1: 0x2ac10000
[    7.000848] NDCB2: 0x00000000
[    7.000848] NDCB3: 0x00000000
[    7.019966] marvell-nfc pxa3xx-nand: 
[    7.019966] NDCR:  0xdd079fff
[    7.019966] NDCB0: 0x000d3000
[    7.019966] NDCB1: 0x2b000000
[    7.019966] NDCB2: 0x00000000
[    7.019966] NDCB3: 0x00000000
[    7.039028] marvell-nfc pxa3xx-nand: 
[    7.039028] NDCR:  0xdd079fff
[    7.039028] NDCB0: 0x000d3000
[    7.039028] NDCB1: 0x2b010000
[    7.039028] NDCB2: 0x00000000
[    7.039028] NDCB3: 0x00000000
[    7.058002] marvell-nfc pxa3xx-nand: 
[    7.058002] NDCR:  0x9d079fff
[    7.058002] NDCB0: 0x000d3000
[    7.058002] NDCB1: 0x2b010000
[    7.058002] NDCB2: 0x00000000
[    7.058002] NDCB3: 0x00000000
[    7.077109] marvell-nfc pxa3xx-nand: 
[    7.077109] NDCR:  0xdd079fff
[    7.077109] NDCB0: 0x000d3000
[    7.077109] NDCB1: 0x2b400000
[    7.077109] NDCB2: 0x00000000
[    7.077109] NDCB3: 0x00000000
[    7.096173] marvell-nfc pxa3xx-nand: 
[    7.096173] NDCR:  0xdd079fff
[    7.096173] NDCB0: 0x000d3000
[    7.096173] NDCB1: 0x2b410000
[    7.096173] NDCB2: 0x00000000
[    7.096173] NDCB3: 0x00000000
[    7.115153] marvell-nfc pxa3xx-nand: 
[    7.115153] NDCR:  0x9d079fff
[    7.115153] NDCB0: 0x000d3000
[    7.115153] NDCB1: 0x2b410000
[    7.115153] NDCB2: 0x00000000
[    7.115153] NDCB3: 0x00000000
[    7.134255] marvell-nfc pxa3xx-nand: 
[    7.134255] NDCR:  0xdd079fff
[    7.134255] NDCB0: 0x000d3000
[    7.134255] NDCB1: 0x2b800000
[    7.134255] NDCB2: 0x00000000
[    7.134255] NDCB3: 0x00000000
[    7.153307] marvell-nfc pxa3xx-nand: 
[    7.153307] NDCR:  0xdd079fff
[    7.153307] NDCB0: 0x000d3000
[    7.153307] NDCB1: 0x2b810000
[    7.153307] NDCB2: 0x00000000
[    7.153307] NDCB3: 0x00000000
[    7.172279] marvell-nfc pxa3xx-nand: 
[    7.172279] NDCR:  0x9d079fff
[    7.172279] NDCB0: 0x000d3000
[    7.172279] NDCB1: 0x2b810000
[    7.172279] NDCB2: 0x00000000
[    7.172279] NDCB3: 0x00000000
[    7.191385] marvell-nfc pxa3xx-nand: 
[    7.191385] NDCR:  0xdd079fff
[    7.191385] NDCB0: 0x000d3000
[    7.191385] NDCB1: 0x2bc00000
[    7.191385] NDCB2: 0x00000000
[    7.191385] NDCB3: 0x00000000
[    7.210447] marvell-nfc pxa3xx-nand: 
[    7.210447] NDCR:  0xdd079fff
[    7.210447] NDCB0: 0x000d3000
[    7.210447] NDCB1: 0x2bc10000
[    7.210447] NDCB2: 0x00000000
[    7.210447] NDCB3: 0x00000000
[    7.229426] marvell-nfc pxa3xx-nand: 
[    7.229426] NDCR:  0x9d079fff
[    7.229426] NDCB0: 0x000d3000
[    7.229426] NDCB1: 0x2bc10000
[    7.229426] NDCB2: 0x00000000
[    7.229426] NDCB3: 0x00000000
[    7.248529] marvell-nfc pxa3xx-nand: 
[    7.248529] NDCR:  0xdd079fff
[    7.248529] NDCB0: 0x000d3000
[    7.248529] NDCB1: 0x2c000000
[    7.248529] NDCB2: 0x00000000
[    7.248529] NDCB3: 0x00000000
[    7.267597] marvell-nfc pxa3xx-nand: 
[    7.267597] NDCR:  0xdd079fff
[    7.267597] NDCB0: 0x000d3000
[    7.267597] NDCB1: 0x2c010000
[    7.267597] NDCB2: 0x00000000
[    7.267597] NDCB3: 0x00000000
[    7.286579] marvell-nfc pxa3xx-nand: 
[    7.286579] NDCR:  0x9d079fff
[    7.286579] NDCB0: 0x000d3000
[    7.286579] NDCB1: 0x2c010000
[    7.286579] NDCB2: 0x00000000
[    7.286579] NDCB3: 0x00000000
[    7.305683] marvell-nfc pxa3xx-nand: 
[    7.305683] NDCR:  0xdd079fff
[    7.305683] NDCB0: 0x000d3000
[    7.305683] NDCB1: 0x2c400000
[    7.305683] NDCB2: 0x00000000
[    7.305683] NDCB3: 0x00000000
[    7.324747] marvell-nfc pxa3xx-nand: 
[    7.324747] NDCR:  0xdd079fff
[    7.324747] NDCB0: 0x000d3000
[    7.324747] NDCB1: 0x2c410000
[    7.324747] NDCB2: 0x00000000
[    7.324747] NDCB3: 0x00000000
[    7.343743] marvell-nfc pxa3xx-nand: 
[    7.343743] NDCR:  0x9d079fff
[    7.343743] NDCB0: 0x000d3000
[    7.343743] NDCB1: 0x2c410000
[    7.343743] NDCB2: 0x00000000
[    7.343743] NDCB3: 0x00000000
[    7.362843] marvell-nfc pxa3xx-nand: 
[    7.362843] NDCR:  0xdd079fff
[    7.362843] NDCB0: 0x000d3000
[    7.362843] NDCB1: 0x2c800000
[    7.362843] NDCB2: 0x00000000
[    7.362843] NDCB3: 0x00000000
[    7.381905] marvell-nfc pxa3xx-nand: 
[    7.381905] NDCR:  0xdd079fff
[    7.381905] NDCB0: 0x000d3000
[    7.381905] NDCB1: 0x2c810000
[    7.381905] NDCB2: 0x00000000
[    7.381905] NDCB3: 0x00000000
[    7.400887] marvell-nfc pxa3xx-nand: 
[    7.400887] NDCR:  0x9d079fff
[    7.400887] NDCB0: 0x000d3000
[    7.400887] NDCB1: 0x2c810000
[    7.400887] NDCB2: 0x00000000
[    7.400887] NDCB3: 0x00000000
[    7.420884] marvell-nfc pxa3xx-nand: 
[    7.420884] NDCR:  0xdd079fff
[    7.420884] NDCB0: 0x000d3000
[    7.420884] NDCB1: 0x50800000
[    7.420884] NDCB2: 0x00000000
[    7.420884] NDCB3: 0x00000000
[    7.439944] marvell-nfc pxa3xx-nand: 
[    7.439944] NDCR:  0xdd079fff
[    7.439944] NDCB0: 0x000d3000
[    7.439944] NDCB1: 0x50810000
[    7.439944] NDCB2: 0x00000000
[    7.439944] NDCB3: 0x00000000
[    7.458920] marvell-nfc pxa3xx-nand: 
[    7.458920] NDCR:  0x9d079fff
[    7.458920] NDCB0: 0x000d3000
[    7.458920] NDCB1: 0x50810000
[    7.458920] NDCB2: 0x00000000
[    7.458920] NDCB3: 0x00000000
[    7.478025] marvell-nfc pxa3xx-nand: 
[    7.478025] NDCR:  0xdd079fff
[    7.478025] NDCB0: 0x000d3000
[    7.478025] NDCB1: 0x50c00000
[    7.478025] NDCB2: 0x00000000
[    7.478025] NDCB3: 0x00000000
[    7.497089] marvell-nfc pxa3xx-nand: 
[    7.497089] NDCR:  0xdd079fff
[    7.497089] NDCB0: 0x000d3000
[    7.497089] NDCB1: 0x50c10000
[    7.497089] NDCB2: 0x00000000
[    7.497089] NDCB3: 0x00000000
[    7.516067] marvell-nfc pxa3xx-nand: 
[    7.516067] NDCR:  0x9d079fff
[    7.516067] NDCB0: 0x000d3000
[    7.516067] NDCB1: 0x50c10000
[    7.516067] NDCB2: 0x00000000
[    7.516067] NDCB3: 0x00000000
[    7.535172] marvell-nfc pxa3xx-nand: 
[    7.535172] NDCR:  0xdd079fff
[    7.535172] NDCB0: 0x000d3000
[    7.535172] NDCB1: 0x51000000
[    7.535172] NDCB2: 0x00000000
[    7.535172] NDCB3: 0x00000000
[    7.554233] marvell-nfc pxa3xx-nand: 
[    7.554233] NDCR:  0xdd079fff
[    7.554233] NDCB0: 0x000d3000
[    7.554233] NDCB1: 0x51010000
[    7.554233] NDCB2: 0x00000000
[    7.554233] NDCB3: 0x00000000
[    7.573238] marvell-nfc pxa3xx-nand: 
[    7.573238] NDCR:  0x9d079fff
[    7.573238] NDCB0: 0x000d3000
[    7.573238] NDCB1: 0x51010000
[    7.573238] NDCB2: 0x00000000
[    7.573238] NDCB3: 0x00000000
[    7.592334] marvell-nfc pxa3xx-nand: 
[    7.592334] NDCR:  0xdd079fff
[    7.592334] NDCB0: 0x000d3000
[    7.592334] NDCB1: 0x51400000
[    7.592334] NDCB2: 0x00000000
[    7.592334] NDCB3: 0x00000000
[    7.611401] marvell-nfc pxa3xx-nand: 
[    7.611401] NDCR:  0xdd079fff
[    7.611401] NDCB0: 0x000d3000
[    7.611401] NDCB1: 0x51410000
[    7.611401] NDCB2: 0x00000000
[    7.611401] NDCB3: 0x00000000
[    7.630384] marvell-nfc pxa3xx-nand: 
[    7.630384] NDCR:  0x9d079fff
[    7.630384] NDCB0: 0x000d3000
[    7.630384] NDCB1: 0x51410000
[    7.630384] NDCB2: 0x00000000
[    7.630384] NDCB3: 0x00000000
[    7.649492] marvell-nfc pxa3xx-nand: 
[    7.649492] NDCR:  0xdd079fff
[    7.649492] NDCB0: 0x000d3000
[    7.649492] NDCB1: 0x51800000
[    7.649492] NDCB2: 0x00000000
[    7.649492] NDCB3: 0x00000000
[    7.668554] marvell-nfc pxa3xx-nand: 
[    7.668554] NDCR:  0xdd079fff
[    7.668554] NDCB0: 0x000d3000
[    7.668554] NDCB1: 0x51810000
[    7.668554] NDCB2: 0x00000000
[    7.668554] NDCB3: 0x00000000
[    7.687527] marvell-nfc pxa3xx-nand: 
[    7.687527] NDCR:  0x9d079fff
[    7.687527] NDCB0: 0x000d3000
[    7.687527] NDCB1: 0x51810000
[    7.687527] NDCB2: 0x00000000
[    7.687527] NDCB3: 0x00000000
[    7.706637] marvell-nfc pxa3xx-nand: 
[    7.706637] NDCR:  0xdd079fff
[    7.706637] NDCB0: 0x000d3000
[    7.706637] NDCB1: 0x51c00000
[    7.706637] NDCB2: 0x00000000
[    7.706637] NDCB3: 0x00000000
[    7.725697] marvell-nfc pxa3xx-nand: 
[    7.725697] NDCR:  0xdd079fff
[    7.725697] NDCB0: 0x000d3000
[    7.725697] NDCB1: 0x51c10000
[    7.725697] NDCB2: 0x00000000
[    7.725697] NDCB3: 0x00000000
[    7.744674] marvell-nfc pxa3xx-nand: 
[    7.744674] NDCR:  0x9d079fff
[    7.744674] NDCB0: 0x000d3000
[    7.744674] NDCB1: 0x51c10000
[    7.744674] NDCB2: 0x00000000
[    7.744674] NDCB3: 0x00000000
[    7.763781] marvell-nfc pxa3xx-nand: 
[    7.763781] NDCR:  0xdd079fff
[    7.763781] NDCB0: 0x000d3000
[    7.763781] NDCB1: 0x52000000
[    7.763781] NDCB2: 0x00000000
[    7.763781] NDCB3: 0x00000000
[    7.782838] marvell-nfc pxa3xx-nand: 
[    7.782838] NDCR:  0xdd079fff
[    7.782838] NDCB0: 0x000d3000
[    7.782838] NDCB1: 0x52010000
[    7.782838] NDCB2: 0x00000000
[    7.782838] NDCB3: 0x00000000
[    7.801814] marvell-nfc pxa3xx-nand: 
[    7.801814] NDCR:  0x9d079fff
[    7.801814] NDCB0: 0x000d3000
[    7.801814] NDCB1: 0x52010000
[    7.801814] NDCB2: 0x00000000
[    7.801814] NDCB3: 0x00000000
[    7.820919] marvell-nfc pxa3xx-nand: 
[    7.820919] NDCR:  0xdd079fff
[    7.820919] NDCB0: 0x000d3000
[    7.820919] NDCB1: 0x52400000
[    7.820919] NDCB2: 0x00000000
[    7.820919] NDCB3: 0x00000000
[    7.839984] marvell-nfc pxa3xx-nand: 
[    7.839984] NDCR:  0xdd079fff
[    7.839984] NDCB0: 0x000d3000
[    7.839984] NDCB1: 0x52410000
[    7.839984] NDCB2: 0x00000000
[    7.839984] NDCB3: 0x00000000
[    7.858968] marvell-nfc pxa3xx-nand: 
[    7.858968] NDCR:  0x9d079fff
[    7.858968] NDCB0: 0x000d3000
[    7.858968] NDCB1: 0x52410000
[    7.858968] NDCB2: 0x00000000
[    7.858968] NDCB3: 0x00000000
[    7.878070] marvell-nfc pxa3xx-nand: 
[    7.878070] NDCR:  0xdd079fff
[    7.878070] NDCB0: 0x000d3000
[    7.878070] NDCB1: 0x52800000
[    7.878070] NDCB2: 0x00000000
[    7.878070] NDCB3: 0x00000000
[    7.897127] marvell-nfc pxa3xx-nand: 
[    7.897127] NDCR:  0xdd079fff
[    7.897127] NDCB0: 0x000d3000
[    7.897127] NDCB1: 0x52810000
[    7.897127] NDCB2: 0x00000000
[    7.897127] NDCB3: 0x00000000
[    7.916104] marvell-nfc pxa3xx-nand: 
[    7.916104] NDCR:  0x9d079fff
[    7.916104] NDCB0: 0x000d3000
[    7.916104] NDCB1: 0x52810000
[    7.916104] NDCB2: 0x00000000
[    7.916104] NDCB3: 0x00000000
[    7.935231] marvell-nfc pxa3xx-nand: 
[    7.935231] NDCR:  0xdd079fff
[    7.935231] NDCB0: 0x000d3000
[    7.935231] NDCB1: 0x52c00000
[    7.935231] NDCB2: 0x00000000
[    7.935231] NDCB3: 0x00000000
[    7.954292] marvell-nfc pxa3xx-nand: 
[    7.954292] NDCR:  0xdd079fff
[    7.954292] NDCB0: 0x000d3000
[    7.954292] NDCB1: 0x52c10000
[    7.954292] NDCB2: 0x00000000
[    7.954292] NDCB3: 0x00000000
[    7.973328] marvell-nfc pxa3xx-nand: 
[    7.973328] NDCR:  0x9d079fff
[    7.973328] NDCB0: 0x000d3000
[    7.973328] NDCB1: 0x52c10000
[    7.973328] NDCB2: 0x00000000
[    7.973328] NDCB3: 0x00000000
[    7.992424] marvell-nfc pxa3xx-nand: 
[    7.992424] NDCR:  0xdd079fff
[    7.992424] NDCB0: 0x000d3000
[    7.992424] NDCB1: 0x53000000
[    7.992424] NDCB2: 0x00000000
[    7.992424] NDCB3: 0x00000000
[    8.011485] marvell-nfc pxa3xx-nand: 
[    8.011485] NDCR:  0xdd079fff
[    8.011485] NDCB0: 0x000d3000
[    8.011485] NDCB1: 0x53010000
[    8.011485] NDCB2: 0x00000000
[    8.011485] NDCB3: 0x00000000
[    8.030479] marvell-nfc pxa3xx-nand: 
[    8.030479] NDCR:  0x9d079fff
[    8.030479] NDCB0: 0x000d3000
[    8.030479] NDCB1: 0x53010000
[    8.030479] NDCB2: 0x00000000
[    8.030479] NDCB3: 0x00000000
[    8.049579] marvell-nfc pxa3xx-nand: 
[    8.049579] NDCR:  0xdd079fff
[    8.049579] NDCB0: 0x000d3000
[    8.049579] NDCB1: 0x53400000
[    8.049579] NDCB2: 0x00000000
[    8.049579] NDCB3: 0x00000000
[    8.068643] marvell-nfc pxa3xx-nand: 
[    8.068643] NDCR:  0xdd079fff
[    8.068643] NDCB0: 0x000d3000
[    8.068643] NDCB1: 0x53410000
[    8.068643] NDCB2: 0x00000000
[    8.068643] NDCB3: 0x00000000
[    8.087618] marvell-nfc pxa3xx-nand: 
[    8.087618] NDCR:  0x9d079fff
[    8.087618] NDCB0: 0x000d3000
[    8.087618] NDCB1: 0x53410000
[    8.087618] NDCB2: 0x00000000
[    8.087618] NDCB3: 0x00000000
[    8.107355] marvell-nfc pxa3xx-nand: 
[    8.107355] NDCR:  0xdd079fff
[    8.107355] NDCB0: 0x000d3000
[    8.107355] NDCB1: 0x53800000
[    8.107355] NDCB2: 0x00000000
[    8.107355] NDCB3: 0x00000000
[    8.126458] marvell-nfc pxa3xx-nand: 
[    8.126458] NDCR:  0xdd079fff
[    8.126458] NDCB0: 0x000d3000
[    8.126458] NDCB1: 0x53810000
[    8.126458] NDCB2: 0x00000000
[    8.126458] NDCB3: 0x00000000
[    8.145438] marvell-nfc pxa3xx-nand: 
[    8.145438] NDCR:  0x9d079fff
[    8.145438] NDCB0: 0x000d3000
[    8.145438] NDCB1: 0x53810000
[    8.145438] NDCB2: 0x00000000
[    8.145438] NDCB3: 0x00000000
[    8.164543] marvell-nfc pxa3xx-nand: 
[    8.164543] NDCR:  0xdd079fff
[    8.164543] NDCB0: 0x000d3000
[    8.164543] NDCB1: 0x53c00000
[    8.164543] NDCB2: 0x00000000
[    8.164543] NDCB3: 0x00000000
[    8.183607] marvell-nfc pxa3xx-nand: 
[    8.183607] NDCR:  0xdd079fff
[    8.183607] NDCB0: 0x000d3000
[    8.183607] NDCB1: 0x53c10000
[    8.183607] NDCB2: 0x00000000
[    8.183607] NDCB3: 0x00000000
[    8.202574] marvell-nfc pxa3xx-nand: 
[    8.202574] NDCR:  0x9d079fff
[    8.202574] NDCB0: 0x000d3000
[    8.202574] NDCB1: 0x53c10000
[    8.202574] NDCB2: 0x00000000
[    8.202574] NDCB3: 0x00000000
[    8.221680] marvell-nfc pxa3xx-nand: 
[    8.221680] NDCR:  0xdd079fff
[    8.221680] NDCB0: 0x000d3000
[    8.221680] NDCB1: 0x54000000
[    8.221680] NDCB2: 0x00000000
[    8.221680] NDCB3: 0x00000000
[    8.240741] marvell-nfc pxa3xx-nand: 
[    8.240741] NDCR:  0xdd079fff
[    8.240741] NDCB0: 0x000d3000
[    8.240741] NDCB1: 0x54010000
[    8.240741] NDCB2: 0x00000000
[    8.240741] NDCB3: 0x00000000
[    8.259723] marvell-nfc pxa3xx-nand: 
[    8.259723] NDCR:  0x9d079fff
[    8.259723] NDCB0: 0x000d3000
[    8.259723] NDCB1: 0x54010000
[    8.259723] NDCB2: 0x00000000
[    8.259723] NDCB3: 0x00000000
[    8.278825] marvell-nfc pxa3xx-nand: 
[    8.278825] NDCR:  0xdd079fff
[    8.278825] NDCB0: 0x000d3000
[    8.278825] NDCB1: 0x54400000
[    8.278825] NDCB2: 0x00000000
[    8.278825] NDCB3: 0x00000000
[    8.297889] marvell-nfc pxa3xx-nand: 
[    8.297889] NDCR:  0xdd079fff
[    8.297889] NDCB0: 0x000d3000
[    8.297889] NDCB1: 0x54410000
[    8.297889] NDCB2: 0x00000000
[    8.297889] NDCB3: 0x00000000
[    8.316863] marvell-nfc pxa3xx-nand: 
[    8.316863] NDCR:  0x9d079fff
[    8.316863] NDCB0: 0x000d3000
[    8.316863] NDCB1: 0x54410000
[    8.316863] NDCB2: 0x00000000
[    8.316863] NDCB3: 0x00000000
[    8.335976] marvell-nfc pxa3xx-nand: 
[    8.335976] NDCR:  0xdd079fff
[    8.335976] NDCB0: 0x000d3000
[    8.335976] NDCB1: 0x55000000
[    8.335976] NDCB2: 0x00000000
[    8.335976] NDCB3: 0x00000000
[    8.355035] marvell-nfc pxa3xx-nand: 
[    8.355035] NDCR:  0xdd079fff
[    8.355035] NDCB0: 0x000d3000
[    8.355035] NDCB1: 0x55010000
[    8.355035] NDCB2: 0x00000000
[    8.355035] NDCB3: 0x00000000
[    8.374007] marvell-nfc pxa3xx-nand: 
[    8.374007] NDCR:  0x9d079fff
[    8.374007] NDCB0: 0x000d3000
[    8.374007] NDCB1: 0x55010000
[    8.374007] NDCB2: 0x00000000
[    8.374007] NDCB3: 0x00000000
[    8.393202] marvell-nfc pxa3xx-nand: 
[    8.393202] NDCR:  0xdd079fff
[    8.393202] NDCB0: 0x000d3000
[    8.393202] NDCB1: 0x55400000
[    8.393202] NDCB2: 0x00000000
[    8.393202] NDCB3: 0x00000000
[    8.412235] marvell-nfc pxa3xx-nand: 
[    8.412235] NDCR:  0xdd079fff
[    8.412235] NDCB0: 0x000d3000
[    8.412235] NDCB1: 0x55410000
[    8.412235] NDCB2: 0x00000000
[    8.412235] NDCB3: 0x00000000
[    8.431217] marvell-nfc pxa3xx-nand: 
[    8.431217] NDCR:  0x9d079fff
[    8.431217] NDCB0: 0x000d3000
[    8.431217] NDCB1: 0x55410000
[    8.431217] NDCB2: 0x00000000
[    8.431217] NDCB3: 0x00000000
[    8.450325] marvell-nfc pxa3xx-nand: 
[    8.450325] NDCR:  0xdd079fff
[    8.450325] NDCB0: 0x000d3000
[    8.450325] NDCB1: 0x55800000
[    8.450325] NDCB2: 0x00000000
[    8.450325] NDCB3: 0x00000000
[    8.469388] marvell-nfc pxa3xx-nand: 
[    8.469388] NDCR:  0xdd079fff
[    8.469388] NDCB0: 0x000d3000
[    8.469388] NDCB1: 0x55810000
[    8.469388] NDCB2: 0x00000000
[    8.469388] NDCB3: 0x00000000
[    8.488366] marvell-nfc pxa3xx-nand: 
[    8.488366] NDCR:  0x9d079fff
[    8.488366] NDCB0: 0x000d3000
[    8.488366] NDCB1: 0x55810000
[    8.488366] NDCB2: 0x00000000
[    8.488366] NDCB3: 0x00000000
[    8.507471] marvell-nfc pxa3xx-nand: 
[    8.507471] NDCR:  0xdd079fff
[    8.507471] NDCB0: 0x000d3000
[    8.507471] NDCB1: 0x55c00000
[    8.507471] NDCB2: 0x00000000
[    8.507471] NDCB3: 0x00000000
[    8.526556] marvell-nfc pxa3xx-nand: 
[    8.526556] NDCR:  0xdd079fff
[    8.526556] NDCB0: 0x000d3000
[    8.526556] NDCB1: 0x55c10000
[    8.526556] NDCB2: 0x00000000
[    8.526556] NDCB3: 0x00000000
[    8.545537] marvell-nfc pxa3xx-nand: 
[    8.545537] NDCR:  0x9d079fff
[    8.545537] NDCB0: 0x000d3000
[    8.545537] NDCB1: 0x55c10000
[    8.545537] NDCB2: 0x00000000
[    8.545537] NDCB3: 0x00000000
[    8.564641] marvell-nfc pxa3xx-nand: 
[    8.564641] NDCR:  0xdd079fff
[    8.564641] NDCB0: 0x000d3000
[    8.564641] NDCB1: 0x56000000
[    8.564641] NDCB2: 0x00000000
[    8.564641] NDCB3: 0x00000000
[    8.583703] marvell-nfc pxa3xx-nand: 
[    8.583703] NDCR:  0xdd079fff
[    8.583703] NDCB0: 0x000d3000
[    8.583703] NDCB1: 0x56010000
[    8.583703] NDCB2: 0x00000000
[    8.583703] NDCB3: 0x00000000
[    8.602671] marvell-nfc pxa3xx-nand: 
[    8.602671] NDCR:  0x9d079fff
[    8.602671] NDCB0: 0x000d3000
[    8.602671] NDCB1: 0x56010000
[    8.602671] NDCB2: 0x00000000
[    8.602671] NDCB3: 0x00000000
[    8.621771] marvell-nfc pxa3xx-nand: 
[    8.621771] NDCR:  0xdd079fff
[    8.621771] NDCB0: 0x000d3000
[    8.621771] NDCB1: 0x56400000
[    8.621771] NDCB2: 0x00000000
[    8.621771] NDCB3: 0x00000000
[    8.640836] marvell-nfc pxa3xx-nand: 
[    8.640836] NDCR:  0xdd079fff
[    8.640836] NDCB0: 0x000d3000
[    8.640836] NDCB1: 0x56410000
[    8.640836] NDCB2: 0x00000000
[    8.640836] NDCB3: 0x00000000
[    8.659821] marvell-nfc pxa3xx-nand: 
[    8.659821] NDCR:  0x9d079fff
[    8.659821] NDCB0: 0x000d3000
[    8.659821] NDCB1: 0x56410000
[    8.659821] NDCB2: 0x00000000
[    8.659821] NDCB3: 0x00000000
[    8.678923] marvell-nfc pxa3xx-nand: 
[    8.678923] NDCR:  0xdd079fff
[    8.678923] NDCB0: 0x000d3000
[    8.678923] NDCB1: 0x56800000
[    8.678923] NDCB2: 0x00000000
[    8.678923] NDCB3: 0x00000000
[    8.697987] marvell-nfc pxa3xx-nand: 
[    8.697987] NDCR:  0xdd079fff
[    8.697987] NDCB0: 0x000d3000
[    8.697987] NDCB1: 0x56810000
[    8.697987] NDCB2: 0x00000000
[    8.697987] NDCB3: 0x00000000
[    8.716967] marvell-nfc pxa3xx-nand: 
[    8.716967] NDCR:  0x9d079fff
[    8.716967] NDCB0: 0x000d3000
[    8.716967] NDCB1: 0x56810000
[    8.716967] NDCB2: 0x00000000
[    8.716967] NDCB3: 0x00000000
[    8.736068] marvell-nfc pxa3xx-nand: 
[    8.736068] NDCR:  0xdd079fff
[    8.736068] NDCB0: 0x000d3000
[    8.736068] NDCB1: 0x56c00000
[    8.736068] NDCB2: 0x00000000
[    8.736068] NDCB3: 0x00000000
[    8.755122] marvell-nfc pxa3xx-nand: 
[    8.755122] NDCR:  0xdd079fff
[    8.755122] NDCB0: 0x000d3000
[    8.755122] NDCB1: 0x56c10000
[    8.755122] NDCB2: 0x00000000
[    8.755122] NDCB3: 0x00000000
[    8.774101] marvell-nfc pxa3xx-nand: 
[    8.774101] NDCR:  0x9d079fff
[    8.774101] NDCB0: 0x000d3000
[    8.774101] NDCB1: 0x56c10000
[    8.774101] NDCB2: 0x00000000
[    8.774101] NDCB3: 0x00000000
[    8.793417] marvell-nfc pxa3xx-nand: 
[    8.793417] NDCR:  0xdd079fff
[    8.793417] NDCB0: 0x000d3000
[    8.793417] NDCB1: 0x57000000
[    8.793417] NDCB2: 0x00000000
[    8.793417] NDCB3: 0x00000000
[    8.812493] marvell-nfc pxa3xx-nand: 
[    8.812493] NDCR:  0xdd079fff
[    8.812493] NDCB0: 0x000d3000
[    8.812493] NDCB1: 0x57010000
[    8.812493] NDCB2: 0x00000000
[    8.812493] NDCB3: 0x00000000
[    8.831475] marvell-nfc pxa3xx-nand: 
[    8.831475] NDCR:  0x9d079fff
[    8.831475] NDCB0: 0x000d3000
[    8.831475] NDCB1: 0x57010000
[    8.831475] NDCB2: 0x00000000
[    8.831475] NDCB3: 0x00000000
[    8.850578] marvell-nfc pxa3xx-nand: 
[    8.850578] NDCR:  0xdd079fff
[    8.850578] NDCB0: 0x000d3000
[    8.850578] NDCB1: 0x57400000
[    8.850578] NDCB2: 0x00000000
[    8.850578] NDCB3: 0x00000000
[    8.869639] marvell-nfc pxa3xx-nand: 
[    8.869639] NDCR:  0xdd079fff
[    8.869639] NDCB0: 0x000d3000
[    8.869639] NDCB1: 0x57410000
[    8.869639] NDCB2: 0x00000000
[    8.869639] NDCB3: 0x00000000
[    8.888614] marvell-nfc pxa3xx-nand: 
[    8.888614] NDCR:  0x9d079fff
[    8.888614] NDCB0: 0x000d3000
[    8.888614] NDCB1: 0x57410000
[    8.888614] NDCB2: 0x00000000
[    8.888614] NDCB3: 0x00000000
[    8.907721] marvell-nfc pxa3xx-nand: 
[    8.907721] NDCR:  0xdd079fff
[    8.907721] NDCB0: 0x000d3000
[    8.907721] NDCB1: 0x57c00000
[    8.907721] NDCB2: 0x00000000
[    8.907721] NDCB3: 0x00000000
[    8.926778] marvell-nfc pxa3xx-nand: 
[    8.926778] NDCR:  0xdd079fff
[    8.926778] NDCB0: 0x000d3000
[    8.926778] NDCB1: 0x57c10000
[    8.926778] NDCB2: 0x00000000
[    8.926778] NDCB3: 0x00000000
[    8.945755] marvell-nfc pxa3xx-nand: 
[    8.945755] NDCR:  0x9d079fff
[    8.945755] NDCB0: 0x000d3000
[    8.945755] NDCB1: 0x57c10000
[    8.945755] NDCB2: 0x00000000
[    8.945755] NDCB3: 0x00000000
[    8.964856] marvell-nfc pxa3xx-nand: 
[    8.964856] NDCR:  0xdd079fff
[    8.964856] NDCB0: 0x000d3000
[    8.964856] NDCB1: 0x58000000
[    8.964856] NDCB2: 0x00000000
[    8.964856] NDCB3: 0x00000000
[    8.983915] marvell-nfc pxa3xx-nand: 
[    8.983915] NDCR:  0xdd079fff
[    8.983915] NDCB0: 0x000d3000
[    8.983915] NDCB1: 0x58010000
[    8.983915] NDCB2: 0x00000000
[    8.983915] NDCB3: 0x00000000
[    9.002886] marvell-nfc pxa3xx-nand: 
[    9.002886] NDCR:  0x9d079fff
[    9.002886] NDCB0: 0x000d3000
[    9.002886] NDCB1: 0x58010000
[    9.002886] NDCB2: 0x00000000
[    9.002886] NDCB3: 0x00000000
[    9.022075] marvell-nfc pxa3xx-nand: 
[    9.022075] NDCR:  0xdd079fff
[    9.022075] NDCB0: 0x000d3000
[    9.022075] NDCB1: 0x58400000
[    9.022075] NDCB2: 0x00000000
[    9.022075] NDCB3: 0x00000000
[    9.041141] marvell-nfc pxa3xx-nand: 
[    9.041141] NDCR:  0xdd079fff
[    9.041141] NDCB0: 0x000d3000
[    9.041141] NDCB1: 0x58410000
[    9.041141] NDCB2: 0x00000000
[    9.041141] NDCB3: 0x00000000
[    9.060123] marvell-nfc pxa3xx-nand: 
[    9.060123] NDCR:  0x9d079fff
[    9.060123] NDCB0: 0x000d3000
[    9.060123] NDCB1: 0x58410000
[    9.060123] NDCB2: 0x00000000
[    9.060123] NDCB3: 0x00000000
[    9.079435] ubi0: scanning is finished
[    9.083567] ubi0 error: ubi_read_volume_table: the layout volume was not found
[    9.090953] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
[    9.098457] UBI error: cannot attach mtd5
[    9.103950] pxa-rtc pxa-rtc: setting system clock to 2000-01-01 00:00:34 UTC (946684834)
[    9.187568] smc91x smc91x.0 eth0: link down
[   11.136140] smc91x smc91x.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   11.193199] IP-Config: Complete:
[   11.196554]      device=eth0, hwaddr=00:0e:0c:a7:26:f7, ipaddr=192.168.1.232, mask=255.255.255.0, gw=255.255.255.255
[   11.207229]      host=192.168.1.232, domain=, nis-domain=(none)
[   11.213278]      bootserver=192.168.1.5, rootserver=192.168.1.5, rootpath=
[   11.221532] ALSA device list:
[   11.224983]   #0: Zylonite
[   11.250472] Freeing unused kernel memory: 2396K
[   11.255419] This architecture does not have kernel memory protection.
Starting logging: OK
Loading all the available modules: modprobe: module smc91x not found in modules.dep
modprobe: module soundcore not found in modules.dep
modprobe: module snd not found in modules.dep
modprobe: module snd-pcm not found in modules.dep
modprobe: module fat not found in modules.dep
modprobe: module vfat not found in modules.dep
modprobe: module nfs not found in modules.dep
modprobe: module nls_cp437 not found in modules.dep
modprobe: module nls_cp850 not found in modules.dep
modprobe: module nls_ascii not found in modules.dep
modprobe: module nls_utf8 not found in modules.dep
modprobe: module fixed not found in modules.dep
modprobe: module pwm-pxa not found in modules.dep
modprobe: module cpufreq_conservative not found in modules.dep
modprobe: module cpufreq_powersave not found in modules.dep
modprobe: module cpufreq-dt not found in modules.dep
modprobe: module btusb not found in modules.dep
modprobe: module i2c-dev not found in modules.dep
modprobe: module ubi not found in modules.dep
modprobe: module mt_blkdevs not found in modules.dep
modprobe: module pxa3xx_nand not found in modules.dep
modprobe: module mtdblock not found in modules.dep
modprobe: module ofpart not found in modules.dep
modprobe: module map_rom not found in modules.dep
modprobe: module jedec_probe not found in modules.dep
modprobe: module cmdlinepart not found in modules.dep
modprobe: module redboot not found in modules.dep
modprobe: module loop not found in modules.dep
modprobe: module leds-gpio not found in modules.dep
modprobe: module jedec-class not found in modules.dep
modprobe: module pxa not found in modules.dep
modprobe: module evdev not found in modules.dep
modprobe: module soc_common not found in modules.dep
modprobe: module pwm_bl not found in modules.dep
modprobe: module fbcon not found in modules.dep
modprobe: module rtc-pxa not found in modules.dep
modprobe: module rtc-sa1100 not found in modules.dep
modprobe: module smc91x not found in modules.dep
modprobe: module pda_power not found in modules.dep
modprobe: module fixed not found in modules.dep
KO
OK
Changing smcs91x MAC address to 08:00:3e:26:0a:5b: ifconfig: SIOCSIFHWADDR: Device or resource busy
KO
OK
Initializing random number generator... done.
Starting network...
ip: RTNETLINK answers: File exists
udhcpc (v1.24.1) started
Sending discover...
Sending select for 192.168.1.232...
Lease of 192.168.1.232 obtained, lease time 86400
deleting routers
adding dns 192.168.1.1
Starting dropbear sshd: OK

Welcome to Buildroot
zylonite login: 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-03 19:58                                       ` Robert Jarzmik
@ 2018-01-03 20:10                                         ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-03 20:10 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

On Wed, 03 Jan 2018 20:58:29 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> > On Tue, 02 Jan 2018 20:21:09 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> >  
> >> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> >>   
> >> > I think the ECC issue you faced was related to pages being written
> >> > *and* empty. If this guess is right, the board should boot fine with
> >> > these changes.
> >> >
> >> > Otherwise, please add the DEBUG define as before in both the core
> >> > and the driver and do not hesitate to add another dump_stack()
> >> > where it crashes (if applicable).    
> >> 
> >> The problem looks still the same :
> >> [    3.560163] Bad block table not found for chip 0  
> >
> > Mmmmh ok.
> >
> > Can you please add this patch:
> > http://code.bulix.org/61at9p-254626  
> 
> Well, it looks a bit better, see attached log in [1].
> Now the BBT is detected ...
> [    3.310841] Bad block table found at page 131008, version 0x01
> ...
> [    3.354944] Bad block table found at page 130944, version 0x01
> 
> But all blocks are considered bad ... as if the bit logic was inverted for the
> meaning of "bad" or "good" block, see :
> [    3.379825] nand_read_bbt: bad block at 0x000000000000

Hm, that's weird. Can you try with the old driver (pxa3xx)? My guess is
that a new BBT has been written by the new driver after a full scan,
and we've seen with your previous logs that almost all blocks are
detected bad in this case (still don't know why: BBMs should be
preserved when using Hamming on 2k pages).

Anyway, if there's still a problem with the old driver, you'll have to
scrub the blocks containing the BBT from uboot (using nand scrub) to
restore things in a working state. And we also have to figure out why
BBM scan is not working with the new driver.

BTW, thanks for helping us with that, that's really appreciated.

Boris


> 
> Cheers.
> 
> --
> Robert
> 
> [1] Dmesg
> ---8>---  
> netconsole: port not set
> netconsole: registered as netconsole-1
> smc91c111 smc91c1110: chip is revision= 9, version= 2
> mdio_bus: miibus0: probed
> eth0: got preset MAC address: 00:0e:0c:a7:26:f7
> nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0xba (ST Micro NAND 256MiB 1,8V 16-bit), 256MiB, page size: 2048, OOB size: 64
> mrvl_nand mrvl_nand0: ECC strength 1, ECC step size 512
> Bad block table found at page 131008, version 0x01
> Bad block table found at page 130944, version 0x01
> malloc space: 0x83700000 -> 0x83efffff (size 8 MiB)
> running /env/bin/init...
> magicvar: No such file or directory
> magicvar: No such file or directory
> magicvar: No such file or directory
> 
> Hit any key to stop autoboot:  3\b\b 2\b\b 1\b\b 0
> booting net
> netconsole: netconsole initialized with 255.255.255.255:6662
> eth0: 100Mbps full duplex link detected
> DHCP client bound to address 192.168.1.232
> netconsole: netconsole initialized with 255.255.255.255:6662
> could not open /mnt/tftp/none-linux-zylonite: No such file or directory
> Booting net failed: No such file or directory
> booting net failed: No such file or directory
> boot: No such file or directory
> .[1;32mbarebox@.[1;36mZylonite:/.[0m global linux.bootargs.debug=earlycon
> .[1;32mbarebox@.[1;36mZylonite:/.[0m bootm /mnt/tftp/zImage_jenkins
> 
> Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
> commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root)
> arch_number: 1233
> Uncompressing Linux... done, booting the kernel.
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Linux version 4.15.0-rc1-00044-gb6124ba (jenkins@belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #825 PREEMPT Wed Jan 3 20:06:17 CET 2018
> [    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
> [    0.000000] CPU: VIVT data cache, VIVT instruction cache
> [    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
> [    0.000000] Ignoring tag cmdline (using the default kernel command line)
> [    0.000000] Memory policy: Data cache writeback
> [    0.000000] RO Mode clock: 0.00MHz
> [    0.000000] Run Mode clock: 0.00MHz
> [    0.000000] Turbo Mode clock: 0.00MHz
> [    0.000000] System bus clock: 0.00MHz
> [    0.000000] On node 0 totalpages: 16384
> [    0.000000]   Normal zone: 128 pages used for memmap
> [    0.000000]   Normal zone: 0 pages reserved
> [    0.000000]   Normal zone: 16384 pages, LIFO batch:3
> [    0.000000] random: fast init done
> [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
> [    0.000000] pcpu-alloc: [0] 0 
> [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
> [    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k@0(TIMH)ro,128k@128k(OBMI)ro,768k@256k(barebox),256k@1024k(barebox-env),12M@1280k(kernel),38016k@13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
> [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
> [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
> [    0.000000] Memory: 56856K/65536K available (4225K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
> [    0.000000] Virtual kernel memory layout:
> [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
> [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
> [    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
> [    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
> [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
> [    0.000000]       .text : 0xc0008000 - 0xc04289e8   (4227 kB)
> [    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
> [    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
> [    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
> [    0.000000] Preemptible hierarchical RCU implementation.
> [    0.000000] 	Tasks RCU enabled.
> [    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
> [    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
> [    0.000068] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
> [    0.000267] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
> [    0.002138] Console: colour dummy device 80x30
> [    0.002297] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
> [    0.081017] pid_max: default: 32768 minimum: 301
> [    0.081857] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.081957] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.085169] CPU: Testing write buffer coherency: ok
> [    0.088982] Setting up static identity map for 0x80008200 - 0x80008260
> [    0.089941] Hierarchical SRCU implementation.
> [    0.102960] devtmpfs: initialized
> [    0.113840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
> [    0.113980] futex hash table entries: 256 (order: -1, 3072 bytes)
> [    0.116305] NET: Registered protocol family 16
> [    0.119116] DMA: preallocated 256 KiB pool for atomic coherent allocations
> [    0.388612] Advanced Linux Sound Architecture Driver Initialized.
> [    0.392974] clocksource: Switched to clocksource oscr0
> [    0.551626] NET: Registered protocol family 2
> [    0.557926] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.558151] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.558332] TCP: Hash tables configured (established 1024 bind 1024)
> [    0.558869] UDP hash table entries: 256 (order: 0, 4096 bytes)
> [    0.559048] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
> [    0.560201] NET: Registered protocol family 1
> [    0.562229] RPC: Registered named UNIX socket transport module.
> [    0.562327] RPC: Registered udp transport module.
> [    0.562381] RPC: Registered tcp transport module.
> [    0.562439] RPC: Registered tcp NFSv4.1 backchannel transport module.
> [    2.500715] Initialise system trusted keyrings
> [    2.502868] workingset: timestamp_bits=30 max_order=14 bucket_order=0
> [    2.507406] NFS: Registering the id_resolver key type
> [    2.507634] Key type id_resolver registered
> [    2.507695] Key type id_legacy registered
> [    2.514199] Key type asymmetric registered
> [    2.514303] Asymmetric key parser 'x509' registered
> [    2.514462] io scheduler noop registered
> [    2.514527] io scheduler deadline registered
> [    2.514921] io scheduler cfq registered (default)
> [    2.514992] io scheduler mq-deadline registered
> [    2.515054] io scheduler kyber registered
> [    2.572587] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
> [    2.578330] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
> [    3.053207] console [ttyS0] enabled
> [    3.059557] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
> [    3.072069] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
> [    3.088037] nand: executing subop:
> [    3.091533] nand:     ->CMD      [0xff]
> [    3.098135] nand:     ->WAITRDY  [max 250 ms]
> [    3.102636] marvell-nfc pxa3xx-nand: 
> [    3.102636] NDCR:  0x90079fff
> [    3.102636] NDCB0: 0x00a000ff
> [    3.102636] NDCB1: 0x00000000
> [    3.102636] NDCB2: 0x00000000
> [    3.102636] NDCB3: 0x00000000
> [    3.121629] nand: executing subop:
> [    3.125459] nand:     ->CMD      [0x90]
> [    3.129362] nand:     ->ADDR     [1 cyc: 00]
> [    3.134355] nand:     ->DATA_IN  [2 B, force 8-bit]
> [    3.139366] marvell-nfc pxa3xx-nand: 
> [    3.139366] NDCR:  0x90079fff
> [    3.139366] NDCB0: 0x00610090
> [    3.139366] NDCB1: 0x00000000
> [    3.139366] NDCB2: 0x00000000
> [    3.139366] NDCB3: 0x00000000
> [    3.158242] nand: executing subop:
> [    3.161713] nand:     ->CMD      [0x90]
> [    3.165930] nand:     ->ADDR     [1 cyc: 00]
> [    3.170250] nand:     ->DATA_IN  [8 B, force 8-bit]
> [    3.175405] marvell-nfc pxa3xx-nand: 
> [    3.175405] NDCR:  0x90079fff
> [    3.175405] NDCB0: 0x00610090
> [    3.175405] NDCB1: 0x00000000
> [    3.175405] NDCB2: 0x00000000
> [    3.175405] NDCB3: 0x00000000
> [    3.194083] nand: executing subop:
> [    3.197532] nand:     ->CMD      [0x90]
> [    3.201406] nand:     ->ADDR     [1 cyc: 20]
> [    3.205851] nand:     ->DATA_IN  [4 B, force 8-bit]
> [    3.210832] marvell-nfc pxa3xx-nand: 
> [    3.210832] NDCR:  0x90079fff
> [    3.210832] NDCB0: 0x00610090
> [    3.210832] NDCB1: 0x00000020
> [    3.210832] NDCB2: 0x00000000
> [    3.210832] NDCB3: 0x00000000
> [    3.229453] nand: executing subop:
> [    3.232899] nand:     ->CMD      [0x90]
> [    3.236930] nand:     ->ADDR     [1 cyc: 40]
> [    3.241232] nand:     ->DATA_IN  [5 B, force 8-bit]
> [    3.246335] marvell-nfc pxa3xx-nand: 
> [    3.246335] NDCR:  0x90079fff
> [    3.246335] NDCB0: 0x00610090
> [    3.246335] NDCB1: 0x00000040
> [    3.246335] NDCB2: 0x00000000
> [    3.246335] NDCB3: 0x00000000
> [    3.264978] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
> [    3.271354] nand: ST Micro NAND 256MiB 1,8V 16-bit
> [    3.276316] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
> [    3.284055] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
> [    3.291595] marvell-nfc pxa3xx-nand: 
> [    3.291595] NDCR:  0xdd079fff
> [    3.291595] NDCB0: 0x000d3000
> [    3.291595] NDCB1: 0xffc00000
> [    3.291595] NDCB2: 0x00000001
> [    3.291595] NDCB3: 0x00000000
> [    3.310841] Bad block table found at page 131008, version 0x01
> [    3.316993] marvell-nfc pxa3xx-nand: 
> [    3.316993] NDCR:  0xdd079fff
> [    3.316993] NDCB0: 0x000d3000
> [    3.316993] NDCB1: 0xffc00000
> [    3.316993] NDCB2: 0x00000001
> [    3.316993] NDCB3: 0x00000000
> [    3.336013] marvell-nfc pxa3xx-nand: 
> [    3.336013] NDCR:  0xdd079fff
> [    3.336013] NDCB0: 0x000d3000
> [    3.336013] NDCB1: 0xff800000
> [    3.336013] NDCB2: 0x00000001
> [    3.336013] NDCB3: 0x00000000
> [    3.354944] Bad block table found at page 130944, version 0x01
> [    3.360915] marvell-nfc pxa3xx-nand: 
> [    3.360915] NDCR:  0xdd079fff
> [    3.360915] NDCB0: 0x000d3000
> [    3.360915] NDCB1: 0xffc00000
> [    3.360915] NDCB2: 0x00000001
> [    3.360915] NDCB3: 0x00000000
> [    3.379825] nand_read_bbt: bad block at 0x000000000000
> [    3.385158] nand_read_bbt: bad block at 0x000000040000
> [    3.390320] nand_read_bbt: bad block at 0x000000060000
> [    3.395587] nand_read_bbt: bad block at 0x000000080000
> [    3.400743] nand_read_bbt: bad block at 0x0000000a0000
> [    3.406009] nand_read_bbt: bad block at 0x0000000c0000
> [    3.411169] nand_read_bbt: bad block at 0x0000000e0000
> [    3.416434] nand_read_bbt: bad block at 0x000000100000
> [    3.421593] nand_read_bbt: bad block at 0x000000140000
> [    3.426859] nand_read_bbt: bad block at 0x000000160000
> [    3.432018] nand_read_bbt: bad block at 0x000000180000
> [    3.437283] nand_read_bbt: bad block at 0x0000001a0000
> [    3.442442] nand_read_bbt: bad block at 0x0000001c0000
> [    3.447707] nand_read_bbt: bad block at 0x0000001e0000
> [    3.452867] nand_read_bbt: bad block at 0x000000200000
> [    3.458133] nand_read_bbt: bad block at 0x000000220000
> [    3.463404] nand_read_bbt: bad block at 0x000000240000
> [    3.468564] nand_read_bbt: bad block at 0x000000260000
> [    3.473830] nand_read_bbt: bad block at 0x000000280000
> [    3.478990] nand_read_bbt: bad block at 0x0000002a0000
> [    3.484253] nand_read_bbt: bad block at 0x0000002c0000
> [    3.489414] nand_read_bbt: bad block at 0x0000002e0000
> [    3.494680] nand_read_bbt: bad block at 0x000000300000
> [    3.499838] nand_read_bbt: bad block at 0x000000320000
> [    3.505104] nand_read_bbt: bad block at 0x000000340000
> [    3.510262] nand_read_bbt: bad block at 0x000000360000
> [    3.515529] nand_read_bbt: bad block at 0x000000380000
> [    3.520687] nand_read_bbt: bad block at 0x0000003a0000
> [    3.525955] nand_read_bbt: bad block at 0x0000003c0000
> [    3.531121] nand_read_bbt: bad block at 0x0000003e0000
> [    3.536386] nand_read_bbt: bad block at 0x000000400000
> [    3.541544] nand_read_bbt: bad block at 0x000000420000
> [    3.546811] nand_read_bbt: bad block at 0x000000440000
> [    3.551970] nand_read_bbt: bad block at 0x000000460000
> [    3.557234] nand_read_bbt: bad block at 0x000000480000
> [    3.562394] nand_read_bbt: bad block at 0x0000004a0000
> [    3.567659] nand_read_bbt: bad block at 0x0000004c0000
> [    3.572819] nand_read_bbt: bad block at 0x0000004e0000
> [    3.578087] nand_read_bbt: bad block at 0x000000500000
> [    3.583367] nand_read_bbt: bad block at 0x000000520000
> [    3.588524] nand_read_bbt: bad block at 0x000000540000
> [    3.593788] nand_read_bbt: bad block at 0x000000560000
> [    3.598951] nand_read_bbt: bad block at 0x000000580000
> [    3.604213] nand_read_bbt: bad block at 0x0000005a0000
> [    3.609373] nand_read_bbt: bad block at 0x0000005c0000
> [    3.614639] nand_read_bbt: bad block at 0x0000005e0000
> [    3.619799] nand_read_bbt: bad block at 0x000000600000
> [    3.625064] nand_read_bbt: bad block at 0x000000620000
> [    3.630224] nand_read_bbt: bad block at 0x000000640000
> [    3.635488] nand_read_bbt: bad block at 0x000000660000
> [    3.640648] nand_read_bbt: bad block at 0x000000680000
> [    3.645914] nand_read_bbt: bad block at 0x0000006a0000
> [    3.651071] nand_read_bbt: bad block at 0x0000006c0000
> [    3.656337] nand_read_bbt: bad block at 0x0000006e0000
> [    3.661497] nand_read_bbt: bad block at 0x000000700000
> [    3.666774] nand_read_bbt: bad block at 0x000000d40000
> [    3.671939] nand_read_bbt: bad block at 0x000000d60000
> [    3.677206] nand_read_bbt: bad block at 0x000000d80000
> [    3.682373] nand_read_bbt: bad block at 0x000000da0000
> [    3.687638] nand_read_bbt: bad block at 0x000000dc0000
> [    3.692796] nand_read_bbt: bad block at 0x000000de0000
> [    3.698063] nand_read_bbt: bad block at 0x000000e00000
> [    3.703334] nand_read_bbt: bad block at 0x000000e20000
> [    3.708494] nand_read_bbt: bad block at 0x000000e40000
> [    3.713759] nand_read_bbt: bad block at 0x000000e60000
> [    3.718919] nand_read_bbt: bad block at 0x000000e80000
> [    3.724183] nand_read_bbt: bad block at 0x000000ea0000
> [    3.729343] nand_read_bbt: bad block at 0x000000ec0000
> [    3.734608] nand_read_bbt: bad block at 0x000000ee0000
> [    3.739769] nand_read_bbt: bad block at 0x000000f00000
> [    3.745033] nand_read_bbt: bad block at 0x000000f20000
> [    3.750192] nand_read_bbt: bad block at 0x000000f40000
> [    3.755459] nand_read_bbt: bad block at 0x000000f60000
> [    3.760617] nand_read_bbt: bad block at 0x000000f80000
> [    3.765882] nand_read_bbt: bad block at 0x000000fa0000
> [    3.771041] nand_read_bbt: bad block at 0x000000fc0000
> [    3.776306] nand_read_bbt: bad block at 0x000000fe0000
> [    3.781467] nand_read_bbt: bad block at 0x000001000000
> [    3.786731] nand_read_bbt: bad block at 0x000001020000
> [    3.791891] nand_read_bbt: bad block at 0x000001040000
> [    3.797156] nand_read_bbt: bad block at 0x000001060000
> [    3.802317] nand_read_bbt: bad block at 0x000001080000
> [    3.807582] nand_read_bbt: bad block at 0x0000010a0000
> [    3.812741] nand_read_bbt: bad block at 0x0000010c0000
> [    3.818005] nand_read_bbt: bad block at 0x0000010e0000
> [    3.823280] nand_read_bbt: bad block at 0x000001100000
> [    3.828438] nand_read_bbt: bad block at 0x000001120000
> [    3.833702] nand_read_bbt: bad block at 0x000001140000
> [    3.838862] nand_read_bbt: bad block at 0x000001160000
> [    3.844129] nand_read_bbt: bad block at 0x000001180000
> [    3.849294] nand_read_bbt: bad block at 0x000001660000
> [    3.854562] nand_read_bbt: bad block at 0x000001680000
> [    3.859719] nand_read_bbt: bad block at 0x0000016a0000
> [    3.864986] nand_read_bbt: bad block at 0x0000016c0000
> [    3.870143] nand_read_bbt: bad block at 0x0000016e0000
> [    3.875409] nand_read_bbt: bad block at 0x000001700000
> [    3.880569] nand_read_bbt: bad block at 0x000001720000
> [    3.885836] nand_read_bbt: bad block at 0x000001740000
> [    3.890994] nand_read_bbt: bad block at 0x000001760000
> [    3.896260] nand_read_bbt: bad block at 0x000001780000
> [    3.901417] nand_read_bbt: bad block at 0x0000017a0000
> [    3.906683] nand_read_bbt: bad block at 0x0000017c0000
> [    3.911843] nand_read_bbt: bad block at 0x0000017e0000
> [    3.917108] nand_read_bbt: bad block at 0x000001800000
> [    3.922267] nand_read_bbt: bad block at 0x000001820000
> [    3.927534] nand_read_bbt: bad block at 0x000001840000
> [    3.932691] nand_read_bbt: bad block at 0x000001860000
> [    3.937957] nand_read_bbt: bad block at 0x000001880000
> [    3.943230] nand_read_bbt: bad block at 0x0000018a0000
> [    3.948390] nand_read_bbt: bad block at 0x0000018c0000
> [    3.953654] nand_read_bbt: bad block at 0x0000018e0000
> [    3.958815] nand_read_bbt: bad block at 0x000001900000
> [    3.964101] nand_read_bbt: bad block at 0x000001920000
> [    3.969264] nand_read_bbt: bad block at 0x000001940000
> [    3.974531] nand_read_bbt: bad block at 0x000001960000
> [    3.979690] nand_read_bbt: bad block at 0x000001980000
> [    3.984952] nand_read_bbt: bad block at 0x0000019a0000
> [    3.990114] nand_read_bbt: bad block at 0x0000019c0000
> [    3.995381] nand_read_bbt: bad block at 0x0000019e0000
> [    4.000539] nand_read_bbt: bad block at 0x000001a00000
> [    4.005804] nand_read_bbt: bad block at 0x000001a20000
> [    4.010964] nand_read_bbt: bad block at 0x000001a40000
> [    4.016236] nand_read_bbt: bad block at 0x000001a60000
> [    4.021398] nand_read_bbt: bad block at 0x000001a80000
> [    4.026664] nand_read_bbt: bad block at 0x000001aa0000
> [    4.031822] nand_read_bbt: bad block at 0x000001ac0000
> [    4.037086] nand_read_bbt: bad block at 0x000001ae0000
> [    4.042247] nand_read_bbt: bad block at 0x000001b00000
> [    4.047512] nand_read_bbt: bad block at 0x000001b20000
> [    4.052672] nand_read_bbt: bad block at 0x000001b40000
> [    4.057935] nand_read_bbt: bad block at 0x000001b60000
> [    4.063211] nand_read_bbt: bad block at 0x000001b80000
> [    4.068377] nand_read_bbt: bad block at 0x000001ba0000
> [    4.073643] nand_read_bbt: bad block at 0x000001bc0000
> [    4.078801] nand_read_bbt: bad block at 0x000001be0000
> [    4.084068] nand_read_bbt: bad block at 0x000001c00000
> [    4.089235] nand_read_bbt: bad block at 0x000001c20000
> [    4.094836] nand_read_bbt: bad block at 0x000001c40000
> [    4.100012] nand_read_bbt: bad block at 0x000001c60000
> [    4.105327] nand_read_bbt: bad block at 0x000001c80000
> [    4.110488] nand_read_bbt: bad block at 0x000001ca0000
> [    4.115755] nand_read_bbt: bad block at 0x000001cc0000
> [    4.120923] nand_read_bbt: bad block at 0x000001ce0000
> [    4.126186] nand_read_bbt: bad block at 0x000001d00000
> [    4.131347] nand_read_bbt: bad block at 0x000001d20000
> [    4.136610] nand_read_bbt: bad block at 0x000001d40000
> [    4.141770] nand_read_bbt: bad block at 0x000001d60000
> [    4.147038] nand_read_bbt: bad block at 0x000001d80000
> [    4.152204] nand_read_bbt: bad block at 0x000001da0000
> [    4.157470] nand_read_bbt: bad block at 0x000001dc0000
> [    4.162627] nand_read_bbt: bad block at 0x000001de0000
> [    4.167894] nand_read_bbt: bad block at 0x000001e00000
> [    4.173167] nand_read_bbt: bad block at 0x000001e20000
> [    4.178325] nand_read_bbt: bad block at 0x000001e40000
> [    4.183591] nand_read_bbt: bad block at 0x000001e60000
> [    4.188752] nand_read_bbt: bad block at 0x000001e80000
> [    4.194015] nand_read_bbt: bad block at 0x000001ea0000
> [    4.199175] nand_read_bbt: bad block at 0x000001ec0000
> [    4.204441] nand_read_bbt: bad block at 0x000001ee0000
> [    4.209601] nand_read_bbt: bad block at 0x000001f00000
> [    4.214865] nand_read_bbt: bad block at 0x000001f20000
> [    4.220024] nand_read_bbt: bad block at 0x000001f40000
> [    4.225290] nand_read_bbt: bad block at 0x000001f60000
> [    4.230450] nand_read_bbt: bad block at 0x000001f80000
> [    4.235713] nand_read_bbt: bad block at 0x000001fa0000
> [    4.240874] nand_read_bbt: bad block at 0x000001fc0000
> [    4.246138] nand_read_bbt: bad block at 0x000001fe0000
> [    4.251299] nand_read_bbt: bad block at 0x000002000000
> [    4.256564] nand_read_bbt: bad block at 0x000002020000
> [    4.261723] nand_read_bbt: bad block at 0x000002040000
> [    4.266988] nand_read_bbt: bad block at 0x000002060000
> [    4.272148] nand_read_bbt: bad block at 0x000002080000
> [    4.277412] nand_read_bbt: bad block at 0x0000020a0000
> [    4.282572] nand_read_bbt: bad block at 0x0000020c0000
> [    4.287837] nand_read_bbt: bad block at 0x0000020e0000
> [    4.293111] nand_read_bbt: bad block at 0x000002100000
> [    4.298278] nand_read_bbt: bad block at 0x000002120000
> [    4.303545] nand_read_bbt: bad block at 0x000002140000
> [    4.308703] nand_read_bbt: bad block at 0x000002160000
> [    4.313967] nand_read_bbt: bad block at 0x000002180000
> [    4.319128] nand_read_bbt: bad block at 0x0000021a0000
> [    4.324391] nand_read_bbt: bad block at 0x0000021c0000
> [    4.329552] nand_read_bbt: bad block at 0x0000021e0000
> [    4.334818] nand_read_bbt: bad block at 0x000002200000
> [    4.339977] nand_read_bbt: bad block at 0x000002220000
> [    4.345242] nand_read_bbt: bad block at 0x000002240000
> [    4.350402] nand_read_bbt: bad block at 0x000002260000
> [    4.355667] nand_read_bbt: bad block at 0x000002280000
> [    4.360826] nand_read_bbt: bad block at 0x0000022a0000
> [    4.366091] nand_read_bbt: bad block at 0x0000022c0000
> [    4.371251] nand_read_bbt: bad block at 0x0000022e0000
> [    4.376515] nand_read_bbt: bad block at 0x000002300000
> [    4.381674] nand_read_bbt: bad block at 0x000002320000
> [    4.386941] nand_read_bbt: bad block at 0x000002340000
> [    4.392101] nand_read_bbt: bad block at 0x000002360000
> [    4.397365] nand_read_bbt: bad block at 0x000002380000
> [    4.402523] nand_read_bbt: bad block at 0x0000023a0000
> [    4.407789] nand_read_bbt: bad block at 0x0000023c0000
> [    4.413062] nand_read_bbt: bad block at 0x0000023e0000
> [    4.418223] nand_read_bbt: bad block at 0x000002400000
> [    4.423485] nand_read_bbt: bad block at 0x000002420000
> [    4.428646] nand_read_bbt: bad block at 0x000002440000
> [    4.433907] nand_read_bbt: bad block at 0x000002460000
> [    4.439071] nand_read_bbt: bad block at 0x000002480000
> [    4.444336] nand_read_bbt: bad block at 0x0000024a0000
> [    4.449496] nand_read_bbt: bad block at 0x0000024c0000
> [    4.454759] nand_read_bbt: bad block at 0x0000024e0000
> [    4.459922] nand_read_bbt: bad block at 0x000002500000
> [    4.465187] nand_read_bbt: bad block at 0x000002520000
> [    4.470344] nand_read_bbt: bad block at 0x000002540000
> [    4.475609] nand_read_bbt: bad block at 0x000002560000
> [    4.480771] nand_read_bbt: bad block at 0x000002580000
> [    4.486033] nand_read_bbt: bad block at 0x0000025a0000
> [    4.491194] nand_read_bbt: bad block at 0x0000025c0000
> [    4.496458] nand_read_bbt: bad block at 0x0000025e0000
> [    4.501619] nand_read_bbt: bad block at 0x000002600000
> [    4.506882] nand_read_bbt: bad block at 0x000002620000
> [    4.512042] nand_read_bbt: bad block at 0x000002640000
> [    4.517307] nand_read_bbt: bad block at 0x000002660000
> [    4.522468] nand_read_bbt: bad block at 0x000002680000
> [    4.527732] nand_read_bbt: bad block at 0x0000026a0000
> [    4.532891] nand_read_bbt: bad block at 0x0000026c0000
> [    4.538162] nand_read_bbt: bad block at 0x0000026e0000
> [    4.543428] nand_read_bbt: bad block at 0x000002700000
> [    4.548590] nand_read_bbt: bad block at 0x000002720000
> [    4.553857] nand_read_bbt: bad block at 0x000002740000
> [    4.559014] nand_read_bbt: bad block at 0x000002760000
> [    4.564280] nand_read_bbt: bad block at 0x000002780000
> [    4.569438] nand_read_bbt: bad block at 0x0000027a0000
> [    4.574705] nand_read_bbt: bad block at 0x0000027c0000
> [    4.579863] nand_read_bbt: bad block at 0x0000027e0000
> [    4.585129] nand_read_bbt: bad block at 0x000002800000
> [    4.590288] nand_read_bbt: bad block at 0x000002820000
> [    4.595558] nand_read_bbt: bad block at 0x000002a40000
> [    4.600720] nand_read_bbt: bad block at 0x000002a60000
> [    4.606012] nand_read_bbt: bad block at 0x000002bc0000
> [    4.611182] nand_read_bbt: bad block at 0x000002c40000
> [    4.616449] nand_read_bbt: bad block at 0x000002c60000
> [    4.621614] nand_read_bbt: bad block at 0x000002c80000
> [    4.626878] nand_read_bbt: bad block at 0x000002ca0000
> [    4.632036] nand_read_bbt: bad block at 0x000002cc0000
> [    4.637301] nand_read_bbt: bad block at 0x000002ce0000
> [    4.642463] nand_read_bbt: bad block at 0x000002d00000
> [    4.647726] nand_read_bbt: bad block at 0x000002d20000
> [    4.652888] nand_read_bbt: bad block at 0x000002d40000
> [    4.658167] nand_read_bbt: bad block at 0x000002d60000
> [    4.663433] nand_read_bbt: bad block at 0x000002d80000
> [    4.668593] nand_read_bbt: bad block at 0x000002da0000
> [    4.673859] nand_read_bbt: bad block at 0x000002dc0000
> [    4.679017] nand_read_bbt: bad block at 0x000002de0000
> [    4.684282] nand_read_bbt: bad block at 0x000002e00000
> [    4.689442] nand_read_bbt: bad block at 0x000002e20000
> [    4.694707] nand_read_bbt: bad block at 0x000002e40000
> [    4.699867] nand_read_bbt: bad block at 0x000002e60000
> [    4.705133] nand_read_bbt: bad block at 0x000002e80000
> [    4.710292] nand_read_bbt: bad block at 0x000002ea0000
> [    4.715558] nand_read_bbt: bad block at 0x000002ec0000
> [    4.720716] nand_read_bbt: bad block at 0x000002ee0000
> [    4.725983] nand_read_bbt: bad block at 0x000002f00000
> [    4.731141] nand_read_bbt: bad block at 0x000002f20000
> [    4.736406] nand_read_bbt: bad block at 0x000002f40000
> [    4.741566] nand_read_bbt: bad block at 0x000002f60000
> [    4.746830] nand_read_bbt: bad block at 0x000002f80000
> [    4.751991] nand_read_bbt: bad block at 0x000002fa0000
> [    4.757255] nand_read_bbt: bad block at 0x000002fc0000
> [    4.762415] nand_read_bbt: bad block at 0x000002fe0000
> [    4.767681] nand_read_bbt: bad block at 0x000003000000
> [    4.772839] nand_read_bbt: bad block at 0x000003020000
> [    4.778104] nand_read_bbt: bad block at 0x000003040000
> [    4.783378] nand_read_bbt: bad block at 0x000003060000
> [    4.788536] nand_read_bbt: bad block at 0x000003080000
> [    4.793802] nand_read_bbt: bad block at 0x0000030a0000
> [    4.798962] nand_read_bbt: bad block at 0x0000030c0000
> [    4.804224] nand_read_bbt: bad block at 0x0000030e0000
> [    4.809387] nand_read_bbt: bad block at 0x000003100000
> [    4.814650] nand_read_bbt: bad block at 0x000003120000
> [    4.819809] nand_read_bbt: bad block at 0x000003140000
> [    4.825075] nand_read_bbt: bad block at 0x000003160000
> [    4.830235] nand_read_bbt: bad block at 0x000003180000
> [    4.835499] nand_read_bbt: bad block at 0x0000031a0000
> [    4.840661] nand_read_bbt: bad block at 0x0000031c0000
> [    4.845924] nand_read_bbt: bad block at 0x0000031e0000
> [    4.851085] nand_read_bbt: bad block at 0x000003200000
> [    4.856350] nand_read_bbt: bad block at 0x000003220000
> [    4.861510] nand_read_bbt: bad block at 0x000003240000
> [    4.867593] 6 cmdlinepart partitions found on MTD device pxa3xx_nand-0
> [    4.874441] Creating 6 MTD partitions on "pxa3xx_nand-0":
> [    4.879899] 0x000000000000-0x000000020000 : "TIMH"
> [    4.888233] 0x000000020000-0x000000040000 : "OBMI"
> [    4.897663] 0x000000040000-0x000000100000 : "barebox"
> [    4.907444] 0x000000100000-0x000000140000 : "barebox-env"
> [    4.917447] 0x000000140000-0x000000d40000 : "kernel"
> [    4.927958] 0x000000d40000-0x000003260000 : "root"
> [    4.941349] smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
> [    4.994377] smc91x smc91x.0 eth0: SMC91C11xFD (rev 2) at c4867300 IRQ 214
> [    5.001216]  DMA c386d710 [nowait]
> [    5.005891] smc91x smc91x.0 eth0: Ethernet addr: 00:0e:0c:a7:26:f7
> [    5.018621] input: pxa27x-keypad as /devices/platform/pxa27x-keypad/input/input0
> [    5.028503] pxa-rtc pxa-rtc: failed to find rtc clock source
> [    5.036108] rtc rtc0: invalid alarm value: 0-1-1 0:0:0
> [    5.043390] pxa-rtc pxa-rtc: rtc core: registered pxa-rtc as rtc0
> [    5.054574] sa1100_wdt: SA1100/PXA2xx Watchdog Timer: timer margin 60 sec
> [    5.106260] soc-audio soc-audio: ASoC: machine Zylonite should use snd_soc_register_card()
> [    5.130166] wm9713-codec wm9713-codec: Control not supported for path Mic B Source -> [MPB] -> Mic B Pre Amp
> [    5.141137] wm9713-codec wm9713-codec: ASoC: no dapm match for Mic B Source --> MPB --> Mic B Pre Amp
> [    5.150835] wm9713-codec wm9713-codec: ASoC: Failed to add route Mic B Source -> MPB -> Mic B Pre Amp
> [    5.164361] soc-audio soc-audio: wm9713-hifi <-> pxa2xx-ac97 mapping ok
> [    5.172711] soc-audio soc-audio: wm9713-aux <-> pxa2xx-ac97-aux mapping ok
> [    5.183377] soc-audio soc-audio: wm9713-voice <-> pxa-ssp-dai.2 mapping ok
> [    5.191817] wm9713-codec wm9713-codec: ASoC: mux Sidetone Mux has no paths
> [    5.232193] NET: Registered protocol family 17
> [    5.238583] Key type dns_resolver registered
> [    5.244879] XScale iWMMXt coprocessor detected.
> [    5.257208] Loading compiled-in X.509 certificates
> [    5.277841] ubi0: attaching mtd5
> [    5.282062] marvell-nfc pxa3xx-nand: 
> [    5.282062] NDCR:  0xdd079fff
> [    5.282062] NDCB0: 0x000d3000
> [    5.282062] NDCB1: 0x23400000
> [    5.282062] NDCB2: 0x00000000
> [    5.282062] NDCB3: 0x00000000
> [    5.302767] marvell-nfc pxa3xx-nand: 
> [    5.302767] NDCR:  0xdd079fff
> [    5.302767] NDCB0: 0x000d3000
> [    5.302767] NDCB1: 0x23410000
> [    5.302767] NDCB2: 0x00000000
> [    5.302767] NDCB3: 0x00000000
> [    5.322069] marvell-nfc pxa3xx-nand: 
> [    5.322069] NDCR:  0x9d079fff
> [    5.322069] NDCB0: 0x000d3000
> [    5.322069] NDCB1: 0x23410000
> [    5.322069] NDCB2: 0x00000000
> [    5.322069] NDCB3: 0x00000000
> [    5.341520] marvell-nfc pxa3xx-nand: 
> [    5.341520] NDCR:  0xdd079fff
> [    5.341520] NDCB0: 0x000d3000
> [    5.341520] NDCB1: 0x23800000
> [    5.341520] NDCB2: 0x00000000
> [    5.341520] NDCB3: 0x00000000
> [    5.361115] marvell-nfc pxa3xx-nand: 
> [    5.361115] NDCR:  0xdd079fff
> [    5.361115] NDCB0: 0x000d3000
> [    5.361115] NDCB1: 0x23810000
> [    5.361115] NDCB2: 0x00000000
> [    5.361115] NDCB3: 0x00000000
> [    5.380361] marvell-nfc pxa3xx-nand: 
> [    5.380361] NDCR:  0x9d079fff
> [    5.380361] NDCB0: 0x000d3000
> [    5.380361] NDCB1: 0x23810000
> [    5.380361] NDCB2: 0x00000000
> [    5.380361] NDCB3: 0x00000000
> [    5.399699] marvell-nfc pxa3xx-nand: 
> [    5.399699] NDCR:  0xdd079fff
> [    5.399699] NDCB0: 0x000d3000
> [    5.399699] NDCB1: 0x23c00000
> [    5.399699] NDCB2: 0x00000000
> [    5.399699] NDCB3: 0x00000000
> [    5.418790] marvell-nfc pxa3xx-nand: 
> [    5.418790] NDCR:  0xdd079fff
> [    5.418790] NDCB0: 0x000d3000
> [    5.418790] NDCB1: 0x23c10000
> [    5.418790] NDCB2: 0x00000000
> [    5.418790] NDCB3: 0x00000000
> [    5.437771] marvell-nfc pxa3xx-nand: 
> [    5.437771] NDCR:  0x9d079fff
> [    5.437771] NDCB0: 0x000d3000
> [    5.437771] NDCB1: 0x23c10000
> [    5.437771] NDCB2: 0x00000000
> [    5.437771] NDCB3: 0x00000000
> [    5.456876] marvell-nfc pxa3xx-nand: 
> [    5.456876] NDCR:  0xdd079fff
> [    5.456876] NDCB0: 0x000d3000
> [    5.456876] NDCB1: 0x24000000
> [    5.456876] NDCB2: 0x00000000
> [    5.456876] NDCB3: 0x00000000
> [    5.475940] marvell-nfc pxa3xx-nand: 
> [    5.475940] NDCR:  0xdd079fff
> [    5.475940] NDCB0: 0x000d3000
> [    5.475940] NDCB1: 0x24010000
> [    5.475940] NDCB2: 0x00000000
> [    5.475940] NDCB3: 0x00000000
> [    5.494922] marvell-nfc pxa3xx-nand: 
> [    5.494922] NDCR:  0x9d079fff
> [    5.494922] NDCB0: 0x000d3000
> [    5.494922] NDCB1: 0x24010000
> [    5.494922] NDCB2: 0x00000000
> [    5.494922] NDCB3: 0x00000000
> [    5.514028] marvell-nfc pxa3xx-nand: 
> [    5.514028] NDCR:  0xdd079fff
> [    5.514028] NDCB0: 0x000d3000
> [    5.514028] NDCB1: 0x24400000
> [    5.514028] NDCB2: 0x00000000
> [    5.514028] NDCB3: 0x00000000
> [    5.533183] marvell-nfc pxa3xx-nand: 
> [    5.533183] NDCR:  0xdd079fff
> [    5.533183] NDCB0: 0x000d3000
> [    5.533183] NDCB1: 0x24410000
> [    5.533183] NDCB2: 0x00000000
> [    5.533183] NDCB3: 0x00000000
> [    5.552166] marvell-nfc pxa3xx-nand: 
> [    5.552166] NDCR:  0x9d079fff
> [    5.552166] NDCB0: 0x000d3000
> [    5.552166] NDCB1: 0x24410000
> [    5.552166] NDCB2: 0x00000000
> [    5.552166] NDCB3: 0x00000000
> [    5.571273] marvell-nfc pxa3xx-nand: 
> [    5.571273] NDCR:  0xdd079fff
> [    5.571273] NDCB0: 0x000d3000
> [    5.571273] NDCB1: 0x24800000
> [    5.571273] NDCB2: 0x00000000
> [    5.571273] NDCB3: 0x00000000
> [    5.590337] marvell-nfc pxa3xx-nand: 
> [    5.590337] NDCR:  0xdd079fff
> [    5.590337] NDCB0: 0x000d3000
> [    5.590337] NDCB1: 0x24810000
> [    5.590337] NDCB2: 0x00000000
> [    5.590337] NDCB3: 0x00000000
> [    5.609318] marvell-nfc pxa3xx-nand: 
> [    5.609318] NDCR:  0x9d079fff
> [    5.609318] NDCB0: 0x000d3000
> [    5.609318] NDCB1: 0x24810000
> [    5.609318] NDCB2: 0x00000000
> [    5.609318] NDCB3: 0x00000000
> [    5.628426] marvell-nfc pxa3xx-nand: 
> [    5.628426] NDCR:  0xdd079fff
> [    5.628426] NDCB0: 0x000d3000
> [    5.628426] NDCB1: 0x24c00000
> [    5.628426] NDCB2: 0x00000000
> [    5.628426] NDCB3: 0x00000000
> [    5.647489] marvell-nfc pxa3xx-nand: 
> [    5.647489] NDCR:  0xdd079fff
> [    5.647489] NDCB0: 0x000d3000
> [    5.647489] NDCB1: 0x24c10000
> [    5.647489] NDCB2: 0x00000000
> [    5.647489] NDCB3: 0x00000000
> [    5.666475] marvell-nfc pxa3xx-nand: 
> [    5.666475] NDCR:  0x9d079fff
> [    5.666475] NDCB0: 0x000d3000
> [    5.666475] NDCB1: 0x24c10000
> [    5.666475] NDCB2: 0x00000000
> [    5.666475] NDCB3: 0x00000000
> [    5.685575] marvell-nfc pxa3xx-nand: 
> [    5.685575] NDCR:  0xdd079fff
> [    5.685575] NDCB0: 0x000d3000
> [    5.685575] NDCB1: 0x25000000
> [    5.685575] NDCB2: 0x00000000
> [    5.685575] NDCB3: 0x00000000
> [    5.704632] marvell-nfc pxa3xx-nand: 
> [    5.704632] NDCR:  0xdd079fff
> [    5.704632] NDCB0: 0x000d3000
> [    5.704632] NDCB1: 0x25010000
> [    5.704632] NDCB2: 0x00000000
> [    5.704632] NDCB3: 0x00000000
> [    5.723609] marvell-nfc pxa3xx-nand: 
> [    5.723609] NDCR:  0x9d079fff
> [    5.723609] NDCB0: 0x000d3000
> [    5.723609] NDCB1: 0x25010000
> [    5.723609] NDCB2: 0x00000000
> [    5.723609] NDCB3: 0x00000000
> [    5.742713] marvell-nfc pxa3xx-nand: 
> [    5.742713] NDCR:  0xdd079fff
> [    5.742713] NDCB0: 0x000d3000
> [    5.742713] NDCB1: 0x25400000
> [    5.742713] NDCB2: 0x00000000
> [    5.742713] NDCB3: 0x00000000
> [    5.761769] marvell-nfc pxa3xx-nand: 
> [    5.761769] NDCR:  0xdd079fff
> [    5.761769] NDCB0: 0x000d3000
> [    5.761769] NDCB1: 0x25410000
> [    5.761769] NDCB2: 0x00000000
> [    5.761769] NDCB3: 0x00000000
> [    5.780750] marvell-nfc pxa3xx-nand: 
> [    5.780750] NDCR:  0x9d079fff
> [    5.780750] NDCB0: 0x000d3000
> [    5.780750] NDCB1: 0x25410000
> [    5.780750] NDCB2: 0x00000000
> [    5.780750] NDCB3: 0x00000000
> [    5.799855] marvell-nfc pxa3xx-nand: 
> [    5.799855] NDCR:  0xdd079fff
> [    5.799855] NDCB0: 0x000d3000
> [    5.799855] NDCB1: 0x25800000
> [    5.799855] NDCB2: 0x00000000
> [    5.799855] NDCB3: 0x00000000
> [    5.818918] marvell-nfc pxa3xx-nand: 
> [    5.818918] NDCR:  0xdd079fff
> [    5.818918] NDCB0: 0x000d3000
> [    5.818918] NDCB1: 0x25810000
> [    5.818918] NDCB2: 0x00000000
> [    5.818918] NDCB3: 0x00000000
> [    5.837903] marvell-nfc pxa3xx-nand: 
> [    5.837903] NDCR:  0x9d079fff
> [    5.837903] NDCB0: 0x000d3000
> [    5.837903] NDCB1: 0x25810000
> [    5.837903] NDCB2: 0x00000000
> [    5.837903] NDCB3: 0x00000000
> [    5.857009] marvell-nfc pxa3xx-nand: 
> [    5.857009] NDCR:  0xdd079fff
> [    5.857009] NDCB0: 0x000d3000
> [    5.857009] NDCB1: 0x25c00000
> [    5.857009] NDCB2: 0x00000000
> [    5.857009] NDCB3: 0x00000000
> [    5.876071] marvell-nfc pxa3xx-nand: 
> [    5.876071] NDCR:  0xdd079fff
> [    5.876071] NDCB0: 0x000d3000
> [    5.876071] NDCB1: 0x25c10000
> [    5.876071] NDCB2: 0x00000000
> [    5.876071] NDCB3: 0x00000000
> [    5.895047] marvell-nfc pxa3xx-nand: 
> [    5.895047] NDCR:  0x9d079fff
> [    5.895047] NDCB0: 0x000d3000
> [    5.895047] NDCB1: 0x25c10000
> [    5.895047] NDCB2: 0x00000000
> [    5.895047] NDCB3: 0x00000000
> [    5.914152] marvell-nfc pxa3xx-nand: 
> [    5.914152] NDCR:  0xdd079fff
> [    5.914152] NDCB0: 0x000d3000
> [    5.914152] NDCB1: 0x26000000
> [    5.914152] NDCB2: 0x00000000
> [    5.914152] NDCB3: 0x00000000
> [    5.933285] marvell-nfc pxa3xx-nand: 
> [    5.933285] NDCR:  0xdd079fff
> [    5.933285] NDCB0: 0x000d3000
> [    5.933285] NDCB1: 0x26010000
> [    5.933285] NDCB2: 0x00000000
> [    5.933285] NDCB3: 0x00000000
> [    5.952247] marvell-nfc pxa3xx-nand: 
> [    5.952247] NDCR:  0x9d079fff
> [    5.952247] NDCB0: 0x000d3000
> [    5.952247] NDCB1: 0x26010000
> [    5.952247] NDCB2: 0x00000000
> [    5.952247] NDCB3: 0x00000000
> [    5.971354] marvell-nfc pxa3xx-nand: 
> [    5.971354] NDCR:  0xdd079fff
> [    5.971354] NDCB0: 0x000d3000
> [    5.971354] NDCB1: 0x26400000
> [    5.971354] NDCB2: 0x00000000
> [    5.971354] NDCB3: 0x00000000
> [    5.990415] marvell-nfc pxa3xx-nand: 
> [    5.990415] NDCR:  0xdd079fff
> [    5.990415] NDCB0: 0x000d3000
> [    5.990415] NDCB1: 0x26410000
> [    5.990415] NDCB2: 0x00000000
> [    5.990415] NDCB3: 0x00000000
> [    6.009391] marvell-nfc pxa3xx-nand: 
> [    6.009391] NDCR:  0x9d079fff
> [    6.009391] NDCB0: 0x000d3000
> [    6.009391] NDCB1: 0x26410000
> [    6.009391] NDCB2: 0x00000000
> [    6.009391] NDCB3: 0x00000000
> [    6.028510] marvell-nfc pxa3xx-nand: 
> [    6.028510] NDCR:  0xdd079fff
> [    6.028510] NDCB0: 0x000d3000
> [    6.028510] NDCB1: 0x26800000
> [    6.028510] NDCB2: 0x00000000
> [    6.028510] NDCB3: 0x00000000
> [    6.047572] marvell-nfc pxa3xx-nand: 
> [    6.047572] NDCR:  0xdd079fff
> [    6.047572] NDCB0: 0x000d3000
> [    6.047572] NDCB1: 0x26810000
> [    6.047572] NDCB2: 0x00000000
> [    6.047572] NDCB3: 0x00000000
> [    6.066553] marvell-nfc pxa3xx-nand: 
> [    6.066553] NDCR:  0x9d079fff
> [    6.066553] NDCB0: 0x000d3000
> [    6.066553] NDCB1: 0x26810000
> [    6.066553] NDCB2: 0x00000000
> [    6.066553] NDCB3: 0x00000000
> [    6.085662] marvell-nfc pxa3xx-nand: 
> [    6.085662] NDCR:  0xdd079fff
> [    6.085662] NDCB0: 0x000d3000
> [    6.085662] NDCB1: 0x26c00000
> [    6.085662] NDCB2: 0x00000000
> [    6.085662] NDCB3: 0x00000000
> [    6.105275] marvell-nfc pxa3xx-nand: 
> [    6.105275] NDCR:  0xdd079fff
> [    6.105275] NDCB0: 0x000d3000
> [    6.105275] NDCB1: 0x26c10000
> [    6.105275] NDCB2: 0x00000000
> [    6.105275] NDCB3: 0x00000000
> [    6.124291] marvell-nfc pxa3xx-nand: 
> [    6.124291] NDCR:  0x9d079fff
> [    6.124291] NDCB0: 0x000d3000
> [    6.124291] NDCB1: 0x26c10000
> [    6.124291] NDCB2: 0x00000000
> [    6.124291] NDCB3: 0x00000000
> [    6.143431] marvell-nfc pxa3xx-nand: 
> [    6.143431] NDCR:  0xdd079fff
> [    6.143431] NDCB0: 0x000d3000
> [    6.143431] NDCB1: 0x27000000
> [    6.143431] NDCB2: 0x00000000
> [    6.143431] NDCB3: 0x00000000
> [    6.162492] marvell-nfc pxa3xx-nand: 
> [    6.162492] NDCR:  0xdd079fff
> [    6.162492] NDCB0: 0x000d3000
> [    6.162492] NDCB1: 0x27010000
> [    6.162492] NDCB2: 0x00000000
> [    6.162492] NDCB3: 0x00000000
> [    6.181482] marvell-nfc pxa3xx-nand: 
> [    6.181482] NDCR:  0x9d079fff
> [    6.181482] NDCB0: 0x000d3000
> [    6.181482] NDCB1: 0x27010000
> [    6.181482] NDCB2: 0x00000000
> [    6.181482] NDCB3: 0x00000000
> [    6.200594] marvell-nfc pxa3xx-nand: 
> [    6.200594] NDCR:  0xdd079fff
> [    6.200594] NDCB0: 0x000d3000
> [    6.200594] NDCB1: 0x27400000
> [    6.200594] NDCB2: 0x00000000
> [    6.200594] NDCB3: 0x00000000
> [    6.219651] marvell-nfc pxa3xx-nand: 
> [    6.219651] NDCR:  0xdd079fff
> [    6.219651] NDCB0: 0x000d3000
> [    6.219651] NDCB1: 0x27410000
> [    6.219651] NDCB2: 0x00000000
> [    6.219651] NDCB3: 0x00000000
> [    6.238628] marvell-nfc pxa3xx-nand: 
> [    6.238628] NDCR:  0x9d079fff
> [    6.238628] NDCB0: 0x000d3000
> [    6.238628] NDCB1: 0x27410000
> [    6.238628] NDCB2: 0x00000000
> [    6.238628] NDCB3: 0x00000000
> [    6.257763] marvell-nfc pxa3xx-nand: 
> [    6.257763] NDCR:  0xdd079fff
> [    6.257763] NDCB0: 0x000d3000
> [    6.257763] NDCB1: 0x27800000
> [    6.257763] NDCB2: 0x00000000
> [    6.257763] NDCB3: 0x00000000
> [    6.276826] marvell-nfc pxa3xx-nand: 
> [    6.276826] NDCR:  0xdd079fff
> [    6.276826] NDCB0: 0x000d3000
> [    6.276826] NDCB1: 0x27810000
> [    6.276826] NDCB2: 0x00000000
> [    6.276826] NDCB3: 0x00000000
> [    6.295914] marvell-nfc pxa3xx-nand: 
> [    6.295914] NDCR:  0xdd079fff
> [    6.295914] NDCB0: 0x000d3000
> [    6.295914] NDCB1: 0x27c00000
> [    6.295914] NDCB2: 0x00000000
> [    6.295914] NDCB3: 0x00000000
> [    6.314978] marvell-nfc pxa3xx-nand: 
> [    6.314978] NDCR:  0xdd079fff
> [    6.314978] NDCB0: 0x000d3000
> [    6.314978] NDCB1: 0x27c10000
> [    6.314978] NDCB2: 0x00000000
> [    6.314978] NDCB3: 0x00000000
> [    6.333957] marvell-nfc pxa3xx-nand: 
> [    6.333957] NDCR:  0x9d079fff
> [    6.333957] NDCB0: 0x000d3000
> [    6.333957] NDCB1: 0x27c10000
> [    6.333957] NDCB2: 0x00000000
> [    6.333957] NDCB3: 0x00000000
> [    6.353164] marvell-nfc pxa3xx-nand: 
> [    6.353164] NDCR:  0xdd079fff
> [    6.353164] NDCB0: 0x000d3000
> [    6.353164] NDCB1: 0x28000000
> [    6.353164] NDCB2: 0x00000000
> [    6.353164] NDCB3: 0x00000000
> [    6.372184] marvell-nfc pxa3xx-nand: 
> [    6.372184] NDCR:  0xdd079fff
> [    6.372184] NDCB0: 0x000d3000
> [    6.372184] NDCB1: 0x28010000
> [    6.372184] NDCB2: 0x00000000
> [    6.372184] NDCB3: 0x00000000
> [    6.391168] marvell-nfc pxa3xx-nand: 
> [    6.391168] NDCR:  0x9d079fff
> [    6.391168] NDCB0: 0x000d3000
> [    6.391168] NDCB1: 0x28010000
> [    6.391168] NDCB2: 0x00000000
> [    6.391168] NDCB3: 0x00000000
> [    6.410268] marvell-nfc pxa3xx-nand: 
> [    6.410268] NDCR:  0xdd079fff
> [    6.410268] NDCB0: 0x000d3000
> [    6.410268] NDCB1: 0x28400000
> [    6.410268] NDCB2: 0x00000000
> [    6.410268] NDCB3: 0x00000000
> [    6.429335] marvell-nfc pxa3xx-nand: 
> [    6.429335] NDCR:  0xdd079fff
> [    6.429335] NDCB0: 0x000d3000
> [    6.429335] NDCB1: 0x28410000
> [    6.429335] NDCB2: 0x00000000
> [    6.429335] NDCB3: 0x00000000
> [    6.448408] marvell-nfc pxa3xx-nand: 
> [    6.448408] NDCR:  0xdd079fff
> [    6.448408] NDCB0: 0x000d3000
> [    6.448408] NDCB1: 0x28800000
> [    6.448408] NDCB2: 0x00000000
> [    6.448408] NDCB3: 0x00000000
> [    6.467471] marvell-nfc pxa3xx-nand: 
> [    6.467471] NDCR:  0xdd079fff
> [    6.467471] NDCB0: 0x000d3000
> [    6.467471] NDCB1: 0x28810000
> [    6.467471] NDCB2: 0x00000000
> [    6.467471] NDCB3: 0x00000000
> [    6.486456] marvell-nfc pxa3xx-nand: 
> [    6.486456] NDCR:  0x9d079fff
> [    6.486456] NDCB0: 0x000d3000
> [    6.486456] NDCB1: 0x28810000
> [    6.486456] NDCB2: 0x00000000
> [    6.486456] NDCB3: 0x00000000
> [    6.505554] marvell-nfc pxa3xx-nand: 
> [    6.505554] NDCR:  0xdd079fff
> [    6.505554] NDCB0: 0x000d3000
> [    6.505554] NDCB1: 0x28c00000
> [    6.505554] NDCB2: 0x00000000
> [    6.505554] NDCB3: 0x00000000
> [    6.524610] marvell-nfc pxa3xx-nand: 
> [    6.524610] NDCR:  0xdd079fff
> [    6.524610] NDCB0: 0x000d3000
> [    6.524610] NDCB1: 0x28c10000
> [    6.524610] NDCB2: 0x00000000
> [    6.524610] NDCB3: 0x00000000
> [    6.543589] marvell-nfc pxa3xx-nand: 
> [    6.543589] NDCR:  0x9d079fff
> [    6.543589] NDCB0: 0x000d3000
> [    6.543589] NDCB1: 0x28c10000
> [    6.543589] NDCB2: 0x00000000
> [    6.543589] NDCB3: 0x00000000
> [    6.562688] marvell-nfc pxa3xx-nand: 
> [    6.562688] NDCR:  0xdd079fff
> [    6.562688] NDCB0: 0x000d3000
> [    6.562688] NDCB1: 0x29000000
> [    6.562688] NDCB2: 0x00000000
> [    6.562688] NDCB3: 0x00000000
> [    6.581750] marvell-nfc pxa3xx-nand: 
> [    6.581750] NDCR:  0xdd079fff
> [    6.581750] NDCB0: 0x000d3000
> [    6.581750] NDCB1: 0x29010000
> [    6.581750] NDCB2: 0x00000000
> [    6.581750] NDCB3: 0x00000000
> [    6.600735] marvell-nfc pxa3xx-nand: 
> [    6.600735] NDCR:  0x9d079fff
> [    6.600735] NDCB0: 0x000d3000
> [    6.600735] NDCB1: 0x29010000
> [    6.600735] NDCB2: 0x00000000
> [    6.600735] NDCB3: 0x00000000
> [    6.619839] marvell-nfc pxa3xx-nand: 
> [    6.619839] NDCR:  0xdd079fff
> [    6.619839] NDCB0: 0x000d3000
> [    6.619839] NDCB1: 0x29400000
> [    6.619839] NDCB2: 0x00000000
> [    6.619839] NDCB3: 0x00000000
> [    6.638902] marvell-nfc pxa3xx-nand: 
> [    6.638902] NDCR:  0xdd079fff
> [    6.638902] NDCB0: 0x000d3000
> [    6.638902] NDCB1: 0x29410000
> [    6.638902] NDCB2: 0x00000000
> [    6.638902] NDCB3: 0x00000000
> [    6.657879] marvell-nfc pxa3xx-nand: 
> [    6.657879] NDCR:  0x9d079fff
> [    6.657879] NDCB0: 0x000d3000
> [    6.657879] NDCB1: 0x29410000
> [    6.657879] NDCB2: 0x00000000
> [    6.657879] NDCB3: 0x00000000
> [    6.676983] marvell-nfc pxa3xx-nand: 
> [    6.676983] NDCR:  0xdd079fff
> [    6.676983] NDCB0: 0x000d3000
> [    6.676983] NDCB1: 0x29800000
> [    6.676983] NDCB2: 0x00000000
> [    6.676983] NDCB3: 0x00000000
> [    6.696050] marvell-nfc pxa3xx-nand: 
> [    6.696050] NDCR:  0xdd079fff
> [    6.696050] NDCB0: 0x000d3000
> [    6.696050] NDCB1: 0x29810000
> [    6.696050] NDCB2: 0x00000000
> [    6.696050] NDCB3: 0x00000000
> [    6.715033] marvell-nfc pxa3xx-nand: 
> [    6.715033] NDCR:  0x9d079fff
> [    6.715033] NDCB0: 0x000d3000
> [    6.715033] NDCB1: 0x29810000
> [    6.715033] NDCB2: 0x00000000
> [    6.715033] NDCB3: 0x00000000
> [    6.734141] marvell-nfc pxa3xx-nand: 
> [    6.734141] NDCR:  0xdd079fff
> [    6.734141] NDCB0: 0x000d3000
> [    6.734141] NDCB1: 0x29c00000
> [    6.734141] NDCB2: 0x00000000
> [    6.734141] NDCB3: 0x00000000
> [    6.753291] marvell-nfc pxa3xx-nand: 
> [    6.753291] NDCR:  0xdd079fff
> [    6.753291] NDCB0: 0x000d3000
> [    6.753291] NDCB1: 0x29c10000
> [    6.753291] NDCB2: 0x00000000
> [    6.753291] NDCB3: 0x00000000
> [    6.772264] marvell-nfc pxa3xx-nand: 
> [    6.772264] NDCR:  0x9d079fff
> [    6.772264] NDCB0: 0x000d3000
> [    6.772264] NDCB1: 0x29c10000
> [    6.772264] NDCB2: 0x00000000
> [    6.772264] NDCB3: 0x00000000
> [    6.791367] marvell-nfc pxa3xx-nand: 
> [    6.791367] NDCR:  0xdd079fff
> [    6.791367] NDCB0: 0x000d3000
> [    6.791367] NDCB1: 0x2a000000
> [    6.791367] NDCB2: 0x00000000
> [    6.791367] NDCB3: 0x00000000
> [    6.810425] marvell-nfc pxa3xx-nand: 
> [    6.810425] NDCR:  0xdd079fff
> [    6.810425] NDCB0: 0x000d3000
> [    6.810425] NDCB1: 0x2a010000
> [    6.810425] NDCB2: 0x00000000
> [    6.810425] NDCB3: 0x00000000
> [    6.829403] marvell-nfc pxa3xx-nand: 
> [    6.829403] NDCR:  0x9d079fff
> [    6.829403] NDCB0: 0x000d3000
> [    6.829403] NDCB1: 0x2a010000
> [    6.829403] NDCB2: 0x00000000
> [    6.829403] NDCB3: 0x00000000
> [    6.848512] marvell-nfc pxa3xx-nand: 
> [    6.848512] NDCR:  0xdd079fff
> [    6.848512] NDCB0: 0x000d3000
> [    6.848512] NDCB1: 0x2a400000
> [    6.848512] NDCB2: 0x00000000
> [    6.848512] NDCB3: 0x00000000
> [    6.867573] marvell-nfc pxa3xx-nand: 
> [    6.867573] NDCR:  0xdd079fff
> [    6.867573] NDCB0: 0x000d3000
> [    6.867573] NDCB1: 0x2a410000
> [    6.867573] NDCB2: 0x00000000
> [    6.867573] NDCB3: 0x00000000
> [    6.886550] marvell-nfc pxa3xx-nand: 
> [    6.886550] NDCR:  0x9d079fff
> [    6.886550] NDCB0: 0x000d3000
> [    6.886550] NDCB1: 0x2a410000
> [    6.886550] NDCB2: 0x00000000
> [    6.886550] NDCB3: 0x00000000
> [    6.905653] marvell-nfc pxa3xx-nand: 
> [    6.905653] NDCR:  0xdd079fff
> [    6.905653] NDCB0: 0x000d3000
> [    6.905653] NDCB1: 0x2a800000
> [    6.905653] NDCB2: 0x00000000
> [    6.905653] NDCB3: 0x00000000
> [    6.924720] marvell-nfc pxa3xx-nand: 
> [    6.924720] NDCR:  0xdd079fff
> [    6.924720] NDCB0: 0x000d3000
> [    6.924720] NDCB1: 0x2a810000
> [    6.924720] NDCB2: 0x00000000
> [    6.924720] NDCB3: 0x00000000
> [    6.943704] marvell-nfc pxa3xx-nand: 
> [    6.943704] NDCR:  0x9d079fff
> [    6.943704] NDCB0: 0x000d3000
> [    6.943704] NDCB1: 0x2a810000
> [    6.943704] NDCB2: 0x00000000
> [    6.943704] NDCB3: 0x00000000
> [    6.962806] marvell-nfc pxa3xx-nand: 
> [    6.962806] NDCR:  0xdd079fff
> [    6.962806] NDCB0: 0x000d3000
> [    6.962806] NDCB1: 0x2ac00000
> [    6.962806] NDCB2: 0x00000000
> [    6.962806] NDCB3: 0x00000000
> [    6.981868] marvell-nfc pxa3xx-nand: 
> [    6.981868] NDCR:  0xdd079fff
> [    6.981868] NDCB0: 0x000d3000
> [    6.981868] NDCB1: 0x2ac10000
> [    6.981868] NDCB2: 0x00000000
> [    6.981868] NDCB3: 0x00000000
> [    7.000848] marvell-nfc pxa3xx-nand: 
> [    7.000848] NDCR:  0x9d079fff
> [    7.000848] NDCB0: 0x000d3000
> [    7.000848] NDCB1: 0x2ac10000
> [    7.000848] NDCB2: 0x00000000
> [    7.000848] NDCB3: 0x00000000
> [    7.019966] marvell-nfc pxa3xx-nand: 
> [    7.019966] NDCR:  0xdd079fff
> [    7.019966] NDCB0: 0x000d3000
> [    7.019966] NDCB1: 0x2b000000
> [    7.019966] NDCB2: 0x00000000
> [    7.019966] NDCB3: 0x00000000
> [    7.039028] marvell-nfc pxa3xx-nand: 
> [    7.039028] NDCR:  0xdd079fff
> [    7.039028] NDCB0: 0x000d3000
> [    7.039028] NDCB1: 0x2b010000
> [    7.039028] NDCB2: 0x00000000
> [    7.039028] NDCB3: 0x00000000
> [    7.058002] marvell-nfc pxa3xx-nand: 
> [    7.058002] NDCR:  0x9d079fff
> [    7.058002] NDCB0: 0x000d3000
> [    7.058002] NDCB1: 0x2b010000
> [    7.058002] NDCB2: 0x00000000
> [    7.058002] NDCB3: 0x00000000
> [    7.077109] marvell-nfc pxa3xx-nand: 
> [    7.077109] NDCR:  0xdd079fff
> [    7.077109] NDCB0: 0x000d3000
> [    7.077109] NDCB1: 0x2b400000
> [    7.077109] NDCB2: 0x00000000
> [    7.077109] NDCB3: 0x00000000
> [    7.096173] marvell-nfc pxa3xx-nand: 
> [    7.096173] NDCR:  0xdd079fff
> [    7.096173] NDCB0: 0x000d3000
> [    7.096173] NDCB1: 0x2b410000
> [    7.096173] NDCB2: 0x00000000
> [    7.096173] NDCB3: 0x00000000
> [    7.115153] marvell-nfc pxa3xx-nand: 
> [    7.115153] NDCR:  0x9d079fff
> [    7.115153] NDCB0: 0x000d3000
> [    7.115153] NDCB1: 0x2b410000
> [    7.115153] NDCB2: 0x00000000
> [    7.115153] NDCB3: 0x00000000
> [    7.134255] marvell-nfc pxa3xx-nand: 
> [    7.134255] NDCR:  0xdd079fff
> [    7.134255] NDCB0: 0x000d3000
> [    7.134255] NDCB1: 0x2b800000
> [    7.134255] NDCB2: 0x00000000
> [    7.134255] NDCB3: 0x00000000
> [    7.153307] marvell-nfc pxa3xx-nand: 
> [    7.153307] NDCR:  0xdd079fff
> [    7.153307] NDCB0: 0x000d3000
> [    7.153307] NDCB1: 0x2b810000
> [    7.153307] NDCB2: 0x00000000
> [    7.153307] NDCB3: 0x00000000
> [    7.172279] marvell-nfc pxa3xx-nand: 
> [    7.172279] NDCR:  0x9d079fff
> [    7.172279] NDCB0: 0x000d3000
> [    7.172279] NDCB1: 0x2b810000
> [    7.172279] NDCB2: 0x00000000
> [    7.172279] NDCB3: 0x00000000
> [    7.191385] marvell-nfc pxa3xx-nand: 
> [    7.191385] NDCR:  0xdd079fff
> [    7.191385] NDCB0: 0x000d3000
> [    7.191385] NDCB1: 0x2bc00000
> [    7.191385] NDCB2: 0x00000000
> [    7.191385] NDCB3: 0x00000000
> [    7.210447] marvell-nfc pxa3xx-nand: 
> [    7.210447] NDCR:  0xdd079fff
> [    7.210447] NDCB0: 0x000d3000
> [    7.210447] NDCB1: 0x2bc10000
> [    7.210447] NDCB2: 0x00000000
> [    7.210447] NDCB3: 0x00000000
> [    7.229426] marvell-nfc pxa3xx-nand: 
> [    7.229426] NDCR:  0x9d079fff
> [    7.229426] NDCB0: 0x000d3000
> [    7.229426] NDCB1: 0x2bc10000
> [    7.229426] NDCB2: 0x00000000
> [    7.229426] NDCB3: 0x00000000
> [    7.248529] marvell-nfc pxa3xx-nand: 
> [    7.248529] NDCR:  0xdd079fff
> [    7.248529] NDCB0: 0x000d3000
> [    7.248529] NDCB1: 0x2c000000
> [    7.248529] NDCB2: 0x00000000
> [    7.248529] NDCB3: 0x00000000
> [    7.267597] marvell-nfc pxa3xx-nand: 
> [    7.267597] NDCR:  0xdd079fff
> [    7.267597] NDCB0: 0x000d3000
> [    7.267597] NDCB1: 0x2c010000
> [    7.267597] NDCB2: 0x00000000
> [    7.267597] NDCB3: 0x00000000
> [    7.286579] marvell-nfc pxa3xx-nand: 
> [    7.286579] NDCR:  0x9d079fff
> [    7.286579] NDCB0: 0x000d3000
> [    7.286579] NDCB1: 0x2c010000
> [    7.286579] NDCB2: 0x00000000
> [    7.286579] NDCB3: 0x00000000
> [    7.305683] marvell-nfc pxa3xx-nand: 
> [    7.305683] NDCR:  0xdd079fff
> [    7.305683] NDCB0: 0x000d3000
> [    7.305683] NDCB1: 0x2c400000
> [    7.305683] NDCB2: 0x00000000
> [    7.305683] NDCB3: 0x00000000
> [    7.324747] marvell-nfc pxa3xx-nand: 
> [    7.324747] NDCR:  0xdd079fff
> [    7.324747] NDCB0: 0x000d3000
> [    7.324747] NDCB1: 0x2c410000
> [    7.324747] NDCB2: 0x00000000
> [    7.324747] NDCB3: 0x00000000
> [    7.343743] marvell-nfc pxa3xx-nand: 
> [    7.343743] NDCR:  0x9d079fff
> [    7.343743] NDCB0: 0x000d3000
> [    7.343743] NDCB1: 0x2c410000
> [    7.343743] NDCB2: 0x00000000
> [    7.343743] NDCB3: 0x00000000
> [    7.362843] marvell-nfc pxa3xx-nand: 
> [    7.362843] NDCR:  0xdd079fff
> [    7.362843] NDCB0: 0x000d3000
> [    7.362843] NDCB1: 0x2c800000
> [    7.362843] NDCB2: 0x00000000
> [    7.362843] NDCB3: 0x00000000
> [    7.381905] marvell-nfc pxa3xx-nand: 
> [    7.381905] NDCR:  0xdd079fff
> [    7.381905] NDCB0: 0x000d3000
> [    7.381905] NDCB1: 0x2c810000
> [    7.381905] NDCB2: 0x00000000
> [    7.381905] NDCB3: 0x00000000
> [    7.400887] marvell-nfc pxa3xx-nand: 
> [    7.400887] NDCR:  0x9d079fff
> [    7.400887] NDCB0: 0x000d3000
> [    7.400887] NDCB1: 0x2c810000
> [    7.400887] NDCB2: 0x00000000
> [    7.400887] NDCB3: 0x00000000
> [    7.420884] marvell-nfc pxa3xx-nand: 
> [    7.420884] NDCR:  0xdd079fff
> [    7.420884] NDCB0: 0x000d3000
> [    7.420884] NDCB1: 0x50800000
> [    7.420884] NDCB2: 0x00000000
> [    7.420884] NDCB3: 0x00000000
> [    7.439944] marvell-nfc pxa3xx-nand: 
> [    7.439944] NDCR:  0xdd079fff
> [    7.439944] NDCB0: 0x000d3000
> [    7.439944] NDCB1: 0x50810000
> [    7.439944] NDCB2: 0x00000000
> [    7.439944] NDCB3: 0x00000000
> [    7.458920] marvell-nfc pxa3xx-nand: 
> [    7.458920] NDCR:  0x9d079fff
> [    7.458920] NDCB0: 0x000d3000
> [    7.458920] NDCB1: 0x50810000
> [    7.458920] NDCB2: 0x00000000
> [    7.458920] NDCB3: 0x00000000
> [    7.478025] marvell-nfc pxa3xx-nand: 
> [    7.478025] NDCR:  0xdd079fff
> [    7.478025] NDCB0: 0x000d3000
> [    7.478025] NDCB1: 0x50c00000
> [    7.478025] NDCB2: 0x00000000
> [    7.478025] NDCB3: 0x00000000
> [    7.497089] marvell-nfc pxa3xx-nand: 
> [    7.497089] NDCR:  0xdd079fff
> [    7.497089] NDCB0: 0x000d3000
> [    7.497089] NDCB1: 0x50c10000
> [    7.497089] NDCB2: 0x00000000
> [    7.497089] NDCB3: 0x00000000
> [    7.516067] marvell-nfc pxa3xx-nand: 
> [    7.516067] NDCR:  0x9d079fff
> [    7.516067] NDCB0: 0x000d3000
> [    7.516067] NDCB1: 0x50c10000
> [    7.516067] NDCB2: 0x00000000
> [    7.516067] NDCB3: 0x00000000
> [    7.535172] marvell-nfc pxa3xx-nand: 
> [    7.535172] NDCR:  0xdd079fff
> [    7.535172] NDCB0: 0x000d3000
> [    7.535172] NDCB1: 0x51000000
> [    7.535172] NDCB2: 0x00000000
> [    7.535172] NDCB3: 0x00000000
> [    7.554233] marvell-nfc pxa3xx-nand: 
> [    7.554233] NDCR:  0xdd079fff
> [    7.554233] NDCB0: 0x000d3000
> [    7.554233] NDCB1: 0x51010000
> [    7.554233] NDCB2: 0x00000000
> [    7.554233] NDCB3: 0x00000000
> [    7.573238] marvell-nfc pxa3xx-nand: 
> [    7.573238] NDCR:  0x9d079fff
> [    7.573238] NDCB0: 0x000d3000
> [    7.573238] NDCB1: 0x51010000
> [    7.573238] NDCB2: 0x00000000
> [    7.573238] NDCB3: 0x00000000
> [    7.592334] marvell-nfc pxa3xx-nand: 
> [    7.592334] NDCR:  0xdd079fff
> [    7.592334] NDCB0: 0x000d3000
> [    7.592334] NDCB1: 0x51400000
> [    7.592334] NDCB2: 0x00000000
> [    7.592334] NDCB3: 0x00000000
> [    7.611401] marvell-nfc pxa3xx-nand: 
> [    7.611401] NDCR:  0xdd079fff
> [    7.611401] NDCB0: 0x000d3000
> [    7.611401] NDCB1: 0x51410000
> [    7.611401] NDCB2: 0x00000000
> [    7.611401] NDCB3: 0x00000000
> [    7.630384] marvell-nfc pxa3xx-nand: 
> [    7.630384] NDCR:  0x9d079fff
> [    7.630384] NDCB0: 0x000d3000
> [    7.630384] NDCB1: 0x51410000
> [    7.630384] NDCB2: 0x00000000
> [    7.630384] NDCB3: 0x00000000
> [    7.649492] marvell-nfc pxa3xx-nand: 
> [    7.649492] NDCR:  0xdd079fff
> [    7.649492] NDCB0: 0x000d3000
> [    7.649492] NDCB1: 0x51800000
> [    7.649492] NDCB2: 0x00000000
> [    7.649492] NDCB3: 0x00000000
> [    7.668554] marvell-nfc pxa3xx-nand: 
> [    7.668554] NDCR:  0xdd079fff
> [    7.668554] NDCB0: 0x000d3000
> [    7.668554] NDCB1: 0x51810000
> [    7.668554] NDCB2: 0x00000000
> [    7.668554] NDCB3: 0x00000000
> [    7.687527] marvell-nfc pxa3xx-nand: 
> [    7.687527] NDCR:  0x9d079fff
> [    7.687527] NDCB0: 0x000d3000
> [    7.687527] NDCB1: 0x51810000
> [    7.687527] NDCB2: 0x00000000
> [    7.687527] NDCB3: 0x00000000
> [    7.706637] marvell-nfc pxa3xx-nand: 
> [    7.706637] NDCR:  0xdd079fff
> [    7.706637] NDCB0: 0x000d3000
> [    7.706637] NDCB1: 0x51c00000
> [    7.706637] NDCB2: 0x00000000
> [    7.706637] NDCB3: 0x00000000
> [    7.725697] marvell-nfc pxa3xx-nand: 
> [    7.725697] NDCR:  0xdd079fff
> [    7.725697] NDCB0: 0x000d3000
> [    7.725697] NDCB1: 0x51c10000
> [    7.725697] NDCB2: 0x00000000
> [    7.725697] NDCB3: 0x00000000
> [    7.744674] marvell-nfc pxa3xx-nand: 
> [    7.744674] NDCR:  0x9d079fff
> [    7.744674] NDCB0: 0x000d3000
> [    7.744674] NDCB1: 0x51c10000
> [    7.744674] NDCB2: 0x00000000
> [    7.744674] NDCB3: 0x00000000
> [    7.763781] marvell-nfc pxa3xx-nand: 
> [    7.763781] NDCR:  0xdd079fff
> [    7.763781] NDCB0: 0x000d3000
> [    7.763781] NDCB1: 0x52000000
> [    7.763781] NDCB2: 0x00000000
> [    7.763781] NDCB3: 0x00000000
> [    7.782838] marvell-nfc pxa3xx-nand: 
> [    7.782838] NDCR:  0xdd079fff
> [    7.782838] NDCB0: 0x000d3000
> [    7.782838] NDCB1: 0x52010000
> [    7.782838] NDCB2: 0x00000000
> [    7.782838] NDCB3: 0x00000000
> [    7.801814] marvell-nfc pxa3xx-nand: 
> [    7.801814] NDCR:  0x9d079fff
> [    7.801814] NDCB0: 0x000d3000
> [    7.801814] NDCB1: 0x52010000
> [    7.801814] NDCB2: 0x00000000
> [    7.801814] NDCB3: 0x00000000
> [    7.820919] marvell-nfc pxa3xx-nand: 
> [    7.820919] NDCR:  0xdd079fff
> [    7.820919] NDCB0: 0x000d3000
> [    7.820919] NDCB1: 0x52400000
> [    7.820919] NDCB2: 0x00000000
> [    7.820919] NDCB3: 0x00000000
> [    7.839984] marvell-nfc pxa3xx-nand: 
> [    7.839984] NDCR:  0xdd079fff
> [    7.839984] NDCB0: 0x000d3000
> [    7.839984] NDCB1: 0x52410000
> [    7.839984] NDCB2: 0x00000000
> [    7.839984] NDCB3: 0x00000000
> [    7.858968] marvell-nfc pxa3xx-nand: 
> [    7.858968] NDCR:  0x9d079fff
> [    7.858968] NDCB0: 0x000d3000
> [    7.858968] NDCB1: 0x52410000
> [    7.858968] NDCB2: 0x00000000
> [    7.858968] NDCB3: 0x00000000
> [    7.878070] marvell-nfc pxa3xx-nand: 
> [    7.878070] NDCR:  0xdd079fff
> [    7.878070] NDCB0: 0x000d3000
> [    7.878070] NDCB1: 0x52800000
> [    7.878070] NDCB2: 0x00000000
> [    7.878070] NDCB3: 0x00000000
> [    7.897127] marvell-nfc pxa3xx-nand: 
> [    7.897127] NDCR:  0xdd079fff
> [    7.897127] NDCB0: 0x000d3000
> [    7.897127] NDCB1: 0x52810000
> [    7.897127] NDCB2: 0x00000000
> [    7.897127] NDCB3: 0x00000000
> [    7.916104] marvell-nfc pxa3xx-nand: 
> [    7.916104] NDCR:  0x9d079fff
> [    7.916104] NDCB0: 0x000d3000
> [    7.916104] NDCB1: 0x52810000
> [    7.916104] NDCB2: 0x00000000
> [    7.916104] NDCB3: 0x00000000
> [    7.935231] marvell-nfc pxa3xx-nand: 
> [    7.935231] NDCR:  0xdd079fff
> [    7.935231] NDCB0: 0x000d3000
> [    7.935231] NDCB1: 0x52c00000
> [    7.935231] NDCB2: 0x00000000
> [    7.935231] NDCB3: 0x00000000
> [    7.954292] marvell-nfc pxa3xx-nand: 
> [    7.954292] NDCR:  0xdd079fff
> [    7.954292] NDCB0: 0x000d3000
> [    7.954292] NDCB1: 0x52c10000
> [    7.954292] NDCB2: 0x00000000
> [    7.954292] NDCB3: 0x00000000
> [    7.973328] marvell-nfc pxa3xx-nand: 
> [    7.973328] NDCR:  0x9d079fff
> [    7.973328] NDCB0: 0x000d3000
> [    7.973328] NDCB1: 0x52c10000
> [    7.973328] NDCB2: 0x00000000
> [    7.973328] NDCB3: 0x00000000
> [    7.992424] marvell-nfc pxa3xx-nand: 
> [    7.992424] NDCR:  0xdd079fff
> [    7.992424] NDCB0: 0x000d3000
> [    7.992424] NDCB1: 0x53000000
> [    7.992424] NDCB2: 0x00000000
> [    7.992424] NDCB3: 0x00000000
> [    8.011485] marvell-nfc pxa3xx-nand: 
> [    8.011485] NDCR:  0xdd079fff
> [    8.011485] NDCB0: 0x000d3000
> [    8.011485] NDCB1: 0x53010000
> [    8.011485] NDCB2: 0x00000000
> [    8.011485] NDCB3: 0x00000000
> [    8.030479] marvell-nfc pxa3xx-nand: 
> [    8.030479] NDCR:  0x9d079fff
> [    8.030479] NDCB0: 0x000d3000
> [    8.030479] NDCB1: 0x53010000
> [    8.030479] NDCB2: 0x00000000
> [    8.030479] NDCB3: 0x00000000
> [    8.049579] marvell-nfc pxa3xx-nand: 
> [    8.049579] NDCR:  0xdd079fff
> [    8.049579] NDCB0: 0x000d3000
> [    8.049579] NDCB1: 0x53400000
> [    8.049579] NDCB2: 0x00000000
> [    8.049579] NDCB3: 0x00000000
> [    8.068643] marvell-nfc pxa3xx-nand: 
> [    8.068643] NDCR:  0xdd079fff
> [    8.068643] NDCB0: 0x000d3000
> [    8.068643] NDCB1: 0x53410000
> [    8.068643] NDCB2: 0x00000000
> [    8.068643] NDCB3: 0x00000000
> [    8.087618] marvell-nfc pxa3xx-nand: 
> [    8.087618] NDCR:  0x9d079fff
> [    8.087618] NDCB0: 0x000d3000
> [    8.087618] NDCB1: 0x53410000
> [    8.087618] NDCB2: 0x00000000
> [    8.087618] NDCB3: 0x00000000
> [    8.107355] marvell-nfc pxa3xx-nand: 
> [    8.107355] NDCR:  0xdd079fff
> [    8.107355] NDCB0: 0x000d3000
> [    8.107355] NDCB1: 0x53800000
> [    8.107355] NDCB2: 0x00000000
> [    8.107355] NDCB3: 0x00000000
> [    8.126458] marvell-nfc pxa3xx-nand: 
> [    8.126458] NDCR:  0xdd079fff
> [    8.126458] NDCB0: 0x000d3000
> [    8.126458] NDCB1: 0x53810000
> [    8.126458] NDCB2: 0x00000000
> [    8.126458] NDCB3: 0x00000000
> [    8.145438] marvell-nfc pxa3xx-nand: 
> [    8.145438] NDCR:  0x9d079fff
> [    8.145438] NDCB0: 0x000d3000
> [    8.145438] NDCB1: 0x53810000
> [    8.145438] NDCB2: 0x00000000
> [    8.145438] NDCB3: 0x00000000
> [    8.164543] marvell-nfc pxa3xx-nand: 
> [    8.164543] NDCR:  0xdd079fff
> [    8.164543] NDCB0: 0x000d3000
> [    8.164543] NDCB1: 0x53c00000
> [    8.164543] NDCB2: 0x00000000
> [    8.164543] NDCB3: 0x00000000
> [    8.183607] marvell-nfc pxa3xx-nand: 
> [    8.183607] NDCR:  0xdd079fff
> [    8.183607] NDCB0: 0x000d3000
> [    8.183607] NDCB1: 0x53c10000
> [    8.183607] NDCB2: 0x00000000
> [    8.183607] NDCB3: 0x00000000
> [    8.202574] marvell-nfc pxa3xx-nand: 
> [    8.202574] NDCR:  0x9d079fff
> [    8.202574] NDCB0: 0x000d3000
> [    8.202574] NDCB1: 0x53c10000
> [    8.202574] NDCB2: 0x00000000
> [    8.202574] NDCB3: 0x00000000
> [    8.221680] marvell-nfc pxa3xx-nand: 
> [    8.221680] NDCR:  0xdd079fff
> [    8.221680] NDCB0: 0x000d3000
> [    8.221680] NDCB1: 0x54000000
> [    8.221680] NDCB2: 0x00000000
> [    8.221680] NDCB3: 0x00000000
> [    8.240741] marvell-nfc pxa3xx-nand: 
> [    8.240741] NDCR:  0xdd079fff
> [    8.240741] NDCB0: 0x000d3000
> [    8.240741] NDCB1: 0x54010000
> [    8.240741] NDCB2: 0x00000000
> [    8.240741] NDCB3: 0x00000000
> [    8.259723] marvell-nfc pxa3xx-nand: 
> [    8.259723] NDCR:  0x9d079fff
> [    8.259723] NDCB0: 0x000d3000
> [    8.259723] NDCB1: 0x54010000
> [    8.259723] NDCB2: 0x00000000
> [    8.259723] NDCB3: 0x00000000
> [    8.278825] marvell-nfc pxa3xx-nand: 
> [    8.278825] NDCR:  0xdd079fff
> [    8.278825] NDCB0: 0x000d3000
> [    8.278825] NDCB1: 0x54400000
> [    8.278825] NDCB2: 0x00000000
> [    8.278825] NDCB3: 0x00000000
> [    8.297889] marvell-nfc pxa3xx-nand: 
> [    8.297889] NDCR:  0xdd079fff
> [    8.297889] NDCB0: 0x000d3000
> [    8.297889] NDCB1: 0x54410000
> [    8.297889] NDCB2: 0x00000000
> [    8.297889] NDCB3: 0x00000000
> [    8.316863] marvell-nfc pxa3xx-nand: 
> [    8.316863] NDCR:  0x9d079fff
> [    8.316863] NDCB0: 0x000d3000
> [    8.316863] NDCB1: 0x54410000
> [    8.316863] NDCB2: 0x00000000
> [    8.316863] NDCB3: 0x00000000
> [    8.335976] marvell-nfc pxa3xx-nand: 
> [    8.335976] NDCR:  0xdd079fff
> [    8.335976] NDCB0: 0x000d3000
> [    8.335976] NDCB1: 0x55000000
> [    8.335976] NDCB2: 0x00000000
> [    8.335976] NDCB3: 0x00000000
> [    8.355035] marvell-nfc pxa3xx-nand: 
> [    8.355035] NDCR:  0xdd079fff
> [    8.355035] NDCB0: 0x000d3000
> [    8.355035] NDCB1: 0x55010000
> [    8.355035] NDCB2: 0x00000000
> [    8.355035] NDCB3: 0x00000000
> [    8.374007] marvell-nfc pxa3xx-nand: 
> [    8.374007] NDCR:  0x9d079fff
> [    8.374007] NDCB0: 0x000d3000
> [    8.374007] NDCB1: 0x55010000
> [    8.374007] NDCB2: 0x00000000
> [    8.374007] NDCB3: 0x00000000
> [    8.393202] marvell-nfc pxa3xx-nand: 
> [    8.393202] NDCR:  0xdd079fff
> [    8.393202] NDCB0: 0x000d3000
> [    8.393202] NDCB1: 0x55400000
> [    8.393202] NDCB2: 0x00000000
> [    8.393202] NDCB3: 0x00000000
> [    8.412235] marvell-nfc pxa3xx-nand: 
> [    8.412235] NDCR:  0xdd079fff
> [    8.412235] NDCB0: 0x000d3000
> [    8.412235] NDCB1: 0x55410000
> [    8.412235] NDCB2: 0x00000000
> [    8.412235] NDCB3: 0x00000000
> [    8.431217] marvell-nfc pxa3xx-nand: 
> [    8.431217] NDCR:  0x9d079fff
> [    8.431217] NDCB0: 0x000d3000
> [    8.431217] NDCB1: 0x55410000
> [    8.431217] NDCB2: 0x00000000
> [    8.431217] NDCB3: 0x00000000
> [    8.450325] marvell-nfc pxa3xx-nand: 
> [    8.450325] NDCR:  0xdd079fff
> [    8.450325] NDCB0: 0x000d3000
> [    8.450325] NDCB1: 0x55800000
> [    8.450325] NDCB2: 0x00000000
> [    8.450325] NDCB3: 0x00000000
> [    8.469388] marvell-nfc pxa3xx-nand: 
> [    8.469388] NDCR:  0xdd079fff
> [    8.469388] NDCB0: 0x000d3000
> [    8.469388] NDCB1: 0x55810000
> [    8.469388] NDCB2: 0x00000000
> [    8.469388] NDCB3: 0x00000000
> [    8.488366] marvell-nfc pxa3xx-nand: 
> [    8.488366] NDCR:  0x9d079fff
> [    8.488366] NDCB0: 0x000d3000
> [    8.488366] NDCB1: 0x55810000
> [    8.488366] NDCB2: 0x00000000
> [    8.488366] NDCB3: 0x00000000
> [    8.507471] marvell-nfc pxa3xx-nand: 
> [    8.507471] NDCR:  0xdd079fff
> [    8.507471] NDCB0: 0x000d3000
> [    8.507471] NDCB1: 0x55c00000
> [    8.507471] NDCB2: 0x00000000
> [    8.507471] NDCB3: 0x00000000
> [    8.526556] marvell-nfc pxa3xx-nand: 
> [    8.526556] NDCR:  0xdd079fff
> [    8.526556] NDCB0: 0x000d3000
> [    8.526556] NDCB1: 0x55c10000
> [    8.526556] NDCB2: 0x00000000
> [    8.526556] NDCB3: 0x00000000
> [    8.545537] marvell-nfc pxa3xx-nand: 
> [    8.545537] NDCR:  0x9d079fff
> [    8.545537] NDCB0: 0x000d3000
> [    8.545537] NDCB1: 0x55c10000
> [    8.545537] NDCB2: 0x00000000
> [    8.545537] NDCB3: 0x00000000
> [    8.564641] marvell-nfc pxa3xx-nand: 
> [    8.564641] NDCR:  0xdd079fff
> [    8.564641] NDCB0: 0x000d3000
> [    8.564641] NDCB1: 0x56000000
> [    8.564641] NDCB2: 0x00000000
> [    8.564641] NDCB3: 0x00000000
> [    8.583703] marvell-nfc pxa3xx-nand: 
> [    8.583703] NDCR:  0xdd079fff
> [    8.583703] NDCB0: 0x000d3000
> [    8.583703] NDCB1: 0x56010000
> [    8.583703] NDCB2: 0x00000000
> [    8.583703] NDCB3: 0x00000000
> [    8.602671] marvell-nfc pxa3xx-nand: 
> [    8.602671] NDCR:  0x9d079fff
> [    8.602671] NDCB0: 0x000d3000
> [    8.602671] NDCB1: 0x56010000
> [    8.602671] NDCB2: 0x00000000
> [    8.602671] NDCB3: 0x00000000
> [    8.621771] marvell-nfc pxa3xx-nand: 
> [    8.621771] NDCR:  0xdd079fff
> [    8.621771] NDCB0: 0x000d3000
> [    8.621771] NDCB1: 0x56400000
> [    8.621771] NDCB2: 0x00000000
> [    8.621771] NDCB3: 0x00000000
> [    8.640836] marvell-nfc pxa3xx-nand: 
> [    8.640836] NDCR:  0xdd079fff
> [    8.640836] NDCB0: 0x000d3000
> [    8.640836] NDCB1: 0x56410000
> [    8.640836] NDCB2: 0x00000000
> [    8.640836] NDCB3: 0x00000000
> [    8.659821] marvell-nfc pxa3xx-nand: 
> [    8.659821] NDCR:  0x9d079fff
> [    8.659821] NDCB0: 0x000d3000
> [    8.659821] NDCB1: 0x56410000
> [    8.659821] NDCB2: 0x00000000
> [    8.659821] NDCB3: 0x00000000
> [    8.678923] marvell-nfc pxa3xx-nand: 
> [    8.678923] NDCR:  0xdd079fff
> [    8.678923] NDCB0: 0x000d3000
> [    8.678923] NDCB1: 0x56800000
> [    8.678923] NDCB2: 0x00000000
> [    8.678923] NDCB3: 0x00000000
> [    8.697987] marvell-nfc pxa3xx-nand: 
> [    8.697987] NDCR:  0xdd079fff
> [    8.697987] NDCB0: 0x000d3000
> [    8.697987] NDCB1: 0x56810000
> [    8.697987] NDCB2: 0x00000000
> [    8.697987] NDCB3: 0x00000000
> [    8.716967] marvell-nfc pxa3xx-nand: 
> [    8.716967] NDCR:  0x9d079fff
> [    8.716967] NDCB0: 0x000d3000
> [    8.716967] NDCB1: 0x56810000
> [    8.716967] NDCB2: 0x00000000
> [    8.716967] NDCB3: 0x00000000
> [    8.736068] marvell-nfc pxa3xx-nand: 
> [    8.736068] NDCR:  0xdd079fff
> [    8.736068] NDCB0: 0x000d3000
> [    8.736068] NDCB1: 0x56c00000
> [    8.736068] NDCB2: 0x00000000
> [    8.736068] NDCB3: 0x00000000
> [    8.755122] marvell-nfc pxa3xx-nand: 
> [    8.755122] NDCR:  0xdd079fff
> [    8.755122] NDCB0: 0x000d3000
> [    8.755122] NDCB1: 0x56c10000
> [    8.755122] NDCB2: 0x00000000
> [    8.755122] NDCB3: 0x00000000
> [    8.774101] marvell-nfc pxa3xx-nand: 
> [    8.774101] NDCR:  0x9d079fff
> [    8.774101] NDCB0: 0x000d3000
> [    8.774101] NDCB1: 0x56c10000
> [    8.774101] NDCB2: 0x00000000
> [    8.774101] NDCB3: 0x00000000
> [    8.793417] marvell-nfc pxa3xx-nand: 
> [    8.793417] NDCR:  0xdd079fff
> [    8.793417] NDCB0: 0x000d3000
> [    8.793417] NDCB1: 0x57000000
> [    8.793417] NDCB2: 0x00000000
> [    8.793417] NDCB3: 0x00000000
> [    8.812493] marvell-nfc pxa3xx-nand: 
> [    8.812493] NDCR:  0xdd079fff
> [    8.812493] NDCB0: 0x000d3000
> [    8.812493] NDCB1: 0x57010000
> [    8.812493] NDCB2: 0x00000000
> [    8.812493] NDCB3: 0x00000000
> [    8.831475] marvell-nfc pxa3xx-nand: 
> [    8.831475] NDCR:  0x9d079fff
> [    8.831475] NDCB0: 0x000d3000
> [    8.831475] NDCB1: 0x57010000
> [    8.831475] NDCB2: 0x00000000
> [    8.831475] NDCB3: 0x00000000
> [    8.850578] marvell-nfc pxa3xx-nand: 
> [    8.850578] NDCR:  0xdd079fff
> [    8.850578] NDCB0: 0x000d3000
> [    8.850578] NDCB1: 0x57400000
> [    8.850578] NDCB2: 0x00000000
> [    8.850578] NDCB3: 0x00000000
> [    8.869639] marvell-nfc pxa3xx-nand: 
> [    8.869639] NDCR:  0xdd079fff
> [    8.869639] NDCB0: 0x000d3000
> [    8.869639] NDCB1: 0x57410000
> [    8.869639] NDCB2: 0x00000000
> [    8.869639] NDCB3: 0x00000000
> [    8.888614] marvell-nfc pxa3xx-nand: 
> [    8.888614] NDCR:  0x9d079fff
> [    8.888614] NDCB0: 0x000d3000
> [    8.888614] NDCB1: 0x57410000
> [    8.888614] NDCB2: 0x00000000
> [    8.888614] NDCB3: 0x00000000
> [    8.907721] marvell-nfc pxa3xx-nand: 
> [    8.907721] NDCR:  0xdd079fff
> [    8.907721] NDCB0: 0x000d3000
> [    8.907721] NDCB1: 0x57c00000
> [    8.907721] NDCB2: 0x00000000
> [    8.907721] NDCB3: 0x00000000
> [    8.926778] marvell-nfc pxa3xx-nand: 
> [    8.926778] NDCR:  0xdd079fff
> [    8.926778] NDCB0: 0x000d3000
> [    8.926778] NDCB1: 0x57c10000
> [    8.926778] NDCB2: 0x00000000
> [    8.926778] NDCB3: 0x00000000
> [    8.945755] marvell-nfc pxa3xx-nand: 
> [    8.945755] NDCR:  0x9d079fff
> [    8.945755] NDCB0: 0x000d3000
> [    8.945755] NDCB1: 0x57c10000
> [    8.945755] NDCB2: 0x00000000
> [    8.945755] NDCB3: 0x00000000
> [    8.964856] marvell-nfc pxa3xx-nand: 
> [    8.964856] NDCR:  0xdd079fff
> [    8.964856] NDCB0: 0x000d3000
> [    8.964856] NDCB1: 0x58000000
> [    8.964856] NDCB2: 0x00000000
> [    8.964856] NDCB3: 0x00000000
> [    8.983915] marvell-nfc pxa3xx-nand: 
> [    8.983915] NDCR:  0xdd079fff
> [    8.983915] NDCB0: 0x000d3000
> [    8.983915] NDCB1: 0x58010000
> [    8.983915] NDCB2: 0x00000000
> [    8.983915] NDCB3: 0x00000000
> [    9.002886] marvell-nfc pxa3xx-nand: 
> [    9.002886] NDCR:  0x9d079fff
> [    9.002886] NDCB0: 0x000d3000
> [    9.002886] NDCB1: 0x58010000
> [    9.002886] NDCB2: 0x00000000
> [    9.002886] NDCB3: 0x00000000
> [    9.022075] marvell-nfc pxa3xx-nand: 
> [    9.022075] NDCR:  0xdd079fff
> [    9.022075] NDCB0: 0x000d3000
> [    9.022075] NDCB1: 0x58400000
> [    9.022075] NDCB2: 0x00000000
> [    9.022075] NDCB3: 0x00000000
> [    9.041141] marvell-nfc pxa3xx-nand: 
> [    9.041141] NDCR:  0xdd079fff
> [    9.041141] NDCB0: 0x000d3000
> [    9.041141] NDCB1: 0x58410000
> [    9.041141] NDCB2: 0x00000000
> [    9.041141] NDCB3: 0x00000000
> [    9.060123] marvell-nfc pxa3xx-nand: 
> [    9.060123] NDCR:  0x9d079fff
> [    9.060123] NDCB0: 0x000d3000
> [    9.060123] NDCB1: 0x58410000
> [    9.060123] NDCB2: 0x00000000
> [    9.060123] NDCB3: 0x00000000
> [    9.079435] ubi0: scanning is finished
> [    9.083567] ubi0 error: ubi_read_volume_table: the layout volume was not found
> [    9.090953] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
> [    9.098457] UBI error: cannot attach mtd5
> [    9.103950] pxa-rtc pxa-rtc: setting system clock to 2000-01-01 00:00:34 UTC (946684834)
> [    9.187568] smc91x smc91x.0 eth0: link down
> [   11.136140] smc91x smc91x.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
> [   11.193199] IP-Config: Complete:
> [   11.196554]      device=eth0, hwaddr=00:0e:0c:a7:26:f7, ipaddr=192.168.1.232, mask=255.255.255.0, gw=255.255.255.255
> [   11.207229]      host=192.168.1.232, domain=, nis-domain=(none)
> [   11.213278]      bootserver=192.168.1.5, rootserver=192.168.1.5, rootpath=
> [   11.221532] ALSA device list:
> [   11.224983]   #0: Zylonite
> [   11.250472] Freeing unused kernel memory: 2396K
> [   11.255419] This architecture does not have kernel memory protection.
> Starting logging: OK
> Loading all the available modules: modprobe: module smc91x not found in modules.dep
> modprobe: module soundcore not found in modules.dep
> modprobe: module snd not found in modules.dep
> modprobe: module snd-pcm not found in modules.dep
> modprobe: module fat not found in modules.dep
> modprobe: module vfat not found in modules.dep
> modprobe: module nfs not found in modules.dep
> modprobe: module nls_cp437 not found in modules.dep
> modprobe: module nls_cp850 not found in modules.dep
> modprobe: module nls_ascii not found in modules.dep
> modprobe: module nls_utf8 not found in modules.dep
> modprobe: module fixed not found in modules.dep
> modprobe: module pwm-pxa not found in modules.dep
> modprobe: module cpufreq_conservative not found in modules.dep
> modprobe: module cpufreq_powersave not found in modules.dep
> modprobe: module cpufreq-dt not found in modules.dep
> modprobe: module btusb not found in modules.dep
> modprobe: module i2c-dev not found in modules.dep
> modprobe: module ubi not found in modules.dep
> modprobe: module mt_blkdevs not found in modules.dep
> modprobe: module pxa3xx_nand not found in modules.dep
> modprobe: module mtdblock not found in modules.dep
> modprobe: module ofpart not found in modules.dep
> modprobe: module map_rom not found in modules.dep
> modprobe: module jedec_probe not found in modules.dep
> modprobe: module cmdlinepart not found in modules.dep
> modprobe: module redboot not found in modules.dep
> modprobe: module loop not found in modules.dep
> modprobe: module leds-gpio not found in modules.dep
> modprobe: module jedec-class not found in modules.dep
> modprobe: module pxa not found in modules.dep
> modprobe: module evdev not found in modules.dep
> modprobe: module soc_common not found in modules.dep
> modprobe: module pwm_bl not found in modules.dep
> modprobe: module fbcon not found in modules.dep
> modprobe: module rtc-pxa not found in modules.dep
> modprobe: module rtc-sa1100 not found in modules.dep
> modprobe: module smc91x not found in modules.dep
> modprobe: module pda_power not found in modules.dep
> modprobe: module fixed not found in modules.dep
> KO
> OK
> Changing smcs91x MAC address to 08:00:3e:26:0a:5b: ifconfig: SIOCSIFHWADDR: Device or resource busy
> KO
> OK
> Initializing random number generator... done.
> Starting network...
> ip: RTNETLINK answers: File exists
> udhcpc (v1.24.1) started
> Sending discover...
> Sending select for 192.168.1.232...
> Lease of 192.168.1.232 obtained, lease time 86400
> deleting routers
> adding dns 192.168.1.1
> Starting dropbear sshd: OK
> 
> Welcome to Buildroot
> zylonite login: 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-03 20:10                                         ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-03 20:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 03 Jan 2018 20:58:29 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> 
> > On Tue, 02 Jan 2018 20:21:09 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> >  
> >> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> >>   
> >> > I think the ECC issue you faced was related to pages being written
> >> > *and* empty. If this guess is right, the board should boot fine with
> >> > these changes.
> >> >
> >> > Otherwise, please add the DEBUG define as before in both the core
> >> > and the driver and do not hesitate to add another dump_stack()
> >> > where it crashes (if applicable).    
> >> 
> >> The problem looks still the same :
> >> [    3.560163] Bad block table not found for chip 0  
> >
> > Mmmmh ok.
> >
> > Can you please add this patch:
> > http://code.bulix.org/61at9p-254626  
> 
> Well, it looks a bit better, see attached log in [1].
> Now the BBT is detected ...
> [    3.310841] Bad block table found at page 131008, version 0x01
> ...
> [    3.354944] Bad block table found at page 130944, version 0x01
> 
> But all blocks are considered bad ... as if the bit logic was inverted for the
> meaning of "bad" or "good" block, see :
> [    3.379825] nand_read_bbt: bad block at 0x000000000000

Hm, that's weird. Can you try with the old driver (pxa3xx)? My guess is
that a new BBT has been written by the new driver after a full scan,
and we've seen with your previous logs that almost all blocks are
detected bad in this case (still don't know why: BBMs should be
preserved when using Hamming on 2k pages).

Anyway, if there's still a problem with the old driver, you'll have to
scrub the blocks containing the BBT from uboot (using nand scrub) to
restore things in a working state. And we also have to figure out why
BBM scan is not working with the new driver.

BTW, thanks for helping us with that, that's really appreciated.

Boris


> 
> Cheers.
> 
> --
> Robert
> 
> [1] Dmesg
> ---8>---  
> netconsole: port not set
> netconsole: registered as netconsole-1
> smc91c111 smc91c1110: chip is revision= 9, version= 2
> mdio_bus: miibus0: probed
> eth0: got preset MAC address: 00:0e:0c:a7:26:f7
> nand: NAND device: Manufacturer ID: 0x20, Chip ID: 0xba (ST Micro NAND 256MiB 1,8V 16-bit), 256MiB, page size: 2048, OOB size: 64
> mrvl_nand mrvl_nand0: ECC strength 1, ECC step size 512
> Bad block table found at page 131008, version 0x01
> Bad block table found at page 130944, version 0x01
> malloc space: 0x83700000 -> 0x83efffff (size 8 MiB)
> running /env/bin/init...
> magicvar: No such file or directory
> magicvar: No such file or directory
> magicvar: No such file or directory
> 
> Hit any key to stop autoboot:  3\b\b 2\b\b 1\b\b 0
> booting net
> netconsole: netconsole initialized with 255.255.255.255:6662
> eth0: 100Mbps full duplex link detected
> DHCP client bound to address 192.168.1.232
> netconsole: netconsole initialized with 255.255.255.255:6662
> could not open /mnt/tftp/none-linux-zylonite: No such file or directory
> Booting net failed: No such file or directory
> booting net failed: No such file or directory
> boot: No such file or directory
> .[1;32mbarebox at .[1;36mZylonite:/.[0m global linux.bootargs.debug=earlycon
> .[1;32mbarebox at .[1;36mZylonite:/.[0m bootm /mnt/tftp/zImage_jenkins
> 
> Loading ARM Linux zImage '/mnt/tftp/zImage_jenkins'
> commandline: ram=64M console=ttyS0,115200 ip=dhcp root=/dev/nfs nfsroot=/home/none/nfsroot/zylonite,v3,tcp earlycon mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root)
> arch_number: 1233
> Uncompressing Linux... done, booting the kernel.
> [    0.000000] Booting Linux on physical CPU 0x0
> [    0.000000] Linux version 4.15.0-rc1-00044-gb6124ba (jenkins at belgarath) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29)) #825 PREEMPT Wed Jan 3 20:06:17 CET 2018
> [    0.000000] CPU: XScale-V3 based processor [69056891] revision 1 (ARMv5TE), cr=0000397f
> [    0.000000] CPU: VIVT data cache, VIVT instruction cache
> [    0.000000] Machine: PXA3xx Platform Development Kit (aka Zylonite)
> [    0.000000] Ignoring tag cmdline (using the default kernel command line)
> [    0.000000] Memory policy: Data cache writeback
> [    0.000000] RO Mode clock: 0.00MHz
> [    0.000000] Run Mode clock: 0.00MHz
> [    0.000000] Turbo Mode clock: 0.00MHz
> [    0.000000] System bus clock: 0.00MHz
> [    0.000000] On node 0 totalpages: 16384
> [    0.000000]   Normal zone: 128 pages used for memmap
> [    0.000000]   Normal zone: 0 pages reserved
> [    0.000000]   Normal zone: 16384 pages, LIFO batch:3
> [    0.000000] random: fast init done
> [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
> [    0.000000] pcpu-alloc: [0] 0 
> [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
> [    0.000000] Kernel command line: root=/dev/ram0 ip=192.168.1.232:192.168.1.5::255.255.255.0::eth0:on console=ttyS0,115200 mem=64M mtdparts=pxa3xx_nand-0:128k at 0(TIMH)ro,128k at 128k(OBMI)ro,768k at 256k(barebox),256k at 1024k(barebox-env),12M at 1280k(kernel),38016k at 13568k(root) ubi.mtd=5 earlycon=pxa,io,0xf6200000,115200n8 debug no_console_suspend
> [    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
> [    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
> [    0.000000] Memory: 56856K/65536K available (4225K kernel code, 202K rwdata, 972K rodata, 2396K init, 102K bss, 8680K reserved, 0K cma-reserved)
> [    0.000000] Virtual kernel memory layout:
> [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
> [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
> [    0.000000]     vmalloc : 0xc4800000 - 0xff800000   ( 944 MB)
> [    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
> [    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
> [    0.000000]       .text : 0xc0008000 - 0xc04289e8   (4227 kB)
> [    0.000000]       .init : 0xc053f000 - 0xc0796000   (2396 kB)
> [    0.000000]       .data : 0xc0796000 - 0xc07c8bec   ( 203 kB)
> [    0.000000]        .bss : 0xc07c8bec - 0xc07e25fc   ( 103 kB)
> [    0.000000] Preemptible hierarchical RCU implementation.
> [    0.000000] 	Tasks RCU enabled.
> [    0.000000] NR_IRQS: 16, nr_irqs: 336, preallocated irqs: 336
> [    0.000000] RJK: parent_rate=13000000, xl=8, xn=1
> [    0.000068] sched_clock: 32 bits at 3250kHz, resolution 307ns, wraps every 660764198758ns
> [    0.000267] clocksource: oscr0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 588080137591 ns
> [    0.002138] Console: colour dummy device 80x30
> [    0.002297] Calibrating delay loop... 103.83 BogoMIPS (lpj=519168)
> [    0.081017] pid_max: default: 32768 minimum: 301
> [    0.081857] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.081957] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.085169] CPU: Testing write buffer coherency: ok
> [    0.088982] Setting up static identity map for 0x80008200 - 0x80008260
> [    0.089941] Hierarchical SRCU implementation.
> [    0.102960] devtmpfs: initialized
> [    0.113840] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
> [    0.113980] futex hash table entries: 256 (order: -1, 3072 bytes)
> [    0.116305] NET: Registered protocol family 16
> [    0.119116] DMA: preallocated 256 KiB pool for atomic coherent allocations
> [    0.388612] Advanced Linux Sound Architecture Driver Initialized.
> [    0.392974] clocksource: Switched to clocksource oscr0
> [    0.551626] NET: Registered protocol family 2
> [    0.557926] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.558151] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
> [    0.558332] TCP: Hash tables configured (established 1024 bind 1024)
> [    0.558869] UDP hash table entries: 256 (order: 0, 4096 bytes)
> [    0.559048] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
> [    0.560201] NET: Registered protocol family 1
> [    0.562229] RPC: Registered named UNIX socket transport module.
> [    0.562327] RPC: Registered udp transport module.
> [    0.562381] RPC: Registered tcp transport module.
> [    0.562439] RPC: Registered tcp NFSv4.1 backchannel transport module.
> [    2.500715] Initialise system trusted keyrings
> [    2.502868] workingset: timestamp_bits=30 max_order=14 bucket_order=0
> [    2.507406] NFS: Registering the id_resolver key type
> [    2.507634] Key type id_resolver registered
> [    2.507695] Key type id_legacy registered
> [    2.514199] Key type asymmetric registered
> [    2.514303] Asymmetric key parser 'x509' registered
> [    2.514462] io scheduler noop registered
> [    2.514527] io scheduler deadline registered
> [    2.514921] io scheduler cfq registered (default)
> [    2.514992] io scheduler mq-deadline registered
> [    2.515054] io scheduler kyber registered
> [    2.572587] pxa-dma pxa-dma.0: initialized 32 channels on 100 requestors
> [    2.578330] pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 38, base_baud = 928571) is a UART1
> [    3.053207] console [ttyS0] enabled
> [    3.059557] pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 37, base_baud = 928571) is a UART2
> [    3.072069] pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 36, base_baud = 928571) is a UART3
> [    3.088037] nand: executing subop:
> [    3.091533] nand:     ->CMD      [0xff]
> [    3.098135] nand:     ->WAITRDY  [max 250 ms]
> [    3.102636] marvell-nfc pxa3xx-nand: 
> [    3.102636] NDCR:  0x90079fff
> [    3.102636] NDCB0: 0x00a000ff
> [    3.102636] NDCB1: 0x00000000
> [    3.102636] NDCB2: 0x00000000
> [    3.102636] NDCB3: 0x00000000
> [    3.121629] nand: executing subop:
> [    3.125459] nand:     ->CMD      [0x90]
> [    3.129362] nand:     ->ADDR     [1 cyc: 00]
> [    3.134355] nand:     ->DATA_IN  [2 B, force 8-bit]
> [    3.139366] marvell-nfc pxa3xx-nand: 
> [    3.139366] NDCR:  0x90079fff
> [    3.139366] NDCB0: 0x00610090
> [    3.139366] NDCB1: 0x00000000
> [    3.139366] NDCB2: 0x00000000
> [    3.139366] NDCB3: 0x00000000
> [    3.158242] nand: executing subop:
> [    3.161713] nand:     ->CMD      [0x90]
> [    3.165930] nand:     ->ADDR     [1 cyc: 00]
> [    3.170250] nand:     ->DATA_IN  [8 B, force 8-bit]
> [    3.175405] marvell-nfc pxa3xx-nand: 
> [    3.175405] NDCR:  0x90079fff
> [    3.175405] NDCB0: 0x00610090
> [    3.175405] NDCB1: 0x00000000
> [    3.175405] NDCB2: 0x00000000
> [    3.175405] NDCB3: 0x00000000
> [    3.194083] nand: executing subop:
> [    3.197532] nand:     ->CMD      [0x90]
> [    3.201406] nand:     ->ADDR     [1 cyc: 20]
> [    3.205851] nand:     ->DATA_IN  [4 B, force 8-bit]
> [    3.210832] marvell-nfc pxa3xx-nand: 
> [    3.210832] NDCR:  0x90079fff
> [    3.210832] NDCB0: 0x00610090
> [    3.210832] NDCB1: 0x00000020
> [    3.210832] NDCB2: 0x00000000
> [    3.210832] NDCB3: 0x00000000
> [    3.229453] nand: executing subop:
> [    3.232899] nand:     ->CMD      [0x90]
> [    3.236930] nand:     ->ADDR     [1 cyc: 40]
> [    3.241232] nand:     ->DATA_IN  [5 B, force 8-bit]
> [    3.246335] marvell-nfc pxa3xx-nand: 
> [    3.246335] NDCR:  0x90079fff
> [    3.246335] NDCB0: 0x00610090
> [    3.246335] NDCB1: 0x00000040
> [    3.246335] NDCB2: 0x00000000
> [    3.246335] NDCB3: 0x00000000
> [    3.264978] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xba
> [    3.271354] nand: ST Micro NAND 256MiB 1,8V 16-bit
> [    3.276316] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
> [    3.284055] marvell-nfc pxa3xx-nand: No minimum ECC strength, using 1b/512B
> [    3.291595] marvell-nfc pxa3xx-nand: 
> [    3.291595] NDCR:  0xdd079fff
> [    3.291595] NDCB0: 0x000d3000
> [    3.291595] NDCB1: 0xffc00000
> [    3.291595] NDCB2: 0x00000001
> [    3.291595] NDCB3: 0x00000000
> [    3.310841] Bad block table found at page 131008, version 0x01
> [    3.316993] marvell-nfc pxa3xx-nand: 
> [    3.316993] NDCR:  0xdd079fff
> [    3.316993] NDCB0: 0x000d3000
> [    3.316993] NDCB1: 0xffc00000
> [    3.316993] NDCB2: 0x00000001
> [    3.316993] NDCB3: 0x00000000
> [    3.336013] marvell-nfc pxa3xx-nand: 
> [    3.336013] NDCR:  0xdd079fff
> [    3.336013] NDCB0: 0x000d3000
> [    3.336013] NDCB1: 0xff800000
> [    3.336013] NDCB2: 0x00000001
> [    3.336013] NDCB3: 0x00000000
> [    3.354944] Bad block table found at page 130944, version 0x01
> [    3.360915] marvell-nfc pxa3xx-nand: 
> [    3.360915] NDCR:  0xdd079fff
> [    3.360915] NDCB0: 0x000d3000
> [    3.360915] NDCB1: 0xffc00000
> [    3.360915] NDCB2: 0x00000001
> [    3.360915] NDCB3: 0x00000000
> [    3.379825] nand_read_bbt: bad block at 0x000000000000
> [    3.385158] nand_read_bbt: bad block at 0x000000040000
> [    3.390320] nand_read_bbt: bad block at 0x000000060000
> [    3.395587] nand_read_bbt: bad block at 0x000000080000
> [    3.400743] nand_read_bbt: bad block at 0x0000000a0000
> [    3.406009] nand_read_bbt: bad block at 0x0000000c0000
> [    3.411169] nand_read_bbt: bad block at 0x0000000e0000
> [    3.416434] nand_read_bbt: bad block at 0x000000100000
> [    3.421593] nand_read_bbt: bad block at 0x000000140000
> [    3.426859] nand_read_bbt: bad block at 0x000000160000
> [    3.432018] nand_read_bbt: bad block at 0x000000180000
> [    3.437283] nand_read_bbt: bad block at 0x0000001a0000
> [    3.442442] nand_read_bbt: bad block at 0x0000001c0000
> [    3.447707] nand_read_bbt: bad block at 0x0000001e0000
> [    3.452867] nand_read_bbt: bad block at 0x000000200000
> [    3.458133] nand_read_bbt: bad block at 0x000000220000
> [    3.463404] nand_read_bbt: bad block at 0x000000240000
> [    3.468564] nand_read_bbt: bad block at 0x000000260000
> [    3.473830] nand_read_bbt: bad block at 0x000000280000
> [    3.478990] nand_read_bbt: bad block at 0x0000002a0000
> [    3.484253] nand_read_bbt: bad block at 0x0000002c0000
> [    3.489414] nand_read_bbt: bad block at 0x0000002e0000
> [    3.494680] nand_read_bbt: bad block at 0x000000300000
> [    3.499838] nand_read_bbt: bad block at 0x000000320000
> [    3.505104] nand_read_bbt: bad block at 0x000000340000
> [    3.510262] nand_read_bbt: bad block at 0x000000360000
> [    3.515529] nand_read_bbt: bad block at 0x000000380000
> [    3.520687] nand_read_bbt: bad block at 0x0000003a0000
> [    3.525955] nand_read_bbt: bad block at 0x0000003c0000
> [    3.531121] nand_read_bbt: bad block at 0x0000003e0000
> [    3.536386] nand_read_bbt: bad block at 0x000000400000
> [    3.541544] nand_read_bbt: bad block at 0x000000420000
> [    3.546811] nand_read_bbt: bad block at 0x000000440000
> [    3.551970] nand_read_bbt: bad block at 0x000000460000
> [    3.557234] nand_read_bbt: bad block at 0x000000480000
> [    3.562394] nand_read_bbt: bad block at 0x0000004a0000
> [    3.567659] nand_read_bbt: bad block at 0x0000004c0000
> [    3.572819] nand_read_bbt: bad block at 0x0000004e0000
> [    3.578087] nand_read_bbt: bad block at 0x000000500000
> [    3.583367] nand_read_bbt: bad block at 0x000000520000
> [    3.588524] nand_read_bbt: bad block at 0x000000540000
> [    3.593788] nand_read_bbt: bad block at 0x000000560000
> [    3.598951] nand_read_bbt: bad block at 0x000000580000
> [    3.604213] nand_read_bbt: bad block at 0x0000005a0000
> [    3.609373] nand_read_bbt: bad block at 0x0000005c0000
> [    3.614639] nand_read_bbt: bad block at 0x0000005e0000
> [    3.619799] nand_read_bbt: bad block at 0x000000600000
> [    3.625064] nand_read_bbt: bad block at 0x000000620000
> [    3.630224] nand_read_bbt: bad block at 0x000000640000
> [    3.635488] nand_read_bbt: bad block at 0x000000660000
> [    3.640648] nand_read_bbt: bad block at 0x000000680000
> [    3.645914] nand_read_bbt: bad block at 0x0000006a0000
> [    3.651071] nand_read_bbt: bad block at 0x0000006c0000
> [    3.656337] nand_read_bbt: bad block at 0x0000006e0000
> [    3.661497] nand_read_bbt: bad block at 0x000000700000
> [    3.666774] nand_read_bbt: bad block at 0x000000d40000
> [    3.671939] nand_read_bbt: bad block at 0x000000d60000
> [    3.677206] nand_read_bbt: bad block at 0x000000d80000
> [    3.682373] nand_read_bbt: bad block at 0x000000da0000
> [    3.687638] nand_read_bbt: bad block at 0x000000dc0000
> [    3.692796] nand_read_bbt: bad block at 0x000000de0000
> [    3.698063] nand_read_bbt: bad block at 0x000000e00000
> [    3.703334] nand_read_bbt: bad block at 0x000000e20000
> [    3.708494] nand_read_bbt: bad block at 0x000000e40000
> [    3.713759] nand_read_bbt: bad block at 0x000000e60000
> [    3.718919] nand_read_bbt: bad block at 0x000000e80000
> [    3.724183] nand_read_bbt: bad block at 0x000000ea0000
> [    3.729343] nand_read_bbt: bad block at 0x000000ec0000
> [    3.734608] nand_read_bbt: bad block at 0x000000ee0000
> [    3.739769] nand_read_bbt: bad block at 0x000000f00000
> [    3.745033] nand_read_bbt: bad block at 0x000000f20000
> [    3.750192] nand_read_bbt: bad block at 0x000000f40000
> [    3.755459] nand_read_bbt: bad block at 0x000000f60000
> [    3.760617] nand_read_bbt: bad block at 0x000000f80000
> [    3.765882] nand_read_bbt: bad block at 0x000000fa0000
> [    3.771041] nand_read_bbt: bad block at 0x000000fc0000
> [    3.776306] nand_read_bbt: bad block at 0x000000fe0000
> [    3.781467] nand_read_bbt: bad block at 0x000001000000
> [    3.786731] nand_read_bbt: bad block at 0x000001020000
> [    3.791891] nand_read_bbt: bad block at 0x000001040000
> [    3.797156] nand_read_bbt: bad block at 0x000001060000
> [    3.802317] nand_read_bbt: bad block at 0x000001080000
> [    3.807582] nand_read_bbt: bad block at 0x0000010a0000
> [    3.812741] nand_read_bbt: bad block at 0x0000010c0000
> [    3.818005] nand_read_bbt: bad block at 0x0000010e0000
> [    3.823280] nand_read_bbt: bad block at 0x000001100000
> [    3.828438] nand_read_bbt: bad block at 0x000001120000
> [    3.833702] nand_read_bbt: bad block at 0x000001140000
> [    3.838862] nand_read_bbt: bad block at 0x000001160000
> [    3.844129] nand_read_bbt: bad block at 0x000001180000
> [    3.849294] nand_read_bbt: bad block at 0x000001660000
> [    3.854562] nand_read_bbt: bad block at 0x000001680000
> [    3.859719] nand_read_bbt: bad block at 0x0000016a0000
> [    3.864986] nand_read_bbt: bad block at 0x0000016c0000
> [    3.870143] nand_read_bbt: bad block at 0x0000016e0000
> [    3.875409] nand_read_bbt: bad block at 0x000001700000
> [    3.880569] nand_read_bbt: bad block at 0x000001720000
> [    3.885836] nand_read_bbt: bad block at 0x000001740000
> [    3.890994] nand_read_bbt: bad block at 0x000001760000
> [    3.896260] nand_read_bbt: bad block at 0x000001780000
> [    3.901417] nand_read_bbt: bad block at 0x0000017a0000
> [    3.906683] nand_read_bbt: bad block at 0x0000017c0000
> [    3.911843] nand_read_bbt: bad block at 0x0000017e0000
> [    3.917108] nand_read_bbt: bad block at 0x000001800000
> [    3.922267] nand_read_bbt: bad block at 0x000001820000
> [    3.927534] nand_read_bbt: bad block at 0x000001840000
> [    3.932691] nand_read_bbt: bad block at 0x000001860000
> [    3.937957] nand_read_bbt: bad block at 0x000001880000
> [    3.943230] nand_read_bbt: bad block at 0x0000018a0000
> [    3.948390] nand_read_bbt: bad block at 0x0000018c0000
> [    3.953654] nand_read_bbt: bad block at 0x0000018e0000
> [    3.958815] nand_read_bbt: bad block at 0x000001900000
> [    3.964101] nand_read_bbt: bad block at 0x000001920000
> [    3.969264] nand_read_bbt: bad block at 0x000001940000
> [    3.974531] nand_read_bbt: bad block at 0x000001960000
> [    3.979690] nand_read_bbt: bad block at 0x000001980000
> [    3.984952] nand_read_bbt: bad block at 0x0000019a0000
> [    3.990114] nand_read_bbt: bad block at 0x0000019c0000
> [    3.995381] nand_read_bbt: bad block at 0x0000019e0000
> [    4.000539] nand_read_bbt: bad block at 0x000001a00000
> [    4.005804] nand_read_bbt: bad block at 0x000001a20000
> [    4.010964] nand_read_bbt: bad block at 0x000001a40000
> [    4.016236] nand_read_bbt: bad block at 0x000001a60000
> [    4.021398] nand_read_bbt: bad block at 0x000001a80000
> [    4.026664] nand_read_bbt: bad block at 0x000001aa0000
> [    4.031822] nand_read_bbt: bad block at 0x000001ac0000
> [    4.037086] nand_read_bbt: bad block at 0x000001ae0000
> [    4.042247] nand_read_bbt: bad block at 0x000001b00000
> [    4.047512] nand_read_bbt: bad block at 0x000001b20000
> [    4.052672] nand_read_bbt: bad block at 0x000001b40000
> [    4.057935] nand_read_bbt: bad block at 0x000001b60000
> [    4.063211] nand_read_bbt: bad block at 0x000001b80000
> [    4.068377] nand_read_bbt: bad block at 0x000001ba0000
> [    4.073643] nand_read_bbt: bad block at 0x000001bc0000
> [    4.078801] nand_read_bbt: bad block at 0x000001be0000
> [    4.084068] nand_read_bbt: bad block at 0x000001c00000
> [    4.089235] nand_read_bbt: bad block at 0x000001c20000
> [    4.094836] nand_read_bbt: bad block at 0x000001c40000
> [    4.100012] nand_read_bbt: bad block at 0x000001c60000
> [    4.105327] nand_read_bbt: bad block at 0x000001c80000
> [    4.110488] nand_read_bbt: bad block at 0x000001ca0000
> [    4.115755] nand_read_bbt: bad block at 0x000001cc0000
> [    4.120923] nand_read_bbt: bad block at 0x000001ce0000
> [    4.126186] nand_read_bbt: bad block at 0x000001d00000
> [    4.131347] nand_read_bbt: bad block at 0x000001d20000
> [    4.136610] nand_read_bbt: bad block at 0x000001d40000
> [    4.141770] nand_read_bbt: bad block at 0x000001d60000
> [    4.147038] nand_read_bbt: bad block at 0x000001d80000
> [    4.152204] nand_read_bbt: bad block at 0x000001da0000
> [    4.157470] nand_read_bbt: bad block at 0x000001dc0000
> [    4.162627] nand_read_bbt: bad block at 0x000001de0000
> [    4.167894] nand_read_bbt: bad block at 0x000001e00000
> [    4.173167] nand_read_bbt: bad block at 0x000001e20000
> [    4.178325] nand_read_bbt: bad block at 0x000001e40000
> [    4.183591] nand_read_bbt: bad block at 0x000001e60000
> [    4.188752] nand_read_bbt: bad block at 0x000001e80000
> [    4.194015] nand_read_bbt: bad block at 0x000001ea0000
> [    4.199175] nand_read_bbt: bad block at 0x000001ec0000
> [    4.204441] nand_read_bbt: bad block at 0x000001ee0000
> [    4.209601] nand_read_bbt: bad block at 0x000001f00000
> [    4.214865] nand_read_bbt: bad block at 0x000001f20000
> [    4.220024] nand_read_bbt: bad block at 0x000001f40000
> [    4.225290] nand_read_bbt: bad block at 0x000001f60000
> [    4.230450] nand_read_bbt: bad block at 0x000001f80000
> [    4.235713] nand_read_bbt: bad block at 0x000001fa0000
> [    4.240874] nand_read_bbt: bad block at 0x000001fc0000
> [    4.246138] nand_read_bbt: bad block at 0x000001fe0000
> [    4.251299] nand_read_bbt: bad block at 0x000002000000
> [    4.256564] nand_read_bbt: bad block at 0x000002020000
> [    4.261723] nand_read_bbt: bad block at 0x000002040000
> [    4.266988] nand_read_bbt: bad block at 0x000002060000
> [    4.272148] nand_read_bbt: bad block at 0x000002080000
> [    4.277412] nand_read_bbt: bad block at 0x0000020a0000
> [    4.282572] nand_read_bbt: bad block at 0x0000020c0000
> [    4.287837] nand_read_bbt: bad block at 0x0000020e0000
> [    4.293111] nand_read_bbt: bad block at 0x000002100000
> [    4.298278] nand_read_bbt: bad block at 0x000002120000
> [    4.303545] nand_read_bbt: bad block at 0x000002140000
> [    4.308703] nand_read_bbt: bad block at 0x000002160000
> [    4.313967] nand_read_bbt: bad block at 0x000002180000
> [    4.319128] nand_read_bbt: bad block at 0x0000021a0000
> [    4.324391] nand_read_bbt: bad block at 0x0000021c0000
> [    4.329552] nand_read_bbt: bad block at 0x0000021e0000
> [    4.334818] nand_read_bbt: bad block at 0x000002200000
> [    4.339977] nand_read_bbt: bad block at 0x000002220000
> [    4.345242] nand_read_bbt: bad block at 0x000002240000
> [    4.350402] nand_read_bbt: bad block at 0x000002260000
> [    4.355667] nand_read_bbt: bad block at 0x000002280000
> [    4.360826] nand_read_bbt: bad block at 0x0000022a0000
> [    4.366091] nand_read_bbt: bad block at 0x0000022c0000
> [    4.371251] nand_read_bbt: bad block at 0x0000022e0000
> [    4.376515] nand_read_bbt: bad block at 0x000002300000
> [    4.381674] nand_read_bbt: bad block at 0x000002320000
> [    4.386941] nand_read_bbt: bad block at 0x000002340000
> [    4.392101] nand_read_bbt: bad block at 0x000002360000
> [    4.397365] nand_read_bbt: bad block at 0x000002380000
> [    4.402523] nand_read_bbt: bad block at 0x0000023a0000
> [    4.407789] nand_read_bbt: bad block at 0x0000023c0000
> [    4.413062] nand_read_bbt: bad block at 0x0000023e0000
> [    4.418223] nand_read_bbt: bad block at 0x000002400000
> [    4.423485] nand_read_bbt: bad block at 0x000002420000
> [    4.428646] nand_read_bbt: bad block at 0x000002440000
> [    4.433907] nand_read_bbt: bad block at 0x000002460000
> [    4.439071] nand_read_bbt: bad block at 0x000002480000
> [    4.444336] nand_read_bbt: bad block at 0x0000024a0000
> [    4.449496] nand_read_bbt: bad block at 0x0000024c0000
> [    4.454759] nand_read_bbt: bad block at 0x0000024e0000
> [    4.459922] nand_read_bbt: bad block at 0x000002500000
> [    4.465187] nand_read_bbt: bad block at 0x000002520000
> [    4.470344] nand_read_bbt: bad block at 0x000002540000
> [    4.475609] nand_read_bbt: bad block at 0x000002560000
> [    4.480771] nand_read_bbt: bad block at 0x000002580000
> [    4.486033] nand_read_bbt: bad block at 0x0000025a0000
> [    4.491194] nand_read_bbt: bad block at 0x0000025c0000
> [    4.496458] nand_read_bbt: bad block at 0x0000025e0000
> [    4.501619] nand_read_bbt: bad block at 0x000002600000
> [    4.506882] nand_read_bbt: bad block at 0x000002620000
> [    4.512042] nand_read_bbt: bad block at 0x000002640000
> [    4.517307] nand_read_bbt: bad block at 0x000002660000
> [    4.522468] nand_read_bbt: bad block at 0x000002680000
> [    4.527732] nand_read_bbt: bad block at 0x0000026a0000
> [    4.532891] nand_read_bbt: bad block at 0x0000026c0000
> [    4.538162] nand_read_bbt: bad block at 0x0000026e0000
> [    4.543428] nand_read_bbt: bad block at 0x000002700000
> [    4.548590] nand_read_bbt: bad block at 0x000002720000
> [    4.553857] nand_read_bbt: bad block at 0x000002740000
> [    4.559014] nand_read_bbt: bad block at 0x000002760000
> [    4.564280] nand_read_bbt: bad block at 0x000002780000
> [    4.569438] nand_read_bbt: bad block at 0x0000027a0000
> [    4.574705] nand_read_bbt: bad block at 0x0000027c0000
> [    4.579863] nand_read_bbt: bad block at 0x0000027e0000
> [    4.585129] nand_read_bbt: bad block at 0x000002800000
> [    4.590288] nand_read_bbt: bad block at 0x000002820000
> [    4.595558] nand_read_bbt: bad block at 0x000002a40000
> [    4.600720] nand_read_bbt: bad block at 0x000002a60000
> [    4.606012] nand_read_bbt: bad block at 0x000002bc0000
> [    4.611182] nand_read_bbt: bad block at 0x000002c40000
> [    4.616449] nand_read_bbt: bad block at 0x000002c60000
> [    4.621614] nand_read_bbt: bad block at 0x000002c80000
> [    4.626878] nand_read_bbt: bad block at 0x000002ca0000
> [    4.632036] nand_read_bbt: bad block at 0x000002cc0000
> [    4.637301] nand_read_bbt: bad block at 0x000002ce0000
> [    4.642463] nand_read_bbt: bad block at 0x000002d00000
> [    4.647726] nand_read_bbt: bad block at 0x000002d20000
> [    4.652888] nand_read_bbt: bad block at 0x000002d40000
> [    4.658167] nand_read_bbt: bad block at 0x000002d60000
> [    4.663433] nand_read_bbt: bad block at 0x000002d80000
> [    4.668593] nand_read_bbt: bad block at 0x000002da0000
> [    4.673859] nand_read_bbt: bad block at 0x000002dc0000
> [    4.679017] nand_read_bbt: bad block at 0x000002de0000
> [    4.684282] nand_read_bbt: bad block at 0x000002e00000
> [    4.689442] nand_read_bbt: bad block at 0x000002e20000
> [    4.694707] nand_read_bbt: bad block at 0x000002e40000
> [    4.699867] nand_read_bbt: bad block at 0x000002e60000
> [    4.705133] nand_read_bbt: bad block at 0x000002e80000
> [    4.710292] nand_read_bbt: bad block at 0x000002ea0000
> [    4.715558] nand_read_bbt: bad block at 0x000002ec0000
> [    4.720716] nand_read_bbt: bad block at 0x000002ee0000
> [    4.725983] nand_read_bbt: bad block at 0x000002f00000
> [    4.731141] nand_read_bbt: bad block at 0x000002f20000
> [    4.736406] nand_read_bbt: bad block at 0x000002f40000
> [    4.741566] nand_read_bbt: bad block at 0x000002f60000
> [    4.746830] nand_read_bbt: bad block at 0x000002f80000
> [    4.751991] nand_read_bbt: bad block at 0x000002fa0000
> [    4.757255] nand_read_bbt: bad block at 0x000002fc0000
> [    4.762415] nand_read_bbt: bad block at 0x000002fe0000
> [    4.767681] nand_read_bbt: bad block at 0x000003000000
> [    4.772839] nand_read_bbt: bad block at 0x000003020000
> [    4.778104] nand_read_bbt: bad block at 0x000003040000
> [    4.783378] nand_read_bbt: bad block at 0x000003060000
> [    4.788536] nand_read_bbt: bad block at 0x000003080000
> [    4.793802] nand_read_bbt: bad block at 0x0000030a0000
> [    4.798962] nand_read_bbt: bad block at 0x0000030c0000
> [    4.804224] nand_read_bbt: bad block at 0x0000030e0000
> [    4.809387] nand_read_bbt: bad block at 0x000003100000
> [    4.814650] nand_read_bbt: bad block at 0x000003120000
> [    4.819809] nand_read_bbt: bad block at 0x000003140000
> [    4.825075] nand_read_bbt: bad block at 0x000003160000
> [    4.830235] nand_read_bbt: bad block at 0x000003180000
> [    4.835499] nand_read_bbt: bad block at 0x0000031a0000
> [    4.840661] nand_read_bbt: bad block at 0x0000031c0000
> [    4.845924] nand_read_bbt: bad block at 0x0000031e0000
> [    4.851085] nand_read_bbt: bad block at 0x000003200000
> [    4.856350] nand_read_bbt: bad block at 0x000003220000
> [    4.861510] nand_read_bbt: bad block at 0x000003240000
> [    4.867593] 6 cmdlinepart partitions found on MTD device pxa3xx_nand-0
> [    4.874441] Creating 6 MTD partitions on "pxa3xx_nand-0":
> [    4.879899] 0x000000000000-0x000000020000 : "TIMH"
> [    4.888233] 0x000000020000-0x000000040000 : "OBMI"
> [    4.897663] 0x000000040000-0x000000100000 : "barebox"
> [    4.907444] 0x000000100000-0x000000140000 : "barebox-env"
> [    4.917447] 0x000000140000-0x000000d40000 : "kernel"
> [    4.927958] 0x000000d40000-0x000003260000 : "root"
> [    4.941349] smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
> [    4.994377] smc91x smc91x.0 eth0: SMC91C11xFD (rev 2) at c4867300 IRQ 214
> [    5.001216]  DMA c386d710 [nowait]
> [    5.005891] smc91x smc91x.0 eth0: Ethernet addr: 00:0e:0c:a7:26:f7
> [    5.018621] input: pxa27x-keypad as /devices/platform/pxa27x-keypad/input/input0
> [    5.028503] pxa-rtc pxa-rtc: failed to find rtc clock source
> [    5.036108] rtc rtc0: invalid alarm value: 0-1-1 0:0:0
> [    5.043390] pxa-rtc pxa-rtc: rtc core: registered pxa-rtc as rtc0
> [    5.054574] sa1100_wdt: SA1100/PXA2xx Watchdog Timer: timer margin 60 sec
> [    5.106260] soc-audio soc-audio: ASoC: machine Zylonite should use snd_soc_register_card()
> [    5.130166] wm9713-codec wm9713-codec: Control not supported for path Mic B Source -> [MPB] -> Mic B Pre Amp
> [    5.141137] wm9713-codec wm9713-codec: ASoC: no dapm match for Mic B Source --> MPB --> Mic B Pre Amp
> [    5.150835] wm9713-codec wm9713-codec: ASoC: Failed to add route Mic B Source -> MPB -> Mic B Pre Amp
> [    5.164361] soc-audio soc-audio: wm9713-hifi <-> pxa2xx-ac97 mapping ok
> [    5.172711] soc-audio soc-audio: wm9713-aux <-> pxa2xx-ac97-aux mapping ok
> [    5.183377] soc-audio soc-audio: wm9713-voice <-> pxa-ssp-dai.2 mapping ok
> [    5.191817] wm9713-codec wm9713-codec: ASoC: mux Sidetone Mux has no paths
> [    5.232193] NET: Registered protocol family 17
> [    5.238583] Key type dns_resolver registered
> [    5.244879] XScale iWMMXt coprocessor detected.
> [    5.257208] Loading compiled-in X.509 certificates
> [    5.277841] ubi0: attaching mtd5
> [    5.282062] marvell-nfc pxa3xx-nand: 
> [    5.282062] NDCR:  0xdd079fff
> [    5.282062] NDCB0: 0x000d3000
> [    5.282062] NDCB1: 0x23400000
> [    5.282062] NDCB2: 0x00000000
> [    5.282062] NDCB3: 0x00000000
> [    5.302767] marvell-nfc pxa3xx-nand: 
> [    5.302767] NDCR:  0xdd079fff
> [    5.302767] NDCB0: 0x000d3000
> [    5.302767] NDCB1: 0x23410000
> [    5.302767] NDCB2: 0x00000000
> [    5.302767] NDCB3: 0x00000000
> [    5.322069] marvell-nfc pxa3xx-nand: 
> [    5.322069] NDCR:  0x9d079fff
> [    5.322069] NDCB0: 0x000d3000
> [    5.322069] NDCB1: 0x23410000
> [    5.322069] NDCB2: 0x00000000
> [    5.322069] NDCB3: 0x00000000
> [    5.341520] marvell-nfc pxa3xx-nand: 
> [    5.341520] NDCR:  0xdd079fff
> [    5.341520] NDCB0: 0x000d3000
> [    5.341520] NDCB1: 0x23800000
> [    5.341520] NDCB2: 0x00000000
> [    5.341520] NDCB3: 0x00000000
> [    5.361115] marvell-nfc pxa3xx-nand: 
> [    5.361115] NDCR:  0xdd079fff
> [    5.361115] NDCB0: 0x000d3000
> [    5.361115] NDCB1: 0x23810000
> [    5.361115] NDCB2: 0x00000000
> [    5.361115] NDCB3: 0x00000000
> [    5.380361] marvell-nfc pxa3xx-nand: 
> [    5.380361] NDCR:  0x9d079fff
> [    5.380361] NDCB0: 0x000d3000
> [    5.380361] NDCB1: 0x23810000
> [    5.380361] NDCB2: 0x00000000
> [    5.380361] NDCB3: 0x00000000
> [    5.399699] marvell-nfc pxa3xx-nand: 
> [    5.399699] NDCR:  0xdd079fff
> [    5.399699] NDCB0: 0x000d3000
> [    5.399699] NDCB1: 0x23c00000
> [    5.399699] NDCB2: 0x00000000
> [    5.399699] NDCB3: 0x00000000
> [    5.418790] marvell-nfc pxa3xx-nand: 
> [    5.418790] NDCR:  0xdd079fff
> [    5.418790] NDCB0: 0x000d3000
> [    5.418790] NDCB1: 0x23c10000
> [    5.418790] NDCB2: 0x00000000
> [    5.418790] NDCB3: 0x00000000
> [    5.437771] marvell-nfc pxa3xx-nand: 
> [    5.437771] NDCR:  0x9d079fff
> [    5.437771] NDCB0: 0x000d3000
> [    5.437771] NDCB1: 0x23c10000
> [    5.437771] NDCB2: 0x00000000
> [    5.437771] NDCB3: 0x00000000
> [    5.456876] marvell-nfc pxa3xx-nand: 
> [    5.456876] NDCR:  0xdd079fff
> [    5.456876] NDCB0: 0x000d3000
> [    5.456876] NDCB1: 0x24000000
> [    5.456876] NDCB2: 0x00000000
> [    5.456876] NDCB3: 0x00000000
> [    5.475940] marvell-nfc pxa3xx-nand: 
> [    5.475940] NDCR:  0xdd079fff
> [    5.475940] NDCB0: 0x000d3000
> [    5.475940] NDCB1: 0x24010000
> [    5.475940] NDCB2: 0x00000000
> [    5.475940] NDCB3: 0x00000000
> [    5.494922] marvell-nfc pxa3xx-nand: 
> [    5.494922] NDCR:  0x9d079fff
> [    5.494922] NDCB0: 0x000d3000
> [    5.494922] NDCB1: 0x24010000
> [    5.494922] NDCB2: 0x00000000
> [    5.494922] NDCB3: 0x00000000
> [    5.514028] marvell-nfc pxa3xx-nand: 
> [    5.514028] NDCR:  0xdd079fff
> [    5.514028] NDCB0: 0x000d3000
> [    5.514028] NDCB1: 0x24400000
> [    5.514028] NDCB2: 0x00000000
> [    5.514028] NDCB3: 0x00000000
> [    5.533183] marvell-nfc pxa3xx-nand: 
> [    5.533183] NDCR:  0xdd079fff
> [    5.533183] NDCB0: 0x000d3000
> [    5.533183] NDCB1: 0x24410000
> [    5.533183] NDCB2: 0x00000000
> [    5.533183] NDCB3: 0x00000000
> [    5.552166] marvell-nfc pxa3xx-nand: 
> [    5.552166] NDCR:  0x9d079fff
> [    5.552166] NDCB0: 0x000d3000
> [    5.552166] NDCB1: 0x24410000
> [    5.552166] NDCB2: 0x00000000
> [    5.552166] NDCB3: 0x00000000
> [    5.571273] marvell-nfc pxa3xx-nand: 
> [    5.571273] NDCR:  0xdd079fff
> [    5.571273] NDCB0: 0x000d3000
> [    5.571273] NDCB1: 0x24800000
> [    5.571273] NDCB2: 0x00000000
> [    5.571273] NDCB3: 0x00000000
> [    5.590337] marvell-nfc pxa3xx-nand: 
> [    5.590337] NDCR:  0xdd079fff
> [    5.590337] NDCB0: 0x000d3000
> [    5.590337] NDCB1: 0x24810000
> [    5.590337] NDCB2: 0x00000000
> [    5.590337] NDCB3: 0x00000000
> [    5.609318] marvell-nfc pxa3xx-nand: 
> [    5.609318] NDCR:  0x9d079fff
> [    5.609318] NDCB0: 0x000d3000
> [    5.609318] NDCB1: 0x24810000
> [    5.609318] NDCB2: 0x00000000
> [    5.609318] NDCB3: 0x00000000
> [    5.628426] marvell-nfc pxa3xx-nand: 
> [    5.628426] NDCR:  0xdd079fff
> [    5.628426] NDCB0: 0x000d3000
> [    5.628426] NDCB1: 0x24c00000
> [    5.628426] NDCB2: 0x00000000
> [    5.628426] NDCB3: 0x00000000
> [    5.647489] marvell-nfc pxa3xx-nand: 
> [    5.647489] NDCR:  0xdd079fff
> [    5.647489] NDCB0: 0x000d3000
> [    5.647489] NDCB1: 0x24c10000
> [    5.647489] NDCB2: 0x00000000
> [    5.647489] NDCB3: 0x00000000
> [    5.666475] marvell-nfc pxa3xx-nand: 
> [    5.666475] NDCR:  0x9d079fff
> [    5.666475] NDCB0: 0x000d3000
> [    5.666475] NDCB1: 0x24c10000
> [    5.666475] NDCB2: 0x00000000
> [    5.666475] NDCB3: 0x00000000
> [    5.685575] marvell-nfc pxa3xx-nand: 
> [    5.685575] NDCR:  0xdd079fff
> [    5.685575] NDCB0: 0x000d3000
> [    5.685575] NDCB1: 0x25000000
> [    5.685575] NDCB2: 0x00000000
> [    5.685575] NDCB3: 0x00000000
> [    5.704632] marvell-nfc pxa3xx-nand: 
> [    5.704632] NDCR:  0xdd079fff
> [    5.704632] NDCB0: 0x000d3000
> [    5.704632] NDCB1: 0x25010000
> [    5.704632] NDCB2: 0x00000000
> [    5.704632] NDCB3: 0x00000000
> [    5.723609] marvell-nfc pxa3xx-nand: 
> [    5.723609] NDCR:  0x9d079fff
> [    5.723609] NDCB0: 0x000d3000
> [    5.723609] NDCB1: 0x25010000
> [    5.723609] NDCB2: 0x00000000
> [    5.723609] NDCB3: 0x00000000
> [    5.742713] marvell-nfc pxa3xx-nand: 
> [    5.742713] NDCR:  0xdd079fff
> [    5.742713] NDCB0: 0x000d3000
> [    5.742713] NDCB1: 0x25400000
> [    5.742713] NDCB2: 0x00000000
> [    5.742713] NDCB3: 0x00000000
> [    5.761769] marvell-nfc pxa3xx-nand: 
> [    5.761769] NDCR:  0xdd079fff
> [    5.761769] NDCB0: 0x000d3000
> [    5.761769] NDCB1: 0x25410000
> [    5.761769] NDCB2: 0x00000000
> [    5.761769] NDCB3: 0x00000000
> [    5.780750] marvell-nfc pxa3xx-nand: 
> [    5.780750] NDCR:  0x9d079fff
> [    5.780750] NDCB0: 0x000d3000
> [    5.780750] NDCB1: 0x25410000
> [    5.780750] NDCB2: 0x00000000
> [    5.780750] NDCB3: 0x00000000
> [    5.799855] marvell-nfc pxa3xx-nand: 
> [    5.799855] NDCR:  0xdd079fff
> [    5.799855] NDCB0: 0x000d3000
> [    5.799855] NDCB1: 0x25800000
> [    5.799855] NDCB2: 0x00000000
> [    5.799855] NDCB3: 0x00000000
> [    5.818918] marvell-nfc pxa3xx-nand: 
> [    5.818918] NDCR:  0xdd079fff
> [    5.818918] NDCB0: 0x000d3000
> [    5.818918] NDCB1: 0x25810000
> [    5.818918] NDCB2: 0x00000000
> [    5.818918] NDCB3: 0x00000000
> [    5.837903] marvell-nfc pxa3xx-nand: 
> [    5.837903] NDCR:  0x9d079fff
> [    5.837903] NDCB0: 0x000d3000
> [    5.837903] NDCB1: 0x25810000
> [    5.837903] NDCB2: 0x00000000
> [    5.837903] NDCB3: 0x00000000
> [    5.857009] marvell-nfc pxa3xx-nand: 
> [    5.857009] NDCR:  0xdd079fff
> [    5.857009] NDCB0: 0x000d3000
> [    5.857009] NDCB1: 0x25c00000
> [    5.857009] NDCB2: 0x00000000
> [    5.857009] NDCB3: 0x00000000
> [    5.876071] marvell-nfc pxa3xx-nand: 
> [    5.876071] NDCR:  0xdd079fff
> [    5.876071] NDCB0: 0x000d3000
> [    5.876071] NDCB1: 0x25c10000
> [    5.876071] NDCB2: 0x00000000
> [    5.876071] NDCB3: 0x00000000
> [    5.895047] marvell-nfc pxa3xx-nand: 
> [    5.895047] NDCR:  0x9d079fff
> [    5.895047] NDCB0: 0x000d3000
> [    5.895047] NDCB1: 0x25c10000
> [    5.895047] NDCB2: 0x00000000
> [    5.895047] NDCB3: 0x00000000
> [    5.914152] marvell-nfc pxa3xx-nand: 
> [    5.914152] NDCR:  0xdd079fff
> [    5.914152] NDCB0: 0x000d3000
> [    5.914152] NDCB1: 0x26000000
> [    5.914152] NDCB2: 0x00000000
> [    5.914152] NDCB3: 0x00000000
> [    5.933285] marvell-nfc pxa3xx-nand: 
> [    5.933285] NDCR:  0xdd079fff
> [    5.933285] NDCB0: 0x000d3000
> [    5.933285] NDCB1: 0x26010000
> [    5.933285] NDCB2: 0x00000000
> [    5.933285] NDCB3: 0x00000000
> [    5.952247] marvell-nfc pxa3xx-nand: 
> [    5.952247] NDCR:  0x9d079fff
> [    5.952247] NDCB0: 0x000d3000
> [    5.952247] NDCB1: 0x26010000
> [    5.952247] NDCB2: 0x00000000
> [    5.952247] NDCB3: 0x00000000
> [    5.971354] marvell-nfc pxa3xx-nand: 
> [    5.971354] NDCR:  0xdd079fff
> [    5.971354] NDCB0: 0x000d3000
> [    5.971354] NDCB1: 0x26400000
> [    5.971354] NDCB2: 0x00000000
> [    5.971354] NDCB3: 0x00000000
> [    5.990415] marvell-nfc pxa3xx-nand: 
> [    5.990415] NDCR:  0xdd079fff
> [    5.990415] NDCB0: 0x000d3000
> [    5.990415] NDCB1: 0x26410000
> [    5.990415] NDCB2: 0x00000000
> [    5.990415] NDCB3: 0x00000000
> [    6.009391] marvell-nfc pxa3xx-nand: 
> [    6.009391] NDCR:  0x9d079fff
> [    6.009391] NDCB0: 0x000d3000
> [    6.009391] NDCB1: 0x26410000
> [    6.009391] NDCB2: 0x00000000
> [    6.009391] NDCB3: 0x00000000
> [    6.028510] marvell-nfc pxa3xx-nand: 
> [    6.028510] NDCR:  0xdd079fff
> [    6.028510] NDCB0: 0x000d3000
> [    6.028510] NDCB1: 0x26800000
> [    6.028510] NDCB2: 0x00000000
> [    6.028510] NDCB3: 0x00000000
> [    6.047572] marvell-nfc pxa3xx-nand: 
> [    6.047572] NDCR:  0xdd079fff
> [    6.047572] NDCB0: 0x000d3000
> [    6.047572] NDCB1: 0x26810000
> [    6.047572] NDCB2: 0x00000000
> [    6.047572] NDCB3: 0x00000000
> [    6.066553] marvell-nfc pxa3xx-nand: 
> [    6.066553] NDCR:  0x9d079fff
> [    6.066553] NDCB0: 0x000d3000
> [    6.066553] NDCB1: 0x26810000
> [    6.066553] NDCB2: 0x00000000
> [    6.066553] NDCB3: 0x00000000
> [    6.085662] marvell-nfc pxa3xx-nand: 
> [    6.085662] NDCR:  0xdd079fff
> [    6.085662] NDCB0: 0x000d3000
> [    6.085662] NDCB1: 0x26c00000
> [    6.085662] NDCB2: 0x00000000
> [    6.085662] NDCB3: 0x00000000
> [    6.105275] marvell-nfc pxa3xx-nand: 
> [    6.105275] NDCR:  0xdd079fff
> [    6.105275] NDCB0: 0x000d3000
> [    6.105275] NDCB1: 0x26c10000
> [    6.105275] NDCB2: 0x00000000
> [    6.105275] NDCB3: 0x00000000
> [    6.124291] marvell-nfc pxa3xx-nand: 
> [    6.124291] NDCR:  0x9d079fff
> [    6.124291] NDCB0: 0x000d3000
> [    6.124291] NDCB1: 0x26c10000
> [    6.124291] NDCB2: 0x00000000
> [    6.124291] NDCB3: 0x00000000
> [    6.143431] marvell-nfc pxa3xx-nand: 
> [    6.143431] NDCR:  0xdd079fff
> [    6.143431] NDCB0: 0x000d3000
> [    6.143431] NDCB1: 0x27000000
> [    6.143431] NDCB2: 0x00000000
> [    6.143431] NDCB3: 0x00000000
> [    6.162492] marvell-nfc pxa3xx-nand: 
> [    6.162492] NDCR:  0xdd079fff
> [    6.162492] NDCB0: 0x000d3000
> [    6.162492] NDCB1: 0x27010000
> [    6.162492] NDCB2: 0x00000000
> [    6.162492] NDCB3: 0x00000000
> [    6.181482] marvell-nfc pxa3xx-nand: 
> [    6.181482] NDCR:  0x9d079fff
> [    6.181482] NDCB0: 0x000d3000
> [    6.181482] NDCB1: 0x27010000
> [    6.181482] NDCB2: 0x00000000
> [    6.181482] NDCB3: 0x00000000
> [    6.200594] marvell-nfc pxa3xx-nand: 
> [    6.200594] NDCR:  0xdd079fff
> [    6.200594] NDCB0: 0x000d3000
> [    6.200594] NDCB1: 0x27400000
> [    6.200594] NDCB2: 0x00000000
> [    6.200594] NDCB3: 0x00000000
> [    6.219651] marvell-nfc pxa3xx-nand: 
> [    6.219651] NDCR:  0xdd079fff
> [    6.219651] NDCB0: 0x000d3000
> [    6.219651] NDCB1: 0x27410000
> [    6.219651] NDCB2: 0x00000000
> [    6.219651] NDCB3: 0x00000000
> [    6.238628] marvell-nfc pxa3xx-nand: 
> [    6.238628] NDCR:  0x9d079fff
> [    6.238628] NDCB0: 0x000d3000
> [    6.238628] NDCB1: 0x27410000
> [    6.238628] NDCB2: 0x00000000
> [    6.238628] NDCB3: 0x00000000
> [    6.257763] marvell-nfc pxa3xx-nand: 
> [    6.257763] NDCR:  0xdd079fff
> [    6.257763] NDCB0: 0x000d3000
> [    6.257763] NDCB1: 0x27800000
> [    6.257763] NDCB2: 0x00000000
> [    6.257763] NDCB3: 0x00000000
> [    6.276826] marvell-nfc pxa3xx-nand: 
> [    6.276826] NDCR:  0xdd079fff
> [    6.276826] NDCB0: 0x000d3000
> [    6.276826] NDCB1: 0x27810000
> [    6.276826] NDCB2: 0x00000000
> [    6.276826] NDCB3: 0x00000000
> [    6.295914] marvell-nfc pxa3xx-nand: 
> [    6.295914] NDCR:  0xdd079fff
> [    6.295914] NDCB0: 0x000d3000
> [    6.295914] NDCB1: 0x27c00000
> [    6.295914] NDCB2: 0x00000000
> [    6.295914] NDCB3: 0x00000000
> [    6.314978] marvell-nfc pxa3xx-nand: 
> [    6.314978] NDCR:  0xdd079fff
> [    6.314978] NDCB0: 0x000d3000
> [    6.314978] NDCB1: 0x27c10000
> [    6.314978] NDCB2: 0x00000000
> [    6.314978] NDCB3: 0x00000000
> [    6.333957] marvell-nfc pxa3xx-nand: 
> [    6.333957] NDCR:  0x9d079fff
> [    6.333957] NDCB0: 0x000d3000
> [    6.333957] NDCB1: 0x27c10000
> [    6.333957] NDCB2: 0x00000000
> [    6.333957] NDCB3: 0x00000000
> [    6.353164] marvell-nfc pxa3xx-nand: 
> [    6.353164] NDCR:  0xdd079fff
> [    6.353164] NDCB0: 0x000d3000
> [    6.353164] NDCB1: 0x28000000
> [    6.353164] NDCB2: 0x00000000
> [    6.353164] NDCB3: 0x00000000
> [    6.372184] marvell-nfc pxa3xx-nand: 
> [    6.372184] NDCR:  0xdd079fff
> [    6.372184] NDCB0: 0x000d3000
> [    6.372184] NDCB1: 0x28010000
> [    6.372184] NDCB2: 0x00000000
> [    6.372184] NDCB3: 0x00000000
> [    6.391168] marvell-nfc pxa3xx-nand: 
> [    6.391168] NDCR:  0x9d079fff
> [    6.391168] NDCB0: 0x000d3000
> [    6.391168] NDCB1: 0x28010000
> [    6.391168] NDCB2: 0x00000000
> [    6.391168] NDCB3: 0x00000000
> [    6.410268] marvell-nfc pxa3xx-nand: 
> [    6.410268] NDCR:  0xdd079fff
> [    6.410268] NDCB0: 0x000d3000
> [    6.410268] NDCB1: 0x28400000
> [    6.410268] NDCB2: 0x00000000
> [    6.410268] NDCB3: 0x00000000
> [    6.429335] marvell-nfc pxa3xx-nand: 
> [    6.429335] NDCR:  0xdd079fff
> [    6.429335] NDCB0: 0x000d3000
> [    6.429335] NDCB1: 0x28410000
> [    6.429335] NDCB2: 0x00000000
> [    6.429335] NDCB3: 0x00000000
> [    6.448408] marvell-nfc pxa3xx-nand: 
> [    6.448408] NDCR:  0xdd079fff
> [    6.448408] NDCB0: 0x000d3000
> [    6.448408] NDCB1: 0x28800000
> [    6.448408] NDCB2: 0x00000000
> [    6.448408] NDCB3: 0x00000000
> [    6.467471] marvell-nfc pxa3xx-nand: 
> [    6.467471] NDCR:  0xdd079fff
> [    6.467471] NDCB0: 0x000d3000
> [    6.467471] NDCB1: 0x28810000
> [    6.467471] NDCB2: 0x00000000
> [    6.467471] NDCB3: 0x00000000
> [    6.486456] marvell-nfc pxa3xx-nand: 
> [    6.486456] NDCR:  0x9d079fff
> [    6.486456] NDCB0: 0x000d3000
> [    6.486456] NDCB1: 0x28810000
> [    6.486456] NDCB2: 0x00000000
> [    6.486456] NDCB3: 0x00000000
> [    6.505554] marvell-nfc pxa3xx-nand: 
> [    6.505554] NDCR:  0xdd079fff
> [    6.505554] NDCB0: 0x000d3000
> [    6.505554] NDCB1: 0x28c00000
> [    6.505554] NDCB2: 0x00000000
> [    6.505554] NDCB3: 0x00000000
> [    6.524610] marvell-nfc pxa3xx-nand: 
> [    6.524610] NDCR:  0xdd079fff
> [    6.524610] NDCB0: 0x000d3000
> [    6.524610] NDCB1: 0x28c10000
> [    6.524610] NDCB2: 0x00000000
> [    6.524610] NDCB3: 0x00000000
> [    6.543589] marvell-nfc pxa3xx-nand: 
> [    6.543589] NDCR:  0x9d079fff
> [    6.543589] NDCB0: 0x000d3000
> [    6.543589] NDCB1: 0x28c10000
> [    6.543589] NDCB2: 0x00000000
> [    6.543589] NDCB3: 0x00000000
> [    6.562688] marvell-nfc pxa3xx-nand: 
> [    6.562688] NDCR:  0xdd079fff
> [    6.562688] NDCB0: 0x000d3000
> [    6.562688] NDCB1: 0x29000000
> [    6.562688] NDCB2: 0x00000000
> [    6.562688] NDCB3: 0x00000000
> [    6.581750] marvell-nfc pxa3xx-nand: 
> [    6.581750] NDCR:  0xdd079fff
> [    6.581750] NDCB0: 0x000d3000
> [    6.581750] NDCB1: 0x29010000
> [    6.581750] NDCB2: 0x00000000
> [    6.581750] NDCB3: 0x00000000
> [    6.600735] marvell-nfc pxa3xx-nand: 
> [    6.600735] NDCR:  0x9d079fff
> [    6.600735] NDCB0: 0x000d3000
> [    6.600735] NDCB1: 0x29010000
> [    6.600735] NDCB2: 0x00000000
> [    6.600735] NDCB3: 0x00000000
> [    6.619839] marvell-nfc pxa3xx-nand: 
> [    6.619839] NDCR:  0xdd079fff
> [    6.619839] NDCB0: 0x000d3000
> [    6.619839] NDCB1: 0x29400000
> [    6.619839] NDCB2: 0x00000000
> [    6.619839] NDCB3: 0x00000000
> [    6.638902] marvell-nfc pxa3xx-nand: 
> [    6.638902] NDCR:  0xdd079fff
> [    6.638902] NDCB0: 0x000d3000
> [    6.638902] NDCB1: 0x29410000
> [    6.638902] NDCB2: 0x00000000
> [    6.638902] NDCB3: 0x00000000
> [    6.657879] marvell-nfc pxa3xx-nand: 
> [    6.657879] NDCR:  0x9d079fff
> [    6.657879] NDCB0: 0x000d3000
> [    6.657879] NDCB1: 0x29410000
> [    6.657879] NDCB2: 0x00000000
> [    6.657879] NDCB3: 0x00000000
> [    6.676983] marvell-nfc pxa3xx-nand: 
> [    6.676983] NDCR:  0xdd079fff
> [    6.676983] NDCB0: 0x000d3000
> [    6.676983] NDCB1: 0x29800000
> [    6.676983] NDCB2: 0x00000000
> [    6.676983] NDCB3: 0x00000000
> [    6.696050] marvell-nfc pxa3xx-nand: 
> [    6.696050] NDCR:  0xdd079fff
> [    6.696050] NDCB0: 0x000d3000
> [    6.696050] NDCB1: 0x29810000
> [    6.696050] NDCB2: 0x00000000
> [    6.696050] NDCB3: 0x00000000
> [    6.715033] marvell-nfc pxa3xx-nand: 
> [    6.715033] NDCR:  0x9d079fff
> [    6.715033] NDCB0: 0x000d3000
> [    6.715033] NDCB1: 0x29810000
> [    6.715033] NDCB2: 0x00000000
> [    6.715033] NDCB3: 0x00000000
> [    6.734141] marvell-nfc pxa3xx-nand: 
> [    6.734141] NDCR:  0xdd079fff
> [    6.734141] NDCB0: 0x000d3000
> [    6.734141] NDCB1: 0x29c00000
> [    6.734141] NDCB2: 0x00000000
> [    6.734141] NDCB3: 0x00000000
> [    6.753291] marvell-nfc pxa3xx-nand: 
> [    6.753291] NDCR:  0xdd079fff
> [    6.753291] NDCB0: 0x000d3000
> [    6.753291] NDCB1: 0x29c10000
> [    6.753291] NDCB2: 0x00000000
> [    6.753291] NDCB3: 0x00000000
> [    6.772264] marvell-nfc pxa3xx-nand: 
> [    6.772264] NDCR:  0x9d079fff
> [    6.772264] NDCB0: 0x000d3000
> [    6.772264] NDCB1: 0x29c10000
> [    6.772264] NDCB2: 0x00000000
> [    6.772264] NDCB3: 0x00000000
> [    6.791367] marvell-nfc pxa3xx-nand: 
> [    6.791367] NDCR:  0xdd079fff
> [    6.791367] NDCB0: 0x000d3000
> [    6.791367] NDCB1: 0x2a000000
> [    6.791367] NDCB2: 0x00000000
> [    6.791367] NDCB3: 0x00000000
> [    6.810425] marvell-nfc pxa3xx-nand: 
> [    6.810425] NDCR:  0xdd079fff
> [    6.810425] NDCB0: 0x000d3000
> [    6.810425] NDCB1: 0x2a010000
> [    6.810425] NDCB2: 0x00000000
> [    6.810425] NDCB3: 0x00000000
> [    6.829403] marvell-nfc pxa3xx-nand: 
> [    6.829403] NDCR:  0x9d079fff
> [    6.829403] NDCB0: 0x000d3000
> [    6.829403] NDCB1: 0x2a010000
> [    6.829403] NDCB2: 0x00000000
> [    6.829403] NDCB3: 0x00000000
> [    6.848512] marvell-nfc pxa3xx-nand: 
> [    6.848512] NDCR:  0xdd079fff
> [    6.848512] NDCB0: 0x000d3000
> [    6.848512] NDCB1: 0x2a400000
> [    6.848512] NDCB2: 0x00000000
> [    6.848512] NDCB3: 0x00000000
> [    6.867573] marvell-nfc pxa3xx-nand: 
> [    6.867573] NDCR:  0xdd079fff
> [    6.867573] NDCB0: 0x000d3000
> [    6.867573] NDCB1: 0x2a410000
> [    6.867573] NDCB2: 0x00000000
> [    6.867573] NDCB3: 0x00000000
> [    6.886550] marvell-nfc pxa3xx-nand: 
> [    6.886550] NDCR:  0x9d079fff
> [    6.886550] NDCB0: 0x000d3000
> [    6.886550] NDCB1: 0x2a410000
> [    6.886550] NDCB2: 0x00000000
> [    6.886550] NDCB3: 0x00000000
> [    6.905653] marvell-nfc pxa3xx-nand: 
> [    6.905653] NDCR:  0xdd079fff
> [    6.905653] NDCB0: 0x000d3000
> [    6.905653] NDCB1: 0x2a800000
> [    6.905653] NDCB2: 0x00000000
> [    6.905653] NDCB3: 0x00000000
> [    6.924720] marvell-nfc pxa3xx-nand: 
> [    6.924720] NDCR:  0xdd079fff
> [    6.924720] NDCB0: 0x000d3000
> [    6.924720] NDCB1: 0x2a810000
> [    6.924720] NDCB2: 0x00000000
> [    6.924720] NDCB3: 0x00000000
> [    6.943704] marvell-nfc pxa3xx-nand: 
> [    6.943704] NDCR:  0x9d079fff
> [    6.943704] NDCB0: 0x000d3000
> [    6.943704] NDCB1: 0x2a810000
> [    6.943704] NDCB2: 0x00000000
> [    6.943704] NDCB3: 0x00000000
> [    6.962806] marvell-nfc pxa3xx-nand: 
> [    6.962806] NDCR:  0xdd079fff
> [    6.962806] NDCB0: 0x000d3000
> [    6.962806] NDCB1: 0x2ac00000
> [    6.962806] NDCB2: 0x00000000
> [    6.962806] NDCB3: 0x00000000
> [    6.981868] marvell-nfc pxa3xx-nand: 
> [    6.981868] NDCR:  0xdd079fff
> [    6.981868] NDCB0: 0x000d3000
> [    6.981868] NDCB1: 0x2ac10000
> [    6.981868] NDCB2: 0x00000000
> [    6.981868] NDCB3: 0x00000000
> [    7.000848] marvell-nfc pxa3xx-nand: 
> [    7.000848] NDCR:  0x9d079fff
> [    7.000848] NDCB0: 0x000d3000
> [    7.000848] NDCB1: 0x2ac10000
> [    7.000848] NDCB2: 0x00000000
> [    7.000848] NDCB3: 0x00000000
> [    7.019966] marvell-nfc pxa3xx-nand: 
> [    7.019966] NDCR:  0xdd079fff
> [    7.019966] NDCB0: 0x000d3000
> [    7.019966] NDCB1: 0x2b000000
> [    7.019966] NDCB2: 0x00000000
> [    7.019966] NDCB3: 0x00000000
> [    7.039028] marvell-nfc pxa3xx-nand: 
> [    7.039028] NDCR:  0xdd079fff
> [    7.039028] NDCB0: 0x000d3000
> [    7.039028] NDCB1: 0x2b010000
> [    7.039028] NDCB2: 0x00000000
> [    7.039028] NDCB3: 0x00000000
> [    7.058002] marvell-nfc pxa3xx-nand: 
> [    7.058002] NDCR:  0x9d079fff
> [    7.058002] NDCB0: 0x000d3000
> [    7.058002] NDCB1: 0x2b010000
> [    7.058002] NDCB2: 0x00000000
> [    7.058002] NDCB3: 0x00000000
> [    7.077109] marvell-nfc pxa3xx-nand: 
> [    7.077109] NDCR:  0xdd079fff
> [    7.077109] NDCB0: 0x000d3000
> [    7.077109] NDCB1: 0x2b400000
> [    7.077109] NDCB2: 0x00000000
> [    7.077109] NDCB3: 0x00000000
> [    7.096173] marvell-nfc pxa3xx-nand: 
> [    7.096173] NDCR:  0xdd079fff
> [    7.096173] NDCB0: 0x000d3000
> [    7.096173] NDCB1: 0x2b410000
> [    7.096173] NDCB2: 0x00000000
> [    7.096173] NDCB3: 0x00000000
> [    7.115153] marvell-nfc pxa3xx-nand: 
> [    7.115153] NDCR:  0x9d079fff
> [    7.115153] NDCB0: 0x000d3000
> [    7.115153] NDCB1: 0x2b410000
> [    7.115153] NDCB2: 0x00000000
> [    7.115153] NDCB3: 0x00000000
> [    7.134255] marvell-nfc pxa3xx-nand: 
> [    7.134255] NDCR:  0xdd079fff
> [    7.134255] NDCB0: 0x000d3000
> [    7.134255] NDCB1: 0x2b800000
> [    7.134255] NDCB2: 0x00000000
> [    7.134255] NDCB3: 0x00000000
> [    7.153307] marvell-nfc pxa3xx-nand: 
> [    7.153307] NDCR:  0xdd079fff
> [    7.153307] NDCB0: 0x000d3000
> [    7.153307] NDCB1: 0x2b810000
> [    7.153307] NDCB2: 0x00000000
> [    7.153307] NDCB3: 0x00000000
> [    7.172279] marvell-nfc pxa3xx-nand: 
> [    7.172279] NDCR:  0x9d079fff
> [    7.172279] NDCB0: 0x000d3000
> [    7.172279] NDCB1: 0x2b810000
> [    7.172279] NDCB2: 0x00000000
> [    7.172279] NDCB3: 0x00000000
> [    7.191385] marvell-nfc pxa3xx-nand: 
> [    7.191385] NDCR:  0xdd079fff
> [    7.191385] NDCB0: 0x000d3000
> [    7.191385] NDCB1: 0x2bc00000
> [    7.191385] NDCB2: 0x00000000
> [    7.191385] NDCB3: 0x00000000
> [    7.210447] marvell-nfc pxa3xx-nand: 
> [    7.210447] NDCR:  0xdd079fff
> [    7.210447] NDCB0: 0x000d3000
> [    7.210447] NDCB1: 0x2bc10000
> [    7.210447] NDCB2: 0x00000000
> [    7.210447] NDCB3: 0x00000000
> [    7.229426] marvell-nfc pxa3xx-nand: 
> [    7.229426] NDCR:  0x9d079fff
> [    7.229426] NDCB0: 0x000d3000
> [    7.229426] NDCB1: 0x2bc10000
> [    7.229426] NDCB2: 0x00000000
> [    7.229426] NDCB3: 0x00000000
> [    7.248529] marvell-nfc pxa3xx-nand: 
> [    7.248529] NDCR:  0xdd079fff
> [    7.248529] NDCB0: 0x000d3000
> [    7.248529] NDCB1: 0x2c000000
> [    7.248529] NDCB2: 0x00000000
> [    7.248529] NDCB3: 0x00000000
> [    7.267597] marvell-nfc pxa3xx-nand: 
> [    7.267597] NDCR:  0xdd079fff
> [    7.267597] NDCB0: 0x000d3000
> [    7.267597] NDCB1: 0x2c010000
> [    7.267597] NDCB2: 0x00000000
> [    7.267597] NDCB3: 0x00000000
> [    7.286579] marvell-nfc pxa3xx-nand: 
> [    7.286579] NDCR:  0x9d079fff
> [    7.286579] NDCB0: 0x000d3000
> [    7.286579] NDCB1: 0x2c010000
> [    7.286579] NDCB2: 0x00000000
> [    7.286579] NDCB3: 0x00000000
> [    7.305683] marvell-nfc pxa3xx-nand: 
> [    7.305683] NDCR:  0xdd079fff
> [    7.305683] NDCB0: 0x000d3000
> [    7.305683] NDCB1: 0x2c400000
> [    7.305683] NDCB2: 0x00000000
> [    7.305683] NDCB3: 0x00000000
> [    7.324747] marvell-nfc pxa3xx-nand: 
> [    7.324747] NDCR:  0xdd079fff
> [    7.324747] NDCB0: 0x000d3000
> [    7.324747] NDCB1: 0x2c410000
> [    7.324747] NDCB2: 0x00000000
> [    7.324747] NDCB3: 0x00000000
> [    7.343743] marvell-nfc pxa3xx-nand: 
> [    7.343743] NDCR:  0x9d079fff
> [    7.343743] NDCB0: 0x000d3000
> [    7.343743] NDCB1: 0x2c410000
> [    7.343743] NDCB2: 0x00000000
> [    7.343743] NDCB3: 0x00000000
> [    7.362843] marvell-nfc pxa3xx-nand: 
> [    7.362843] NDCR:  0xdd079fff
> [    7.362843] NDCB0: 0x000d3000
> [    7.362843] NDCB1: 0x2c800000
> [    7.362843] NDCB2: 0x00000000
> [    7.362843] NDCB3: 0x00000000
> [    7.381905] marvell-nfc pxa3xx-nand: 
> [    7.381905] NDCR:  0xdd079fff
> [    7.381905] NDCB0: 0x000d3000
> [    7.381905] NDCB1: 0x2c810000
> [    7.381905] NDCB2: 0x00000000
> [    7.381905] NDCB3: 0x00000000
> [    7.400887] marvell-nfc pxa3xx-nand: 
> [    7.400887] NDCR:  0x9d079fff
> [    7.400887] NDCB0: 0x000d3000
> [    7.400887] NDCB1: 0x2c810000
> [    7.400887] NDCB2: 0x00000000
> [    7.400887] NDCB3: 0x00000000
> [    7.420884] marvell-nfc pxa3xx-nand: 
> [    7.420884] NDCR:  0xdd079fff
> [    7.420884] NDCB0: 0x000d3000
> [    7.420884] NDCB1: 0x50800000
> [    7.420884] NDCB2: 0x00000000
> [    7.420884] NDCB3: 0x00000000
> [    7.439944] marvell-nfc pxa3xx-nand: 
> [    7.439944] NDCR:  0xdd079fff
> [    7.439944] NDCB0: 0x000d3000
> [    7.439944] NDCB1: 0x50810000
> [    7.439944] NDCB2: 0x00000000
> [    7.439944] NDCB3: 0x00000000
> [    7.458920] marvell-nfc pxa3xx-nand: 
> [    7.458920] NDCR:  0x9d079fff
> [    7.458920] NDCB0: 0x000d3000
> [    7.458920] NDCB1: 0x50810000
> [    7.458920] NDCB2: 0x00000000
> [    7.458920] NDCB3: 0x00000000
> [    7.478025] marvell-nfc pxa3xx-nand: 
> [    7.478025] NDCR:  0xdd079fff
> [    7.478025] NDCB0: 0x000d3000
> [    7.478025] NDCB1: 0x50c00000
> [    7.478025] NDCB2: 0x00000000
> [    7.478025] NDCB3: 0x00000000
> [    7.497089] marvell-nfc pxa3xx-nand: 
> [    7.497089] NDCR:  0xdd079fff
> [    7.497089] NDCB0: 0x000d3000
> [    7.497089] NDCB1: 0x50c10000
> [    7.497089] NDCB2: 0x00000000
> [    7.497089] NDCB3: 0x00000000
> [    7.516067] marvell-nfc pxa3xx-nand: 
> [    7.516067] NDCR:  0x9d079fff
> [    7.516067] NDCB0: 0x000d3000
> [    7.516067] NDCB1: 0x50c10000
> [    7.516067] NDCB2: 0x00000000
> [    7.516067] NDCB3: 0x00000000
> [    7.535172] marvell-nfc pxa3xx-nand: 
> [    7.535172] NDCR:  0xdd079fff
> [    7.535172] NDCB0: 0x000d3000
> [    7.535172] NDCB1: 0x51000000
> [    7.535172] NDCB2: 0x00000000
> [    7.535172] NDCB3: 0x00000000
> [    7.554233] marvell-nfc pxa3xx-nand: 
> [    7.554233] NDCR:  0xdd079fff
> [    7.554233] NDCB0: 0x000d3000
> [    7.554233] NDCB1: 0x51010000
> [    7.554233] NDCB2: 0x00000000
> [    7.554233] NDCB3: 0x00000000
> [    7.573238] marvell-nfc pxa3xx-nand: 
> [    7.573238] NDCR:  0x9d079fff
> [    7.573238] NDCB0: 0x000d3000
> [    7.573238] NDCB1: 0x51010000
> [    7.573238] NDCB2: 0x00000000
> [    7.573238] NDCB3: 0x00000000
> [    7.592334] marvell-nfc pxa3xx-nand: 
> [    7.592334] NDCR:  0xdd079fff
> [    7.592334] NDCB0: 0x000d3000
> [    7.592334] NDCB1: 0x51400000
> [    7.592334] NDCB2: 0x00000000
> [    7.592334] NDCB3: 0x00000000
> [    7.611401] marvell-nfc pxa3xx-nand: 
> [    7.611401] NDCR:  0xdd079fff
> [    7.611401] NDCB0: 0x000d3000
> [    7.611401] NDCB1: 0x51410000
> [    7.611401] NDCB2: 0x00000000
> [    7.611401] NDCB3: 0x00000000
> [    7.630384] marvell-nfc pxa3xx-nand: 
> [    7.630384] NDCR:  0x9d079fff
> [    7.630384] NDCB0: 0x000d3000
> [    7.630384] NDCB1: 0x51410000
> [    7.630384] NDCB2: 0x00000000
> [    7.630384] NDCB3: 0x00000000
> [    7.649492] marvell-nfc pxa3xx-nand: 
> [    7.649492] NDCR:  0xdd079fff
> [    7.649492] NDCB0: 0x000d3000
> [    7.649492] NDCB1: 0x51800000
> [    7.649492] NDCB2: 0x00000000
> [    7.649492] NDCB3: 0x00000000
> [    7.668554] marvell-nfc pxa3xx-nand: 
> [    7.668554] NDCR:  0xdd079fff
> [    7.668554] NDCB0: 0x000d3000
> [    7.668554] NDCB1: 0x51810000
> [    7.668554] NDCB2: 0x00000000
> [    7.668554] NDCB3: 0x00000000
> [    7.687527] marvell-nfc pxa3xx-nand: 
> [    7.687527] NDCR:  0x9d079fff
> [    7.687527] NDCB0: 0x000d3000
> [    7.687527] NDCB1: 0x51810000
> [    7.687527] NDCB2: 0x00000000
> [    7.687527] NDCB3: 0x00000000
> [    7.706637] marvell-nfc pxa3xx-nand: 
> [    7.706637] NDCR:  0xdd079fff
> [    7.706637] NDCB0: 0x000d3000
> [    7.706637] NDCB1: 0x51c00000
> [    7.706637] NDCB2: 0x00000000
> [    7.706637] NDCB3: 0x00000000
> [    7.725697] marvell-nfc pxa3xx-nand: 
> [    7.725697] NDCR:  0xdd079fff
> [    7.725697] NDCB0: 0x000d3000
> [    7.725697] NDCB1: 0x51c10000
> [    7.725697] NDCB2: 0x00000000
> [    7.725697] NDCB3: 0x00000000
> [    7.744674] marvell-nfc pxa3xx-nand: 
> [    7.744674] NDCR:  0x9d079fff
> [    7.744674] NDCB0: 0x000d3000
> [    7.744674] NDCB1: 0x51c10000
> [    7.744674] NDCB2: 0x00000000
> [    7.744674] NDCB3: 0x00000000
> [    7.763781] marvell-nfc pxa3xx-nand: 
> [    7.763781] NDCR:  0xdd079fff
> [    7.763781] NDCB0: 0x000d3000
> [    7.763781] NDCB1: 0x52000000
> [    7.763781] NDCB2: 0x00000000
> [    7.763781] NDCB3: 0x00000000
> [    7.782838] marvell-nfc pxa3xx-nand: 
> [    7.782838] NDCR:  0xdd079fff
> [    7.782838] NDCB0: 0x000d3000
> [    7.782838] NDCB1: 0x52010000
> [    7.782838] NDCB2: 0x00000000
> [    7.782838] NDCB3: 0x00000000
> [    7.801814] marvell-nfc pxa3xx-nand: 
> [    7.801814] NDCR:  0x9d079fff
> [    7.801814] NDCB0: 0x000d3000
> [    7.801814] NDCB1: 0x52010000
> [    7.801814] NDCB2: 0x00000000
> [    7.801814] NDCB3: 0x00000000
> [    7.820919] marvell-nfc pxa3xx-nand: 
> [    7.820919] NDCR:  0xdd079fff
> [    7.820919] NDCB0: 0x000d3000
> [    7.820919] NDCB1: 0x52400000
> [    7.820919] NDCB2: 0x00000000
> [    7.820919] NDCB3: 0x00000000
> [    7.839984] marvell-nfc pxa3xx-nand: 
> [    7.839984] NDCR:  0xdd079fff
> [    7.839984] NDCB0: 0x000d3000
> [    7.839984] NDCB1: 0x52410000
> [    7.839984] NDCB2: 0x00000000
> [    7.839984] NDCB3: 0x00000000
> [    7.858968] marvell-nfc pxa3xx-nand: 
> [    7.858968] NDCR:  0x9d079fff
> [    7.858968] NDCB0: 0x000d3000
> [    7.858968] NDCB1: 0x52410000
> [    7.858968] NDCB2: 0x00000000
> [    7.858968] NDCB3: 0x00000000
> [    7.878070] marvell-nfc pxa3xx-nand: 
> [    7.878070] NDCR:  0xdd079fff
> [    7.878070] NDCB0: 0x000d3000
> [    7.878070] NDCB1: 0x52800000
> [    7.878070] NDCB2: 0x00000000
> [    7.878070] NDCB3: 0x00000000
> [    7.897127] marvell-nfc pxa3xx-nand: 
> [    7.897127] NDCR:  0xdd079fff
> [    7.897127] NDCB0: 0x000d3000
> [    7.897127] NDCB1: 0x52810000
> [    7.897127] NDCB2: 0x00000000
> [    7.897127] NDCB3: 0x00000000
> [    7.916104] marvell-nfc pxa3xx-nand: 
> [    7.916104] NDCR:  0x9d079fff
> [    7.916104] NDCB0: 0x000d3000
> [    7.916104] NDCB1: 0x52810000
> [    7.916104] NDCB2: 0x00000000
> [    7.916104] NDCB3: 0x00000000
> [    7.935231] marvell-nfc pxa3xx-nand: 
> [    7.935231] NDCR:  0xdd079fff
> [    7.935231] NDCB0: 0x000d3000
> [    7.935231] NDCB1: 0x52c00000
> [    7.935231] NDCB2: 0x00000000
> [    7.935231] NDCB3: 0x00000000
> [    7.954292] marvell-nfc pxa3xx-nand: 
> [    7.954292] NDCR:  0xdd079fff
> [    7.954292] NDCB0: 0x000d3000
> [    7.954292] NDCB1: 0x52c10000
> [    7.954292] NDCB2: 0x00000000
> [    7.954292] NDCB3: 0x00000000
> [    7.973328] marvell-nfc pxa3xx-nand: 
> [    7.973328] NDCR:  0x9d079fff
> [    7.973328] NDCB0: 0x000d3000
> [    7.973328] NDCB1: 0x52c10000
> [    7.973328] NDCB2: 0x00000000
> [    7.973328] NDCB3: 0x00000000
> [    7.992424] marvell-nfc pxa3xx-nand: 
> [    7.992424] NDCR:  0xdd079fff
> [    7.992424] NDCB0: 0x000d3000
> [    7.992424] NDCB1: 0x53000000
> [    7.992424] NDCB2: 0x00000000
> [    7.992424] NDCB3: 0x00000000
> [    8.011485] marvell-nfc pxa3xx-nand: 
> [    8.011485] NDCR:  0xdd079fff
> [    8.011485] NDCB0: 0x000d3000
> [    8.011485] NDCB1: 0x53010000
> [    8.011485] NDCB2: 0x00000000
> [    8.011485] NDCB3: 0x00000000
> [    8.030479] marvell-nfc pxa3xx-nand: 
> [    8.030479] NDCR:  0x9d079fff
> [    8.030479] NDCB0: 0x000d3000
> [    8.030479] NDCB1: 0x53010000
> [    8.030479] NDCB2: 0x00000000
> [    8.030479] NDCB3: 0x00000000
> [    8.049579] marvell-nfc pxa3xx-nand: 
> [    8.049579] NDCR:  0xdd079fff
> [    8.049579] NDCB0: 0x000d3000
> [    8.049579] NDCB1: 0x53400000
> [    8.049579] NDCB2: 0x00000000
> [    8.049579] NDCB3: 0x00000000
> [    8.068643] marvell-nfc pxa3xx-nand: 
> [    8.068643] NDCR:  0xdd079fff
> [    8.068643] NDCB0: 0x000d3000
> [    8.068643] NDCB1: 0x53410000
> [    8.068643] NDCB2: 0x00000000
> [    8.068643] NDCB3: 0x00000000
> [    8.087618] marvell-nfc pxa3xx-nand: 
> [    8.087618] NDCR:  0x9d079fff
> [    8.087618] NDCB0: 0x000d3000
> [    8.087618] NDCB1: 0x53410000
> [    8.087618] NDCB2: 0x00000000
> [    8.087618] NDCB3: 0x00000000
> [    8.107355] marvell-nfc pxa3xx-nand: 
> [    8.107355] NDCR:  0xdd079fff
> [    8.107355] NDCB0: 0x000d3000
> [    8.107355] NDCB1: 0x53800000
> [    8.107355] NDCB2: 0x00000000
> [    8.107355] NDCB3: 0x00000000
> [    8.126458] marvell-nfc pxa3xx-nand: 
> [    8.126458] NDCR:  0xdd079fff
> [    8.126458] NDCB0: 0x000d3000
> [    8.126458] NDCB1: 0x53810000
> [    8.126458] NDCB2: 0x00000000
> [    8.126458] NDCB3: 0x00000000
> [    8.145438] marvell-nfc pxa3xx-nand: 
> [    8.145438] NDCR:  0x9d079fff
> [    8.145438] NDCB0: 0x000d3000
> [    8.145438] NDCB1: 0x53810000
> [    8.145438] NDCB2: 0x00000000
> [    8.145438] NDCB3: 0x00000000
> [    8.164543] marvell-nfc pxa3xx-nand: 
> [    8.164543] NDCR:  0xdd079fff
> [    8.164543] NDCB0: 0x000d3000
> [    8.164543] NDCB1: 0x53c00000
> [    8.164543] NDCB2: 0x00000000
> [    8.164543] NDCB3: 0x00000000
> [    8.183607] marvell-nfc pxa3xx-nand: 
> [    8.183607] NDCR:  0xdd079fff
> [    8.183607] NDCB0: 0x000d3000
> [    8.183607] NDCB1: 0x53c10000
> [    8.183607] NDCB2: 0x00000000
> [    8.183607] NDCB3: 0x00000000
> [    8.202574] marvell-nfc pxa3xx-nand: 
> [    8.202574] NDCR:  0x9d079fff
> [    8.202574] NDCB0: 0x000d3000
> [    8.202574] NDCB1: 0x53c10000
> [    8.202574] NDCB2: 0x00000000
> [    8.202574] NDCB3: 0x00000000
> [    8.221680] marvell-nfc pxa3xx-nand: 
> [    8.221680] NDCR:  0xdd079fff
> [    8.221680] NDCB0: 0x000d3000
> [    8.221680] NDCB1: 0x54000000
> [    8.221680] NDCB2: 0x00000000
> [    8.221680] NDCB3: 0x00000000
> [    8.240741] marvell-nfc pxa3xx-nand: 
> [    8.240741] NDCR:  0xdd079fff
> [    8.240741] NDCB0: 0x000d3000
> [    8.240741] NDCB1: 0x54010000
> [    8.240741] NDCB2: 0x00000000
> [    8.240741] NDCB3: 0x00000000
> [    8.259723] marvell-nfc pxa3xx-nand: 
> [    8.259723] NDCR:  0x9d079fff
> [    8.259723] NDCB0: 0x000d3000
> [    8.259723] NDCB1: 0x54010000
> [    8.259723] NDCB2: 0x00000000
> [    8.259723] NDCB3: 0x00000000
> [    8.278825] marvell-nfc pxa3xx-nand: 
> [    8.278825] NDCR:  0xdd079fff
> [    8.278825] NDCB0: 0x000d3000
> [    8.278825] NDCB1: 0x54400000
> [    8.278825] NDCB2: 0x00000000
> [    8.278825] NDCB3: 0x00000000
> [    8.297889] marvell-nfc pxa3xx-nand: 
> [    8.297889] NDCR:  0xdd079fff
> [    8.297889] NDCB0: 0x000d3000
> [    8.297889] NDCB1: 0x54410000
> [    8.297889] NDCB2: 0x00000000
> [    8.297889] NDCB3: 0x00000000
> [    8.316863] marvell-nfc pxa3xx-nand: 
> [    8.316863] NDCR:  0x9d079fff
> [    8.316863] NDCB0: 0x000d3000
> [    8.316863] NDCB1: 0x54410000
> [    8.316863] NDCB2: 0x00000000
> [    8.316863] NDCB3: 0x00000000
> [    8.335976] marvell-nfc pxa3xx-nand: 
> [    8.335976] NDCR:  0xdd079fff
> [    8.335976] NDCB0: 0x000d3000
> [    8.335976] NDCB1: 0x55000000
> [    8.335976] NDCB2: 0x00000000
> [    8.335976] NDCB3: 0x00000000
> [    8.355035] marvell-nfc pxa3xx-nand: 
> [    8.355035] NDCR:  0xdd079fff
> [    8.355035] NDCB0: 0x000d3000
> [    8.355035] NDCB1: 0x55010000
> [    8.355035] NDCB2: 0x00000000
> [    8.355035] NDCB3: 0x00000000
> [    8.374007] marvell-nfc pxa3xx-nand: 
> [    8.374007] NDCR:  0x9d079fff
> [    8.374007] NDCB0: 0x000d3000
> [    8.374007] NDCB1: 0x55010000
> [    8.374007] NDCB2: 0x00000000
> [    8.374007] NDCB3: 0x00000000
> [    8.393202] marvell-nfc pxa3xx-nand: 
> [    8.393202] NDCR:  0xdd079fff
> [    8.393202] NDCB0: 0x000d3000
> [    8.393202] NDCB1: 0x55400000
> [    8.393202] NDCB2: 0x00000000
> [    8.393202] NDCB3: 0x00000000
> [    8.412235] marvell-nfc pxa3xx-nand: 
> [    8.412235] NDCR:  0xdd079fff
> [    8.412235] NDCB0: 0x000d3000
> [    8.412235] NDCB1: 0x55410000
> [    8.412235] NDCB2: 0x00000000
> [    8.412235] NDCB3: 0x00000000
> [    8.431217] marvell-nfc pxa3xx-nand: 
> [    8.431217] NDCR:  0x9d079fff
> [    8.431217] NDCB0: 0x000d3000
> [    8.431217] NDCB1: 0x55410000
> [    8.431217] NDCB2: 0x00000000
> [    8.431217] NDCB3: 0x00000000
> [    8.450325] marvell-nfc pxa3xx-nand: 
> [    8.450325] NDCR:  0xdd079fff
> [    8.450325] NDCB0: 0x000d3000
> [    8.450325] NDCB1: 0x55800000
> [    8.450325] NDCB2: 0x00000000
> [    8.450325] NDCB3: 0x00000000
> [    8.469388] marvell-nfc pxa3xx-nand: 
> [    8.469388] NDCR:  0xdd079fff
> [    8.469388] NDCB0: 0x000d3000
> [    8.469388] NDCB1: 0x55810000
> [    8.469388] NDCB2: 0x00000000
> [    8.469388] NDCB3: 0x00000000
> [    8.488366] marvell-nfc pxa3xx-nand: 
> [    8.488366] NDCR:  0x9d079fff
> [    8.488366] NDCB0: 0x000d3000
> [    8.488366] NDCB1: 0x55810000
> [    8.488366] NDCB2: 0x00000000
> [    8.488366] NDCB3: 0x00000000
> [    8.507471] marvell-nfc pxa3xx-nand: 
> [    8.507471] NDCR:  0xdd079fff
> [    8.507471] NDCB0: 0x000d3000
> [    8.507471] NDCB1: 0x55c00000
> [    8.507471] NDCB2: 0x00000000
> [    8.507471] NDCB3: 0x00000000
> [    8.526556] marvell-nfc pxa3xx-nand: 
> [    8.526556] NDCR:  0xdd079fff
> [    8.526556] NDCB0: 0x000d3000
> [    8.526556] NDCB1: 0x55c10000
> [    8.526556] NDCB2: 0x00000000
> [    8.526556] NDCB3: 0x00000000
> [    8.545537] marvell-nfc pxa3xx-nand: 
> [    8.545537] NDCR:  0x9d079fff
> [    8.545537] NDCB0: 0x000d3000
> [    8.545537] NDCB1: 0x55c10000
> [    8.545537] NDCB2: 0x00000000
> [    8.545537] NDCB3: 0x00000000
> [    8.564641] marvell-nfc pxa3xx-nand: 
> [    8.564641] NDCR:  0xdd079fff
> [    8.564641] NDCB0: 0x000d3000
> [    8.564641] NDCB1: 0x56000000
> [    8.564641] NDCB2: 0x00000000
> [    8.564641] NDCB3: 0x00000000
> [    8.583703] marvell-nfc pxa3xx-nand: 
> [    8.583703] NDCR:  0xdd079fff
> [    8.583703] NDCB0: 0x000d3000
> [    8.583703] NDCB1: 0x56010000
> [    8.583703] NDCB2: 0x00000000
> [    8.583703] NDCB3: 0x00000000
> [    8.602671] marvell-nfc pxa3xx-nand: 
> [    8.602671] NDCR:  0x9d079fff
> [    8.602671] NDCB0: 0x000d3000
> [    8.602671] NDCB1: 0x56010000
> [    8.602671] NDCB2: 0x00000000
> [    8.602671] NDCB3: 0x00000000
> [    8.621771] marvell-nfc pxa3xx-nand: 
> [    8.621771] NDCR:  0xdd079fff
> [    8.621771] NDCB0: 0x000d3000
> [    8.621771] NDCB1: 0x56400000
> [    8.621771] NDCB2: 0x00000000
> [    8.621771] NDCB3: 0x00000000
> [    8.640836] marvell-nfc pxa3xx-nand: 
> [    8.640836] NDCR:  0xdd079fff
> [    8.640836] NDCB0: 0x000d3000
> [    8.640836] NDCB1: 0x56410000
> [    8.640836] NDCB2: 0x00000000
> [    8.640836] NDCB3: 0x00000000
> [    8.659821] marvell-nfc pxa3xx-nand: 
> [    8.659821] NDCR:  0x9d079fff
> [    8.659821] NDCB0: 0x000d3000
> [    8.659821] NDCB1: 0x56410000
> [    8.659821] NDCB2: 0x00000000
> [    8.659821] NDCB3: 0x00000000
> [    8.678923] marvell-nfc pxa3xx-nand: 
> [    8.678923] NDCR:  0xdd079fff
> [    8.678923] NDCB0: 0x000d3000
> [    8.678923] NDCB1: 0x56800000
> [    8.678923] NDCB2: 0x00000000
> [    8.678923] NDCB3: 0x00000000
> [    8.697987] marvell-nfc pxa3xx-nand: 
> [    8.697987] NDCR:  0xdd079fff
> [    8.697987] NDCB0: 0x000d3000
> [    8.697987] NDCB1: 0x56810000
> [    8.697987] NDCB2: 0x00000000
> [    8.697987] NDCB3: 0x00000000
> [    8.716967] marvell-nfc pxa3xx-nand: 
> [    8.716967] NDCR:  0x9d079fff
> [    8.716967] NDCB0: 0x000d3000
> [    8.716967] NDCB1: 0x56810000
> [    8.716967] NDCB2: 0x00000000
> [    8.716967] NDCB3: 0x00000000
> [    8.736068] marvell-nfc pxa3xx-nand: 
> [    8.736068] NDCR:  0xdd079fff
> [    8.736068] NDCB0: 0x000d3000
> [    8.736068] NDCB1: 0x56c00000
> [    8.736068] NDCB2: 0x00000000
> [    8.736068] NDCB3: 0x00000000
> [    8.755122] marvell-nfc pxa3xx-nand: 
> [    8.755122] NDCR:  0xdd079fff
> [    8.755122] NDCB0: 0x000d3000
> [    8.755122] NDCB1: 0x56c10000
> [    8.755122] NDCB2: 0x00000000
> [    8.755122] NDCB3: 0x00000000
> [    8.774101] marvell-nfc pxa3xx-nand: 
> [    8.774101] NDCR:  0x9d079fff
> [    8.774101] NDCB0: 0x000d3000
> [    8.774101] NDCB1: 0x56c10000
> [    8.774101] NDCB2: 0x00000000
> [    8.774101] NDCB3: 0x00000000
> [    8.793417] marvell-nfc pxa3xx-nand: 
> [    8.793417] NDCR:  0xdd079fff
> [    8.793417] NDCB0: 0x000d3000
> [    8.793417] NDCB1: 0x57000000
> [    8.793417] NDCB2: 0x00000000
> [    8.793417] NDCB3: 0x00000000
> [    8.812493] marvell-nfc pxa3xx-nand: 
> [    8.812493] NDCR:  0xdd079fff
> [    8.812493] NDCB0: 0x000d3000
> [    8.812493] NDCB1: 0x57010000
> [    8.812493] NDCB2: 0x00000000
> [    8.812493] NDCB3: 0x00000000
> [    8.831475] marvell-nfc pxa3xx-nand: 
> [    8.831475] NDCR:  0x9d079fff
> [    8.831475] NDCB0: 0x000d3000
> [    8.831475] NDCB1: 0x57010000
> [    8.831475] NDCB2: 0x00000000
> [    8.831475] NDCB3: 0x00000000
> [    8.850578] marvell-nfc pxa3xx-nand: 
> [    8.850578] NDCR:  0xdd079fff
> [    8.850578] NDCB0: 0x000d3000
> [    8.850578] NDCB1: 0x57400000
> [    8.850578] NDCB2: 0x00000000
> [    8.850578] NDCB3: 0x00000000
> [    8.869639] marvell-nfc pxa3xx-nand: 
> [    8.869639] NDCR:  0xdd079fff
> [    8.869639] NDCB0: 0x000d3000
> [    8.869639] NDCB1: 0x57410000
> [    8.869639] NDCB2: 0x00000000
> [    8.869639] NDCB3: 0x00000000
> [    8.888614] marvell-nfc pxa3xx-nand: 
> [    8.888614] NDCR:  0x9d079fff
> [    8.888614] NDCB0: 0x000d3000
> [    8.888614] NDCB1: 0x57410000
> [    8.888614] NDCB2: 0x00000000
> [    8.888614] NDCB3: 0x00000000
> [    8.907721] marvell-nfc pxa3xx-nand: 
> [    8.907721] NDCR:  0xdd079fff
> [    8.907721] NDCB0: 0x000d3000
> [    8.907721] NDCB1: 0x57c00000
> [    8.907721] NDCB2: 0x00000000
> [    8.907721] NDCB3: 0x00000000
> [    8.926778] marvell-nfc pxa3xx-nand: 
> [    8.926778] NDCR:  0xdd079fff
> [    8.926778] NDCB0: 0x000d3000
> [    8.926778] NDCB1: 0x57c10000
> [    8.926778] NDCB2: 0x00000000
> [    8.926778] NDCB3: 0x00000000
> [    8.945755] marvell-nfc pxa3xx-nand: 
> [    8.945755] NDCR:  0x9d079fff
> [    8.945755] NDCB0: 0x000d3000
> [    8.945755] NDCB1: 0x57c10000
> [    8.945755] NDCB2: 0x00000000
> [    8.945755] NDCB3: 0x00000000
> [    8.964856] marvell-nfc pxa3xx-nand: 
> [    8.964856] NDCR:  0xdd079fff
> [    8.964856] NDCB0: 0x000d3000
> [    8.964856] NDCB1: 0x58000000
> [    8.964856] NDCB2: 0x00000000
> [    8.964856] NDCB3: 0x00000000
> [    8.983915] marvell-nfc pxa3xx-nand: 
> [    8.983915] NDCR:  0xdd079fff
> [    8.983915] NDCB0: 0x000d3000
> [    8.983915] NDCB1: 0x58010000
> [    8.983915] NDCB2: 0x00000000
> [    8.983915] NDCB3: 0x00000000
> [    9.002886] marvell-nfc pxa3xx-nand: 
> [    9.002886] NDCR:  0x9d079fff
> [    9.002886] NDCB0: 0x000d3000
> [    9.002886] NDCB1: 0x58010000
> [    9.002886] NDCB2: 0x00000000
> [    9.002886] NDCB3: 0x00000000
> [    9.022075] marvell-nfc pxa3xx-nand: 
> [    9.022075] NDCR:  0xdd079fff
> [    9.022075] NDCB0: 0x000d3000
> [    9.022075] NDCB1: 0x58400000
> [    9.022075] NDCB2: 0x00000000
> [    9.022075] NDCB3: 0x00000000
> [    9.041141] marvell-nfc pxa3xx-nand: 
> [    9.041141] NDCR:  0xdd079fff
> [    9.041141] NDCB0: 0x000d3000
> [    9.041141] NDCB1: 0x58410000
> [    9.041141] NDCB2: 0x00000000
> [    9.041141] NDCB3: 0x00000000
> [    9.060123] marvell-nfc pxa3xx-nand: 
> [    9.060123] NDCR:  0x9d079fff
> [    9.060123] NDCB0: 0x000d3000
> [    9.060123] NDCB1: 0x58410000
> [    9.060123] NDCB2: 0x00000000
> [    9.060123] NDCB3: 0x00000000
> [    9.079435] ubi0: scanning is finished
> [    9.083567] ubi0 error: ubi_read_volume_table: the layout volume was not found
> [    9.090953] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
> [    9.098457] UBI error: cannot attach mtd5
> [    9.103950] pxa-rtc pxa-rtc: setting system clock to 2000-01-01 00:00:34 UTC (946684834)
> [    9.187568] smc91x smc91x.0 eth0: link down
> [   11.136140] smc91x smc91x.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
> [   11.193199] IP-Config: Complete:
> [   11.196554]      device=eth0, hwaddr=00:0e:0c:a7:26:f7, ipaddr=192.168.1.232, mask=255.255.255.0, gw=255.255.255.255
> [   11.207229]      host=192.168.1.232, domain=, nis-domain=(none)
> [   11.213278]      bootserver=192.168.1.5, rootserver=192.168.1.5, rootpath=
> [   11.221532] ALSA device list:
> [   11.224983]   #0: Zylonite
> [   11.250472] Freeing unused kernel memory: 2396K
> [   11.255419] This architecture does not have kernel memory protection.
> Starting logging: OK
> Loading all the available modules: modprobe: module smc91x not found in modules.dep
> modprobe: module soundcore not found in modules.dep
> modprobe: module snd not found in modules.dep
> modprobe: module snd-pcm not found in modules.dep
> modprobe: module fat not found in modules.dep
> modprobe: module vfat not found in modules.dep
> modprobe: module nfs not found in modules.dep
> modprobe: module nls_cp437 not found in modules.dep
> modprobe: module nls_cp850 not found in modules.dep
> modprobe: module nls_ascii not found in modules.dep
> modprobe: module nls_utf8 not found in modules.dep
> modprobe: module fixed not found in modules.dep
> modprobe: module pwm-pxa not found in modules.dep
> modprobe: module cpufreq_conservative not found in modules.dep
> modprobe: module cpufreq_powersave not found in modules.dep
> modprobe: module cpufreq-dt not found in modules.dep
> modprobe: module btusb not found in modules.dep
> modprobe: module i2c-dev not found in modules.dep
> modprobe: module ubi not found in modules.dep
> modprobe: module mt_blkdevs not found in modules.dep
> modprobe: module pxa3xx_nand not found in modules.dep
> modprobe: module mtdblock not found in modules.dep
> modprobe: module ofpart not found in modules.dep
> modprobe: module map_rom not found in modules.dep
> modprobe: module jedec_probe not found in modules.dep
> modprobe: module cmdlinepart not found in modules.dep
> modprobe: module redboot not found in modules.dep
> modprobe: module loop not found in modules.dep
> modprobe: module leds-gpio not found in modules.dep
> modprobe: module jedec-class not found in modules.dep
> modprobe: module pxa not found in modules.dep
> modprobe: module evdev not found in modules.dep
> modprobe: module soc_common not found in modules.dep
> modprobe: module pwm_bl not found in modules.dep
> modprobe: module fbcon not found in modules.dep
> modprobe: module rtc-pxa not found in modules.dep
> modprobe: module rtc-sa1100 not found in modules.dep
> modprobe: module smc91x not found in modules.dep
> modprobe: module pda_power not found in modules.dep
> modprobe: module fixed not found in modules.dep
> KO
> OK
> Changing smcs91x MAC address to 08:00:3e:26:0a:5b: ifconfig: SIOCSIFHWADDR: Device or resource busy
> KO
> OK
> Initializing random number generator... done.
> Starting network...
> ip: RTNETLINK answers: File exists
> udhcpc (v1.24.1) started
> Sending discover...
> Sending select for 192.168.1.232...
> Lease of 192.168.1.232 obtained, lease time 86400
> deleting routers
> adding dns 192.168.1.1
> Starting dropbear sshd: OK
> 
> Welcome to Buildroot
> zylonite login: 

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-03 20:10                                         ` Boris Brezillon
@ 2018-01-03 20:52                                           ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-03 20:52 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

On Wed, 3 Jan 2018 21:10:28 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> On Wed, 03 Jan 2018 20:58:29 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> 
> > Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> >   
> > > On Tue, 02 Jan 2018 20:21:09 +0100
> > > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> > >    
> > >> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> > >>     
> > >> > I think the ECC issue you faced was related to pages being written
> > >> > *and* empty. If this guess is right, the board should boot fine with
> > >> > these changes.
> > >> >
> > >> > Otherwise, please add the DEBUG define as before in both the core
> > >> > and the driver and do not hesitate to add another dump_stack()
> > >> > where it crashes (if applicable).      
> > >> 
> > >> The problem looks still the same :
> > >> [    3.560163] Bad block table not found for chip 0    
> > >
> > > Mmmmh ok.
> > >
> > > Can you please add this patch:
> > > http://code.bulix.org/61at9p-254626    
> > 
> > Well, it looks a bit better, see attached log in [1].
> > Now the BBT is detected ...
> > [    3.310841] Bad block table found at page 131008, version 0x01
> > ...
> > [    3.354944] Bad block table found at page 130944, version 0x01
> > 
> > But all blocks are considered bad ... as if the bit logic was inverted for the
> > meaning of "bad" or "good" block, see :
> > [    3.379825] nand_read_bbt: bad block at 0x000000000000  
> 
> Hm, that's weird. Can you try with the old driver (pxa3xx)?

Alternatively, you can type 'nand bad' from uboot to check if it
detects the same bad blocks.

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-03 20:52                                           ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-03 20:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 3 Jan 2018 21:10:28 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> On Wed, 03 Jan 2018 20:58:29 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> 
> > Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> >   
> > > On Tue, 02 Jan 2018 20:21:09 +0100
> > > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> > >    
> > >> Miquel RAYNAL <miquel.raynal@free-electrons.com> writes:
> > >>     
> > >> > I think the ECC issue you faced was related to pages being written
> > >> > *and* empty. If this guess is right, the board should boot fine with
> > >> > these changes.
> > >> >
> > >> > Otherwise, please add the DEBUG define as before in both the core
> > >> > and the driver and do not hesitate to add another dump_stack()
> > >> > where it crashes (if applicable).      
> > >> 
> > >> The problem looks still the same :
> > >> [    3.560163] Bad block table not found for chip 0    
> > >
> > > Mmmmh ok.
> > >
> > > Can you please add this patch:
> > > http://code.bulix.org/61at9p-254626    
> > 
> > Well, it looks a bit better, see attached log in [1].
> > Now the BBT is detected ...
> > [    3.310841] Bad block table found at page 131008, version 0x01
> > ...
> > [    3.354944] Bad block table found at page 130944, version 0x01
> > 
> > But all blocks are considered bad ... as if the bit logic was inverted for the
> > meaning of "bad" or "good" block, see :
> > [    3.379825] nand_read_bbt: bad block at 0x000000000000  
> 
> Hm, that's weird. Can you try with the old driver (pxa3xx)?

Alternatively, you can type 'nand bad' from uboot to check if it
detects the same bad blocks.

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-03 20:52                                           ` Boris Brezillon
@ 2018-01-07 20:55                                             ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2018-01-07 20:55 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Miquel RAYNAL, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

> On Wed, 3 Jan 2018 21:10:28 +0100
> Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
>> Hm, that's weird. Can you try with the old driver (pxa3xx)?
Ah you're right, my NAND was damaged ...

> Alternatively, you can type 'nand bad' from uboot to check if it
> detects the same bad blocks.
Mmmh no, the SPL is barebox in my case. Do you have a command in linux or
barebox to do the same thing ?

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-07 20:55                                             ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2018-01-07 20:55 UTC (permalink / raw)
  To: linux-arm-kernel

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

> On Wed, 3 Jan 2018 21:10:28 +0100
> Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
>> Hm, that's weird. Can you try with the old driver (pxa3xx)?
Ah you're right, my NAND was damaged ...

> Alternatively, you can type 'nand bad' from uboot to check if it
> detects the same bad blocks.
Mmmh no, the SPL is barebox in my case. Do you have a command in linux or
barebox to do the same thing ?

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-07 20:55                                             ` Robert Jarzmik
@ 2018-01-07 21:09                                               ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-07 21:09 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Hi Robert,

On Sun, 07 Jan 2018 21:55:33 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> > On Wed, 3 Jan 2018 21:10:28 +0100
> > Boris Brezillon <boris.brezillon@free-electrons.com> wrote:  
> >> Hm, that's weird. Can you try with the old driver (pxa3xx)?  
> Ah you're right, my NAND was damaged ...
> 
> > Alternatively, you can type 'nand bad' from uboot to check if it
> > detects the same bad blocks.  
> Mmmh no, the SPL is barebox in my case. Do you have a command in
> linux or barebox to do the same thing ?

Not sure, but nand -i should do the trick.
https://www.barebox.org/doc/latest/commands/hwmanip/nand.html

But I am not sure this is still relevant now we know the NAND was
damaged by the previous experiments (sorry about that). Can you put the
NAND in a clean state and report us if it is still failing?

Thanks for your help,
Miquèl

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-07 21:09                                               ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-07 21:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Robert,

On Sun, 07 Jan 2018 21:55:33 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> > On Wed, 3 Jan 2018 21:10:28 +0100
> > Boris Brezillon <boris.brezillon@free-electrons.com> wrote:  
> >> Hm, that's weird. Can you try with the old driver (pxa3xx)?  
> Ah you're right, my NAND was damaged ...
> 
> > Alternatively, you can type 'nand bad' from uboot to check if it
> > detects the same bad blocks.  
> Mmmh no, the SPL is barebox in my case. Do you have a command in
> linux or barebox to do the same thing ?

Not sure, but nand -i should do the trick.
https://www.barebox.org/doc/latest/commands/hwmanip/nand.html

But I am not sure this is still relevant now we know the NAND was
damaged by the previous experiments (sorry about that). Can you put the
NAND in a clean state and report us if it is still failing?

Thanks for your help,
Miqu?l

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-07 21:09                                               ` Miquel RAYNAL
@ 2018-01-07 21:19                                                 ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-07 21:19 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Robert Jarzmik, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

On Sun, 7 Jan 2018 22:09:11 +0100
Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:

> Hi Robert,
> 
> On Sun, 07 Jan 2018 21:55:33 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> 
> > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> >   
> > > On Wed, 3 Jan 2018 21:10:28 +0100
> > > Boris Brezillon <boris.brezillon@free-electrons.com> wrote:    
> > >> Hm, that's weird. Can you try with the old driver (pxa3xx)?    
> > Ah you're right, my NAND was damaged ...
> >   
> > > Alternatively, you can type 'nand bad' from uboot to check if it
> > > detects the same bad blocks.    
> > Mmmh no, the SPL is barebox in my case. Do you have a command in
> > linux or barebox to do the same thing ?  
> 
> Not sure, but nand -i should do the trick.
> https://www.barebox.org/doc/latest/commands/hwmanip/nand.html
> 
> But I am not sure this is still relevant now we know the NAND was
> damaged by the previous experiments (sorry about that). Can you put the
> NAND in a clean state and report us if it is still failing?

In order to do that you'll have to scrub the blocks storing the BBT, and
I'm not sure barebox supports that. Linux does not, for sure, so if you
want to forcibly erase bad blocks from linux, you'll have to comment
these lines [1].

[1]http://elixir.free-electrons.com/linux/v4.15-rc6/source/drivers/mtd/nand/nand_base.c#L3056

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-07 21:19                                                 ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-07 21:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 7 Jan 2018 22:09:11 +0100
Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:

> Hi Robert,
> 
> On Sun, 07 Jan 2018 21:55:33 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> 
> > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> >   
> > > On Wed, 3 Jan 2018 21:10:28 +0100
> > > Boris Brezillon <boris.brezillon@free-electrons.com> wrote:    
> > >> Hm, that's weird. Can you try with the old driver (pxa3xx)?    
> > Ah you're right, my NAND was damaged ...
> >   
> > > Alternatively, you can type 'nand bad' from uboot to check if it
> > > detects the same bad blocks.    
> > Mmmh no, the SPL is barebox in my case. Do you have a command in
> > linux or barebox to do the same thing ?  
> 
> Not sure, but nand -i should do the trick.
> https://www.barebox.org/doc/latest/commands/hwmanip/nand.html
> 
> But I am not sure this is still relevant now we know the NAND was
> damaged by the previous experiments (sorry about that). Can you put the
> NAND in a clean state and report us if it is still failing?

In order to do that you'll have to scrub the blocks storing the BBT, and
I'm not sure barebox supports that. Linux does not, for sure, so if you
want to forcibly erase bad blocks from linux, you'll have to comment
these lines [1].

[1]http://elixir.free-electrons.com/linux/v4.15-rc6/source/drivers/mtd/nand/nand_base.c#L3056

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-07 21:19                                                 ` Boris Brezillon
@ 2018-01-07 21:26                                                   ` Boris Brezillon
  -1 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-07 21:26 UTC (permalink / raw)
  To: Miquel RAYNAL
  Cc: Robert Jarzmik, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

On Sun, 7 Jan 2018 22:19:11 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> On Sun, 7 Jan 2018 22:09:11 +0100
> Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:
> 
> > Hi Robert,
> > 
> > On Sun, 07 Jan 2018 21:55:33 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> >   
> > > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> > >     
> > > > On Wed, 3 Jan 2018 21:10:28 +0100
> > > > Boris Brezillon <boris.brezillon@free-electrons.com> wrote:      
> > > >> Hm, that's weird. Can you try with the old driver (pxa3xx)?      
> > > Ah you're right, my NAND was damaged ...
> > >     
> > > > Alternatively, you can type 'nand bad' from uboot to check if it
> > > > detects the same bad blocks.      
> > > Mmmh no, the SPL is barebox in my case. Do you have a command in
> > > linux or barebox to do the same thing ?    
> > 
> > Not sure, but nand -i should do the trick.
> > https://www.barebox.org/doc/latest/commands/hwmanip/nand.html
> > 
> > But I am not sure this is still relevant now we know the NAND was
> > damaged by the previous experiments (sorry about that). Can you put the
> > NAND in a clean state and report us if it is still failing?  
> 
> In order to do that you'll have to scrub the blocks storing the BBT, and
> I'm not sure barebox supports that. Linux does not, for sure, so if you
> want to forcibly erase bad blocks from linux, you'll have to comment
> these lines [1].

Apparently there's a "nand -g <offs>" command to mark a block good in
barebox. After doing that you should be able to erase the blocks storing
the BBT (it should be placed in the last 2 blocks of the NAND).

> 
> [1]http://elixir.free-electrons.com/linux/v4.15-rc6/source/drivers/mtd/nand/nand_base.c#L3056

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-07 21:26                                                   ` Boris Brezillon
  0 siblings, 0 replies; 126+ messages in thread
From: Boris Brezillon @ 2018-01-07 21:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 7 Jan 2018 22:19:11 +0100
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> On Sun, 7 Jan 2018 22:09:11 +0100
> Miquel RAYNAL <miquel.raynal@free-electrons.com> wrote:
> 
> > Hi Robert,
> > 
> > On Sun, 07 Jan 2018 21:55:33 +0100
> > Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> >   
> > > Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> > >     
> > > > On Wed, 3 Jan 2018 21:10:28 +0100
> > > > Boris Brezillon <boris.brezillon@free-electrons.com> wrote:      
> > > >> Hm, that's weird. Can you try with the old driver (pxa3xx)?      
> > > Ah you're right, my NAND was damaged ...
> > >     
> > > > Alternatively, you can type 'nand bad' from uboot to check if it
> > > > detects the same bad blocks.      
> > > Mmmh no, the SPL is barebox in my case. Do you have a command in
> > > linux or barebox to do the same thing ?    
> > 
> > Not sure, but nand -i should do the trick.
> > https://www.barebox.org/doc/latest/commands/hwmanip/nand.html
> > 
> > But I am not sure this is still relevant now we know the NAND was
> > damaged by the previous experiments (sorry about that). Can you put the
> > NAND in a clean state and report us if it is still failing?  
> 
> In order to do that you'll have to scrub the blocks storing the BBT, and
> I'm not sure barebox supports that. Linux does not, for sure, so if you
> want to forcibly erase bad blocks from linux, you'll have to comment
> these lines [1].

Apparently there's a "nand -g <offs>" command to mark a block good in
barebox. After doing that you should be able to erase the blocks storing
the BBT (it should be placed in the last 2 blocks of the NAND).

> 
> [1]http://elixir.free-electrons.com/linux/v4.15-rc6/source/drivers/mtd/nand/nand_base.c#L3056

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-03 20:52                                           ` Boris Brezillon
@ 2018-01-09  7:57                                             ` Robert Jarzmik
  -1 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2018-01-09  7:57 UTC (permalink / raw)
  To: Boris Brezillon, Miquel RAYNAL
  Cc: David Woodhouse, Brian Norris, Ezequiel Garcia, linux-mtd,
	linux-arm-kernel

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

Ok I recovered my NAND.

For the next try, I'd like you to provide another "temporary patch" to disable
BBT actual writing, just to be sure. Once the driver is working properly, I'll
make another try without the temporary patch.

Tell me when a branch I can pull is ready.

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-09  7:57                                             ` Robert Jarzmik
  0 siblings, 0 replies; 126+ messages in thread
From: Robert Jarzmik @ 2018-01-09  7:57 UTC (permalink / raw)
  To: linux-arm-kernel

Boris Brezillon <boris.brezillon@free-electrons.com> writes:

Ok I recovered my NAND.

For the next try, I'd like you to provide another "temporary patch" to disable
BBT actual writing, just to be sure. Once the driver is working properly, I'll
make another try without the temporary patch.

Tell me when a branch I can pull is ready.

Cheers.

-- 
Robert

^ permalink raw reply	[flat|nested] 126+ messages in thread

* Re: [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
  2018-01-09  7:57                                             ` Robert Jarzmik
@ 2018-01-09 11:06                                               ` Miquel RAYNAL
  -1 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-09 11:06 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Boris Brezillon, David Woodhouse, Brian Norris, Ezequiel Garcia,
	linux-mtd, linux-arm-kernel

Hello Robert,

On Tue, 09 Jan 2018 08:57:59 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> Ok I recovered my NAND.
> 
> For the next try, I'd like you to provide another "temporary patch"
> to disable BBT actual writing, just to be sure. Once the driver is
> working properly, I'll make another try without the temporary patch.

The best way to do it is to avoid using the BBT at all, and while I was
looking for the right line to comment in the Zylonite's board file I
found out that the boolean flash_bbt is not actually set and then I
remembered an old mail from you, then you should:

----->8-----
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 0534949d63f6..d247ef01dc62 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -378,6 +378,8 @@ static struct mtd_partition
zylonite_nand_partitions[] = { static struct pxa3xx_nand_platform_data
zylonite_nand_info = { .parts		= zylonite_nand_partitions,
 	.nr_parts	= ARRAY_SIZE(zylonite_nand_partitions),
-	.flash_bbt	= 1,
	.keep_config	= 1,
 };
 
 static void __init zylonite_init_nand(void)
-----8<-----

Then, do not forget to resize the partition that stores the BBT to
remove the last 4 erase blocks from it to avoid UBI/UBIFS smashing it.

Then you should be fine.

You can test this branch (updated with last version I sent earlier):
https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc


Thanks,
Miquèl

^ permalink raw reply related	[flat|nested] 126+ messages in thread

* [PATCH 00/12] Marvell NAND controller rework with ->exec_op()
@ 2018-01-09 11:06                                               ` Miquel RAYNAL
  0 siblings, 0 replies; 126+ messages in thread
From: Miquel RAYNAL @ 2018-01-09 11:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Robert,

On Tue, 09 Jan 2018 08:57:59 +0100
Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
> Ok I recovered my NAND.
> 
> For the next try, I'd like you to provide another "temporary patch"
> to disable BBT actual writing, just to be sure. Once the driver is
> working properly, I'll make another try without the temporary patch.

The best way to do it is to avoid using the BBT at all, and while I was
looking for the right line to comment in the Zylonite's board file I
found out that the boolean flash_bbt is not actually set and then I
remembered an old mail from you, then you should:

----->8-----
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 0534949d63f6..d247ef01dc62 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -378,6 +378,8 @@ static struct mtd_partition
zylonite_nand_partitions[] = { static struct pxa3xx_nand_platform_data
zylonite_nand_info = { .parts		= zylonite_nand_partitions,
 	.nr_parts	= ARRAY_SIZE(zylonite_nand_partitions),
-	.flash_bbt	= 1,
	.keep_config	= 1,
 };
 
 static void __init zylonite_init_nand(void)
-----8<-----

Then, do not forget to resize the partition that stores the BBT to
remove the last 4 erase blocks from it to avoid UBI/UBIFS smashing it.

Then you should be fine.

You can test this branch (updated with last version I sent earlier):
https://github.com/miquelraynal/linux/tree/marvell/nand-next/nfc


Thanks,
Miqu?l

^ permalink raw reply related	[flat|nested] 126+ messages in thread

end of thread, other threads:[~2018-01-09 11:06 UTC | newest]

Thread overview: 126+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 20:18 [PATCH 00/12] Marvell NAND controller rework with ->exec_op() Miquel Raynal
2017-12-07 20:18 ` Miquel Raynal
2017-12-07 20:18 ` Miquel Raynal
     [not found] ` <20171207201814.30411-1-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-07 20:18   ` [PATCH 01/12] dt-bindings: mtd: add Marvell NAND controller documentation Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
     [not found]     ` <20171207201814.30411-2-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-08 20:56       ` Boris Brezillon
2017-12-08 20:56         ` Boris Brezillon
2017-12-08 20:56         ` Boris Brezillon
2017-12-07 20:18   ` [PATCH 02/12] mtd: nand: add reworked Marvell NAND controller driver Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
     [not found]     ` <20171207201814.30411-3-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-11 16:27       ` Ezequiel Garcia
2017-12-11 16:27         ` Ezequiel Garcia
     [not found]         ` <CAAEAJfC89bRugBsK8jrK=6fdq76yzjThA74UCAhAaVuonLLNvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-11 16:55           ` Miquel RAYNAL
2017-12-11 16:55             ` Miquel RAYNAL
2017-12-11 16:55             ` Miquel RAYNAL
2017-12-11 17:05             ` Boris Brezillon
2017-12-11 17:05               ` Boris Brezillon
2017-12-11 17:05               ` Boris Brezillon
2017-12-11 21:02               ` Miquel RAYNAL
2017-12-11 21:02                 ` Miquel RAYNAL
2017-12-11 21:02                 ` Miquel RAYNAL
2017-12-07 20:18   ` [PATCH 03/12] mtd: nand: replace pxa3xx_nand driver by its rework called marvell_nand Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 04/12] dt-bindings: mtd: remove pxa3xx NAND controller documentation Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 05/12] mtd: nand: remove useless fields from pxa3xx NAND platform data Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 06/12] ARM: dts: armada-370-xp: use reworked NAND controller driver Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 07/12] ARM: dts: armada-375: " Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 08/12] ARM: dts: armada-38x: " Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 09/12] ARM: dts: armada-39x: " Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 10/12] ARM: dts: pxa: " Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18   ` [PATCH 11/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 7K Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
     [not found]     ` <20171207201814.30411-12-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-15 10:29       ` Gregory CLEMENT
2017-12-15 10:29         ` Gregory CLEMENT
2017-12-15 10:29         ` Gregory CLEMENT
     [not found]         ` <87374cmghe.fsf-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-15 10:44           ` Gregory CLEMENT
2017-12-15 10:44             ` Gregory CLEMENT
2017-12-15 10:44             ` Gregory CLEMENT
2017-12-07 20:18   ` [PATCH 12/12] ARM64: dts: marvell: use reworked NAND controller driver on Armada 8K Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
2017-12-07 20:18     ` Miquel Raynal
     [not found]     ` <20171207201814.30411-13-miquel.raynal-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-15 10:29       ` Gregory CLEMENT
2017-12-15 10:29         ` Gregory CLEMENT
2017-12-15 10:29         ` Gregory CLEMENT
     [not found]         ` <87y3m4l1wi.fsf-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-12-15 10:44           ` Gregory CLEMENT
2017-12-15 10:44             ` Gregory CLEMENT
2017-12-15 10:44             ` Gregory CLEMENT
2017-12-09 23:27   ` [PATCH 00/12] Marvell NAND controller rework with ->exec_op() Ezequiel Garcia
2017-12-09 23:27     ` Ezequiel Garcia
2017-12-09 23:27     ` Ezequiel Garcia
2017-12-14  6:09   ` Boris Brezillon
2017-12-14  6:09     ` Boris Brezillon
2017-12-14  6:09     ` Boris Brezillon
2017-12-18  7:11     ` Robert Jarzmik
2017-12-18  7:11       ` Robert Jarzmik
2017-12-18  7:11       ` Robert Jarzmik
     [not found]       ` <877etkecig.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2017-12-18  8:25         ` Miquel RAYNAL
2017-12-18  8:25           ` Miquel RAYNAL
2017-12-18  8:25           ` Miquel RAYNAL
2017-12-20 21:26           ` Robert Jarzmik
2017-12-20 21:26             ` Robert Jarzmik
2017-12-20 21:26             ` Robert Jarzmik
     [not found]             ` <87y3lxccr7.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2017-12-20 21:41               ` Boris Brezillon
2017-12-20 21:41                 ` Boris Brezillon
2017-12-20 21:41                 ` Boris Brezillon
2017-12-22 20:11                 ` Robert Jarzmik
2017-12-22 20:11                   ` Robert Jarzmik
2017-12-22 20:11                   ` Robert Jarzmik
     [not found]                   ` <87lghucykr.fsf-4ty26DBLk+jEm7gnYqmdkQ@public.gmane.org>
2017-12-22 21:24                     ` Boris Brezillon
2017-12-22 21:24                       ` Boris Brezillon
2017-12-22 21:24                       ` Boris Brezillon
2017-12-22 22:37                       ` Miquel RAYNAL
2017-12-22 22:37                         ` Miquel RAYNAL
2017-12-22 22:37                         ` Miquel RAYNAL
2017-12-22 22:50                         ` Miquel RAYNAL
2017-12-22 22:50                           ` Miquel RAYNAL
2017-12-22 22:50                           ` Miquel RAYNAL
2017-12-23 13:42                         ` Robert Jarzmik
2017-12-23 13:42                           ` Robert Jarzmik
2017-12-23 14:57                           ` Miquel RAYNAL
2017-12-23 14:57                             ` Miquel RAYNAL
2017-12-23 17:14                             ` Robert Jarzmik
2017-12-23 17:14                               ` Robert Jarzmik
2017-12-23 22:42                               ` Miquel RAYNAL
2017-12-23 22:42                                 ` Miquel RAYNAL
2018-01-02 11:03                               ` Miquel RAYNAL
2018-01-02 11:03                                 ` Miquel RAYNAL
2018-01-02 19:21                                 ` Robert Jarzmik
2018-01-03  7:40                                   ` Miquel RAYNAL
2018-01-03  7:40                                     ` Miquel RAYNAL
2018-01-03 19:58                                     ` Robert Jarzmik
2018-01-03 19:58                                       ` Robert Jarzmik
2018-01-03 20:10                                       ` Boris Brezillon
2018-01-03 20:10                                         ` Boris Brezillon
2018-01-03 20:52                                         ` Boris Brezillon
2018-01-03 20:52                                           ` Boris Brezillon
2018-01-07 20:55                                           ` Robert Jarzmik
2018-01-07 20:55                                             ` Robert Jarzmik
2018-01-07 21:09                                             ` Miquel RAYNAL
2018-01-07 21:09                                               ` Miquel RAYNAL
2018-01-07 21:19                                               ` Boris Brezillon
2018-01-07 21:19                                                 ` Boris Brezillon
2018-01-07 21:26                                                 ` Boris Brezillon
2018-01-07 21:26                                                   ` Boris Brezillon
2018-01-09  7:57                                           ` Robert Jarzmik
2018-01-09  7:57                                             ` Robert Jarzmik
2018-01-09 11:06                                             ` Miquel RAYNAL
2018-01-09 11:06                                               ` Miquel RAYNAL

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.