Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3610548imu; Sun, 11 Nov 2018 19:22:25 -0800 (PST) X-Google-Smtp-Source: AJdET5dabjTdEYtTRpOrQPlkDODWwW/jA42pzPNw2K98csNnnEKlnq93lvvkixUktlTqyZREAG/+ X-Received: by 2002:a62:b24e:: with SMTP id x75-v6mr18963867pfe.148.1541992945370; Sun, 11 Nov 2018 19:22:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541992945; cv=none; d=google.com; s=arc-20160816; b=gFQukm3jlD1MMEKyGxzjpZc+blwd37aLVAxDDxRGuigKVY+6PYWsUL6CVhqyliW9zv PzfyI719BWcgWaCIn9lkGrZkkE8FieZ8/MH6Ji+E0kE8t52Y4+N3g92EqmSXWEvttFGc sZETJEqsJ5+mCwfpBErv1VXY4A6raf3Qmx9pvXbKJvfkSVF2VvYhbgPzpigyDoInjdm+ rB/48u/8LtCrT9mI/Rex4OzUKnJ5CGm65jxUi1csR5mQ4Pwo5cdfeTyvePM/RuNoA6cV AKqzms3EIpbal2nrMUd/khwSFq60aHTCcbVdsAsDkJAvtqxms8S7ucSF/xEgdyT/Ced8 JADA== 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=PApJ9gVBW/weADgYQkDvw78J1aLTxnvEBck+Vgb2Nq2EG2gMYwKVLNxH6FKm67CiTb nLE/6arvYKLpF+CwDOXNVkmxJ6OzgmucgKVBLsLc5tX0tc4jI1OLtzd7oYNkuvDWSYZp J4BkXEJQrIjb3imlHyBh+1XjhT32sifcKbM/Jy0q3URVGUloUAdTDa7mKTIcFSObd7OG w6PoNV3m1pClhENxMc5LV+WeGoDcxA3cQhni8p4ZxjfCRlhnH0Qt69eJxFbtia+3EzSc svrg4kPf7+NtxpRPn9cKRd8prtXi1miThF+G2fytrTt/UhMP8LUqrdWC/IIlULHlFNHl YC2g== 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 i186-v6si5925972pfg.265.2018.11.11.19.22.10; Sun, 11 Nov 2018 19:22:25 -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 S1730892AbeKLNMl (ORCPT + 99 others); Mon, 12 Nov 2018 08:12:41 -0500 Received: from shell.v3.sk ([90.176.6.54]:59686 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730705AbeKLNMk (ORCPT ); Mon, 12 Nov 2018 08:12:40 -0500 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Robert Jarzmik , Lubomir Rintel 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 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