diff mbox series

[2/2] mmc: sdhci_am654: Fix SLOTTYPE write

Message ID 20190425155727.20010-3-faiz_abbas@ti.com (mailing list archive)
State New, archived
Headers show
Series Fix issues with phy configurations | expand

Commit Message

Faiz Abbas April 25, 2019, 3:57 p.m. UTC
In the call to regmap_update_bits() for SLOTTYPE, the mask and value
fields are exchanged. Fix this.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 drivers/mmc/host/sdhci_am654.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Adrian Hunter April 26, 2019, 6 a.m. UTC | #1
On 25/04/19 6:57 PM, Faiz Abbas wrote:
> In the call to regmap_update_bits() for SLOTTYPE, the mask and value
> fields are exchanged. Fix this.

Could you also comment on whether this has any known effect on the driver.

> 
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
> ---
>  drivers/mmc/host/sdhci_am654.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
> index 866a9082705f..613b151a73c5 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -205,8 +205,8 @@ static int sdhci_am654_init(struct sdhci_host *host)
>  	if (host->mmc->caps & MMC_CAP_NONREMOVABLE)
>  		ctl_cfg_2 = SLOTTYPE_EMBEDDED;
>  
> -	regmap_update_bits(sdhci_am654->base, CTL_CFG_2, ctl_cfg_2,
> -			   SLOTTYPE_MASK);
> +	regmap_update_bits(sdhci_am654->base, CTL_CFG_2, SLOTTYPE_MASK,
> +			   ctl_cfg_2);
>  
>  	return sdhci_add_host(host);
>  }
>
Faiz Abbas May 7, 2019, 4:27 p.m. UTC | #2
Hi Adrian,

On 26/04/19 11:30 AM, Adrian Hunter wrote:
> On 25/04/19 6:57 PM, Faiz Abbas wrote:
>> In the call to regmap_update_bits() for SLOTTYPE, the mask and value
>> fields are exchanged. Fix this.
> 
> Could you also comment on whether this has any known effect on the driver.
> 

This call was basically a NOP but it was the correct way around in
u-boot so it was just taking that value instead. No effect that was
known to me. Found this out just by inspection.

Thanks,
Faiz
Adrian Hunter May 8, 2019, 6:04 a.m. UTC | #3
On 7/05/19 7:27 PM, Faiz Abbas wrote:
> Hi Adrian,
> 
> On 26/04/19 11:30 AM, Adrian Hunter wrote:
>> On 25/04/19 6:57 PM, Faiz Abbas wrote:
>>> In the call to regmap_update_bits() for SLOTTYPE, the mask and value
>>> fields are exchanged. Fix this.
>>
>> Could you also comment on whether this has any known effect on the driver.
>>
> 
> This call was basically a NOP but it was the correct way around in
> u-boot so it was just taking that value instead. No effect that was
> known to me. Found this out just by inspection.

Please put that in the commit message.
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index 866a9082705f..613b151a73c5 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -205,8 +205,8 @@  static int sdhci_am654_init(struct sdhci_host *host)
 	if (host->mmc->caps & MMC_CAP_NONREMOVABLE)
 		ctl_cfg_2 = SLOTTYPE_EMBEDDED;
 
-	regmap_update_bits(sdhci_am654->base, CTL_CFG_2, ctl_cfg_2,
-			   SLOTTYPE_MASK);
+	regmap_update_bits(sdhci_am654->base, CTL_CFG_2, SLOTTYPE_MASK,
+			   ctl_cfg_2);
 
 	return sdhci_add_host(host);
 }