From patchwork Wed Nov 28 17:53:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10703049 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78D6114BD for ; Wed, 28 Nov 2018 17:55:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64A372CDD8 for ; Wed, 28 Nov 2018 17:55:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 580692DBEC; Wed, 28 Nov 2018 17:55:43 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F1F9F2CDD8 for ; Wed, 28 Nov 2018 17:55:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6zBleMCHDFnT+SMr6G8RjeSu0Y36Imjr/4pk+OQhc4M=; b=epNr8qgywJuz5J ONjy/dhR1lGYIYUbFZnl641Bqjd7upnu7nHL9LqYq48bj5xivFZ12wQ82g9WLxiAvtmj9bmvGGiXl lwdW/W7EPJXGOsjyM45pAVgB6bdiLReBRsaRYWQTqRC+Dq4ZRgbjDOo7mmjE+iPBEsL+GS57R2U17 qQ0SgyyvhQuAXmWJXCWC9e5tL7gYkuk5QQSA6FJ4gvZ4hI6mqCkiHjis/sQ69m3d0uEPtNO73Qmbl cQzpuI/Y0XSE1LgiO8NjwcRtoraZzWDxiGWKN3zXdEzv9si22fv+f1spYldEtZfwmnEAJQ4XRYlko QxAkl6w+QGBEgm7W2FwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS43h-0006mz-UB; Wed, 28 Nov 2018 17:55:33 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42c-0004mf-4e for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Nov 2018 17:54:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=eJesBJt1Yi3wb0N4DK63VmugL0BgSCk8U9n8jpg2fOY=; b=kEIKkwZWh7SxcV3cA7FU5k5dMm aRlDODAUzSO5BaNDfUM0d2UUexfjpl7Tf3IwK4TRzk4RRtoBEs4E/Ah6v5L4Jh05F0wi/ipj8XraA tIb0Y56OhJ9PicKYJkesGzPL8vzKCfkCVaVaU2u8EdrIFcmPKYDOxKzLNtdcvKNiAEXihpcYdxQyU kSNzww0m1Xmm47CkcL623TrddgAjWLzbBWSyIIW1/3NMvp+nQH0p/+nxpgTCRlcIODNDkBtp+A5Zj pnxQ03EGVZ+azD4as0O667urV52LDDYneEm7r4clgqJG2n452IrqpZYGGXidgDjDRHPOXkDdiwSL6 9xBBnlww==; Received: from shell.v3.sk ([90.176.6.54]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gS42Y-0007xf-U8 for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2018 17:54:23 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3E12D99994; Wed, 28 Nov 2018 18:54:16 +0100 (CET) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jdfuYrtUC_6B; Wed, 28 Nov 2018 18:54:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D151A99B26; Wed, 28 Nov 2018 18:53:43 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lpCOhlH7fOn4; Wed, 28 Nov 2018 18:53:40 +0100 (CET) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 0727B99B42; Wed, 28 Nov 2018 18:53:33 +0100 (CET) From: Lubomir Rintel To: arm@kernel.org, Olof Johansson , Arnd Bergmann Subject: [PATCH v4 17/20] ARM: mmp: add a pxa-usb-phy device Date: Wed, 28 Nov 2018 18:53:21 +0100 Message-Id: <20181128175324.163202-18-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181128175324.163202-1-lkundrak@v3.sk> References: <20181128175324.163202-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181128_125423_140137_3C7D3697 X-CRM114-Status: GOOD ( 12.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Miao , James Cameron , Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek , Robert Jarzmik , linux-arm-kernel@lists.infradead.org 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 This is to replace the USB PHY initialization code (pxa_usb_phy_init(), pxa_usb_phy_deinit()) with a proper PHY driver. Signed-off-by: Lubomir Rintel --- arch/arm/mach-mmp/devices.c | 21 +++++++++++++++++++++ arch/arm/mach-mmp/pxa910.h | 1 + 2 files changed, 22 insertions(+) diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c index 0fca63c80e1a..822b8be042b9 100644 --- a/arch/arm/mach-mmp/devices.c +++ b/arch/arm/mach-mmp/devices.c @@ -240,6 +240,27 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg) #if IS_ENABLED(CONFIG_USB_SUPPORT) static u64 __maybe_unused usb_dma_mask = ~(u32)0; +#if IS_ENABLED(CONFIG_PHY_PXA_USB) +struct resource pxa168_usb_phy_resources[] = { + [0] = { + .start = PXA168_U2O_PHYBASE, + .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, + .flags = IORESOURCE_MEM, + }, +}; + +struct platform_device pxa168_device_usb_phy = { + .name = "pxa-usb-phy", + .id = -1, + .resource = pxa168_usb_phy_resources, + .num_resources = ARRAY_SIZE(pxa168_usb_phy_resources), + .dev = { + .dma_mask = &usb_dma_mask, + .coherent_dma_mask = 0xffffffff, + } +}; +#endif /* CONFIG_PHY_PXA_USB */ + #if IS_ENABLED(CONFIG_USB_MV_UDC) struct resource pxa168_u2o_resources[] = { /* regbase */ diff --git a/arch/arm/mach-mmp/pxa910.h b/arch/arm/mach-mmp/pxa910.h index 42009c349eae..2dfe38e4acc1 100644 --- a/arch/arm/mach-mmp/pxa910.h +++ b/arch/arm/mach-mmp/pxa910.h @@ -22,6 +22,7 @@ extern struct pxa_device_desc pxa910_device_pwm2; extern struct pxa_device_desc pxa910_device_pwm3; extern struct pxa_device_desc pxa910_device_pwm4; extern struct pxa_device_desc pxa910_device_nand; +extern struct platform_device pxa168_device_usb_phy; extern struct platform_device pxa168_device_u2o; extern struct platform_device pxa168_device_u2ootg; extern struct platform_device pxa168_device_u2oehci;