Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1658208imu; Thu, 17 Jan 2019 00:52:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN6w3LmfS+EfoWJY/VLi9LPUDrfTlHN2vxGZ0iNlVtEU8nsMUKYoVVxEn3Nnqv6xl1RaFDWQ X-Received: by 2002:a63:a112:: with SMTP id b18mr12755345pgf.440.1547715174327; Thu, 17 Jan 2019 00:52:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547715174; cv=none; d=google.com; s=arc-20160816; b=vYqKJdMr06gpodeEY0n98N764JGQ7gs+n5EXABcEUqB+Gj/5biCQxt+sdGHIHLcQzs SbsiPXyjPJzlvJ0wutbrRCDos39bqtJq0N7rctlCiT9804ihbv9P0AUHzLjN4ZMGbf5D 4GrvugC9l1M81cEskNHjF9fTZSUgeOFJFwaLm24WfF3QPqlL214tkTYnnhlWWdLvRIyN XZNfWuCOuQljUzzrCncc8m86gOeHB/eEEzSLNZRXLHp7GeQmy8huklaPAex/rXPoca7K L+oreuZguhSsb6Dkd04i3ZibHpHeubKGYJHQm14u8Lw/vQP4WPBm3Wqe29ZVtRgD6pay uq+w== 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 :references:in-reply-to:date:cc:to:from:subject:message-id; bh=UVrxSTctCYChg/Kk/BRBbMO3SQfHiMKz44UWxmHVOOc=; b=f3SoLi9LdqPjzD4jdt3/AkEs3p9RSgWbB1Hn+mVWvqUoigUyFXFGauoBpHhAv4vLDT 5zud52wnx3sRuyWaLNkmo48coFIFg5bTDYqt8PEvCCJyKVpOnHkPYvsyHlpZDC4lnu9J pRDRrHPfVCT0oMiqKogh6tcTSIpbp0YWIbUHgsdqxqtoBt0oAI8FKfuhkNiTjjllBIBw g8T+iXEth4oHx8o51XXgw4349aD1cFyUJvG+nNwoET2zuSPJ9TVDOydw+i8FFfvGd7eI XB4B2JqCrVBE5JStRwqbZ/2EVMIQKeoi6T0LXrXtW/ShyhRYQOlEAKg+ydBzGdNML9Ls oDoQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14si1113530pgf.47.2019.01.17.00.52.38; Thu, 17 Jan 2019 00:52:54 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728068AbfAQDeX (ORCPT + 99 others); Wed, 16 Jan 2019 22:34:23 -0500 Received: from mailgw02.mediatek.com ([1.203.163.81]:25354 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727815AbfAQDeX (ORCPT ); Wed, 16 Jan 2019 22:34:23 -0500 X-UUID: 67bc5a0051294c1cafd0223b4c59a006-20190117 X-UUID: 67bc5a0051294c1cafd0223b4c59a006-20190117 Received: from mtkcas36.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1528284510; Thu, 17 Jan 2019 11:34:18 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Jan 2019 11:34:16 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 17 Jan 2019 11:34:16 +0800 Message-ID: <1547696056.4433.233.camel@mhfsdcap03> Subject: Re: [PATCH v2 4/4] usb: musb: Add support for MediaTek musb controller From: Min Guo To: Bin Liu CC: Rob Herring , Greg Kroah-Hartman , Mark Rutland , "Matthias Brugger" , Alan Stern , , , , , , , Yonglong Wu Date: Thu, 17 Jan 2019 11:34:16 +0800 In-Reply-To: <20190116135914.GF18026@uda0271908> References: <1547516626-5084-1-git-send-email-min.guo@mediatek.com> <1547516626-5084-5-git-send-email-min.guo@mediatek.com> <20190115203815.GD18026@uda0271908> <1547631542.4433.232.camel@mhfsdcap03> <20190116135914.GF18026@uda0271908> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-01-16 at 07:59 -0600, Bin Liu wrote: > On Wed, Jan 16, 2019 at 05:39:02PM +0800, Min Guo wrote: > > Hi Bin, > > > > On Tue, 2019-01-15 at 14:38 -0600, Bin Liu wrote: > > > Hi Min, > > > > > > very close, thanks. > > > Below I tried to explain a further cleanup in musb_clearb/w() and > > > musb_get/set_toggle() implementation. Please let me know if it is not > > > clear. > > > > > > Basically, we don't need musb_default_clearb/w(), just assign the > > > musb_io function pointers to musb_readb/w(). > > > > > > Then the mtk platform musb_clearb/w() calls musb_readb/w() and > > > musb_writeb/w() to handle W1C. > > > > Sorry to bother you again, I encounter a problem when prepare the patch. > > no problem at all. Thanks. > > The define of musb_clearb/w and musb_readb/w are difference as follow, > > and cannot be directly assigned: > > u8/u16 (*readb/w)(const void __iomem *addr, unsigned offset) > > void (*clearb/w)(void __iomem *addr, unsigned int offset)) > > > > if modify clearb/w as: > > u8/u16 (*clearb/w)(const void __iomem *addr, unsigned int offset)) > > then musb_clear needs writeb/w the const addr. > > Can I delete const in (*readb/w)? > > yes, please create a separate patch for it, and for readl() as well, > and stating it is for implementing clearing W1C registers. Okay. > Regards, > -Bin.