Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1136054imu; Wed, 16 Jan 2019 13:24:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN5uUJjqC0Wae5X3+DMfoEJ/Om1cg1HXIU+VMUmkgVdyJI6QoYJlkFk4x8m5aN6vu/nmBpZZ X-Received: by 2002:a17:902:12f:: with SMTP id 44mr12167865plb.74.1547673858209; Wed, 16 Jan 2019 13:24:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547673858; cv=none; d=google.com; s=arc-20160816; b=0BcJg9cLsjeMFI/imx7AxM+xkkaDySMEW6B/7ylZRBZGoXkOGYYI2XtuM6dnmBtqfs g14sbihnbuS5swGaTiLfuRnIWuk+Xb3DunxMKe5T21o+cEq8euqm4dJxbaQysBZuvYe0 AgtN+qepL8nGKxgWuh+lO8+fU1Ic1P6IUk8OF8hFBBvyglgsy8ViK+TqzkKlGlOHOj5m 0YHGZT9y09nGZIK75Dh6P0OTGskEMPyhIQrAVQ9mmV4bz6js5QqUdGXM/Bo+EHtMd/9O aJXAIS5q28HmuSOwaUh86ewoTONzisAyK9iSuqhDkrBUyYAV4hIdxmefWDEJKrYMNsjt 1d6Q== 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=1+UFMzyHE9duPvIX6ePRKtKdM1gzljS5s7QR+0EQGAE=; b=KaQbzGUzc2Umnw0BBSgL6h3+OehNB68nP1vtDTyZH8CL9cmAmxv4s3N8BtmdtU/oZN 3JBo99Pxywf9tlflB9X4/F5ODdTnDWM1je6BlAv2Je/5OqCPzKSAEVy56wo45kF59nwv dH59r4ttWbpmHHYWTWPZFuAujrZRlogMHOtNsO5RlViVB6TczfEwFIgkdwIWbLBfPp0a uVHZwQ+G/hxwhU9W9UW6w8A9xIb4ZHjPL4Xm1fz3bcxPYGXqpnoDQlhZmau90YASIqLZ 5GfJ2Fz8m1ZoU6C4zwmqwiNHFE5G5yMKySqGdsMqvZ4cjCbaY5kFEIKqBv18KdZ2Vd8S /iRA== 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 r197si8208142pfr.192.2019.01.16.13.24.00; Wed, 16 Jan 2019 13:24:18 -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 S2391731AbfAPJjL (ORCPT + 99 others); Wed, 16 Jan 2019 04:39:11 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:58213 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729019AbfAPJjL (ORCPT ); Wed, 16 Jan 2019 04:39:11 -0500 X-UUID: 078d37c2db33413ea58da6945614a314-20190116 X-UUID: 078d37c2db33413ea58da6945614a314-20190116 Received: from mtkcas32.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 621702362; Wed, 16 Jan 2019 17:39:06 +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; Wed, 16 Jan 2019 17:39:04 +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; Wed, 16 Jan 2019 17:39:02 +0800 Message-ID: <1547631542.4433.232.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: Wed, 16 Jan 2019 17:39:02 +0800 In-Reply-To: <20190115203815.GD18026@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> 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 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. 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)? > regards, > -Bin.