linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: stern@rowland.harvard.edu
Cc: linux-usb@vger.kernel.org, Florian Fainelli <florian@openwrt.org>,
	Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: [PATCH 15/24 v2] MIPS: PNX8550: use OHCI platform driver
Date: Thu,  4 Oct 2012 17:17:43 +0200	[thread overview]
Message-ID: <1349363872-27004-16-git-send-email-florian@openwrt.org> (raw)
In-Reply-To: <1349363872-27004-1-git-send-email-florian@openwrt.org>

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
No changes since v1

 arch/mips/pnx8550/common/platform.c |   31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/arch/mips/pnx8550/common/platform.c b/arch/mips/pnx8550/common/platform.c
index 5264cc0..0a8faea 100644
--- a/arch/mips/pnx8550/common/platform.c
+++ b/arch/mips/pnx8550/common/platform.c
@@ -20,6 +20,7 @@
 #include <linux/serial.h>
 #include <linux/serial_pnx8xxx.h>
 #include <linux/platform_device.h>
+#include <linux/usb/ohci_pdriver.h>
 
 #include <int.h>
 #include <usb.h>
@@ -96,12 +97,40 @@ static u64 ohci_dmamask = DMA_BIT_MASK(32);
 
 static u64 uart_dmamask = DMA_BIT_MASK(32);
 
+static int pnx8550_usb_ohci_power_on(struct platform_device *pdev)
+{
+	/*
+	 * Set register CLK48CTL to enable and 48MHz
+	 */
+	outl(0x00000003, PCI_BASE | 0x0004770c);
+
+	/*
+	 * Set register CLK12CTL to enable and 48MHz
+	 */
+	outl(0x00000003, PCI_BASE | 0x00047710);
+
+	udelay(100);
+
+	return 0;
+}
+
+static void pnx8550_usb_ohci_power_off(struct platform_device *pdev)
+{
+	udelay(10);
+}
+
+static struct usb_ohci_pdata pnx8550_usb_ohci_pdata = {
+	.power_on	= pnx8550_usb_ohci_power_on,
+	.power_off	= pnx8550_usb_ohci_power_off,
+};
+
 static struct platform_device pnx8550_usb_ohci_device = {
-	.name		= "pnx8550-ohci",
+	.name		= "ohci-platform",
 	.id		= -1,
 	.dev = {
 		.dma_mask		= &ohci_dmamask,
 		.coherent_dma_mask	= DMA_BIT_MASK(32),
+		.platform_data		= &pnx8550_usb_ohci_pdata,
 	},
 	.num_resources	= ARRAY_SIZE(pnx8550_usb_ohci_resources),
 	.resource	= pnx8550_usb_ohci_resources,
-- 
1.7.9.5


  parent reply	other threads:[~2012-10-04 15:23 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1349363872-27004-1-git-send-email-florian@openwrt.org>
2012-10-04 15:17 ` [PATCH 01/24 v2] USB: EHCI: remove IXP4xx EHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 02/24 v2] MIPS: Loongson 1B: use ehci-platform instead of ehci-ls1x Florian Fainelli
2012-10-04 15:17 ` [PATCH 03/24 v2] USB: EHCI: remove Loongson 1B EHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 04/24 v2] MIPS: Netlogic: use ehci-platform driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 05/24 v2] USB: EHCI: remove Netlogic XLS EHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 06/24 v2] USB: EHCI: add no_io_watchdog platform_data parameter to ehci-platform Florian Fainelli
2012-10-04 18:58   ` Alan Stern
2012-10-04 15:17 ` [PATCH 07/24 v2] MIPS: Alchemy: use the ehci platform driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 08/24 v2] USB: EHCI: remove Alchemy EHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 09/24 v2] ARM: cns3xxx: use ehci platform driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 10/24 v2] USB: EHCI: remove CNS3xxx EHCI " Florian Fainelli
2012-10-04 15:17 ` [PATCH 11/24 v2] USB: ohci: allow platform driver to specify the number of ports Florian Fainelli
2012-10-04 15:17 ` [PATCH 12/24] USB: ohci: move ohci_pci_{suspend,resume} to ohci-hcd.c Florian Fainelli
2012-10-04 19:07   ` Alan Stern
2012-10-04 15:17 ` [PATCH 13/24] USB: ohci: remove check for RH already suspended in ohci_suspend Florian Fainelli
2012-10-04 15:17 ` [PATCH 14/24] USB: ohci: merge ohci_finish_controller_resume with ohci_resume Florian Fainelli
2012-10-05  1:38   ` Jingoo Han
2012-10-05  7:42   ` Nicolas Ferre
2012-10-04 15:17 ` Florian Fainelli [this message]
2012-10-04 15:17 ` [PATCH 16/24 v2] USB: OHCI: remove PNX8550 OHCI driver Florian Fainelli
2012-10-04 15:17 ` [PATCH 17/24 v2] ARM: cns3xxx: use OHCI platform driver Florian Fainelli
2012-10-04 19:19   ` Alan Stern
2012-10-04 15:17 ` [PATCH 18/24 v2] USB: OHCI: remove CNS3xxx " Florian Fainelli
2012-10-04 15:17 ` [PATCH 19/24 v2] MIPS: Netlogic: convert to use " Florian Fainelli
2012-10-04 15:17 ` [PATCH 20/24 v2] USB: OHCI: remove Netlogic XLS " Florian Fainelli
2012-10-04 15:17 ` [PATCH 21/24 v2] sh: convert boards to use the " Florian Fainelli
2012-10-04 15:17 ` [PATCH 22/24 v2] USB: OHCI: remove OHCI SH " Florian Fainelli
2012-10-04 15:17 ` [PATCH 23/24 v2] MIPS: Alchemy: use the OHCI " Florian Fainelli
2012-10-04 15:17 ` [PATCH 24/24 v2] USB: OHCI: remove Alchemy " Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349363872-27004-16-git-send-email-florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).