From patchwork Fri May 6 09:00:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 94346 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A85D8B6FD1 for ; Fri, 6 May 2011 19:00:21 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QIGtT-00005a-8w; Fri, 06 May 2011 09:00:15 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1QIGtR-0005bu-Qc; Fri, 06 May 2011 09:00:13 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QIGtO-0005bb-Ge for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2011 09:00:11 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1QIGtL-0008LW-Fo; Fri, 06 May 2011 11:00:07 +0200 Received: from ukl by octopus.hi.pengutronix.de with local (Exim 4.75) (envelope-from ) id 1QIGtL-0000II-6N; Fri, 06 May 2011 11:00:07 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] [RFC] USB: fsl_udc_core: fix build-failure for ARM Date: Fri, 6 May 2011 11:00:05 +0200 Message-Id: <1304672405-1102-1-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <20110505135029.0c068b8e@wker> References: <20110505135029.0c068b8e@wker> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110506_050010_970247_B6906C7A X-CRM114-Status: GOOD ( 18.45 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Anatolij Gustschin , linux-usb@vger.kernel.org, Greg Kroah-Hartman , kernel@pengutronix.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Commit 09ba0de (USB: fsl_udc_core: prepare for SoCs with BE registers and descriptors) introduced two function pointers _fsl_readl and _fsl_writel in an #ifdef CONFIG_PPC32 block and used then unconditionally in fsl_udc_probe. To make the driver compile again this use has to be protected by an #ifdef, too. Moreover ARM doesn't have flush_dcache_range so this is #ifdefed out, too. Signed-off-by: Uwe Kleine-König --- Hello, I'm unsure about getting rid of the flush_dcache_range. If powerpc needs a flush ARM probably does, too, no? If so, what it the right thing to do? Implement flush_dcache_range for ARM (just wrapping flush_dcache_page?)? Best regards Uwe drivers/usb/gadget/fsl_udc_core.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index 999eafe..47152e0 100644 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -1333,8 +1333,10 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value, /* Fill in the reqest structure */ *((u16 *) req->req.buf) = cpu_to_le16(tmp); +#ifdef CONFIG_PPC32 /* flush cache for the req buffer */ flush_dcache_range((u32)req->req.buf, (u32)req->req.buf + 8); +#endif req->ep = ep; req->req.length = 2; @@ -2455,6 +2457,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev) } /* Set accessors only after pdata->init() ! */ +#ifdef CONFIG_PPC32 if (pdata->big_endian_mmio) { _fsl_readl = _fsl_readl_be; _fsl_writel = _fsl_writel_be; @@ -2462,6 +2465,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev) _fsl_readl = _fsl_readl_le; _fsl_writel = _fsl_writel_le; } +#endif #ifndef CONFIG_ARCH_MXC if (pdata->have_sysif_regs)