From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11801C07E99 for ; Mon, 5 Jul 2021 15:56:26 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88A6B61968 for ; Mon, 5 Jul 2021 15:56:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88A6B61968 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4E7282BED; Mon, 5 Jul 2021 17:56:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PRAJmytt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE77282C22; Mon, 5 Jul 2021 17:56:17 +0200 (CEST) Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 45BC882BC9 for ; Mon, 5 Jul 2021 17:56:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-oi1-x232.google.com with SMTP id w127so21151866oig.12 for ; Mon, 05 Jul 2021 08:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Tpt1tJBVlhT+iAPzbCygdoOpH0DZYtPa4wb4veq9zps=; b=PRAJmyttZpNhaYBbcU/O4L0Ee4zFsBYJAyLwvp7LAV0zchTEOlDVtePmK00HO2TLdT UyEsbvIRpKRqUkrheA4I9E5ontgS1TmZuq1mifIh9QqSNmpQqD6R51Gf7XPS6Nhzyfiv 6FS27VxLCTT1K6Jr09/n6sna1hkxz8PWnO9LA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Tpt1tJBVlhT+iAPzbCygdoOpH0DZYtPa4wb4veq9zps=; b=oyuvwoGDNjT/jm8uhkplxDyrrrxeJIDHt2smC3kN0KhRFH/1brRU+jrdCwHvkypHXX w/1uinKdHYKeg19eugFT7cuBDh+EAyaUDk2Dh8SHjZaZjcC28+u1EVUS6yUzRGE0JA2G 7ZBnjTdEcSJ8lHhD3noTeqBe2ttD1raA3+DHbeVIjFUwfgNegYywreM6TV1bUk2lo5er wqwnX6bzty/HJ7kF7bTGeOiiT5kkXcfYkSNtQdTQFO6HgZJ9IGiYie4jeihNaysPanJv eCPNrjmS742Db81Hb+o36fvUjz4noaezic8N1VDekCBf2zGga95CD5mBZzzW3NBOSDd7 +g0A== X-Gm-Message-State: AOAM530NV9m9VlJ04DeB+GaWGxTAHaSKhdlA0H3KA09mH4ZiCnECaTdl 5hFXI9UpYMRbd5yCUR3r358IJ50TPkQjDWT6dB5h+ARsk54MQw== X-Google-Smtp-Source: ABdhPJznvbvOEsY6K53BCtbxwlewhKR09650I8Br/5qnSvz5tpSjlRVm8+OdrlRVvw+77YX9G4Ytzbm8yVBxc+OMdrw= X-Received: by 2002:aca:43c6:: with SMTP id q189mr10146991oia.81.1625500566661; Mon, 05 Jul 2021 08:56:06 -0700 (PDT) MIME-Version: 1.0 References: <3a1c85f25c7b071846759ad9a4ae21a1556f02c4.1623328711.git.nandor.han@vaisala.com> In-Reply-To: <3a1c85f25c7b071846759ad9a4ae21a1556f02c4.1623328711.git.nandor.han@vaisala.com> From: Simon Glass Date: Mon, 5 Jul 2021 09:55:55 -0600 Message-ID: Subject: Re: [PATCH v2 1/1] bootcount: add a new driver with syscon as backend To: Nandor Han Cc: U-Boot Mailing List , Tom Rini , =?UTF-8?B?VmVzYSBKw6TDpHNrZWzDpGluZW4=?= Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Thu, 10 Jun 2021 at 06:41, Nandor Han wrote: > > The driver will use a syscon regmap as backend and supports both > 16 and 32 size value. The value will be stored in the CPU's endianness. > > Signed-off-by: Nandor Han > --- > > Notes: > Description > ----------- > Add a new driver for bootcount feature that supports `syscon` device as > backend. > > Testing > ------- > UnitTests: > 1. Verify that unit-tests run successfully: PASS > ``` > ./test/py/test.py --bd sandbox --build -k ut_dm_bootcount -v > > test/py/tests/test_ut.py::test_ut[ut_dm_bootcount_rtc] PASSED [ 33%] > test/py/tests/test_ut.py::test_ut[ut_dm_bootcount_syscon_four_bytes] PASSED [ 66%] > test/py/tests/test_ut.py::test_ut[ut_dm_bootcount_syscon_two_bytes] PASSED [100%] > ``` > > Using hardware: > Board: i.MX6sx based dev board > U-Boot version: 2020.01 > 1. Use `bootcount` command to verity that value is updated > correctly: PASS > > > Changes since v1: > - rebased > > arch/sandbox/dts/test.dts | 14 ++ > configs/sandbox_defconfig | 1 + > doc/device-tree-bindings/bootcount-syscon.txt | 25 +++ > drivers/bootcount/Kconfig | 12 ++ > drivers/bootcount/Makefile | 1 + > drivers/bootcount/bootcount_syscon.c | 159 ++++++++++++++++++ > test/dm/bootcount.c | 48 +++++- > 7 files changed, 257 insertions(+), 3 deletions(-) > create mode 100644 doc/device-tree-bindings/bootcount-syscon.txt > create mode 100644 drivers/bootcount/bootcount_syscon.c Reviewed-by: Simon Glass