From patchwork Sun Sep 20 21:02:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 7226721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 201F49F372 for ; Sun, 20 Sep 2015 21:04:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42B442081A for ; Sun, 20 Sep 2015 21:04:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3ECD820747 for ; Sun, 20 Sep 2015 21:04:45 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zdll9-00070C-MB; Sun, 20 Sep 2015 21:02:55 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zdll1-0006w4-6d for linux-arm-kernel@lists.infradead.org; Sun, 20 Sep 2015 21:02:47 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 3D570C0B919F; Sun, 20 Sep 2015 21:02:29 +0000 (UTC) Received: from localhost.localdomain.com (vpn1-5-111.ams2.redhat.com [10.36.5.111]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8KL2Mns001511; Sun, 20 Sep 2015 17:02:26 -0400 From: Hans de Goede To: Felipe Balbi Subject: [PATCH] musb: sunxi: Make sunxi musb glue work without MUSB_PIO_ONLY Date: Sun, 20 Sep 2015 17:02:19 -0400 Message-Id: <1442782939-25455-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1442782939-25455-1-git-send-email-hdegoede@redhat.com> References: <1442782939-25455-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150920_140247_290940_138D83AD X-CRM114-Status: GOOD ( 10.00 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-usb , Chen-Yu Tsai , Kishon Vijay Abraham I , Hans de Goede , linux-sunxi@googlegroups.com, Maxime Ripard , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that it is possible to build in multiple dma engines, we can no longer require MUSB_PIO_ONLY to be set when using the sunxi musb glue. This patch adds dummy dma hooks to make the musb glue work without MUSB_PIO_ONLY. This hooks are fake because we do not support dma with musb on sunxi. The Allwinnner Android kernels have some dma code, but it is disabled as Allwinner never managed to get it to work. Signed-off-by: Hans de Goede --- drivers/usb/musb/sunxi.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c index 34ce5df..7b572f9 100644 --- a/drivers/usb/musb/sunxi.c +++ b/drivers/usb/musb/sunxi.c @@ -345,6 +345,16 @@ static void sunxi_musb_disable(struct musb *musb) clear_bit(SUNXI_MUSB_FL_ENABLED, &glue->flags); } +struct dma_controller *sunxi_musb_dma_controller_create(struct musb *musb, + void __iomem *base) +{ + return NULL; +} + +void sunxi_musb_dma_controller_destroy(struct dma_controller *c) +{ +} + /* * sunxi musb register layout * 0x00 - 0x17 fifo regs, 1 long per fifo @@ -570,6 +580,8 @@ static const struct musb_platform_ops sunxi_musb_ops = { .writeb = sunxi_musb_writeb, .readw = sunxi_musb_readw, .writew = sunxi_musb_writew, + .dma_init = sunxi_musb_dma_controller_create, + .dma_exit = sunxi_musb_dma_controller_destroy, .set_vbus = sunxi_musb_set_vbus, .pre_root_reset_end = sunxi_musb_pre_root_reset_end, .post_root_reset_end = sunxi_musb_post_root_reset_end,