Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp806057ybl; Mon, 2 Dec 2019 18:33:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwTcU6b2eahTZGPvu9NUgp2nc4/4hRH/y4L/orRZ4VxeMZgXmxwYD/MtrTOAwpdnmFZSJ/p X-Received: by 2002:a9d:6b86:: with SMTP id b6mr1644363otq.182.1575340406735; Mon, 02 Dec 2019 18:33:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1575340406; cv=pass; d=google.com; s=arc-20160816; b=EEDn/hkM89TURJUAypkhFYnBH8Yo0q+obX/XUSOIxA6kqXd1i7XevhV44alAFlKlMb Wrec5HZ+euIsjDWYcuPjCpgHvfVB7/klE2xKVa9QppDD5APYFBldn+Avs1+9IZ2tZcEq 68RUUuH65wyvLxFz2v8WrQ48b389SxmkvMUa+saPX3EKOQZm/UEv/xrlIeKP1NqmTf4X h7/QmwhG6df0LfAnbz7rOvdpGmSbWFEzUCjVJj7hhQHYhh1JsHVDzjws5cHzBPeOOm9e l7mCxxrO7Vb3Zc+tuqkT4bf/e9XEDqj6NEdwqEo3dhjmM7JMVFlm9vi5UonT26POXdyO m+0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=3D1TW5QcPIxfp6193c5nZsIwl84BW5u/Jdq9abmPRMo=; b=yZuWh/WP/wqcRB6V7k3WeZg1EBP/29Ewt73usycc8bfF83QDIUhF+1enNxyfMi7DFP WESaPXrkIlwqsnMvI+R7yP9XlL5hwNJpCUUiGfaYgI3Kslnec44Wjh8T6+DUwftm7Hta XPRNcuUaNs7F7op1nZuul1XbRE0kC1IFXCgofEc0Cr19ygMA8GI2bUZiowIw5G6rHsnh 95r1akibimmfhNSdzfVTmwL41ODg/LLRnQ0xDdOQi9ni+IhAiN0CfFFDpKDQjwB2J9Jb uJpdUtSSn5FzUgRxH5q3mEcLdd9Oix1MUiKxRZVgU1WT5xSLIfFG3CpdpUp3+gDNvOub AGFQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=s2eFMdhy; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si442258oto.91.2019.12.02.18.33.10; Mon, 02 Dec 2019 18:33:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=s2eFMdhy; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726115AbfLCCcc (ORCPT + 99 others); Mon, 2 Dec 2019 21:32:32 -0500 Received: from mail-eopbgr60078.outbound.protection.outlook.com ([40.107.6.78]:62368 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725941AbfLCCcc (ORCPT ); Mon, 2 Dec 2019 21:32:32 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LamP8MiNuJHH/a2uAHdHgseyfFplV8AKjU6HAkvShZ3sF1PMx+KmPKl9eQ7BWVEg7kZwVE0CnVRoQSJWE7XkZRxFJP0cD7batjO2Xx9/vCjU7bXFfX1JrbUxM1aKWSGNyVoI0YgmxN/eV1zYwwh9R80tUpPR6uhchURO1oRFFfmTeO2hL75A+VIHxVjyB5kMwpgBpZwY00iazkbCA6sofitpDgYR+vvmQz5FVE9twYqFDSSSrVdJTAgU1E58l//hoxnZCjQ4M5sHp7BOvsRuOh2vD5ijdRxAcyLxkkry1r9j3Ymowt7b8seAdjoarViKXy7SuYywXDUup15NmKDs2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3D1TW5QcPIxfp6193c5nZsIwl84BW5u/Jdq9abmPRMo=; b=d5WHUdo/yFrNONKghe3Hg+NVeaitgG4iCocJub9G/uX8BNiLEwT7uY4z723dJrjGcYMafJXxlL8n5HmhMfEEo6SCMsx6OQJBAd6JqvOI2DXzJLt2IHslAbZTPoZ7GodUrNf+F6QZNdyh1N/2UFhePTLnwN8+DRbqVYgHuLpd3QhJ+xrUi/v06rXLpmZmmJeP5STQNZvPGEcsczU69IxvGviXcpggiX8vHzcp6v+jeCTl0Vm4NSEOaBd3xARyhWeObYRl5itoSpRy79ahyimpPKRezq7aikWIQN5vJwRPac+hpnbSbaP1FvmN4VSfCecKRjCnkCHLJk9n8CmqiMvvVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3D1TW5QcPIxfp6193c5nZsIwl84BW5u/Jdq9abmPRMo=; b=s2eFMdhy07WCq/9x3DSdw401MysS8Y+SMU4NeQVP9XSK4LUadXJEbniID/9a8A8QPZ4F1tjFCNt4WsEUQ39HrO9p5ikDtEojfDxDjEe6pqLlY1o9jZjPIfTYRb210Dqmdm+Q+RuMKmGmLfhuHXYzuDWfBh23A8FVX0Mm4qgONSo= Received: from AM0PR04MB4481.eurprd04.prod.outlook.com (52.135.147.15) by AM0PR04MB4691.eurprd04.prod.outlook.com (20.176.214.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.18; Tue, 3 Dec 2019 02:32:29 +0000 Received: from AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::f16d:a26a:840:f97c]) by AM0PR04MB4481.eurprd04.prod.outlook.com ([fe80::f16d:a26a:840:f97c%4]) with mapi id 15.20.2495.014; Tue, 3 Dec 2019 02:32:29 +0000 From: Peng Fan To: "srinivas.kandagatla@linaro.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" CC: "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Aisheng Dong , Alice Guo , Peng Fan Subject: [PATCH] nvmem: imx: scu: fix write SIP Thread-Topic: [PATCH] nvmem: imx: scu: fix write SIP Thread-Index: AQHVqYHoZrnIZ3I0wkeIFm0IrQxq7g== Date: Tue, 3 Dec 2019 02:32:29 +0000 Message-ID: <1575340217-1402-1-git-send-email-peng.fan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK2P15301CA0002.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::12) To AM0PR04MB4481.eurprd04.prod.outlook.com (2603:10a6:208:70::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=peng.fan@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 7336d812-9b3e-4a04-9e5d-08d777990a9d x-ms-traffictypediagnostic: AM0PR04MB4691:|AM0PR04MB4691: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-forefront-prvs: 02408926C4 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(366004)(376002)(346002)(39860400002)(136003)(189003)(199004)(102836004)(81166006)(81156014)(6512007)(71190400001)(71200400001)(86362001)(50226002)(5660300002)(6436002)(4744005)(14454004)(6486002)(99286004)(66446008)(64756008)(66556008)(66476007)(66946007)(26005)(8676002)(2501003)(2906002)(6506007)(386003)(44832011)(25786009)(66066001)(2201001)(478600001)(305945005)(316002)(7736002)(4326008)(2616005)(36756003)(6116002)(110136005)(3846002)(54906003)(8936002)(256004)(52116002)(186003)(14444005);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4691;H:AM0PR04MB4481.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6MyJJmHmLtksq/5Sy0KP40smkJHhI5CFO/G8WzcUJRf4aGEQLqBEYVuTe/2FXegoLJ6tKouPO19Sgg3LvxIDZuNWt2IbNk5GFWLtVCZGtYqNtiGBFKL5bANgnP2itmt0FyICzXuOWbMm7yXtdV4lo4VDwl/iODyDjpv1AJxitlB6uvYIfDFYAgrGBMflv/vrsoFca+NZyxNuGHSCOb8uqgObnRBdxULS5uuP7XH+4l7C7gM35DNtyf1EJ4hnfq4ZXcMVk1KR7qdCZzkavfQSBgjVgX1/N+AmS1dqgLS500cjAs2msurVBrJT4LJ+gdWMOa46vZ5YOZ+Ycl4ibysImn5WeFmx1i94Kq0+p3G5SEBKLCdsHIdE7/er7ATe9DrO5WzBKf/viFGXaSKQEl0qGl9uRMwcC0w9OSVh2mwByTVq0RjCj2NmgUGnT3pbhVqE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7336d812-9b3e-4a04-9e5d-08d777990a9d X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Dec 2019 02:32:29.2075 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: IaZFc2/s9ICoS2TrzjtvPjRdH0cdk000/I4//YvXCYGa5PgcEzCzVsSAqp298Z/+yIGgGJBsN/j/BW9T8IRkUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4691 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan SIP number 0xC200000A is for reading, 0xC200000B is for writing. And the following two args for write are word index, data to write. Fixes: 885ce72a09d0 ("nvmem: imx: scu: support write") Signed-off-by: Peng Fan --- drivers/nvmem/imx-ocotp-scu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/nvmem/imx-ocotp-scu.c b/drivers/nvmem/imx-ocotp-scu.c index 03f1ab23ad51..455675dd8efe 100644 --- a/drivers/nvmem/imx-ocotp-scu.c +++ b/drivers/nvmem/imx-ocotp-scu.c @@ -15,8 +15,7 @@ #include #include =20 -#define IMX_SIP_OTP 0xC200000A -#define IMX_SIP_OTP_WRITE 0x2 +#define IMX_SIP_OTP_WRITE 0xc200000B =20 enum ocotp_devtype { IMX8QXP, @@ -212,8 +211,7 @@ static int imx_scu_ocotp_write(void *context, unsigned = int offset, =20 mutex_lock(&scu_ocotp_mutex); =20 - arm_smccc_smc(IMX_SIP_OTP, IMX_SIP_OTP_WRITE, index, *buf, - 0, 0, 0, 0, &res); + arm_smccc_smc(IMX_SIP_OTP_WRITE, index, *buf, 0, 0, 0, 0, 0, &res); =20 mutex_unlock(&scu_ocotp_mutex); =20 --=20 2.16.4