From patchwork Tue May 5 16:04:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Pledge X-Patchwork-Id: 468273 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CDD3F14075F for ; Wed, 6 May 2015 03:39:10 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 999B41A0E36 for ; Wed, 6 May 2015 03:39:10 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org X-Greylist: delayed 3593 seconds by postgrey-1.35 at bilbo; Wed, 06 May 2015 03:37:39 AEST Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0139.outbound.protection.outlook.com [157.56.111.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id B23841A066A for ; Wed, 6 May 2015 03:37:39 +1000 (AEST) Received: from BLUPR03MB552.namprd03.prod.outlook.com (10.141.77.145) by BLUPR03MB376.namprd03.prod.outlook.com (10.141.75.150) with Microsoft SMTP Server (TLS) id 15.1.160.10; Tue, 5 May 2015 16:04:14 +0000 Received: from BN3PR0301MB1267.namprd03.prod.outlook.com (25.161.209.147) by BLUPR03MB552.namprd03.prod.outlook.com (10.141.77.145) with Microsoft SMTP Server (TLS) id 15.1.154.19; Tue, 5 May 2015 16:04:13 +0000 Received: from BN3PR0301MB1267.namprd03.prod.outlook.com ([25.161.209.147]) by BN3PR0301MB1267.namprd03.prod.outlook.com ([25.161.209.147]) with mapi id 15.01.0154.018; Tue, 5 May 2015 16:04:12 +0000 From: Roy Pledge To: Scott Wood , "linuxppc-dev@lists.ozlabs.org" Subject: RE: [PATCH 1/2] powerpc/qman: Change fsl, qman-channel-id to cell-index Thread-Topic: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index Thread-Index: AQHQeWFm77J5D6I9KUySVa4UmTizZZ1tnieQ Date: Tue, 5 May 2015 16:04:11 +0000 Message-ID: References: <1429311187-19062-1-git-send-email-scottwood@freescale.com> In-Reply-To: <1429311187-19062-1-git-send-email-scottwood@freescale.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freescale.com; dkim=none (message not signed) header.d=none; x-originating-ip: [192.88.168.49] x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB552; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB376; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:BLUPR03MB552; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB552; x-forefront-prvs: 0567A15835 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(377454003)(13464003)(46102003)(66066001)(107886002)(5001960100002)(19580395003)(33656002)(19580405001)(2950100001)(2900100001)(86362001)(92566002)(74316001)(87936001)(77156002)(62966003)(2656002)(230783001)(54356999)(122556002)(40100003)(76176999)(50986999)(106116001)(99286002)(5001770100001)(15975445007)(102836002)(76576001)(2501003)(142933001)(4001430100001)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB552; H:BN3PR0301MB1267.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2015 16:04:11.8670 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB552 X-OriginatorOrg: freescale.com Cc: Scott Wood , "devicetree@vger.kernel.org" , Madalin-Cristian Bucur X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Sorry for the slow reply. I don't believe this is correct - let me explain the rational why we had two properties in the QMan portal to begin with. The two properties in question are cell-index and fsl,qman-channel-id. The cell-index property is used in u-boot as an index for the software portal ID when adding the fsl,liodn from the U-boot table into the device tree. The fsl,qman-channel-id property is used in Linux and corresponds to a hardware value that indicates which channel is dedicated to the software portal. While I'm not aware of a current SoC where the channel ID for a software portal does not match the index (i.e. SWP 0 uses channel 0, etc.) it is possible that future SoCs could stray from this model, there is no reason for portal index to equal channel ID at all times. Roy -----Original Message----- From: Linuxppc-dev [mailto:linuxppc-dev-bounces+roy.pledge=freescale.com@lists.ozlabs.org] On Behalf Of Scott Wood Sent: Friday, April 17, 2015 6:53 PM To: linuxppc-dev@lists.ozlabs.org Cc: Wood Scott-B07421; devicetree@vger.kernel.org; Bucur Madalin-Cristian-B32716 Subject: [PATCH 1/2] powerpc/qman: Change fsl,qman-channel-id to cell-index It turns out that existing U-Boots will dereference NULL pointers if the device tree does not have cell-index in the portal nodes. No patch has yet been merged adding device tree nodes for this binding (except a dtsi that has not yet been referenced), nor has any driver yet been merged making use of the binding, so it's not too late to change the binding in order to keep compatibility with existing U-Boots. Signed-off-by: Scott Wood Cc: Madalin-Cristian Bucur --- Documentation/devicetree/bindings/soc/fsl/qman-portals.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.1.0 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev diff --git a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt index 48c4dae..47e46cc 100644 --- a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt +++ b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt @@ -47,7 +47,7 @@ PROPERTIES For additional details about the PAMU/LIODN binding(s) see pamu.txt -- fsl,qman-channel-id +- cell-index Usage: Required Value type: Definition: The hardware index of the channel. This can also be @@ -136,7 +136,7 @@ The example below shows a (P4080) QMan portals container/bus node with two porta reg = <0x4000 0x4000>, <0x101000 0x1000>; interrupts = <106 2 0 0>; fsl,liodn = <3 4>; - fsl,qman-channel-id = <1>; + cell-index = <1>; fman0 { fsl,liodn = <0x22>;