From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fnKT9-0007Ro-RN for qemu-devel@nongnu.org; Wed, 08 Aug 2018 05:09:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fnKT8-0006CY-Qw for qemu-devel@nongnu.org; Wed, 08 Aug 2018 05:09:27 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:38776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fnKT8-0006AH-Ix for qemu-devel@nongnu.org; Wed, 08 Aug 2018 05:09:26 -0400 Received: by mail-wm0-x244.google.com with SMTP id t25-v6so1951672wmi.3 for ; Wed, 08 Aug 2018 02:09:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180806100114.21410-4-contrib@steffen-goertz.de> References: <20180806100114.21410-1-contrib@steffen-goertz.de> <20180806100114.21410-4-contrib@steffen-goertz.de> From: Stefan Hajnoczi Date: Wed, 8 Aug 2018 10:09:24 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/7] tests: Add bbc:microbit / nRF51 test suite List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Steffen_G=C3=B6rtz?= Cc: qemu-devel , Joel Stanley , Jim Mussared , Julia Suvorova , Peter Maydell , Thomas Huth On Mon, Aug 6, 2018 at 11:01 AM, Steffen G=C3=B6rtz wrote: > +#define PAGE_SIZE 1024 > +#define FLASH_SIZE (256 * PAGE_SIZE) > +#define FLASH_BASE 0x00000000 > +#define UICR_BASE 0x10001000 > +#define UICR_SIZE 0x100 > +#define NVMC_BASE 0x4001E000UL > +#define NVMC_READY 0x400 > +#define NVMC_CONFIG 0x504 > +#define NVMC_ERASEPAGE 0x508 > +#define NVMC_ERASEPCR1 0x508 > +#define NVMC_ERASEALL 0x50C > +#define NVMC_ERASEPCR0 0x510 > +#define NVMC_ERASEUICR 0x514 All these constants could live in include/hw/arm/nrf51.h. That way tests do not need to duplicate them. As more devices are implemented we can expect this list to grow. > +static void fill_and_erase(hwaddr base, hwaddr size, uint32_t address_re= g) Why hwaddr? writel() and friends use uint64_t.