Skip to contentSkip to conversation

sdhci: Fix hostctl2 write logic.

PATCH In review Sai Pavan Boddu 3 participants 4 messages Sep 11, 2015 – Oct 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sdhci: Fix hostctl2 write logic.

From: Peter Crosthwaite <[email protected]>

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

---
 hw/sd/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/sd/sdhci.c +1 -1
index 8fd75f7..fd354e3 100644
@@ -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)) {
Signature · 1 line
2.1.1
#1 lore raw
Quoted 6 lines · Sai Pavan Boddu

From: Peter Crosthwaite <[email protected]>

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

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

Quoted 20 lines
---
 hw/sd/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/sd/sdhci.c +1 -2
index 8fd75f7..fd354e3 100644
@@ -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

Reviewed-by
#2 lore raw
Quoted 8 lines · Peter Crosthwaite
Quoted 6 lines · Sai Pavan Boddu

From: Peter Crosthwaite <[email protected]>

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

Looks good to me

Thanks,

Alistair

Quoted 31 lines

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

Quoted 20 lines
---
 hw/sd/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/sd/sdhci.c +1 -2
index 8fd75f7..fd354e3 100644
@@ -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

#3 lore raw
Quoted 11 lines · Alistair Francis
Quoted 8 lines · Peter Crosthwaite
Quoted 6 lines · Sai Pavan Boddu

From: Peter Crosthwaite <[email protected]>

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

Quoted 13 lines

Looks good to me

Thanks,

Alistair

Quoted 5 lines

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

Quoted 26 lines
Quoted 26 lines

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

Regards,
Peter

Quoted 20 lines
---
 hw/sd/sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/sd/sdhci.c +1 -2
index 8fd75f7..fd354e3 100644
@@ -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