Re: [bisected][regression] USB Ethernet Gadget Support - Freescale 8308

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 18, 2014 at 1:52 PM, Fabio Estevam <festevam@xxxxxxxxx> wrote:
> MPC does not use it only because no one has converted it yet :-)

Okay.  That makes sense :-)

> Take a look at the existing bindings of i.MX. You probably only needs
> to add the drivers/usb/chipidea/ci_hdrc_imx.c equivalent for MPC.

That doesn't look too bad.  I might take a crack at writing a binding
for the 83xx series.  If things go well look for a patch.  I do have
several 83xx custom boards I could try it on.

For the sake of completeness in case some other poor sap finds this
in a few months, I was able to get USB Gadget functioning on the v3.10
kernel with the following 2 complete hacks and 1 back port:
diff --git a/drivers/usb/gadget/fsl_udc_core.c
b/drivers/usb/gadget/fsl_udc_core.c
index dcd0b07..a2f26cd 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -1219,6 +1219,10 @@ static int fsl_pullup(struct usb_gadget
*gadget, int is_on)
        struct fsl_udc *udc;

        udc = container_of(gadget, struct fsl_udc, gadget);
+
+       if (!udc->vbus_active)
+               return -EOPNOTSUPP;
+
        udc->softconnect = (is_on != 0);
        if (can_pullup(udc))
                fsl_writel((fsl_readl(&dr_regs->usbcmd) | USB_CMD_RUN_STOP),
diff --git a/arch/powerpc/include/asm/dma-mapping.h
b/arch/powerpc/include/asm/dma-mapping.h
index 150866b..6f7367a 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -87,6 +87,9 @@ static inline struct dma_map_ops *get_dma_ops(struct
device *dev)
        if (unlikely(dev == NULL))
                return NULL;

+       if (dev->archdata.dma_ops == NULL)
+               return &dma_direct_ops;
+
        return dev->archdata.dma_ops;
 }

diff --git a/drivers/usb/gadget/fsl_udc_core.c
b/drivers/usb/gadget/fsl_udc_core.c
index 28e4fc9..3385e8a 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2662,7 +2662,7 @@ MODULE_DEVICE_TABLE(platform, fsl_udc_devtype);
 static struct platform_driver udc_driver = {
        .remove         = __exit_p(fsl_udc_remove),
        /* Just for FSL i.mx SoC currently */
-       .id_table       = fsl_udc_devtype,
+       /* .id_table    = fsl_udc_devtype, */
        /* these suspend and resume are not usb suspend and resume */
        .suspend        = fsl_udc_suspend,
        .resume         = fsl_udc_resume,

Not this code is hacky and probably not something you would want to
use in production,
but for the test system I am running it was sufficient to fix my problem.

Thanks for your help Fabio and Felipe!

Barry
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux