08 Jun, 2015

2 commits


28 May, 2015

1 commit


26 May, 2015

6 commits


25 May, 2015

10 commits

  • This changes enable ONFI detection. The Read ID command now allows
    one address byte which is needed for ONFI detection. To read the
    ONFI parameter page, the NAND_CMD_PARAM need to be supported. The
    CMD code enables one command and one address byte along with reading
    data from flash using R/B#, as specified by ONFI.

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • Add option to choose between current 24-error correction and 32-error
    correction through Kconfig. 32-error correction allow to use NAND
    chips which require up to 8-bit error correction per 512 byte (when
    using 2K pages).

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • This commit allows users to enable/disable the Freescale NFC
    controller found in systems like Vybrid (VF610), MPC5125, MCF54418
    or Kinetis K70 via Kconfig with more detailed help docs.

    Signed-off-by: Stefan Agner
    Acked-by: Stefano Babic
    [scottwood: updated vf610twr_nand_defconfig]
    Signed-off-by: Scott Wood

    Stefan Agner
     
  • Use in-band bad block table (NAND_BBT_NO_OOB) which allows to
    use the full OOB for hardare ECC purposes. Since there is no
    ECC correction on the OOB it is also safer to use in-band area
    to store the bad block table marker.

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • Implement read of OOB area only. When using column and sector size
    properties, only parts of the page can be read. However, this works
    only when hardware ECC is disabled, otherwise the ECC engine would
    ruin the data in the buffer. To allow OOB only reads, three points
    had to be addressed:
    - Set ECC mode per command.
    - Handle NAND_CMD_READOOB seperate. Make sure column and sector
    size is correctly set up, while disabling ECC.
    - Now, the OOB data end up at the beginning of the buffer. Remove
    the special handling of OOB (spareonly).

    Especially bad block scans benefit from this change. On a 512MiB
    SLC NAND device, the bad block scan took 1.5s less than before.

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • Allow bit flips in a empty page up to half of the recoverable
    bits (strength / 2).

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • Since we do not support sub-page writes anyway, reading the page
    back to the controller on SEQIN command is not required. Remove
    the page read on SEQIN.

    However, the column/page values relevant to the SEQIN command, hence
    set the column/row address on SEQIN command.

    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • To improve performance we remember the current page in the buffer
    and avoid reading it twice. This implicit page cache increases
    complexity while does not increase performance in real world cases.
    This patch removes that feature.

    Acked-by: Bill Pringlemeir
    Signed-off-by: Stefan Agner

    Stefan Agner
     
  • Signed-off-by: Jörg Krause
    Reviewed-by: Marek Vasut

    Jörg Krause
     
  • Calculate ecc strength according oobsize, but not hardcoded
    which is not aligned with kernel driver

    Signed-off-by: Peng Fan
    Signed-off-by: Ye.Li
    Reviewed-by: Marek Vasut
    Signed-off-by: Jörg Krause

    Peng Fan
     

23 May, 2015

1 commit


22 May, 2015

1 commit

  • On systems with caches enabled, NAND I/O may need to flush/invalidate
    the cache during read/write operations. For this to work correctly, all
    buffers must be cache-aligned. Fix nand_verify*() to allocate aligned
    buffers.

    This prevents cache alignment warnings from being spewed when using
    U-Boot to write an updated version of itself to flash on NVIDIA Tegra
    Seaboard (after perturbation of stack/data layout in current
    u-boot-dm/next branch).

    I have validatd (executed) nand_verify(), but I don't think I've executed
    nand_verify_page_oob(); testing of that would be useful.

    Cc: Peter Tyser
    Cc: Heiko Schocher
    Cc: Scott Wood
    Fixes: 59b5a2ad83df ("nand: Add verification functions")
    Signed-off-by: Stephen Warren
    Reviewed-by: Simon Glass
    Acked-by: Scott Wood

    Stephen Warren
     

21 May, 2015

2 commits


20 May, 2015

6 commits


19 May, 2015

1 commit


18 May, 2015

1 commit


16 May, 2015

1 commit


15 May, 2015

