From patchwork Thu Jul 28 17:17:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2282 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 941923F081 for ; Thu, 28 Jul 2022 19:17:52 +0200 (CEST) Received: by mail-wr1-f71.google.com with SMTP id e3-20020adf9bc3000000b0021e50518071sf588838wrc.2 for ; Thu, 28 Jul 2022 10:17:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659028672; cv=pass; d=google.com; s=arc-20160816; b=IvjIL6nt156+VDj0jCMawDyrCeUi8MBeJ3EZMlz5/N6vEeMrwgtQpLsaDLp3QSasjG JrD0dTzLwD+XVIYguJ6LBfGAER2iDbbt8gk6m52knMK0Y9QcsSiFj6fUpE28Y9REEmSg H7pO9CQFzWO/ysY2saSNlmWE5rCGttuueHAil5dr68V0+xbY3K06qbpDkQyfKE+UTWn7 OUbi6k6k2unzlo+tljHIRaEmqlcaAvs/HT/Lv0EjzeFX1S6CcGEGjlIlHG5b5nI/HOjC COBQLYC15iprXCKFM96eXjYJM5uxGBuwVqyMWg4sEepggaVlbuRbzCC92I9vrnGhCA+r 9SIA== 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:cc:to:from:dkim-signature; bh=2tbxa91Yh0yPwEX15BYzd1dsBsVx02OnGcAhzxd5NOc=; b=Ht9fPbN2jInQ9aNxCKVuznvehWF2t4SuqL4Hlrap80pd2oqr9ROBCX0TAP8v+X5yzp JZ36d9UmJHhkJk4SOJT7N5GRSxwLF0HygcXMhl1+kINr7jiAZYR0bGRdCBSt2VrmDYGx UtNAxRDI5dtukxjvURiXb1CxeGjamgYVS16myg5SG6J0AoaIKYK8Q5SqjeSsGYII5kjK iO44MrPLDT56GKC9eJvfNICuVORPmge8P7aH0o6X9jV0HH+whPDdyrOrlUTZNDfYgqtn zpS94jKFzF/2acbINRppbdZTZqEFDwBUCcYWVvJMKUXmwKANvvr1/w6lsF+MChWIPcXl Nb1g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FUmEvgtR; 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:cc: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=2tbxa91Yh0yPwEX15BYzd1dsBsVx02OnGcAhzxd5NOc=; b=b3s/8OeTZ9DNVi/OEuzJGUqIZnFI+Nthn2sA53IATLVw7QWUAQmaw78up8LCDB8bsI zOLC1Igh11o7I0fHJkqfS1wRdFvFinooxg5OuBBmAZLKN/OxacSNQz3hHijH11CEEf+Q Dqp+VPJYmRAOn3zOCNNzULDI7i4Lk4MrFBzzA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc: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=2tbxa91Yh0yPwEX15BYzd1dsBsVx02OnGcAhzxd5NOc=; b=DhxOVwxhDrUx3PGAS9/vEXY5Jyt5uJ943Z5swHqwVldWg6NuCPvspABzs31kBbYUhM F9oH4dd866aC0KFXdeoFy4MgqLNThoUwURdmHNC1LSFxj89zwmuDb25JWoSq24aNOHOz eFaUD0+YCghhQy66GWP27HlmrLhx8i6PiXHonfRMM45wg89A6fX0t+aFL/wyOScNqEQU aMLY4w3ITwedXScVXGgl9iCFEzsZ0hWUCo3pPZwkCweDg9ILyYHjTEmv4alhz5AvlsbZ mXjMS6oZlEPhHIUBEIWV1yGQMoyL7kVUxwI/nSTuiEuzHIAJtsOn7GD825dwhaMUSN0b hO3Q== X-Gm-Message-State: AJIora8uGYD7no0BkSWxP7OzLMQib+Jdp7KwY9Xvbmjhtx+VAnuC0hOV 1lDbsRUKgnG5GGhoedpLFDd9Rom2 X-Google-Smtp-Source: AGRyM1utfAxx7PyTOQLWoNtVvW7knS3Y9AUa4LqLVVnwwOfpLr/MExHWFHsMEB9rIoPPCe+cUxVHYg== X-Received: by 2002:a5d:674c:0:b0:21e:5135:18cb with SMTP id l12-20020a5d674c000000b0021e513518cbmr18385573wrw.298.1659028672343; Thu, 28 Jul 2022 10:17:52 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:2409:b0:397:d1d5:9b4e with SMTP id 9-20020a05600c240900b00397d1d59b4els838861wmp.3.-pod-control-gmail; Thu, 28 Jul 2022 10:17:51 -0700 (PDT) X-Received: by 2002:a05:600c:5114:b0:3a3:3f7f:27ec with SMTP id o20-20020a05600c511400b003a33f7f27ecmr249654wms.93.1659028670939; Thu, 28 Jul 2022 10:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659028670; cv=none; d=google.com; s=arc-20160816; b=U8aKQGzV8a40wRd3X/uMKWRJumM6sH2qZ0I8xiJ1UiqD6qL5vC1lhHydhD7xEEIh7p NgCHYhCMsaavVrGbpsI0xjw8EfNT7K7wQXDUTuRtAjSXssv/REl1Py0DfUEWRshUgJHn OSdy/TWx4TDXdTs+pgy5xCBrwaP2pOWJRQexwawq08TFvLi85oN7KcEOtMXGROLqa1LM JRncrC45JJAfwOK9veqQVbGD9YJqD5uFXjq2ymH4/N6NFB1ixdMpYzV7+7hjcywUbp6f YXjBPU+161NIlJrfDhpCAOnSWrMvzQYUV3V3ooxtP9LVhxaAQrItLdPRkw+6w9Ru2YWw OmIw== 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:cc:to:from:dkim-signature; bh=tk8uGCl/AQK6CR0J7gwTH8fpzG0EUmFDf2etUFxcmfk=; b=mgpW5VLelg+k/nXroOUUxDloXAl1y5Y7z+E3rSKfPOuQPdY8hNhzVTCXhPVZNO4SUF SJeezHrRai63Oio3Ed9GaA5g2DF677JBMTLl4yvBiFRgzQQgYmLR0mXCXmnQN5DxarxQ bpWLkepnRLtj74YTeUX3Z3eJqi2bTfFaMTsi/bQ7GhgLnskeYoZ2XwjfUdJnkvAGVVHY avtZh/6NLDsPdlmk99scHXfagW9gBKWHZN0oQXsl6vvpky1rAKIkNP5/dOcfz5bXCFYm icPDC093yEGdJRbTOAL9ZvIMZb7gwgwQlndImp9r/B7gDFWrw/jIAe4BLMqGrhGTt45/ vWIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FUmEvgtR; 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 c10-20020a05600c100a00b0039ee95ea2f9sor1465901wmc.31.2022.07.28.10.17.50 for (Google Transport Security); Thu, 28 Jul 2022 10:17:50 -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:a7b:cbd1:0:b0:3a3:187a:296c with SMTP id n17-20020a7bcbd1000000b003a3187a296cmr253382wmi.123.1659028670428; Thu, 28 Jul 2022 10:17:50 -0700 (PDT) Received: from panicking.amarulasolutions.com ([2.196.208.4]) by smtp.gmail.com with ESMTPSA id h3-20020a5d4fc3000000b0021eba590ad1sm1667850wrw.90.2022.07.28.10.17.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 10:17:48 -0700 (PDT) From: Michael Trimarchi To: Dario Binacchi , u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Patrice Chotard , Wolfgang Denk , Simon Glass Subject: [PATCH 1/5] mtd: nand: Rename the nand_manufacturers struct Date: Thu, 28 Jul 2022 19:17:39 +0200 Message-Id: <20220728171744.1761739-2-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220728171744.1761739-1-michael@amarulasolutions.com> References: <20220728171744.1761739-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=FUmEvgtR; 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 8cfb9ab68f9070. Drop the 's' at the end of nand_manufacturers since the struct is actually describing a single manufacturer, not a manufacturer table. Signed-off-by: Michael Trimarchi --- drivers/mtd/nand/raw/nand_base.c | 4 ++-- drivers/mtd/nand/raw/nand_ids.c | 2 +- include/linux/mtd/rawnand.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 4b09a11288..9d8ccfda53 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4261,7 +4261,7 @@ static bool find_full_id_nand(struct mtd_info *mtd, struct nand_chip *chip, * Returns a nand_manufacturer_desc object if the manufacturer is defined * in the NAND manufacturers database, NULL otherwise. */ -static const struct nand_manufacturers *nand_get_manufacturer_desc(u8 id) +static const struct nand_manufacturer *nand_get_manufacturer_desc(u8 id) { int i; @@ -4281,7 +4281,7 @@ struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip, int *maf_id, struct nand_flash_dev *type) { struct mtd_info *mtd = &chip->mtd; - const struct nand_manufacturers *manufacturer_desc; + const struct nand_manufacturer *manufacturer_desc; int busw, ret; u8 *id_data = chip->id.data; diff --git a/drivers/mtd/nand/raw/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c index 4dece1b206..d0cfacc69b 100644 --- a/drivers/mtd/nand/raw/nand_ids.c +++ b/drivers/mtd/nand/raw/nand_ids.c @@ -177,7 +177,7 @@ struct nand_flash_dev nand_flash_ids[] = { }; /* Manufacturer IDs */ -struct nand_manufacturers nand_manuf_ids[] = { +struct nand_manufacturer nand_manuf_ids[] = { {NAND_MFR_TOSHIBA, "Toshiba", &toshiba_nand_manuf_ops}, {NAND_MFR_SAMSUNG, "Samsung", &samsung_nand_manuf_ops}, {NAND_MFR_FUJITSU, "Fujitsu"}, diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index aa45558b3d..8dc2d81dba 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -976,7 +976,7 @@ struct nand_chip { void *priv; struct { - const struct nand_manufacturers *desc; + const struct nand_manufacturer *desc; void *priv; } manufacturer; }; @@ -1124,19 +1124,19 @@ struct nand_flash_dev { }; /** - * struct nand_manufacturers - NAND Flash Manufacturer ID Structure + * struct nand_manufacturer - NAND Flash Manufacturer ID Structure * @name: Manufacturer name * @id: manufacturer ID code of device. * @ops: manufacturer operations */ -struct nand_manufacturers { +struct nand_manufacturer { int id; char *name; const struct nand_manufacturer_ops *ops; }; extern struct nand_flash_dev nand_flash_ids[]; -extern struct nand_manufacturers nand_manuf_ids[]; +extern struct nand_manufacturer nand_manuf_ids[]; extern const struct nand_manufacturer_ops toshiba_nand_manuf_ops; extern const struct nand_manufacturer_ops samsung_nand_manuf_ops; From patchwork Thu Jul 28 17:17:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2283 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E27623F081 for ; Thu, 28 Jul 2022 19:17:54 +0200 (CEST) Received: by mail-wr1-f70.google.com with SMTP id w17-20020adfbad1000000b0021f0acd5398sf508897wrg.1 for ; Thu, 28 Jul 2022 10:17:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659028674; cv=pass; d=google.com; s=arc-20160816; b=P9XltxT0UoK/L/IXid48ppK55PcIRX2Ws/3P/vhG8rEENK95fGyQWCjnMh4T7XpPaq BfGqi5KDZctCX1lnuf56wGRkm7ZtFoVnaqryHpUIAhXY33VOUYzgxdlXP8lb0HFo8eX5 aQGdx7dAHwAORK1QCJMi5emZXXJAUvOXe94n+TAsQFdw5VAenrfNBGlzWbYTA3mmyHBR D2DvNDS/lrfACZv2/xrXPlLeqz7spXdsHce040xu7IBL8UB6mOfoqs4pbwDa5fPQ/X86 Ha0kaq4JIAQhM3mwMtxiDReWcashkdpkXjBUStXpcuFmzd4rQTyqtOGGbWz+rpSIQwPH u3CQ== 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:cc:to:from:dkim-signature; bh=q8Bj5Myt299A2GWCFF9Wv1du+GArgwDxAxI8gz5Cr1s=; b=IGFjOGlVK9drLdzhOQp2DLLPcQHPqu0o4/ybgsnChF+3GDQv0LRQQyXVlBRETGSb3E XSHy8yNweponkJ8uN09B5vJiGwmGIQCuAelvjfclW1GlbrcdzjJGOORUq7BTqcfhj4kA /XBELzx5eWsLO+xaBaCIZLt9if1B+4ouJiiRTVGxJIUTFsA/5QLgkabCbBHB9Mogtr7S 2plOeTCqhnSXntfVcZBkIYd2w5KCDuWdFVQnyxWTXq72qFkBr6XKIIsY/BmHcs8v7v+A G9dXQ0/VlgoTGknAuDxnrTVhWrqZukdeAWXe2horeNnSVYfKvqf3nQ1hCWHZmgjecXBg 7Rjw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OYAjwTyQ; 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:cc: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=q8Bj5Myt299A2GWCFF9Wv1du+GArgwDxAxI8gz5Cr1s=; b=JiX3l7BjqxyCgZFqdrqhGR1d6Shrq+j440e3p4zLb1RQKhu3u6h2HxZzxGCooNkqxj AgmlWTdUJW7mKhhwFr1ri7vTQtWAKuoFC/HaHNr1SNpYoM+sgKeJ2IJlltZs8+f5TQpU Y7CW9F6YERKYyYR+gDs4FH62f9O+QiRScRNgA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc: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=q8Bj5Myt299A2GWCFF9Wv1du+GArgwDxAxI8gz5Cr1s=; b=INwtyd/tGfeSOLeGQhDQovTBArBBelZCHItYMZiOdVyvlCDJapi6lAMaEPTP9dMPC+ QoLQtyd51ZqZxO0jU8fRM99lr+FvBshUNPQbMULZtq/IW+W0G7njB4QxVPkJoPBjE6pB HTrqKKqeXGL44Ne6sKNvuCRxcpHGDoZzbtHGgSS2k0cJtAUtewhOdV8vCMZlf7JZadt7 VNTaSbwenBzAN89ulaq9R3TDkfUuqHYsuPOrj8UXNm6Z/3QxkuHBgSleTPpERf6284Kv IgrjGaMIfoEAzzaF+HehlpM+isteo76wRttw181pynT1NZy3xr8s/SL/KHfWjFDJkq04 r/5g== X-Gm-Message-State: AJIora+X9cT+jJYgxTfiulzyHl5pJjBf53+lc28Owp+81HpdB2e3fqeW z9s6R9oSvSg9YG6uEVJv1HePimiL X-Google-Smtp-Source: AGRyM1sTNk74svUFkG+guNXKkqON+1+uIbTB2qf0Q3j6eYIUKeaz9PjpgjuKWMc6XwRDeR6KizF4eA== X-Received: by 2002:a5d:6d0e:0:b0:21e:fc95:3dfc with SMTP id e14-20020a5d6d0e000000b0021efc953dfcmr2570873wrq.112.1659028674630; Thu, 28 Jul 2022 10:17:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a1c:c902:0:b0:3a3:1227:ad91 with SMTP id f2-20020a1cc902000000b003a31227ad91ls842397wmb.1.-pod-control-gmail; Thu, 28 Jul 2022 10:17:53 -0700 (PDT) X-Received: by 2002:a05:600c:4f06:b0:3a3:2158:c5ed with SMTP id l6-20020a05600c4f0600b003a32158c5edmr256088wmq.103.1659028673279; Thu, 28 Jul 2022 10:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659028673; cv=none; d=google.com; s=arc-20160816; b=U45bENJ8CUm6dAOn8WDD+9IU2viyJFPDuxw/jDB5ubtIT9mpX4JknEtdchHkA87sDN z7w7cujtTia7H2RcgRi2Pni+ubiS0tkIIxNucy/GVv5hAag5IEnOIEFlnTr4MEs3h+BR BeAxL+Ncm9JdLEILNfOSeUOPJHoNzWurhMWoGG1DsjHkOxyBStwUxXNoiqu1DHBOmDEq KSwJe/bF6PHhbJBqsgdniU27QyuBsQATgDxsvvuUVEOU4WGroUtAK/RkvpuUBvf1L6Ym XeHNEbPF9JdL5M4jLSCFLfKQoBircMgwyseoB5NxKGdQbDMgj6x06MLrtiXcGE7AFWHH k9RA== 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:cc:to:from:dkim-signature; bh=MNpcuzewDZbHWetPCMtSq+7NxdT3aCHxDyE39RwXta0=; b=bt6aZonAFCRe5b3PIkUzamhO/SOdfugsUmfjYVjyh8p2TEKhvrfYgoCPzEfzV/3Afq AipmeN8EVyYxFCIq3+rTliYx7ZIXvUFccqXvZgDu5DkjLK3FR96M76b7BWn1OznWNnSS /TqwUlMuXewgDBKY3hWo+8umk/Ij8Z1G4SPSYEbEuEnBg8yOZpKZSavdPw+pHmaCUCC/ PgrgH2iazwwhrr65mSHjwgKT8xFM3zok223h46M3zJ7/SEWUwT28A3f8SgorzrbUk8Cm 13IGh4c3Gg7bTdXyykAWaQalaktqr35v7mScaDkvqYrHPQctyYxiMhlgcEG9N+fy+q+y JXBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OYAjwTyQ; 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 j2-20020a05600c410200b003a2fed12c14sor1408372wmi.25.2022.07.28.10.17.53 for (Google Transport Security); Thu, 28 Jul 2022 10:17:53 -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:a05:600c:5120:b0:3a3:2ae4:fb20 with SMTP id o32-20020a05600c512000b003a32ae4fb20mr251681wms.81.1659028672917; Thu, 28 Jul 2022 10:17:52 -0700 (PDT) Received: from panicking.amarulasolutions.com ([2.196.208.4]) by smtp.gmail.com with ESMTPSA id h3-20020a5d4fc3000000b0021eba590ad1sm1667850wrw.90.2022.07.28.10.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 10:17:52 -0700 (PDT) From: Michael Trimarchi To: Dario Binacchi , u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Weijie Gao , GSS_MTK_Uboot_upstream , Patrice Chotard , Wolfgang Denk , Simon Glass Subject: [PATCH 2/5] mtd: nand: change return type of nand_get_flash_type() to int Date: Thu, 28 Jul 2022 19:17:40 +0200 Message-Id: <20220728171744.1761739-3-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220728171744.1761739-1-michael@amarulasolutions.com> References: <20220728171744.1761739-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=OYAjwTyQ; 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 4722c0e958e636. The returned "type" is never used in nand_scan_ident() and spl code Make nand_get_flash_type() simply return an integer value in order to avoid unnecessary ERR_PTR/PTR_ERR dance. Signed-off-by: Michael Trimarchi --- drivers/mtd/nand/raw/mt7621_nand.c | 10 +++++----- drivers/mtd/nand/raw/mxs_nand_spl.c | 8 ++++---- drivers/mtd/nand/raw/nand_base.c | 28 +++++++++++++--------------- include/linux/mtd/rawnand.h | 5 ++--- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/drivers/mtd/nand/raw/mt7621_nand.c b/drivers/mtd/nand/raw/mt7621_nand.c index 9763ae6dc5..a4a0bce35d 100644 --- a/drivers/mtd/nand/raw/mt7621_nand.c +++ b/drivers/mtd/nand/raw/mt7621_nand.c @@ -1184,13 +1184,13 @@ int mt7621_nfc_spl_post_init(struct mt7621_nfc *nfc) { struct nand_chip *nand = &nfc->nand; int nand_maf_id, nand_dev_id; - struct nand_flash_dev *type; + int ret; - type = nand_get_flash_type(nand, &nand_maf_id, - &nand_dev_id, NULL); + ret = nand_get_flash_type(nand, &nand_maf_id, + &nand_dev_id, NULL); - if (IS_ERR(type)) - return PTR_ERR(type); + if (ret) + return ret; nand->numchips = 1; nand->mtd.size = nand->chipsize; diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c index 3daacbb330..773d375fc2 100644 --- a/drivers/mtd/nand/raw/mxs_nand_spl.c +++ b/drivers/mtd/nand/raw/mxs_nand_spl.c @@ -81,13 +81,13 @@ static int mxs_flash_full_ident(struct mtd_info *mtd) { int nand_maf_id, nand_dev_id; struct nand_chip *chip = mtd_to_nand(mtd); - struct nand_flash_dev *type; + int ret; - type = nand_get_flash_type(mtd, chip, &nand_maf_id, &nand_dev_id, NULL); + ret = nand_get_flash_type(mtd, chip, &nand_maf_id, &nand_dev_id, NULL); - if (IS_ERR(type)) { + if (ret) { chip->select_chip(mtd, -1); - return PTR_ERR(type); + return ret; } return 0; diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 9d8ccfda53..b4fa618dc4 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -4276,9 +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. */ -struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip, int *maf_id, - int *dev_id, - struct nand_flash_dev *type) +int nand_get_flash_type(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; @@ -4291,7 +4290,7 @@ struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip, int *maf_id, */ ret = nand_reset(chip, 0); if (ret) - return ERR_PTR(ret); + return ret; /* Select the device */ chip->select_chip(mtd, 0); @@ -4299,7 +4298,7 @@ struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip, int *maf_id, /* Send the command for reading device ID */ ret = nand_readid_op(chip, 0, id_data, 2); if (ret) - return ERR_PTR(ret); + return ret; /* Read manufacturer and device IDs */ *maf_id = id_data[0]; @@ -4315,12 +4314,12 @@ struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip, int *maf_id, /* Read entire ID string */ ret = nand_readid_op(chip, 0, id_data, 8); if (ret) - return ERR_PTR(ret); + return ret; if (id_data[0] != *maf_id || id_data[1] != *dev_id) { pr_info("second ID read did not match %02x,%02x against %02x,%02x\n", *maf_id, *dev_id, id_data[0], id_data[1]); - return ERR_PTR(-ENODEV); + return -ENODEV; } chip->id.len = nand_id_len(id_data, ARRAY_SIZE(chip->id.data)); @@ -4368,7 +4367,7 @@ struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip, int *maf_id, } if (!type->name) - return ERR_PTR(-ENODEV); + return -ENODEV; if (!mtd->name) mtd->name = type->name; @@ -4401,7 +4400,7 @@ ident_done: pr_warn("bus width %d instead %d bit\n", (chip->options & NAND_BUSWIDTH_16) ? 16 : 8, busw ? 16 : 8); - return ERR_PTR(-EINVAL); + return -EINVAL; } nand_decode_bbm_options(mtd, chip); @@ -4432,7 +4431,7 @@ ident_done: ret = nand_manufacturer_init(chip); if (ret) - return ERR_PTR(ret); + return ret; pr_info("device found, Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n", *maf_id, *dev_id); @@ -4460,7 +4459,7 @@ ident_done: pr_info("%d MiB, %s, erase size: %d KiB, page size: %d, OOB size: %d\n", (int)(chip->chipsize >> 20), nand_is_slc(chip) ? "SLC" : "MLC", mtd->erasesize >> 10, mtd->writesize, mtd->oobsize); - return type; + return 0; } EXPORT_SYMBOL(nand_get_flash_type); @@ -4547,7 +4546,6 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips, { int i, nand_maf_id, nand_dev_id; struct nand_chip *chip = mtd_to_nand(mtd); - struct nand_flash_dev *type; int ret; if (ofnode_valid(chip->flash_node)) { @@ -4560,14 +4558,14 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips, nand_set_defaults(chip, chip->options & NAND_BUSWIDTH_16); /* Read the flash type */ - type = nand_get_flash_type(chip, &nand_maf_id, + ret = nand_get_flash_type(chip, &nand_maf_id, &nand_dev_id, table); - if (IS_ERR(type)) { + if (ret) { if (!(chip->options & NAND_SCAN_SILENT_NODEV)) pr_warn("No NAND device found\n"); chip->select_chip(mtd, -1); - return PTR_ERR(type); + return ret; } /* Initialize the ->data_interface field. */ diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 8dc2d81dba..8178f36b49 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -29,9 +29,8 @@ struct nand_flash_dev; struct device_node; /* Get the flash and manufacturer id and lookup if the type is supported. */ -struct nand_flash_dev *nand_get_flash_type(struct nand_chip *chip, - int *maf_id, int *dev_id, - struct nand_flash_dev *type); +int nand_get_flash_type(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); From patchwork Thu Jul 28 17:17:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2284 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id BE3763F081 for ; Thu, 28 Jul 2022 19:17:57 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id u17-20020adfa191000000b0021ed2209fccsf588845wru.16 for ; Thu, 28 Jul 2022 10:17:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659028677; cv=pass; d=google.com; s=arc-20160816; b=Nifj3JyrcGGj6T28RHCgX3B4srfWJNaUoZC7SVqZeZEdPrQPlPHvlEhbFG6WB7ILIn vknlYBd7DtUdfO77vlmiPhxKoUhPNKc1Dq2VULrJjajG47oJtusvJEvkdlWtwXrbiVMk 88xt/TaN70YYTdjkpBoPlECa9Mr0NTYEUAd7EmYyEyEY1w7RqRhVJPSOqSPW3NKDR78r O9Y3G9wcq+S3Xi0AaTPvjQ4mSDpGbd3qPeuqfUOEDBxHfxRZGlqvTH8X6jd1J27qXTiD 0Vbw58Cx13Up/D3fF6LY6bn68gcenCLpyKUw6IP07WRaV3G3nNe0L9sXAYsHKcAKmOi7 2Epg== 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:cc:to:from:dkim-signature; bh=XfiYpw742R99I+sR6kCX8V3TL5nZt8MlhBdcN1C40pc=; b=ehU4yUMPyHWJ/Wn7yJUiMBLIDaQ2jhng8SeqkLc4olrFxk2yPJJoaNi3V5un+iGmbm dpXSDT2FzSMEjYaPj71EIFxscQXwZZPEg8P8as2jv3kCJKGdhGGTtqFzg5OSeD+ZTWyr Mxy3ch0CFepkeGpueAnUiBP54hBYGa3529KNCCKxW5gs3GytlK0tTw8nFJ0JYxaWxw+H 2tqoELpfEmQml2V/OJPxmjHyVlih5OzO6e5WUVLe8k4Kc4wpoxAv3p2d3hqIh5GTFW+E 0orQdXSjBc+4RqFv1f3SGoy9VL9aDLkUr4u6tJLWqm9o45EHZJqh76Lol2ofjq/8UklR E4mg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JR84fN0P; 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:cc: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=XfiYpw742R99I+sR6kCX8V3TL5nZt8MlhBdcN1C40pc=; b=cnfa/Q4IV0o74GCsipLmuvjlLJ+FwYa2RseMq7U06OEfY3bOXWzmbXPjN02fN24MdF DB1Ci60moPPBk+R4a+bLMEKdzIcX5FHV2ToRStnJI44wsWLxkhJlDeVafvsWG42YLqXU GO6OW0ahQMnwsyEqcel3/E0tnjLnLBNSsPGP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc: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=XfiYpw742R99I+sR6kCX8V3TL5nZt8MlhBdcN1C40pc=; b=fa8C4ZjbPoRS+tKcfmjLEY9NNu7H0isokvpcIVq9zVhmNhL7Uk8z0a3M3HNGcRZYSW KhAL+QqjMKc9nLtpTglwvtiM17yIZL9plCz68Z03nxoQEZVdySUkJVNBVSZo5fPmlAAc CM+iT7HH6fp7UqoafYViN3EiGJlt6CVt6Vm89u0P7uY9Y336oMy/O8LKQT4CjWKHPq0C qdVlXeRUIY64PQBvbJaAOhUKfg+lpQHw7C8SIAPJt0eGCDsmGK7zuXgchmpq/8ZM5IO6 Nn3O2XzjLUP2xxudLXxSxK7l6MgiVY0+jLy5OYG62lEfbYZrtET4iTfhoADGhyLYfI+N UWXg== X-Gm-Message-State: AJIora+g34CCyl8z71jXBgu0dYr1PsO/G5zsBxKF9ZOMSoqcXlKB8j/t oBMj8N8RPibrjGBZRp7OdhXCidl1 X-Google-Smtp-Source: AGRyM1sUIwsGwaAL81IpSEnKISHhHBHPbP1gxUL0qYEe3cmvLjPIQOat+KNn6xvUt+6gbre76pUXVg== X-Received: by 2002:adf:d1e8:0:b0:21d:ac9c:983d with SMTP id g8-20020adfd1e8000000b0021dac9c983dmr17842339wrd.629.1659028677530; Thu, 28 Jul 2022 10:17:57 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:d216:0:b0:21e:e644:c8 with SMTP id j22-20020adfd216000000b0021ee64400c8ls2530232wrh.3.-pod-prod-gmail; Thu, 28 Jul 2022 10:17:56 -0700 (PDT) X-Received: by 2002:a5d:5983:0:b0:21d:a811:3b41 with SMTP id n3-20020a5d5983000000b0021da8113b41mr17264717wri.441.1659028676233; Thu, 28 Jul 2022 10:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659028676; cv=none; d=google.com; s=arc-20160816; b=iaDNThAizT0QG0izRFHLreacv+m09cNsQ9GRLJMqwM2yIcOBPwLG/qARgDFjOuFJAK 5oRlzqkBmXYhMVI07SpLmUjtp/6BQ5zrE53cNoPcZwnT+C1HcabTbACHTfEHLTcC+jP4 Gt9kThvPqel7HkIwUiRoNbMtVjNXqwkrIhENVUbOkQ4D2CAmAJbFMJo/wpj+qr1DIE0H ynYp3Y6G/2q684ERKljdbBvSjPZkrdSWkjlirdqtEBTE+khqazDzAjMzVyQOEYgps0MH LIZ2o8Th7Z6Bp2mGO74qESBWE09l1IXvxcNSma2Y+GcFE8VVUj9NdaYgzUSs5pn2Y4dN 5lDg== 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:cc:to:from:dkim-signature; bh=CI0oQyRsfK2N+rtSL2jBaNF2DJpRRtmM1V8IJkNG9no=; b=fTRZ3myUW3KkmcC03lN7u1AHUd9x7zgODTjiWVZ/eyaAHMBb81UZMw/p5+NGSjq1wI fw/IakEd2FL46g7pcVWLbYNJ+xoQ39S1IKX+yJs/ntq6REERh4yw4wr2EjB9bqTUGCzd xdKWn01431+4d5bLzwVBvv4Ka1KtVsa0X+nd3YwudkJRx5gYkHQ/Xwl4a8CxPi+lC58g 9xxOf1endDIMaCeZw0VlKRHzjJlQO5CMyum4KwefzctrXr9i30N59ifpyEYnQ1Y8Z6Wz 4R+amQk01Air0pwnBES33qORAjGjqoEMQAPAw4oOCgGKAiT/vX/2VuD5SWcxkLeNs3ap 6RNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JR84fN0P; 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 e4-20020adfc844000000b0021b8bba9110sor740883wrh.71.2022.07.28.10.17.56 for (Google Transport Security); Thu, 28 Jul 2022 10:17:56 -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:adf:fe42:0:b0:21f:8df:2239 with SMTP id m2-20020adffe42000000b0021f08df2239mr1951068wrs.644.1659028675672; Thu, 28 Jul 2022 10:17:55 -0700 (PDT) Received: from panicking.amarulasolutions.com ([2.196.208.4]) by smtp.gmail.com with ESMTPSA id h3-20020a5d4fc3000000b0021eba590ad1sm1667850wrw.90.2022.07.28.10.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 10:17:54 -0700 (PDT) From: Michael Trimarchi To: Dario Binacchi , u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Weijie Gao , GSS_MTK_Uboot_upstream , Patrice Chotard , Wolfgang Denk , Simon Glass Subject: [PATCH 3/5] mtd: nand: Rename nand_get_flash_type() into nand_detect() Date: Thu, 28 Jul 2022 19:17:41 +0200 Message-Id: <20220728171744.1761739-4-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220728171744.1761739-1-michael@amarulasolutions.com> References: <20220728171744.1761739-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=JR84fN0P; 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. NOTE: fix nand_detect/nand_get_flash_type parameters in mxs_nand_spl. This code seems never executed by any board as alternative for nand detect 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..ef03b7789d 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(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); From patchwork Thu Jul 28 17:17:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2285 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CC9413F081 for ; Thu, 28 Jul 2022 19:18:00 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id 189-20020a1c02c6000000b003a2d01897e4sf1173351wmc.9 for ; Thu, 28 Jul 2022 10:18:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659028680; cv=pass; d=google.com; s=arc-20160816; b=eL7JCbmaEJ4PW682f8Ids/VizWmFMFzz/ezNm0RzwwEEwIe7flF2JQZh/p1s3ti4Hn UeTmPouGkBF2ACFNhGUZC/BbwJgps8EVsn5cJ9h4pbkDv4AfMclGy5werJBSk+93jf1q MVd0j5BIoiXruLJse6LKv2nRahSIu271mEgauut7E3XoKU7uEeV+XooD3UpjKoCSTefZ yHA0MLUtVDgAwrLVg+nLWRszn4P9cx9oa5GB2+gJr8Jnn3vU3YtlHfaWHqvbaUNAwnle kBXMMFCgqQxdb1c2VBE2/RJGE8CaxyKB4E4F9YJesL5m/ARnJOQHZ0byB3CnYfAuSKHk 3Ojw== 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:cc:to:from:dkim-signature; bh=5ddosn4/bJZT7jBt2EfL5ixz/9xuydVCf9J/kAMK6ac=; b=GFPPaokm74nA+m+ez2gkqEJ8H2pb9tVln9glnWq0FINdpEmJSooUJQo9qXI9jgSLfU vPW+X6un6wlbM98PiwZxlxt/PbCu7OTW4e2R58ApWdh0Xx8Vk866zWi9uY31PfGCSi9O gvl7DPVWi/3JsxThxdT1aFSlhZ062ZahNjoGUhPJSFYtLkholYDojzoD5vlhxUPkNyjQ ILd3MHFhglZz9dtDm4WfQrkuqvJY41EQ44CQ9lCRvbVk7KYnV0vQ/jnIGFeQoFhvVDvN TB0Gb8lnSd0Hzz+OpOi5aA4e+jhtt3KtVetz2QGMrqX1H5kEO6iS4g0gfnzFTG3uIiZC LY9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kber122+; 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:cc: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=5ddosn4/bJZT7jBt2EfL5ixz/9xuydVCf9J/kAMK6ac=; b=UxpdsVFU09E4evWqfRlwLruKGmhzQxEQuMyIjoeMGyufurKkwC1+DFVNTr8vuSvxfJ 8U7mR50nvgU+FX+udMc4eMvZlsfvlM24W89YBBmgu6tzqtaqRDTrtSSe3w3KuXRCSr2t XJ/5H2W5dhYxj+hWtCO3qRY/MeVrWCZPU7vGM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc: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=5ddosn4/bJZT7jBt2EfL5ixz/9xuydVCf9J/kAMK6ac=; b=DMN+Y9fT9XU0TsGf8WpSQkfU1EVUPRPeQMf075DusYaOZC4uNpnqyd+rosZqKcC5rs 1svoaBvblvQjqDdz0Y/t/1GZsZ6WzHhd18/ZRck51pTfaZmI4piBuDdDP0QyQUXvFLRx CHefR4bQu7CzEEm9/v8DXJD+uQrVS46IamZSrCcSuSJy0l+CDhqXNZxW42rYbOs3oE8P 76rKYrw/J2WiuyneOlje9cmf2WTytt48oQkcpAApLngwxn9LjCRaJnzKbJqsQxjqbvuN xnCCV9ZXxAz3x+RbYKLoF1GzvK7oRRl0YtenF9m510uMwqj29WHXLhApcaXhSb9g6GQ0 GlTg== X-Gm-Message-State: AJIora9CXjTIG36ZYfsvjeE/lXOhahaga2BnLFyPTnh+TqIIh1gXDMwN lTuvlWFbHdn3ZnOEyUWUA4cTRXl7 X-Google-Smtp-Source: AGRyM1v2zExPB817tkRoOFjCXw/Ty4jJSYSzSjhgbr4xmMQWSwQwnAjitfGriXysrWADmCPGXhYE4w== X-Received: by 2002:a5d:620b:0:b0:21e:5b97:c826 with SMTP id y11-20020a5d620b000000b0021e5b97c826mr17212612wru.600.1659028680383; Thu, 28 Jul 2022 10:18:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:e18b:0:b0:21d:9636:a730 with SMTP id az11-20020adfe18b000000b0021d9636a730ls2531255wrb.0.-pod-prod-gmail; Thu, 28 Jul 2022 10:17:59 -0700 (PDT) X-Received: by 2002:adf:e19b:0:b0:21e:4bb9:9a14 with SMTP id az27-20020adfe19b000000b0021e4bb99a14mr18315874wrb.354.1659028679027; Thu, 28 Jul 2022 10:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659028679; cv=none; d=google.com; s=arc-20160816; b=wlp/TjvwoRVjI5DI/RaWa2wvbdXzkkMfZdkGsJz57rqbq0c7cFKkhbEYMmwT/71IY6 QwlK9K7+swwJAXVFf5RPNRIHMbp1713wtG0c4z7P00tFrefbmQbbjhX5yEg123hgYwn5 r3lKy93x7VLINCdXuydqXvoiFayWUW1IJAgl7KtwNvNNqO8MIZ4onAn2xAcl1qnXlryX wXCIIDS/YyX4fBZCx8jhWqfN35bStbI3KOw8q0vVJYlKEao6EUj4ew2+t1LqDlT5o4xq vmJA7jTLmoruIAENRO3/PErofuZ+r8hjOh7PfiAZrHLnLe7J3FJzDQyej5ILulJCtZHK ENrw== 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:cc:to:from:dkim-signature; bh=+Kmdd9fm+cOxM+5ZJRvmWU6Fbc3fNB7QutxwJjisqyQ=; b=nFLgrThQj3ePH7F9rr22i2AnAvgh5bYAAY4ZfAEo0mL3e9uy/qOqrMHJwhHncnbr5a 9TbN0UATGtbLTr78gc2hB6COF+l9A+U4Hk0ZXcOx1Bh2aYFWE5LTrIAYL0lqMF4Mh59e DFDsGphy4dV9GZA5EYzUU9FMqxlgcgkI2WtrmY7oY6NlWDhkfQr/AyVcfb/5g6pii2Vo bk3C+oVVJjB2dd3Wo03Zae3MMTh9gvX9uF3KQzNn5hwDDMTBdHUqCFExfuvvn1Jit27B lysNFRBHB7f0oNOD8aNNeASiBa5LmzCF2PDLCdVn5LcEGcbHI5QS7nF/jiSR4xkv1l+t pYEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kber122+; 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 f20-20020adfc994000000b0021d6be62c2dsor799904wrh.53.2022.07.28.10.17.59 for (Google Transport Security); Thu, 28 Jul 2022 10:17:59 -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:adf:f911:0:b0:21e:c0f6:fd26 with SMTP id b17-20020adff911000000b0021ec0f6fd26mr6870960wrr.361.1659028678724; Thu, 28 Jul 2022 10:17:58 -0700 (PDT) Received: from panicking.amarulasolutions.com ([2.196.208.4]) by smtp.gmail.com with ESMTPSA id h3-20020a5d4fc3000000b0021eba590ad1sm1667850wrw.90.2022.07.28.10.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 10:17:56 -0700 (PDT) From: Michael Trimarchi To: Dario Binacchi , u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai Subject: [PATCH 4/5] mtd: nand: samsung: Retrieve ECC requirements from extended Date: Thu, 28 Jul 2022 19:17:42 +0200 Message-Id: <20220728171744.1761739-5-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220728171744.1761739-1-michael@amarulasolutions.com> References: <20220728171744.1761739-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=kber122+; 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 8fc82d456e40a0. On some nand controllers with hw-ecc the controller code wants to know the ecc strength and size and having these as 0, 0 is not accepted. Specifying these in devicetree is possible but undesirable as the nand may be different in different production runs of the same board, so it is better to get this info from the nand id where possible. This commit adds code to read the ecc strength and size from the nand for Samsung extended-id nands. This code is based on the info for the 5th id byte in the datasheets for the following Samsung nands: K9GAG08U0E, K9GAG08U0F, K9GAG08X0D, K9GBG08U0A, K9GBG08U0B. These all use these bits in the exact same way. Signed-off-by: Michael Trimarchi --- drivers/mtd/nand/raw/nand_samsung.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_samsung.c b/drivers/mtd/nand/raw/nand_samsung.c index 0ab8062193..36ef48e5ec 100644 --- a/drivers/mtd/nand/raw/nand_samsung.c +++ b/drivers/mtd/nand/raw/nand_samsung.c @@ -64,6 +64,26 @@ static void samsung_nand_decode_id(struct nand_chip *chip) extid >>= 2; mtd->erasesize = (128 * 1024) << (((extid >> 1) & 0x04) | (extid & 0x03)); + + /* Extract ECC requirements from 5th id byte*/ + extid = (chip->id.data[4] >> 4) & 0x07; + if (extid < 5) { + chip->ecc_step_ds = 512; + chip->ecc_strength_ds = 1 << extid; + } else { + chip->ecc_step_ds = 1024; + switch (extid) { + case 5: + chip->ecc_strength_ds = 24; + break; + case 6: + chip->ecc_strength_ds = 40; + break; + case 7: + chip->ecc_strength_ds = 60; + break; + } + } } else { nand_decode_ext_id(chip); } From patchwork Thu Jul 28 17:17:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Trimarchi X-Patchwork-Id: 2286 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4C0583F081 for ; Thu, 28 Jul 2022 19:18:02 +0200 (CEST) Received: by mail-wr1-f70.google.com with SMTP id n7-20020adf8b07000000b0021e577a8784sf589893wra.5 for ; Thu, 28 Jul 2022 10:18:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659028682; cv=pass; d=google.com; s=arc-20160816; b=MKejYFUwiFAgIJyUWS/y2GnHyGCRSHzIO8SE+earWMsxpJTJz7TodLWemzL7QOAsNA djI5R4Os/zlA/W+xzMUKwPJ9ccQTNoywEkHRjTlmNLGM9h4INf523p//k09RAxcn893i Qv5CRRaE1bYVMaXgkQ+TGiJS5GwC9JVB0CWv/fS10sG81Gaqmpv9J3tyLTsYFr5AUA1u hQtzaNbw+A1NqTo1CWMvTGxPSxhEYtPQtsUzkfUxMAvXjj5osP5whJHp1WGWoajHitF0 dokhTbZD3uApIsQJ1HBHlHOOlO+Vre7GM9QI2ttl5N69U68gmA3qt4/NFwVdLwXgKLdE EHqw== 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:cc:to:from:dkim-signature; bh=EPJ8oqk0BlOZjKI1210gXsygDx3UhH93TOsOmD6uxyw=; b=V22JJGqI83PhwqbUuos61puwyYXq1EgIOC8LHjda4dsNORX3XoFDFYYbSHUb1iBSw+ BU1XIy6h49HbNNS8UikN5uYJlYVzwVBOetxxHnidTpmTPoY08Q3k/jQIY2Kl9mCZAh1j 53IHPImnS7fEriHwnFDKi53JhQM9Kirl9fE1awgVpkPiCv+Gm40+DJGgBjxOEu629zVU WbHQ5wsVT7CBBi8M7ZUeMGDeSM0Z0Yx3ClAjILYUVgt/fC9sfbgjIAGIV/5lhE/0908h hHrozvktaxUSZGhPbm578uTzRehA4arWIZTU4V9Am+RhTMX1RFEqFWNdAO8pIadpjmM4 UJOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RD0Oira5; 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:cc: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=EPJ8oqk0BlOZjKI1210gXsygDx3UhH93TOsOmD6uxyw=; b=JOTa2+SsY1xF4832tUMgW4A2zmEQpUWHZdWix8nAkUgRAHS9dkswsW5Reay4FYkZDq 6PumMsH+SvF3+V1y8DnQu9O2r5SfIxb9Yvql8Ezm0lDkAUVVQDGGlC6SSFvO453GL9qY w5ptiuJVyGHOu/FWp0FSIrUTSOKGAMICGtfNQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc: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=EPJ8oqk0BlOZjKI1210gXsygDx3UhH93TOsOmD6uxyw=; b=g7nDTZfezo6WYCyEMh7waYNQpalEiJ4/IgBkGteJtsgdQZ6PLGqoFNFtZ0tjyvnDpU hg/dcMxFSn9sEZZI+4Q3Wac5bHkJ6nou91THvvWdweXiGaGMOKY2V62aMMxci2wlcr9r YkozTZtCQVHYIAGpJJ/ojar377ftrXdN3EdsaN25uRJuMf5DYXjZylzqarVMbB2bXScD CqSapUPR18qEN1wdBO/0lTGdxr3dA8RbhyZfVDZxdnyek7vL0z8dQxpYA0LbUJt43LEW TBpI+KYvNKBdJGQG8W5CCQ56Kl/QNAL9/LSZqxVi+Wwf9LZ+PAV4CXMqwZbmlzfvsN4S QTCA== X-Gm-Message-State: AJIora8V8ebLJEJ27xTHzVmrbnKSozkqx7Z4n8+Fx+t/8gQkpmCDw17C hvWHHcdks0p+bxftF08EVSEyolv5 X-Google-Smtp-Source: AGRyM1s/gcCCMmL/Xn5hnpyhEUF5etM+u+QvIAHZ70YX6yO64gKB5sO9erFtE43z8dNxlf/CYTmF0Q== X-Received: by 2002:a05:6000:1a8e:b0:21d:a7a8:54f4 with SMTP id f14-20020a0560001a8e00b0021da7a854f4mr18232524wry.654.1659028682086; Thu, 28 Jul 2022 10:18:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a7b:c318:0:b0:3a3:10d7:a7a7 with SMTP id k24-20020a7bc318000000b003a310d7a7a7ls850032wmj.0.-pod-control-gmail; Thu, 28 Jul 2022 10:18:01 -0700 (PDT) X-Received: by 2002:a05:600c:3ac6:b0:3a3:4178:a9a8 with SMTP id d6-20020a05600c3ac600b003a34178a9a8mr295687wms.22.1659028680800; Thu, 28 Jul 2022 10:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659028680; cv=none; d=google.com; s=arc-20160816; b=BVKqkPSzNXgodWqxI1n41DU6VhJTZFzZn0+QfmwWkvD4rpvEIMH5VjgcXVY5Nh98TU sZqaiqIfBMq3gLpBA0t+LzXNG8DezyOS2Zu2P1tsgSLJsICi7OZHvhv1yZQM5I1N779f uG90oCiXYYD9rXa9ZRM3A36HqjKpwwefeJ/eSFWyvuWdsKyBe1luWo2wpPlLIDXYXPqz iX8m8QmoT8OuNF8kscYA4aWXLsTp0iNmFqQEfHHLRXln8KRBQufdb85ubWa2NYAZhpMG nDMc+wbJ8HUnuhaTBBrL1Uu/54qYl1oUnN/OJVyeebBkZVAmUlxI0Z/rpKC/Ajf3nCdf nC4g== 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:cc:to:from:dkim-signature; bh=5zz3VsKxjxiLvhoGu0wTUA1Sq/jIA0muyXUP/Rt0Flo=; b=zrXSL2CtM+C1FuOg2skfYEjTugC95D0xGLz0isev8BmnyBoEkcdH683QXFBjN9Cqsi vkvRnaDuGnQIYn1uAEGNPAsan2x0AsqCd/nxJzN/lj+wGLE5Wi7TZMIuFkq+euqlxXIV 5dPZHzao6JngsQG6DiXQs0hsPQ9OViUi5epGt+q06Vnf2udx66o8WT5ax5kPLOh+mOMQ 2LkagqauViwxbHMO4lg9r4qqYLlHuBFot47bCG/EJJqdS9CV2cp3q0ntF/FEgXJ13o8R 5YfGmea3Hnr2nej7ensrLVgmT61nei4KOBWYcqOJVIubjcRQG3A1pb1CD/uYqsrp6aLW gESA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RD0Oira5; 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 q10-20020a05600c030a00b003a3215d4ec4sor1460352wmd.37.2022.07.28.10.18.00 for (Google Transport Security); Thu, 28 Jul 2022 10:18:00 -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:a7b:cb53:0:b0:3a2:f19e:b764 with SMTP id v19-20020a7bcb53000000b003a2f19eb764mr246813wmj.101.1659028680423; Thu, 28 Jul 2022 10:18:00 -0700 (PDT) Received: from panicking.amarulasolutions.com ([2.196.208.4]) by smtp.gmail.com with ESMTPSA id h3-20020a5d4fc3000000b0021eba590ad1sm1667850wrw.90.2022.07.28.10.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 10:17:59 -0700 (PDT) From: Michael Trimarchi To: Dario Binacchi , u-boot@lists.denx.de Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , "Ariel D'Alessandro" Subject: [PATCH 5/5] configs: imx8mn_bsh_smm_s2: Use nand_base ident for nand identification Date: Thu, 28 Jul 2022 19:17:43 +0200 Message-Id: <20220728171744.1761739-6-michael@amarulasolutions.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220728171744.1761739-1-michael@amarulasolutions.com> References: <20220728171744.1761739-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=RD0Oira5; 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: , The board can mount different nand brand type. Try to use the full scan detection and not the onfi one Signed-off-by: Michael Trimarchi --- configs/imx8mn_bsh_smm_s2_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/imx8mn_bsh_smm_s2_defconfig b/configs/imx8mn_bsh_smm_s2_defconfig index 79995591f2..139cf0392b 100644 --- a/configs/imx8mn_bsh_smm_s2_defconfig +++ b/configs/imx8mn_bsh_smm_s2_defconfig @@ -44,6 +44,8 @@ CONFIG_SPL_DMA=y CONFIG_SPL_I2C=y CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_NAND_SUPPORT=y +CONFIG_SPL_NAND_BASE=y +CONFIG_SPL_NAND_IDENT=y CONFIG_SPL_POWER=y CONFIG_SPL_WATCHDOG=y CONFIG_SYS_PROMPT="> "