From patchwork Mon Jan 2 20:57:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 9494129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 77AC860414 for ; Mon, 2 Jan 2017 20:59:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6947D2015F for ; Mon, 2 Jan 2017 20:59:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E2D92679B; Mon, 2 Jan 2017 20:59:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F03E2015F for ; Mon, 2 Jan 2017 20:59:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cO9gC-0003ai-DO; Mon, 02 Jan 2017 20:58:04 +0000 Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cO9fy-0003YZ-Dg for linux-arm-kernel@lists.infradead.org; Mon, 02 Jan 2017 20:57:52 +0000 Received: from localhost.localdomain (85-76-73-113-nat.elisa-mobile.fi [85.76.73.113]) by emh04.mail.saunalahti.fi (Postfix) with ESMTP id 4414C1A26BD; Mon, 2 Jan 2017 22:57:26 +0200 (EET) From: Aaro Koskinen To: Tony Lindgren , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] ARM: OMAP1: USB: delete redundant CPU class checks Date: Mon, 2 Jan 2017 22:57:05 +0200 Message-Id: <20170102205705.19001-3-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20170102205705.19001-1-aaro.koskinen@iki.fi> References: <20170102205705.19001-1-aaro.koskinen@iki.fi> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170102_125750_719176_000C55FF X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. 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: Aaro Koskinen MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Delete redundant CPU class checks. This code is only used on OMAP1 nowadays. Signed-off-by: Aaro Koskinen --- arch/arm/mach-omap1/usb.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 0b4ed94..455e2cf 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c @@ -1,5 +1,5 @@ /* - * Platform level USB initialization for FS USB OTG controller on omap1 and 24xx + * Platform level USB initialization for FS USB OTG controller on omap1 * * Copyright (C) 2004 Texas Instruments, Inc. * @@ -63,6 +63,7 @@ omap_otg_init(struct omap_usb_config *config) { u32 syscon; int alt_pingroup = 0; + u16 w; /* NOTE: no bus or clock setup (yet?) */ @@ -87,9 +88,8 @@ omap_otg_init(struct omap_usb_config *config) if (config->otg) syscon |= OTG_EN; #endif - if (cpu_class_is_omap1()) - pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", - omap_readl(USB_TRANSCEIVER_CTRL)); + pr_debug("USB_TRANSCEIVER_CTRL = %03x\n", + omap_readl(USB_TRANSCEIVER_CTRL)); pr_debug("OTG_SYSCON_2 = %08x\n", omap_readl(OTG_SYSCON_2)); omap_writel(syscon, OTG_SYSCON_2); @@ -107,19 +107,16 @@ omap_otg_init(struct omap_usb_config *config) pr_cont(", Mini-AB on usb%d", config->otg - 1); pr_cont("\n"); - if (cpu_class_is_omap1()) { - u16 w; + /* leave USB clocks/controllers off until needed */ + w = omap_readw(ULPD_SOFT_REQ); + w &= ~SOFT_USB_CLK_REQ; + omap_writew(w, ULPD_SOFT_REQ); - /* leave USB clocks/controllers off until needed */ - w = omap_readw(ULPD_SOFT_REQ); - w &= ~SOFT_USB_CLK_REQ; - omap_writew(w, ULPD_SOFT_REQ); + w = omap_readw(ULPD_CLOCK_CTRL); + w &= ~USB_MCLK_EN; + w |= DIS_USB_PVCI_CLK; + omap_writew(w, ULPD_CLOCK_CTRL); - w = omap_readw(ULPD_CLOCK_CTRL); - w &= ~USB_MCLK_EN; - w |= DIS_USB_PVCI_CLK; - omap_writew(w, ULPD_CLOCK_CTRL); - } syscon = omap_readl(OTG_SYSCON_1); syscon |= HST_IDLE_EN|DEV_IDLE_EN|OTG_IDLE_EN;