public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 07/10] drivers: usb: musb: add ti musb peripheral driver with driver model support
Date: Sun, 25 Mar 2018 23:28:28 +0200	[thread overview]
Message-ID: <1522013308.31164.6.camel@collabora.co.uk> (raw)
In-Reply-To: <CAPnjgZ3Z8M2745m2M5TrosOjJVnQw4wN1-V7oU8_A9CKesGh7w@mail.gmail.com>

On Sat, 2016-12-03 at 11:40 -0700, Simon Glass wrote:
> Hi Mugunthan,
> 
> On 17 November 2016 at 02:08, Mugunthan V N <mugunthanvnm@ti.com>
> wrote:
> > Add a TI MUSB peripheral driver with driver model support and the
> > driver will be bound by the MUSB wrapper driver based on the
> > dr_mode device tree entry.

Seems like this never landed. Seems to works fine with some trivial
fixups though.

> > Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > ---
> >  drivers/usb/musb-new/musb_uboot.c |   2 +
> >  drivers/usb/musb-new/ti-musb.c    | 109
> > ++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 111 insertions(+)
> > 
> > diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-
> > new/musb_uboot.c
> > index ea71f75947..46e3faeeaa 100644
> > --- a/drivers/usb/musb-new/musb_uboot.c
> > +++ b/drivers/usb/musb-new/musb_uboot.c
> > @@ -373,6 +373,7 @@ struct dm_usb_ops musb_usb_ops = {
> >  #endif /* CONFIG_DM_USB */
> >  #endif /* CONFIG_USB_MUSB_HOST */
> > 
> > +#ifndef CONFIG_DM_USB
> >  #ifdef CONFIG_USB_MUSB_GADGET
> >  static struct musb *gadget;
> > 
> > @@ -453,3 +454,4 @@ int musb_register(struct
> > musb_hdrc_platform_data *plat, void *bdata,
> > 
> >         return 0;
> >  }
> > +#endif /* CONFIG_DM_USB */
> > diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-
> > new/ti-musb.c
> > index 1c15aa2a42..b8abc1dc58 100644
> > --- a/drivers/usb/musb-new/ti-musb.c
> > +++ b/drivers/usb/musb-new/ti-musb.c
> > @@ -14,6 +14,7 @@
> >  #include <dm/device-internal.h>
> >  #include <dm/lists.h>
> > 
> > +#include <watchdog.h>
> >  #include <asm/io.h>
> >  #include <asm/omap_musb.h>
> >  #include "musb_uboot.h"
> > @@ -142,6 +143,106 @@ static int ti_musb_ofdata_to_platdata(struct
> > udevice *dev)
> >         return 0;
> >  }
> > 
> > +static struct musb *gadget;
> 
> Can you please drop this static struct? We should not use this sort
> of
> thing with driver model.
> 
> Let me know if you want ideas on how.

From what i can tell; dropping that needs quite a bit refactoring of
the gadget framework such that it passes through a udevice with e.g. 
usb_gadget_register_driver and usb_gadget_handle_interrupts. 

Was that what you were pondering, or other suggestions ;)

--
Sjoerd Simons
Collabora Ltd.

  reply	other threads:[~2018-03-25 21:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17  9:08 [U-Boot] [PATCH v3 00/10] driver model bring-up of musb on AM335x GP and BBB Mugunthan V N
2016-11-17  9:08 ` [U-Boot] [PATCH v3 01/10] configs: am335x: usb: do not define CONFIG_DM_USB for spl Mugunthan V N
2016-12-03 18:40   ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 02/10] am33xx: board: do not register usb devices when CONFIG_DM_USB is defined Mugunthan V N
2016-12-03 18:40   ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 03/10] drivers: usb: musb: add ti musb misc driver for wrapper Mugunthan V N
2016-12-03 18:40   ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 04/10] am33xx: board: probe misc drivers to register musb devices Mugunthan V N
2016-12-03 18:40   ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 05/10] drivers: usb: musb: adopt musb backend driver to driver model Mugunthan V N
2016-12-03 18:40   ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 06/10] drivers: usb: musb: add ti musb host driver with driver model support Mugunthan V N
2016-12-03 18:40   ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 07/10] drivers: usb: musb: add ti musb peripheral " Mugunthan V N
2016-12-03 18:40   ` Simon Glass
2018-03-25 21:28     ` Sjoerd Simons [this message]
2018-03-26 17:53       ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 08/10] am33xx: board: init usb ether gadget for rndis support Mugunthan V N
2017-01-09 20:45   ` Simon Glass
2016-11-17  9:08 ` [U-Boot] [PATCH v3 09/10] am335x_evm: enable usb ether gadget as it supports DM_ETH Mugunthan V N
2017-01-09 20:45   ` Simon Glass
2017-01-09 20:58     ` Marek Vasut
2017-01-09 22:15       ` Tom Rini
2016-11-17  9:08 ` [U-Boot] [PATCH v3 10/10] defconfig: am335x_evm: enable usb driver model Mugunthan V N
2016-11-21 14:06   ` Tom Rini
2017-01-09 20:45     ` Simon Glass

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=1522013308.31164.6.camel@collabora.co.uk \
    --to=sjoerd.simons@collabora.co.uk \
    --cc=u-boot@lists.denx.de \
    /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