02 Aug, 2015

2 commits


29 Jul, 2015

1 commit


28 Jul, 2015

1 commit


26 Jul, 2015

1 commit

  • DCIMVAC is upgraded to DCCIMVAC for the individual processor
    (Cortex-A7) that the DCIMVAC is executed on.

    We should follow the linux dma follow. Before DMA read, first
    invalidate dcache then after DMA read, invalidate dcache again.

    With the DMA direction DMA_FROM_DEVICE, the dcache need be
    invalidated again after the DMA completion. The reason is
    that we need explicity make sure the dcache been invalidated
    thus to get the DMA'ed memory correctly from the physical memory.
    Any cache-line fill during the DMA operations such as the
    pre-fetching can cause the DMA coherency issue, thus CPU get the stale data.

    Signed-off-by: Peng Fan
    Signed-off-by: Ye.Li
    Signed-off-by: Nitin Garg
    Signed-off-by: Jason Liu
    Reviewed-by: Stefano Babic

    Peng Fan
     

24 Jul, 2015

2 commits

  • This patch extracts checking for valid SD card "eGON.BT0" signature from
    `board_mmc_init` into function `sunxi_mmc_has_egon_boot_signature`.

    Buffer for mmc sector is allocated and freed at runtime. `panic` is
    triggered on malloc failure.

    Signed-off-by: Daniel Kochmański
    CC: Roy Spliet
    Cc: Ian Campbell
    [hdegoede@redhat.com: Small bugfix to make it work for devs other then mmc0]
    Acked-by: Hans de Goede
    Signed-off-by: Hans de Goede

    Daniel Kochmański
     
  • `mmc_initialize` might be called multiple times leading to the mmc-controllers
    being initialised twice, and initialising the `mmc_devices` list head twice
    which may lead to memory leaks.

    Signed-off-by: Daniel Kochmański
    CC: Roy Spliet
    Cc: Ian Campbell
    CC: Pantelis Antoniou
    Acked-by: Hans de Goede
    Signed-off-by: Hans de Goede

    Daniel Kochmański
     

22 Jul, 2015

3 commits


10 Jul, 2015

2 commits

  • While implementing SDIO/MMC SPL booting for the Marvell Armada 38x, the
    following problem occured. The SPL runs in internal SRAM which is
    the L2 cache locked to memory. When the MMC buffers now are located
    on the stack (or bss), the SDIO controller (SDHCI) can't write into
    this L2 cache memory.

    This patch introduces a method to use a fixed buffer that will be
    used for all transfers by defining CONFIG_FIXED_SDHCI_ALIGNED_BUFFER.
    This way, the board can use this buffer address located in SDRAM
    for all transfers. This solves this SPL problem on the A38x and
    should only be used in the SPL U-Boot version.

    Tested for SPL booting on Marvell Armada 38x DB-88F6820-GP board.

    Signed-off-by: Stefan Roese
    Cc: Pantelis Antoniou
    Cc: Luka Perkov

    Stefan Roese
     
  • The loop counter based timeout detection does not work on the Armada
    38x based board (DB-88F6820-GP). At least with dcache enabled a
    timeout is detected. Without dcache enabled, the timeout does not
    occur. Increasing the loop counter solves this issue. But a better
    solution is to use a timer based timeout detection instead. This
    patch now implements this timer based detection.

    Signed-off-by: Stefan Roese
    Cc: Pantelis Antoniou
    Cc: Luka Perkov

    Stefan Roese
     

26 Jun, 2015

1 commit

  • Patch 33fe2fb8df01647f97a7bce96a1c7781a7f6d253 titled
    "mmc: bcm283x: Remove get_timer_us() from mmc driver"
    incorrectly replaced ad-hoc get_timer_us() function
    with a plain get_timer(). The get_timer() operates in
    mSec units instead of uSec though, which caused very
    slow operation of the driver.

    Restore the original behavior of the driver, but avoid
    get_timer_us() and use timer_get_us() instead. The later
    is part of the standard API.

    Signed-off-by: Marek Vasut
    Cc: Jakub Kiciński
    Cc: Stephen Warren
    Tested-by: Jakub Kicinski

    Marek Vasut
     

19 Jun, 2015

1 commit

  • We want to see if the requested start or total block count are
    unaligned. We discard the whole numbers and only care about the
    remainder. Update the code to use div_u64_rem here and add a comment.

    Cc: Hans de Goede
    Cc: Pantelis Antoniou
    Cc: Bernhard Nortmann
    Reported-by: Simon Glass
    Signed-off-by: Tom Rini
    Tested-by: Bernhard Nortmann
    Reviewed-by: Hans de Goede

    Tom Rini
     

04 Jun, 2015

1 commit


06 May, 2015

1 commit


05 May, 2015

