Re: [PATCH 05/34] usb: dwc3: add xHCI Host support

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

 



* Felipe Balbi | 2011-11-24 13:02:07 [+0200]:

>diff --git a/drivers/usb/dwc3/Makefile b/drivers/usb/dwc3/Makefile
>index 593d1db..0926e71 100644
>--- a/drivers/usb/dwc3/Makefile
>+++ b/drivers/usb/dwc3/Makefile
>@@ -4,11 +4,13 @@ ccflags-$(CONFIG_USB_DWC3_VERBOSE)	+= -DVERBOSE_DEBUG
> obj-$(CONFIG_USB_DWC3)			+= dwc3.o
> 
> dwc3-y					:= core.o
>+dwc3-y					+= host.o
> 
> ifneq ($(CONFIG_USB_GADGET_DWC3),)
> 	dwc3-y				+= gadget.o ep0.o
> endif
> 
>+
Useless new line

>diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
>index a3ef8f3..a775543 100644
>--- a/drivers/usb/dwc3/core.h
>+++ b/drivers/usb/dwc3/core.h
>@@ -41,6 +41,7 @@
> 
> #include <linux/device.h>
> #include <linux/spinlock.h>
>+#include <linux/ioport.h>
> #include <linux/list.h>
> #include <linux/dma-mapping.h>
> #include <linux/mm.h>
>@@ -560,6 +561,7 @@ struct dwc3_hwparams {
>  * @ep0_bounce_addr: dma address of ep0_bounce
>  * @lock: for synchronizing
>  * @dev: pointer to our struct device
>+ * @xhci: pointer to our xHCI child
>  * @event_buffer_list: a list of event buffers
>  * @gadget: device side representation of the peripheral controller
>  * @gadget_driver: pointer to the gadget driver
>@@ -598,6 +600,9 @@ struct dwc3 {
> 	spinlock_t		lock;
> 	struct device		*dev;
> 
>+	struct platform_device	*xhci;
>+	struct resource		*res;

no kernel doc for res?

>diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
>new file mode 100644
>index 0000000..9b300a2
>--- /dev/null
>+++ b/drivers/usb/dwc3/host.c
>+static struct resource generic_resources[] = {
>+	{
>+		.flags = IORESOURCE_IRQ,
>+	},
>+	{
>+		.flags = IORESOURCE_MEM,
>+	},
>+};
>+
>+int dwc3_host_init(struct dwc3 *dwc)
>+{
>+	struct platform_device	*xhci;
>+	int			ret;
>+
>+	xhci = platform_device_alloc("xhci", -1);
>+	if (!xhci) {
>+		dev_err(dwc->dev, "couldn't allocate xHCI device\n");
>+		ret = -ENOMEM;
>+		goto err0;
>+	}
>+
>+	dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask);
>+
>+	xhci->dev.parent	= dwc->dev;
>+	xhci->dev.dma_mask	= dwc->dev->dma_mask;
>+	xhci->dev.dma_parms	= dwc->dev->dma_parms;
>+
>+	dwc->xhci = xhci;
>+
>+	/* setup resources */
>+	generic_resources[0].start = dwc->irq;

Could we please live without this global variable?

Sebastian
--
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