+ All Categories
Home > Documents > Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add...

Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add...

Date post: 05-Jun-2018
Category:
Upload: lekiet
View: 218 times
Download: 0 times
Share this document with a friend
52
FOSDEM 2018 Understand your NAND and drive it within Linux Miqu` el Raynal Bootlin [email protected] © Copyright 2004-2018, Bootlin. Creative Commons BY-SA 3.0 license. Corrections, suggestions, contributions and translations are welcome! New name, same team Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 1/42
Transcript
Page 1: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

FOSDEM 2018

Understand your NANDand drive it within LinuxMiquel [email protected]

© Copyright 2004-2018, Bootlin.Creative Commons BY-SA 3.0 license.Corrections, suggestions, contributions and translations are welcome!

New name, same team

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 1/42

Page 2: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Miquel Raynal

I Embedded Linux engineer at Free Electrons → BootlinI Embedded Linux development: kernel and driver development, system integration,

boot time and power consumption optimization, consulting, etc.I Embedded Linux, Linux driver development, Yocto Project / OpenEmbedded and

Buildroot training courses, with materials freely available under a CreativeCommons license.

I https://bootlin.comI Contributions

I Active contributor to the NAND subsystemI Kernel support for various ARM SoCs

I Living in Toulouse, south west of France

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 2/42

Page 3: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

What is this talk about?

I Introduction to the basics of NAND flash memoryI How they are driven by the NAND controllerI Overview of the Linux memory stack, especially the new interface to drive NAND

controllers: ->exec_op()

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 3/42

Page 4: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Disclaimer

I I am not a NAND expert, more the NAND maintainer slaveI I will probably oversimplify some aspectsI This presentation is not about history nor NOR technologyI Focus on SLC NAND (Single Level Cell)

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 4/42

Page 5: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

The commercial minute

I Main purpose: replace hard disks drivesI Main goal: lowest cost per bitI Widely used in many consumer devices, embedded systems...I Flavors:

I Raw NAND / parallel NAND ⇐I Serial NAND (mostly over SPI)I Managed NAND with FTL (Flash Translation Layer)

I SD cardsI USB sticksI SSDI etc

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 5/42

Page 6: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Understand your NAND and drive it within Linux

Understanding the NAND memory cell

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 6/42

Page 7: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Back to school: Silicon

I Silicon, SiI Electrically balanced (neutral)I 14 electrons spread in 3 orbitsI 4 electrons in the valence shell → easy bonding with other Silicon atoms (crystal)

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 7/42

Page 8: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Back to school: electricity

I Electricity =⇒ free electronsI Silicon is almost an insulatorI Valence electron stroke by light → absorbs energy → jumps to the conduction bandI Free electrons drift randomly unless a voltage is applied → attracted to the + side

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 8/42

Page 9: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Back to school: doping

I Nothing to do with cyclingI Purpose of doping: enhance conductivity

I Add impurities (atoms with more or less valence electrons than Si)I Once bound with 4 Si atoms:

I 1 free electron ← N-dopingI 1 hole ← P-doping

I Still electrically neutral

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 9/42

Page 10: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

P-N junction: the diode

I Electrons close to the junction will jump to recombine with the closest holeI Creation of a barrier of potential: a non-crossable electric fieldI Depletion region thickness is modular

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 10/42

Page 11: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

P-N junction: the diode

I Electrons close to the junction will jump to recombine with the closest holeI Creation of a barrier of potential: a non-crossable electric fieldI Depletion region thickness is modular

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 10/42

Page 12: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Metal-Oxide-Semiconductor Field-Effect Transistor

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 11/42

Page 13: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Metal-Oxide-Semiconductor Field-Effect Transistor

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 11/42

Page 14: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Metal-Oxide-Semiconductor Field-Effect Transistor

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 11/42

Page 15: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Floating-gate transistor

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 12/42

Page 16: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Floating-gate transistor: reading a one

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 13/42

Page 17: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Floating-gate transistor: reading a zero

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 14/42

Page 18: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Programming a cell to a 0 state

I Change the charge of the floating-gateI No electrical contact → Fowler-Nordheim tunneling

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 15/42

Page 19: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Erasing a cell to a 1 state

I Reverse the electric fieldI Done by applying a high negative voltage on the control gate

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 16/42

Page 20: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Memory cell

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 17/42

Page 21: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND gate

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 18/42

Page 22: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND gate

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 18/42

Page 23: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND gate

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 18/42

Page 24: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Memory string

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 19/42

Page 25: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Memory string

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 19/42

Page 26: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Memory array

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 20/42

Page 27: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Memory array

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 20/42

Page 28: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Erasing

I High negative voltage → not that easy to produceI Bulk is the same for all cells → “eraseblock”

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 21/42

Page 29: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Main design flaw: bitflips

I Tunneling → stochastically distributedI Cells may not be fully erased/programmed

I Electrons without enough energy might get trapped, creating a depletion regionI Oxide becomes negative, preventing tunneling of the electrons if the barrier gets too

highI Data retention issue

I Writing/erasing moves electrons through the oxide layerI Electrons will dissipate their energy colliding with the material, damaging it

→ possible charge lossI Read/write disturbancesI ∼100k program/erase cycles with SLC NAND

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 22/42

Page 30: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Understand your NAND and drive it within Linux

Driving a NAND chip: the NAND controller

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 23/42

Page 31: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND bus

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 24/42

Page 32: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND protocol

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 25/42

Page 33: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND protocol (examples)

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 26/42

Page 34: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND controller

I Controllers are often embedded in a SoCI Diverse implementations, from the most simplest to highly sophisticated onesI Controller job: communicate with the NAND chip

I Can embed an ECC engine to handle bitflipsI Can embed advanced logic to optimize throughput

I Sequential accessesI Parallel die accesses

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 27/42

Page 35: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Understand your NAND and drive it within Linux

Dealing with NAND from Linux

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 28/42

Page 36: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Linux MTD stack

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 29/42

Page 37: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND legacy stack

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 30/42

Page 38: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

When there were still dinosaurs

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 31/42

Page 39: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Limitations of the old methods

I NAND controllers cannot handle such fine grain instructionsI NAND controller drivers started to overload ->cmdfunc(), which introduced new

issues:I Need for the IO length (not provided by ->cmdfunc()) → drivers started predicting

what the core “next move” would beI NAND operations evolve over the time → need to add support for vendor specific

operations → hard to maintain as support across the NAND controllers is notuniform at all → patch all the drivers for each operation addition in the core

I According to the NAND maintainer, vendors are creative“Why are they so mean to us?!” – Boris Brezillon, 04/01/2018

I NAND controller drivers have to re-implement everything → encourages people toimplement a minimal set of commands

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 32/42

Page 40: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Addressing these limitations: ->exec_op()

I Create a new interface that asks to execute the whole operationI Just a translation in NAND operations of the MTD layer orders

I Don’t try to be smart, logic should be in the NAND frameworkI Calls the controller ->exec_op() hook and pass it an array of instructions to

executeI Should fit most NAND controllers we already know aboutI Introduction in Linux v4.16 expectedI Marvell’s NAND controller driver migratedI More to come: FSMC, Sunxi, VF610, Arasan, MXC, Atmel...

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 33/42

Page 41: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

->exec_op() controller’s implementation

I When receiving an array of sequential instructions:I Parse the sequence

I Split in as much sub-operations as needed to perform the taskI Declare if the overall operation can be handled

I Otherwise return -ENOTSUPPI Simple controllers → trivial logicI More complex controllers → use the core’s parser

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 34/42

Page 42: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Parser

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 35/42

Page 43: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Patterns

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 36/42

Page 44: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Swipe right to match

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 37/42

Page 45: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

NAND hooks

I Various hooks should be implemented by the controller driverI ->exec_op() is one tool to do “low-level” operationsI ->setup_data_interface() to manage controller timingsI ->select_chip() to select a NAND chip die

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 38/42

Page 46: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Good habits when you hack a NAND controller driver

I Test with the userspace tools through the /dev/mtd* devicesmtd-utils: nandbiterrs, nandreadpage, flash_speed, flash_erase,nanddump, nandwrite, etc

I Get the NAND documentationdd if=/dev/zero of=nand.txt

I Ping the MTD community early on the public mailing-listI Do not forget to add the maintainer(s) in copy, it puts them in a bad mood

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 39/42

Page 47: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Good habits when you hack a NAND controller driver

I Test with the userspace tools through the /dev/mtd* devicesmtd-utils: nandbiterrs, nandreadpage, flash_speed, flash_erase,nanddump, nandwrite, etc

I Get the NAND documentationdd if=/dev/zero of=nand.txt

I Ping the MTD community early on the public mailing-listI Do not forget to add the maintainer(s) in copy, it puts them in a bad mood

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 39/42

Page 48: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Good habits when you hack a NAND controller driver

I Test with the userspace tools through the /dev/mtd* devicesmtd-utils: nandbiterrs, nandreadpage, flash_speed, flash_erase,nanddump, nandwrite, etc

I Get the NAND documentationdd if=/dev/zero of=nand.txt

I Ping the MTD community early on the public mailing-list

I Do not forget to add the maintainer(s) in copy, it puts them in a bad mood

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 39/42

Page 49: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Good habits when you hack a NAND controller driver

I Test with the userspace tools through the /dev/mtd* devicesmtd-utils: nandbiterrs, nandreadpage, flash_speed, flash_erase,nanddump, nandwrite, etc

I Get the NAND documentationdd if=/dev/zero of=nand.txt

I Ping the MTD community early on the public mailing-listI Do not forget to add the maintainer(s) in copy, it puts them in a bad mood

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 39/42

Page 50: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Sources/Links

I Presentation by Boris Brezillon (Free Electrons/Bootlin) at ELCE 2016 in Berlin:“Modernizing the NAND framework, the big picture”https://www.youtube.com/watch?v=vhEb0fgk71Mhttps://events.linuxfoundation.org/sites/events/files/slides/brezillon-nand-framework_0.pdf

I Presentation by Arnout Vandecappelle (Essensium/Mind) at ELCE 2016 in Berlin:“Why NAND flash breaks down”https://www.youtube.com/watch?v=VajB8vCsZ3shttps://schd.ws/hosted_files/openiotelceurope2016/36/Flash-technology-ELCE16.pdf

I YouTube channel “Learn engineering” that democratizes physical conceptshttps://www.youtube.com/watch?v=7ukDKVHnac4

I SlideShare by Nur Baya Binti Mohd Hashim (UNIMAP) about semiconductorshttp://slideplayer.com/slide/10946788

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 40/42

Page 51: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Questions? Suggestions? Comments?

Miquel [email protected]

Slides under CC-BY-SA 3.0https://bootlin.com/pub/conferences/2018/fosdem/raynal-exec-op/

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 41/42

Page 52: Drive your NAND within Linux - fosdem.org · I NAND operations evolve over the time → need to add support for vendor specific ... I More to come: FSMC, Sunxi, VF610, Arasan, MXC,

Backup

I For throughput or compatibility purpose, a controller driver may overload thefollowing functions defined by the core to bypass ->exec_op() and talk directlyto the NAND controller

I ->read/write_page()I ->read/write_oob()

I Bitflips should be corrected and reported by the controller driverI Let the NAND core handle the rest and report to upper layers

I It is also mandatory to fill their “raw” counterpart in order to be able to test anddebug all the functionalities of the driver

I ->read/write_page_raw()I ->read/write_oob_raw()

Bootlin. Kernel, drivers and embedded Linux - Development, consulting, training and support. https://bootlin.com 42/42


Recommended