qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
@ 2015-09-07 13:58 Sai Pavan Boddu
  2015-09-07 13:58 ` [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/ Sai Pavan Boddu
  2015-09-09 15:04 ` [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/ Eric Blake
  0 siblings, 2 replies; 9+ messages in thread
From: Sai Pavan Boddu @ 2015-09-07 13:58 UTC (permalink / raw)
  To: qemu-devel, crosthwaitepeter, eblake, peter.maydell
  Cc: Sai Pavan Boddu, edgari, alistai

Create new folder in includes for sd headers.

Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
---
 hw/sd/milkymist-memcard.c | 2 +-
 hw/sd/omap_mmc.c          | 2 +-
 hw/sd/pl181.c             | 2 +-
 hw/sd/pxa2xx_mmci.c       | 2 +-
 hw/sd/sd.c                | 2 +-
 hw/sd/sdhci.h             | 2 +-
 hw/sd/ssi-sd.c            | 2 +-
 include/hw/{ => sd}/sd.h  | 0
 8 files changed, 7 insertions(+), 7 deletions(-)
 rename include/hw/{ => sd}/sd.h (100%)

diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
index 2209ef1..b430d56 100644
--- a/hw/sd/milkymist-memcard.c
+++ b/hw/sd/milkymist-memcard.c
@@ -28,7 +28,7 @@
 #include "qemu/error-report.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 enum {
     ENABLE_CMD_TX   = (1<<0),
diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
index d072dec..3bf1fcc 100644
--- a/hw/sd/omap_mmc.c
+++ b/hw/sd/omap_mmc.c
@@ -18,7 +18,7 @@
  */
 #include "hw/hw.h"
 #include "hw/arm/omap.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 struct omap_mmc_s {
     qemu_irq irq;
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 11fcd47..ddd9b6f 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -10,7 +10,7 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/sysbus.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 //#define DEBUG_PL181 1
 
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
index d1fe6d5..b217080 100644
--- a/hw/sd/pxa2xx_mmci.c
+++ b/hw/sd/pxa2xx_mmci.c
@@ -12,7 +12,7 @@
 
 #include "hw/hw.h"
 #include "hw/arm/pxa.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 #include "hw/qdev.h"
 
 struct PXA2xxMMCIState {
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index a1ff465..0787e33 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -31,7 +31,7 @@
 
 #include "hw/hw.h"
 #include "sysemu/block-backend.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 #include "qemu/bitmap.h"
 
 //#define DEBUG_SD 1
diff --git a/hw/sd/sdhci.h b/hw/sd/sdhci.h
index 3352d23..a45593f 100644
--- a/hw/sd/sdhci.h
+++ b/hw/sd/sdhci.h
@@ -28,7 +28,7 @@
 #include "qemu-common.h"
 #include "hw/pci/pci.h"
 #include "hw/sysbus.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 /* R/W SDMA System Address register 0x0 */
 #define SDHC_SYSAD                     0x00
diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index e4b2d4f..c49ff62 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -13,7 +13,7 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/ssi.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 //#define DEBUG_SSI_SD 1
 
diff --git a/include/hw/sd.h b/include/hw/sd/sd.h
similarity index 100%
rename from include/hw/sd.h
rename to include/hw/sd/sd.h
-- 
1.9.1

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

* [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/
  2015-09-07 13:58 [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/ Sai Pavan Boddu
@ 2015-09-07 13:58 ` Sai Pavan Boddu
  2015-09-09  9:37   ` Stefan Hajnoczi
  2015-09-09 15:04 ` [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/ Eric Blake
  1 sibling, 1 reply; 9+ messages in thread
From: Sai Pavan Boddu @ 2015-09-07 13:58 UTC (permalink / raw)
  To: qemu-devel, crosthwaitepeter, eblake, peter.maydell
  Cc: Sai Pavan Boddu, edgari, alistai

Move sdhci.h to include/hw/sd/. Which makes easy creation of device
using object_initialize.

Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
---
Changes for V2:
   Create new area in includes for sd. And move sdhci.h to same.
---
 hw/sd/sdhci.c                 | 2 +-
 {hw => include/hw}/sd/sdhci.h | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename {hw => include/hw}/sd/sdhci.h (100%)

diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index e63367b..811e5b0 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -29,7 +29,7 @@
 #include "qemu/timer.h"
 #include "qemu/bitops.h"
 
-#include "sdhci.h"
+#include "hw/sd/sdhci.h"
 
 /* host controller debug messages */
 #ifndef SDHC_DEBUG
diff --git a/hw/sd/sdhci.h b/include/hw/sd/sdhci.h
similarity index 100%
rename from hw/sd/sdhci.h
rename to include/hw/sd/sdhci.h
-- 
1.9.1

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

* [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
@ 2015-09-08  5:52 Sai Pavan Boddu
  2015-09-08  6:03 ` Sai Pavan Boddu
  2015-09-08 14:03 ` Sai Pavan Boddu
  0 siblings, 2 replies; 9+ messages in thread
From: Sai Pavan Boddu @ 2015-09-08  5:52 UTC (permalink / raw)
  To: qemu-devel, crosthwaitepeter, peter.maydell
  Cc: Sai Pavan Boddu, alistai, edgari

Create new folder in includes for sd headers.

Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
---
 hw/sd/milkymist-memcard.c | 2 +-
 hw/sd/omap_mmc.c          | 2 +-
 hw/sd/pl181.c             | 2 +-
 hw/sd/pxa2xx_mmci.c       | 2 +-
 hw/sd/sd.c                | 2 +-
 hw/sd/sdhci.h             | 2 +-
 hw/sd/ssi-sd.c            | 2 +-
 include/hw/{ => sd}/sd.h  | 0
 8 files changed, 7 insertions(+), 7 deletions(-)
 rename include/hw/{ => sd}/sd.h (100%)

diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
index 2209ef1..b430d56 100644
--- a/hw/sd/milkymist-memcard.c
+++ b/hw/sd/milkymist-memcard.c
@@ -28,7 +28,7 @@
 #include "qemu/error-report.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 enum {
     ENABLE_CMD_TX   = (1<<0),
diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
index d072dec..3bf1fcc 100644
--- a/hw/sd/omap_mmc.c
+++ b/hw/sd/omap_mmc.c
@@ -18,7 +18,7 @@
  */
 #include "hw/hw.h"
 #include "hw/arm/omap.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 struct omap_mmc_s {
     qemu_irq irq;
diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
index 11fcd47..ddd9b6f 100644
--- a/hw/sd/pl181.c
+++ b/hw/sd/pl181.c
@@ -10,7 +10,7 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/sysbus.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 //#define DEBUG_PL181 1
 
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
index d1fe6d5..b217080 100644
--- a/hw/sd/pxa2xx_mmci.c
+++ b/hw/sd/pxa2xx_mmci.c
@@ -12,7 +12,7 @@
 
 #include "hw/hw.h"
 #include "hw/arm/pxa.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 #include "hw/qdev.h"
 
 struct PXA2xxMMCIState {
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index a1ff465..0787e33 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -31,7 +31,7 @@
 
 #include "hw/hw.h"
 #include "sysemu/block-backend.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 #include "qemu/bitmap.h"
 
 //#define DEBUG_SD 1
diff --git a/hw/sd/sdhci.h b/hw/sd/sdhci.h
index 3352d23..a45593f 100644
--- a/hw/sd/sdhci.h
+++ b/hw/sd/sdhci.h
@@ -28,7 +28,7 @@
 #include "qemu-common.h"
 #include "hw/pci/pci.h"
 #include "hw/sysbus.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 /* R/W SDMA System Address register 0x0 */
 #define SDHC_SYSAD                     0x00
diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index e4b2d4f..c49ff62 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -13,7 +13,7 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "hw/ssi.h"
-#include "hw/sd.h"
+#include "hw/sd/sd.h"
 
 //#define DEBUG_SSI_SD 1
 
diff --git a/include/hw/sd.h b/include/hw/sd/sd.h
similarity index 100%
rename from include/hw/sd.h
rename to include/hw/sd/sd.h
-- 
1.9.1

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

* Re: [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
  2015-09-08  5:52 Sai Pavan Boddu
@ 2015-09-08  6:03 ` Sai Pavan Boddu
  2015-09-08 14:03 ` Sai Pavan Boddu
  1 sibling, 0 replies; 9+ messages in thread
From: Sai Pavan Boddu @ 2015-09-08  6:03 UTC (permalink / raw)
  To: Sai Pavan Boddu, qemu-devel@nongnu.org,
	crosthwaitepeter@gmail.com, peter.maydell@linaro.org
  Cc: Alistair Francis, Edgar Iglesias

This was just a resend of V2.
I think this is a good idea to move sd.h and sdhci.h  to include/hw/sd/

As these device models like sdhci can be easily instantiated, when we have the type and its object declaration available in header in includes.

Regards,
Sai

> -----Original Message-----
> From: Sai Pavan Boddu [mailto:sai.pavan.boddu@xilinx.com]
> Sent: Tuesday, September 08, 2015 11:23 AM
> To: qemu-devel@nongnu.org; crosthwaitepeter@gmail.com;
> peter.maydell@linaro.org
> Cc: eblake@redhat.com; Alistair Francis; Edgar Iglesias; Sai Pavan Boddu
> Subject: [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
> 
> Create new folder in includes for sd headers.
> 
> Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
> ---
>  hw/sd/milkymist-memcard.c | 2 +-
>  hw/sd/omap_mmc.c          | 2 +-
>  hw/sd/pl181.c             | 2 +-
>  hw/sd/pxa2xx_mmci.c       | 2 +-
>  hw/sd/sd.c                | 2 +-
>  hw/sd/sdhci.h             | 2 +-
>  hw/sd/ssi-sd.c            | 2 +-
>  include/hw/{ => sd}/sd.h  | 0
>  8 files changed, 7 insertions(+), 7 deletions(-)
>  rename include/hw/{ => sd}/sd.h (100%)
> 
> diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
> index 2209ef1..b430d56 100644
> --- a/hw/sd/milkymist-memcard.c
> +++ b/hw/sd/milkymist-memcard.c
> @@ -28,7 +28,7 @@
>  #include "qemu/error-report.h"
>  #include "sysemu/block-backend.h"
>  #include "sysemu/blockdev.h"
> -#include "hw/sd.h"
> +#include "hw/sd/sd.h"
> 
>  enum {
>      ENABLE_CMD_TX   = (1<<0),
> diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
> index d072dec..3bf1fcc 100644
> --- a/hw/sd/omap_mmc.c
> +++ b/hw/sd/omap_mmc.c
> @@ -18,7 +18,7 @@
>   */
>  #include "hw/hw.h"
>  #include "hw/arm/omap.h"
> -#include "hw/sd.h"
> +#include "hw/sd/sd.h"
> 
>  struct omap_mmc_s {
>      qemu_irq irq;
> diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
> index 11fcd47..ddd9b6f 100644
> --- a/hw/sd/pl181.c
> +++ b/hw/sd/pl181.c
> @@ -10,7 +10,7 @@
>  #include "sysemu/block-backend.h"
>  #include "sysemu/blockdev.h"
>  #include "hw/sysbus.h"
> -#include "hw/sd.h"
> +#include "hw/sd/sd.h"
> 
>  //#define DEBUG_PL181 1
> 
> diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
> index d1fe6d5..b217080 100644
> --- a/hw/sd/pxa2xx_mmci.c
> +++ b/hw/sd/pxa2xx_mmci.c
> @@ -12,7 +12,7 @@
> 
>  #include "hw/hw.h"
>  #include "hw/arm/pxa.h"
> -#include "hw/sd.h"
> +#include "hw/sd/sd.h"
>  #include "hw/qdev.h"
> 
>  struct PXA2xxMMCIState {
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index a1ff465..0787e33 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -31,7 +31,7 @@
> 
>  #include "hw/hw.h"
>  #include "sysemu/block-backend.h"
> -#include "hw/sd.h"
> +#include "hw/sd/sd.h"
>  #include "qemu/bitmap.h"
> 
>  //#define DEBUG_SD 1
> diff --git a/hw/sd/sdhci.h b/hw/sd/sdhci.h
> index 3352d23..a45593f 100644
> --- a/hw/sd/sdhci.h
> +++ b/hw/sd/sdhci.h
> @@ -28,7 +28,7 @@
>  #include "qemu-common.h"
>  #include "hw/pci/pci.h"
>  #include "hw/sysbus.h"
> -#include "hw/sd.h"
> +#include "hw/sd/sd.h"
> 
>  /* R/W SDMA System Address register 0x0 */
>  #define SDHC_SYSAD                     0x00
> diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
> index e4b2d4f..c49ff62 100644
> --- a/hw/sd/ssi-sd.c
> +++ b/hw/sd/ssi-sd.c
> @@ -13,7 +13,7 @@
>  #include "sysemu/block-backend.h"
>  #include "sysemu/blockdev.h"
>  #include "hw/ssi.h"
> -#include "hw/sd.h"
> +#include "hw/sd/sd.h"
> 
>  //#define DEBUG_SSI_SD 1
> 
> diff --git a/include/hw/sd.h b/include/hw/sd/sd.h
> similarity index 100%
> rename from include/hw/sd.h
> rename to include/hw/sd/sd.h
> --
> 1.9.1

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

* Re: [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
  2015-09-08  5:52 Sai Pavan Boddu
  2015-09-08  6:03 ` Sai Pavan Boddu
@ 2015-09-08 14:03 ` Sai Pavan Boddu
  2015-09-08 16:23   ` Peter Crosthwaite
  1 sibling, 1 reply; 9+ messages in thread
From: Sai Pavan Boddu @ 2015-09-08 14:03 UTC (permalink / raw)
  To: Sai Pavan Boddu, qemu-devel@nongnu.org,
	crosthwaitepeter@gmail.com, peter.maydell@linaro.org
  Cc: Alistair Francis, Edgar Iglesias


Ping!

I have an issue in instantiation the device using object_initilize. Which needs the TYPE and the "object created already" to passed. Which is only possible if I have access to header files from different folder.

If in case, this path doesn't promotes to be pushed. Is there a way to create a device without access to header file.
Ex. To create a SDHCI device.

Regards,
Sai Pavan
> -----Original Message-----
> From: Sai Pavan Boddu
> Sent: Tuesday, September 08, 2015 11:33 AM
> To: 'Sai Pavan Boddu'; qemu-devel@nongnu.org;
> crosthwaitepeter@gmail.com; peter.maydell@linaro.org
> Cc: eblake@redhat.com; Alistair Francis; Edgar Iglesias
> Subject: RE: [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
> 
> This was just a resend of V2.
> I think this is a good idea to move sd.h and sdhci.h  to include/hw/sd/
> 
> As these device models like sdhci can be easily instantiated, when we have
> the type and its object declaration available in header in includes.
> 
> Regards,
> Sai
> 
> > -----Original Message-----
> > From: Sai Pavan Boddu [mailto:sai.pavan.boddu@xilinx.com]
> > Sent: Tuesday, September 08, 2015 11:23 AM
> > To: qemu-devel@nongnu.org; crosthwaitepeter@gmail.com;
> > peter.maydell@linaro.org
> > Cc: eblake@redhat.com; Alistair Francis; Edgar Iglesias; Sai Pavan Boddu
> > Subject: [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
> >
> > Create new folder in includes for sd headers.
> >
> > Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
> > ---
> >  hw/sd/milkymist-memcard.c | 2 +-
> >  hw/sd/omap_mmc.c          | 2 +-
> >  hw/sd/pl181.c             | 2 +-
> >  hw/sd/pxa2xx_mmci.c       | 2 +-
> >  hw/sd/sd.c                | 2 +-
> >  hw/sd/sdhci.h             | 2 +-
> >  hw/sd/ssi-sd.c            | 2 +-
> >  include/hw/{ => sd}/sd.h  | 0
> >  8 files changed, 7 insertions(+), 7 deletions(-)
> >  rename include/hw/{ => sd}/sd.h (100%)
> >
> > diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
> > index 2209ef1..b430d56 100644
> > --- a/hw/sd/milkymist-memcard.c
> > +++ b/hw/sd/milkymist-memcard.c
> > @@ -28,7 +28,7 @@
> >  #include "qemu/error-report.h"
> >  #include "sysemu/block-backend.h"
> >  #include "sysemu/blockdev.h"
> > -#include "hw/sd.h"
> > +#include "hw/sd/sd.h"
> >
> >  enum {
> >      ENABLE_CMD_TX   = (1<<0),
> > diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
> > index d072dec..3bf1fcc 100644
> > --- a/hw/sd/omap_mmc.c
> > +++ b/hw/sd/omap_mmc.c
> > @@ -18,7 +18,7 @@
> >   */
> >  #include "hw/hw.h"
> >  #include "hw/arm/omap.h"
> > -#include "hw/sd.h"
> > +#include "hw/sd/sd.h"
> >
> >  struct omap_mmc_s {
> >      qemu_irq irq;
> > diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
> > index 11fcd47..ddd9b6f 100644
> > --- a/hw/sd/pl181.c
> > +++ b/hw/sd/pl181.c
> > @@ -10,7 +10,7 @@
> >  #include "sysemu/block-backend.h"
> >  #include "sysemu/blockdev.h"
> >  #include "hw/sysbus.h"
> > -#include "hw/sd.h"
> > +#include "hw/sd/sd.h"
> >
> >  //#define DEBUG_PL181 1
> >
> > diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
> > index d1fe6d5..b217080 100644
> > --- a/hw/sd/pxa2xx_mmci.c
> > +++ b/hw/sd/pxa2xx_mmci.c
> > @@ -12,7 +12,7 @@
> >
> >  #include "hw/hw.h"
> >  #include "hw/arm/pxa.h"
> > -#include "hw/sd.h"
> > +#include "hw/sd/sd.h"
> >  #include "hw/qdev.h"
> >
> >  struct PXA2xxMMCIState {
> > diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> > index a1ff465..0787e33 100644
> > --- a/hw/sd/sd.c
> > +++ b/hw/sd/sd.c
> > @@ -31,7 +31,7 @@
> >
> >  #include "hw/hw.h"
> >  #include "sysemu/block-backend.h"
> > -#include "hw/sd.h"
> > +#include "hw/sd/sd.h"
> >  #include "qemu/bitmap.h"
> >
> >  //#define DEBUG_SD 1
> > diff --git a/hw/sd/sdhci.h b/hw/sd/sdhci.h
> > index 3352d23..a45593f 100644
> > --- a/hw/sd/sdhci.h
> > +++ b/hw/sd/sdhci.h
> > @@ -28,7 +28,7 @@
> >  #include "qemu-common.h"
> >  #include "hw/pci/pci.h"
> >  #include "hw/sysbus.h"
> > -#include "hw/sd.h"
> > +#include "hw/sd/sd.h"
> >
> >  /* R/W SDMA System Address register 0x0 */
> >  #define SDHC_SYSAD                     0x00
> > diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
> > index e4b2d4f..c49ff62 100644
> > --- a/hw/sd/ssi-sd.c
> > +++ b/hw/sd/ssi-sd.c
> > @@ -13,7 +13,7 @@
> >  #include "sysemu/block-backend.h"
> >  #include "sysemu/blockdev.h"
> >  #include "hw/ssi.h"
> > -#include "hw/sd.h"
> > +#include "hw/sd/sd.h"
> >
> >  //#define DEBUG_SSI_SD 1
> >
> > diff --git a/include/hw/sd.h b/include/hw/sd/sd.h
> > similarity index 100%
> > rename from include/hw/sd.h
> > rename to include/hw/sd/sd.h
> > --
> > 1.9.1

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

* Re: [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
  2015-09-08 14:03 ` Sai Pavan Boddu
@ 2015-09-08 16:23   ` Peter Crosthwaite
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Crosthwaite @ 2015-09-08 16:23 UTC (permalink / raw)
  To: Sai Pavan Boddu
  Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, Sai Pavan Boddu,
	Edgar Iglesias, Alistair Francis

On Tue, Sep 8, 2015 at 7:03 AM, Sai Pavan Boddu
<sai.pavan.boddu@xilinx.com> wrote:
>
> Ping!
>
> I have an issue in instantiation the device using object_initilize. Which needs the TYPE and the "object created already" to passed. Which is only possible if I have access to header files from different folder.
>

Understand, give it a few days though, I don't think anyone is nacking
this, just hasn't been reviewed. People may be working through their
review queues.

> If in case, this path doesn't promotes to be pushed. Is there a way to create a device without access to header file.

No. Header access is expected.

Regards,
Peter

> Ex. To create a SDHCI device.
>
> Regards,
> Sai Pavan
>> -----Original Message-----
>> From: Sai Pavan Boddu
>> Sent: Tuesday, September 08, 2015 11:33 AM
>> To: 'Sai Pavan Boddu'; qemu-devel@nongnu.org;
>> crosthwaitepeter@gmail.com; peter.maydell@linaro.org
>> Cc: eblake@redhat.com; Alistair Francis; Edgar Iglesias
>> Subject: RE: [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
>>
>> This was just a resend of V2.
>> I think this is a good idea to move sd.h and sdhci.h  to include/hw/sd/
>>
>> As these device models like sdhci can be easily instantiated, when we have
>> the type and its object declaration available in header in includes.
>>
>> Regards,
>> Sai
>>
>> > -----Original Message-----
>> > From: Sai Pavan Boddu [mailto:sai.pavan.boddu@xilinx.com]
>> > Sent: Tuesday, September 08, 2015 11:23 AM
>> > To: qemu-devel@nongnu.org; crosthwaitepeter@gmail.com;
>> > peter.maydell@linaro.org
>> > Cc: eblake@redhat.com; Alistair Francis; Edgar Iglesias; Sai Pavan Boddu
>> > Subject: [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
>> >
>> > Create new folder in includes for sd headers.
>> >
>> > Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
>> > ---
>> >  hw/sd/milkymist-memcard.c | 2 +-
>> >  hw/sd/omap_mmc.c          | 2 +-
>> >  hw/sd/pl181.c             | 2 +-
>> >  hw/sd/pxa2xx_mmci.c       | 2 +-
>> >  hw/sd/sd.c                | 2 +-
>> >  hw/sd/sdhci.h             | 2 +-
>> >  hw/sd/ssi-sd.c            | 2 +-
>> >  include/hw/{ => sd}/sd.h  | 0
>> >  8 files changed, 7 insertions(+), 7 deletions(-)
>> >  rename include/hw/{ => sd}/sd.h (100%)
>> >
>> > diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
>> > index 2209ef1..b430d56 100644
>> > --- a/hw/sd/milkymist-memcard.c
>> > +++ b/hw/sd/milkymist-memcard.c
>> > @@ -28,7 +28,7 @@
>> >  #include "qemu/error-report.h"
>> >  #include "sysemu/block-backend.h"
>> >  #include "sysemu/blockdev.h"
>> > -#include "hw/sd.h"
>> > +#include "hw/sd/sd.h"
>> >
>> >  enum {
>> >      ENABLE_CMD_TX   = (1<<0),
>> > diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c
>> > index d072dec..3bf1fcc 100644
>> > --- a/hw/sd/omap_mmc.c
>> > +++ b/hw/sd/omap_mmc.c
>> > @@ -18,7 +18,7 @@
>> >   */
>> >  #include "hw/hw.h"
>> >  #include "hw/arm/omap.h"
>> > -#include "hw/sd.h"
>> > +#include "hw/sd/sd.h"
>> >
>> >  struct omap_mmc_s {
>> >      qemu_irq irq;
>> > diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c
>> > index 11fcd47..ddd9b6f 100644
>> > --- a/hw/sd/pl181.c
>> > +++ b/hw/sd/pl181.c
>> > @@ -10,7 +10,7 @@
>> >  #include "sysemu/block-backend.h"
>> >  #include "sysemu/blockdev.h"
>> >  #include "hw/sysbus.h"
>> > -#include "hw/sd.h"
>> > +#include "hw/sd/sd.h"
>> >
>> >  //#define DEBUG_PL181 1
>> >
>> > diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
>> > index d1fe6d5..b217080 100644
>> > --- a/hw/sd/pxa2xx_mmci.c
>> > +++ b/hw/sd/pxa2xx_mmci.c
>> > @@ -12,7 +12,7 @@
>> >
>> >  #include "hw/hw.h"
>> >  #include "hw/arm/pxa.h"
>> > -#include "hw/sd.h"
>> > +#include "hw/sd/sd.h"
>> >  #include "hw/qdev.h"
>> >
>> >  struct PXA2xxMMCIState {
>> > diff --git a/hw/sd/sd.c b/hw/sd/sd.c
>> > index a1ff465..0787e33 100644
>> > --- a/hw/sd/sd.c
>> > +++ b/hw/sd/sd.c
>> > @@ -31,7 +31,7 @@
>> >
>> >  #include "hw/hw.h"
>> >  #include "sysemu/block-backend.h"
>> > -#include "hw/sd.h"
>> > +#include "hw/sd/sd.h"
>> >  #include "qemu/bitmap.h"
>> >
>> >  //#define DEBUG_SD 1
>> > diff --git a/hw/sd/sdhci.h b/hw/sd/sdhci.h
>> > index 3352d23..a45593f 100644
>> > --- a/hw/sd/sdhci.h
>> > +++ b/hw/sd/sdhci.h
>> > @@ -28,7 +28,7 @@
>> >  #include "qemu-common.h"
>> >  #include "hw/pci/pci.h"
>> >  #include "hw/sysbus.h"
>> > -#include "hw/sd.h"
>> > +#include "hw/sd/sd.h"
>> >
>> >  /* R/W SDMA System Address register 0x0 */
>> >  #define SDHC_SYSAD                     0x00
>> > diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
>> > index e4b2d4f..c49ff62 100644
>> > --- a/hw/sd/ssi-sd.c
>> > +++ b/hw/sd/ssi-sd.c
>> > @@ -13,7 +13,7 @@
>> >  #include "sysemu/block-backend.h"
>> >  #include "sysemu/blockdev.h"
>> >  #include "hw/ssi.h"
>> > -#include "hw/sd.h"
>> > +#include "hw/sd/sd.h"
>> >
>> >  //#define DEBUG_SSI_SD 1
>> >
>> > diff --git a/include/hw/sd.h b/include/hw/sd/sd.h
>> > similarity index 100%
>> > rename from include/hw/sd.h
>> > rename to include/hw/sd/sd.h
>> > --
>> > 1.9.1
>

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

* Re: [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/
  2015-09-07 13:58 ` [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/ Sai Pavan Boddu
@ 2015-09-09  9:37   ` Stefan Hajnoczi
  2015-09-09  9:43     ` Sai Pavan Boddu
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Hajnoczi @ 2015-09-09  9:37 UTC (permalink / raw)
  To: Sai Pavan Boddu
  Cc: edgari, peter.maydell, alistai, qemu-devel, Sai Pavan Boddu,
	crosthwaitepeter

On Mon, Sep 07, 2015 at 07:28:39PM +0530, Sai Pavan Boddu wrote:
> Move sdhci.h to include/hw/sd/. Which makes easy creation of device
> using object_initialize.
> 
> Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
> ---
> Changes for V2:
>    Create new area in includes for sd. And move sdhci.h to same.
> ---
>  hw/sd/sdhci.c                 | 2 +-
>  {hw => include/hw}/sd/sdhci.h | 0
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename {hw => include/hw}/sd/sdhci.h (100%)

Please keep hardware constants and any other device emulation internals
in hw/sd/.  The header files in include/ should only contain that
"public" APIs that other parts of QEMU consume.

I think the declarations that need to be in include/ are:
1. typedef struct SDHCIState
2. TYPE_PCI_SDHCI and PCI_SDHCI()
3. TYPE_SYSBUS_SDHCI and SYSBUS_SDHCI()

The other declarations are internals that should be kept in hw/sd/.

This way there is a clear public API and internals (used by SD emulation
code).

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

* Re: [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/
  2015-09-09  9:37   ` Stefan Hajnoczi
@ 2015-09-09  9:43     ` Sai Pavan Boddu
  0 siblings, 0 replies; 9+ messages in thread
From: Sai Pavan Boddu @ 2015-09-09  9:43 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: peter.maydell@linaro.org, Alistair Francis,
	crosthwaitepeter@gmail.com, qemu-devel@nongnu.org, Edgar Iglesias

Hi Stefan,

> -----Original Message-----
> From: Stefan Hajnoczi [mailto:stefanha@gmail.com]
> Sent: Wednesday, September 09, 2015 3:08 PM
> To: Sai Pavan Boddu
> Cc: qemu-devel@nongnu.org; crosthwaitepeter@gmail.com;
> eblake@redhat.com; peter.maydell@linaro.org; Sai Pavan Boddu; Edgar
> Iglesias; Alistair Francis
> Subject: Re: [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/
> 
> On Mon, Sep 07, 2015 at 07:28:39PM +0530, Sai Pavan Boddu wrote:
> > Move sdhci.h to include/hw/sd/. Which makes easy creation of device
> > using object_initialize.
> >
> > Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
> > ---
> > Changes for V2:
> >    Create new area in includes for sd. And move sdhci.h to same.
> > ---
> >  hw/sd/sdhci.c                 | 2 +-
> >  {hw => include/hw}/sd/sdhci.h | 0
> >  2 files changed, 1 insertion(+), 1 deletion(-)
> >  rename {hw => include/hw}/sd/sdhci.h (100%)
> 
> Please keep hardware constants and any other device emulation internals
> in hw/sd/.  The header files in include/ should only contain that
> "public" APIs that other parts of QEMU consume.
> 
> I think the declarations that need to be in include/ are:
> 1. typedef struct SDHCIState
> 2. TYPE_PCI_SDHCI and PCI_SDHCI()
> 3. TYPE_SYSBUS_SDHCI and SYSBUS_SDHCI()
[Sai Pavan ] Ok sounds fair, So I will try to send out patches splitting the header into two. And moving the public content into include/.

Regards,
Sai Pavan
> 
> The other declarations are internals that should be kept in hw/sd/.
> 
> This way there is a clear public API and internals (used by SD emulation
> code).

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

* Re: [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/
  2015-09-07 13:58 [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/ Sai Pavan Boddu
  2015-09-07 13:58 ` [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/ Sai Pavan Boddu
@ 2015-09-09 15:04 ` Eric Blake
  1 sibling, 0 replies; 9+ messages in thread
From: Eric Blake @ 2015-09-09 15:04 UTC (permalink / raw)
  To: Sai Pavan Boddu, qemu-devel, crosthwaitepeter, peter.maydell
  Cc: Sai Pavan Boddu, edgari, alistai

[-- Attachment #1: Type: text/plain, Size: 625 bytes --]

[meta-comment]

On 09/07/2015 07:58 AM, Sai Pavan Boddu wrote:
> Create new folder in includes for sd headers.
> 
> Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
> ---

When sending a series (as evidenced by your 1/2 in the subject line),
you need a 0/2 cover letter that all other messages in the series are
in-reply-to.  'git config format.coverLetter auto' can make it easier to
remember to write the cover letter.

More patch submission hints:
http://wiki.qemu.org/Contribute/SubmitAPatch

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

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

end of thread, other threads:[~2015-09-09 15:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 13:58 [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/ Sai Pavan Boddu
2015-09-07 13:58 ` [Qemu-devel] [RFC V2 2/2] sdhci: Move sdhci.h to include/ Sai Pavan Boddu
2015-09-09  9:37   ` Stefan Hajnoczi
2015-09-09  9:43     ` Sai Pavan Boddu
2015-09-09 15:04 ` [Qemu-devel] [RFC V2 1/2] hw/sd : move sd.h to include/hw/sd/ Eric Blake
  -- strict thread matches above, loose matches on Subject: below --
2015-09-08  5:52 Sai Pavan Boddu
2015-09-08  6:03 ` Sai Pavan Boddu
2015-09-08 14:03 ` Sai Pavan Boddu
2015-09-08 16:23   ` Peter Crosthwaite

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).