mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Victor Shih <victorshihgli@gmail.com>, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	benchuanggli@gmail.com, HL.Liu@genesyslogic.com.tw,
	Greg.tu@genesyslogic.com.tw, takahiro.akashi@linaro.org,
	dlunev@chromium.org, Ben Chuang <ben.chuang@genesyslogic.com.tw>,
	Victor Shih <victor.shih@genesyslogic.com.tw>
Subject: Re: [PATCH V14 16/21] mmc: sdhci-uhs2: add request() and others
Date: Tue, 30 Jan 2024 17:31:27 +0200	[thread overview]
Message-ID: <e7d7a434-665b-4912-a2ae-a51e10e332d5@intel.com> (raw)
In-Reply-To: <20240123062827.8525-17-victorshihgli@gmail.com>

On 23/01/24 08:28, Victor Shih wrote:
> From: Victor Shih <victor.shih@genesyslogic.com.tw>
> 
> This is a sdhci version of mmc's request operation.
> It covers both UHS-I and UHS-II.
> 
> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
> ---
> 
> Updates in V14:
>  - Use mmc_card_uhs2() to stead sdhci_uhs2_mode() in the
>    sdhci_uhs2_request().
> 
> Updates in V13:
>  - Re-order function to avoid declaration.
>  - Remove unnecessary function.
> 
> Updates in V11:
>  - Drop the check mmc_card_uhs2_hd_mode(host->mmc)
>    in sdhci_uhs2_set_transfer_mode().
> 
> Updates in V10:
>  - Use tmode_half_duplex to instead of uhs2_tmode0_flag
>    in sdhci_uhs2_set_transfer_mode().
> 
> Updates in V9:
>  - Modify the annotations in __sdhci_uhs2_send_command().
> 
> Updates in V8:
>  - Adjust the position of matching brackets in
>    sdhci_uhs2_send_command_retry().
>  - Modify CameCase definition in __sdhci_uhs2_finish_command().
>  - Modify error message in __sdhci_uhs2_finish_command().
>  - sdhci_uhs2_send_command_retry() to instead of sdhci_uhs2_send_command()
>    in sdhci_uhs2_request().
>  - Use sdhci_uhs2_mode() to simplify code in sdhci_uhs2_request_atomic().
>  - Add forward declaration for sdhci_send_command().
> 
> Updates in V7:
>  - Cancel export state of some functions.
>  - Remove unnecessary whitespace changes.
> 
> Updates in V6:
>  - Add uhs2_dev_cmd() to simplify code.
>  - Remove unnecessary functions.
>  - Cancel export state of some functions.
>  - Drop use CONFIG_MMC_DEBUG().
>  - Wrap at 100 columns in some functions.
> 
> ---
> 
>  drivers/mmc/host/sdhci-uhs2.c | 379 +++++++++++++++++++++++++++++++++-
>  drivers/mmc/host/sdhci.c      |  49 +++--
>  drivers/mmc/host/sdhci.h      |   8 +
>  3 files changed, 420 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c
> index 0c543899ed6c..b47bcf6f890f 100644
> --- a/drivers/mmc/host/sdhci-uhs2.c
> +++ b/drivers/mmc/host/sdhci-uhs2.c
> @@ -14,6 +14,8 @@
>  #include <linux/module.h>
>  #include <linux/iopoll.h>
>  #include <linux/bitfield.h>
> +#include <linux/mmc/mmc.h>
> +#include <linux/mmc/host.h>
>  
>  #include "sdhci.h"
>  #include "sdhci-uhs2.h"
> @@ -29,6 +31,8 @@
>  #define UHS2_INTERFACE_DETECT_TIMEOUT_100MS	100000
>  #define UHS2_LANE_SYNC_TIMEOUT_150MS		150000
>  
> +#define UHS2_ARG_IOADR_MASK 0xfff
> +
>  void sdhci_uhs2_dump_regs(struct sdhci_host *host)
>  {
>  	if (!(mmc_card_uhs2(host->mmc)))
> @@ -63,6 +67,11 @@ EXPORT_SYMBOL_GPL(sdhci_uhs2_dump_regs);
>   *                                                                           *
>  \*****************************************************************************/
>  
> +static inline u16 uhs2_dev_cmd(struct mmc_command *cmd)
> +{
> +	return be16_to_cpu((__be16)cmd->uhs2_cmd->arg) & UHS2_ARG_IOADR_MASK;
> +}
> +
>  static inline int mmc_opt_regulator_set_ocr(struct mmc_host *mmc,
>  					    struct regulator *supply,
>  					    unsigned short vdd_bit)
> @@ -140,7 +149,7 @@ static void sdhci_uhs2_set_power(struct sdhci_host *host, unsigned char mode, un
>  
>  static u8 sdhci_calc_timeout_uhs2(struct sdhci_host *host, u8 *cmd_res, u8 *dead_lock)
>  {
> -	/* timeout in us */
> +	/* timeout in us */#define UHS2_ARG_IOADR_MASK 0xfff

Extraneous "#define UHS2_ARG_IOADR_MASK 0xfff"



  reply	other threads:[~2024-01-30 15:31 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23  6:28 [PATCH V14 00/21] Add support UHS-II for GL9755 Victor Shih
2024-01-23  6:28 ` [PATCH V14 01/21] mmc: core: Cleanup printing of speed mode at card insertion Victor Shih
2024-01-23  6:28 ` [PATCH V14 02/21] mmc: core: Prepare to support SD UHS-II cards Victor Shih
2024-01-23  6:28 ` [PATCH V14 03/21] mmc: core: Announce successful insertion of an SD UHS-II card Victor Shih
2024-01-23  6:28 ` [PATCH V14 04/21] mmc: core: Extend support for mmc regulators with a vqmmc2 Victor Shih
2024-01-23  6:28 ` [PATCH V14 05/21] mmc: core: Add definitions for SD UHS-II cards Victor Shih
2024-01-23  6:28 ` [PATCH V14 06/21] mmc: core: Add New function to re-factoring the code Victor Shih
2024-01-23  6:28 ` [PATCH V14 07/21] mmc: core: Support UHS-II card control and access Victor Shih
2024-01-27  8:28   ` Victor Shih
2024-01-30  9:36     ` Adrian Hunter
2024-05-22  9:04       ` Victor Shih
2024-05-22  9:11         ` Adrian Hunter
2024-05-22 10:46           ` Victor Shih
2024-01-23  6:28 ` [PATCH V14 08/21] mmc: sdhci: add UHS-II related definitions in headers Victor Shih
2024-01-23  6:28 ` [PATCH V14 09/21] mmc: sdhci: add UHS-II module and add a kernel configuration Victor Shih
2024-01-23  6:28 ` [PATCH V14 10/21] mmc: sdhci-uhs2: dump UHS-II registers Victor Shih
2024-01-23  6:28 ` [PATCH V14 11/21] mmc: sdhci-uhs2: add reset function function Victor Shih
2024-01-23  6:28 ` [PATCH V14 12/21] mmc: sdhci-uhs2: add set_power() to support vdd2 Victor Shih
2024-01-23  6:28 ` [PATCH V14 13/21] mmc: sdhci-uhs2: add set_timeout() Victor Shih
2024-01-23  6:28 ` [PATCH V14 14/21] mmc: sdhci-uhs2: add set_ios() Victor Shih
2024-01-23  6:28 ` [PATCH V14 15/21] mmc: sdhci-uhs2: add uhs2_control() to initialise the interface Victor Shih
2024-01-23  6:28 ` [PATCH V14 16/21] mmc: sdhci-uhs2: add request() and others Victor Shih
2024-01-30 15:31   ` Adrian Hunter [this message]
2024-05-22  9:04     ` Victor Shih
2024-01-23  6:28 ` [PATCH V14 17/21] mmc: sdhci-uhs2: add irq() " Victor Shih
2024-01-23  6:28 ` [PATCH V14 18/21] mmc: sdhci-uhs2: add add_host() and others to set up the driver Victor Shih
2024-01-23  6:28 ` [PATCH V14 19/21] mmc: sdhci-uhs2: add pre-detect_init hook Victor Shih
2024-01-23  6:28 ` [PATCH V14 20/21] mmc: sdhci-pci: add UHS-II support framework Victor Shih
2024-01-23  6:28 ` [PATCH V14 21/21] mmc: sdhci-pci-gli: enable UHS-II mode for GL9755 Victor Shih
2024-03-16 19:54 ` [PATCH V14 00/21] Add support UHS-II " Victor Shih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7d7a434-665b-4912-a2ae-a51e10e332d5@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Greg.tu@genesyslogic.com.tw \
    --cc=HL.Liu@genesyslogic.com.tw \
    --cc=ben.chuang@genesyslogic.com.tw \
    --cc=benchuanggli@gmail.com \
    --cc=dlunev@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.shih@genesyslogic.com.tw \
    --cc=victorshihgli@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®