From patchwork Wed Nov 22 12:56:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viacheslav X-Patchwork-Id: 168360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1301204vqb; Wed, 22 Nov 2023 05:00:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IERY/s4EcgalRSGf20Yc4VdKQRQ98UQHrtNikaAcS2sLxmTSz/lQLp3oU5htclVfJH0cnxs X-Received: by 2002:a17:90b:1b52:b0:27d:22d7:9787 with SMTP id nv18-20020a17090b1b5200b0027d22d79787mr2265765pjb.36.1700658010702; Wed, 22 Nov 2023 05:00:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700658010; cv=none; d=google.com; s=arc-20160816; b=EHycwaH5Qv4N7SujjdjywmUWOBR+filn78L6zIBlUeuqhjdk+RgCdo6bQUj1SPLftW Q6qPeTN8RhdMBhc1Y+Fh6/T71iUkvBx2FFATq5kCj2cnkn+E2ufcPrALlG6sUyyBGK6S ceSc+HDXL0W111YaR09XgO3DwYLVS6/9w5Oz5mcLZeOtVtf8CGQoH5SmHU7AUqTaBqgq GUSJEMnhdQV/hJ3qaF4U1oUXd/vVyN5ikivmYi13GPdzJeh5Iqv8LlSJZmIuzcr9AbUk Owo6yrTIJUhIZDe5zcp1AreWCwO/rnSFTuMiAOw/fZKeFOx6+TaDFZMV5jZkYOIZt4+Z ehxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1JJrVlQT4dSyAepCsKEppt0JhDAnONuiLebT73/zFmQ=; fh=Bllhknq5mciwRt9/KlTV9ZyEB86DXiZLRo/zORr6zwc=; b=D4QxUSP5FhSNFnLjR7WUnHIouBuG8MItjl3sPhN6Rr1klfsndXwedjS51bv8spR2SE bWcJF9lxpFk8pzcwezQFj44ey2sGhnP/lGLi68y5/PaStCxqUHDSmKZe/yL+za3RJIDH 0nV52V0A1s5lphH7EnPr6VeLj8ujjpPnhqg5drD+mrp9lGEgdoca1GNkR8T1w1hJ8ls7 iKDwVnIH4sVgoenXcaNcZYSGy+AM2XC3WVY8dJBCPbRci+24EBV5jY7joaTuH5jtNMwI WFgh7NhMSc5/27xRdlzXmckST4clu1jghJBa346rLq4bIVX7YTQGO3kBPmC9sKmidiWz oPjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lexina.in header.s=dkim header.b=MyaO1ciE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=lexina.in Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t21-20020a17090ad51500b00283bc49ad11si1367383pju.183.2023.11.22.05.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 05:00:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@lexina.in header.s=dkim header.b=MyaO1ciE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=lexina.in Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7C056802F879; Wed, 22 Nov 2023 04:57:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344312AbjKVM5U (ORCPT + 99 others); Wed, 22 Nov 2023 07:57:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344246AbjKVM5H (ORCPT ); Wed, 22 Nov 2023 07:57:07 -0500 Received: from mx.msync.work (mx.msync.work [62.182.159.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C31DC112; Wed, 22 Nov 2023 04:56:56 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BBCED540A2; Wed, 22 Nov 2023 12:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lexina.in; s=dkim; t=1700657814; h=from:subject:date:message-id:to:mime-version: content-transfer-encoding:in-reply-to:references; bh=1JJrVlQT4dSyAepCsKEppt0JhDAnONuiLebT73/zFmQ=; b=MyaO1ciELUoOTnkA8k5bOa8bMRT2ead7XfG4T1E1/saUsTaq9YZZ5POKgj8j/2kH+2yK5b Yt4F4OdXM0mtM/vpM9Ah9rXVH8A79i4xkMSEeeJ5ltnobxOh/IopZ4eEqDEEVVvjGcT29u McfldYm/gBr2SkJKqT33OyapEP2vdX49Yu1jzgO9lprJ8n8cH5S3QjRISFts71ah/aLaem ynCHhwbAj0wVR7makmAnhlviUDes0UwIiVKX/7ox9cDrUEc5wi/tEHuMC1kmkcWk6EYlbn XbBquQ5X5cVbxtaLtzW1sxqMWhHDJJ7zj8djrGFb755RagPQrgoldenLRpj2WQ== From: Viacheslav Bocharov To: Neil Armstrong , Jerome Brunet , Kevin Hilman , Martin Blumenstingl , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/5] firmware: meson_sm: move common definitions to header file Date: Wed, 22 Nov 2023 15:56:41 +0300 Message-Id: <20231122125643.1717160-4-adeep@lexina.in> In-Reply-To: <20231122125643.1717160-1-adeep@lexina.in> References: <20231122125643.1717160-1-adeep@lexina.in> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1284; h=from:subject; bh=qgIgUERrKdBRmt/t8R9MoRn4sT6vtjugdlg8U0yx7ss=; b=owGbwMvMwCHmnhFhrJcZuJTxtFoSQ2rst6N93hV/DR5LPs8LXCH2/fyz36Iv3ldfLpt+SnmDqfNG XbbUjlIWBjEOBlkxRZawjqCp+zxWX5y4wOgAzBxWJpAhDFycAjARETOGv3Jn1KbnZSwoTRbMmhoS8a O3ZVJ970a71oRvJ0K3vctTXcvIcLTzWXu8t1fTt7VmW0tLsiZ9U/OptTUWN+dalL03ukWKDwA= X-Developer-Key: i=adeep@lexina.in; a=openpgp; fpr=E2FA1A767ACB0716E02E3E7AEE36B110025A8DFA X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 04:57:43 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783269174579158245 X-GMAIL-MSGID: 1783269174579158245 Move SM_CHIPID_* constants from firmware meson sm driver to header file. Signed-off-by: Viacheslav Bocharov --- drivers/firmware/meson/meson_sm.c | 4 ---- include/linux/firmware/meson/meson_sm.h | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c index 402851ed4ac0..96e50811336f 100644 --- a/drivers/firmware/meson/meson_sm.c +++ b/drivers/firmware/meson/meson_sm.c @@ -240,10 +240,6 @@ struct meson_sm_firmware *meson_sm_get(struct device_node *sm_node) } EXPORT_SYMBOL_GPL(meson_sm_get); -#define SM_CHIP_ID_LENGTH 119 -#define SM_CHIP_ID_OFFSET 4 -#define SM_CHIP_ID_SIZE 12 - static ssize_t serial_show(struct device *dev, struct device_attribute *attr, char *buf) { diff --git a/include/linux/firmware/meson/meson_sm.h b/include/linux/firmware/meson/meson_sm.h index 8eaf8922ab02..f62acd2bf52a 100644 --- a/include/linux/firmware/meson/meson_sm.h +++ b/include/linux/firmware/meson/meson_sm.h @@ -7,6 +7,10 @@ #ifndef _MESON_SM_FW_H_ #define _MESON_SM_FW_H_ +#define SM_CHIP_ID_LENGTH 119 +#define SM_CHIP_ID_OFFSET 4 +#define SM_CHIP_ID_SIZE 12 + enum { SM_EFUSE_READ, SM_EFUSE_WRITE,