add allwinner A10 SoC support
v9 cover add allwinner A10 SoC support
lay a foundation for allwinner A10 SoC with a cortex-a8 processor, and will add more devices later.
v2: split timer and interrupt controller emulation into
their corresponding files.
v3:
1. change loader_start address
2. add 64-bit counter
3. fixup fail to clear interrup status issue
v4:
1. add VMSD
2. use defines of magic number for readability
3. code cleanup
v5:
1. add VMSTATE_PTIMER_ARRAY
2. code cleanup
v6:
1. fix a fiq lost issue pointed out by Peter Crosthwaite
2. code cleanup
v7:
model allwinner A10 as a SoC device,
and add cubieboard.
v8:
1. A10 be QOMified as a device
2. add AW as prefix of A10
v9:
code cleanup for PATCH 4/5 A10 SoC support
TODO:
1. add BROM support
2. add more devices
test:
can boot-up officially released linux kernel build with PLL disabled.
can find test zImage url at:
http://dl.dbank.com/c0jaibr54s
reference:
http://linux-sunxi.org/Main_Page
Li Guang (5)
vmstate: add VMSTATE_PTIMER_ARRAY hw/timer: add allwinner a10 timer hw/intc: add allwinner A10 interrupt controller hw/arm: add allwinner a10 SoC support hw/arm: add cubieboard support
default-configs/arm-softmmu.mak | 2 + hw/arm/Makefile.objs | 4 +- hw/arm/allwinner-a10.c | 39 +++++++++++++++++++++++++++++++++++++++ hw/arm/cubieboard.c | 33 +++++++++++++++++++++++++++++++++ hw/intc/Makefile.objs | 1 + hw/intc/allwinner-a10_pic.c | 218 +++++++++++++++++++++++++++++++++++ hw/timer/Makefile.objs | 2 + hw/timer/allwinner-a10_pit.c | 253 ++++++++++++++++++++++++++++++++++ include/hw/arm/allwinner-a10.h | 27 +++++++++++++++++++++++++++ include/hw/intc/allwinner-a10_pic.h | 40 +++++++ include/hw/timer/allwinner-a10_pit.h | 57 ++++++++ include/migration/vmstate.h | 4 ++++ savevm.c | 31 +++++++++++++++++++++++++++++++ 13 files changed, 709 insertions(+), 2 deletions(-) create mode 100644 hw/timer/allwinner-a10_pit.c create mode 100644 include/hw/timer/allwinner-a10_pit.h create mode 100644 hw/intc/allwinner-a10_pic.c create mode 100644 include/hw/intc/allwinner-a10_pic.h create mode 100644 hw/arm/allwinner-a10.c create mode 100644 include/hw/arm/allwinner-a10.h create mode 100644 hw/arm/cubieboard.c
PATCH v9 1/5 vmstate: add VMSTATE_PTIMER_ARRAY
--- include/migration/vmstate.h | 4 ++++ savevm.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 0 deletions(-)
include/migration/vmstate.h +4 -0
@@ -165,6 +165,7 @@ extern const VMStateInfo vmstate_info_timer;extern const VMStateInfo vmstate_info_buffer;extern const VMStateInfo vmstate_info_unused_buffer;extern const VMStateInfo vmstate_info_bitmap; +extern const VMStateInfo vmstate_info_ptimer;#define type_check_2darray (t1,t2,n,m) ((t1(*)[n][m])0 - (t2*)0)#define type_check_array (t1,t2,n) ((t1(*)[n])0 - (t2*)0)
@@ -613,6 +614,9 @@ extern const VMStateInfo vmstate_info_bitmap;#define VMSTATE_TIMER_ARRAY (_f, _s, _n) \ VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_timer, QEMUTimer *) +#define VMSTATE_PTIMER_ARRAY (_f, _s, _n) \ + VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_ptimer, ptimer_state *) +#define VMSTATE_BOOL_ARRAY_V (_f, _s, _n, _v) \ VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_bool, bool)
savevm.c +31 -0
@@ -30,6 +30,7 @@#include "monitor/monitor.h" #include "sysemu/sysemu.h" #include "qemu/timer.h" +#include "hw/ptimer.h" #include "audio/audio.h" #include "migration/migration.h" #include "qemu/sockets.h"
@@ -1362,6 +1363,36 @@ const VMStateInfo vmstate_info_timer = { .put = put_timer, }; +static int get_ptimer (QEMUFile *f,void *pv,size_t size) +{ +ptimer_state *v = pv; +uint64_t count; + + count =qemu_get_be64 (f); +if (count !=-1 ) { +ptimer_set_count (v, count); + }else { +ptimer_stop (v); + } + +return 0 ; +} + +static void put_ptimer (QEMUFile *f,void *pv,size_t size) +{ +ptimer_state *v = pv; +uint64_t count; + + count =ptimer_get_count (v); +qemu_put_be64 (f, count); +} + +const VMStateInfo vmstate_info_ptimer = { + .name ="ptimer" , + .get = get_ptimer, + .put = put_ptimer, +}; +/* uint8_t buffers */ static int get_buffer (QEMUFile *f,void *pv,size_t size)
Signature · 1 line
1.7.2.5
PATCH v9 2/5 hw/timer: add allwinner a10 timer
In reply to liguang--- default-configs/arm-softmmu.mak | 2 + hw/timer/Makefile.objs | 2 + hw/timer/allwinner-a10-pit.c | 253 ++++++++++++++++++++++++++++++++++ include/hw/timer/allwinner-a10-pit.h | 57 ++++++++ 4 files changed, 314 insertions(+), 0 deletions(-) create mode 100644 hw/timer/allwinner-a10-pit.c create mode 100644 include/hw/timer/allwinner-a10-pit.h
default-configs/arm-softmmu.mak +2 -0
@@ -81,3 +81,5 @@ CONFIG_VERSATILE_I2C=y CONFIG_SDHCI=y CONFIG_INTEGRATOR_DEBUG=y + +CONFIG_ALLWINNER_A10_PIT=y
hw/timer/Makefile.objs +2 -0
@@ -27,3 +27,5 @@ obj-$(CONFIG_SH4) += sh_timer.o obj-$(CONFIG_TUSB6010) += tusb6010.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o + +obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o
hw/timer/allwinner-a10-pit.c new file +253 -0
253 lines not on this page · raw message
include/hw/timer/allwinner-a10-pit.h new file +57 -0
57 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH v9 3/5 hw/intc: add allwinner A10 interrupt controller
In reply to liguang--- default-configs/arm-softmmu.mak | 1 + hw/intc/Makefile.objs | 1 + hw/intc/allwinner-a10-pic.c | 218 +++++++++++++++++++++++++++++++++++ include/hw/intc/allwinner-a10-pic.h | 40 +++++++ 4 files changed, 260 insertions(+), 0 deletions(-) create mode 100644 hw/intc/allwinner-a10-pic.c create mode 100644 include/hw/intc/allwinner-a10-pic.h
default-configs/arm-softmmu.mak +1 -0
@@ -83,3 +83,4 @@ CONFIG_SDHCI=y CONFIG_INTEGRATOR_DEBUG=y CONFIG_ALLWINNER_A10_PIT=y +CONFIG_ALLWINNER_A10_PIC=y
hw/intc/Makefile.objs +1 -0
@@ -24,3 +24,4 @@ obj-$(CONFIG_OPENPIC_KVM) += openpic_kvm.o obj-$(CONFIG_SH4) += sh_intc.o obj-$(CONFIG_XICS) += xics.o obj-$(CONFIG_XICS_KVM) += xics_kvm.o +obj-$(CONFIG_ALLWINNER_A10_PIC) += allwinner-a10-pic.o
hw/intc/allwinner-a10-pic.c new file +218 -0
218 lines not on this page · raw message
include/hw/intc/allwinner-a10-pic.h new file +40 -0
@@ -0,0 +1,40 @@ +#ifndef AW_A10_PIC_H +#define AW_A10_PIC_H + +#define TYPE_AW_A10_PIC "a10-pic" +#define AW_A10_PIC (obj) OBJECT_CHECK(AwA10PICState, (obj), TYPE_AW_A10_PIC) + +#define AW_A10_PIC_VECTOR 0 +#define AW_A10_PIC_BASE_ADDR 4 +#define AW_A10_PIC_PROTECT 8 +#define AW_A10_PIC_NMI 0xc +#define AW_A10_PIC_IRQ_PENDING 0x10 +#define AW_A10_PIC_FIQ_PENDING 0x20 +#define AW_A10_PIC_SELECT 0x30 +#define AW_A10_PIC_ENABLE 0x40 +#define AW_A10_PIC_MASK 0x50 + +#define AW_A10_PIC_INT_NR 95 +#define AW_A10_PIC_REG_NUM DIV_ROUND_UP(AW_A10_PIC_INT_NR, 32) + +typedef struct AwA10PICState { +/*< private >*/ +SysBusDevice parent_obj; +/*< public >*/ +MemoryRegion iomem; +qemu_irq parent_fiq; +qemu_irq parent_irq; + +uint32_t vector; +uint32_t base_addr; +uint32_t protect; +uint32_t nmi; +uint32_t irq_pending[AW_A10_PIC_REG_NUM ]; +uint32_t fiq_pending[AW_A10_PIC_REG_NUM ]; +uint32_t select[AW_A10_PIC_REG_NUM ]; +uint32_t enable[AW_A10_PIC_REG_NUM ]; +uint32_t mask[AW_A10_PIC_REG_NUM ]; +/*priority setting here*/ +}AwA10PICState ; + +#endif
Signature · 1 line
1.7.2.5
PATCH v9 4/5 hw/arm: add allwinner a10 SoC support
In reply to liguang--- default-configs/arm-softmmu.mak | 1 + hw/arm/Makefile.objs | 1 + hw/arm/allwinner-a10.c | 87 +++++++++++++++++++++++++++++++++++++++ include/hw/arm/allwinner-a10.h | 35 ++++++++++++++++ 4 files changed, 124 insertions(+), 0 deletions(-) create mode 100644 hw/arm/allwinner-a10.c create mode 100644 include/hw/arm/allwinner-a10.h
default-configs/arm-softmmu.mak +1 -0
@@ -84,3 +84,4 @@ CONFIG_INTEGRATOR_DEBUG=y CONFIG_ALLWINNER_A10_PIT=y CONFIG_ALLWINNER_A10_PIC=y +CONFIG_ALLWINNER_A10=y
hw/arm/Makefile.objs +1 -0
@@ -5,3 +5,4 @@ obj-y += tosa.o versatilepb.o vexpress.o xilinx_zynq.o z2.o obj-y += armv7m.o exynos4210.o pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o obj-y += omap1.o omap2.o strongarm.o +obj-$(CONFIG_ALLWINNER_A10) += allwinner-a10.o
hw/arm/allwinner-a10.c new file +87 -0
87 lines not on this page · raw message
include/hw/arm/allwinner-a10.h new file +35 -0
@@ -0,0 +1,35 @@ +#ifndef ALLWINNER_H_ + +#include "qemu-common.h" +#include "qemu/error-report.h" +#include "hw/char/serial.h" +#include "hw/arm/arm.h" +#include "hw/timer/allwinner-a10-pit.h" +#include "hw/intc/allwinner-a10-pic.h" + +#include "sysemu/sysemu.h" +#include "exec/address-spaces.h" + + +#define AW_A10_PIC_REG_BASE 0x01c20400 +#define AW_A10_PIT_REG_BASE 0x01c20c00 +#define AW_A10_UART0_REG_BASE 0x01c28000 + +#define AW_A10_SDRAM_BASE 0x40000000 + +#define TYPE_AW_A10 "allwinner-a10" +#define AW_A10 (obj) OBJECT_CHECK(AwA10State, (obj), TYPE_AW_A10) + +typedef struct AwA10State { +/*< private >*/ +DeviceState parent_obj; +/*< public >*/ + +ARMCPU cpu; +qemu_irq irq[AW_A10_PIC_INT_NR ]; +AwA10PITState timer; +AwA10PICState intc; +}AwA10State ; + +#define ALLWINNER_H_ +#endif
Signature · 1 line
1.7.2.5
PATCH v9 5/5 hw/arm: add cubieboard support
In reply to liguang--- hw/arm/Makefile.objs | 2 +- hw/arm/cubieboard.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletions(-) create mode 100644 hw/arm/cubieboard.c
hw/arm/Makefile.objs +1 -1
@@ -5,4 +5,4 @@ obj-y += tosa.o versatilepb.o vexpress.o xilinx_zynq.o z2.o obj-y += armv7m.o exynos4210.o pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o obj-y += omap1.o omap2.o strongarm.o -obj-$(CONFIG_ALLWINNER_A10) += allwinner-a10.o +obj-$(CONFIG_ALLWINNER_A10) += allwinner-a10.o cubieboard.o
hw/arm/cubieboard.c new file +53 -0
53 lines not on this page · raw message
Signature · 1 line
1.7.2.5
Hi Liguang,
V9 has some checkpatch errors:
[pcrost@xsjandreislx qemu]$ git format-patch HEAD~5 0001-vmstate-add-VMSTATE_PTIMER_ARRAY.patch 0002-hw-timer-add-allwinner-a10-timer.patch 0003-hw-intc-add-allwinner-A10-interrupt-controller.patch 0004-hw-arm-add-allwinner-a10-SoC-support.patch 0005-hw-arm-add-cubieboard-support.patch [pcrost@xsjandreislx qemu]$ ./scripts/checkpatch.pl 00*
ERROR: need consistent spacing around '*' (ctx:WxB) #30: FILE: include/migration/vmstate.h:618:
+ VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_ptimer,ptimer_state *)
^
total: 1 errors, 0 warnings, 59 lines checked
0001-vmstate-add-VMSTATE_PTIMER_ARRAY.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
WARNING: line over 80 characters
#75: FILE: hw/timer/allwinner-a10-pit.c:33:
+ case AW_A10_PIT_TIMER_BASE ... AW_A10_PIT_TIMER_BASE * 6 +AW_A10_PIT_TIMER_COUNT:
WARNING: line over 80 characters
#124: FILE: hw/timer/allwinner-a10-pit.c:82:
+ case AW_A10_PIT_TIMER_BASE ... AW_A10_PIT_TIMER_BASE * 6 +AW_A10_PIT_TIMER_COUNT:
total: 0 errors, 2 warnings, 320 lines checked
0002-hw-timer-add-allwinner-a10-timer.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 266 lines checked
0003-hw-intc-add-allwinner-A10-interrupt-controller.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 130 lines checked
0004-hw-arm-add-allwinner-a10-SoC-support.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 58 lines checked
0005-hw-arm-add-cubieboard-support.patch has no obvious style problems and is ready for submission.
Please include checkpatch in your pre-send checklist for each version.
I'm still looking trough the series though (now that I have it am'ed locally), so don't respin on me just yet!
Regards,
Peter
Quoted 82 lines · liguang
lay a foundation for allwinner A10 SoC with a cortex-a8 processor, and will add more devices later.
v2: split timer and interrupt controller emulation into
their corresponding files.v3:
1. changeloader_startaddress
2. add 64-bit counter
3. fixup fail to clear interrup status issuev4:
1. add VMSD
2. use defines of magic number for readability
3. code cleanupv5:
1. addVMSTATE_PTIMER_ARRAY
2. code cleanupv6:
1. fix a fiq lost issue pointed out by Peter Crosthwaite
2. code cleanupv7:
model allwinner A10 as a SoC device,
and add cubieboard.v8:
1. A10 be QOMified as a device
2. add AW as prefix of A10v9:
code cleanup for PATCH 4/5 A10 SoC supportTODO:
1. add BROM support
2. add more devicestest:
can boot-up officially released linux kernel build with PLL disabled.
can find test zImage url at:
http://dl.dbank.com/c0jaibr54sreference:
http://linux-sunxi.org/Main_PageLi Guang (5)
vmstate: addVMSTATE_PTIMER_ARRAYhw/timer: add allwinner a10 timer hw/intc: add allwinner A10 interrupt controller hw/arm: add allwinner a10 SoC support hw/arm: add cubieboard supportdefault-configs/arm-softmmu.mak | 2 + hw/arm/Makefile.objs | 4 +- hw/arm/allwinner-a10.c | 39 +++++++++++++++++++++++++++++++++++++++ hw/arm/cubieboard.c | 33 +++++++++++++++++++++++++++++++++ hw/intc/Makefile.objs | 1 + hw/intc/allwinner-a10_pic.c | 218 +++++++++++++++++++++++++++++++++++ hw/timer/Makefile.objs | 2 + hw/timer/allwinner-a10_pit.c | 253 ++++++++++++++++++++++++++++++++++ include/hw/arm/allwinner-a10.h | 27 +++++++++++++++++++++++++++ include/hw/intc/allwinner-a10_pic.h | 40 +++++++ include/hw/timer/allwinner-a10_pit.h | 57 ++++++++ include/migration/vmstate.h | 4 ++++ savevm.c | 31 +++++++++++++++++++++++++++++++ 13 files changed, 709 insertions(+), 2 deletions(-) create mode 100644 hw/timer/allwinner-a10_pit.c create mode 100644 include/hw/timer/allwinner-a10_pit.h create mode 100644 hw/intc/allwinner-a10_pic.c create mode 100644 include/hw/intc/allwinner-a10_pic.h create mode 100644 hw/arm/allwinner-a10.c create mode 100644 include/hw/arm/allwinner-a10.h create mode 100644 hw/arm/cubieboard.c
I think with your suggestion
of new definition will remove the warnings,
and I will fix the error report.
Thanks!
Quoted 146 lines · Peter Crosthwaite
Hi Liguang,
V9 has some checkpatch errors:
[pcrost@xsjandreislx qemu]$ git format-patch HEAD~5 0001-vmstate-add-VMSTATE_PTIMER_ARRAY.patch 0002-hw-timer-add-allwinner-a10-timer.patch 0003-hw-intc-add-allwinner-A10-interrupt-controller.patch 0004-hw-arm-add-allwinner-a10-SoC-support.patch 0005-hw-arm-add-cubieboard-support.patch [pcrost@xsjandreislx qemu]$
./scripts/checkpatch.pl00*
ERROR: need consistent spacing around '*' (ctx:WxB) #30: FILE:include/migration/vmstate.h:618:
+ VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0,vmstate_info_ptimer,ptimer_state*)^total: 1 errors, 0 warnings, 59 lines checked
0001-vmstate-add-VMSTATE_PTIMER_ARRAY.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH inMAINTAINERS.
WARNING: line over 80 characters
#75: FILE:hw/timer/allwinner-a10-pit.c:33:
+ caseAW_A10_PIT_TIMER_BASE...AW_A10_PIT_TIMER_BASE* 6 +AW_A10_PIT_TIMER_COUNT:WARNING: line over 80 characters
#124: FILE:hw/timer/allwinner-a10-pit.c:82:
+ caseAW_A10_PIT_TIMER_BASE...AW_A10_PIT_TIMER_BASE* 6 +AW_A10_PIT_TIMER_COUNT:total: 0 errors, 2 warnings, 320 lines checked
0002-hw-timer-add-allwinner-a10-timer.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH inMAINTAINERS.
total: 0 errors, 0 warnings, 266 lines checked0003-hw-intc-add-allwinner-A10-interrupt-controller.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 130 lines checked0004-hw-arm-add-allwinner-a10-SoC-support.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 58 lines checked0005-hw-arm-add-cubieboard-support.patch has no obvious style problems and is ready for submission.
Please include checkpatch in your pre-send checklist for each version.
I'm still looking trough the series though (now that I have it am'ed locally), so don't respin on me just yet!
Regards,
PeterQuoted 82 lines · liguang
lay a foundation for allwinner A10 SoC with a cortex-a8 processor, and will add more devices later.
v2: split timer and interrupt controller emulation into
their corresponding files.v3:
1. changeloader_startaddress
2. add 64-bit counter
3. fixup fail to clear interrup status issuev4:
1. add VMSD
2. use defines of magic number for readability
3. code cleanupv5:
1. addVMSTATE_PTIMER_ARRAY
2. code cleanupv6:
1. fix a fiq lost issue pointed out by Peter Crosthwaite
2. code cleanupv7:
model allwinner A10 as a SoC device,
and add cubieboard.v8:
1. A10 be QOMified as a device
2. add AW as prefix of A10v9:
code cleanup for PATCH 4/5 A10 SoC supportTODO:
1. add BROM support
2. add more devicestest:
can boot-up officially released linux kernel build with PLL disabled.
can find test zImage url at:
http://dl.dbank.com/c0jaibr54sreference:
http://linux-sunxi.org/Main_PageLi Guang (5)
vmstate: addVMSTATE_PTIMER_ARRAYhw/timer: add allwinner a10 timer hw/intc: add allwinner A10 interrupt controller hw/arm: add allwinner a10 SoC support hw/arm: add cubieboard supportdefault-configs/arm-softmmu.mak | 2 + hw/arm/Makefile.objs | 4 +- hw/arm/allwinner-a10.c | 39 +++++++++++++++++++++++++++++++++++++++ hw/arm/cubieboard.c | 33 +++++++++++++++++++++++++++++++++ hw/intc/Makefile.objs | 1 + hw/intc/allwinner-a10_pic.c | 218 +++++++++++++++++++++++++++++++++++ hw/timer/Makefile.objs | 2 + hw/timer/allwinner-a10_pit.c | 253 ++++++++++++++++++++++++++++++++++ include/hw/arm/allwinner-a10.h | 27 +++++++++++++++++++++++++++ include/hw/intc/allwinner-a10_pic.h | 40 +++++++ include/hw/timer/allwinner-a10_pit.h | 57 ++++++++ include/migration/vmstate.h | 4 ++++ savevm.c | 31 +++++++++++++++++++++++++++++++ 13 files changed, 709 insertions(+), 2 deletions(-)create mode 100644
hw/timer/allwinner-a10_pit.ccreate mode 100644include/hw/timer/allwinner-a10_pit.hcreate mode 100644hw/intc/allwinner-a10_pic.ccreate mode 100644include/hw/intc/allwinner-a10_pic.hcreate mode 100644hw/arm/allwinner-a10.ccreate mode 100644include/hw/arm/allwinner-a10.hcreate mode 100644hw/arm/cubieboard.c
Quoted 45 lines · Peter Crosthwaite
Hi Liguang,
V9 has some checkpatch errors:
[pcrost@xsjandreislx qemu]$ git format-patch HEAD~5 0001-vmstate-add-VMSTATE_PTIMER_ARRAY.patch 0002-hw-timer-add-allwinner-a10-timer.patch 0003-hw-intc-add-allwinner-A10-interrupt-controller.patch 0004-hw-arm-add-allwinner-a10-SoC-support.patch 0005-hw-arm-add-cubieboard-support.patch [pcrost@xsjandreislx qemu]$
./scripts/checkpatch.pl00*
ERROR: need consistent spacing around '*' (ctx:WxB) #30: FILE:include/migration/vmstate.h:618:
+ VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0,vmstate_info_ptimer,ptimer_state*)^total: 1 errors, 0 warnings, 59 lines checked
0001-vmstate-add-VMSTATE_PTIMER_ARRAY.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH inMAINTAINERS.
WARNING: line over 80 characters
#75: FILE:hw/timer/allwinner-a10-pit.c:33:
+ caseAW_A10_PIT_TIMER_BASE...AW_A10_PIT_TIMER_BASE* 6 +AW_A10_PIT_TIMER_COUNT:WARNING: line over 80 characters
#124: FILE:hw/timer/allwinner-a10-pit.c:82:
+ caseAW_A10_PIT_TIMER_BASE...AW_A10_PIT_TIMER_BASE* 6 +AW_A10_PIT_TIMER_COUNT:total: 0 errors, 2 warnings, 320 lines checked
0002-hw-timer-add-allwinner-a10-timer.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see CHECKPATCH inMAINTAINERS.
total: 0 errors, 0 warnings, 266 lines checked0003-hw-intc-add-allwinner-A10-interrupt-controller.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 130 lines checked
Quoted 10 lines
0004-hw-arm-add-allwinner-a10-SoC-support.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 58 lines checked0005-hw-arm-add-cubieboard-support.patch has no obvious style problems and is ready for submission.
Please include checkpatch in your pre-send checklist for each version.
I surely will run checkpatch.pl,
but you know, the result is just a reference.
the error here seems subtle,
2 rules used,
1. should a space both before and after '*'
2. shouldn't a space before ')'
so, a dilemma.
Quoted 5 lines
I'm still looking trough the series though (now that I have it am'ed locally), so don't respin on me just yet!
OK.
Thanks!
Quoted 85 lines · liguang
Quoted 83 lines
lay a foundation for allwinner A10 SoC with a cortex-a8 processor, and will add more devices later.
v2: split timer and interrupt controller emulation into
their corresponding files.v3:
1. changeloader_startaddress
2. add 64-bit counter
3. fixup fail to clear interrup status issuev4:
1. add VMSD
2. use defines of magic number for readability
3. code cleanupv5:
1. addVMSTATE_PTIMER_ARRAY
2. code cleanupv6:
1. fix a fiq lost issue pointed out by Peter Crosthwaite
2. code cleanupv7:
model allwinner A10 as a SoC device,
and add cubieboard.v8:
1. A10 be QOMified as a device
2. add AW as prefix of A10v9:
code cleanup for PATCH 4/5 A10 SoC supportTODO:
1. add BROM support
2. add more devicestest:
can boot-up officially released linux kernel build with PLL disabled.
can find test zImage url at:
http://dl.dbank.com/c0jaibr54sreference:
http://linux-sunxi.org/Main_PageLi Guang (5)
vmstate: addVMSTATE_PTIMER_ARRAYhw/timer: add allwinner a10 timer hw/intc: add allwinner A10 interrupt controller hw/arm: add allwinner a10 SoC support hw/arm: add cubieboard supportdefault-configs/arm-softmmu.mak | 2 + hw/arm/Makefile.objs | 4 +- hw/arm/allwinner-a10.c | 39 +++++++++++++++++++++++++++++++++++++++ hw/arm/cubieboard.c | 33 +++++++++++++++++++++++++++++++++ hw/intc/Makefile.objs | 1 + hw/intc/allwinner-a10_pic.c | 218 +++++++++++++++++++++++++++++++++++ hw/timer/Makefile.objs | 2 + hw/timer/allwinner-a10_pit.c | 253 ++++++++++++++++++++++++++++++++++ include/hw/arm/allwinner-a10.h | 27 +++++++++++++++++++++++++++ include/hw/intc/allwinner-a10_pic.h | 40 +++++++ include/hw/timer/allwinner-a10_pit.h | 57 ++++++++ include/migration/vmstate.h | 4 ++++ savevm.c | 31 +++++++++++++++++++++++++++++++ 13 files changed, 709 insertions(+), 2 deletions(-)create mode 100644
hw/timer/allwinner-a10_pit.ccreate mode 100644include/hw/timer/allwinner-a10_pit.hcreate mode 100644hw/intc/allwinner-a10_pic.ccreate mode 100644include/hw/intc/allwinner-a10_pic.hcreate mode 100644hw/arm/allwinner-a10.ccreate mode 100644include/hw/arm/allwinner-a10.hcreate mode 100644hw/arm/cubieboard.c
Quoted 18 lines · Li Guang
Quoted 5 lines · Peter Crosthwaite
Hi Liguang,
V9 has some checkpatch errors:
Quoted 11 lines
[pcrost@xsjandreislx qemu]$ git format-patch HEAD~5 0001-vmstate-add-VMSTATE_PTIMER_ARRAY.patch 0002-hw-timer-add-allwinner-a10-timer.patch 0003-hw-intc-add-allwinner-A10-interrupt-controller.patch 0004-hw-arm-add-allwinner-a10-SoC-support.patch 0005-hw-arm-add-cubieboard-support.patch [pcrost@xsjandreislx qemu]$
./scripts/checkpatch.pl00*
ERROR: need consistent spacing around '*' (ctx:WxB) #30: FILE:include/migration/vmstate.h:618:
+ VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0,vmstate_info_ptimer,ptimer_state*)
Quoted 4 lines
the error here seems subtle,
2 rules used,
1. should a space both before and after '*'
2. shouldn't a space before ')'
Yes, sometimes checkpatch gets confused by macros, especially ones like this whose arguments might be types. The correct spacing here I think would be to have no space before or after the '*'.
thanks
-- PMM