- 25 4月, 2017 40 次提交
-
-
由 Jan Glauber 提交于
Add a platform driver for ThunderX ARM SOCs. Signed-off-by: NJan Glauber <jglauber@cavium.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jan Glauber 提交于
This core driver will be used by a MIPS platform driver or by an ARM64 PCI driver. The core driver implements the mmc_host_ops and slot probe & remove functions. Callbacks are provided to allow platform specific interrupt enable and bus locking. The host controller supports: - up to 4 slots that can contain sd-cards or eMMC chips - 1, 4 and 8 bit bus width - SDR and DDR - transfers up to 52 Mhz (might be less when multiple slots are used) - DMA read/write - multi-block read/write (but not stream mode) Voltage is limited to 3.3v and shared for all slots (vmmc and vmmcq). A global lock for all MMC devices is required because the host controller is shared. Signed-off-by: NJan Glauber <jglauber@cavium.com> Signed-off-by: NDavid Daney <david.daney@cavium.com> Signed-off-by: NSteven J. Hill <steven.hill@cavium.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jan Glauber 提交于
Add description of Cavium Octeon and ThunderX SOC device tree bindings. CC: Ulf Hansson <ulf.hansson@linaro.org> CC: Rob Herring <robh+dt@kernel.org> CC: Mark Rutland <mark.rutland@arm.com> CC: devicetree@vger.kernel.org Signed-off-by: NJan Glauber <jglauber@cavium.com> Signed-off-by: NDavid Daney <david.daney@cavium.com> Signed-off-by: NSteven J. Hill <steven.hill@cavium.com> Acked-by: NRob Herring <robh+dt@kernel.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Linus Walleij 提交于
We have this construction: if (a && b && !c) finalize; else block; finalize; Which is equivalent by boolean logic to: if (!a || !b || c) block; finalize; Which is simpler code. Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Linus Walleij 提交于
mmc_wait_for_data_req_done() is called in exactly one place, and having it spread out is making things hard to oversee. Factor this function into mmc_finalize_areq(). Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Linus Walleij 提交于
"previous" is a better name for the variable storing the previous asynchronous request, better than the opaque name "data" atleast. We see that we assign the return status to the returned variable on all code paths, so we might as well just do that immediately after calling mmc_finalize_areq(). Reviewed-by: NBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
In preparation to reuse the code for CQE support. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
In preparation to reuse the code for CQE support. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
Factor out data preparation into a separate function mmc_blk_data_prep() which can be re-used for command queuing. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
mmc_apply_rel_rw() will be used by Software Command Queuing also. In that case the command argument is not the block address so change mmc_apply_rel_rw() to get block address from the request. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
RPMB does not allow Command Queue commands. Disable and re-enable the Command Queue when switching. Note that the driver only switches partitions when the queue is empty. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NHarjani Ritesh <riteshh@codeaurora.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
Normal read and write commands may not be used while the command queue is enabled. Disable the Command Queue when mmc_test is probed and re-enable it when it is removed. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NHarjani Ritesh <riteshh@codeaurora.org> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
Add helper functions to enable or disable the Command Queue. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
eMMC can have multiple internal partitions that are represented as separate disks / queues. However switching between partitions is only done when the queue is empty. Consequently the array of mmc requests that are queued can be shared between partitions saving memory. Keep a pointer to the mmc request queue on the card, and use that instead of allocating a new one for each partition. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
Change from viewing the requests in progress as 'current' and 'previous', to viewing them as a queue. The current request is allocated to the first free slot. The presence of incomplete requests is determined from the count (mq->qcnt) of entries in the queue. Non-read-write requests (i.e. discards and flushes) are not added to the queue at all and require no special handling. Also no special handling is needed for the MMC_BLK_NEW_REQUEST case. As well as allowing an arbitrarily sized queue, the queue thread function is significantly simpler. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
A subsequent patch will remove 'mq->mqrq_cur'. Prepare for that by assigning it to a local variable. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Sergio Prado 提交于
Allows configuring Samsung S3C24XX MMC/SD/SDIO controller using a device tree. Signed-off-by: NSergio Prado <sergio.prado@e-labworks.com> [Arnd: fix broken conditional expression] Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Sergio Prado 提交于
Adds the device tree bindings description for Samsung S3C24XX MMC/SD/SDIO controller, used as a connectivity interface with external MMC, SD and SDIO storage mediums. Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NSergio Prado <sergio.prado@e-labworks.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Azhar Shaikh 提交于
Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: NAzhar Shaikh <azhar.shaikh@intel.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Azhar Shaikh 提交于
Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: NAzhar Shaikh <azhar.shaikh@intel.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Factor out setting the response configuration bits thus further reducing complexity of function meson_mmc_start_cmd. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Factor out setting the block size. This also contributes to reducing complexity of function meson_mmc_start_cmd. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Piotr Sroka 提交于
Use added dev variable for devm_clk_get. Signed-off-by: NPiotr Sroka <piotrs@cadence.com> Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Piotr Sroka 提交于
DTS properties are used instead of fixed data because PHY settings can be different for different chips/boards. Signed-off-by: NPiotr Sroka <piotrs@cadence.com> Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Piotr Sroka 提交于
DTS properties are used instead of fixed data because PHY settings can be different for different chips/boards. Add description of new DLL PHY delays. Signed-off-by: NPiotr Sroka <piotrs@cadence.com> Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Piotr Sroka 提交于
Add polling for ACK to be sure that data are written to PHY register. Signed-off-by: NPiotr Sroka <piotrs@cadence.com> Reviewed-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Stefan Wahren 提交于
This fixes a NULL pointer dereference in case of a MMC request with a set block count command and no data. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Tested-by: NPeter Robinson <pbrobinson@gmail.com> Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Use new core function mmc_get_dma_dir(). Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Add function for determining DMA direction to core. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
CMD23 mode (use "set block count" command before transferring multiple data blocks) typically is more performant as host / card know upfront how many data blocks to expect. Therefore add support for this mode to the driver. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Currently we use a fixed timeout of 4s for all data transfers. Switch to dynamic timeout values by making use of data->timeout_ns. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
So far the driver name is used as interrupt description, therefore in /proc/interrupts it's not possible to tell which interrupt belongs to which port. Change this by switching to NULL what causes the default (device name) to be used. In our case that's the DT node name. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Use GENMASK consistently for all bit masks and switch to using the bitfield macros FIELD_GET and FIELD_PREP. This hides parts of the complexity of dealing with bit fields. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Shawn Lin 提交于
Currently the get_timeout_clock callback doesn't clearly have a statement that it needs the variant drivers to return the timeout clock rate in kHz if the SDHCI_TIMEOUT_CLK_UNIT isn't present, otherwise the variant drivers should return it in MHz. It's also very likely that further variant drivers which are going to use this callback will be confused by this situation. Given the fact that moderm sdhci variant hosts are very prone to get the timeout clock from common clock framework (actually the only three users did that), it's more natural to return the value in Hz and we make an explicit comment there. Then we put the unit conversion inside the sdhci core. Thus will improve the code and prevent further misuses. Reported-by: NAnssi Hannula <anssi.hannula@bitwise.fi> Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Acked-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Icenowy Zheng 提交于
The controller's errors are usually normal (for example, for MMC or SDIO cards, some errors are expected to happen; and for boards without a dedicated card detect pin the error info will even flood console and hide other normal messages) and hard to understand. Change their print level to debug, thus it won't be shown to generic users. Signed-off-by: NIcenowy Zheng <icenowy@aosc.xyz> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
We don't need variable cmd_cfg_timeout, so remove it and simplify the code a little. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Centralize setting data->bytes_xfered in one place and make sure that the number of transfererd bytes is set only if we receive the end-of-chain interrupt and there was no error. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Response reading can be slightly improved by doing it in just one place. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Simplify the code by using two variables instead of a struct sd_emmc_desc. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Replace cmd->data with a local variable to simplify code a little. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-