From patchwork Wed Aug 22 20:42:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Rintel X-Patchwork-Id: 10573245 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 7C10B139B for ; Wed, 22 Aug 2018 20:44:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CA8C2B5C5 for ; Wed, 22 Aug 2018 20:44:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 604112BBE4; Wed, 22 Aug 2018 20:44:59 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11E052B5C5 for ; Wed, 22 Aug 2018 20:44:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728333AbeHWAKB (ORCPT ); Wed, 22 Aug 2018 20:10:01 -0400 Received: from shell.v3.sk ([90.176.6.54]:53284 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbeHWAKA (ORCPT ); Wed, 22 Aug 2018 20:10:00 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id CC3FAB5BAF; Wed, 22 Aug 2018 22:43:33 +0200 (CEST) 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 Re3kFEHfsQWd; Wed, 22 Aug 2018 22:43:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id AFC54B5B98; Wed, 22 Aug 2018 22:43:14 +0200 (CEST) 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 jNXVU1hubUyr; Wed, 22 Aug 2018 22:43:12 +0200 (CEST) Received: from odvarok.lan (ip-89-102-31-34.net.upcbroadband.cz [89.102.31.34]) by zimbra.v3.sk (Postfix) with ESMTPSA id BB0FCB5B8C; Wed, 22 Aug 2018 22:43:11 +0200 (CEST) From: Lubomir Rintel To: linux-kernel@vger.kernel.org Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rob Herring , Mark Rutland , Greg Kroah-Hartman , Eric Miao , Haojian Zhuang , Kishon Vijay Abraham I , Alan Stern , Lubomir Rintel Subject: [PATCH 04/14] ARM: mmp: add a pxa-usb-phy device Date: Wed, 22 Aug 2018 22:42:57 +0200 Message-Id: <20180822204307.13251-5-lkundrak@v3.sk> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180822204307.13251-1-lkundrak@v3.sk> References: <20180822204307.13251-1-lkundrak@v3.sk> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.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 671c7a09ab3d..d162fabd38e7 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;