diff mbox series

[v2,03/10] include/hw/dma/xlnx_csu_dma: Include ptimer.h and stream.h in the header

Message ID 20211123103428.8765-4-francisco.iglesias@xilinx.com
State New
Headers show
Series Xilinx Versal's PMC SLCR and OSPI support | expand

Commit Message

Francisco Iglesias Nov. 23, 2021, 10:34 a.m. UTC
Include ptimer.h and stream.h in the header for being able to build and
reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn
and ptimer_state is in the header).

Signed-off-by: Francisco Iglesias <francisco.iglesias@xilinx.com>
---
 include/hw/dma/xlnx_csu_dma.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Philippe Mathieu-Daudé Nov. 23, 2021, 10:45 a.m. UTC | #1
On 11/23/21 11:34, Francisco Iglesias wrote:
> Include ptimer.h and stream.h in the header for being able to build and
> reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn
> and ptimer_state is in the header).
> 
> Signed-off-by: Francisco Iglesias <francisco.iglesias@xilinx.com>
> ---
>  include/hw/dma/xlnx_csu_dma.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/hw/dma/xlnx_csu_dma.h b/include/hw/dma/xlnx_csu_dma.h
> index 9e9dc551e9..8c39e46f58 100644
> --- a/include/hw/dma/xlnx_csu_dma.h
> +++ b/include/hw/dma/xlnx_csu_dma.h
> @@ -21,6 +21,9 @@
>  #ifndef XLNX_CSU_DMA_H
>  #define XLNX_CSU_DMA_H
>  
> +#include "hw/ptimer.h"

Yes, but arguably ptimer_state should be forward
declared in "include/qemu/typedefs.h" IMO.

> +#include "hw/stream.h"

OK but you forgot these:

include/hw/sysbus.h (SysBusDevice)
include/exec/memory.h (MemoryRegion)
include/exec/memattrs.h (MemTxAttrs)
include/exec/memory.h (AddressSpace)
include/hw/register.h (RegisterInfo)
Edgar E. Iglesias Nov. 23, 2021, 10:47 a.m. UTC | #2
On Tue, Nov 23, 2021 at 10:34:21AM +0000, Francisco Iglesias wrote:
> Include ptimer.h and stream.h in the header for being able to build and
> reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn
> and ptimer_state is in the header).

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>


> 
> Signed-off-by: Francisco Iglesias <francisco.iglesias@xilinx.com>
> ---
>  include/hw/dma/xlnx_csu_dma.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/hw/dma/xlnx_csu_dma.h b/include/hw/dma/xlnx_csu_dma.h
> index 9e9dc551e9..8c39e46f58 100644
> --- a/include/hw/dma/xlnx_csu_dma.h
> +++ b/include/hw/dma/xlnx_csu_dma.h
> @@ -21,6 +21,9 @@
>  #ifndef XLNX_CSU_DMA_H
>  #define XLNX_CSU_DMA_H
>  
> +#include "hw/ptimer.h"
> +#include "hw/stream.h"
> +
>  #define TYPE_XLNX_CSU_DMA "xlnx.csu_dma"
>  
>  #define XLNX_CSU_DMA_R_MAX (0x2c / 4)
> -- 
> 2.11.0
>
Francisco Iglesias Nov. 24, 2021, 10:15 a.m. UTC | #3
Hi Philippe,

On [2021 Nov 23] Tue 11:45:45, Philippe Mathieu-Daudé wrote:
> On 11/23/21 11:34, Francisco Iglesias wrote:
> > Include ptimer.h and stream.h in the header for being able to build and
> > reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn
> > and ptimer_state is in the header).
> > 
> > Signed-off-by: Francisco Iglesias <francisco.iglesias@xilinx.com>
> > ---
> >  include/hw/dma/xlnx_csu_dma.h | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/include/hw/dma/xlnx_csu_dma.h b/include/hw/dma/xlnx_csu_dma.h
> > index 9e9dc551e9..8c39e46f58 100644
> > --- a/include/hw/dma/xlnx_csu_dma.h
> > +++ b/include/hw/dma/xlnx_csu_dma.h
> > @@ -21,6 +21,9 @@
> >  #ifndef XLNX_CSU_DMA_H
> >  #define XLNX_CSU_DMA_H
> >  
> > +#include "hw/ptimer.h"
> 
> Yes, but arguably ptimer_state should be forward
> declared in "include/qemu/typedefs.h" IMO.
> 
> > +#include "hw/stream.h"
> 
> OK but you forgot these:

Thank you for reviewing! I updated and added in to also include sysbus.h and
register.h from the list below in v3! (memory.h looks to be included through
sysbus.h and memattrs.h through memory.h)

Best regards,
Francisco Iglesias

> 
> include/hw/sysbus.h (SysBusDevice)
> include/exec/memory.h (MemoryRegion)
> include/exec/memattrs.h (MemTxAttrs)
> include/exec/memory.h (AddressSpace)
> include/hw/register.h (RegisterInfo)
>
diff mbox series

Patch

diff --git a/include/hw/dma/xlnx_csu_dma.h b/include/hw/dma/xlnx_csu_dma.h
index 9e9dc551e9..8c39e46f58 100644
--- a/include/hw/dma/xlnx_csu_dma.h
+++ b/include/hw/dma/xlnx_csu_dma.h
@@ -21,6 +21,9 @@ 
 #ifndef XLNX_CSU_DMA_H
 #define XLNX_CSU_DMA_H
 
+#include "hw/ptimer.h"
+#include "hw/stream.h"
+
 #define TYPE_XLNX_CSU_DMA "xlnx.csu_dma"
 
 #define XLNX_CSU_DMA_R_MAX (0x2c / 4)