devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Grzeschik <mgr-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Alexander Shishkin
	<alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Michael Grzeschik
	<m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH v2 6/7] usb: chipidea: usbmisc: add mx53 support
Date: Tue, 20 Nov 2012 15:44:55 +0100	[thread overview]
Message-ID: <20121120144455.GA9846@pengutronix.de> (raw)
In-Reply-To: <87obix65t1.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>

On Fri, Nov 16, 2012 at 03:22:34PM +0200, Alexander Shishkin wrote:
> Michael Grzeschik <m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> writes:
> 
> > This adds mx53 as the next user of the usbmisc driver and makes it
> > possible to disable the overcurrent-detection of the internal phy.
> >
> > Signed-off-by: Michael Grzeschik <m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > ---
> >  drivers/usb/chipidea/usbmisc_imx.c |   28 ++++++++++++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >
> > diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c
> > index 913e414..9718500 100644
> > --- a/drivers/usb/chipidea/usbmisc_imx.c
> > +++ b/drivers/usb/chipidea/usbmisc_imx.c
> > @@ -54,6 +54,29 @@ static struct usbmisc_usb_device *get_usbdev(struct device *dev)
> >  	return &usbmisc->usbdev[i];
> >  }
> >  
> > +static int usbmisc_imx53_init(struct device *dev)
> > +{
> > +	struct usbmisc_usb_device *usbdev;
> > +	void __iomem *reg;
> > +	unsigned long flags;
> > +	u32 val;
> > +
> > +	usbdev = get_usbdev(dev);
> > +	if (IS_ERR(usbdev))
> > +		return PTR_ERR(usbdev);
> > +
> > +	reg = usbmisc->base + usbdev->index * 8;
> > +
> > +	if (usbdev->disable_oc) {
> > +		spin_lock_irqsave(&usbmisc->lock, flags);
> > +		val = readl(reg);
> > +		writel(val | (1 << 5), reg);
> 
> We know now that (1 << 5) probably means "disable overcurrent
> detection", but is there a definition for this register's bits
> somewhere?

Will add defines for the magic numbers used.

Thanks,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-11-20 14:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 12:03 [PATCH v2 0/7] support other fsl SoCs with usbmisc + small fixes Michael Grzeschik
     [not found] ` <1352981028-14312-1-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-11-15 12:03   ` [PATCH v2 1/7] usb: chipidea: usbmisc: rename file, struct and functions to usbmisc_imx Michael Grzeschik
2012-11-15 12:03   ` [PATCH v2 2/7] usb: chipidea: usbmisc: unset global varibale usbmisc on driver remove Michael Grzeschik
2012-11-15 12:03   ` [PATCH v2 3/7] usb: chipidea: usbmisc: fix a potential race condition Michael Grzeschik
2012-11-15 12:03   ` [PATCH v2 4/7] usb: chipidea: usbmisc: prepare driver to handle more than one soc Michael Grzeschik
2012-11-15 12:03   ` [PATCH v2 5/7] usb: chipidea: usbmisc: add support for ahb, ipg and per clock Michael Grzeschik
     [not found]     ` <1352981028-14312-6-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-11-16 13:17       ` Alexander Shishkin
     [not found]         ` <87r4nt6610.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>
2012-11-20 15:09           ` Sascha Hauer
2012-11-15 12:03   ` [PATCH v2 6/7] usb: chipidea: usbmisc: add mx53 support Michael Grzeschik
     [not found]     ` <1352981028-14312-7-git-send-email-m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-11-16 13:22       ` Alexander Shishkin
     [not found]         ` <87obix65t1.fsf-qxRn5AmX6ZD9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>
2012-11-20 14:44           ` Michael Grzeschik [this message]
2012-11-15 12:03   ` [PATCH v2 7/7] usb: chipidea: usbmisc: add post handling and errata fix for mx25 Michael Grzeschik

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=20121120144455.GA9846@pengutronix.de \
    --to=mgr-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=m.grzeschik-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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).