Re: [U-Boot] [PATCH resend v3 1/6] drivers: usb: gadget: ether: adopt to usb driver model

2016-12-03 Thread Marek Vasut
On 12/03/2016 07:27 PM, Tom Rini wrote:
> On Sat, Dec 03, 2016 at 01:51:23PM +0100, Marek Vasut wrote:
>> On 12/03/2016 05:26 AM, Simon Glass wrote:
>>> On 29 November 2016 at 16:55, Joe Hershberger  
>>> wrote:
 On Thu, Nov 17, 2016 at 11:19 PM, Mugunthan V N  
 wrote:
> Convert usb ether gadget to adopt usb driver model
>
> Signed-off-by: Mugunthan V N 

 Acked-by: Joe Hershberger 
>>>
>>> Applied to u-boot-dm, thanks!
>>>
>> Did you ever get an ACK on this from the USB gadget maintainer ?
> 
> Well, v2 was posted back in May, so at some point this falls into the
> category of "has been reviewed by someone other than author, in public,
> move forward not stall time!".
> 
It might be a good start to CC the maintainer ;-)
I poked him on jabber ...

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH resend v3 1/6] drivers: usb: gadget: ether: adopt to usb driver model

2016-12-03 Thread Tom Rini
On Sat, Dec 03, 2016 at 01:51:23PM +0100, Marek Vasut wrote:
> On 12/03/2016 05:26 AM, Simon Glass wrote:
> > On 29 November 2016 at 16:55, Joe Hershberger  
> > wrote:
> >> On Thu, Nov 17, 2016 at 11:19 PM, Mugunthan V N  
> >> wrote:
> >>> Convert usb ether gadget to adopt usb driver model
> >>>
> >>> Signed-off-by: Mugunthan V N 
> >>
> >> Acked-by: Joe Hershberger 
> > 
> > Applied to u-boot-dm, thanks!
> > 
> Did you ever get an ACK on this from the USB gadget maintainer ?

Well, v2 was posted back in May, so at some point this falls into the
category of "has been reviewed by someone other than author, in public,
move forward not stall time!".

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH resend v3 1/6] drivers: usb: gadget: ether: adopt to usb driver model

2016-12-03 Thread Marek Vasut
On 12/03/2016 05:26 AM, Simon Glass wrote:
> On 29 November 2016 at 16:55, Joe Hershberger  
> wrote:
>> On Thu, Nov 17, 2016 at 11:19 PM, Mugunthan V N  wrote:
>>> Convert usb ether gadget to adopt usb driver model
>>>
>>> Signed-off-by: Mugunthan V N 
>>
>> Acked-by: Joe Hershberger 
> 
> Applied to u-boot-dm, thanks!
> 
Did you ever get an ACK on this from the USB gadget maintainer ?

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH resend v3 1/6] drivers: usb: gadget: ether: adopt to usb driver model

2016-12-02 Thread Simon Glass
On 29 November 2016 at 16:55, Joe Hershberger  wrote:
> On Thu, Nov 17, 2016 at 11:19 PM, Mugunthan V N  wrote:
>> Convert usb ether gadget to adopt usb driver model
>>
>> Signed-off-by: Mugunthan V N 
>
> Acked-by: Joe Hershberger 

Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH resend v3 1/6] drivers: usb: gadget: ether: adopt to usb driver model

2016-11-29 Thread Joe Hershberger
On Thu, Nov 17, 2016 at 11:19 PM, Mugunthan V N  wrote:
> Convert usb ether gadget to adopt usb driver model
>
> Signed-off-by: Mugunthan V N 

Acked-by: Joe Hershberger 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH resend v3 1/6] drivers: usb: gadget: ether: adopt to usb driver model

2016-11-17 Thread Mugunthan V N
Convert usb ether gadget to adopt usb driver model

Signed-off-by: Mugunthan V N 
Reviewed-by: Simon Glass 
---
 drivers/usb/gadget/ether.c | 36 
 1 file changed, 36 insertions(+)

diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 497b981129..9bc61186cf 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -24,6 +24,10 @@
 #include "gadget_chips.h"
 #include "rndis.h"
 
+#include 
+#include 
+#include 
+
 #define USB_NET_NAME "usb_ether"
 
 #define atomic_read
@@ -101,6 +105,9 @@ struct eth_dev {
struct usb_gadget   *gadget;
struct usb_request  *req;   /* for control responses */
struct usb_request  *stat_req;  /* for cdc & rndis status */
+#ifdef CONFIG_DM_USB
+   struct udevice  *usb_udev;
+#endif
 
u8  config;
struct usb_ep   *in_ep, *out_ep, *status_ep;
@@ -2303,6 +2310,24 @@ fail:
 
 /*-*/
 
+#ifdef CONFIG_DM_USB
+int dm_usb_init(struct eth_dev *e_dev)
+{
+   struct udevice *dev = NULL;
+   int ret;
+
+   ret = uclass_first_device(UCLASS_USB_DEV_GENERIC, );
+   if (!dev || ret) {
+   error("No USB device found\n");
+   return -ENODEV;
+   }
+
+   e_dev->usb_udev = dev;
+
+   return ret;
+}
+#endif
+
 static int usb_eth_init(struct eth_device *netdev, bd_t *bd)
 {
struct eth_dev *dev = _ethdev;
@@ -2315,7 +2340,14 @@ static int usb_eth_init(struct eth_device *netdev, bd_t 
*bd)
goto fail;
}
 
+#ifdef CONFIG_DM_USB
+   if (dm_usb_init(dev)) {
+   error("USB ether not found\n");
+   return -ENODEV;
+   }
+#else
board_usb_init(0, USB_INIT_DEVICE);
+#endif
 
/* Configure default mac-addresses for the USB ethernet device */
 #ifdef CONFIG_USBNET_DEV_ADDR
@@ -2497,7 +2529,11 @@ void usb_eth_halt(struct eth_device *netdev)
}
 
usb_gadget_unregister_driver(_driver);
+#ifdef CONFIG_DM_USB
+   device_remove(dev->usb_udev);
+#else
board_usb_cleanup(0, USB_INIT_DEVICE);
+#endif
 }
 
 static struct usb_gadget_driver eth_driver = {
-- 
2.11.0.rc2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot