diff mbox

[1/3] hw/xilinx_*: Share Xilinx devices between ppc and microblaze

Message ID 1339206871-4706-2-git-send-email-afaerber@suse.de
State New
Headers show

Commit Message

Andreas Färber June 9, 2012, 1:54 a.m. UTC
Speeds up the build.

xilinx_ethlite uses tswap32() and is thus target-dependent.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 default-configs/microblaze-softmmu.mak   |    1 +
 default-configs/microblazeel-softmmu.mak |    1 +
 default-configs/ppc-softmmu.mak          |    1 +
 default-configs/ppc64-softmmu.mak        |    1 +
 default-configs/ppcemb-softmmu.mak       |    1 +
 hw/Makefile.objs                         |    5 +++++
 hw/microblaze/Makefile.objs              |    3 ---
 hw/ppc/Makefile.objs                     |    3 ---
 8 files changed, 10 insertions(+), 6 deletions(-)

Comments

Peter A. G. Crosthwaite June 9, 2012, 2:15 a.m. UTC | #1
On Sat, Jun 9, 2012 at 11:54 AM, Andreas Färber <afaerber@suse.de> wrote:
> Speeds up the build.
>
> xilinx_ethlite uses tswap32() and is thus target-dependent.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  default-configs/microblaze-softmmu.mak   |    1 +
>  default-configs/microblazeel-softmmu.mak |    1 +
>  default-configs/ppc-softmmu.mak          |    1 +
>  default-configs/ppc64-softmmu.mak        |    1 +
>  default-configs/ppcemb-softmmu.mak       |    1 +
>  hw/Makefile.objs                         |    5 +++++
>  hw/microblaze/Makefile.objs              |    3 ---
>  hw/ppc/Makefile.objs                     |    3 ---
>  8 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/default-configs/microblaze-softmmu.mak b/default-configs/microblaze-softmmu.mak
> index 613edab..08e7449 100644
> --- a/default-configs/microblaze-softmmu.mak
> +++ b/default-configs/microblaze-softmmu.mak
> @@ -3,3 +3,4 @@
>  CONFIG_PTIMER=y
>  CONFIG_PFLASH_CFI01=y
>  CONFIG_SERIAL=y
> +CONFIG_XILINX=y
> diff --git a/default-configs/microblazeel-softmmu.mak b/default-configs/microblazeel-softmmu.mak
> index 4b40fb2..a9578e1 100644
> --- a/default-configs/microblazeel-softmmu.mak
> +++ b/default-configs/microblazeel-softmmu.mak
> @@ -3,3 +3,4 @@
>  CONFIG_PTIMER=y
>  CONFIG_PFLASH_CFI01=y
>  CONFIG_SERIAL=y
> +CONFIG_XILINX=y
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 1a768fc..d0fde7b 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -36,3 +36,4 @@ CONFIG_PFLASH_CFI01=y
>  CONFIG_PFLASH_CFI02=y
>  CONFIG_PTIMER=y
>  CONFIG_I8259=y
> +CONFIG_XILINX=y
> diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
> index f490368..e4265b4 100644
> --- a/default-configs/ppc64-softmmu.mak
> +++ b/default-configs/ppc64-softmmu.mak
> @@ -33,3 +33,4 @@ CONFIG_PFLASH_CFI01=y
>  CONFIG_PFLASH_CFI02=y
>  CONFIG_PTIMER=y
>  CONFIG_I8259=y
> +CONFIG_XILINX=y
> diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
> index 829f462..aaa9cdc 100644
> --- a/default-configs/ppcemb-softmmu.mak
> +++ b/default-configs/ppcemb-softmmu.mak
> @@ -33,3 +33,4 @@ CONFIG_PFLASH_CFI01=y
>  CONFIG_PFLASH_CFI02=y
>  CONFIG_PTIMER=y
>  CONFIG_I8259=y
> +CONFIG_XILINX=y
> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
> index 7e17504..102ebcf 100644
> --- a/hw/Makefile.objs
> +++ b/hw/Makefile.objs
> @@ -59,6 +59,11 @@ hw-obj-$(CONFIG_PIIX4) += piix4.o
>  hw-obj-$(CONFIG_G364FB) += g364fb.o
>  hw-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
>
> +# Xilinx devices
> +hw-obj-$(CONFIG_XILINX) += xilinx_intc.o
> +hw-obj-$(CONFIG_XILINX) += xilinx_timer.o
> +hw-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
> +

Hi Andreas,

