Skip to contentSkip to conversation

Remove MSGDATA register support.

PATCH Applied Jean-Christophe Dubois 2 participants 4 messages Jan 7, 2017 – Jan 9, 2017 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Remove MSGDATA register support.

Quoted 1 line

From the documentation it is not clear what this SPI register is about.

Moreover, neither linux driver nor xvisor driver are using this SPI register.

For now we just remove it and issue a log on register write access.

---

Changes since v1:
* Fix coding style issue.

Changes since v2:
* change log form LOG_GUEST_ERROR to LOG_UNIMP..

 hw/ssi/imx_spi.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
hw/ssi/imx_spi.c +8 -3
index e57cb9a..b8f416c 100644
@@ -345,9 +345,6 @@ static void imx_spi_write(void *opaque, hwaddr offset, uint64_t value,
                       TYPE_IMX_SPI, __func__);
         break;
     case ECSPI_TXDATA:
-    case ECSPI_MSGDATA:
-        /* Is there any difference between TXDATA and MSGDATA ? */
-        /* I'll have to look in the linux driver */
         if (!imx_spi_is_enabled(s)) {
             /* Ignore writes if device is disabled */
             break;
@@ -398,6 +395,14 @@ static void imx_spi_write(void *opaque, hwaddr offset, uint64_t value,
         }
 
         break;
+    case ECSPI_MSGDATA:
+        /* it is not clear from the spec what MSGDATA is for */
+        /* Anyway it is not used by Linux driver */
+        /* So for now we just ignore it */
+        qemu_log_mask(LOG_UNIMP,
+                      "[%s]%s: Trying to write to MSGDATA, ignoring\n",
+                      TYPE_IMX_SPI, __func__);
+        break;
     default:
         s->regs[index] = value;
 
Signature · 1 line
2.9.3
#1 lore raw
Quoted 7 lines · Jean-Christophe Dubois

From the documentation it is not clear what this SPI register is about.

Moreover, neither linux driver nor xvisor driver are using this SPI register.

For now we just remove it and issue a log on register write access.

Applied to target-arm.next, thanks.

-- PMM

#2 lore raw
In reply to Jean-Christophe Dubois
Quoted 5 lines · Jean-Christophe Dubois

From the documentation it is not clear what this SPI register is about.

Moreover, neither linux driver nor xvisor driver are using this SPI register.

For now we just remove it and issue a log on register write access.

By the way, could you make sure you use standard commit subject line forms like
hw/spi/imx_spi.c: Remove ...

If you put [i.MX] in square brackets like that then patch application tools remove it (on the assumption that it's a meta-tag like [PATCH]) and the commit summary in git ends up just "Remove MSGDATA register support" with no indication of what bit of the code it is dealing with.

(I fixed up these two patches manually when I put them into target-arm.)

thanks
-- PMM

#3 lore raw

Le 2017-01-09 12:56, Peter Maydell a écrit :

Quoted 10 lines · Jean-Christophe Dubois
Quoted 5 lines

From the documentation it is not clear what this SPI register is about.

Moreover, neither linux driver nor xvisor driver are using this SPI register.

For now we just remove it and issue a log on register write access.

By the way, could you make sure you use standard commit subject line forms like
hw/spi/imx_spi.c: Remove ...

OK, I'll do this next time.

Quoted 10 lines

If you put [i.MX] in square brackets like that then patch application tools remove it (on the assumption that it's a meta-tag like [PATCH]) and the commit summary in git ends up just "Remove MSGDATA register support" with no indication of what bit of the code it is dealing with.

(I fixed up these two patches manually when I put them into target-arm.)

thanks
-- PMM