Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1486530pxu; Tue, 24 Nov 2020 01:11:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLgBO8oo+nLeWr7Zrn/HtYQMR2ch+Otso7DeGz2WFf3yaO96oTYYBBcNq6Fexhsb7vbF4c X-Received: by 2002:a17:906:b7d3:: with SMTP id fy19mr3254034ejb.74.1606209096124; Tue, 24 Nov 2020 01:11:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606209096; cv=none; d=google.com; s=arc-20160816; b=AbjkygalEs6TfX+uD/wubRrTFgVhi+TBwRd1EgWAHPu08s98Cxv/5MkUipxKDHiiKy qvFGHhCiL79uc2GOCLCJZRjQDd6B/MtZIVYmcqTXyGRTe7RYG02lXTVVCZ+zhJHuunp5 F25649ZHBon3Ai8WdyM9pcUAnLoM1vNYuDzByxtUA2KsdnaLlEAdHVXshhThPq4H/TNS j+xXiRFdnyUOm31djRi0GaqzEfqbMkAce/UGixAxZpLZRyEcUZKBp+LVu1NOEKjnOyYE PqjTVjo+2fKhxV4Azc5m8odyyJVrd2dFfP51iAAdGgCV+4274ROt1BBVsjg20CURfsL8 j1bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=QAGbzdk6tUGXewISn0EzFLfe94f3e5m/2wHklvLB6Rg=; b=NWQDtZnfWEkmhtl2MmMntr1otrEvLbEwcn1t9Tuybe2hke2klLIQw8fbcKVJSzkLu9 wSoYkFu/pCoAumBwXxNbphuimJFBUe+nFjHKzoZRUAEmlaJJgO+wIftDS95Ge1CdDv7r UKyT5TKU39g8zPfR1VP+oSeGCMjav13hrqPQ2ePnFzPVD0NN7DGJgGA5EO7/1row6K7J qNp0fu1UbFGPc15Cz+s8JIYANfVAH5of2WZFSw6hNfRzvl/KdHerLOOj2caQ6mJAPvsa CUyoChIPiedi0NlqoD9wTJggyBhBMqcDTNXFvdS/bJiq3BUFmpdF4Zwsj4sDTcTYD6nN gH3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=ht1QTI6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a15si9720016eju.683.2020.11.24.01.11.12; Tue, 24 Nov 2020 01:11:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=ht1QTI6f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730593AbgKXJI1 (ORCPT + 99 others); Tue, 24 Nov 2020 04:08:27 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:39947 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728826AbgKXJI0 (ORCPT ); Tue, 24 Nov 2020 04:08:26 -0500 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id C5C7123E45; Tue, 24 Nov 2020 10:08:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1606208902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QAGbzdk6tUGXewISn0EzFLfe94f3e5m/2wHklvLB6Rg=; b=ht1QTI6ftjK4qVCHOkuvuY5EvxLhW0D5PKS4rmPQgi/3yi8uMT4KsXAsB/q8FuuHK0elRG r4vrYTldEXtHdRypAHWF9YqkvI//G/tZIO/zkaiGJHSvpagQjwDawRfHG6Gzzdus1LvPre 3+BOcQM7WZGwtn/FwRYPLGD4XoME0Lw= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 24 Nov 2020 10:08:22 +0100 From: Michael Walle To: "Y.b. Lu" Cc: Vladimir Oltean , Shawn Guo , Leo Li , Rob Herring , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Adrian Hunter , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Ashish Kumar Subject: Re: [PATCH] arm64: dts: ls1028a: make the eMMC and SD card controllers use fixed indices In-Reply-To: References: <20201119155025.965941-1-vladimir.oltean@nxp.com> <20201120093015.duel3yx63cbya77w@skbuf> <71a86b0fbc95892f8fd240e0919e7e23@walle.cc> <3293d698bf26ecf08f22e7e2ffe55e74@walle.cc> User-Agent: Roundcube Webmail/1.4.9 Message-ID: X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2020-11-24 10:02, schrieb Y.b. Lu: > Hi Michael, > >> -----Original Message----- >> From: Michael Walle >> Sent: Tuesday, November 24, 2020 4:55 PM >> To: Y.b. Lu >> Cc: Vladimir Oltean ; Shawn Guo >> ; Leo Li ; Rob Herring >> ; linux-arm-kernel@lists.infradead.org; >> devicetree@vger.kernel.org; Adrian Hunter ; >> Ulf >> Hansson ; linux-mmc@vger.kernel.org; >> linux-kernel@vger.kernel.org; Ashish Kumar >> Subject: Re: [PATCH] arm64: dts: ls1028a: make the eMMC and SD card >> controllers use fixed indices >> >> Am 2020-11-24 09:47, schrieb Y.b. Lu: >> > Hi Michael, >> > >> >> -----Original Message----- >> >> From: Michael Walle >> >> Sent: Tuesday, November 24, 2020 4:03 PM >> >> To: Y.b. Lu >> >> Cc: Vladimir Oltean ; Shawn Guo >> >> ; Leo Li ; Rob Herring >> >> ; linux-arm-kernel@lists.infradead.org; >> >> devicetree@vger.kernel.org; Adrian Hunter ; >> >> Ulf >> >> Hansson ; linux-mmc@vger.kernel.org; >> >> linux-kernel@vger.kernel.org; Ashish Kumar >> >> Subject: Re: [PATCH] arm64: dts: ls1028a: make the eMMC and SD card >> >> controllers use fixed indices >> >> >> >> Am 2020-11-24 08:41, schrieb Y.b. Lu: >> >> > Hi Vladimir, >> >> > >> >> >> -----Original Message----- >> >> >> From: Vladimir Oltean >> >> >> Sent: Friday, November 20, 2020 5:30 PM >> >> >> To: Y.b. Lu >> >> >> Cc: Shawn Guo ; Leo Li ; >> Rob >> >> >> Herring ; linux-arm-kernel@lists.infradead.org; >> >> >> devicetree@vger.kernel.org; Adrian Hunter ; >> >> >> Ulf >> >> >> Hansson ; linux-mmc@vger.kernel.org; >> >> >> linux-kernel@vger.kernel.org; Ashish Kumar ; >> >> >> Michael Walle >> >> >> Subject: Re: [PATCH] arm64: dts: ls1028a: make the eMMC and SD card >> >> >> controllers use fixed indices >> >> >> >> >> >> On Fri, Nov 20, 2020 at 02:04:02AM +0000, Y.b. Lu wrote: >> >> >> > Hi Vladimir, >> >> >> > >> >> >> > I have already upstreamed a patch for all affected layerscape boards. >> >> >> > >> >> >> >> >> >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kern >> >> >> el.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fshawnguo%2Flinux.git%2 >> >> >> Fcommit%2F&data=04%7C01%7Cyangbo.lu%40nxp.com%7C498622ade >> >> >> e704fc0042008d8904f6184%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0 >> >> %7C0%7C637418017917635725%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi >> M >> >> >> C4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000 >> >> >> &sdata=OciS3q%2BmP%2Bz4x1ewPHDigmUkgIZmBgUlRRTm4yaxB7s%3D >> >> &reserved=0? >> >> >> h=imx/dt64&id=342ab37ecaf8c1b10dd3ca9a1271db29a6af0705 >> >> >> > >> >> >> > Please check whether it works for you. >> >> >> >> >> >> Thanks, one can tell that I haven't done my due diligence of checking >> >> >> Shawn's tree first. I'll cherry-pick that patch and carry on with my >> >> >> work. >> >> >> >> >> >> However, the fact still remains that Michael has expressed his opinion >> >> >> regarding mmcblk0 vs mmcblk1. Do you think that we could make the >> >> >> aliases a per-board option instead of per-SoC? Consider that there >> >> >> might >> >> >> even be boards that only use SD card. It would be strange for the >> >> >> block >> >> >> device in that case to be called /dev/mmcblk1. >> >> > >> >> > I don't think it's a problem in board dts to define board specific >> >> > thing, like re-defining alias, and disabling any IP it not using. >> >> >> >> First, why would you put it in the architecture include anyway? That >> >> is really board-specific. That is like you would say, we enable all >> >> devices and a board could potentially disable it. TBH it seems that >> >> this will fit your reference boards and you don't care about the >> >> other ones which uses that include. >> > >> > In soc dtsi, this is giving default alias for two esdhc controllers. >> > This is not board specific. >> > That's natural esdhc0 is mmc0 and esdhc1 is mmc1. >> >> How could this be not board specific if there are at least three >> different use cases the board can choose from - and needs three >> different configurations: >> >> (1) eMMC at /dev/mmcblk0, SD card at /dev/mmcblk1 >> (2) SD card at /dev/mmcblk0, eMMC at /dev/mmcblk1 >> (3) no eMMC at all, SD card at /dev/mmcblk0 > > Not matter it's SD card or eMMC card, if it's on esdhc0, use > /dev/mmcblk0. > Not matter it's SD card or eMMC card, if it's on esdhc1, use > /dev/mmcblk1. > It's not related to board and card type, it's only related to esdhc > interface in use. And what interace is used is board specific, isn't it? >> your include only support (1). If a board needs (2) or (3) it has to >> override the configuration in the _common_ include. >> >> >> And as Vladimir pointed out, what do you do if you just have the eMMC >> >> on the LS1028A. It will be mmcblk1 unless you do something like the >> >> following in the board dts: >> >> >> >> mmc0 = &esdhc; >> >> /delete-property/ mmc1; >> >> >> >> That is really cumbersome, isnt it? >> > >> > The soc dtsi gives default alias to make esdhc0 as mmc0, and esdhc1 as >> > mmc1, the use case just needs to consider which esdhc controller is >> > used. That's fixed index for it. >> > No matter how the board is designed, there are two esdhc controllers >> > in soc. It's probed as mmc0 and mmc1. >> > It's use case that should choose the right mmc device. It is not the >> > dts that should be changed to suit use case. >> > If the board owner insists to change alias to make esdhc1 as mmc0, I >> > think no problem. Just do it in board dts to override the default one. >> >> Still, why would this be enforced in the common include? What is the >> advnatage here? I only see disadvantages. You didn't answer this unfortunately. -michael