diff mbox series

[v2,3/3] mmc: sdhci_am654: Fix SLOTTYPE write

Message ID 20190510034228.32211-4-faiz_abbas@ti.com (mailing list archive)
State New, archived
Headers show
Series Fix issues with phy configurations in am65x MMC driver | expand

Commit Message

Faiz Abbas May 10, 2019, 3:42 a.m. UTC
In the call to regmap_update_bits() for SLOTTYPE, the mask and value
fields are exchanged. Fix this. This didn't have any affect on the
driver because this was a NOP and it was taking the correct value from
the bootloader.

Cc: stable <stable@vger.kernel.org>
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 May 10, 2019, 5:58 a.m. UTC | #1
On 10/05/19 6:42 AM, Faiz Abbas wrote:
> In the call to regmap_update_bits() for SLOTTYPE, the mask and value
> fields are exchanged. Fix this. This didn't have any affect on the
> driver because this was a NOP and it was taking the correct value from
> the bootloader.
> 
> Cc: stable <stable@vger.kernel.org>

Except that it doesn't apply to stable because of patch 1.  Maybe make this
the first patch.

> 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 3ff949925127..d0b20780dd0f 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -227,8 +227,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 28, 2019, 8:32 a.m. UTC | #2
Hi Adrian,

On 10/05/19 11:28 AM, Adrian Hunter wrote:
> On 10/05/19 6:42 AM, Faiz Abbas wrote:
>> In the call to regmap_update_bits() for SLOTTYPE, the mask and value
>> fields are exchanged. Fix this. This didn't have any affect on the
>> driver because this was a NOP and it was taking the correct value from
>> the bootloader.
>>
>> Cc: stable <stable@vger.kernel.org>
> 
> Except that it doesn't apply to stable because of patch 1.  Maybe make this
> the first patch.
> 

Ok. Sending v3 with this as first patch.

Thanks,
Faiz
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index 3ff949925127..d0b20780dd0f 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -227,8 +227,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);
 }