Message ID | 20240909222401.2562898-6-mikhail.kshevetskiy@iopsys.eu |
---|---|
State | Superseded |
Delegated to: | Dario Binacchi |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=iopsys.eu header.i=@iopsys.eu header.a=rsa-sha256 header.s=selector2 header.b=u4JW+Lly; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X2hGg5zTSz1y1s for <incoming@patchwork.ozlabs.org>; Tue, 10 Sep 2024 08:24:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC60A889F8; Tue, 10 Sep 2024 00:24:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=iopsys.eu 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=iopsys.eu header.i=@iopsys.eu header.b="u4JW+Lly"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8629A88E59; Tue, 10 Sep 2024 00:24:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on20711.outbound.protection.outlook.com [IPv6:2a01:111:f403:2612::711]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BF15488E64 for <u-boot@lists.denx.de>; Tue, 10 Sep 2024 00:24:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=iopsys.eu Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mikhail.kshevetskiy@genexis.eu ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cuudetquP7PW3ALmHaPHpeuhByhBchg623o5ybSsDKJ24XBEGXf+Lybta0Ox3/n7ziaItpwc54EPE/IoERXDxSnwrd9KtJTTu6En2OP3FN3K1qdKDuuWBIVesKBln6rVWQ2hrDfAqaoZvqXvXYE4AtlzT2hdhcpgVgGWbYiNc9nHFG19fIqg4QvZN9FstsYOwey/t5py+MHu6TY0PMvZXTmTxqUQ6L6RRYE5acX40g3BfvtSxQmHV4A2sl5iTK385qelthXHVJofqA72xLbanOxNgsAb5qhUBB5yez9pyLbI6rFv0ETuEfGqUwoMg8u++g4uu4JDUPPKCwGXXKLiOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Whm5sgNFRFvN7odaDp55Iwpw2RT4l+3JBeJgI/Ct/8w=; b=VrhPdJhkTWUcEZAm44qRakyZxiuyPPdWF0Ibn40g8UujFOD3WXvIaABcL78gZ2pCpDwd+RbpVpwbuEUkXc0KqQkwjsPbT3MaZGQI6XosY0Fhf0IqSqTVPMZeiYNyxxenpSjrwTv9UPao7YBNy+xnkrWAnCUrDwNAvRntTC6emrf/N2solKgWC/9vY3JMEqRCfZkqgP4zjJME16WHfz1cRj9QFzZSCuipk27hX35wa2kEbf+UfpjOs8uUm0fdMe2duAuVi3hWuJbotbe8p0PQtuugrehM5vON6khiJqmBD87DqZa1Nuu52VD2dVcDkLsTK+mjyDL8ZRBBI728JLtolw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=genexis.eu; dmarc=pass action=none header.from=iopsys.eu; dkim=pass header.d=iopsys.eu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iopsys.eu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Whm5sgNFRFvN7odaDp55Iwpw2RT4l+3JBeJgI/Ct/8w=; b=u4JW+Llyj2imDXTU025LIyV77mCss+PWX/rGMcF1nSDgi4twvKiE1wxvUWYXcEUybSVbx49jaTeYisqk2KxhzDbb/tLjkUqOlXoFQrliruw+PvLk27FnJKGeM9KxvNHA1BWWyf8zikXRC4g185g1lz3y9ZXRwaO4xu5sbpinQLkulAS2lYgzZ9tr0WLRuuqbykIl7tvKL/MO9y+gA5PPTpie/5JafhQlnxWJMD8OGyMipsAKcUNcBstYLD3g+kz9RgkPTXpP4l0Co2o+MXkIy7biOeVu1r7FcG2tQQF5aucl6J3WrJ79GRNau8ScwKGX2/2qg6CoxKFgf0H2WADgLg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=iopsys.eu; Received: from GV2PR08MB8121.eurprd08.prod.outlook.com (2603:10a6:150:7d::22) by DU0PR08MB9935.eurprd08.prod.outlook.com (2603:10a6:10:401::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.15; Mon, 9 Sep 2024 22:24:16 +0000 Received: from GV2PR08MB8121.eurprd08.prod.outlook.com ([fe80::4cd3:da80:2532:daa0]) by GV2PR08MB8121.eurprd08.prod.outlook.com ([fe80::4cd3:da80:2532:daa0%2]) with mapi id 15.20.7962.014; Mon, 9 Sep 2024 22:24:16 +0000 From: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> To: Tom Rini <trini@konsulko.com>, Dario Binacchi <dario.binacchi@amarulasolutions.com>, Michael Trimarchi <michael@amarulasolutions.com>, Frieder Schrempf <frieder.schrempf@kontron.de>, Jagan Teki <jagan@amarulasolutions.com>, Simon Glass <sjg@chromium.org>, William Zhang <william.zhang@broadcom.com>, Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>, Igor Prusov <ivprusov@salutedevices.com>, Dmitry Rokosov <ddrokosov@sberdevices.ru>, Bruce Suen <bruce_suen@163.com>, Alexey Romanov <avromanov@salutedevices.com>, Martin Kurbanov <mmkurbanov@sberdevices.ru>, Chuanhong Guo <gch981213@gmail.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Max Krummenacher <max.krummenacher@toradex.com>, Francesco Dolcini <francesco.dolcini@toradex.com>, u-boot@lists.denx.de Subject: [RESEND PATCH v4 05/10] mtd: spinand: more use of spinand_to_{something} helpers Date: Tue, 10 Sep 2024 01:23:53 +0300 Message-ID: <20240909222401.2562898-6-mikhail.kshevetskiy@iopsys.eu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240909222401.2562898-1-mikhail.kshevetskiy@iopsys.eu> References: <20240909222401.2562898-1-mikhail.kshevetskiy@iopsys.eu> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: FR3P281CA0096.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a1::8) To GV2PR08MB8121.eurprd08.prod.outlook.com (2603:10a6:150:7d::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV2PR08MB8121:EE_|DU0PR08MB9935:EE_ X-MS-Office365-Filtering-Correlation-Id: 7609a545-8d8e-4f60-8274-08dcd11e2417 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|7416014|376014|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: z9Rn1lRzEEbOchqG3eKIjfOwwhZyPinFyVFvQFS+2e6zoV2Hr/l8bcDUZPNXlbTawBzI0S1txEJuyJXb87aBdKtc8Ql71BkV6ra3A5SnyCBfg6q/3DHCOpU6pQxfzRKsFUJ1gEQFNfm2PRrn8azgoeDxycxJvzreLVP9X7p4lF++hI2ZN32sbwN7FSqEVTB2DPzdrbVMY++m8oaK4MRW3KciqsW0NQi+mkYnoqdn5sgnmMTIZsZdXAjWVKBmuG0eEDBRJ2RwH3SjaTW0Esz1w0vJGk2FAyJ2MDk5LoIGUe3eYENgZ4kllmFKnScpQQ7LzNS41hlLW0XhQgKYAC3PX9xMv1CKauvhydGOYakyzSz3fQiYL4+sGHBXKlWvlSBsDqpUt7wHhzTsGfc3QjAKS7GGNpRdHIaIfDvk6IyMoU7LevfOcN02oZUYkkTFkrmMtBxkgFwpDkSO2k6o6gFjLjlWUgQWJ/sIyUyJkc1bxvupYzVHvyWmksUgB1UmrISvnNctkuk68SRE/DWP697ERG4ATG9JZALNg8Hu4dAtUDnb45m4RVCC38AFssesimYuoHdW1LI+OD/QREvfQVGAbV3wRLd90uoHY76IFrcVVMOr9bTpFnhyCDOPddS2MK/WwsnuRuqqmjbdn6WwMFs0rtRyLgQv+hOe6qeWH018nNRkulYwUr84EK+u2p4R090uLDNFHQhzNEKhOYbc9nDKKkaVZfiwbcemkN8c9ZD9uNos+EiWsFWITKm1FrRrNubBb2hYWYOFmASi4D3uqNEIbTQ5ORyxnjWtPdbdWhIBUCL/WkBbpGDHri+3VNATZwLf+CNQTLA2a8hQHBT1Ve8nrnHS1mHcIJJ+QiHV4x5VUt/j7WDYL4Dk+PKaN5B2iQRZeNpbknDy435YiFD68BFlGCCKW3WzXD+50wSwGmSBgcmFoqP/WKoQBlskcnWYFWsQYJ9+Q0L7HwOD2RLMmy2vc0GQPJU4/a97GHdJ02iXdeBWVnfUzFBfsyOEmdQwpHrOvXqvn+7mLl6Wz2CZzULp1W2WnH4mBJ7xYQLdMjID1qWX3ixygJo3e25FYTyAqoT8BviXj+dhj2pJc27M9nljD4G/LScW+b0Q6IqGn0LoG26a55t9JHge9dyWhubxhmK7CQySNYNbEYD0OHOI9nZhH9j89jzhAM7QcoMhh7PmzPksgNElBzseoJz8BJ5ePguo49u1QF7w6wix8Ugyzyd37/Suwm2rbw6zzWtVsWirXA2kRcK0W9XgApiHGwA2EqDURB3l2U40dnPC3fVGi5KB8YH1QS/vmx/xFqbZotKnI1SN4MK7JmvQikpzCBhp6ssl18y3cPXgx+A7oZ/T9Dz9/JGpV7sYraxWSWtoOWSwzKm8c/UpSapLlbXLDpGIVg9ccXM016RC808DM7/QTG9ce3kC/7S0KyuOi1wn3pJ8+a0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV2PR08MB8121.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(52116014)(7416014)(376014)(1800799024)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Iwnb1KOGH46B/IpJqP1xWIreKt9NF5QEuRVfZmbAw9PL5+SMEIo9vR0lftO3S0WLcq3FmhgmCSNSEuMIpkkaa+/H7++UxOn7opQ3b5tEKR2X1NUvSjmeuEKE9rxGJKqU2cbSPk7GHelGxbOaT6XJwI7nN3CuhVbtqoUgBYJffbRYphCO7BJkA7n/9VknZbSKG+48uzqzSNEbj63LRIFGJxMoUx9GAxzJXus+jpxp9PQbsOJ8Tq7PDdTf6MuzJQ/QloJl7W8Z8sz3QJO4qrTXlBDPT9tqfRQWzU+DAPW44n7HFqC3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ib8fUwUTG2Sk1g/DOk30d+riWvvNwooWyQbbKm1Cv0VJOMQggoZ9zFn2E/zK6WabbB8oTbTotMo62Usq2n9n2kTm2R144AOsE8QRfS5RH7xP/IwINN/nXWuTKAg/vTcxGlSX3tIn1fv6tnm/EUXCoz9E2f8mBINiBxU/W6euZ43R+tes0GvogNGtsZast8UKZp7MruWiEuRbIEV0cgE5t2DwwA3PB1eVqyx4nlKE2Pg== X-OriginatorOrg: iopsys.eu X-MS-Exchange-CrossTenant-Network-Message-Id: 7609a545-8d8e-4f60-8274-08dcd11e2417 X-MS-Exchange-CrossTenant-AuthSource: GV2PR08MB8121.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2024 22:24:16.5736 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8d891be1-7bce-4216-9a99-bee9de02ba58 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8s7qRoFDXFbNvQSCZk6uQ5k4zXL3r9RUR8zR7f0TE/Fl//SsfWwdhmBFBXSrlHOCa0dWG0FgRgzLqxPxXf0lWBn+m0/BjIgQcnV0xBGj9i8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9935 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
mtd: spinand: initial support of ecc engines
|
expand
|
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index a10605487f3..b58d9e00907 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -236,7 +236,7 @@ static int spinand_read_from_cache_op(struct spinand_device *spinand, const struct nand_page_io_req *req) { struct nand_device *nand = spinand_to_nand(spinand); - struct mtd_info *mtd = nanddev_to_mtd(nand); + struct mtd_info *mtd = spinand_to_mtd(spinand); struct spi_mem_dirmap_desc *rdesc; unsigned int nbytes = 0; void *buf = NULL; @@ -294,7 +294,7 @@ static int spinand_write_to_cache_op(struct spinand_device *spinand, const struct nand_page_io_req *req) { struct nand_device *nand = spinand_to_nand(spinand); - struct mtd_info *mtd = nanddev_to_mtd(nand); + struct mtd_info *mtd = spinand_to_mtd(spinand); struct spi_mem_dirmap_desc *wdesc; unsigned int nbytes, column = 0; void *buf = spinand->databuf; @@ -356,7 +356,7 @@ static int spinand_program_op(struct spinand_device *spinand, static int spinand_erase_op(struct spinand_device *spinand, const struct nand_pos *pos) { - struct nand_device *nand = &spinand->base; + struct nand_device *nand = spinand_to_nand(spinand); unsigned int row = nanddev_pos_to_row(nand, pos); struct spi_mem_op op = SPINAND_BLK_ERASE_OP(row);
Use spinand_to_nand() and spinand_to_mtd() helpers instead of nanddev_to_mtd() and direct access to spinand structure fields. Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> --- drivers/mtd/nand/spi/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)