8 commits

  • This commit adds emulation of sandbox PMIC device, which includes:
    - PMIC I2C emulation driver
    - PMIC I/O driver (UCLASS_PMIC)
    - PMIC regulator driver (UCLASS_REGULATOR)

    The sandbox PMIC has 12 significant registers and 4 as padding to 16 bytes,
    which allows using 'i2c md' command with the default count (16).

    The sandbox PMIC provides regulators:
    - 2x BUCK
    - 2x LDO

    Each, with adjustable output:
    - Enable state
    - Voltage
    - Current limit (LDO1/BUCK1 only)
    - Operation mode (different for BUCK and LDO)

    Each attribute has it's own register, beside the enable state, which depends
    on operation mode.

    The header file: sandbox_pmic.h includes PMIC's default register values,
    which are set on i2c pmic emul driver's probe() method.

    Signed-off-by: Przemyslaw Marczak
    Acked-by: Simon Glass
    Tested on sandbox:
    Tested-by: Simon Glass

    Przemyslaw Marczak
     
  • The function get_emul() in sandbox i2c bus driver, always returns
    first child as i2c emul device. This may only work for i2c devices
    with a single child, which is an only i2c emul device.

    In case when i2c device has more than one child (e.g. PMIC), and
    one is i2c emul, then the function should search it by check uclass
    id for each child. This patch add this change to the get_emul().

    Signed-off-by: Przemyslaw Marczak
    Cc: Simon Glass
    Acked-by: Simon Glass
    Tested on sandbox:
    Tested-by: Simon Glass

    Przemyslaw Marczak
     
  • This cleanup includes:
    - remove of the preprocessor macros which pointed to long name functions
    - update of the names of some regulator uclass driver functions
    - cleanup of the function regulator_autoset()
    - reword of some comments of regulator uclass header file
    - regulator_get_by_platname: check error for uclass_find_* function calls
    - add function: regulator_name_is_unique
    - regulator post_bind(): check regulator name uniqueness
    - fix mistakes in: regulator/Kconfig
    - regulator.h: update comments
    - odroid u3: cleanup the regulator calls

    Signed-off-by: Przemyslaw Marczak
    Acked-by: Simon Glass
    Tested on sandbox:
    Tested-by: Simon Glass

    Przemyslaw Marczak
     
  • The cleanup includes:
    - pmic.h - fix mistakes in a few comments
    - pmic operations: value 'reg_count' - redefine as function call
    - fix function name: pmic_bind_childs() -> pmic_bind_children()
    - pmic_bind_children: change the 'while' loop with the 'for'
    - add implementation of pmic_reg_count() method
    - pmic_bind_children() - update function call name
    - Kconfig: add new line at the end of file
    - Update MAX77686 driver code

    Signed-off-by: Przemyslaw Marczak
    Acked-by: Simon Glass
    Tested on sandbox:
    Tested-by: Simon Glass

    Przemyslaw Marczak
     
  • This driver implements regulator operations for fixed Voltage/Current
    value regulators. beside the standard regulator constraints, which are
    put into the uclass platform data, a typical fixed regulator node provides
    few additional properties like:
    - gpio
    - gpio-open-drain
    - enable-active-high
    - startup-delay-us
    The only 'gpio' is used by this driver and is kept in structure of type
    'fixed_regulator_platdata', as a device platform data (dev->platdata).

    The driver implements:
    - get_value
    - get_current
    - get_enable
    - set_enable

    The regulator calls and commands can be used for fixed-regulator devices,
    and the proper error will be returned for prohibited.

    Signed-off-by: Przemyslaw Marczak
    Acked-by: Simon Glass

    Przemyslaw Marczak
     
  • This commit adds support to MAX77686 regulator driver,
    based on a driver model regulator's API. It implements
    almost all regulator operations, beside those for setting
    and geting the Current value.
    For proper bind and operation it requires the MAX77686 PMIC driver.

    New file: drivers/power/regulator/max77686.c
    New config: CONFIG_DM_REGULATOR_MAX77686

    Signed-off-by: Przemyslaw Marczak
    Acked-by: Simon Glass

    Przemyslaw Marczak
     
  • This is the implementation of driver model PMIC driver.
    The max77686 PMIC driver implements read/write operations and driver
    bind method - to bind its childs.

    This driver will try to bind the regulator devices by using it's child
    info array with regulator prefixes and driver names. This should succeed
    when compatible regulator driver is compiled. If no regulator driver found,
    then the pmic can still provide read/write operations, and can be used with
    PMIC function calls.

    Signed-off-by: Przemyslaw Marczak
    Acked-by: Simon Glass

    Przemyslaw Marczak
     
  • This commit introduces the implementation of dm regulator API.
    Device tree support allows for auto binding. And by the basic
    uclass operations, it allows to driving the devices in a common
    way. For detailed informations, please look into the header file.

    Core files:
    - drivers/power/regulator-uclass.c - provides regulator common functions api
    - include/power/regulator.h - define all structures required by the regulator

    Changes:
    - new uclass-id: UCLASS_REGULATOR
    - new config: CONFIG_DM_REGULATOR

    Signed-off-by: Przemyslaw Marczak
    Acked-by: Simon Glass

    Przemyslaw Marczak