From patchwork Wed Jul 27 09:37:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2264 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2FE1B3F1F7 for ; Wed, 27 Jul 2022 11:37:57 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id s17-20020a056402521100b0043ade613038sf10456206edd.17 for ; Wed, 27 Jul 2022 02:37:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658914677; cv=pass; d=google.com; s=arc-20160816; b=SDt+1h9cfVuJUKWTrwhKHlJYIGzAq7NGiyEVJpK/69wmxrxFtaVqhDRrCzqDMTZJaI /tJXl56mlzA+WxVlGWKZnLZrcpzgTjs43fIdVXTpW74UfF7hH3MGODGkSepwLX7xonsa hKbnmDl9Kv/M8WjQEYw2WBtgczjuFFe6HBjqrZvgaJcZOjB9mGDBgl5yPPuit+2iwctq UIJGc8BLu1i/jcf0RTeO8up1P7Y/tvJhtzeBgI2BoRooA29rujTb+Het2pyKjND3iBTV MPwZUXRPZKI13H/u81u5Fcr7vLxVnz+rI/jdy8+b5VBNZkUSctohu+9Sej/MNw7emjoj nLfQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=mlF480/gEEJuLqJ2obV3FdcFjW6Xdvq7tVtXIoysm4Q=; b=opuTTF1ykh5EgLLjWj8Z6/lcNS0u+qUukd9Ec/hetiqq2NAXez4qvYXPbgl0ZkJE4s aFFUpPpJfZ3uJnt9Df8Gwl3d4UX/labqg0IjJ/v/YT8bNmZ9bzqSmbEg5EzTegPz2LtD QGdVW76cIh2TF52HNYZ8714PsY3GHAbEtISI5bxKuL58wT0knoP9tpxCSOTyeWdQwMLu HGJciDaTvVjdcvXDnTftq23FeQUze+UNRoshsc+PFDijWUEZp70ZVviUiyzIcA/whDaU DtFOE2KYQ7LCGObJiWcfUsBlWVfOl4v170py7wOUylBV929+TWHOEiAW6ump62kB3U1x o54A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HXxuLHfB; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=mlF480/gEEJuLqJ2obV3FdcFjW6Xdvq7tVtXIoysm4Q=; b=B4YGqhrOmfcyimLkaZpINhV2RX3ypHfqQCJZgYX89S5qtHra1e8Pl/IhAJb+N+9yyu 2eNgkFSp79bdSMRhVaneLnFwSYujAy0faeY+BsNmDcyHfA3swh9liv2AeP14hdUjIFyg T8KBcVdvzddq2RaWU5S4WOckHb8I0b4Bxe0mI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=mlF480/gEEJuLqJ2obV3FdcFjW6Xdvq7tVtXIoysm4Q=; b=13f5CK61+8KHwkXXjcb87xcCSiWF7LUYMK2K7gwgOnxnUgA1gvUvsvgVrNBgXi8YgW FPK+t7z2pBsC3/CcjDdKEKYn7vlJ6Pbb4a4WLdoH0wAiUGSrcmWKnil6Cu//xLnXyB7m icVWM9xfSEhMcvAcEkj00tITr/2Axdh4n3U2vySUPs4YuuHEiu3qcGsz0ccXOS9RrPwh q8zTMZVqUTpHD/Y7lOOCYyG1yKcCjQaaY7MRr41/NQpjXbwDa7yIDqo0w4TgV338vING 22xqRORpXodOXF5aeIW/zeLFEE3SKlIMW79YURYgUA25EiJIallcWPN9UOyqmhLFHOQ0 +z5A== X-Gm-Message-State: AJIora/vxlMbc9p36FQxlGanggtfNPan3hdz/KtEYs6l5wJ0JMW+PEea EGEC6sQ636ENVc4EmrAoomN7uqLU X-Google-Smtp-Source: AGRyM1srpL7Z93dO14u9f+TKvkWuqdURrpZ3Vzkb2VrSMCtGdD0d5U7dpzld0iPYMzxuC49Ibt5jyg== X-Received: by 2002:a17:907:2c5b:b0:72b:54bd:40f8 with SMTP id hf27-20020a1709072c5b00b0072b54bd40f8mr17007051ejc.137.1658914677076; Wed, 27 Jul 2022 02:37:57 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:40c6:b0:43a:7c1c:8981 with SMTP id z6-20020a05640240c600b0043a7c1c8981ls314158edb.0.-pod-prod-gmail; Wed, 27 Jul 2022 02:37:56 -0700 (PDT) X-Received: by 2002:a05:6402:5ca:b0:43b:6e01:482c with SMTP id n10-20020a05640205ca00b0043b6e01482cmr22411249edx.189.1658914675828; Wed, 27 Jul 2022 02:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658914675; cv=none; d=google.com; s=arc-20160816; b=onlUMfez/ROFjZ+YPNvXHRJD5L25DvjYTXgYflHeM9pNIXAOpMU8GSIPcJ+uDuXEaD Chl9T+2cZHNz25YXZ/ApKoFGH4WS9ns0B1CgTiI2AEUklQBmX0cqvvz92nKV3bB3jQye jCWzA5q7+Sa1auY8yAltJ4vwZSxFAK1c+v7it7GSl5gF3DBW18lsrH9EoLR654J8+mEC zh9VjCkT1drZlq9KtxLnz0l934Fxb+z40Ca4KrS+KahsIaPBN6o/Klb17KO/oEQkcU2a Uyaof4QkDbbggtMTTldTi58KTWPDkrSBhXoNCy8WHkuJW94oZ9Z+lnIZigiB5eNc4+jb OMWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=QgWx6uBsHMWGCvY5GK3Oe2abtGSea4FH/c0PGLNzD7o=; b=h/1x4+qGIhbIDxMeF82Ff825OfrhbdbWQmFThLcYElzOFOvEzjh6ZsbGl5itUgxQmF P/kNReJoGrpp1/j2BMMptFqKB+/xjkPdc99NbSDpqN5FcKhLCZL6xOub4lp+Wk2dy2tR SCCQ3HWe5IzgU2U/x3ldPak8sR+uQjFqwE+XYbrltGdzN7D7h+cuErDu3dk/hMuMC1pa DrxHI29z2OZZ8VL1EMyEVFdu26QfPCM+Wzyxeao3AdVBDCz1zks2VvHlhLhLXz9BcRVA EOeOOMz/QF2ZOARTr2HuCsC4TUnb/H/l6i77uPtzZ7S65LxGE3b5iU0VxwsOhOvaA40O BWjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HXxuLHfB; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id q30-20020a50aa9e000000b0043b095325cfsor8185517edc.10.2022.07.27.02.37.55 for (Google Transport Security); Wed, 27 Jul 2022 02:37:55 -0700 (PDT) Received-SPF: pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:aa7:db9a:0:b0:43a:76bf:5401 with SMTP id u26-20020aa7db9a000000b0043a76bf5401mr22609508edt.244.1658914675542; Wed, 27 Jul 2022 02:37:55 -0700 (PDT) Received: from panicking.amarulasolutions.com (mob-37-181-33-55.net.vodafone.it. [37.181.33.55]) by smtp.gmail.com with ESMTPSA id q22-20020a17090676d600b006fece722508sm7317678ejn.135.2022.07.27.02.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 02:37:53 -0700 (PDT) From: Michael Trimarchi To: dario.binacchi@amarulasolutions.com, Tommaso Merciai , linux-amarula@amarulasolutions.com Subject: [PATCH 3/7] mtd: nand: Rename nand_get_flash_type() into nand_detect() Date: Wed, 27 Jul 2022 11:37:44 +0200 Message-Id: <20220727093748.1415135-4-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220727093748.1415135-1-michael@amarulasolutions.com> References: <20220727093748.1415135-1-michael@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: michael@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HXxuLHfB; spf=pass (google.com: domain of michael@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=michael@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Upstream linux commit 7bb427990ee364. Rename the function to match this new behavior. Signed-off-by: Michael Trimarchi --- drivers/mtd/nand/raw/mt7621_nand.c | 3 +-- drivers/mtd/nand/raw/mxs_nand_spl.c | 2 +- drivers/mtd/nand/raw/nand_base.c | 11 +++++------ include/linux/mtd/rawnand.h | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/mtd/nand/raw/mt7621_nand.c b/drivers/mtd/nand/raw/mt7621_nand.c index a4a0bce35d..f6eddb84a9 100644 --- a/drivers/mtd/nand/raw/mt7621_nand.c +++ b/drivers/mtd/nand/raw/mt7621_nand.c @@ -1186,8 +1186,7 @@ int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc) int nand_maf_id, nand_dev_id; int ret; - ret = nand_get_flash_type(nand, &nand_maf_id, - &nand_dev_id, NULL); + ret = nand_detect(nand, &nand_maf_id, &nand_dev_id, NULL); if (ret) return ret; diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c index 773d375fc2..4dffa76eaf 100644 --- a/drivers/mtd/nand/raw/mxs_nand_spl.c +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c @@ -83,7 +83,7 @@ static int mxs_flash_full_ident(struct mtd_info *mtd) struct nand_chip *chip = mtd_to_nand(mtd); int ret; - ret = nand_get_flash_type(mtd, chip, &nand_maf_id, &nand_dev_id, NULL); + ret = nand_detect(mtd, chip, &nand_maf_id, &nand_dev_id, NULL); if (ret) { chip->select_chip(mtd, -1); diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index b4fa618dc4..1a1a757932 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4276,8 +4276,8 @@ static const struct nand_manufacturer *nand_get_manufacturer_desc(u8 id) /* * Get the flash and manufacturer id and lookup if the type is supported. */ -int nand_get_flash_type(struct nand_chip *chip, int *maf_id, - int *dev_id, struct nand_flash_dev *type) +int nand_detect(struct nand_chip *chip, int *maf_id, + int *dev_id, struct nand_flash_dev *type) { struct mtd_info *mtd = &chip->mtd; const struct nand_manufacturer *manufacturer_desc; @@ -4461,7 +4461,7 @@ ident_done: mtd->erasesize >> 10, mtd->writesize, mtd->oobsize); return 0; } -EXPORT_SYMBOL(nand_get_flash_type); +EXPORT_SYMBOL(nand_detect); #if CONFIG_IS_ENABLED(OF_CONTROL) @@ -4558,8 +4558,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips, nand_set_defaults(chip, chip->options & NAND_BUSWIDTH_16); /* Read the flash type */ - ret = nand_get_flash_type(chip, &nand_maf_id, - &nand_dev_id, table); + ret = nand_detect(chip, &nand_maf_id, &nand_dev_id, table); if (ret) { if (!(chip->options & NAND_SCAN_SILENT_NODEV)) @@ -4591,7 +4590,7 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips, for (i = 1; i < maxchips; i++) { u8 id[2]; - /* See comment in nand_get_flash_type for reset */ + /* See comment in nand_detect for reset */ nand_reset(chip, i); chip->select_chip(mtd, i); diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 8178f36b49..fb002ae641 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -29,8 +29,8 @@ struct nand_flash_dev; struct device_node; /* Get the flash and manufacturer id and lookup if the type is supported. */ -int nand_get_flash_type(struct nand_chip *chip, int *maf_id, int *dev_id, - struct nand_flash_dev *type); +int nand_detect(struct nand_chip *chip, int *maf_id, int *dev_id, + struct nand_flash_dev *type); /* Scan and identify a NAND device */ int nand_scan(struct mtd_info *mtd, int max_chips);