From patchwork Mon Nov 12 03:20:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10678071 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 26A6414BA for ; Mon, 12 Nov 2018 03:24:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15C2B2A108 for ; Mon, 12 Nov 2018 03:24:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A0C82A155; Mon, 12 Nov 2018 03:24:24 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 778412A108 for ; Mon, 12 Nov 2018 03:24:23 +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=rTEBwRKq06wblU SHYGewXLFnpHmk1vMupma4XRQaBAwqyMqqBvYILhXj5qQnZjcqHQL/hsatEuX1xeUqsp1tNGmDzxE boKXDa+M40h9SNd/YuZ8mtc726jbW4qWb238DwLUB1VUAZ0QbF9a45dxtQuvyBiEQNlrAKM3N5n0u biBqPjzl8zs1x5QtbzfkAy5GvBJ7Uv4H5UcX//z4EOGOg5e4rfDXzgliAghHPQ8ejw1/MPF8ejaRS LP1lpQuuJG9gG4CgApuaako7XePplpa5EyiMfmA3f/mNAOghRy8YyZQy/fCDFVdV+cSfBxV/ld1Dl SSz2DMUCatZKTTgWg9lg==; 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 1gM2pp-00013U-BJ; Mon, 12 Nov 2018 03:24:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2nB-0006zt-Go for linux-arm-kernel@bombadil.infradead.org; Mon, 12 Nov 2018 03:21:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=fvDRq/dIux7Y9UqK1j0Peq1ljh qGGIbDXpAtaaoHjuphTNdehJuO/spWgR8nl+mxtq6EWI4neDxhmJvbffCwgajBsW1dG7mQE+3rckg 9nSMPJE4oYlwPuX7en13KiNe2PXlfLoDI/y2Uq4R7gh0QGs5sIAuxhh6NPOF3whszazWlCFXSqtU2 24Q90My6AMt112dPagjEQDT7CG+DghqFUd0quHTS7E2jaQ4ErZPPE3zwZTCgmgSXVIlmOEcmKc1zc 54sIgWySuF5Fn5xLDV7bS3DPygmQg1lRYL4NsP6jE9eA28VkyfKPBGIQQ3gWC8qtFXTKe+Shs1Cvg 6dLL+d0A==; Received: from shell.v3.sk ([90.176.6.54]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gM2n8-0005yM-8b for linux-arm-kernel@lists.infradead.org; Mon, 12 Nov 2018 03:21:35 +0000 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 901FFC6A34; Mon, 12 Nov 2018 04:21:30 +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 v5vkDEIy6beg; Mon, 12 Nov 2018 04:21:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 3CE1FC6A2C; Mon, 12 Nov 2018 04:20:47 +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 mu-1YG6p01PQ; Mon, 12 Nov 2018 04:20:44 +0100 (CET) Received: from belphegor.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id D1EE7C6A36; Mon, 12 Nov 2018 04:20:39 +0100 (CET) From: Lubomir Rintel To: Eric Miao , Haojian Zhuang Subject: [PATCH v3 15/18] ARM: mmp: add a pxa-usb-phy device Date: Mon, 12 Nov 2018 04:20:24 +0100 Message-Id: <20181112032027.653931-16-lkundrak@v3.sk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181112032027.653931-1-lkundrak@v3.sk> References: <20181112032027.653931-1-lkundrak@v3.sk> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181112_032134_355122_7E4B9349 X-CRM114-Status: GOOD ( 10.96 ) 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: Lubomir Rintel , Robert Jarzmik , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King 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;