whats the plan with xilinx_axidma xilinx_axienet and  xilinx_ethlite?
Should be fold them into this CONFIG_  or are these the exceptions to
the rule as they are the annoying endian dependent ones?

Regards,
Peter

>  # PCI watchdog devices
>  hw-obj-$(CONFIG_PCI) += wdt_i6300esb.o
>
> diff --git a/hw/microblaze/Makefile.objs b/hw/microblaze/Makefile.objs
> index 020f7b6..59ea20f 100644
> --- a/hw/microblaze/Makefile.objs
> +++ b/hw/microblaze/Makefile.objs
> @@ -3,9 +3,6 @@ obj-y += petalogix_ml605_mmu.o
>  obj-y += microblaze_boot.o
>
>  obj-y += microblaze_pic_cpu.o
> -obj-y += xilinx_intc.o
> -obj-y += xilinx_timer.o
> -obj-y += xilinx_uartlite.o
>  obj-y += xilinx_ethlite.o
>  obj-y += xilinx_axidma.o
>  obj-y += xilinx_axienet.o
> diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs
> index 842e7b9..6f5757f 100644
> --- a/hw/ppc/Makefile.objs
> +++ b/hw/ppc/Makefile.objs
> @@ -24,9 +24,6 @@ obj-y += openpic.o
>  obj-$(CONFIG_FDT) += ../device_tree.o
>
>  # Xilinx PPC peripherals
> -obj-y += xilinx_intc.o
> -obj-y += xilinx_timer.o
> -obj-y += xilinx_uartlite.o
>  obj-y += xilinx_ethlite.o
>
>  obj-y := $(addprefix ../,$(obj-y))
> --
> 1.7.7
>
>
Andreas Färber June 9, 2012, 2:31 a.m. UTC | #2
Hi,

Am 09.06.2012 04:15, schrieb Peter Crosthwaite:
> On Sat, Jun 9, 2012 at 11:54 AM, Andreas Färber <afaerber@suse.de> wrote:
>> Speeds up the build.
>>
>> xilinx_ethlite uses tswap32() and is thus target-dependent.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
[...]
>> --- a/hw/Makefile.objs
>> +++ b/hw/Makefile.objs
>> @@ -59,6 +59,11 @@ hw-obj-$(CONFIG_PIIX4) += piix4.o
>>  hw-obj-$(CONFIG_G364FB) += g364fb.o
>>  hw-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
>>
>> +# Xilinx devices
>> +hw-obj-$(CONFIG_XILINX) += xilinx_intc.o
>> +hw-obj-$(CONFIG_XILINX) += xilinx_timer.o
>> +hw-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
>> +
> 
> whats the plan with xilinx_axidma xilinx_axienet and  xilinx_ethlite?
> Should be fold them into this CONFIG_  or are these the exceptions to
> the rule as they are the annoying endian dependent ones?

The axi ones are in patch 3/3 as they are only used for microblaze, not
ppc, and they use qemu-log.h. Designed for pick-from-the-front*. :)

The ethlite has the endianness issue described in the cover letter. Once
solved, I'd expect it to be folded into CONFIG_XILINX as well, yes.

Obviously if you have better variable naming, feel free to suggest or to
change before Edgar applies, my stake is only that the variable names
match in both places and that we achieve some deduplification.

Cheers,
Andreas

* Depending on whether this or Blue's series goes in first, in which
case 2/3 gets obsoleted.
Peter A. G. Crosthwaite June 9, 2012, 2:36 a.m. UTC | #3
On Sat, Jun 9, 2012 at 12:31 PM, Andreas Färber <afaerber@suse.de> wrote:
> Hi,
>
> Am 09.06.2012 04:15, schrieb Peter Crosthwaite:
>> On Sat, Jun 9, 2012 at 11:54 AM, Andreas Färber <afaerber@suse.de> wrote:
>>> Speeds up the build.
>>>
>>> xilinx_ethlite uses tswap32() and is thus target-dependent.
>>>
>>> Signed-off-by: Andreas Färber <afaerber@suse.de>
> [...]
>>> --- a/hw/Makefile.objs
>>> +++ b/hw/Makefile.objs
>>> @@ -59,6 +59,11 @@ hw-obj-$(CONFIG_PIIX4) += piix4.o
>>>  hw-obj-$(CONFIG_G364FB) += g364fb.o
>>>  hw-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
>>>
>>> +# Xilinx devices
>>> +hw-obj-$(CONFIG_XILINX) += xilinx_intc.o
>>> +hw-obj-$(CONFIG_XILINX) += xilinx_timer.o
>>> +hw-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
>>> +
>>
>> whats the plan with xilinx_axidma xilinx_axienet and  xilinx_ethlite?
>> Should be fold them into this CONFIG_  or are these the exceptions to
>> the rule as they are the annoying endian dependent ones?
>
> The axi ones are in patch 3/3 as they are only used for microblaze, not
> ppc, and they use qemu-log.h. Designed for pick-from-the-front*. :)
>
> The ethlite has the endianness issue described in the cover letter. Once
> solved, I'd expect it to be folded into CONFIG_XILINX as well, yes.
>
> Obviously if you have better variable naming,

