diff mbox

[V1] sdhci: Fix hostctl2 write logic.

Message ID 1441967433-19456-1-git-send-email-saipava@xilinx.com
State New
Headers show

Commit Message

Sai Pavan Boddu Sept. 11, 2015, 10:30 a.m. UTC
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

This should be a shifted MASKED_WRITE like all other instances of
non-word aligned registers.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
 hw/sd/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Crosthwaite Sept. 13, 2015, 8:36 p.m. UTC | #1
On Fri, Sep 11, 2015 at 3:30 AM, Sai Pavan Boddu
<sai.pavan.boddu@xilinx.com> wrote:
> From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>
> This should be a shifted MASKED_WRITE like all other instances of
> non-word aligned registers.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>


As the sender, this requires your signed-off-by line (in addition to
any originals). git commit --amend -s should do it.

Your own RB might help as well (I can't do review as author).

Regards,
Peter

> ---
>  hw/sd/sdhci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
> index 8fd75f7..fd354e3 100644
> --- a/hw/sd/sdhci.c
> +++ b/hw/sd/sdhci.c
> @@ -1059,7 +1059,7 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
>              value |= SDHC_CTRL2_SAMPLING_CLKSEL;
>          }
>          s->acmd12errsts = value;
> -        s->hostctl2 = value >> 16;
> +        MASKED_WRITE(s->hostctl2, mask >> 16, value >> 16);
>          break;
>      case SDHC_CLKCON:
>          if (!(mask & 0xFF000000)) {
> --
> 2.1.1
>
Alistair Francis Sept. 15, 2015, 10:59 p.m. UTC | #2
On Sun, Sep 13, 2015 at 1:36 PM, Peter Crosthwaite
<crosthwaitepeter@gmail.com> wrote:
> On Fri, Sep 11, 2015 at 3:30 AM, Sai Pavan Boddu
> <sai.pavan.boddu@xilinx.com> wrote:
>> From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>
>> This should be a shifted MASKED_WRITE like all other instances of
>> non-word aligned registers.
>>
>> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>

Looks good to me

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>

Thanks,

Alistair

>
>
> As the sender, this requires your signed-off-by line (in addition to
> any originals). git commit --amend -s should do it.
>
> Your own RB might help as well (I can't do review as author).
>
> Regards,
> Peter
>
>> ---
>>  hw/sd/sdhci.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
>> index 8fd75f7..fd354e3 100644
>> --- a/hw/sd/sdhci.c
>> +++ b/hw/sd/sdhci.c
>> @@ -1059,7 +1059,7 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
>>              value |= SDHC_CTRL2_SAMPLING_CLKSEL;
>>          }
>>          s->acmd12errsts = value;
>> -        s->hostctl2 = value >> 16;
>> +        MASKED_WRITE(s->hostctl2, mask >> 16, value >> 16);
>>          break;
>>      case SDHC_CLKCON:
>>          if (!(mask & 0xFF000000)) {
>> --
>> 2.1.1
>>
>
Peter Crosthwaite Oct. 8, 2015, 3:51 p.m. UTC | #3
On Tue, Sep 15, 2015 at 3:59 PM, Alistair Francis <alistair23@gmail.com> wrote:
> On Sun, Sep 13, 2015 at 1:36 PM, Peter Crosthwaite
> <crosthwaitepeter@gmail.com> wrote:
>> On Fri, Sep 11, 2015 at 3:30 AM, Sai Pavan Boddu
>> <sai.pavan.boddu@xilinx.com> wrote:
>>> From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>>
>>> This should be a shifted MASKED_WRITE like all other instances of
>>> non-word aligned registers.
>>>
>>> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>
> Looks good to me
>
> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
>
> Thanks,
>
> Alistair
>
>>
>>
>> As the sender, this requires your signed-off-by line (in addition to
>> any originals). git commit --amend -s should do it.
>>

Ping!

I think this is blocked by Pavan's missing SoB. Otherwise it should be ok.

Regards,
Peter

>> Your own RB might help as well (I can't do review as author).
>>
>> Regards,
>> Peter
>>
>>> ---
>>>  hw/sd/sdhci.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
>>> index 8fd75f7..fd354e3 100644
>>> --- a/hw/sd/sdhci.c
>>> +++ b/hw/sd/sdhci.c
>>> @@ -1059,7 +1059,7 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
>>>              value |= SDHC_CTRL2_SAMPLING_CLKSEL;
>>>          }
>>>          s->acmd12errsts = value;
>>> -        s->hostctl2 = value >> 16;
>>> +        MASKED_WRITE(s->hostctl2, mask >> 16, value >> 16);
>>>          break;
>>>      case SDHC_CLKCON:
>>>          if (!(mask & 0xFF000000)) {
>>> --
>>> 2.1.1
>>>
>>
diff mbox

Patch

diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 8fd75f7..fd354e3 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1059,7 +1059,7 @@  sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
             value |= SDHC_CTRL2_SAMPLING_CLKSEL;
         }
         s->acmd12errsts = value;
-        s->hostctl2 = value >> 16;
+        MASKED_WRITE(s->hostctl2, mask >> 16, value >> 16);
         break;
     case SDHC_CLKCON:
         if (!(mask & 0xFF000000)) {