linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jg1.han@samsung.com (Jingoo Han)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] USB: Add S5P OHCI diver
Date: Fri, 02 Dec 2011 09:25:14 +0900	[thread overview]
Message-ID: <001501ccb088$dc28bd40$947a37c0$%han@samsung.com> (raw)
In-Reply-To: <046e01ccb010$7175e9a0$5461bce0$%kim@samsung.com>

Kukjin Kim wrote:
> Subject: RE: [PATCH 3/3] USB: Add S5P OHCI diver
> 
> Jingoo Han wrote:
> >
> > This patch adds USB OHCI driver for Samsung S5P SoCs.
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > ---
> >  drivers/usb/Kconfig         |    1 +
> >  drivers/usb/host/Kconfig    |    6 +
> >  drivers/usb/host/ohci-hcd.c |    5 +
> >  drivers/usb/host/ohci-s5p.c |  273
> > +++++++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 285 insertions(+), 0 deletions(-)
> >  create mode 100644 drivers/usb/host/ohci-s5p.c
> >
> 
> (snip)
> 
> > +#ifdef CONFIG_PM
> > +static int s5p_ohci_suspend(struct device *dev)
> > +{
> > +	struct s5p_ohci_hcd *s5p_ohci = dev_get_drvdata(dev);
> > +	struct usb_hcd *hcd = s5p_ohci->hcd;
> > +	struct ohci_hcd *ohci = hcd_to_ohci(hcd);
> > +	struct platform_device *pdev = to_platform_device(dev);
> > +	struct s5p_ohci_platdata *pdata = pdev->dev.platform_data;
> > +	unsigned long flags;
> > +	int rc = 0;
> > +
> > +	/* Root hub was already suspended. Disable irq emission and
> > +	 * mark HW unaccessible, bail out if RH has been resumed. Use
> > +	 * the spinlock to properly synchronize with possible pending
> > +	 * RH suspend or resume activity.
> > +	 *
> > +	 * This is still racy as hcd->state is manipulated outside of
> > +	 * any locks =P But that will be a different fix.
> > +	 */
> > +	spin_lock_irqsave(&ohci->lock, flags);
> > +	if (hcd->state != HC_STATE_SUSPENDED && hcd->state != HC_STATE_HALT)
> > {
> > +		rc = -EINVAL;
> > +		goto fail;
> > +	}
> > +
> > +	clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
> > +
> > +	if (pdata && pdata->phy_exit)
> > +		pdata->phy_exit(pdev, S5P_USB_PHY_HOST);
> 
> Since ohci and echi share the code for control of phy, this can make a
> problem when this is used by module or doing suspend-to-resume. So need to
> sort it out.
OK, I will fix phy control function.
> 
> And how about to use ohci-exynos instead of ohci-s5p? As you know, this
> can/will be used on EXYNOS SoCs.
OK, I will use ohci-exynos.
Thanks.
> 
> Others, ok to me. If you address comments from me, you can add my ack.
> 
> Thanks.
> 
> Best regards,
> Kgene.
> --
> Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.

      reply	other threads:[~2011-12-02  0:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  6:31 [PATCH 3/3] USB: Add S5P OHCI diver Jingoo Han
2011-12-01 10:03 ` Kukjin Kim
2011-12-02  0:25   ` Jingoo Han [this message]

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='001501ccb088$dc28bd40$947a37c0$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).