Skip to content
  • Sean Anderson's avatar
    nand: Add sandbox driver · bc8e8a4b
    Sean Anderson authored and Tom Rini's avatar Tom Rini committed
    Add a sandbox NAND flash driver to facilitate testing. This driver supports
    any number of devices, each using a single chip-select. The OOB data is
    stored in-band, with the separation enforced through the API.
    
    For now, create two devices to test with. The first is a very small device
    with basic ECC. The second is an 8G device (chosen to be larger than 32
    bits). It uses ONFI, with the values copied from the datasheet. It also
    doesn't need too strong ECC, which speeds things up.
    
    Although the nand subsystem determines the parameters of a chip based on
    the ID, the driver itself requires devicetree properties for each
    parameter. We do not derive parameters from the ID because parsing the ID
    is non-trivial. We do not just use the parameters that the nand subsystem
    has calculated since that is something we should be testing. An exception
    is made for the ECC layout, since that is difficult to encode in the device
    tree and is not a property of the device itself.
    
    Despite using file I/O t...
    bc8e8a4b