Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp509591ybi; Thu, 30 May 2019 02:10:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoMo2AQHPi6pysJu71zy9RZiAz+HKVoPMXV01mR1agfhNuhv9rS59BH7sGxMCWUfql6PSK X-Received: by 2002:a63:de43:: with SMTP id y3mr2865822pgi.271.1559207407671; Thu, 30 May 2019 02:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559207407; cv=none; d=google.com; s=arc-20160816; b=iMCBNaIHhJbCwOJZ8o+v0yVsXw1wDU2ex4oDErqs5z+Bcs7sk2aObansflcMLzec5I 4eGaIAE6FEdnI2S6Y54PSutmlnXAG1ACk/Cbcjt1t5VUvMb2WeKC0HC7YtD13tuneIzb PvZ1hberw6Llwn/az0ncDMni7xfT6EmfiCMk2nL5gS/LNnB1hOPFluvcpEEZerEodMPN K7w7E13X0EoUZFzxm1zb6s+t+qL2eF88xtBuiamPKs0Q2ZEYYAIFXSqKbcvrtX/QV/1b k2rGMkKTkRsYhzbTMhKuVBwOvm9o3yNzQi+lBiSr6rQ6xwHuuEIHkZJ6GuNnFH3bdh+X OhOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=ml4/Tyy2EwqtQaAZNjq82bPnQb2EkJyukUMl263N6pE=; b=IL/PND1A0vMCeaBERTBS/2ep6uJaU4S1BLhvuDIookPjRW+/vOC5DWbh7e0KpuQdrJ dG3iKK07M2n98jpilC3ZByCHWixanXN6BVFxOZv64zCjaGiqcY4iyfKeHReH1z8JrbV3 p3SPlvxx1xTPwNmumUsICREGYIqgtv/Mr+Rqo+kSLdRVVS94AdP6ALY4ZHHtF/4duswl q02IQHo6LnBNQkQjXjQB/Mps69ejCOhb/6/YZOSh72I+yRiYf9tjFTjAdPLt9SV83/As KpAjcTtsVw84rmA06jIZ7rE7Pn1V7CbGV3gFwtd2yG+3NDZIEJt95j8nvmMbd8nfNPFd kPLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=DdGzMhx1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d24si2744508pgk.106.2019.05.30.02.09.50; Thu, 30 May 2019 02:10:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=DdGzMhx1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726902AbfE3JIm (ORCPT + 99 others); Thu, 30 May 2019 05:08:42 -0400 Received: from mail-eopbgr10087.outbound.protection.outlook.com ([40.107.1.87]:21457 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726442AbfE3JIl (ORCPT ); Thu, 30 May 2019 05:08:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ml4/Tyy2EwqtQaAZNjq82bPnQb2EkJyukUMl263N6pE=; b=DdGzMhx1gIEjZMhlE/kW11tbkml8NoCrdxGlhX7wD36Nu7iyHynYS4dIpWL5cr9S3HkD8gmgtlvN6w2ODJblhyPM90DWxh0O06a2eVGLzvCPj1/rDm+ohe7Lp6qN8gE585lAVkAfnFy21h2ETuVplQKh5XeKx+AwG9PaD6hiyy8= Received: from AM5PR0402MB2865.eurprd04.prod.outlook.com (10.175.44.16) by AM5PR0402MB2898.eurprd04.prod.outlook.com (10.175.42.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.22; Thu, 30 May 2019 09:08:36 +0000 Received: from AM5PR0402MB2865.eurprd04.prod.outlook.com ([fe80::a1bf:17d:a52:3824]) by AM5PR0402MB2865.eurprd04.prod.outlook.com ([fe80::a1bf:17d:a52:3824%4]) with mapi id 15.20.1943.016; Thu, 30 May 2019 09:08:36 +0000 From: Ran Wang To: Felipe Balbi CC: Greg Kroah-Hartman , "open list:DESIGNWARE USB3 DRD IP DRIVER" , open list , Rob Herring , "devicetree@vger.kernel.org" Subject: RE: [PATCH] usb: dwc3: Enable the USB snooping Thread-Topic: [PATCH] usb: dwc3: Enable the USB snooping Thread-Index: AQHTXdpMV/QBUrO8J0eNmcCmR0ATg6MVIlkAgAAD6zCAABVWgINueaJwgAAMz4CAAwpoAA== Date: Thu, 30 May 2019 09:08:36 +0000 Message-ID: References: <20171115060459.45375-1-ran.wang_1@nxp.com> <87ineb9b5v.fsf@linux.intel.com> <87shdfet90.fsf@linux.intel.com> <87k1eaanjw.fsf@linux.intel.com> In-Reply-To: <87k1eaanjw.fsf@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ran.wang_1@nxp.com; x-originating-ip: [119.31.174.73] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3654c925-77c6-42ca-3e61-08d6e4de6636 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020);SRVR:AM5PR0402MB2898; x-ms-traffictypediagnostic: AM5PR0402MB2898: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 00531FAC2C x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(39860400002)(396003)(376002)(136003)(199004)(189003)(11346002)(446003)(86362001)(76176011)(66946007)(66066001)(6436002)(486006)(102836004)(6246003)(76116006)(3846002)(71200400001)(229853002)(6116002)(6506007)(478600001)(6916009)(53546011)(14454004)(55016002)(71190400001)(81156014)(81166006)(7736002)(25786009)(476003)(5660300002)(256004)(14444005)(74316002)(4326008)(54906003)(68736007)(66476007)(64756008)(305945005)(73956011)(66556008)(186003)(53936002)(66446008)(26005)(7696005)(52536014)(8936002)(9686003)(2906002)(316002)(99286004)(8676002)(33656002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0402MB2898;H:AM5PR0402MB2865.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: eR7rGfmlB+wLICgzsDZhUzZ+ofQsel5yBmAKjilxU4tC5FZ5e0yH7WbLK0mB0roadQ6sldOERXa7beSiP+DP2vtQmtWCBR/C9y1S6PGDbkuNX5eCW+s/cs/lc8DX89VGiAj9WOmmxNsj6ld90X4MYWEV3Wr1qOxGVctwlT6uHRvyoZyanFxg3wLgQ9u/DX/bc3LgknZ0u0aUCiF6SvtAsRn3XjEdTTmcngj2XdF9+Exp+4rjTq0fQ0/EtKAf5kv1NX7+KGt+2ybUQ2geIykISlCHVaj7kCqq89X+hRWmK5R5zsH118csZ9U/lUtWMb1yLDf1KfnYWQGh4UAOuNgra4a8WlcyxEHIaKC3FDLVjeURWl2Jswx2bgLCcDbrHHGnewM9VBA/PH1P1HJX9EDKJ9BcprJfh4H5wgKd/XacqcE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3654c925-77c6-42ca-3e61-08d6e4de6636 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2019 09:08:36.7066 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ran.wang_1@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0402MB2898 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Felipe, On Tuesday, May 28, 2019 18:20, Felipe Balbi wrote: >=20 > >> >> > /* Global Debug Queue/FIFO Space Available Register */ > >> >> > #define DWC3_GDBGFIFOSPACE_NUM(n) ((n) & 0x1f) > >> >> > #define DWC3_GDBGFIFOSPACE_TYPE(n) (((n) << 5) & 0x1e0) > >> >> > @@ -859,6 +867,7 @@ struct dwc3_scratchpad_array { > >> >> > * 3 - Reserved > >> >> > * @imod_interval: set the interrupt moderation interval in 250n= s > >> >> > * increments or 0 to disable. > >> >> > + * @dma_coherent: set if enable dma-coherent. > >> >> > >> >> you're not enabling dma coherency, you're enabling cache snooping. > >> >> And this property should describe that. Also, keep in mind that > >> >> different devices may want different cache types for each of those > >> >> fields, so your property would have to be a lot more complex. Somet= hing > like: > >> >> > >> >> snps,cache-type =3D , , ... > >> >> > >> >> Then driver would have to parse this properly to setup GSBUSCFG0. > > > > According to the DesignWare Cores SuperSpeed USB 3.0 Controller > > Databook (v2.60a), it has described Type Bit Assignments for all suppor= ted > master bus type: > > AHB, AXI3, AXI4 and Native. I found the bit definition are different am= ong > them. > > So, for the example you gave above, feel a little bit confused. > > Did you mean: > > snps,cache-type =3D , > "cacheable">, , >=20 > yeah, something like that. I think DATA_RD should be a macro, right? So, where I can put its define? Create a dwc3.h in include/dt-bindings/usb/ ? Another question about this remain open is: DWC3 data book's Table 6-5 Cache Type Bit Assignments show that bits definition will differ per MBUS_TYPEs as below: ---------------------------------------------------------------- = =20 MBUS_TYPE| bit[3] |bit[2] |bit[1] |bit[0] = =20 ---------------------------------------------------------------- = =20 AHB |Cacheable |Bufferable |Privilegge |Data = =20 AXI3 |Write Allocate|Read Allocate|Cacheable |Bufferable = =20 AXI4 |Allocate Other|Allocate |Modifiable |Bufferable = =20 AXI4 |Other Allocate|Allocate |Modifiable |Bufferable = =20 Native |Same as AXI |Same as AXI |Same as AXI|Same as AXI = =20 ---------------------------------------------------------------- = =20 Note: The AHB, AXI3, AXI4, and PCIe busses use different names for certain= =20 signals, which have the same meaning: = =20 Bufferable =3D Posted = =20 Cacheable =3D Modifiable =3D Snoop (negation of No Snoop) =20 For Layerscape SoCs, MBUS_TYPE is AXI3. So I am not sure how to use snps,cache-type =3D , to cover all MBUS_TYPE? (you can notice that AHB and AXI3's cacheable are on different bit) Or I just need to handle AXI3 case? Regards, Ran