History log of /openbmc/linux/drivers/mmc/host/meson-gx-mmc.c (Results 176 – 200 of 227)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 74858655 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: simplify interrupt handler

No functional change, just improve interrupt handler readability

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome

mmc: meson-gx: simplify interrupt handler

No functional change, just improve interrupt handler readability

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 1e03331d 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: work around clk-stop issue

It seems that the mmc clock is also used and required, somehow, by
the controller itself.

It is shown during init, when writing to CFG

mmc: meson-gx: work around clk-stop issue

It seems that the mmc clock is also used and required, somehow, by
the controller itself.

It is shown during init, when writing to CFG while the divider is set
to 0 will crash the SoC. During a voltage switch, the controller may
crash and the card may then fail to exit busy state if the clock is
stopped.

To avoid this, it is best to keep the clock running for the controller,
except during rate change. However, we still need to be able to gate
the clock out of the SoC. Let's use the pinmux for this, and fallback
to gpio mode (pulled-down) when we need to gate the clock

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 844c8a75 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: fix dual data rate mode frequencies

In DDR modes, meson mmc controller requires an input rate twice as fast
as the output rate

Fixes: 51c5d8447bd7 ("MMC: meson: i

mmc: meson-gx: fix dual data rate mode frequencies

In DDR modes, meson mmc controller requires an input rate twice as fast
as the output rate

Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms")
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# bd911ec4 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: rework clock init function

Thanks to devm, carrying the clock structure around after init is not
necessary. Rework the function to remove these from the controller host

mmc: meson-gx: rework clock init function

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: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# f89f55df 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: rework clk_set function

Clean-up clk_set function to prepare the next changes (DDR and clk-stop)

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: J

mmc: meson-gx: rework clk_set function

Clean-up clk_set function to prepare the next changes (DDR and clk-stop)

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# c36cf125 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: rework set_ios function

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)

mmc: meson-gx: rework set_ios function

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: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 3c39e2ca 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: cfg init overwrite values

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,

mmc: meson-gx: cfg init overwrite values

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: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# ef5c4815 28-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: initialize sane clk default before clock register

On boot, the clock divider value is 0 which is a weird unsupported value.
For example, accessing the cfg register with th

mmc: meson-gx: initialize sane clk default before clock register

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: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 52899b99 21-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: clean up some constants

Remove unused clock rate defines. These should not be defined but
requested from the clock framework.

Also correct typo on the DELAY regis

mmc: meson-gx: clean up some constants

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: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 130b4bd8 21-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: remove CLK_DIVIDER_ALLOW_ZERO clock flag

Remove CLK_DIVIDER_ALLOW_ZERO. This flag means that a 1 based divider
with a 0 value will behave as a bypass clock

The mm

mmc: meson-gx: remove CLK_DIVIDER_ALLOW_ZERO clock flag

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: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms")
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# c1d04caa 21-Aug-2017 Jerome Brunet <jbrunet@baylibre.com>

mmc: meson-gx: fix mux mask definition

CCF generic mux will shift the mask using the value defined in shift
Define the mask accordingly

Reviewed-by: Kevin Hilman <khilman@baylib

mmc: meson-gx: fix mux mask definition

CCF generic mux will shift the mask using the value defined in shift
Define the mask accordingly

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


Revision tags: v4.12
# 24835611 10-Jun-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: work around broken SDIO with certain WiFi chips

There have been reports about SDIO failing with certain WiFi chips in
descriptor chain mode. SD / eMMC are working fine.

mmc: meson-gx: work around broken SDIO with certain WiFi chips

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: 79ed05e329c3 "mmc: meson-gx: add support for descriptor chain mode"
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


Revision tags: v4.10.17, v4.10.16, v4.10.15, v4.10.14, v4.10.13, v4.10.12, v4.10.11, v4.10.10, v4.10.9
# 79ed05e3 07-Apr-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: add support for descriptor chain mode

So far a bounce buffer is used to serialize the scatterlist(s).
This overhead can be avoided by switching to descriptor chain mode.

mmc: meson-gx: add support for descriptor chain mode

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: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 0b6ed71c 04-Apr-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: add basic tuning for rx clock phase

This patch adds basic tuning which changes the rx clock phase only
until a working setting is found.

On a Odroid C2 with 128GB

mmc: meson-gx: add basic tuning for rx clock phase

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: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# c08bcb6c 04-Apr-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: introduce struct meson_tuning_params

Introduce struct meson_tuning_params for storing the clock phase
configurations. There's no functional change because tx and rx
cl

mmc: meson-gx: introduce struct meson_tuning_params

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: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


Revision tags: v4.10.8, v4.10.7
# 75c7fd96 27-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: factor out setting response configuration bits

Factor out setting the response configuration bits thus further reducing
complexity of function meson_mmc_start_cmd.

mmc: meson-gx: factor out setting response configuration bits

Factor out setting the response configuration bits thus further reducing
complexity of function meson_mmc_start_cmd.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 3d03f6a9 27-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: factor out setting block size

Factor out setting the block size. This also contributes to reducing
complexity of function meson_mmc_start_cmd.

Signed-off-by: Hein

mmc: meson-gx: factor out setting block size

Factor out setting the block size. This also contributes to reducing
complexity of function meson_mmc_start_cmd.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


Revision tags: v4.10.6
# e5e4a3eb 25-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: add CMD23 mode

CMD23 mode (use "set block count" command before transferring multiple
data blocks) typically is more performant as host / card know upfront
how many da

mmc: meson-gx: add CMD23 mode

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: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 4eee86c3 25-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: switch to dynamic timeout values

Currently we use a fixed timeout of 4s for all data transfers. Switch
to dynamic timeout values by making use of data->timeout_ns.

mmc: meson-gx: switch to dynamic timeout values

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: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# f016c676 25-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: use per port interrupt names

So far the driver name is used as interrupt description, therefore in
/proc/interrupts it's not possible to tell which interrupt belongs to

mmc: meson-gx: use per port interrupt names

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: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# 1231e7eb 25-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: use bitfield macros

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

mmc: meson-gx: use bitfield macros

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: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

show more ...


# a744c6fe 22-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: simplify setting timeout configuration parameters

We don't need variable cmd_cfg_timeout, so remove it and simplify the
code a little.

Signed-off-by: Heiner Kallw

mmc: meson-gx: simplify setting timeout configuration parameters

We don't need variable cmd_cfg_timeout, so remove it and simplify the
code a little.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>

show more ...


# 2c8d96a4 22-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: improve setting data->bytes_xfered

Centralize setting data->bytes_xfered in one place and make sure
that the number of transfererd bytes is set only if we receive
the

mmc: meson-gx: improve setting data->bytes_xfered

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: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>

show more ...


# 1f8066d9 22-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: improve response reading

Response reading can be slightly improved by doing it in just one place.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off

mmc: meson-gx: improve response reading

Response reading can be slightly improved by doing it in just one place.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>

show more ...


# a322febe 22-Mar-2017 Heiner Kallweit <hkallweit1@gmail.com>

mmc: meson-gx: improve variable usage in meson_mmc_start_cmd

Simplify the code by using two variables instead of a struct sd_emmc_desc.

Signed-off-by: Heiner Kallweit <hkallweit1@gm

mmc: meson-gx: improve variable usage in meson_mmc_start_cmd

Simplify the code by using two variables instead of a struct sd_emmc_desc.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>

show more ...


12345678910