26 Sep, 2017

1 commit

  • The status register is optional in the AMD command sets, but it's
    presence can be checked by reading out CFI table entry 0xc bit 0.
    If the register is present, prefer using it's bit 7 to determine
    if the flash is busy over reading the flash ; this is needed ie.
    on Hyperflash memories.

    Signed-off-by: Marek Vasut
    Signed-off-by: Stefan Roese

    Marek Vasut
     

22 Aug, 2017

1 commit


27 Oct, 2015

1 commit

  • This patch changes the cword union to use specific length types that are
    architecture indepented.

    This patch also renames the members of the cword union to represent
    their usage, i.e.:

    c -> w8
    s -> w16
    l -> w32
    ll -> w64

    Where "w" stands for "width" in bits.

    I discovered this problem when enabling CFI flash on vexpress64.
    cword.l was an unsigned long int, but it was intended to be 32 bits wide.
    Unfortunately, it's 64-bits wide on a 64-bit system, meaning that a
    64-bit system fails when attempting to use 32-bit wide CFI flash parts.

    Similar problems also existed with the other cword sizes.

    Signed-off-by: Ryan Harkin
    Reviewed-by: Linus Walleij
    Signed-off-by: Stefan Roese

    Ryan Harkin
     

17 Sep, 2014

1 commit

  • U-Boot has imported various source files from other projects,
    mostly Linux.

    Something like

    #ifdef __UBOOT__
    [ modification for U-Boot ]
    #else
    [ original code ]
    #endif

    is an often used strategy for clarification of adjusted parts,
    that is, easier re-sync in future.

    Instead of defining __UBOOT__ in each source file,
    passing it from the top Makefile would be easier.

    Signed-off-by: Masahiro Yamada
    Acked-by: Marek Vasut
    Acked-by: Heiko Schocher

    Masahiro Yamada
     

26 Aug, 2014

2 commits

  • snyc with linux v3.15:

    commit 1860e379875dfe7271c649058aeddffe5afd9d0d
    Author: Linus Torvalds
    Date: Sun Jun 8 11:19:54 2014 -0700

    Linux 3.15

    Signed-off-by: Heiko Schocher
    Cc: Scott Wood
    Cc: Tom Rini

    Heiko Schocher
     
  • resync ubi subsystem with linux:

    commit 455c6fdbd219161bd09b1165f11699d6d73de11c
    Author: Linus Torvalds
    Date: Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

    A nice side effect of this, is we introduce UBI Fastmap support
    to U-Boot.

    Signed-off-by: Heiko Schocher
    Signed-off-by: Tom Rini
    Cc: Marek Vasut
    Cc: Sergey Lapin
    Cc: Scott Wood
    Cc: Joerg Krause

    Heiko Schocher
     

22 Nov, 2013