14 commits

  • Tom Rini
     
  • The get_timer_us() function is something which is no longer
    existing in case we use generic timer framework, so replace
    it with get_timer().

    Signed-off-by: Marek Vasut
    Cc: Stephen Warren
    Cc: Tyler Baker

    Marek Vasut
     
  • If the mmc device is non-removable (as indicated by the device tree), set
    the flag so that users of the device know.

    Signed-off-by: Simon Glass
    Reviewed-by: Joe Hershberger

    Simon Glass
     
  • We need to clear the allocated memory explicitly as the included
    struct sdhci_host has function pointers. Those are compared to NULL to
    test if this (optional) feature is supported. Leaving them undefined let
    u-boot jump to arbitrary memory.

    Signed-off-by: Alexander Stein

    Alexander Stein
     
  • Freescale eMMC44 adapter card uses Micron N2M400FDB311A3CF eMMC
    memory. According to the silicon datasheet, secure erase timeout
    is 600ms. So increase erase timeout value from 250ms to 600ms.

    Signed-off-by: Yangbo Lu
    Cc: York Sun

    Yangbo Lu
     
  • Timeout interrupt also work for response busy command(R1b) like
    cmd38/cmd6. So need to set it accordingly. Current code only
    set timeout for data command.

    Signed-off-by: Kevin Liu
    Signed-off-by: Rob Herring
    Cc: Pantelis Antoniou

    Kevin Liu
     
  • High capacity support is not a host capability, but a device capability
    that is queried via the OCR. The flag in the operating conditions
    request argument can just be set unconditionally. This matches the Linux
    implementation.

    [panto] Hand merged and renumbering MMC_MODE_DDR_52MHz.

    Signed-off-by: Rob Herring
    Signed-off-by: Pantelis Antoniou
    Cc: Pantelis Antoniou

    Rob Herring
     
  • Starting part of device initialization sets the init_in_progress flag
    only if the MMC card did not yet come to ready state and needs to continue
    polling. If the card is SD or if the MMC card became ready quickly,
    the flag is not set and (if using pre-initialization) the starting
    phase will be re-executed from mmc_init function.

    Set the init_in_progress flag in all non-error cases. Also, move flags
    setting statements around so that the flags are not set in error paths.
    Also, IN_PROGRESS return status becomes unnecessary, so get rid of it.

    Signed-off-by: Andrew Gabbasov

    Andrew Gabbasov
     
  • The polling loops in sd_send_op_cond and mmc_complete_op_cond functions
    check the ready flag state at the end of the loop, that is after executing
    a delay inside the loop, which, in case of exiting with no error,
    is not needed. Also, one of these loops, as well as the loop
    in mmc_send_status, have the delay just before exiting on timeout
    conditions.

    Restructure all these loops to check the respective conditions before making
    a delay for the next loop pass, and to appropriately exit without the delay.

    Signed-off-by: Andrew Gabbasov

    Andrew Gabbasov
     
  • Some MMC cards come to ready state quite quickly, so that the respective
    flag appears to be set in mmc_send_op_cond already. In this case trying
    to continue polling the card with CMD1 in mmc_complete_op_cond is incorrect
    and may lead to unpredictable results. So check the flag before polling
    and skip it appropriately.

    Signed-off-by: Andrew Gabbasov

    Andrew Gabbasov
     
  • The previous change to use 'ocr' structure field for storing send_op_cond
    command response also stopped using command response directly
    outside of mmc_send_op_cond_iter(). Now it becomes possible to use
    command structure in mmc_send_op_cond_iter() locally, removing a necessity
    to pass it as an argument from the caller.

    Signed-off-by: Andrew Gabbasov

    Andrew Gabbasov
     
  • The 'op_cond_response' field in mmc structure contains the response
    from the last SEND_OP_COND MMC command while making iterational
    polling of the card. Later it is copied to 'ocr' field, designed
    to contain the OCR register value, which is actually the same
    response from the same command. So, these fields have actually
    the same data, just in different time periods. It's easier to use
    the same 'ocr' field in both cases at once, without temporary using
    of the 'op_cond_response' field.

    Signed-off-by: Andrew Gabbasov

    Andrew Gabbasov
     
  • The SD clock could be generated by platform clock or peripheral
    clock for some platforms. This patch adds peripheral clock
    support for T1024/T1040/T2080. To enable it, define
    CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK.

    Signed-off-by: Yangbo Lu
    Cc: York Sun
    Cc: Pantelis Antoniou
    Reviewed-by: York Sun

    Yangbo Lu
     
  • Add adapter card type identification support by reading
    FPGA STAT_PRES1 register SDHC Card ID[0:2] bits. To use this function,
    define CONFIG_FSL_ESDHC_ADAPTER_IDENT.

    Signed-off-by: Yangbo Lu
    Cc: York Sun
    Cc: Pantelis Antoniou
    [York Sun: resolve conflicts in README.fsl-esdhc]
    Reviewed-by: York Sun

    Yangbo Lu
     

04 May, 2015

2 commits

  • The driver-model gpio functions may return another value then -1 as error,
    make the sunxi mmc code properly handle this.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • sun6i and newer (derived) SoCs such as the sun8i-a23, sun8i-a33 and sun9i
    have a various things in common, like having separate ahb reset control
    registers, the SID living inside the pmic, custom pmic busses, new style
    watchdog, etc.

    This commit introduces a new hidden SUNXI_GEN_SUN6I Kconfig bool which can be
    used to check for these features avoiding the need for an ever growing list
    of "#if defined CONFIG_MACH_SUN?I" conditionals as we add support for more
    "new style" sunxi SoCs.

    Note that this commit changes the behavior of the gmac and hdmi code for
    sun8i and the upcoming sun9i devices. This does not matter as sun8i does
    not have gmac nor hdmi, and sun9i has new hardware-blocks for these so
    the old code will not work there.

    Also this is intentional as if a sun8i / sun9i variant which does use the
    old hwblocks shows up then the GEN_SUN6I code paths will be the right ones
    to use.

    For completeness this also adds a SUNXI_GEN_SUN4I bool for A10/A13/A20.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     

29 Apr, 2015

1 commit


24 Apr, 2015

1 commit


28 Mar, 2015

1 commit


18 Mar, 2015

4 commits


17 Mar, 2015

1 commit