From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9144AECAAD8 for ; Wed, 31 Aug 2022 06:37:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8C147819FC; Wed, 31 Aug 2022 08:37:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="WuHcaQlQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D2822814B6; Wed, 31 Aug 2022 08:37:40 +0200 (CEST) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A7A3A849C4 for ; Wed, 31 Aug 2022 08:37:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@amarulasolutions.com Received: by mail-pj1-x102c.google.com with SMTP id t11-20020a17090a510b00b001fac77e9d1fso20149356pjh.5 for ; Tue, 30 Aug 2022 23:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=iFfyIPekWO/DDOc9bXUm9PhXw52hW+0cawG74r3Yw8U=; b=WuHcaQlQpSEtUF5c75PEsDQskdKdSCYTPXa+VuyZJxLWkfJq353oGHqlnqGLRCZusa XrTRF380u70gUJUI9GT5whHxAhE4gplylCmJWQPmj1EZ0ARLDkcUk5ndmCP9vB5qsZWO CE2H7O0Pqljmn2ySUWzwldqUgdLiP4oNUao/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=iFfyIPekWO/DDOc9bXUm9PhXw52hW+0cawG74r3Yw8U=; b=2GIyyF57cEb1XeWlDjtMPb1Ls3MSfSMUCnzfLHkyi3eM3JL6VHZF/NuZHUGj7EuMuz QNG0lDaFmB297osuc3od0kSvqYFjfetnOzt0mpNHJNKLnFqkKHa6Fj/3JFmQ3BGdqWhI w1Vt5uQt0Hq9fChT/vPUgCl4RryPSIz3POY0bld6k7ZcYk9K1hLNuIOlw6sCPaS00Ol/ x1hBP3jKSOb7HpDHvNABiC81ohHKFhk4OBe9onu0AkmwS9wM+W/Led5WIFpOGlhCKKxv j/xw2Yz+wkImBd3jjGMzRz0Wx7Z+BOPY30ry/+EWITP2vu9CO/rl4k9oVyiykYv1LyDH oOfA== X-Gm-Message-State: ACgBeo3ZimENRXjitfYggrFelonHluLyVK24nfXzunk3OJ7o/U1XffeX C3jrkfPo7Y8kGgsp8xTLhlD05Mx6Ml21EbHEJJp+XA== X-Google-Smtp-Source: AA6agR4JZqZs5FeUGa8r2fjhca5w0ClutZe6RXe/db7b/eQZmPdi2uwOQiA9WhCaMLlhivJB1l+zxz4cKy16hxaHfHo= X-Received: by 2002:a17:902:ba8f:b0:175:42c1:61ce with SMTP id k15-20020a170902ba8f00b0017542c161cemr2098721pls.130.1661927854806; Tue, 30 Aug 2022 23:37:34 -0700 (PDT) MIME-Version: 1.0 References: <20220829061928.21895-1-balamanikandan.gunasundar@microchip.com> <98449704-0e25-877d-e1af-9e31bebcd7de@microchip.com> In-Reply-To: <98449704-0e25-877d-e1af-9e31bebcd7de@microchip.com> From: Michael Nazzareno Trimarchi Date: Wed, 31 Aug 2022 08:37:20 +0200 Message-ID: Subject: Re: [PATCH v2 0/9] Add DM support for atmel NAND driver To: Eugen.Hristev@microchip.com Cc: sjg@chromium.org, Balamanikandan.Gunasundar@microchip.com, u-boot@lists.denx.de, Sandeep.Sheriker@microchip.com, dario.binacchi@amarulasolutions.com, Mihai.Sain@microchip.com, Sergiu.Moga@microchip.com, Claudiu.Beznea@microchip.com, hs@denx.de, Tudor.Ambarus@microchip.com, ascull@google.com, kettenis@openbsd.org, jh80.chung@samsung.com, peng.fan@nxp.com, ye.li@nxp.com, Hari.PrasathGE@microchip.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Hi On Wed, Aug 31, 2022 at 8:34 AM wrote: > > On 8/30/22 5:30 AM, Simon Glass wrote: > > Hi, > > > > On Mon, 29 Aug 2022 at 00:41, Michael Nazzareno Trimarchi > > wrote: > >> > >> Hi > >> > >> On Mon, Aug 29, 2022 at 8:19 AM Balamanikandan Gunasundar > >> wrote: > >>> > >>> Change include: > >>> > >>> - Adapt GPIO descriptor apis for U-Boot. Use > >>> gpio_request_by_name_nodev, dm_gpio_get_value etc. > >>> - Use U_BOOT_DRIVER instead of platform_driver. > >>> - Replace struct platform_device with struct udevice > >>> - Check the status of nfc exec operation by polling the status > >>> register instead of interrupt based handling > >>> - DMA operations not supported. Remove it > >>> - Adapt DT parsing to U-Boot APIs > >>> > >>> v2: > >>> > >>> - Add linux reference version in the commit message from which the > >>> driver is ported from > >>> - Reword the commit message to describe the changes clearly > >>> > >> > >> Thank you to repost it again, I will review it and try to include soon > >> > >> Michael > >> > >>> Balamanikandan Gunasundar (9): > >>> nand: atmel: Add DM based NAND driver > >>> nand: atmel: Add pmecc driver > >>> mfd: syscon: Add atmel-matrix registers definition > >>> memory: atmel-ebi: add Atmel EBI (External Bus Interface) driver > >>> mfd: syscon: atmel-smc: Add driver for atmel SMC > >>> configs: at91: sam9x60ek: Enable DM based nand driver > >>> ARM: dts: at91: sam9x60: Add nodes for EBI and NAND > >>> ARM: dts: at91: sam9x60ek: Enable NAND support > >>> board: sam9x60ek: remove nand init from board file > >>> > >>> MAINTAINERS | 1 + > >>> arch/arm/dts/sam9x60.dtsi | 42 + > >>> arch/arm/dts/sam9x60ek.dts | 103 + > >>> board/atmel/sam9x60ek/sam9x60ek.c | 59 - > >>> configs/sam9x60ek_mmc_defconfig | 9 +- > >>> configs/sam9x60ek_nandflash_defconfig | 9 +- > >>> configs/sam9x60ek_qspiflash_defconfig | 8 +- > >>> drivers/Kconfig | 2 + > >>> drivers/Makefile | 1 + > >>> drivers/memory/Kconfig | 7 + > >>> drivers/memory/Makefile | 1 + > >>> drivers/memory/atmel_ebi.c | 37 + > >>> drivers/mfd/Kconfig | 4 + > >>> drivers/mfd/Makefile | 1 + > >>> drivers/mfd/atmel-smc.c | 364 +++ > >>> drivers/mtd/nand/raw/Kconfig | 8 + > >>> drivers/mtd/nand/raw/Makefile | 1 + > >>> drivers/mtd/nand/raw/atmel/Makefile | 5 + > >>> drivers/mtd/nand/raw/atmel/nand-controller.c | 2293 ++++++++++++++++++ > >>> drivers/mtd/nand/raw/atmel/pmecc.c | 965 ++++++++ > >>> drivers/mtd/nand/raw/atmel/pmecc.h | 94 + > >>> include/configs/sam9x60ek.h | 5 - > >>> include/linux/mfd/syscon/atmel-matrix.h | 112 + > >>> include/linux/mfd/syscon/atmel-smc.h | 119 + > >>> 24 files changed, 4177 insertions(+), 73 deletions(-) > >>> create mode 100644 drivers/memory/atmel_ebi.c > >>> create mode 100644 drivers/mfd/Kconfig > >>> create mode 100644 drivers/mfd/Makefile > >>> create mode 100644 drivers/mfd/atmel-smc.c > >>> create mode 100644 drivers/mtd/nand/raw/atmel/Makefile > >>> create mode 100644 drivers/mtd/nand/raw/atmel/nand-controller.c > >>> create mode 100644 drivers/mtd/nand/raw/atmel/pmecc.c > >>> create mode 100644 drivers/mtd/nand/raw/atmel/pmecc.h > >>> create mode 100644 include/linux/mfd/syscon/atmel-matrix.h > >>> create mode 100644 include/linux/mfd/syscon/atmel-smc.h > >>> > >>> -- > >>> 2.34.1 > >>> > > > > Once this series is in, I wonder if it might be possible to drop the > > nand_init() call and have this happen as needed, i.e. lazy init? > > > > Regards, > > Simon > > > > Hi Simon, > > nand_init() should be called if nand is accessed. Do you have a specific > place in mind where this call is not appropriate, and should be removed ? > Those are different topics, I would like to keep them split. Anyway I think that nand should work as mmc for initialization. I put a note to make it happen. > Hi Michael, > > If you want to review this series, please do, I would like this to fit > into the next merge window for 2023.01 , but if it needs more time, > that's fine. Yes, I will look at it tomorrow Michael > > Eugen -- Michael Nazzareno Trimarchi Co-Founder & Chief Executive Officer M. +39 347 913 2170 michael@amarulasolutions.com __________________________________ Amarula Solutions BV Joop Geesinkweg 125, 1114 AB, Amsterdam, NL T. +31 (0)85 111 9172 info@amarulasolutions.com www.amarulasolutions.com