Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1464013imu; Wed, 28 Nov 2018 09:55:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/W6Xyt4fxJRwLy2L+RyKwQDfqW32sS18JTWVOwFNf90FcppqPGg+HaP1sEum1TOYCG7LHv9 X-Received: by 2002:a63:d208:: with SMTP id a8mr33398041pgg.77.1543427744861; Wed, 28 Nov 2018 09:55:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543427744; cv=none; d=google.com; s=arc-20160816; b=MJLikpgpzHKmhiGy5UKX0r+t/aPES8yLjG3TB7bwvYIRoSHqrNRI2+ExxGYL6KFs7m uo3fBHolw5s4aBe3ZHysK0Fdusolvoua8xYqgq71t5OQhX3qbwBJf2FqKWNlfycG8vSC lg8DNnBPNCxt4XbEQyyP4b+PXK6Jom+VeCOwvipaBAjx0ARUqSythxm6dEVrFruKhreX HBgogTsx7kGP0cUIPIk/4kvsvaJytaynmV2j++ixumby2VOaDEyfTDG2ivq+M97/NdYo MKgGPIsX8v9Yuq4avZoHmU1ybwn7UCMnmTB5ft6q9ib312sLj2MJ2cQuCB5OnwIobf0x mFVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=eJesBJt1Yi3wb0N4DK63VmugL0BgSCk8U9n8jpg2fOY=; b=EBKWL3Gs/SCUSw6oRhMPLTHFPxoAu7ksYWQHJ2rhcUaRmVA/uL4xnIRYQpweALHWQS RFasqiFMz6/Umqh/WYWeXUfe2Gz3l2Rx0XjeQ4Vb35AWZeUluSXHRRQANCKLTpFQJnD1 WKnoyQWOl/j8BwxXVC38eavFpDrmcE5XfMpND4UwlJ3J4yoTlPVLryP4QQ/cxE+uN6+l FbnqSIIygM7xcwvzxlyP4gNh7uiLtyvG7JBjQ0+B4A3C01+nwFL2bujDbF+xqqc6hNsB bUL4laiY4Z+pw2Va2xwLFNPia1krBm+moMEEs+5vDAmBiVr0bOjwgJN/Nhh0Vvbk9985 zwhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h91si8201209pld.411.2018.11.28.09.55.27; Wed, 28 Nov 2018 09:55:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729531AbeK2E4p (ORCPT + 99 others); Wed, 28 Nov 2018 23:56:45 -0500 Received: from shell.v3.sk ([90.176.6.54]:39477 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728807AbeK2E4p (ORCPT ); Wed, 28 Nov 2018 23:56:45 -0500 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 Cc: Eric Miao , Haojian Zhuang , Russell King , Robert Jarzmik , Pavel Machek , James Cameron , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lubomir Rintel 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 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 =3D ~(u32)0; =20 +#if IS_ENABLED(CONFIG_PHY_PXA_USB) +struct resource pxa168_usb_phy_resources[] =3D { + [0] =3D { + .start =3D PXA168_U2O_PHYBASE, + .end =3D PXA168_U2O_PHYBASE + USB_PHY_RANGE, + .flags =3D IORESOURCE_MEM, + }, +}; + +struct platform_device pxa168_device_usb_phy =3D { + .name =3D "pxa-usb-phy", + .id =3D -1, + .resource =3D pxa168_usb_phy_resources, + .num_resources =3D ARRAY_SIZE(pxa168_usb_phy_resources), + .dev =3D { + .dma_mask =3D &usb_dma_mask, + .coherent_dma_mask =3D 0xffffffff, + } +}; +#endif /* CONFIG_PHY_PXA_USB */ + #if IS_ENABLED(CONFIG_USB_MV_UDC) struct resource pxa168_u2o_resources[] =3D { /* 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; --=20 2.19.1