CONFIG_XILINX is kinda vague, this is really referring to the XILINX
EDK IP suite. Now that zynq has landed "xilinx" is ambiguous between
the two platform families. Edgar do you have any preference? perhaps
CONFIG_XILINX_IP?

 feel free to suggest or to
> change before Edgar applies, my stake is only that the variable names
> match in both places and that we achieve some deduplification.
>
> Cheers,
> Andreas
>
> * Depending on whether this or Blue's series goes in first, in which
> case 2/3 gets obsoleted.
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
diff mbox

Patch

diff --git a/default-configs/microblaze-softmmu.mak b/default-configs/microblaze-softmmu.mak
index 613edab..08e7449 100644
--- a/default-configs/microblaze-softmmu.mak
+++ b/default-configs/microblaze-softmmu.mak
@@ -3,3 +3,4 @@ 
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_SERIAL=y
+CONFIG_XILINX=y
diff --git a/default-configs/microblazeel-softmmu.mak b/default-configs/microblazeel-softmmu.mak
index 4b40fb2..a9578e1 100644
--- a/default-configs/microblazeel-softmmu.mak
+++ b/default-configs/microblazeel-softmmu.mak
@@ -3,3 +3,4 @@ 
 CONFIG_PTIMER=y
 CONFIG_PFLASH_CFI01=y
 CONFIG_SERIAL=y
+CONFIG_XILINX=y
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 1a768fc..d0fde7b 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -36,3 +36,4 @@  CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_PTIMER=y
 CONFIG_I8259=y
+CONFIG_XILINX=y
diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak
index f490368..e4265b4 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -33,3 +33,4 @@  CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_PTIMER=y
 CONFIG_I8259=y
+CONFIG_XILINX=y
diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
index 829f462..aaa9cdc 100644
--- a/default-configs/ppcemb-softmmu.mak
+++ b/default-configs/ppcemb-softmmu.mak
@@ -33,3 +33,4 @@  CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_PTIMER=y
 CONFIG_I8259=y
+CONFIG_XILINX=y
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 7e17504..102ebcf 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -59,6 +59,11 @@  hw-obj-$(CONFIG_PIIX4) += piix4.o
 hw-obj-$(CONFIG_G364FB) += g364fb.o
 hw-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
 
+# Xilinx devices
+hw-obj-$(CONFIG_XILINX) += xilinx_intc.o
+hw-obj-$(CONFIG_XILINX) += xilinx_timer.o
+hw-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
+
 # PCI watchdog devices
 hw-obj-$(CONFIG_PCI) += wdt_i6300esb.o
 
diff --git a/hw/microblaze/Makefile.objs b/hw/microblaze/Makefile.objs
index 020f7b6..59ea20f 100644
--- a/hw/microblaze/Makefile.objs
+++ b/hw/microblaze/Makefile.objs
@@ -3,9 +3,6 @@  obj-y += petalogix_ml605_mmu.o
 obj-y += microblaze_boot.o
 
 obj-y += microblaze_pic_cpu.o
-obj-y += xilinx_intc.o
-obj-y += xilinx_timer.o
-obj-y += xilinx_uartlite.o
 obj-y += xilinx_ethlite.o
 obj-y += xilinx_axidma.o
 obj-y += xilinx_axienet.o
diff --git a/hw/ppc/Makefile.objs b/hw/ppc/Makefile.objs
index 842e7b9..6f5757f 100644
--- a/hw/ppc/Makefile.objs
+++ b/hw/ppc/Makefile.objs
@@ -24,9 +24,6 @@  obj-y += openpic.o
 obj-$(CONFIG_FDT) += ../device_tree.o
 
 # Xilinx PPC peripherals
-obj-y += xilinx_intc.o
-obj-y += xilinx_timer.o
-obj-y += xilinx_uartlite.o
 obj-y += xilinx_ethlite.o
 
 obj-y := $(addprefix ../,$(obj-y))