1. 07 11月, 2017 1 次提交
    • B
      mmc: fsl_esdhc: Fix PIO timeout · bcfb3653
      Benoît Thébaudeau 提交于
      The following error has been observed on i.MX25 with a high-speed SDSC
      card:
          Data Write Failed in PIO Mode.
      
      It was caused by the timeout set on PRSSTAT.BWEN, which was triggered
      because this bit takes 15 ms to be set after writing the first block to
      DATPORT with this card. Without this timeout, all the blocks are
      properly written.
      
      This timeout was implemented by decrementing a variable, so it was
      depending on the CPU frequency. Fix this issue by setting this timeout
      to a long enough absolute duration (500 ms).
      Signed-off-by: NBenoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Reviewed-by: NFabio Estevam <fabio.estevam@nxp.com>
      Reviewed-by: NJagan Teki <jagan@openedev.com>
      bcfb3653
  2. 17 8月, 2017 10 次提交
  3. 10 8月, 2017 2 次提交
  4. 12 7月, 2017 3 次提交
    • P
      mmc: fsl_esdhc: drop CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT · f34ccce5
      Peng Fan 提交于
      CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT is not the correct method
      to set I/O to 1.8. To boards that does not support vqmmc-supply,
      use vs18_enable in fsl_esdhc_cfg. If regulator is supported,
      use fixed 1.8V regulator for vqmmc-supply.
      Signed-off-by: NPeng Fan <peng.fan@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      f34ccce5
    • P
      dm: mmc: fsl_esdhc: handle vqmmc supply · 4483b7eb
      Peng Fan 提交于
      Handle vqmmc supply. Some boards have a fixed I/O voltage
      at 1.8V for emmc, so the usdhc also needs to be configured
      as 1.8V by setting VSELECT bit. The vs18_enable is the one
      that used to checking whether setting VSELECT or not in
      the driver. So if vqmmc supply is 1.8V, set vs18_enable,
      the driver will set VSELECT.
      Signed-off-by: NPeng Fan <peng.fan@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
      4483b7eb
    • P
      mmc: fsl_esdhc: introduce vs18_enable for 1.8V fix I/O · 32a9179f
      Peng Fan 提交于
      When using eMMC with 1.8V I/O, the VSELECT bit need to be set in
      the USDHC controller when init.
      
      This patch adds a parameter "vs18_enable" in fsl_esdhc_cfg
      structure and priv data, so each controller can have different
      settings.
      
      We could not use CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT, it has problem
      that it will apply to all USDHC controllers and it only set the 1.8V
      at init phase. So if user does not select to the eMMC device,
      the voltage on the I/O pins are not correct.
      Signed-off-by: NPeng Fan <peng.fan@nxp.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      32a9179f
  5. 01 6月, 2017 2 次提交
    • S
      dm: gpio: Add live tree support · 150c5afe
      Simon Glass 提交于
      Add support for requesting GPIOs with a live device tree.
      
      This involves adjusting the function signature for the legacy function
      gpio_request_by_name_nodev(), so fix up all callers.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      Fixes to stm32f746-disco.c:
      Signed-off-by: NTom Rini <trini@konsulko.com>
      150c5afe
    • S
      dm: Rename dev_addr..() functions · a821c4af
      Simon Glass 提交于
      These support the flat device tree. We want to use the dev_read_..()
      prefix for functions that support both flat tree and live tree. So rename
      the existing functions to avoid confusion.
      
      In the end we will have:
      
         1. dev_read_addr...()    - works on devices, supports flat/live tree
         2. devfdt_get_addr...()  - current functions, flat tree only
         3. of_get_address() etc. - new functions, live tree only
      
      All drivers will be written to use 1. That function will in turn call
      either 2 or 3 depending on whether the flat or live tree is in use.
      
      Note this involves changing some dead code - the imx_lpi2c.c file.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      a821c4af
  6. 31 5月, 2017 2 次提交
  7. 17 3月, 2017 1 次提交
  8. 08 2月, 2017 1 次提交
    • S
      dm: core: Replace of_offset with accessor · e160f7d4
      Simon Glass 提交于
      At present devices use a simple integer offset to record the device tree
      node associated with the device. In preparation for supporting a live
      device tree, which uses a node pointer instead, refactor existing code to
      access this field through an inline function.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      e160f7d4
  9. 19 1月, 2017 3 次提交
  10. 11 1月, 2017 1 次提交
  11. 04 10月, 2016 1 次提交
  12. 05 8月, 2016 2 次提交
  13. 29 6月, 2016 3 次提交
    • P
      mmc: fsl: introduce wp_enable · 1483151e
      Peng Fan 提交于
      Introudce wp_enable. To check WPSPL, wp_enable needs to be set
      to 1 in board code.
      
      Take i.MX6UL for example, for some boards, they do not use WP singal,
      so they does not configure USDHC1_WP_SELECT_INPUT, and its default
      value is 0(GPIO1_IO02). However GPIO1_IO02 is muxed for i2c usage and
      SION bit set. So USDHC controller can always get wp signal and WPSPL
      shows write protect and blocks driver continuing. This is not what
      we want to see, so add wp_enable, and if set to 0, just omit the
      WPSPL checking and this does not effect normal working of usdhc
      controller.
      
      If wp-gpios is provided in dts, wp_enable is set to 1, otherwise 0.
      Signed-off-by: NPeng Fan <van.freenix@gmail.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Tested-by: NFabio Estevam <fabio.estevam@nxp.com>
      Reviewed-by: NYork Sun <york.sun@nxp.com>
      1483151e
    • Y
      fsl_esdhc: Update clock enable bits for USDHC · 84ecdf6d
      Ye Li 提交于
      The USDHC moves the 4 clock bits CARD_CLK_SOFT_EN, IPG_PERCLK_SOFT_EN,
      HCLK_SOFT_EN, and IPG_CLK_SOFT_EN from sysctl register to vendorspec
      register. The driver uses RSTA to replace the clock gate off
      operation. But this is not a good solution because:
      1. when using RSTA, we should wait this bit to clear by itself. This is not
         implemeneted in the code.
      2. After RSTA is set, it is recommended that the Host Driver reset the
         external card and reinitialize it.
      
      So in this patch, we change to use the vendorspec registers for these bits
      operation.
      Signed-off-by: NYe Li <ye.li@nxp.com>
      Signed-off-by: NPeng Fan <van.freenix@gmail.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Tested-by: NFabio Estevam <fabio.estevam@nxp.com>
      Reviewed-by: NYork Sun <york.sun@nxp.com>
      84ecdf6d
    • P
      mmc: fsl: reset to normal boot mode when eMMC fast boot · f53225cc
      Peng Fan 提交于
      When booting in eMMC fast boot, MMC host does not exit from
      boot mode after bootrom loading image. So the first command
      'CMD0' sent in uboot will pull down the CMD line to low and
      cause errors.
      
      This patch cleans the MMC boot register in "mmc_init" to put the
      MMC host back to normal mode.
      
      Also clear DLL_CTRL delay line settings at USDHC initialization
      to eliminate the pre-settings from boot rom.
      Signed-off-by: NPeng Fan <van.freenix@gmail.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Tested-by: NFabio Estevam <fabio.estevam@nxp.com>
      Reviewed-by: NYork Sun <york.sun@nxp.com>
      f53225cc
  14. 13 6月, 2016 1 次提交
  15. 04 6月, 2016 1 次提交
  16. 06 4月, 2016 1 次提交
    • P
      fsl: esdhc: support driver model · 96f0407b
      Peng Fan 提交于
      Support Driver Model for fsl esdhc driver.
      
      1. Introduce a new structure struct fsl_esdhc_priv
      2. Refactor fsl_esdhc_initialize which is originally used by board code.
         - Introduce fsl_esdhc_init to be common usage for DM and non-DM
         - Introduce fsl_esdhc_cfg_to_priv to build the bridge for non-DM part.
         - The original API for board code is still there, but we use
           'fsl_esdhc_cfg_to_priv' and 'fsl_esdhc_init' to serve it.
      3. All the functions are changed to use 'struct fsl_esdhc_priv', except
         fsl_esdhc_initialize.
      4. Since clk driver is not implemented, use mxc_get_clock to geth
         the clk and fill 'priv->sdhc_clk'.
      
      Has been tested on i.MX6UL 14X14 EVK board:
      "
      =>dm tree
      ....
       simple_bus  [ + ]    |   `-- aips-bus@02100000
        mmc        [ + ]    |       |-- usdhc@02190000
        mmc        [ + ]    |       |-- usdhc@02194000
      ....
      => mmc list
      FSL_SDHC: 0 (SD)
      FSL_SDHC: 1 (SD)
      "
      Signed-off-by: NPeng Fan <van.freenix@gmail.com>
      Cc: York Sun <york.sun@nxp.com>
      Cc: Yangbo Lu <yangbo.lu@nxp.com>
      Cc: Hector Palacios <hector.palacios@digi.com>
      Cc: Eric Nelson <eric@nelint.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      Cc: Simon Glass <sjg@chromium.org>
      Tested-By: NEric Nelson <eric@nelint.com>
      Reviewed-by: NYork Sun <york.sun@nxp.com>
      96f0407b
  17. 28 1月, 2016 2 次提交
  18. 03 1月, 2016 1 次提交
  19. 03 11月, 2015 2 次提交