Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4129196imm; Sat, 21 Jul 2018 10:49:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcSCEBvPnbBY9pkIodlS7C4H6t6S4pg4T8j9IaqrRre/y/ccKrsz8G1S/oZJ+hHSbkx5uSf X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr6625454plx.318.1532195388884; Sat, 21 Jul 2018 10:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532195388; cv=none; d=google.com; s=arc-20160816; b=deSEaIlHmuBFkhCNuOAq2jcI8BZkte6BKEvQ9pUbJaPzT+cMw3mnLzGSI1gCdBhTnv GSyssemWHRbIG7chclT1U1VCSfDT9cBI8CrM0GhkqcSUmH8yebQn4F2topg5CNj/t5vG EcLbRVWFzye5V/aeizjbnYgS4PF2w7ldq8uSNcuINsarZa4AIVxadDQM+9DTykLPbJk5 ic6xWtJ36ul+ajQvgsrr7kYXX9aOsfvj3gTAFGP2GOQA8wkmBXrXoz978SqQ3i4evCFP b+o5jDndCvbGfLtphTuakfEIJTIUAsoo0wEORgsk7tE03aQPDU4dVTFHtsuPIlGW+WBQ 3kEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=I5RAo2poRBn7qpQjN9kZk3sbjKtc4Fp4NbC3CNjV7rw=; b=sqCJNuAlqBLzB23DiaVWhhIkb1t2NTrKkM38M8BEHRA+7gK1Y2oOaUgnLtTfXpQ5yI vDmSfMDXnfG3OSgZQPuOG9qFtaxeLs7M9qkmJ0YwxUFTbg/e/hoWZSufUNUGtAeMSQ1h 9HB4uVNS/VIyPlfEwlugEC0qosD5237aHcweOxPBvExTLNfogDZA5c50O8KFs2XsX1zm OKfTumFmFCdSZq8V47p4KROhtAH6+y8oD7f+5Xv9XpEpu2QvLrldankO7IH/sw5OQ0v1 7sIJOa/v4aSZrtpL1vWw1niIVpQGZejTPD1cvmXPIDj3xUpKimf10n6jkyG5dGsD0jl5 CNJg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si3985420plk.225.2018.07.21.10.49.34; Sat, 21 Jul 2018 10:49:48 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728241AbeGUSmS (ORCPT + 99 others); Sat, 21 Jul 2018 14:42:18 -0400 Received: from mail.bootlin.com ([62.4.15.54]:49984 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728011AbeGUSmR (ORCPT ); Sat, 21 Jul 2018 14:42:17 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id EA21B20737; Sat, 21 Jul 2018 19:48:44 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [37.173.79.60]) by mail.bootlin.com (Postfix) with ESMTPSA id 32D2D206F3; Sat, 21 Jul 2018 19:48:32 +0200 (CEST) Date: Sat, 21 Jul 2018 19:48:29 +0200 From: Boris Brezillon To: Miquel Raynal Cc: Wenyou Yang , Josh Wu , Tudor Ambarus , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Nicolas Ferre , Alexandre Belloni , Kamal Dasu , Masahiro Yamada , Han Xu , Harvey Hunt , Vladimir Zapolskiy , Sylvain Lemieux , Xiaolei Li , Matthias Brugger , Maxime Ripard , Chen-Yu Tsai , Marc Gonzalez , Mans Rullgard , Stefan Agner , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v4 19/35] mtd: rawnand: sh_flctl: move all NAND chip related setup in one function Message-ID: <20180721194829.44e9b29f@bbrezillon> In-Reply-To: <20180720151527.16038-20-miquel.raynal@bootlin.com> References: <20180720151527.16038-1-miquel.raynal@bootlin.com> <20180720151527.16038-20-miquel.raynal@bootlin.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Jul 2018 17:15:11 +0200 Miquel Raynal wrote: > @@ -1007,6 +1007,16 @@ static int flctl_chip_init_tail(struct mtd_info *mtd) > struct sh_flctl *flctl = mtd_to_flctl(mtd); > struct nand_chip *chip = &flctl->chip; > > + if (chip->options & NAND_BUSWIDTH_16) { > + /* > + * NAND_BUSWIDTH_16 may have been set by nand_scan_ident(). > + * Add the SEL_16BIT flag in pdata->flcmncr_val and re-assign > + * flctl->flcmncr_base to pdata->flcmncr_val. > + */ > + flctl->pdata->flcmncr_val |= SEL_16BIT; > + flctl->flcmncr_base = flctl->pdata->flcmncr_val; pdata->flcmncr_val is not used after this point. I think you can just do flctl->flcmncr_base |= SEL_16BIT; and get rid of the ftcl->pdata field you add in this patch. > + } > +