- 30 8月, 2017 9 次提交
-
-
由 Jerome Brunet 提交于
In DDR modes, meson mmc controller requires an input rate twice as fast as the output rate Fixes: 51c5d844 ("MMC: meson: initial support for GX platforms") Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
Thanks to devm, carrying the clock structure around after init is not necessary. Rework the function to remove these from the controller host data. Finally, set initial mmc clock rate before enabling it, simplifying the exit condition. Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
Clean-up clk_set function to prepare the next changes (DDR and clk-stop) Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
Remove conditional write of cfg register. Warn if set_clk fails for some reason. Consistently use host->dev instead of mixing with mmc_dev(mmc) Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
cfg init function overwrite values set in the clk init function Remove the cfg pokes from the clk init. Actually, trying to use the CLK_AUTO, like initially tried in clk_init, would break the card initialization Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
On boot, the clock divider value is 0 which is a weird unsupported value. For example, accessing the cfg register with this value set would crash the SoC. Previous change removed 0 as possible value for CCF but forgot to properly initialize the register before registering the clock. This leads to the CCF finding an illegal value, which it complains about. Initialize the register properly in a standalone patch so the fix can be picked up if necessary. The change this fixed is: "mmc: meson-gx: remove CLK_DIVIDER_ALLOW_ZERO clock flag". Reported-by: NNeil Armstrong <narmstrong@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
Remove unused clock rate defines. These should not be defined but requested from the clock framework. Also correct typo on the DELAY register Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
Remove CLK_DIVIDER_ALLOW_ZERO. This flag means that a 1 based divider with a 0 value will behave as a bypass clock The mmc divider does not behave like this, a 0 value disables the clock Remove this flag so CCF never allows a 0 value on this clock Fixes: 51c5d844 ("MMC: meson: initial support for GX platforms") Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jerome Brunet 提交于
CCF generic mux will shift the mask using the value defined in shift Define the mask accordingly Reviewed-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NJerome Brunet <jbrunet@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 12 6月, 2017 1 次提交
-
-
由 Heiner Kallweit 提交于
There have been reports about SDIO failing with certain WiFi chips in descriptor chain mode. SD / eMMC are working fine. So let's fall back to bounce buffer mode for command SD_IO_RW_EXTENDED. This was reported to fix the error. Fixes: 79ed05e3 "mmc: meson-gx: add support for descriptor chain mode" Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Tested-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 25 4月, 2017 27 次提交
-
-
由 Heiner Kallweit 提交于
So far a bounce buffer is used to serialize the scatterlist(s). This overhead can be avoided by switching to descriptor chain mode. As result the performance is drastically improved. On a Odroid-C2 with a 128 GB eMMC module raw reads reach 140 MB/s. Prerequisite for descriptor chain mode is that all scatterlist buffers are 8 byte aligned for 64-bit DMA. That's not always the case, at least the brcmfmac SDIO WiFi driver is known to cause problems. Therefore, for each request, check upfront whether all scatterlist buffers are 8 byte aligned and fall back to bounce buffer mode if that's not the case. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
This patch adds basic tuning which changes the rx clock phase only until a working setting is found. On a Odroid C2 with 128GB eMMC card and 200 MHz MMC clock only 180° rx clock phase make the system boot w/o CRC errors. With other MMC devices / clock speeds this might be different, therefore don't change the driver config in general. When retuning skip the currently active parameter set. This avoids the current problematic config to be chosen again if it causes CRC errors just occasionally. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Introduce struct meson_tuning_params for storing the clock phase configurations. There's no functional change because tx and rx clock phase were implicitely set to CLK_PHASE_0 before. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.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>
-
由 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>
-
由 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>
-
由 Heiner Kallweit 提交于
The variables holding the configuration bits are zero-initialized. So we can remove all bit resets. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Michał Zegan 提交于
This patch fixes the case where meson_mmc_probe function fails before core_clk is enabled. Originally, that would result in a try to disable the core clock, and if it was not already enabled, it would result in a kernel warning. This issue is similar to the one with div_clk. Fix it by introducing another error path used only between successfully enabling the core clock, and successfully enabling the div clock. That would ensure that core clock is disabled only if it was enabled before. Signed-off-by: NMichał Zegan <webczat@webczatnet.pl> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Michał Zegan 提交于
The mmc host was added in meson_mmc_probe, but never removed in meson_mmc_remove. Fix that by removing the host before deallocating other resources. Signed-off-by: NMichał Zegan <webczat@webczatnet.pl> Tested-by: NMichał Zegan <webczat@webczatnet.pl> Acked-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Replace timeout magic numbers with proper constants. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Struct mmc_command includes a reference to the related mmc_request. Therefore we don't have to store mrq separately in struct meson_host. And we can remove some now unneeded WARN_ON's. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Config values which are not changed during runtime we can set in the probe function already. The block size setting is overwritten later in meson_mmc_start_cmd anyway if needed, so it doesn't harm if we remove this setting in meson_mmc_set_ios. In addition write config register only if configuration changed. Don't change the location of clock initialization as in an earlier version of the patch, this change causes a hang. This issue was reported and fix suggested by: Helmut Klein <hgkr.klein@gmail.com> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
CLK core does a deep copy of init.name, therefore it's fully ok to provide a local variable. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
The condition should be "if (ret)" as the disable/unprepare is supposed to be executed if the previous command fails. In addition adjust the error path in probe to properly deal with the case that cfg_div_clk can be registered successfully but enable/prepare fails. In this case we shouldn't call clk_disable_unprepare. Reported-by: NMichał Zegan <webczat_200@poczta.onet.pl> Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Member mux_parent isn't used outside meson_mmc_clk_init. So remove it and replace it with a local variable in meson_mmc_clk_init. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Because the DT requires a fixed number of mux parent clocks, variable mux_parent_count can be replaced with constant MUX_CLK_NUM_PARENTS, so remove it. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Member ocr_mask is never used and member irq we can replace with a local variable in meson_mmc_probe. So let's remove both members. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
The return value of meson_mmc_request_done and meson_mmc_read_resp isn't used, so make both functions return void. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Core ensures that there are no commands with cmd->data being set and nothing to transfer. And we don't have to reset bit CMD_CFG_DATA_NUM because cmd_cfg was zero-initialized and this bit isn't set. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 14 2月, 2017 3 次提交
-
-
由 Heiner Kallweit 提交于
Add support for HS400 mode. The driver still misses support for tuning, therefore highspeed modes like HS400 might not work under all circumstances yet. Successfully tested on a Odroid C2 (S905 GXBB). Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
The remove callback is called only if probe finished successfully. Therefore these checks are not needed. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
A bounce buffer of 512K isn't needed as the max request size is 511 * 512 byte. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Reviewed-by: NKevin Hilman <khilman@baylibre.com> Tested-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-