Add Markus Armbrusters code for Broadcom Perhiperals for ARM.
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Also available at
Following suggestions split my original patch up. This the largest monolithic chunk is additional BCM device support from Markus Armbruster.
Quoted 1 line
From
0b39a04030d5a2cea4fcd2159d365580ca155b78Mon Sep 17 00:00:00 2001
From: John Bradley <[email protected]>
Date: Wed, 17 May 2017 18:57:21 +0100
Subject: [PATCH] Add Markus Armbrusters code for Broadcom Perhiperals for ARM.
---
hw/arm/Makefile.objs | 2 +- hw/arm/bcm2835.c | 114 ++++ hw/arm/bcm2835_peripherals.c | 104 ++++ hw/misc/Makefile.objs | 2 + hw/misc/bcm2835_mphi.c | 163 ++++++ hw/misc/bcm2835_power.c | 106 ++++ hw/timer/Makefile.objs | 2 + hw/timer/bcm2835_st.c | 202 +++++++ hw/timer/bcm2835_timer.c | 224 +++++++ hw/usb/Makefile.objs | 4 +- hw/usb/bcm2835_usb.c | 604 +++++++++++++++++++ hw/usb/bcm2835_usb_regs.h | 1061 ++++++++++++++++++++++++++++++++++ include/hw/arm/bcm2835.h | 37 ++ include/hw/arm/bcm2835_peripherals.h | 10 + include/hw/intc/bcm2835_control.h | 53 ++ include/hw/misc/bcm2835_mphi.h | 28 + include/hw/misc/bcm2835_power.h | 22 + include/hw/timer/bcm2835_st.h | 25 + include/hw/timer/bcm2835_timer.h | 32 + include/hw/usb/bcm2835_usb.h | 78 +++ 20 files changed, 2871 insertions(+), 2 deletions(-)
create mode 100644 hw/arm/bcm2835.c
create mode 100644 hw/misc/bcm2835_mphi.c create mode 100644 hw/misc/bcm2835_power.c create mode 100644 hw/timer/bcm2835_st.c create mode 100644 hw/timer/bcm2835_timer.c create mode 100644 hw/usb/bcm2835_usb.c create mode 100644 hw/usb/bcm2835_usb_regs.h create mode 100644 include/hw/arm/bcm2835.h create mode 100644 include/hw/intc/bcm2835_control.h create mode 100644 include/hw/misc/bcm2835_mphi.h create mode 100644 include/hw/misc/bcm2835_power.h create mode 100644 include/hw/timer/bcm2835_st.h create mode 100644 include/hw/timer/bcm2835_timer.h create mode 100644 include/hw/usb/bcm2835_usb.h
hw/arm/Makefile.objs +0 -0
@@ -11,7 +11,7 @@ obj-y += armv7m.o exynos4210.o pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o
obj-$(CONFIG_DIGIC) += digic.o
obj-y += omap1.o omap2.o strongarm.o obj-$(CONFIG_ALLWINNER_A10) += allwinner-a10.o cubieboard.o -obj-$(CONFIG_RASPI) += bcm2835_peripherals.o bcm2836.o raspi.o +obj-$(CONFIG_RASPI) += bcm2835.o bcm2835_peripherals.o bcm2836.o raspi.o obj-$(CONFIG_STM32F205_SOC) += stm32f205_soc.o obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp.o xlnx-ep108.o obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o
hw/arm/bcm2835.c new file +114 -0
114 lines not on this page · raw message
hw/arm/bcm2835_peripherals.c +0 -0
@@ -56,6 +56,29 @@ static void bcm2835_peripherals_init(Object *obj)
object_property_add_child(obj, "aux", OBJECT(&s->aux), NULL); qdev_set_parent_bus(DEVICE(&s->aux), sysbus_get_default());
+ /* System timer */ + object_initialize(&s->st, sizeof(s->st), TYPE_BCM2835_ST); + object_property_add_child(obj, "systimer", OBJECT(&s->st), NULL); + qdev_set_parent_bus(DEVICE(&s->st), sysbus_get_default()); + + /* ARM timer */ + object_initialize(&s->timer, sizeof(s->timer), TYPE_BCM2835_TIMER); + object_property_add_child(obj, "armtimer", OBJECT(&s->timer), NULL); + qdev_set_parent_bus(DEVICE(&s->timer), sysbus_get_default()); + + /* USB controller */ + object_initialize(&s->usb, sizeof(s->usb), TYPE_BCM2835_USB); + object_property_add_child(obj, "usb", OBJECT(&s->usb), NULL); + qdev_set_parent_bus(DEVICE(&s->usb), sysbus_get_default());
+
+ object_property_add_const_link(OBJECT(&s->usb), "dma_mr",
+ OBJECT(&s->gpu_bus_mr), &error_abort);
+
+ /* MPHI - Message-based Parallel Host Interface */ + object_initialize(&s->mphi, sizeof(s->mphi), TYPE_BCM2835_MPHI); + object_property_add_child(obj, "mphi", OBJECT(&s->mphi), NULL); + qdev_set_parent_bus(DEVICE(&s->mphi), sysbus_get_default());
+
/* Mailboxes */object_initialize(&s->mboxes, sizeof(s->mboxes), TYPE_BCM2835_MBOX); object_property_add_child(obj, "mbox", OBJECT(&s->mboxes), NULL); @@ -64,6 +87,11 @@ static void bcm2835_peripherals_init(Object *obj) object_property_add_const_link(OBJECT(&s->mboxes), "mbox-mr", OBJECT(&s->mbox_mr), &error_abort);
+ /* Power management */ + object_initialize(&s->power, sizeof(s->power), TYPE_BCM2835_POWER); + object_property_add_child(obj, "power", OBJECT(&s->power), NULL); + qdev_set_parent_bus(DEVICE(&s->power), sysbus_get_default());
+
/* Framebuffer */object_initialize(&s->fb, sizeof(s->fb), TYPE_BCM2835_FB); object_property_add_child(obj, "fb", OBJECT(&s->fb), NULL);
@@ -179,6 +207,7 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp) sysbus_connect_irq(s->uart0, 0,
qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,INTERRUPT_UART));
+
/* AUX / UART1 */qdev_prop_set_chr(DEVICE(&s->aux), "chardev", serial_hds[1]);
@@ -194,6 +223,67 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,INTERRUPT_AUX));
+ /* System timer */
+ object_property_set_bool(OBJECT(&s->st), true, "realized", &err);
+ if (err) {+ error_propagate(errp, err);
+ return;
+ }
+
+ memory_region_add_subregion(&s->peri_mr, ST_OFFSET,
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->st), 0));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->st), 0,
+ qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
+ INTERRUPT_TIMER0));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->st), 1,
+ qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
+ INTERRUPT_TIMER1));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->st), 2,
+ qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
+ INTERRUPT_TIMER2));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->st), 3,
+ qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
+ INTERRUPT_TIMER3));
+
+ /* ARM timer */
+ object_property_set_bool(OBJECT(&s->timer), true, "realized", &err);
+ if (err) {+ error_propagate(errp, err);
+ return;
+ }
+
+ memory_region_add_subregion(&s->peri_mr, ARMCTRL_TIMER0_1_OFFSET,
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->timer), 0));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->timer), 0,
+ qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_ARM_IRQ,
+ INTERRUPT_ARM_TIMER));
+
+ /* USB controller */
+ object_property_set_bool(OBJECT(&s->usb), true, "realized", &err);
+ if (err) {+ error_propagate(errp, err);
+ return;
+ }
+
+ memory_region_add_subregion(&s->peri_mr, USB_OFFSET,
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->usb), 0));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->usb), 0,
+ qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
+ INTERRUPT_USB));
+
+ /* MPHI - Message-based Parallel Host Interface */
+ object_property_set_bool(OBJECT(&s->mphi), true, "realized", &err);
+ if (err) {+ error_propagate(errp, err);
+ return;
+ }
+
+ memory_region_add_subregion(&s->peri_mr, MPHI_OFFSET,
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->mphi), 0));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->mphi), 0,
+ qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ,
+ INTERRUPT_HOSTPORT));
+
/* Mailboxes */object_property_set_bool(OBJECT(&s->mboxes), true, "realized", &err);
if (err) {
@@ -207,6 +297,18 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_ARM_IRQ, INTERRUPT_ARM_MAILBOX));
+ /* Power management */
+ object_property_set_bool(OBJECT(&s->power), true, "realized", &err);
+ if (err) {+ error_propagate(errp, err);
+ return;
+ }
+
+ memory_region_add_subregion(&s->mbox_mr, MBOX_CHAN_POWER << MBOX_AS_CHAN_SHIFT,
+ sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->power), 0));
+ sysbus_connect_irq(SYS_BUS_DEVICE(&s->power), 0,
+ qdev_get_gpio_in(DEVICE(&s->mboxes), MBOX_CHAN_POWER));
+
/* Framebuffer */vcram_size = (uint32_t)object_property_get_int(OBJECT(s), "vcram-size", &err);
@@ -338,6 +440,8 @@ static void bcm2835_peripherals_class_init(ObjectClass *oc, void *data) DeviceClass *dc = DEVICE_CLASS(oc);
dc->realize = bcm2835_peripherals_realize;
+ /* Reason: realize() method uses qemu_char_get_next_serial() */
+ dc->cannot_instantiate_with_device_add_yet = true;
}
static const TypeInfo bcm2835_peripherals_type_info = {
hw/misc/Makefile.objs +0 -0
@@ -41,6 +41,8 @@ obj-$(CONFIG_OMAP) += omap_l4.o
obj-$(CONFIG_OMAP) += omap_sdrc.o
obj-$(CONFIG_OMAP) += omap_tap.o
obj-$(CONFIG_RASPI) += bcm2835_mbox.o
+obj-$(CONFIG_RASPI) += bcm2835_mphi.o
+obj-$(CONFIG_RASPI) += bcm2835_power.o
obj-$(CONFIG_RASPI) += bcm2835_property.o
obj-$(CONFIG_RASPI) += bcm2835_rng.o
obj-$(CONFIG_SLAVIO) += slavio_misc.o
hw/misc/bcm2835_mphi.c new file +163 -0
163 lines not on this page · raw message
hw/misc/bcm2835_power.c new file +106 -0
106 lines not on this page · raw message
hw/timer/Makefile.objs +0 -0
@@ -29,6 +29,8 @@ obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
obj-$(CONFIG_OMAP) += omap_gptimer.o
obj-$(CONFIG_OMAP) += omap_synctimer.o
obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
+obj-$(CONFIG_RASPI) += bcm2835_st.o
+obj-$(CONFIG_RASPI) += bcm2835_timer.o
obj-$(CONFIG_SH4) += sh_timer.o
obj-$(CONFIG_DIGIC) += digic-timer.o
obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o
hw/timer/bcm2835_st.c new file +202 -0
202 lines not on this page · raw message
hw/timer/bcm2835_timer.c new file +224 -0
224 lines not on this page · raw message
hw/usb/Makefile.objs +0 -0
@@ -40,5 +40,7 @@ common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o
common-obj-y += $(patsubst %,host-%.o,$(HOST_USB))
ifeq ($(CONFIG_USB_LIBUSB),y)
-common-obj-$(CONFIG_XEN) += xen-usb.o
+common-obj-$(CONFIG_XEN_BACKEND) += xen-usb.o
endif
+
+obj-$(CONFIG_RASPI) += bcm2835_usb.o
hw/usb/bcm2835_usb.c new file +604 -0
604 lines not on this page · raw message
hw/usb/bcm2835_usb_regs.h new file +1061 -0
1,061 lines not on this page · raw message
include/hw/arm/bcm2835.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Raspberry Pi emulation (c) 2012 Gregory Estrade +* Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous +* +* Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft +* Written by Andrew Baumann +* +* Moved to Qemu root from Old Rasp +* John Bradley April 2017 +* +* This code is licensed under the GNU GPLv2 and later. +*/ + +#ifndef BCM2835_H +#define BCM2835_H + +#include "hw/arm/arm.h" +#include "hw/arm/bcm2835_peripherals.h" +#include "hw/intc/bcm2835_control.h" + +#define TYPE_BCM2835 "bcm2835" +#define BCM2835 (obj) OBJECT_CHECK(BCM2835State, (obj), TYPE_BCM2835) + +#define BCM2835_NCPUS 1 + +typedef struct BCM2835State { +/*< private >*/ +DeviceState parent_obj; +/*< public >*/ + +uint32_t enabled_cpus; +ARMCPU cpus[BCM2835_NCPUS ]; + +BCM2835PeripheralState peripherals; +}BCM2835State ; + +#endif /* BCM2835_H */
include/hw/arm/bcm2835_peripherals.h +0 -0
@@ -18,12 +18,17 @@
#include "hw/display/bcm2835_fb.h"
#include "hw/dma/bcm2835_dma.h"
#include "hw/intc/bcm2835_ic.h"
+#include "hw/misc/bcm2835_mphi.h"
+#include "hw/misc/bcm2835_power.h"
#include "hw/misc/bcm2835_property.h"
#include "hw/misc/bcm2835_rng.h"
#include "hw/misc/bcm2835_mbox.h"
#include "hw/sd/sdhci.h"
#include "hw/sd/bcm2835_sdhost.h"
#include "hw/gpio/bcm2835_gpio.h"
+#include "hw/timer/bcm2835_st.h"
+#include "hw/timer/bcm2835_timer.h"
+#include "hw/usb/bcm2835_usb.h"
#define TYPE_BCM2835_PERIPHERALS "bcm2835-peripherals" #define BCM2835_PERIPHERALS(obj) \
@@ -43,10 +48,15 @@ typedef struct BCM2835PeripheralState { BCM2835FBState fb;
BCM2835DMAState dma;
BCM2835ICState ic;
+ BCM2835MphiState mphi;
+ BCM2835PowerState power;
BCM2835PropertyState property;
BCM2835RngState rng;
BCM2835MboxState mboxes;
SDHCIState sdhci;
+ BCM2835StState st; + BCM2835TimerState timer; + BCM2835UsbState usb;
BCM2835SDHostState sdhost;
BCM2835GpioState gpio;
} BCM2835PeripheralState;
include/hw/intc/bcm2835_control.h new file +53 -0
53 lines not on this page · raw message
include/hw/misc/bcm2835_mphi.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Raspberry Pi emulation (c) 2012 Gregory Estrade +* This code is licensed under the GNU GPLv2 and later. +*/ + +#ifndef BCM2835_MPHI_H +#define BCM2835_MPHI_H + +#include "hw/sysbus.h" + +#define TYPE_BCM2835_MPHI "bcm2835-mphi" +#define BCM2835_MPHI (obj) \ + OBJECT_CHECK(BCM2835MphiState, (obj), TYPE_BCM2835_MPHI) + +typedef struct { +SysBusDevice busdev; +MemoryRegion iomem; + +uint32_t mphi_base; +uint32_t mphi_ctrl; +uint32_t mphi_outdda; +uint32_t mphi_outddb; +uint32_t mphi_intstat; + +qemu_irq irq; +}BCM2835MphiState ; + +#endif
include/hw/misc/bcm2835_power.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* Raspberry Pi emulation (c) 2012 Gregory Estrade +* This code is licensed under the GNU GPLv2 and later. +*/ + +#ifndef BCM2835_POWER_H +#define BCM2835_POWER_H + +#include "hw/sysbus.h" + +#define TYPE_BCM2835_POWER "bcm2835-power" +#define BCM2835_POWER (obj) \ + OBJECT_CHECK(BCM2835PowerState, (obj), TYPE_BCM2835_POWER) + +typedef struct { +SysBusDevice busdev; +MemoryRegion iomem; +int pending; +qemu_irq mbox_irq; +}BCM2835PowerState ; + +#endif
include/hw/timer/bcm2835_st.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Raspberry Pi emulation (c) 2012 Gregory Estrade +* This code is licensed under the GNU GPLv2 and later. +*/ + +#ifndef BCM2835_ST_H +#define BCM2835_ST_H + +#include "hw/sysbus.h" +#include "qemu/timer.h" + +#define TYPE_BCM2835_ST "bcm2835_st" +#define BCM2835_ST (obj) OBJECT_CHECK(BCM2835StState, (obj), TYPE_BCM2835_ST) + +typedef struct BCM2835StState { +SysBusDevice busdev; +MemoryRegion iomem; +QEMUTimer *timer; +uint32_t compare[4 ]; +uint32_t match; +uint32_t next; +qemu_irq irq[4 ]; +}BCM2835StState ; + +#endif
include/hw/timer/bcm2835_timer.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Raspberry Pi emulation (c) 2012 Gregory Estrade +* This code is licensed under the GNU GPLv2 and later. +*/ + +#ifndef BCM2835_TIMER_H +#define BCM2835_TIMER_H + +#include "hw/sysbus.h" +#include "hw/ptimer.h" + +#define TYPE_BCM2835_TIMER "bcm2835_timer" +#define BCM2835_TIMER (obj) \ + OBJECT_CHECK(BCM2835TimerState, (obj), TYPE_BCM2835_TIMER) + +typedef struct { +SysBusDevice busdev; +MemoryRegion iomem; + +qemu_irq irq; + +uint32_t load; +uint32_t control; +uint32_t raw_irq; +uint32_t prediv; +uint32_t frc_value; + +ptimer_state *timer; +ptimer_state *frc_timer; +}BCM2835TimerState ; + +#endif
include/hw/usb/bcm2835_usb.h new file +78 -0
78 lines not on this page · raw message
Signature · 16 lines
2.13.0.windows.1 0001-Add-Markus-Armbrusters-code-for-Broadcom-Perhiperals.patch Shared with Dropbox John Bradley Tel: 07896 839635 Skype: flypie125 125B Grove Street Edge Hill Liverpool L7 7AF
Quoted 3 lines · John Bradley via Qemu-devel
Also available at
This content belongs...
Quoted 11 lines
Following suggestions split my original patch up. This the largest monolithic chunk is additional BCM device support from Markus Armbruster.
Quoted 1 line
From
0b39a04030d5a2cea4fcd2159d365580ca155b78Mon Sep 17 00:00:00 2001From: John Bradley <[email protected]>
Date: Wed, 17 May 2017 18:57:21 +0100
Subject: [PATCH] Add Markus Armbrusters code for Broadcom Perhiperals for ARM.Signed-off-by John Bradley <[email protected]>
I would expect that if some of this code was written by Markus, then it would carry his Signed-off-by. Or, maybe you just mean that you are splitting your patch according to the device Markus gave (in which case, a Suggested-by: tag may be appropriate). Either way, I don't see why Markus' name has to be in the subject line (the patch subject should be WHAT changed, not WHO suggested the change).
Quoted 1 line
---
...here, after the --- separator. It is useful to reviewers, but should not end up as part of the actual commit message.
Quoted 4 lines
hw/arm/Makefile.objs | 2 +- hw/arm/bcm2835.c | 114 ++++ hw/arm/bcm2835_peripherals.c | 104 ++++ hw/misc/Makefile.objs | 2 +
Quoted 8 lines
hw/misc/bcm2835_mphi.c | 163 ++++++ hw/misc/bcm2835_power.c | 106 ++++ hw/timer/Makefile.objs | 2 + hw/timer/bcm2835_st.c | 202 +++++++ hw/timer/bcm2835_timer.c | 224 +++++++ hw/usb/Makefile.objs | 4 +- hw/usb/bcm2835_usb.c | 604 +++++++++++++++++++ hw/usb/bcm2835_usb_regs.h | 1061 ++++++++++++++++++++++++++++++++++
That's still rather large to review in one chunk, especially while
touching other files. It can probably still be split up further.
Quoted 24 lines
include/hw/arm/bcm2835.h | 37 ++ include/hw/arm/bcm2835_peripherals.h | 10 + include/hw/intc/bcm2835_control.h | 53 ++ include/hw/misc/bcm2835_mphi.h | 28 + include/hw/misc/bcm2835_power.h | 22 + include/hw/timer/bcm2835_st.h | 25 + include/hw/timer/bcm2835_timer.h | 32 + include/hw/usb/bcm2835_usb.h | 78 +++ 20 files changed, 2871 insertions(+), 2 deletions(-)create mode 100644
hw/arm/bcm2835.c
create mode 100644hw/misc/bcm2835_mphi.ccreate mode 100644hw/misc/bcm2835_power.ccreate mode 100644hw/timer/bcm2835_st.ccreate mode 100644hw/timer/bcm2835_timer.ccreate mode 100644hw/usb/bcm2835_usb.ccreate mode 100644hw/usb/bcm2835_usb_regs.hcreate mode 100644include/hw/arm/bcm2835.hcreate mode 100644include/hw/intc/bcm2835_control.hcreate mode 100644include/hw/misc/bcm2835_mphi.hcreate mode 100644include/hw/misc/bcm2835_power.hcreate mode 100644include/hw/timer/bcm2835_st.hcreate mode 100644include/hw/timer/bcm2835_timer.hcreate mode 100644include/hw/usb/bcm2835_usb.h
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
This is especial true as I meant Andrew Baumann 0xabu (Andrew Baumann)
| | | | | |
|
|
|
| |0xabu (Andrew Baumann)
0xabu has 3 repositories available. Follow their code on GitHub. | |
|
|
John BradleyTel: 07896 839635Skype: flypie125 125B Grove StreetEdge Hill Liverpool L7 7AF
On Wednesday, 17 May 2017, 19:27, Eric Blake <[email protected]> wrote:
Quoted 3 lines · John Bradley via Qemu-devel
Also available at
This content belongs...
Quoted 11 lines
Following suggestions split my original patch up. This the largest monolithic chunk is additional BCM device support from Markus Armbruster.
Quoted 1 line
From
0b39a04030d5a2cea4fcd2159d365580ca155b78Mon Sep 17 00:00:00 2001From: John Bradley <[email protected]>
Date: Wed, 17 May 2017 18:57:21 +0100
Subject: [PATCH] Add Markus Armbrusters code for Broadcom Perhiperals for ARM.Signed-off-by John Bradley <[email protected]>
I would expect that if some of this code was written by Markus, then it would carry his Signed-off-by. Or, maybe you just mean that you are splitting your patch according to the device Markus gave (in which case, a Suggested-by: tag may be appropriate). Either way, I don't see why Markus' name has to be in the subject line (the patch subject should be WHAT changed, not WHO suggested the change).
Quoted 1 line
---
...here, after the --- separator. It is useful to reviewers, but should not end up as part of the actual commit message.
Quoted 4 lines
hw/arm/Makefile.objs | 2 +- hw/arm/bcm2835.c | 114 ++++ hw/arm/bcm2835_peripherals.c | 104 ++++ hw/misc/Makefile.objs | 2 +
Quoted 8 lines
hw/misc/bcm2835_mphi.c | 163 ++++++ hw/misc/bcm2835_power.c | 106 ++++ hw/timer/Makefile.objs | 2 + hw/timer/bcm2835_st.c | 202 +++++++ hw/timer/bcm2835_timer.c | 224 +++++++ hw/usb/Makefile.objs | 4 +- hw/usb/bcm2835_usb.c | 604 +++++++++++++++++++ hw/usb/bcm2835_usb_regs.h | 1061 ++++++++++++++++++++++++++++++++++
That's still rather large to review in one chunk, especially while touching other files. It can probably still be split up further.
Quoted 24 lines
include/hw/arm/bcm2835.h | 37 ++
include/hw/arm/bcm2835_peripherals.h| 10 + include/hw/intc/bcm2835_control.h | 53 ++ include/hw/misc/bcm2835_mphi.h | 28 + include/hw/misc/bcm2835_power.h | 22 + include/hw/timer/bcm2835_st.h | 25 + include/hw/timer/bcm2835_timer.h | 32 + include/hw/usb/bcm2835_usb.h | 78 +++20 files changed, 2871 insertions(+), 2 deletions(-)create mode 100644
hw/arm/bcm2835.c
create mode 100644hw/misc/bcm2835_mphi.ccreate mode 100644hw/misc/bcm2835_power.ccreate mode 100644hw/timer/bcm2835_st.ccreate mode 100644hw/timer/bcm2835_timer.ccreate mode 100644hw/usb/bcm2835_usb.ccreate mode 100644hw/usb/bcm2835_usb_regs.hcreate mode 100644include/hw/arm/bcm2835.hcreate mode 100644include/hw/intc/bcm2835_control.hcreate mode 100644include/hw/misc/bcm2835_mphi.hcreate mode 100644include/hw/misc/bcm2835_power.hcreate mode 100644include/hw/timer/bcm2835_st.hcreate mode 100644include/hw/timer/bcm2835_timer.hcreate mode 100644include/hw/usb/bcm2835_usb.h
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 1 line · John Bradley
This is especial true as I meant Andrew Baumann
0xabu(Andrew Baumann)
Top-posting is not nice on technical lists.
Quoted 2 lines
0xabu(Andrew Baumann)
0xabuhas 3 repositories available. Follow their code on GitHub. | |
Using github requires the use of non-free (as in freedom) Javascript. That's why this list prefers that all patches be sent through the list as emails, not as github pull requests. I'm not going to look at what 0xabu's repository contains, but rather at what you send through the list. But part of the contract of Signed-off-by is that you have permission to post the patch and agree to the license in use - which means that if your work is a modified version of Andrew Baumann's work, then you need Andrew Baumann's sign-off before you can add yours.
Other hints for better patch submission may be found here:
http://wiki.qemu.org/Contribute/SubmitAPatch
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Andrew Baumann has and others have release the code under GNU General Public License version 2 (GPLv2), the same as QEMU that allows me to added it to QEMU as it is under the same license, by signing it off this is what I am certifying. John BradleyTel: 07896 839635Skype: flypie125 125B Grove StreetEdge Hill Liverpool L7 7AF
On Wednesday, 17 May 2017, 20:11, Eric Blake <[email protected]> wrote:
Quoted 1 line · John Bradley
This is especial true as I meant Andrew Baumann
0xabu(Andrew Baumann)
Top-posting is not nice on technical lists.
Quoted 2 lines
0xabu(Andrew Baumann)
0xabuhas 3 repositories available. Follow their code on GitHub. | |
Using github requires the use of non-free (as in freedom) Javascript. That's why this list prefers that all patches be sent through the list as emails, not as github pull requests. I'm not going to look at what 0xabu's repository contains, but rather at what you send through the list. But part of the contract of Signed-off-by is that you have permission to post the patch and agree to the license in use - which means that if your work is a modified version of Andrew Baumann's work, then you need Andrew Baumann's sign-off before you can add yours.
Other hints for better patch submission may be found here:
http://wiki.qemu.org/Contribute/SubmitAPatch
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 1 line · John Bradley
Andrew Baumann has and others have release the code under GNU General Public License version 2 (GPLv2), the same as QEMU that allows me to added it to QEMU as it is under the same license, by signing it off this is what I am certifying.
See this document linked from the SubmitAPatch link (it describes the kernel meaning of S-o-b tags, although the qemu meaning is the same):
Yes, your Signed-off-by: asserts that you are okay releasing your portions of the patch (bullets a, d) and that you chased down that portions that you did not write are properly licensed (bullet b), but what you are missing is that when you modify someone else's patch, we also need that someone's assertion of intent that their work (whether or not modified by you) meets the same standards (bullet c). In other words, when modifying a patch, S-o-b lines should be additive in nature, rather than replacing his by yours (or, if his is missing in the source you originally copied from, then we really need to Andrew to chime in and add one); this is so that there is a full chain of custody on who wrote portions of the commit.
Quoted 1 line
John BradleyTel: 07896 839635Skype: flypie125 125B Grove StreetEdge Hill Liverpool L7 7AF
Your mailer is sending very poor formatting when rendered as plain text (and we frown on html mail on this list).
Quoted 8 lines · Eric Blake
Quoted 1 line · John Bradley
This is especial true as I meant Andrew Baumann
0xabu(Andrew Baumann)Top-posting is not nice on technical lists.
And yet, in spite of me mentioning it, you still top-posted. :(
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Well unfortunately Eric. I don't understand your "top posted" slang.
As for his "intent", it is quite irrelevant as I have gone over the code line by line and what every he intended to do, he has succeed, as far as I can tell , in matching you standards, to such an extent that I am happy that
John Bradley
Tel: 07896 839635
Skype: flypie125
125B Grove Street
Edge Hill
Liverpool L7 7AF
On Wednesday, 17 May 2017, 22:15, Eric Blake <[email protected]> wrote:
Quoted 1 line · John Bradley
Andrew Baumann has and others have release the code under GNU General Public License version 2 (GPLv2), the same as QEMU that allows me to added it to QEMU as it is under the same license, by signing it off this is what I am certifying.
See this document linked from the SubmitAPatch link (it describes the kernel meaning of S-o-b tags, although the qemu meaning is the same):
Yes, your Signed-off-by: asserts that you are okay releasing your portions of the patch (bullets a, d) and that you chased down that portions that you did not write are properly licensed (bullet b), but what you are missing is that when you modify someone else's patch, we also need that someone's assertion of intent that their work (whether or not modified by you) meets the same standards (bullet c). In other words, when modifying a patch, S-o-b lines should be additive in nature, rather than replacing his by yours (or, if his is missing in the source you originally copied from, then we really need to Andrew to chime in and add one); this is so that there is a full chain of custody on who wrote portions of the commit.
Quoted 1 line
John BradleyTel: 07896 839635Skype: flypie125 125B Grove StreetEdge Hill Liverpool L7 7AF
Your mailer is sending very poor formatting when rendered as plain text (and we frown on html mail on this list).
Quoted 8 lines · Eric Blake
Quoted 1 line · John Bradley
This is especial true as I meant Andrew Baumann
0xabu(Andrew Baumann)Top-posting is not nice on technical lists.
And yet, in spite of me mentioning it, you still top-posted. :(
Signature · 15 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org Well unfortunately Eric. I don't understand your "top posted" slang. As for his "intent", it is quite irrelevant as I have gone over the code line by line and what every he intended to do, he has succeed, as far as I can tell , in matching you standards, to such an extent that I am happy that he has succeeded in reaching your standards and am happy to certify that he has. As for my mailer it is Yahoos and again as far as I can tell it is full RFC822 compliant, so perhaps you should adjust you obviously defective mail reader.
Quoted 1 line · John Bradley
Well unfortunately Eric. I don't understand your "top posted" slang.
To learn what top-posting is:
http://lmgtfy.com/?q=what+is+top-posting
and why we don't like it on technical lists:
http://www.caliburn.nl/topposting.html
Or more humorously:
A: Yes.
Quoted 6 lines
Quoted 3 lines
Q: Are you sure?
Quoted 2 lines
Quoted 2 lines
A: Because it reverses the logical flow of conversation.
Quoted 1 line
Quoted 1 line
Q: Why is top posting frowned upon?
As for his "intent", it is quite irrelevant as I have gone over the code line by line and what every he intended to do, he has succeed, as far as I can tell , in matching you standards, to such an extent that I am happy that
You are correct that the GPL gives us legal rights to use Andrew's code without his permission. And yes, YOU can fork qemu, and take whatever GPL patches you want without attribution, and you are probably still just fine legally (as long as you still abide by the GPL in that you distribute sources to anyone that has your binary).
But our project rules do not allow us to live by just GPL (in part, because the license of qemu is sometimes tricky to determine due to a mix of GPLv2-only code and non-GPL code, even though most new code is GPLv2+). Also, if we ever had a reason to change license (supposing it is even possible, although it might require ripping out or reimplementing portions of the code base), having S-o-b means that we cannot be accused of applying a license that someone did not agree to.
Therefore, it is easier, pragmatically, even if not legally necessary, to enforce proper chain of authorship by getting Signed-off-by: tags on ALL patches, especially where a patch asserts a copyright owner, insofar as the original copyright owner is still alive and able to assent to the action. It is not just about legalities, it is also about risk-avoidance.
It may sound like we are being hard-nosed (and so be it), but there's a reason that we list proper Signed-off-by: rules as our number 1 item on the SubmitAPatch page.
http://wiki.qemu.org/Contribute/SubmitAPatch
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
IANAL, this wouldn't be legal advice even if I was one, yadda, yadda, here goes anyway:
Quoted 10 lines · Eric Blake
Quoted 1 line · John Bradley
Well unfortunately Eric. I don't understand your "top posted" slang.
To learn what top-posting is:
http://lmgtfy.com/?q=what+is+top-postingand why we don't like it on technical lists:
http://www.caliburn.nl/topposting.htmlOr more humorously:
Seconded.
Quoted 28 lines
A: Yes.
Quoted 6 lines
Quoted 3 lines
Q: Are you sure?
Quoted 2 lines
Quoted 2 lines
A: Because it reverses the logical flow of conversation.
Quoted 1 line
Quoted 1 line
Q: Why is top posting frowned upon?
As for his "intent", it is quite irrelevant as I have gone over the code line by line and what every he intended to do, he has succeed, as far as I can tell , in matching you standards, to such an extent that I am happy that
You are correct that the GPL gives us legal rights to use Andrew's code without his permission. And yes, YOU can fork qemu, and take whatever GPL patches you want without attribution, and you are probably still just fine legally (as long as you still abide by the GPL in that you distribute sources to anyone that has your binary).
But our project rules do not allow us to live by just GPL (in part, because the license of qemu is sometimes tricky to determine due to a mix of GPLv2-only code and non-GPL code, even though most new code is GPLv2+). Also, if we ever had a reason to change license (supposing it is even possible, although it might require ripping out or reimplementing portions of the code base), having S-o-b means that we cannot be accused of applying a license that someone did not agree to.
Therefore, it is easier, pragmatically, even if not legally necessary, to enforce proper chain of authorship by getting Signed-off-by: tags on ALL patches, especially where a patch asserts a copyright owner, insofar as the original copyright owner is still alive and able to assent to the action. It is not just about legalities, it is also about risk-avoidance.
Quoted 4 lines
It may sound like we are being hard-nosed (and so be it), but there's a reason that we list proper Signed-off-by: rules as our number 1 item on the SubmitAPatch page.
http://wiki.qemu.org/Contribute/SubmitAPatch
Yes, we require patch submitters to provide their Signed-off-by.
We encourage documenting a patch's provenance in full by having every author provide their S-o-b, whenever practical. But we don't require it.
The core purpose of the S-o-b is "to improve tracking of who did what" by making patch authors formally certify that they "wrote it or otherwise have the right to pass it on as a open-source patch"[2]. Note "improve" and "have the right to pass it on".
One of the (many) reasons we're making software free is to help our neighbor[1] by letting him use our creation on a quid pro quo basis. Always requiring all author's S-o-b could make incorporating otherwise free code impractical, and thus would conflict with this mission.
When obtaining an S-o-b is impractical, documenting provenance in other ways has to do.
John wrote upthread:
Andrew Baumann has and others have release the code under GNU General Public License version 2 (GPLv2), the same as QEMU that allows me to added it to QEMU as it is under the same license, by signing it off this is what I am certifying.
I agree with the reasoning "if free software compatible with the GPLv2, then I can incorporate it into QEMU as long as I certify by signing off".
John, thank you for your contribution to QEMU. I'm sorry your patch got side-tracked into this non-technical swamp, and hope you understand why we're rather careful when it comes to protecting the freedom of our software. I futher hope that we can put than behind us (along with top-posting *grin*), and move on to the fun part.
[1] See "The four essential freedoms"
https://www.gnu.org/philosophy/free-sw.en.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/submitting-patches.rst
HI,
No worries about Yesterday.
I decided to take a different approach. I'll put that stuff in that relates to GDummyPanel flypie/GDummyPanel first I sent the patch to the list a copy is here. 0001-PATCH-V-2-GDummyPanel-Fix-formatingissues.patch
| | | | | |
|
|
|
| |
0001-PATCH-V-2-GDummyPanel-Fix-formatingissues.patch
Shared with Dropbox | |
|
|
Then set about getting the upgrades from Andrew Baumann in.
Then prepare an RFC for the protocol used by GDummyPanel taking into account any feed pack on the prototype/proof of concept/risk reduction in the patch.
| | | | | |
|
|
|
| |
flypie/GDummyPanel
GDummyPanel - The Client App which links to the Raspi to help simulate GPIO | |
|
|
John BradleyTel: 07896 839635Skype: flypie125 125B Grove StreetEdge Hill Liverpool L7 7AF
On Thursday, 18 May 2017, 8:47, Markus Armbruster <[email protected]> wrote:
IANAL, this wouldn't be legal advice even if I was one, yadda, yadda,
here goes anyway:
Quoted 10 lines · Eric Blake
Quoted 1 line · John Bradley
Well unfortunately Eric. I don't understand your "top posted" slang.
To learn what top-posting is:
http://lmgtfy.com/?q=what+is+top-postingand why we don't like it on technical lists:
http://www.caliburn.nl/topposting.htmlOr more humorously:
Seconded.
Quoted 28 lines
A: Yes.
Quoted 6 lines
Quoted 3 lines
Q: Are you sure?
Quoted 2 lines
Quoted 2 lines
A: Because it reverses the logical flow of conversation.
Quoted 1 line
Quoted 1 line
Q: Why is top posting frowned upon?
As for his "intent", it is quite irrelevant as I have gone over the code line by line and what every he intended to do, he has succeed, as far as I can tell , in matching you standards, to such an extent that I am happy that
You are correct that the GPL gives us legal rights to use Andrew's code without his permission. And yes, YOU can fork qemu, and take whatever GPL patches you want without attribution, and you are probably still just fine legally (as long as you still abide by the GPL in that you distribute sources to anyone that has your binary).
But our project rules do not allow us to live by just GPL (in part, because the license of qemu is sometimes tricky to determine due to a mix of GPLv2-only code and non-GPL code, even though most new code is GPLv2+). Also, if we ever had a reason to change license (supposing it is even possible, although it might require ripping out or reimplementing portions of the code base), having S-o-b means that we cannot be accused of applying a license that someone did not agree to.
Therefore, it is easier, pragmatically, even if not legally necessary, to enforce proper chain of authorship by getting Signed-off-by: tags on ALL patches, especially where a patch asserts a copyright owner, insofar as the original copyright owner is still alive and able to assent to the action. It is not just about legalities, it is also about risk-avoidance.
Quoted 4 lines
It may sound like we are being hard-nosed (and so be it), but there's a reason that we list proper Signed-off-by: rules as our number 1 item on the SubmitAPatch page.
http://wiki.qemu.org/Contribute/SubmitAPatch
Yes, we require patch submitters to provide their Signed-off-by.
We encourage documenting a patch's provenance in full by having every author provide their S-o-b, whenever practical. But we don't require it.
The core purpose of the S-o-b is "to improve tracking of who did what" by making patch authors formally certify that they "wrote it or otherwise have the right to pass it on as a open-source patch"[2]. Note "improve" and "have the right to pass it on".
One of the (many) reasons we're making software free is to help our neighbor[1] by letting him use our creation on a quid pro quo basis. Always requiring all author's S-o-b could make incorporating otherwise free code impractical, and thus would conflict with this mission.
When obtaining an S-o-b is impractical, documenting provenance in other ways has to do.
John wrote upthread:
Andrew Baumann has and others have release the code under GNU General Public License version 2 (GPLv2), the same as QEMU that allows me to added it to QEMU as it is under the same license, by signing it off this is what I am certifying.
I agree with the reasoning "if free software compatible with the GPLv2, then I can incorporate it into QEMU as long as I certify by signing off".
John, thank you for your contribution to QEMU. I'm sorry your patch got side-tracked into this non-technical swamp, and hope you understand why we're rather careful when it comes to protecting the freedom of our software. I futher hope that we can put than behind us (along with top-posting *grin*), and move on to the fun part.
[1] See "The four essential freedoms"
https://www.gnu.org/philosophy/free-sw.en.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/submitting-patches.rst
Quoted 16 lines · Eric Blake
Quoted 3 lines · John Bradley via Qemu-devel
Also available at
This content belongs...
Quoted 9 lines
Following suggestions split my original patch up. This the largest monolithic chunk is additional BCM device support from Markus Armbruster.
Quoted 1 line
From
0b39a04030d5a2cea4fcd2159d365580ca155b78Mon Sep 17 00:00:00 2001From: John Bradley <[email protected]>
Date: Wed, 17 May 2017 18:57:21 +0100
Subject: [PATCH] Add Markus Armbrusters code for Broadcom Perhiperals for ARM.
Also, though your patch body says Subject: [PATCH], your actual email subject does not. It should so that the build bot and maintenance tools can find it appropriately.
The next version of this that gets sent should also carry the 'v2' tag.
--js
Quoted 56 lines
Quoted 2 lines
Signed-off-by John Bradley <[email protected]>I would expect that if some of this code was written by Markus, then it would carry his Signed-off-by. Or, maybe you just mean that you are splitting your patch according to the device Markus gave (in which case, a Suggested-by: tag may be appropriate). Either way, I don't see why Markus' name has to be in the subject line (the patch subject should be WHAT changed, not WHO suggested the change).
Quoted 1 line
---
...here, after the --- separator. It is useful to reviewers, but should not end up as part of the actual commit message.
Quoted 4 lines
hw/arm/Makefile.objs | 2 +- hw/arm/bcm2835.c | 114 ++++ hw/arm/bcm2835_peripherals.c | 104 ++++ hw/misc/Makefile.objs | 2 +Quoted 8 lines
hw/misc/bcm2835_mphi.c | 163 ++++++ hw/misc/bcm2835_power.c | 106 ++++ hw/timer/Makefile.objs | 2 + hw/timer/bcm2835_st.c | 202 +++++++ hw/timer/bcm2835_timer.c | 224 +++++++ hw/usb/Makefile.objs | 4 +- hw/usb/bcm2835_usb.c | 604 +++++++++++++++++++ hw/usb/bcm2835_usb_regs.h | 1061 ++++++++++++++++++++++++++++++++++That's still rather large to review in one chunk, especially while
touching other files. It can probably still be split up further.Quoted 24 lines
include/hw/arm/bcm2835.h | 37 ++ include/hw/arm/bcm2835_peripherals.h | 10 + include/hw/intc/bcm2835_control.h | 53 ++ include/hw/misc/bcm2835_mphi.h | 28 + include/hw/misc/bcm2835_power.h | 22 + include/hw/timer/bcm2835_st.h | 25 + include/hw/timer/bcm2835_timer.h | 32 + include/hw/usb/bcm2835_usb.h | 78 +++ 20 files changed, 2871 insertions(+), 2 deletions(-)create mode 100644
hw/arm/bcm2835.c
create mode 100644hw/misc/bcm2835_mphi.ccreate mode 100644hw/misc/bcm2835_power.ccreate mode 100644hw/timer/bcm2835_st.ccreate mode 100644hw/timer/bcm2835_timer.ccreate mode 100644hw/usb/bcm2835_usb.ccreate mode 100644hw/usb/bcm2835_usb_regs.hcreate mode 100644include/hw/arm/bcm2835.hcreate mode 100644include/hw/intc/bcm2835_control.hcreate mode 100644include/hw/misc/bcm2835_mphi.hcreate mode 100644include/hw/misc/bcm2835_power.hcreate mode 100644include/hw/timer/bcm2835_st.hcreate mode 100644include/hw/timer/bcm2835_timer.hcreate mode 100644include/hw/usb/bcm2835_usb.h
Quoted 8 lines · John Bradley via Qemu-devel
Also available at
Following suggestions split my original patch up. This the largest monolithic chunk is additional BCM device support from Markus Armbruster.
Quoted 7 lines
Quoted 1 line
From
0b39a04030d5a2cea4fcd2159d365580ca155b78Mon Sep 17 00:00:00 2001From: John Bradley <[email protected]>
Date: Wed, 17 May 2017 18:57:21 +0100
Subject: [PATCH] Add Markus Armbrusters code for Broadcom Perhiperals for ARM.Signed-off-by John Bradley <[email protected]>---
After a break from the keyboard (always a good idea), I've re-read my comments on this thread so far. As usual, email is a lousy medium for conveying emotion and intent, and I can see how my curt replies merely pointing out ways that you can improve your patch can easily be misconstrued as negative advice or rejection of the idea in general. So let me take this time to apologize if I've come across as over-harsh, and give you a big thanks for your efforts to contribute; your additions have the potential to make qemu better. I hope that we do not scare you off with advice on improving your contributions up to community standard, but that you feel welcome to contribute to the community, as well as using the give-and-take iteration of review to make your first patch great. Writing a first patch series can be especially daunting when you are new to an unfamiliar process, and while we were all once at your point, it takes effort to remember that not everyone is as familiar with open source ways, and how it felt on our own first patch submission.
A big hint: the great way to get a patch accepted on ANY project is to first offer reviews on other patches being submitted to the list. Review backlog is always present, but it gets especially bad if there are more contributors than reviewers. Plus, reviewing code that other people write can give you a feel for what constitutes a typical patch for the project, which will let you model your own submissions in the same style.
Good luck!
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org