Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp73732ybl; Tue, 10 Dec 2019 17:56:09 -0800 (PST) X-Google-Smtp-Source: APXvYqzuiM+xxoGf8TONbPwzFTQpsQRoYSC+EHjuRjGaQyfYCyNIhCT3yLd+mAwfm/prmvKHu4ne X-Received: by 2002:a9d:7:: with SMTP id 7mr602528ota.26.1576029368954; Tue, 10 Dec 2019 17:56:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576029368; cv=none; d=google.com; s=arc-20160816; b=DLVlQjVsmQpDy6++75ktrA+kI9uPAvNsXmgr13B0WumqkaDDf/ePGpiHeIlYE7tXIg flO/Iax/TyxDV9PKq5iMbwFESgCmYFflUhCa0FmjqupHW2DPilus6mTUvF5IJ/5UpKA0 NGHFcL5ATWmr4deMjLbcaue/A+pp/RpYqyV3JRnJL8IZ4RrYMmjsDnn+lG4zNC7fiVbG wOSjB5C72xe2LMcMZYP3bMPxlgKxwtD4CvcCZsJAQXHJi9lnaG2FbarlO1ra0RqLkAXh 0NNXOjGjpH6BAW+bbL5U+8mQGycKIjiUsbOvjhVQEyuZYLePlSkYtT1vxmQt3BWF014c ZnKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tlAzxBX9ycjTVdOifSbzxIms9Y9rG2W7CX+ujLd3EZ0=; b=nuYvphG/+53sA/xh7LKDIZRtgCpsNXNKsV1HyNzIvymInf49Sm6VUZuXCT8ZUXOTcd HtYikDTykhgloUn7UHm+g/hOJ2MdMk6mwoNEZqJomgk5pD9l5BShj0izGKsco5u3Fami 9vysJ7a0IuiUg+ImltUXw/RFnBuTlheo5/63fxwQkgAMXtev4bXzwIAwPLILgH0bCIoy gKG/A2Wfd6Mx/ld4Aze1A8qskNpe6lDCfBwgStiug0YK8cdwDMI28+m95aLrvHjcK12G znIBQk2hfnwf4NET5EI4D2qhxnWSaSJaJI7/irqbXbN47YDI5VolUbvoV6FNAVw3EsC6 d5tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FVja0oTD; 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w26si153706otl.213.2019.12.10.17.55.57; Tue, 10 Dec 2019 17:56:08 -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; dkim=pass header.i=@mediatek.com header.s=dk header.b=FVja0oTD; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727607AbfLKBzU (ORCPT + 99 others); Tue, 10 Dec 2019 20:55:20 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:41400 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727420AbfLKBzS (ORCPT ); Tue, 10 Dec 2019 20:55:18 -0500 X-UUID: 5a8aad32c92f460690120230902284f1-20191211 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=tlAzxBX9ycjTVdOifSbzxIms9Y9rG2W7CX+ujLd3EZ0=; b=FVja0oTDok/fyCj9ngjsRMaXFTvkiLbGhbG5Jh3oq9dcNld1sp367U66ZzvhBa2gAXSNbuEbuej6svFD4gjA7F/Ef21IJY5noCVkF4k+XMg4DnydQY0hIPjuPonbMgROqOKpcxGgb8N2F2aMCPnu7YXedJmF1VyVNEj5YnU5h4U=; X-UUID: 5a8aad32c92f460690120230902284f1-20191211 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 728132360; Wed, 11 Dec 2019 09:55:02 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 11 Dec 2019 09:54:04 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 11 Dec 2019 09:54:55 +0800 From: To: Bin Liu , Rob Herring CC: Greg Kroah-Hartman , Mark Rutland , Matthias Brugger , Alan Stern , , , , , , , , , Min Guo , Yonglong Wu Subject: [PATCH v9 6/6] usb: musb: Add support for MediaTek musb controller Date: Wed, 11 Dec 2019 09:54:46 +0800 Message-ID: <20191211015446.11477-7-min.guo@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20191211015446.11477-1-min.guo@mediatek.com> References: <20191211015446.11477-1-min.guo@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 0E7D616F6EE3390380FA359D3DFADACE75E7945CE4BA4AF9E345364A01F2D4402000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogTWluIEd1byA8bWluLmd1b0BtZWRpYXRlay5jb20+DQoNClRoaXMgYWRkcyBzdXBwb3J0 IGZvciBNZWRpYVRlayBtdXNiIGNvbnRyb2xsZXIgaW4NCmhvc3QsIHBlcmlwaGVyYW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