From patchwork Wed Oct 31 00:25:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Steffen_G=C3=B6rtz?= X-Patchwork-Id: 10661849 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0CD11734 for ; Wed, 31 Oct 2018 00:27:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A70322A50F for ; Wed, 31 Oct 2018 00:27:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96A7C2A6B6; Wed, 31 Oct 2018 00:27:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 114D82A50F for ; Wed, 31 Oct 2018 00:27:30 +0000 (UTC) Received: from localhost ([::1]:56210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHeM5-0005v6-IH for patchwork-qemu-devel@patchwork.kernel.org; Tue, 30 Oct 2018 20:27:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHeKb-0004mp-Ru for qemu-devel@nongnu.org; Tue, 30 Oct 2018 20:25:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHeKY-000082-Mb for qemu-devel@nongnu.org; Tue, 30 Oct 2018 20:25:57 -0400 Received: from steffen-goertz.de ([88.198.119.201]:60358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHeKY-00007a-DB for qemu-devel@nongnu.org; Tue, 30 Oct 2018 20:25:54 -0400 Received: from gouranga.fios-router.home (pool-71-183-97-129.nycmny.fios.verizon.net [71.183.97.129]) by steffen-goertz.de (Postfix) with ESMTPSA id 891E64FAA3; Wed, 31 Oct 2018 01:23:18 +0100 (CET) From: =?utf-8?q?Steffen_G=C3=B6rtz?= To: qemu-devel@nongnu.org Date: Tue, 30 Oct 2018 20:25:14 -0400 Message-Id: <20181031002526.14262-1-contrib@steffen-goertz.de> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 88.198.119.201 Subject: [Qemu-devel] [PATCH v3 00/13] arm: nRF51 Devices and Microbit Support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Jim Mussared , Stefan Hajnoczi , =?utf-8?q?Steffen_G=C3=B6rtz?= , Joel Stanley , Julia Suvorova Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series contains additional peripheral devices for the nRF51822 microcontroller. Included devices: - Random Number Generator - Non-volatile Memories - General purpose I/O - Timer - Stub for clock peripheral v3: * Included device instantiation in this patch * All devices use the common definitions provided by the header * Removed obsolete comment from NVM header * Device Struct names have consistent capitalisation v2: * Factored out common definitions to won header (Stefan) * Add set_irq_in command to support tests for GPIO * Add tests for GPIO * Removed LED matrix from this patch set * Small tidy ups on RNG, NVM, GPIO and Timer Based-on: 20181025005052.27661-1-jusual@mail.ru Steffen Görtz (13): qtest: Add set_irq_in command to set IRQ/GPIO level arm: Add header to host common definition for nRF51 SOC peripherals hw/misc/nrf51_rng: Add NRF51 random number generator peripheral arm: Instantiate NRF51 random number generator hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories arm: Instantiate NRF51 special NVM's and NVMC tests: Add bbc:microbit / nRF51 test suite hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral arm: Instantiate NRF51 general purpose I/O tests/microbit-test: Add Tests for nRF51 GPIO hw/timer/nrf51_timer: Add nRF51 Timer peripheral arm: Instantiate NRF51 Timers arm: Add Clock peripheral stub to NRF51 SOC Makefile.objs | 1 + hw/arm/nrf51_soc.c | 150 ++++++++++++-- hw/gpio/Makefile.objs | 1 + hw/gpio/nrf51_gpio.c | 292 +++++++++++++++++++++++++++ hw/gpio/trace-events | 7 + hw/misc/Makefile.objs | 1 + hw/misc/nrf51_rng.c | 262 ++++++++++++++++++++++++ hw/nvram/Makefile.objs | 1 + hw/nvram/nrf51_nvm.c | 339 +++++++++++++++++++++++++++++++ hw/timer/Makefile.objs | 1 + hw/timer/nrf51_timer.c | 358 +++++++++++++++++++++++++++++++++ hw/timer/trace-events | 5 + include/hw/arm/nrf51.h | 44 ++++ include/hw/arm/nrf51_soc.h | 11 + include/hw/char/nrf51_uart.h | 1 - include/hw/gpio/nrf51_gpio.h | 69 +++++++ include/hw/misc/nrf51_rng.h | 83 ++++++++ include/hw/nvram/nrf51_nvm.h | 70 +++++++ include/hw/timer/nrf51_timer.h | 77 +++++++ qtest.c | 40 ++++ tests/Makefile.include | 2 + tests/libqtest.c | 10 + tests/libqtest.h | 28 +++ tests/microbit-test.c | 239 ++++++++++++++++++++++ 24 files changed, 2070 insertions(+), 22 deletions(-) create mode 100644 hw/gpio/nrf51_gpio.c create mode 100644 hw/gpio/trace-events create mode 100644 hw/misc/nrf51_rng.c create mode 100644 hw/nvram/nrf51_nvm.c create mode 100644 hw/timer/nrf51_timer.c create mode 100644 include/hw/arm/nrf51.h create mode 100644 include/hw/gpio/nrf51_gpio.h create mode 100644 include/hw/misc/nrf51_rng.h create mode 100644 include/hw/nvram/nrf51_nvm.h create mode 100644 include/hw/timer/nrf51_timer.h create mode 100644 tests/microbit-test.c