Re: [PATCH 091/115] ehci-msm : use ehci_setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le Thu, 1 Sep 2011 16:05:59 -0700,
Greg KH <greg@xxxxxxxxx> a écrit :

> On Thu, Sep 01, 2011 at 01:33:08PM +0200, Matthieu CASTET wrote:
> > Hi Greg,
> > 
> > 
> > didn't you forgot the first part of the patch [1] ?
> > I don't see it in your patch list, and without this patch, msm
> > driver won't build (ehci_setup isn't defined).
> 
> I don't know.
> 
> Is this still a problem with the 3.1-rc3 release?
>
Yes it is really missing from 3.1-rc4.

I attach the missing patch. I checked that it applies correctly.


Matthieu
>From 8b7465beae54e98746b2360e6da92f88119f30c8 Mon Sep 17 00:00:00 2001
From: Matthieu CASTET <castet.matthieu@xxxxxxx>
Date: Sat, 2 Jul 2011 19:47:33 +0200
Subject: [PATCH 1/2] EHCI : introduce a common ehci_setup

This allow to clean duplicated code in most of SOC driver.

Signed-off-by: Matthieu CASTET <castet.matthieu@xxxxxxx>
Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
---
 drivers/usb/host/ehci-hcd.c |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f8030ee..f990b0f 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -763,6 +763,35 @@ static int ehci_run (struct usb_hcd *hcd)
 	return 0;
 }
 
+static int __maybe_unused ehci_setup (struct usb_hcd *hcd)
+{
+	struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+	int retval;
+
+	ehci->regs = (void __iomem *)ehci->caps +
+	    HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase));
+	dbg_hcs_params(ehci, "reset");
+	dbg_hcc_params(ehci, "reset");
+
+	/* cache this readonly data; minimize chip reads */
+	ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
+
+	ehci->sbrn = HCD_USB2;
+
+	retval = ehci_halt(ehci);
+	if (retval)
+		return retval;
+
+	/* data structure init */
+	retval = ehci_init(hcd);
+	if (retval)
+		return retval;
+
+	ehci_reset(ehci);
+
+	return 0;
+}
+
 /*-------------------------------------------------------------------------*/
 
 static irqreturn_t ehci_irq (struct usb_hcd *hcd)
-- 
1.7.5.4


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux