qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Steffen Görtz" <contrib@steffen-goertz.de>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Joel Stanley <joel@jms.id.au>,
	Jim Mussared <jim@groklearning.com>,
	Julia Suvorova <jusual@mail.ru>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 07/13] tests: Add bbc:microbit / nRF51 test suite
Date: Mon, 5 Nov 2018 16:51:04 +0000	[thread overview]
Message-ID: <CAFEAcA8arFtAxVDxd_XTnLFnEcMY7BHSA1PjYChp07HwzQqmqw@mail.gmail.com> (raw)
In-Reply-To: <20181102170730.12432-8-contrib@steffen-goertz.de>

On 2 November 2018 at 17:07, Steffen Görtz <contrib@steffen-goertz.de> wrote:
> The microbit-test includes tests for the nRF51 NVMC
> peripheral and will host future nRF51 peripheral tests
> and board-level bbc:microbit tests.
>
> Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  tests/Makefile.include |   2 +
>  tests/microbit-test.c  | 117 +++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 119 insertions(+)
>  create mode 100644 tests/microbit-test.c
>
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index f77a495109..602346eeed 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -274,6 +274,7 @@ check-qtest-sparc64-y += tests/boot-serial-test$(EXESUF)
>  check-qtest-arm-y += tests/tmp105-test$(EXESUF)
>  check-qtest-arm-y += tests/pca9552-test$(EXESUF)
>  check-qtest-arm-y += tests/ds1338-test$(EXESUF)
> +check-qtest-arm-y += tests/microbit-test$(EXESUF)
>  check-qtest-arm-y += tests/m25p80-test$(EXESUF)
>  check-qtest-arm-y += tests/virtio-blk-test$(EXESUF)
>  check-qtest-arm-y += tests/test-arm-mptimer$(EXESUF)
> @@ -695,6 +696,7 @@ tests/pxe-test$(EXESUF): tests/pxe-test.o tests/boot-sector.o $(libqos-obj-y)
>  tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y)
>  tests/pca9552-test$(EXESUF): tests/pca9552-test.o $(libqos-omap-obj-y)
>  tests/ds1338-test$(EXESUF): tests/ds1338-test.o $(libqos-imx-obj-y)
> +tests/microbit-test$(EXESUF): tests/microbit-test.o
>  tests/m25p80-test$(EXESUF): tests/m25p80-test.o
>  tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y)
>  tests/q35-test$(EXESUF): tests/q35-test.o $(libqos-pc-obj-y)
> diff --git a/tests/microbit-test.c b/tests/microbit-test.c
> new file mode 100644
> index 0000000000..743f831466
> --- /dev/null
> +++ b/tests/microbit-test.c
> @@ -0,0 +1,117 @@
> + /*
> + * QTest testcase for Microbit board using the Nordic Semiconductor nRF51 SoC.
> + *
> + * nRF51:
> + * Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf
> + * Product Spec: http://infocenter.nordicsemi.com/pdf/nRF51822_PS_v3.1.pdf
> + *
> + * Microbit Board: http://microbit.org/
> + *
> + * Copyright 2018 Steffen Görtz <contrib@steffen-goertz.de>
> + *
> + * This code is licensed under the GPL version 2 or later.  See
> + * the COPYING file in the top-level directory.
> + */
> +
> +
> +#include "qemu/osdep.h"
> +#include "exec/hwaddr.h"
> +#include "libqtest.h"
> +
> +#include "hw/arm/nrf51.h"
> +#include "hw/nvram/nrf51_nvm.h"
> +
> +#define FLASH_SIZE          (256 * NRF51_PAGE_SIZE)
> +
> +static void fill_and_erase(hwaddr base, hwaddr size, uint32_t address_reg)
> +{
> +    /* Fill memory */
> +    writel(NRF51_NVMC_BASE + NRF51_NVMC_CONFIG, 0x01);
> +    for (hwaddr i = 0; i < size; i++) {

Looks like you missed this "declaration inside for()".

> +        writeb(base + i, i);
> +        g_assert_cmpuint(readb(base + i), ==, i & 0xFF);
> +    }

thanks
-- PMM

  reply	other threads:[~2018-11-05 16:51 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 17:07 [Qemu-devel] [PATCH v4 00/13] arm: nRF51 Devices and Microbit Support Steffen Görtz
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 01/13] qtest: Add set_irq_in command to set IRQ/GPIO level Steffen Görtz
2018-11-05  6:18   ` Thomas Huth
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 02/13] arm: Add header to host common definition for nRF51 SOC peripherals Steffen Görtz
2018-11-05 16:47   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 03/13] hw/misc/nrf51_rng: Add NRF51 random number generator peripheral Steffen Görtz
2018-11-05 16:48   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 04/13] arm: Instantiate NRF51 random number generator Steffen Görtz
2018-11-05 16:49   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 05/13] hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories Steffen Görtz
2018-11-05 17:09   ` Peter Maydell
2018-11-08  9:28   ` Stefan Hajnoczi
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 06/13] arm: Instantiate NRF51 special NVM's and NVMC Steffen Görtz
2018-11-05 16:50   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 07/13] tests: Add bbc:microbit / nRF51 test suite Steffen Görtz
2018-11-05 16:51   ` Peter Maydell [this message]
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 08/13] hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral Steffen Görtz
2018-11-05 16:47   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 09/13] arm: Instantiate NRF51 general purpose I/O Steffen Görtz
2018-11-05 16:51   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 10/13] tests/microbit-test: Add Tests for nRF51 GPIO Steffen Görtz
2018-11-05 16:54   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 11/13] hw/timer/nrf51_timer: Add nRF51 Timer peripheral Steffen Görtz
2018-11-05 17:45   ` Peter Maydell
2018-11-08  9:30   ` Stefan Hajnoczi
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 12/13] arm: Instantiate NRF51 Timers Steffen Görtz
2018-11-05 16:56   ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 13/13] arm: Add Clock peripheral stub to NRF51 SOC Steffen Görtz
2018-11-04  8:19 ` [Qemu-devel] [PATCH v4 00/13] arm: nRF51 Devices and Microbit Support no-reply
2018-11-04  8:23 ` no-reply
2018-11-06  6:41 ` no-reply
2018-11-06  6:45 ` no-reply
2018-11-08  9:32 ` Stefan Hajnoczi
2018-11-08  9:42   ` Peter Maydell
2018-11-08 10:20     ` Joel Stanley
2018-11-08 10:23       ` Peter Maydell
2018-11-08 22:18 ` no-reply
2018-11-08 22:22 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA8arFtAxVDxd_XTnLFnEcMY7BHSA1PjYChp07HwzQqmqw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=contrib@steffen-goertz.de \
    --cc=jim@groklearning.com \
    --cc=joel@jms.id.au \
    --cc=jusual@mail.ru \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).