01 Nov, 2019

1 commit


22 Feb, 2019

1 commit

  • Current SPL code only support ONFI-compatible NAND, porting the code
    from nand_base.c to support legacy full id NAND chips, such as Toshiba
    TC58NVG2S0H.

    Signed-off-by: Han Xu
    (cherry picked from commit 4086c6b9556acbec2a8748578eb4a9e719ab4ae7)

    Han Xu
     

16 Jan, 2019

1 commit

  • Current MXC NAND driver uses memory BBT, it will create memory BBT in each
    booting by searching bad blocks.

    This patch enables the flash BBT, so the NAND driver can read back Bad block
    table on the flash chip to create memory BBT.

    Signed-off-by: Ye Li
    Acked-by: Peng Fan

    Ye Li
     

03 Nov, 2018

1 commit


18 Sep, 2018

1 commit


27 Apr, 2018

14 commits

  • enable the GPMI NAND driver for i.MX8, the major changes

    - register defination for i.mx8
    - Makefile change for misc.c
    - DMA structure must be 32bit address

    Signed-off-by: Han Xu
    (cherry picked from commit 474c4270108551647c7064a23abdc2e11d7f37ab)

    Han Xu
     
  • Current SPI flash framework only supports to set bank register
    (CONFIG_SPI_FLASH_BAR) for flash with size > 16MiB. But some new flash device
    (for example, mt35xu512g) does not support this way, it only supports
    4bytes extend address.

    To access the whole memory size for such flash device, we add the support
    for this 4bytes extend address mode to SPI flash framework.
    The configuration CONFIG_SPI_FLASH_4BYTES_ADDR is used to enable the feature.

    Signed-off-by: Ye Li
    (cherry picked from commit c6815bcc44622861e3606c9aa7efa14c7db5ea5a)

    Ye Li
     
  • Found the 4K subsector erase can't work on this mt35xu512aba flash.
    Remove this flag to use 128K sector erase.

    Signed-off-by: Ye Li
    (cherry picked from commit 243aa3ddea8ee7f2e512d2a524b3553b0b144f92)

    Ye Li
     
  • Update the mini driver to add support for getting ecc info from ONFI and
    support read image data from page unaligned NAND address.

    Signed-off-by: Ye Li
    (cherry picked from commit 56cb2142cfb29d01a3ee8c160737167ccc3b2be6)

    Ye Li
     
  • Update the gpmi/apbh_dma/bch drivers and relevant registers for i.MX8M.

    Signed-off-by: Ye Li
    (cherry picked from commit 6cb839cabb42b81e37214e00448fc5dac89fd1f1)

    Ye Li
     
  • The i.MX8MQ DDR3L ARM2 boards uses gd25q16c flash device, add its id
    to spi flash ids table.

    Signed-off-by: Ye Li
    (cherry picked from commit 945ec087f6481ccc24b124aa9b1a0e159174e4d4)

    Ye Li
     
  • On mx7ulp EVK board, we use MX25R6435F NOR flash, add its parameters
    and IDs to flash parameter array. Otherwise, the flash probe will fails.

    Signed-off-by: Ye Li
    (cherry picked from commit 0d6bee19bb3e87ebf984fdc218b3b020006cb2e9)

    Ye Li
     
  • Add the fuse checking in drivers, when the module is disabled in fuse,
    the driver will not work.

    Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C,
    USB-EHCI, GIS, LCDIF and EPDC.

    Signed-off-by: Ye Li
    (cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e)
    (cherry picked from commit 2d3b5df8530cd5ef883750378838dea7c40259af)

    Ye Li
     
  • Add MT35XU512ABA parameters to NOR flash parameters array. Since the
    manufactory ID is changed to 0x2C, add it for micron and using it for
    relevant settings.

    The MT35XU512ABA only supports 1 bit mode and 8 bits. It can't support
    dual and quad. Because the 8 bits is not support by u-boot framework and
    driver. We only use 1 bit mode for this flash.

    Signed-off-by: Ye Li
    (cherry picked from commit 7595df64537e674df0a841563424b30b289d49fc)

    Ye Li
     
  • Should have "&" to access the register address, otherwise uboot will hang.

    Signed-off-by: Ye Li
    (cherry picked from commit 0b65071afaae9d6a49fb7dda2902f5c8bcd678c2)
    (cherry picked from commit 712cbc4f23fa4276ae652b8767fd5a0646fab1da)

    Ye Li
     
  • This patch is a porting of
    http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=e4dacc44d22e9474ec456cb330df525cd805ea38
    "
    i.MX6QP and i.MX7D BCH module integrated a new feature to detect the
    bitflip number for erased NAND page. So for these two platform, set the
    erase threshold to gf/2 and if bitflip detected, GPMI driver will
    correct the data to all 0xFF.

    Also updated the imx6qp dts file to ditinguish the GPMI module for i.MX6Q
    with the one for i.MX6QP.
    "

    In this patch, i.MX6UL is added and threshold changed to use ecc_strength.

    Signed-off-by: Peng Fan
    (cherry picked from commit 489929be0221bb7d4c46bb5bc6083650b78f73e0)
    Signed-off-by: Ye Li
    (cherry picked from commit 37d7f9614aa357f270312d7ceaab0f7006dc5aea)

    Peng Fan
     
  • This patch is porting from linux:
    http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=3d42fcece496224fde59f9343763fb2dfc5b0768

    "
    We may meet the bitflips in reading an erased page(contains all 0xFF),
    this may causes the UBIFS corrupt, please see the log from Elie:

    -----------------------------------------------------------------
    [ 3.831323] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
    [ 3.845026] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
    [ 3.858710] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
    [ 3.872408] UBI error: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read 16384 bytes
    ...
    [ 4.011529] UBIFS error (pid 36): ubifs_recover_leb: corrupt empty space LEB 27:237568, corruption starts at 9815
    [ 4.021897] UBIFS error (pid 36): ubifs_scanned_corruption: corruption at LEB 27:247383
    [ 4.030000] UBIFS error (pid 36): ubifs_scanned_corruption: first 6569 bytes from LEB 27:247383
    -----------------------------------------------------------------

    This patch does a check for the uncorrectable failure in the following steps:

    [0] set the threshold.
    The threshold is set based on the truth:
    "A single 0 bit will lead to gf_len(13 or 14) bits 0 after the BCH
    do the ECC."

    For the sake of safe, we will set the threshold with half the gf_len, and
    do not make it bigger the ECC strength.

    [1] count the bitflips of the current ECC chunk, assume it is N.

    [2] if the (N
    (cherry picked from commit ceb324a2914487aa517a6c70a06a20b5e3438fda)
    (cherry picked from commit 026751697e41c7376414a8716cf0ea4bf998b85f)

    Peng Fan
     
  • provide one config "CONFIG_NAND_MXS_BCH_LEGACY_GEO" to keep using legacy
    bch geometry.

    NOTICE: the feature must be enabled/disabled in both u-boot and kernel.

    Signed-off-by: Han Xu
    (cherry picked from commit 0abc9c182c24f88522bd74fa1b53cd2fa3477184)
    (cherry picked from commit 772af34b1216acc8e6a1a3faf43fef7c90b26a2f)
    Signed-off-by: Ye Li
    (cherry picked from commit 58794b3ebefea468bb1c57184b79df500f427927)

    Han Xu
     
  • The cod change updated the NAND driver BCH ECC layout algorithm to
    support large oob size NAND chips(oob > 1024 bytes).

    Current implementation requires each chunk size larger than oob size so
    the bad block marker (BBM) can be guaranteed located in data chunk. The
    ECC layout always using the unbalanced layout(Ecc for both meta and
    Data0 chunk), but for the NAND chips with oob larger than 1k, the driver
    cannot support because BCH doesn’t support GF 15 for 2K chunk.

    The change keeps the data chunk no larger than 1k and adjust the ECC
    strength or ECC layout to locate the BBM in data chunk. General idea for
    large oob NAND chips is

    1.Try all ECC strength from the minimum value required by NAND spec to
    the maximum one that works, any ECC makes the BBM locate in data chunk
    can be chosen.

    2.If none of them works, using separate ECC for meta, which will add one
    extra ecc with the same ECC strength as other data chunks. This extra
    ECC can guarantee BBM located in data chunk, of course, we need to check
    if oob can afford it.

    Signed-off-by: Han Xu
    (cherry picked from commit 78f620a6d6ab44bd34e42f00abe4673db099ca73)
    (cherry picked from commit 242b2b889a9e18c587fafaa98cb9e9985b179df4)

    Han Xu
     

05 Mar, 2018

1 commit

  • Thomas reported U-Boot failed to build host tools if libfdt-devel
    package is installed because tools include libfdt headers from
    /usr/include/ instead of using internal ones.

    This commit moves the header code:
    include/libfdt.h -> include/linux/libfdt.h
    include/libfdt_env.h -> include/linux/libfdt_env.h

    and replaces include directives:
    #include -> #include
    #include -> #include

    Reported-by: Thomas Petazzoni
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

23 Feb, 2018

1 commit


19 Feb, 2018

1 commit

  • Fixes a bug found on thuban boards, which were for 2 years in
    a long-term test with varying temperatures. They showed
    problems in u-boot when attaching the ubi partition:

    U-Boot# run flash_self_test
    Booting from nand
    set A...
    UBI: attaching mtd1 to ubi0
    UBI: scanning is finished
    data abort
    pc : [] lr : []
    reloc pc : [] lr : []
    sp : 85f686e8 ip : 00000020 fp : 000001f7
    r10: 8605ce40 r9 : 85f68ef8 r8 : 0001f000
    r7 : 00000001 r6 : 00000006 r5 : 0001f000 r4 : 85f6ecc0
    r3 : 00000000 r2 : 44e35000 r1 : 87fcbcd4 r0 : 87fc755b
    Flags: nZCv IRQs off FIQs on Mode SVC_32
    Resetting CPU ...

    Reason is, that accidentially the U-Boot implementation
    from __schedule_ubi_work() did not check the flag
    ubi->thread_enabled and started with wearleveling work,
    but ubi did not have setup all structures at this point
    and crashes.

    Solve this problem by splitting work scheduling and processing.

    Signed-off-by: Richard Weinberger
    Signed-off-by: Heiko Schocher

    Richard Weinberger
     

09 Feb, 2018

1 commit


08 Feb, 2018

1 commit


06 Feb, 2018

1 commit

  • On detach UBI attempts to update fastmap after closing user interfaces
    but at this point UBI volumes have already been free()'ed and fastmap
    can no longer access these data structures.

    Signed-off-by: Martin Townsend
    Cc: hs@denx.de
    Cc: kmpark@infradead.org
    Cc: richard@sigma-star.at

    Martin Townsend
     

31 Jan, 2018

1 commit


30 Jan, 2018

4 commits


29 Jan, 2018

10 commits

  • The variable cfi_flash_num_flash_banks is defined iff
    CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, but it is used
    unconditionally in the function cfi_flash_init_dm. This leads to a
    undefined variable compile error when CONFIG_SYS_MAX_FLASH_BANKS_DETECT
    is not defined, but DM is enabled.

    Fix this by always defining the cfi_flash_num_flash_banks variable.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • When long expressions surrounded by parentheses are split into multiple
    lines, each consecutive line should be aligned with the corresponding
    parenthesis. Fix all instances where this occurs.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • Long lines (>80 characters) should be avoided where possible. Break up
    some long lines where it's not detrimental to readability.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • In a while loop in cfi_flash.c the array "start" is accessed at the index
    "sector" before the index variable "sector" is bounds-checked, which
    might lead to accesses beyond the bounds of the array.

    Swap the order of the checks in the "&&" expression, so that the
    short-circuit evaluation prevents out-of-bounds array accesses.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the
    error is only used in a handful of files, we rename the error to
    ERR_TIMEOUT.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • Camel-case naming should be avoided. Rename two camel-case variables,
    and fix their usage accordingly.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • Strings should not be split accross multiple lines. Where possible and
    not detrimental to readability, fix the instances where this occurs.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • According to the C standard, pointer arithmetic for pointers of type
    void is undefined behavior (the assumption that they're 8-bit wide is a
    GCC-specific assumption). In the interest of keeping the code
    standards-compliant, and also better communicate intent, switch all
    void* variables where pointer arithmetic is used to u8* variables.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • The condition in if statements should not be used for variable
    assignment. Instead, the assignment should be done in a separate step
    beforehand. Fix all instances where this occurs.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six
     
  • void functions don't need an explicit return at the end.

    Signed-off-by: Mario Six
    Signed-off-by: Stefan Roese

    Mario Six