Re: [PATCH 2/2] mmc: core: remove obsolete mmc_set_blockcount() function

2018-12-05 Thread Ulf Hansson
On Mon, 26 Nov 2018 at 14:38, Wolfram Sang
 wrote:
>
> The only user was converted to fill a sbc command which is the proper
> way to do it because of AutoCMD23 feature of some hosts.
>
> Signed-off-by: Wolfram Sang 
> Tested-by: Clément Péron 

Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/core/core.c | 14 --
>  drivers/mmc/core/core.h |  2 --
>  2 files changed, 16 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 50a5c340307b..d3085f70e9a4 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2413,20 +2413,6 @@ int mmc_set_blocklen(struct mmc_card *card, unsigned 
> int blocklen)
>  }
>  EXPORT_SYMBOL(mmc_set_blocklen);
>
> -int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount,
> -   bool is_rel_write)
> -{
> -   struct mmc_command cmd = {};
> -
> -   cmd.opcode = MMC_SET_BLOCK_COUNT;
> -   cmd.arg = blockcount & 0x;
> -   if (is_rel_write)
> -   cmd.arg |= 1 << 31;
> -   cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
> -   return mmc_wait_for_cmd(card->host, , 5);
> -}
> -EXPORT_SYMBOL(mmc_set_blockcount);
> -
>  static void mmc_hw_reset_for_init(struct mmc_host *host)
>  {
> mmc_pwrseq_reset(host);
> diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
> index 087ba68b2920..8fb6bc37f808 100644
> --- a/drivers/mmc/core/core.h
> +++ b/drivers/mmc/core/core.h
> @@ -118,8 +118,6 @@ int mmc_erase_group_aligned(struct mmc_card *card, 
> unsigned int from,
>  unsigned int mmc_calc_max_discard(struct mmc_card *card);
>
>  int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen);
> -int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount,
> -   bool is_rel_write);
>
>  int __mmc_claim_host(struct mmc_host *host, struct mmc_ctx *ctx,
>  atomic_t *abort);
> --
> 2.11.0
>


Re: [PATCH 2/2] mmc: core: remove obsolete mmc_set_blockcount() function

2018-11-26 Thread Niklas Söderlund
Hi Wolfram,

Thanks for your patch.

On 2018-11-26 14:38:14 +0100, Wolfram Sang wrote:
> The only user was converted to fill a sbc command which is the proper
> way to do it because of AutoCMD23 feature of some hosts.
> 
> Signed-off-by: Wolfram Sang 
> Tested-by: Clément Péron 

Reviewed-by: Niklas Söderlund 

> ---
>  drivers/mmc/core/core.c | 14 --
>  drivers/mmc/core/core.h |  2 --
>  2 files changed, 16 deletions(-)
> 
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 50a5c340307b..d3085f70e9a4 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -2413,20 +2413,6 @@ int mmc_set_blocklen(struct mmc_card *card, unsigned 
> int blocklen)
>  }
>  EXPORT_SYMBOL(mmc_set_blocklen);
>  
> -int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount,
> - bool is_rel_write)
> -{
> - struct mmc_command cmd = {};
> -
> - cmd.opcode = MMC_SET_BLOCK_COUNT;
> - cmd.arg = blockcount & 0x;
> - if (is_rel_write)
> - cmd.arg |= 1 << 31;
> - cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
> - return mmc_wait_for_cmd(card->host, , 5);
> -}
> -EXPORT_SYMBOL(mmc_set_blockcount);
> -
>  static void mmc_hw_reset_for_init(struct mmc_host *host)
>  {
>   mmc_pwrseq_reset(host);
> diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
> index 087ba68b2920..8fb6bc37f808 100644
> --- a/drivers/mmc/core/core.h
> +++ b/drivers/mmc/core/core.h
> @@ -118,8 +118,6 @@ int mmc_erase_group_aligned(struct mmc_card *card, 
> unsigned int from,
>  unsigned int mmc_calc_max_discard(struct mmc_card *card);
>  
>  int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen);
> -int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount,
> - bool is_rel_write);
>  
>  int __mmc_claim_host(struct mmc_host *host, struct mmc_ctx *ctx,
>atomic_t *abort);
> -- 
> 2.11.0
> 

-- 
Regards,
Niklas Söderlund


RE: [PATCH 2/2] mmc: core: remove obsolete mmc_set_blockcount() function

2018-11-26 Thread Avri Altman
> 
> The only user was converted to fill a sbc command which is the proper
> way to do it because of AutoCMD23 feature of some hosts.
> 
> Signed-off-by: Wolfram Sang 
> Tested-by: Clément Péron 
Reviewed-by: Avri Altman 


[PATCH 2/2] mmc: core: remove obsolete mmc_set_blockcount() function

2018-11-26 Thread Wolfram Sang
The only user was converted to fill a sbc command which is the proper
way to do it because of AutoCMD23 feature of some hosts.

Signed-off-by: Wolfram Sang 
Tested-by: Clément Péron 
---
 drivers/mmc/core/core.c | 14 --
 drivers/mmc/core/core.h |  2 --
 2 files changed, 16 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 50a5c340307b..d3085f70e9a4 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2413,20 +2413,6 @@ int mmc_set_blocklen(struct mmc_card *card, unsigned int 
blocklen)
 }
 EXPORT_SYMBOL(mmc_set_blocklen);
 
-int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount,
-   bool is_rel_write)
-{
-   struct mmc_command cmd = {};
-
-   cmd.opcode = MMC_SET_BLOCK_COUNT;
-   cmd.arg = blockcount & 0x;
-   if (is_rel_write)
-   cmd.arg |= 1 << 31;
-   cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
-   return mmc_wait_for_cmd(card->host, , 5);
-}
-EXPORT_SYMBOL(mmc_set_blockcount);
-
 static void mmc_hw_reset_for_init(struct mmc_host *host)
 {
mmc_pwrseq_reset(host);
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index 087ba68b2920..8fb6bc37f808 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -118,8 +118,6 @@ int mmc_erase_group_aligned(struct mmc_card *card, unsigned 
int from,
 unsigned int mmc_calc_max_discard(struct mmc_card *card);
 
 int mmc_set_blocklen(struct mmc_card *card, unsigned int blocklen);
-int mmc_set_blockcount(struct mmc_card *card, unsigned int blockcount,
-   bool is_rel_write);
 
 int __mmc_claim_host(struct mmc_host *host, struct mmc_ctx *ctx,
 atomic_t *abort);
-- 
2.11.0