From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsUvy-0001yB-R8 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:57:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsUvv-0002Tu-1J for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:57:54 -0500 Received: from mail-lb0-x235.google.com ([2a00:1450:4010:c04::235]:35599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsUvu-0002T8-L8 for qemu-devel@nongnu.org; Mon, 16 Dec 2013 04:57:50 -0500 Received: by mail-lb0-f181.google.com with SMTP id q8so757261lbi.12 for ; Mon, 16 Dec 2013 01:57:49 -0800 (PST) Date: Mon, 16 Dec 2013 14:05:22 +0400 From: Antony Pavlov Message-Id: <20131216140522.420e36e592bd0287a821d337@gmail.com> In-Reply-To: <1387188183-607-1-git-send-email-antonynpavlov@gmail.com> References: <1387188183-607-1-git-send-email-antonynpavlov@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/6] hw/arm: add initial support for Canon DIGIC SoC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Antony Pavlov Cc: Peter Maydell , Peter Crosthwaite , qemu-devel@nongnu.org, Paul Brook , Paolo Bonzini , Andreas =?ISO-8859-1?Q?F=E4rber?= On Mon, 16 Dec 2013 14:02:57 +0400 Antony Pavlov wrote: Sorry! I have added --cover-letter option but I have forgot add "v10".=20 > Changes since v9: > 1. rebase over Peter Crosthwaite's "Fix Support for ARM CBAR and > reset-hivecs" v5 patch series > 2. qom-test: add "canon-a1100" to arm machines list > 3. include a diffstat in the cover letter (--cover-letter option) > 4. fix patches timestamp >=20 > Changes since v8: > 1. digic-timer: move hardware-related macros to the header file > 2. digic-timer: use extract32 instead of & >> logic > 3. digic-timer, digic-uart: move header files to include/hw/... > 4. digic-timer, digic-uart: fix other trivial stuff > fix emptyline; also add "/*< private >*/" and "/*< public >*/" > 5. fix patches timestamp >=20 > Changes since v7: > 1. change "fprintf(stderr," -> "error_report(" > (thanks to Peter Crosthwaite) > 2. fix digic_timer > * use ptimer in continuous mode according to Peter Crosthwaite's > recommendations; > * implement the 'control' and 'reload value' registers. > 3. fix patches timestamp >=20 > Changes since v6: > 1. rebase over Peter Crosthwaite's "Fix Support for ARM CBAR and > reset-hivecs" v4 patch series > 2. digic_boards: drop start_addr > so the line 's->digic->cpu.env.regs[15] =3D board->start_addr;' has g= one > 3. hw/arc/digic: use "reset-hivecs" ARM CPU property > 4. add a record to the MAINTAINERS file >=20 > Changes since v5: > 1. rebase over latest master > 2. digic_timer: add a reset function > 3. digic_timer: add a VMStateDescription > 4. digic_timer: fix whitespaces > 5. digic_boards: fix whitespaces > 6. move misplaced DIGIC_ROM* definitions > to the "hw/arm/digic: add NOR ROM support" patch >=20 > Changes since v4: > 1. digic.h: parent_obj: change type Object -> DeviceState > 2. digic-uart: drop reg array > 3. digic_boards: fix K8P3215UQB comment > 4. Makefile: place digic stuff in own line > 5. drop cpu-qom.h inclusion > 6. digic.h: add private/public labels > 7. digic.h: fix guard macro > 8. move base address macros to digic.c > 9. fix header comments >=20 > Changes since v3: > 1. fix typos and formatting > 2. digic-timer: drop DPRINTF > 3. digic-timer: fix DIGIC4_TIMER_BASE() macro > 4. digic.c: fix max timer device string >=20 > Changes since v2: > 1. rebase over latest master; > * pass available size to object_initialize(). > 2. digic-uart: qemu_log: use LOG_UNIMP instead LOG_GUEST_ERROR; > 3. digic-boards: update rom image load code: introduce digic_load_rom(). >=20 > Changes since v1: > 0. drop the "add ARM946E-S CPU" patch; > 1. convert to QOM, split DIGIC SoC code and board code > (thanks to Andreas Fa:rber, Peter Maydell and Peter Crosthwaite); > 2. fix digic-uart (many thanks to Peter Crosthwaite > for his comments); > 3. digic-boards: digic4_add_k8p3215uqb_rom(): update > rom image load code: use the '-bios' option. >=20 > DIGIC is Canon Inc.'s name for a family of SoC > for digital cameras and camcorders. >=20 > See http://en.wikipedia.org/wiki/DIGIC for details. >=20 > There is no publicly available specification for > DIGIC chips. All information about DIGIC chip > internals is based on reverse engineering efforts > made by CHDK (http://chdk.wikia.com) and > Magic Lantern (http://www.magiclantern.fm) projects > contributors. >=20 > Also this patch series adds initial support for Canon > PowerShot A1100 IS compact camera (it is my only camera > with connected UART interface). As the DIGIC-based cameras > differences mostly are insignificant (e.g. RAM-size, > ROM type and size, GPIO usage) the other compact > and DSLR cameras support can be easily added. >=20 > This DIGIC support patch series is inspired > by EOS QEMU from Magic Lantern project. > The main differences: > * EOS QEMU uses home-brew all-in-one monolith design; > this patch series uses conventional QEMU object-centric design; > * EOS QEMU tries provide simplest emulation for most > controllers inside SoC to run Magic Lantern firmware; > this patch series provide more complete support > only for core devices to run barebox bootloader. > ** EOS QEMU does not support timer counting > (this patch series emulate 1 MHz counting); > ** EOS QEMU support DIGIC UART only for output > character to stderr; (this patch series emulate > introduces full blown UART interface); > ** EOS QEMU has incomplete ROM support; > (this patch series uses conventional QEMU pflash). >=20 > This initial DIGIC support can't be used to run > the original camera firmware, but it can successfully > run experimental version of barebox bootloader > (see http://www.barebox.org). >=20 > The last sources of barebox for PowerShot A1100 can be > obtained here: > https://github.com/frantony/barebox/tree/next.digic.20131213 >=20 > The precompiled ROM image usable with QEMU can be > obtained here: > https://github.com/frantony/barebox/raw/next.digic.20131213/canon-a1100= -rom1.bin > Download this ROM image and just run QEMU: > qemu-system-arm -M canon-a1100 -serial stdio >=20 > Short build instruction for QEMU bios image (canon-a1100-rom1.bin): > $ git clone https://github.com/frantony/barebox -b next.digic.20131213 > $ cd barebox > $ export ARCH=3Darm > $ export CROSS_COMPILE=3D > $ make canon-a1100_defconfig > $ make > $ ./mk-canon-a1100-rom1.sh >=20 > This ROM image (after "dancing bit" encoding) can be run on > real Canon A1100 camera. >=20 > The short build instruction for __previous__ DIGIC barebox > version (it can be used with more recent sources too) can > be obtained here: > http://lists.infradead.org/pipermail/barebox/2013-August/016007.html >=20 > Antony Pavlov (6): > hw/arm: add very initial support for Canon DIGIC SoC > hw/arm/digic: prepare DIGIC-based boards support > hw/arm/digic: add timer support > hw/arm/digic: add UART support > hw/arm/digic: add NOR ROM support > MAINTAINERS: Document 'Canon DIGIC' machine >=20 > MAINTAINERS | 6 ++ > default-configs/arm-softmmu.mak | 1 + > hw/arm/Makefile.objs | 2 + > hw/arm/digic.c | 115 ++++++++++++++++++++++++ > hw/arm/digic_boards.c | 154 +++++++++++++++++++++++++++++++ > hw/char/Makefile.objs | 1 + > hw/char/digic-uart.c | 195 ++++++++++++++++++++++++++++++++++= ++++++ > hw/timer/Makefile.objs | 1 + > hw/timer/digic-timer.c | 163 +++++++++++++++++++++++++++++++++ > include/hw/arm/digic.h | 43 +++++++++ > include/hw/char/digic-uart.h | 47 ++++++++++ > include/hw/timer/digic-timer.h | 46 ++++++++++ > tests/qom-test.c | 1 + > 13 files changed, 775 insertions(+) > create mode 100644 hw/arm/digic.c > create mode 100644 hw/arm/digic_boards.c > create mode 100644 hw/char/digic-uart.c > create mode 100644 hw/timer/digic-timer.c > create mode 100644 include/hw/arm/digic.h > create mode 100644 include/hw/char/digic-uart.h > create mode 100644 include/hw/timer/digic-timer.h >=20 > --=20 > 1.8.5 >=20 --=20 --=A0 Best regards, =A0 Antony Pavlov