Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1881443lqb; Sun, 26 May 2024 23:56:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW4s5LL9+mRGPI7nlA7ZMAQhe2/0K9sNKcr/+KpcJh9FuB8cLgnjh0sFoRA/zZIG3fu0yPBlcY+0uyRP8Cr5AdqvORuRQNUzPmnSFzZ6Q== X-Google-Smtp-Source: AGHT+IHQeaowqvDSjOIdCPTW5BcDJe+yyGgoOd8pxij8RlqwdqSRawXF26mTDtIBNzzXC1yOydTa X-Received: by 2002:a05:620a:112c:b0:78d:5d86:ee3a with SMTP id af79cd13be357-794aa84d285mr1610711385a.27.1716792967822; Sun, 26 May 2024 23:56:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716792967; cv=pass; d=google.com; s=arc-20160816; b=HoigivMftIN56GUEx/Ap7y04zoqkrTJL41U31IUFnzco92qFmaJhwENl7Rj+najqIF xsS6rHdxkB0NOh0iFtL42a0cBuJ2lD7D3H5Y77unymp0IiyFuNMmt9hiMiBMfWoHZuW+ AScZ0DBSj2/vIVOfXGedh4a88IIy+ia95eBUjT88VHEQUWBYFDEzvbpcy8Mj/LZiPbhK ckWM0aM3POJ62g1j3Em722wK0RwbR+SNybX3EetwVGXfaC16eJQGACmwcstH7/2//QgD 8oiG8HVPCyQtNQPKkCZm+uYj8rh/P+Q6VEKutDBTPLH3TijvsmukxVBnMl3ZlR/hmnEA 1nHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:date:references:in-reply-to:subject:cc:to :from:dkim-signature; bh=Qq3+xYe/YAnEavdjtFQxxGGF2ofcopXV/qtuneNfe0A=; fh=FkEzoF/OqKPqe1ZeQ4GfGCEqUKbTvG5n5Ug+OywYCuA=; b=AMApVLOrg1v51/OLV47yDsa+Ec6HjFGmhns2jqUoa9YIBIVTJmspNMGg9ddgrZ2lKZ payBeOs0IIF6r+OQ1j7ioxFRCGygRyvi4HDBvShgPw5WUHf709tGWy6xC2HMaLc6bNVH Wn6TUowQ/IU/Yz0K4BGApQVIwxAo+u7nYWUojXUxY1d8cRuoMD5dC4gbf0IwnBFTlAV6 LntdbRW0OWlzx5D/Xx4lzpXQjQHp11AkRpx5EnG1yfqg59y1Mkb7WVIek1o9JbSryQxM /QAeybIYueo4/pWXnJiOJPJZWGFKSAUIbMChl85ATwdLHTUDfZCaIdSHbphbbaP5Kb6U lmHw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=mTUlAJnZ; arc=pass (i=1 spf=pass spfdomain=geanix.com dkim=pass dkdomain=geanix.com dmarc=pass fromdomain=geanix.com); spf=pass (google.com: domain of linux-kernel+bounces-190109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abd0ab14si729625785a.295.2024.05.26.23.56.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 23:56:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=mTUlAJnZ; arc=pass (i=1 spf=pass spfdomain=geanix.com dkim=pass dkdomain=geanix.com dmarc=pass fromdomain=geanix.com); spf=pass (google.com: domain of linux-kernel+bounces-190109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190109-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8D6581C20BAE for ; Mon, 27 May 2024 06:56:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F8081755A; Mon, 27 May 2024 06:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="mTUlAJnZ" Received: from www530.your-server.de (www530.your-server.de [188.40.30.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFE47134B0 for ; Mon, 27 May 2024 06:55:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.40.30.78 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716792960; cv=none; b=T1UyDJFz+pCPzrx4ZHW+5yVgr6V8Qv1txP2Uz34YiNm61sGjPfjP90YUU6L9bMHye53I7EqEkqibdBdWyWgNsSfjwVgITsKlAZ2jisY+qFLfe4rq6jt4qxmEKUODNZVHcFORxEBQSlC5L80hdeur0jUW/JxOB8IY47tGBjAmcP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716792960; c=relaxed/simple; bh=WbQKM4WfSYJh5YdZLq7S3csT52EbEfLHTP0iS3dvkp0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=qB/kW32N83aOpMuW1SdpeNDgcsNWSffWrNOi3zUyMUoa+wc9EG73kjuL9AiWmt/P4SHru/JePKlo6nruUr6oHsD2pWNfgT1k53FlyMS8gKzSMC/b1R2Kmvo1J5jZbOdLpwIvnfrH+hbJ5dp/F7+XpULPN1MchK2XEnr2csoW1Gg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=mTUlAJnZ; arc=none smtp.client-ip=188.40.30.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=geanix.com; s=default2211; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=Qq3+xYe/YAnEavdjtFQxxGGF2ofcopXV/qtuneNfe0A=; b=mTUlAJnZ2zdCm7YVNNcH3ZNJsH 849hc9R7sHcjnd+vqa5gY8GhB4KCr/EralmAgExTuMm90CBK/BX7+hNKNS97z6JcIuWEFtbUokG4I ASCOyhxXXbs9zgACeHzRyhOF2JnXOR7FCMzotlzvkTwm/h4oc7W+1iGGTG0UUHecxPh9iZOmgQE0x /YZMflyzsrkmICIoGHzXLNeYbHJ1WiWJdN55BgH9vk3zzo1LJhtwV7w42L/XnviBaNI5J+sisvPtl H27oM7ayIIzNRLaGq2NECJ58T0axMrea6lMN+PEAC67McYUXC3KsMziCMiYhNgopYuhOag5m472wQ 2lSMzSeA==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www530.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sBUGp-000EIj-BG; Mon, 27 May 2024 08:55:47 +0200 Received: from [185.17.218.86] (helo=localhost) by sslproxy05.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sBUGp-0002o8-0w; Mon, 27 May 2024 08:55:46 +0200 From: Esben Haabendal To: Krzysztof Kozlowski Cc: Tudor Ambarus , Pratyush Yadav , Michael Walle , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH] memory: fsl_ifc: Make FSL_IFC config visible and selectable In-Reply-To: <6c166ad5-8004-4bc4-9107-a47ba9a72161@kernel.org> (Krzysztof Kozlowski's message of "Sat, 25 May 2024 18:41:06 +0200") References: <20240523-fsl-ifc-config-v1-1-6eff73bdc7e6@geanix.com> <979fd913-050b-445d-9ca8-0ec6906ce3ea@kernel.org> <87cypc38gu.fsf@geanix.com> <9a7f73f4-f5dc-4342-855b-08df6a839bb5@kernel.org> <87le3zoatn.fsf@geanix.com> <6c166ad5-8004-4bc4-9107-a47ba9a72161@kernel.org> Date: Mon, 27 May 2024 08:55:46 +0200 Message-ID: <87ttijaglp.fsf@geanix.com> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Sender: esben@geanix.com X-Virus-Scanned: Clear (ClamAV 0.103.10/27287/Sun May 26 10:27:50 2024) Krzysztof Kozlowski writes: > On 24/05/2024 10:47, Esben Haabendal wrote: >> Krzysztof Kozlowski writes: >> >>> On 23/05/2024 16:32, Esben Haabendal wrote: >>>> Krzysztof Kozlowski writes: >>>> >>>>> On 23/05/2024 15:58, Esben Haabendal wrote: >>>>>> While use of fsl_ifc driver with NAND flash is fine, as the fsl_ifc_nand >>>>>> driver selects FSL_IFC automatically, we need the option to be selectable >>>>>> for platforms using fsl_ifc with NOR flash. >>>>> >>>>> Which driver is that? >>>> >>>> This is drivers/memory/fsl_ifc.o driver. It is for Integrated Flash >>>> Controller (IFC) from NXP. It is used in various Layerscape socs. >>> >>> ? I know that, I mean the NOR flash working here. >> >> Ah, sorry. The NOR flash I am using here is a Spansion S29AL016J. >> >>>>> Which DTS? >>>> >>>> It is for "fsl,ifc" compatible devices. >>> >>> That's not a NOR flash. >> >> Nope. The binding used for the NOR flash is "cfi-flash". > > And now let's get back to my original question. I asked for driver, not > device, and for DTS not compatible. You got me really confused now. I am not sure what you are asking me for, and why. I am sending a patch which changes to Kconfig for a memory controller driver. The change is AFAICS quite similar to commit be34f45f0d4a ("memory: omap-gpmc: Make OMAP_GPMC config visible and selectable"). As for the NOR flash that in this situation is attached to the IFC controller, it is (as mentioned) Spansion S29AL016J. It is handled by the drivers/mtd/maps/physmap.o driver (CONFIG_MTD_PHYSMAP + CONFIG_MTD_PHYSMAP_OF) The DTS used to specify the NOR flash is &ifc { status = "okay"; #address-cells = <2>; #size-cells = <1>; ranges = <0x0 0x0 0x0 0x60000000 0x00200000>; nor_flash: nor@0,0 { #address-cells = <1>; #size-cells = <1>; compatible = "cfi-flash"; reg = <0x0 0x0 0x200000>; bank-width = <2>; partition@0 { reg = <0x000000 0x0f0000>; label = "boot0"; }; }; }; So as mentioned, it is a quite standard "cfi-flash" compatible device declaration. Do you think there is a way that ti enable CONFIG_FSL_IFC for my situation without the config being visible? Something like automatically selecting CONFIG_FSL_IFC when CONFIG_MTD_PHYSMAP and CONFIG_MTD_PHYSMAP_OF is enabled? Will that not include a risk of pulling in CONFIG_FSL_IFC in some cases where it is not desired? Something like config MTD_PHYSMAP tristate "Flash device in physical memory map" depends on MTD_CFI || MTD_JEDECPROBE || MTD_ROM || MTD_RAM || MTD_LPDDR select FSL_IFC if SOC_LS1021A But that looks like a road somewhere not so nice. The generic MTD_PHYSMAP being littered with architecture specific selects. Or is there something completely obvious (not for me then) that I am missing? /Esben