All of lore.kernel.org
 help / color / mirror / Atom feed
From: "B, Ravi" <ravibabu@ti.com>
To: "Balbi, Felipe" <balbi@ti.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v1 2/3] usb: musb: core: added babble recovery func-ptr to musb->ops
Date: Wed, 26 Jun 2013 08:37:39 +0000	[thread overview]
Message-ID: <6C6B28D4DC342643927BEAFCE8707BF63EB18D85@DBDE04.ent.ti.com> (raw)
In-Reply-To: <20130626082620.GN12640@arwen.pp.htv.fi>

Felipe

> 
> On Wed, May 29, 2013 at 06:37:03PM +0530, Ravi Babu wrote:
> > Adding babble_recovery operation as part of musb->ops, used to recover
> > from babble condition during babble interrupt.
> >
> > Signed-off-by: Ravi Babu <ravibabu@ti.com>
> > ---
> >  drivers/usb/musb/musb_core.c |    6 ++++++
> >  drivers/usb/musb/musb_core.h |    7 +++++++
> >  2 files changed, 13 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/usb/musb/musb_core.c
> > b/drivers/usb/musb/musb_core.c index ab6fa39..411c29d 100644
> > --- a/drivers/usb/musb/musb_core.c
> > +++ b/drivers/usb/musb/musb_core.c
> > @@ -857,6 +857,12 @@ b_host:
> >  		}
> >  	}
> >
> > +	/* handle babble condition */
> > +	if (int_usb & MUSB_INTR_BABBLE) {
> > +		pr_info("babble: restarting the musb controller..");
> > +		musb_babble_recovery(musb);
> > +	}
> > +
> >  #if 0
> >  /* REVISIT ... this would be for multiplexing periodic endpoints, or
> >   * supporting transfer phasing to prevent exceeding ISO bandwidth
> > diff --git a/drivers/usb/musb/musb_core.h
> > b/drivers/usb/musb/musb_core.h index f96e899..bf37dc9 100644
> > --- a/drivers/usb/musb/musb_core.h
> > +++ b/drivers/usb/musb/musb_core.h
> > @@ -213,6 +213,8 @@ struct musb_platform_ops {
> >  	int	(*adjust_channel_params)(struct dma_channel *channel,
> >  				u16 packet_sz, u8 *mode,
> >  				dma_addr_t *dma_addr, u32 *len);
> > +
> > +	void	(*babble_recovery)(struct musb *musb);
> 
> I don't get why can't 'babble_recovery' be generic. Why do we need each glue
> layer to implement it ?
> 

Babble is generic, but recovery mechanism is nothing but "reset of usbss" which is SoC dependent and followed by generic restart of the musb controller. 
That is why musb_restart() API is exported used by all glue in babble recovery.

--
Ravi B

  reply	other threads:[~2013-06-26  8:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 13:07 [PATCH v1 0/3] babble error workaround for am335x platform Ravi Babu
2013-05-29 13:07 ` [PATCH v1 1/3] usb: musb: core: added musb_restart() API to handle babble condition Ravi Babu
2013-06-26  8:24   ` Felipe Balbi
2013-05-29 13:07 ` [PATCH v1 2/3] usb: musb: core: added babble recovery func-ptr to musb->ops Ravi Babu
2013-06-26  8:26   ` Felipe Balbi
2013-06-26  8:37     ` B, Ravi [this message]
2013-06-26  8:53       ` Felipe Balbi
2013-06-26  9:08         ` B, Ravi
2013-05-29 13:07 ` [PATCH v1 3/3] usb: musb: dsps: handle babble condition for dsps platform Ravi Babu
2013-06-26  8:29   ` Felipe Balbi

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=6C6B28D4DC342643927BEAFCE8707BF63EB18D85@DBDE04.ent.ti.com \
    --to=ravibabu@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.