1 commit

  • nand_ecclayout is present in mtd.h at Linux.
    Move this structure to mtd.h to comply with Linux.

    Also, increase the ecc placement locations to 640 to suport device having
    writesize/oobsize of 8KB/640B. This means that the maximum oobsize has gone
    up to 640 bytes and consequently the maximum ecc placement locations have
    also gone up to 640.

    Changes from Prabhabkar's version (squashed into one patch to preserve
    bisectability):
    - Added _LARGE to MTD_MAX_*_ENTRIES

    This makes the names match current Linux source, and resolves
    a conflict between
    http://patchwork.ozlabs.org/patch/280488/
    and
    http://patchwork.ozlabs.org/patch/284513/

    The former was posted first and is closer to matching Linux, but
    unlike Linux it does not add _LARGE to the names. The second adds
    _LARGE to one of the names, and depends on it in a subsequent patch
    (http://patchwork.ozlabs.org/patch/284512/).

    - Made max oobfree/eccpos configurable, and used this on tricorder,
    alpr, ASH405, T4160QDS, and T4240QDS (these boards failed to build
    for me without doing so, due to a size increase).

    On tricorder SPL, this saves 2576 bytes (and makes the SPL build
    again) versus the new default of 640 eccpos and 32 oobfree, and
    saves 336 bytes versus the old default of 128 eccpos and 8 oobfree.

    Signed-off-by: Prabhakar Kushwaha
    CC: Vipin Kumar
    [scottwood@freescale.com: changes as described above]
    Signed-off-by: Scott Wood
    Cc: Thomas Weber
    Cc: Matthias Fuchs
    Cc: Stefan Roese
    Cc: York Sun
    Cc: Tom Rini
    Reviewed-by: Stefan Roese

    Prabhakar Kushwaha
     

30 Jul, 2013

1 commit

  • This commit adds some prototypes into include/mtd/cfi_flash.h.
    These functions are defined with a weak attribute in
    drivers/mtd/cfi_flash.c.
    This means they can be overrided by board-specific ones
    if necessary.

    When defining such functions under board/ directory or
    somewhere, cfi_flash.h should be included.
    This makes sure that board-specfic cfi functions
    are defined in a correct prototype.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Stefan Roese

    Masahiro Yamada
     

24 Jul, 2013

1 commit


01 Jun, 2013

2 commits

  • Tom Rini
     
  • This patch is essentially an update of u-boot MTD subsystem to
    the state of Linux-3.7.1 with exclusion of some bits:

    - the update is concentrated on NAND, no onenand or CFI/NOR/SPI
    flashes interfaces are updated EXCEPT for API changes.

    - new large NAND chips support is there, though some updates
    have got in Linux-3.8.-rc1, (which will follow on top of this patch).

    To produce this update I used tag v3.7.1 of linux-stable repository.

    The update was made using application of relevant patches,
    with changes relevant to U-Boot-only stuff sticked together
    to keep bisectability. Then all changes were grouped together
    to this patch.

    Signed-off-by: Sergey Lapin
    [scottwood@freescale.com: some eccstrength and build fixes]
    Signed-off-by: Scott Wood

    Sergey Lapin
     

23 May, 2013

1 commit

  • Packed structure cfi_qry contains unaligned 16- and 32-bits members,
    accessing which causes problems when cfi_flash driver is compiled with
    -munaligned-access option: flash initialization hangs, probably
    due to data error.

    Since the structure is supposed to replicate the actual data layout
    in CFI Flash chips, the alignment issue can't be fixed in the structure.
    So, unaligned fields need using of explicit unaligned access macros.

    Signed-off-by: Andrew Gabbasov
    Reviewed-By: Albert ARIBAUD
    Signed-off-by: Stefan Roese

    Andrew Gabbasov
     

13 Apr, 2013

1 commit


02 Apr, 2013

1 commit

  • This commit is based on that patch from aaron.williams@caviumnetworks.com
    with same commit title. pulled the same code changes into current u-boot tree.

    http://patchwork.ozlabs.org/patch/140863/
    http://lists.denx.de/pipermail/u-boot/2011-April/089606.html

    This patch corrects the addresses used when working with Spansion/AMD FLASH chips.
    Addressing for 8 and 16 bits is almost identical except in the 16-bit case the
    LSB of the address is always 0. The confusion arose because the addresses
    in the datasheet for 16-bit mode are word addresses but this code assumed it was
    byte addresses.

    I have only been able to test this on our Octeon boards which use either an 8-bit
    or 16-bit bus. I have not tested the case where there's an 8-bit part on a 16-bit
    bus.

    This patch also adds some delays as suggested by Spansion.

    If a part can be both 8 and 16-bits, it forces it to work in 8-bit mode if an
    8-bit bus is detected.

    Apart from the pulled changes, fixed few minor code cleanups and tested
    on 256M29EW, 512M29EW flashes.

    Before this fix:
    ---------------
    Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors
    AMD Standard command set, Manufacturer ID: 0xFF, Device ID: 0xFF
    Erase timeout: 4096 ms, write timeout: 2 ms
    Buffer write timeout: 5 ms, buffer size: 1024 bytes

    After this fix:
    --------------
    Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 512 Sectors
    AMD Standard command set, Manufacturer ID: 0x89, Device ID: 0x7E2301
    Erase timeout: 4096 ms, write timeout: 2 ms
    Buffer write timeout: 5 ms, buffer size: 1024 bytes

    Signed-off-by: Aaron Williams
    Signed-off-by: Jagannadha Sutradharudu Teki
    Tested-by: Jagannadha Sutradharudu Teki

    aaron.williams@caviumnetworks.com
     

13 Aug, 2012

1 commit


17 Dec, 2010

1 commit

  • This patch adds the possibility to (optinally) write to the
    flash configuration register. The Intel style CFI chips support
    such a register that can be used to configure the operation
    mode to a non-default value.

    This method will be used by the t3corp board, which needs to
    configure the DS617 Xilinx flash for async read mode.

    Signed-off-by: Stefan Roese

    Stefan Roese
     

20 Sep, 2010

1 commit

  • This patch simplifies the use of CONFIG_SYS_MAX_FLASH_BANKS_DETECT. By
    moving these optional variables and defines into the common code, board
    specific code is minimized. Currently only the following board use
    this feature:

    APC405, IDS8247, TQM834x

    And IDS8247 doesn't seem to really need this feature, since its not
    updating the bank number variable at all. So this patch removes the
    definition of CONFIG_SYS_MAX_FLASH_BANKS_DETECT from this board port.

    This new framework will be used by the upcoming lwmon5 update as well.

    Signed-off-by: Stefan Roese
    Acked-by: Heiko Schocher
    Cc: Matthias Fuchs

    Stefan Roese
     

28 Oct, 2009

1 commit

  • Currently the CFI driver issues both AMD and Intel reset commands.
    This is because the driver doesn't know yet which chips are connected.
    This dual reset seems to cause problems with the M29W128G chips as
    reported by Richard Retanubun. This patch now introduces a weak default
    function for the CFI reset command, still with both resets. This can
    be overridden by a board specific version if necessary.

    Signed-off-by: Stefan Roese
    Cc: Richard Retanubun

    Stefan Roese
     

20 Nov, 2008

1 commit

  • This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
    It's based on the Linux UBI version and basically has a "OS"
    translation wrapper that defines most Linux specific calls
    (spin_lock() etc.) into no-ops. Some source code parts have been
    uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
    this version with the Linux version and simplifies future UBI
    ports/bug-fixes from the Linux version.

    Signed-off-by: Kyungmin Park
    Signed-off-by: Stefan Roese

    Kyungmin Park