All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] [i.MX] Remove MSGDATA register support.
@ 2017-01-07 12:20 Jean-Christophe Dubois
  2017-01-09 11:00 ` Peter Maydell
  2017-01-09 11:56 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Jean-Christophe Dubois @ 2017-01-07 12:20 UTC (permalink / raw)
  To: qemu-devel, peter.maydell, mar.krzeminski; +Cc: 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.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---

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(-)

diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c
index e57cb9a..b8f416c 100644
--- a/hw/ssi/imx_spi.c
+++ b/hw/ssi/imx_spi.c
@@ -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;
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v3] [i.MX] Remove MSGDATA register support.
  2017-01-07 12:20 [Qemu-devel] [PATCH v3] [i.MX] Remove MSGDATA register support Jean-Christophe Dubois
@ 2017-01-09 11:00 ` Peter Maydell
  2017-01-09 11:56 ` Peter Maydell
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-01-09 11:00 UTC (permalink / raw)
  To: Jean-Christophe Dubois; +Cc: QEMU Developers, Marcin Krzemiński

On 7 January 2017 at 12:20, Jean-Christophe Dubois <jcd@tribudubois.net> wrote:
> 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.
>
> Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>



Applied to target-arm.next, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v3] [i.MX] Remove MSGDATA register support.
  2017-01-07 12:20 [Qemu-devel] [PATCH v3] [i.MX] Remove MSGDATA register support Jean-Christophe Dubois
  2017-01-09 11:00 ` Peter Maydell
@ 2017-01-09 11:56 ` Peter Maydell
  2017-01-09 15:12   ` jcd
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2017-01-09 11:56 UTC (permalink / raw)
  To: Jean-Christophe Dubois; +Cc: QEMU Developers, Marcin Krzemiński

On 7 January 2017 at 12:20, Jean-Christophe Dubois <jcd@tribudubois.net> wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v3] [i.MX] Remove MSGDATA register support.
  2017-01-09 11:56 ` Peter Maydell
@ 2017-01-09 15:12   ` jcd
  0 siblings, 0 replies; 4+ messages in thread
From: jcd @ 2017-01-09 15:12 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, Marcin Krzemiński

Le 2017-01-09 12:56, Peter Maydell a écrit :
> On 7 January 2017 at 12:20, Jean-Christophe Dubois 
> <jcd@tribudubois.net> wrote:
>> 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.

> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-09 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07 12:20 [Qemu-devel] [PATCH v3] [i.MX] Remove MSGDATA register support Jean-Christophe Dubois
2017-01-09 11:00 ` Peter Maydell
2017-01-09 11:56 ` Peter Maydell
2017-01-09 15:12   ` jcd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.