qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/usb: Make "hcd-ehci.h" header public
@ 2020-05-04  8:22 Philippe Mathieu-Daudé
  2020-05-04  8:48 ` BALATON Zoltan
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04  8:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Philippe Mathieu-Daudé, Andrew Jeffery,
	Igor Mitsyanko, Beniamino Galvani, qemu-trivial, Niek Linnenbank,
	qemu-arm, qemu-ppc, Joel Stanley, David Gibson,
	Cédric Le Goater

As target-specific code use this header, move it to the publicly
accessible include/ folder.

  $ git grep hw/usb/hcd-ehci.h
  hw/arm/allwinner-h3.c:31:#include "hw/usb/hcd-ehci.h"
  hw/arm/exynos4210.c:38:#include "hw/usb/hcd-ehci.h"
  hw/ppc/sam460ex.c:38:#include "hw/usb/hcd-ehci.h"
  include/hw/arm/allwinner-a10.h:13:#include "hw/usb/hcd-ehci.h"
  include/hw/arm/aspeed_soc.h:29:#include "hw/usb/hcd-ehci.h"

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 {hw => include/hw}/usb/hcd-ehci.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename {hw => include/hw}/usb/hcd-ehci.h (100%)

diff --git a/hw/usb/hcd-ehci.h b/include/hw/usb/hcd-ehci.h
similarity index 100%
rename from hw/usb/hcd-ehci.h
rename to include/hw/usb/hcd-ehci.h
-- 
2.21.3



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

* Re: [PATCH] hw/usb: Make "hcd-ehci.h" header public
  2020-05-04  8:22 [PATCH] hw/usb: Make "hcd-ehci.h" header public Philippe Mathieu-Daudé
@ 2020-05-04  8:48 ` BALATON Zoltan
  2020-05-04 10:12   ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 5+ messages in thread
From: BALATON Zoltan @ 2020-05-04  8:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Igor Mitsyanko, Andrew Jeffery, qemu-devel,
	Beniamino Galvani, qemu-trivial, Niek Linnenbank, qemu-arm,
	qemu-ppc, Cédric Le Goater, David Gibson, Joel Stanley

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

On Mon, 4 May 2020, Philippe Mathieu-Daudé wrote:
> As target-specific code use this header, move it to the publicly
> accessible include/ folder.
>
>  $ git grep hw/usb/hcd-ehci.h
>  hw/arm/allwinner-h3.c:31:#include "hw/usb/hcd-ehci.h"
>  hw/arm/exynos4210.c:38:#include "hw/usb/hcd-ehci.h"
>  hw/ppc/sam460ex.c:38:#include "hw/usb/hcd-ehci.h"
>  include/hw/arm/allwinner-a10.h:13:#include "hw/usb/hcd-ehci.h"
>  include/hw/arm/aspeed_soc.h:29:#include "hw/usb/hcd-ehci.h"

All of these only need either the type #define or EHCISysBusState so 
splitting only those off to a public header should be enough and better 
than making public all of ehci's internal header.

Regards,
BALATON Zoltan

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

* Re: [PATCH] hw/usb: Make "hcd-ehci.h" header public
  2020-05-04  8:48 ` BALATON Zoltan
@ 2020-05-04 10:12   ` Philippe Mathieu-Daudé
  2020-05-04 10:21     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 10:12 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Peter Maydell, Igor Mitsyanko, Andrew Jeffery, qemu-devel,
	Joel Stanley, Beniamino Galvani, qemu-trivial, Niek Linnenbank,
	qemu-arm, qemu-ppc, Cédric Le Goater, David Gibson

On 5/4/20 10:48 AM, BALATON Zoltan wrote:
> On Mon, 4 May 2020, Philippe Mathieu-Daudé wrote:
>> As target-specific code use this header, move it to the publicly
>> accessible include/ folder.
>>
>>  $ git grep hw/usb/hcd-ehci.h
>>  hw/arm/allwinner-h3.c:31:#include "hw/usb/hcd-ehci.h"
>>  hw/arm/exynos4210.c:38:#include "hw/usb/hcd-ehci.h"
>>  hw/ppc/sam460ex.c:38:#include "hw/usb/hcd-ehci.h"
>>  include/hw/arm/allwinner-a10.h:13:#include "hw/usb/hcd-ehci.h"
>>  include/hw/arm/aspeed_soc.h:29:#include "hw/usb/hcd-ehci.h"
> 
> All of these only need either the type #define or EHCISysBusState so 
> splitting only those off to a public header should be enough and better 
> than making public all of ehci's internal header.

Ah you mean forward-declare EHCISysBusState in "qemu/typedefs.h", OK.

> 
> Regards,
> BALATON Zoltan


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

