Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1890468lqb; Mon, 27 May 2024 00:20:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXc4tqVQr6sMjSgfkmgqIl3cfvdy3wxuwQaz7MI5gzCsy/oP1MvvmnQFqCeBUEKX0ZdKwPdZiUEg3a5PrmNPcEiYPaVlPfm/HaAqhSDkg== X-Google-Smtp-Source: AGHT+IHTTua+i3oahq6KegY10Y0rR8RgyEhz3m3+LxrEcT6DfhkFAsJDRnHJMcNW1ou0AslynINv X-Received: by 2002:ad4:5147:0:b0:6ad:60d8:1850 with SMTP id 6a1803df08f44-6ad60d81e12mr63956536d6.10.1716794406458; Mon, 27 May 2024 00:20:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716794406; cv=pass; d=google.com; s=arc-20160816; b=UmXYXpK8CpX2k/fXKNL4fSwN4wcCPKdtI5txn5LMZYnxI3MyTMgVCpetBJCAQ39H6z 3wKwMx94KY0KcCXqHCVG4TfxkiP8GhJwZCNnpzdslwJjFeQSvF5C4cKVFWSp+KFLvljw 4zSj7wlO3T3CS5bn0bMCu1LEBUsZitDorvxJNi1C7q+hVmEPebUD5MS5tM08LE+o5/Bx 5Wr27x/4IxDyo4nOKYEAdX3J/LIgG2dDWlu8lMnCHfG5SuRTTSd1CnyVty6G2Zt49XZz soO1zm4mG5J1+86DNRWo9W6taE8M0mnIlgYYQF3TiC6VlIKcOEXlZbDMLVEycymJZlGy lWzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=iCnbCp2I45/A+SW8lTspmM7TzVibUKMmhk1gqw9beSk=; fh=dTzYUhEr+9p53N3NaI9c1byX4h6v+RpdlLGiT2o3Ed0=; b=w5hJkbM/hL1MBsGaxsyKFxJd4cA1TcrMISDWi0vYbvKpX6D9L1R0Z0fz/2VkIJXHQl Ir3LYszDcY86Xchnk81FwTbIt8V2X1s1Kxd2xzZGfoEyfYNp0zjR051yiWB9Ch2x3hTP UoDO71oT0yiP4jZqSKT9depzsv73bihxpiqywVx9aI8eQnqrlR2rGR36EFdGEivPKxic VgQEadsdROfiP3OdvJBSqnTfQajUziYwB1mwNIc2LEB5qo2tF2XhPAt6ByQvJtxXt+E8 neFDWOsSa6pcw2wkMWakNIcTekgtL8lrMKetBtYtddXDN0IKnRaxXNN07bwANerKU/Nm VhIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lkBW3kwq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190129-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac06f4e9b8si73853116d6.57.2024.05.27.00.20.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 00:20:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190129-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=@kernel.org header.s=k20201202 header.b=lkBW3kwq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190129-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 271AB1C20D79 for ; Mon, 27 May 2024 07:20:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF2B01B95B; Mon, 27 May 2024 07:20:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lkBW3kwq" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B265217C60 for ; Mon, 27 May 2024 07:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716794399; cv=none; b=YyRravEuHW6Z70Pp0RpavALQ/EBvl3NJlGSiNlZZE0frrsvhlMxQFmB6mL1gnmg7PJJBcU2kO9C0aM9L8R8KZmDDRqibpwlra40DEM9zSRfdtApcgOIDQ6TP0I9pOmKoi5xyHeCaEyMhYqTSOiTVd5GX1SJwiC6dDIcw2+e14F8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716794399; c=relaxed/simple; bh=q9n8gPWsKQklgj2OKUpvVXNvMah5NFymAiXyPf3yL6E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KqSlmHfbwQwDEehPM0AEH4cBMoCzigUOq8ziIBl96GV0pRMg9R98n61Z/391vIIUotwShjXZWi5KuuieD116260tFZE2AUPjE9QEf2H3jwYcAR9OoFcN71hBKdek0qxE1w7GJYUZ38WGjl+JCdJwgn0ETz4+ePWJxT8lj5baT1E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lkBW3kwq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88CF9C2BBFC; Mon, 27 May 2024 07:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716794399; bh=q9n8gPWsKQklgj2OKUpvVXNvMah5NFymAiXyPf3yL6E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=lkBW3kwq30wT7IMRV2WeerIHDwVTSAvast4OKto1e1aHXLi7ZAK5kKPDNWOd8fyh+ vWRJdlA0pCaIXXUO84J09+Oe6hpQuXGHOtByOxZ3YPoyzfHWr7UY835zJRkoIq6PAb t6UazWZfp5HUNXMZdKnn/SNnHLs7ab3OHtDUoLQQZGpKZbS4UODa+f5CZomKGSjJjm DdbKPzwrP5C0PmWpXpjU/wI8OF4DHrz0w+3XebB2IA6dke2DrSQO0teplK+kJZyMiJ eQ4Hh+/rJPn1AbqgLtRXpmDQdohnZheGa9jXoKvqugjy18FdxgWnlvCJpxLwqNVK06 KAcfzmBzvLQsA== Message-ID: Date: Mon, 27 May 2024 09:19:55 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] memory: fsl_ifc: Make FSL_IFC config visible and selectable To: Esben Haabendal Cc: Tudor Ambarus , Pratyush Yadav , Michael Walle , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org 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> <87ttijaglp.fsf@geanix.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKbBn8P+QFxwl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EuNSr+CLMdnRBY fv0= In-Reply-To: <87ttijaglp.fsf@geanix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 27/05/2024 08:55, Esben Haabendal wrote: > 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) Thanks. > > The DTS used to specify the NOR flash is Upstream DTS. I don't care about downstream. > > &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? If there is no user for such option, why changing it? To clarify: whatever is out of tree, does not really exist... Best regards, Krzysztof