Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp514799imm; Fri, 17 Aug 2018 01:49:01 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwleWIE/DfR9obAhHNmkL20T1cIYU27w9fMeHATkBt9Bhg9Z3qmc6DFfMG+J6tGkxzeuTE2 X-Received: by 2002:a62:3703:: with SMTP id e3-v6mr35818089pfa.117.1534495741344; Fri, 17 Aug 2018 01:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534495741; cv=none; d=google.com; s=arc-20160816; b=riHyFs1a0vTF2bBhKNvtNONjBLNqP6CVVnmDgs1MqT3QjhyBOZ5LbExHqJ1hdhoWuq 5sxLlSSDZSvBlZdU+lFLUfOZFSY9trsI+U0AMXKNZd/qb8aj0s5TnyyvxR76i1uBvn+1 Zx9KgwdcDGEMaaU8KubutF+Ad/vNUZbTrIVrR3sxpUU3q6gRxeSu04Ua1Gtnrnk/nbLc 5cgK8HW4aajaUhAK3iicsZMkSidH7vU7MNf2mp8ZBP3mHA7GnDtXkMlhSoFfZ5nxHJTF wQmgMoeyOExXNC7qp4cWGr7EIwKPJXbj4Lfwl8Gjv1IYMFBUZFb/Agy/Lzw0BSLx74Tx xq9A== 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=MJ+uCAvJFUC0GWYd43YQYR1KjQVBFyEPyXoFKAc9q3I=; b=PgD8ACcJtu4Gm19iHaKgTmavuTHBCGvdU6yj3D09yvFnCoKhBHNVwV9PZvrqyfiHM2 AfOz4SDMoS5w4KU2IoRN/n+7wqy9svUUyGkoUzgmBKBK0hdlQDPRRaiadzk1ndGNciRM PhZqRTEYPA9BJ0Rqors4sT5eDSbx3qTT7XsN10hca1ISpthz/EHUr4oVKpc78h3yHx6F SDRMFqIW47VM4yEgKumo6fRZGiWrhqs9LtwtsoKr9vC3joeGJRtY5NMIrltX5nLv8pgM CaTyt3AsF8ZRruXQcOB+r7FoOYQVSdmM6zjR8yEp9DU3WvFoaJSiZWbwDdgIRR99LYtx xH2A== 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 c10-v6si1452239pgg.315.2018.08.17.01.48.45; Fri, 17 Aug 2018 01:49:01 -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 S1726356AbeHQLtm (ORCPT + 99 others); Fri, 17 Aug 2018 07:49:42 -0400 Received: from mail.bootlin.com ([62.4.15.54]:45802 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbeHQLtm (ORCPT ); Fri, 17 Aug 2018 07:49:42 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 10229207EB; Fri, 17 Aug 2018 10:47:08 +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 (91-160-177-164.subs.proxad.net [91.160.177.164]) by mail.bootlin.com (Postfix) with ESMTPSA id 9916020618; Fri, 17 Aug 2018 10:46:57 +0200 (CEST) Date: Fri, 17 Aug 2018 10:46:57 +0200 From: Boris Brezillon To: Yixun Lan Cc: , Rob Herring , Neil Armstrong , Martin Blumenstingl , Richard Weinberger , linux-kernel@vger.kernel.org, Marek Vasut , Liang Yang , Jian Hu , Kevin Hilman , Carlo Caione , linux-amlogic@lists.infradead.org, Brian Norris , David Woodhouse , linux-arm-kernel@lists.infradead.org, Jerome Brunet Subject: Re: [RFC PATCH v2 2/2] mtd: rawnand: meson: add support for Amlogic NAND flash controller Message-ID: <20180817104657.7a1da2c4@bbrezillon> In-Reply-To: <20180719094612.5833-3-yixun.lan@amlogic.com> References: <20180719094612.5833-1-yixun.lan@amlogic.com> <20180719094612.5833-3-yixun.lan@amlogic.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 Hi Yixun, I know I said I would finish reviewing the driver, but I didn't have time to do it, so feel free to send a new version addressing the comments I already made. On Thu, 19 Jul 2018 17:46:12 +0800 Yixun Lan wrote: > +static void meson_nfc_select_chip(struct mtd_info *mtd, int chip) > +{ > + struct nand_chip *nand = mtd_to_nand(mtd); > + struct meson_nfc_nand_chip *meson_chip = to_meson_nand(nand); > + struct meson_nfc *nfc = nand_get_controller_data(nand); > + > + if (chip < 0 || chip > MAX_CE_NUM) ^ chip > meson_chip->nsels) > + return; > + > + nfc->param.chip_select = meson_chip->sels[chip] ? NAND_CE1 : NAND_CE0; > + nfc->param.rb_select = nfc->param.chip_select; > +} > + Regards, Boris