* Re: [PATCH] hw/usb: Make "hcd-ehci.h" header public
  2020-05-04 10:12   ` Philippe Mathieu-Daudé
@ 2020-05-04 10:21     ` Philippe Mathieu-Daudé
  2020-05-04 12:12       ` BALATON Zoltan
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 10:21 UTC (permalink / raw)
  To: BALATON Zoltan
  Cc: Peter Maydell, Igor Mitsyanko, qemu-devel, Beniamino Galvani,
	Andrew Jeffery, Niek Linnenbank, qemu-arm, qemu-ppc, Joel Stanley,
	David Gibson, qemu-trivial, Cédric Le Goater

On 5/4/20 12:12 PM, Philippe Mathieu-Daudé wrote:
> On 5/4/20 10:48 AM, BALATON Zoltan wrote:
>> On Mon, 4 May 2020, Philippe Mathieu-Daudé wrote:
>>> As target-specific code use this header, move it to the publicly
>>> accessible include/ folder.
>>>
>>>  $ git grep hw/usb/hcd-ehci.h
>>>  hw/arm/allwinner-h3.c:31:#include "hw/usb/hcd-ehci.h"
>>>  hw/arm/exynos4210.c:38:#include "hw/usb/hcd-ehci.h"
>>>  hw/ppc/sam460ex.c:38:#include "hw/usb/hcd-ehci.h"
>>>  include/hw/arm/allwinner-a10.h:13:#include "hw/usb/hcd-ehci.h"
>>>  include/hw/arm/aspeed_soc.h:29:#include "hw/usb/hcd-ehci.h"
>>
>> All of these only need either the type #define or EHCISysBusState so 
>> splitting only those off to a public header should be enough and 
>> better than making public all of ehci's internal header.
> 
> Ah you mean forward-declare EHCISysBusState in "qemu/typedefs.h", OK.

It won't work because AspeedSoCState and AwA10State use the full 
structure (not a pointer to it).

>>
>> Regards,
>> BALATON Zoltan
> 


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

* Re: [PATCH] hw/usb: Make "hcd-ehci.h" header public
  2020-05-04 10:21     ` Philippe Mathieu-Daudé
@ 2020-05-04 12:12       ` BALATON Zoltan
  0 siblings, 0 replies; 5+ messages in thread
From: BALATON Zoltan @ 2020-05-04 12:12 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Peter Maydell, Igor Mitsyanko, qemu-devel, Beniamino Galvani,
	Andrew Jeffery, Niek Linnenbank, qemu-arm, qemu-ppc, Joel Stanley,
	David Gibson, qemu-trivial, Cédric Le Goater

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

On Mon, 4 May 2020, Philippe Mathieu-Daudé wrote:
> On 5/4/20 12:12 PM, Philippe Mathieu-Daudé wrote:
>> On 5/4/20 10:48 AM, BALATON Zoltan wrote:
>>> On Mon, 4 May 2020, Philippe Mathieu-Daudé wrote:
>>>> As target-specific code use this header, move it to the publicly
>>>> accessible include/ folder.
>>>> 
>>>>  $ git grep hw/usb/hcd-ehci.h
>>>>  hw/arm/allwinner-h3.c:31:#include "hw/usb/hcd-ehci.h"
>>>>  hw/arm/exynos4210.c:38:#include "hw/usb/hcd-ehci.h"
>>>>  hw/ppc/sam460ex.c:38:#include "hw/usb/hcd-ehci.h"
>>>>  include/hw/arm/allwinner-a10.h:13:#include "hw/usb/hcd-ehci.h"
>>>>  include/hw/arm/aspeed_soc.h:29:#include "hw/usb/hcd-ehci.h"
>>> 
>>> All of these only need either the type #define or EHCISysBusState so 
>>> splitting only those off to a public header should be enough and better 
>>> than making public all of ehci's internal header.
>> 
>> Ah you mean forward-declare EHCISysBusState in "qemu/typedefs.h", OK.
>
> It won't work because AspeedSoCState and AwA10State use the full structure 
> (not a pointer to it).

I've meant splitting the internal header into a public one only containing 
the EHCISysBusState struct definition and TYPE_* #defines (or those could 
be replaced with string value where used as done at several other places 
to reduce dependence on this header). These are the only parts which used 
outside hcd-ehci. All other internal stuff would remain in internal 
header where they belong.

AwA10State also uses OHCISysBusState, why doesn't that have the same 
problem? Why no other models need this? could this be really a problem 
with these two models?

Regards,
BALATON Zoltan

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

end of thread, other threads:[~2020-05-04 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-04  8:22 [PATCH] hw/usb: Make "hcd-ehci.h" header public Philippe Mathieu-Daudé
2020-05-04  8:48 ` BALATON Zoltan
2020-05-04 10:12   ` Philippe Mathieu-Daudé
2020-05-04 10:21     ` Philippe Mathieu-Daudé
2020-05-04 12:12       ` BALATON Zoltan

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