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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 90B54C54EBC for ; Tue, 10 Jan 2023 13:41:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A0EDE85413; Tue, 10 Jan 2023 14:41:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="NSSajHMQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D58BB85484; Tue, 10 Jan 2023 14:41:01 +0100 (CET) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 0B97582131 for ; Tue, 10 Jan 2023 14:40:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mkorpershoek@baylibre.com Received: by mail-wm1-x333.google.com with SMTP id p3-20020a05600c1d8300b003d9ee5f125bso5396443wms.4 for ; Tue, 10 Jan 2023 05:40:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=aHothP/PBUXaTEGoPRYkQ/DsflCm9NFEWkeqeprbyrI=; b=NSSajHMQEWNbiMe57Gv8GEN3m2H+DAjNpI8WIF74ZKkY3ndnNJLHjZV1W+T+Kel7sT iq0cVbIL3lI0yxvgjwJYoAQovNopDUhagiWNwqLi1Gz1oKzp0ZJJT79JmXQmeIeMEohs 1GzAElDtG5F00AGW2wkIgV768h0eipEeJypgebD/Wks1zyl+y60t0cEG/er7q4XPg9Zy s4YfFSbsiuv+glCMXJ2LTg+BO5ktgwphvJ77tewukUQEoIvy90dHjLjmO2yPa6kvb+RX VWbXd3/+LTACZW3fzcqN0PB2hQydG2ed2Zwk7Z7UUo376GboxSX+WPpOun41P3Lkmbfc IjAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aHothP/PBUXaTEGoPRYkQ/DsflCm9NFEWkeqeprbyrI=; b=uko+0XqMxNwJwYP8AsqOtCIH4XCLwWCs2V9BfvpXsMc+o6wFQ7XEPkEI8vqO0B51aL 9eqAKNOQXlNkPUG1tO8hDxXP28JyWC4j2DtKaNUusSMMMmQPcmedUNYbOvv3C0DT0cJC SHs+jikgAzdFMdi4gfiTbJ06KVtYZdt/9kY5h63WFLIbnRcj+geng5WRdbuJf4fZl4Lg 0s+YCK7oWSIzo2OU2v/j30Ajzzhw1grj3f2NFLoZnhmzhT/oFytLYbZBw8M+BffZWcy2 r4WCyIQug0y+nm/Hse7b5KUaoaLOkBt7qyuOlQ2jzTxhXb+j0JC2Lez6UhazVK/5851y UjzA== X-Gm-Message-State: AFqh2kodEkiwF7tmvBGWErrJHKblPzZrmcvIyHTz2ZIYTVmTTKDQRi+9 VzFrsWvSC+yIQgu2BjaDPgAmHw== X-Google-Smtp-Source: AMrXdXtu2/iX9h8+GR8JZDFPl/TieCqW9hDYYCrJyRWo63hUiAMcBv5aAm/BPYv6BbI5nVTQPlYDRg== X-Received: by 2002:a05:600c:1d89:b0:3d3:58cb:f6a6 with SMTP id p9-20020a05600c1d8900b003d358cbf6a6mr48988662wms.41.1673358057600; Tue, 10 Jan 2023 05:40:57 -0800 (PST) Received: from localhost ([2a01:cb19:85e6:1900:2bf7:7388:731d:c4e1]) by smtp.gmail.com with ESMTPSA id h8-20020a05600c350800b003d990372dd5sm21684607wmq.20.2023.01.10.05.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 05:40:57 -0800 (PST) From: Mattijs Korpershoek To: Alexey Romanov , narmstrong@baylibre.com, trini@konsulko.com, sjg@chromium.org Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de, kernel@sberdevices.ru, Alexey Romanov , Neil Armstrong Subject: Re: [PATCH v4 1/5] asm/arch-meson: add missing meson_sm_write_efuse signature In-Reply-To: <20230110105650.54580-2-avromanov@sberdevices.ru> References: <20230110105650.54580-1-avromanov@sberdevices.ru> <20230110105650.54580-2-avromanov@sberdevices.ru> Date: Tue, 10 Jan 2023 14:40:56 +0100 Message-ID: <87bkn68q3b.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean On Tue, Jan 10, 2023 at 13:56, Alexey Romanov wrote: > This function can be used by other modules. Also add comments. > > Signed-off-by: Alexey Romanov > Reviewed-by: Neil Armstrong Reviewed-by: Mattijs Korpershoek > --- > arch/arm/include/asm/arch-meson/sm.h | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > > diff --git a/arch/arm/include/asm/arch-meson/sm.h b/arch/arm/include/asm/arch-meson/sm.h > index f3ae46a6d6b..53b75176493 100644 > --- a/arch/arm/include/asm/arch-meson/sm.h > +++ b/arch/arm/include/asm/arch-meson/sm.h > @@ -6,10 +6,35 @@ > #ifndef __MESON_SM_H__ > #define __MESON_SM_H__ > > +/** > + * meson_sm_read_efuse - read efuse memory into buffer > + * > + * @offset: offset from the start efuse memory > + * @buffer: pointer to buffer > + * @size: number of bytes to read > + * @return: number of bytes read > + */ > ssize_t meson_sm_read_efuse(uintptr_t offset, void *buffer, size_t size); > > +/** > + * meson_sm_write_efuse - write into efuse memory from buffer > + * > + * @offset: offset from the start efuse memory > + * @buffer: pointer to buffer > + * @size: number of bytes to write > + * @return: number of bytes written > + */ > +ssize_t meson_sm_write_efuse(uintptr_t offset, void *buffer, size_t size); > + > #define SM_SERIAL_SIZE 12 > > +/** > + * meson_sm_get_serial - read chip unique id into buffer > + * > + * @buffer: pointer to buffer > + * @size: buffer size. > + * @return: zero on success or -errno on failure > + */ > int meson_sm_get_serial(void *buffer, size_t size); > > enum { > @@ -28,6 +53,9 @@ enum { > REBOOT_REASON_WATCHDOG_REBOOT = 13, > }; > > +/** > + * meson_sm_get_reboot_reason - get reboot reason > + */ > int meson_sm_get_reboot_reason(void); > > #endif /* __MESON_SM_H__ */ > -- > 2.25.1