mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 03:33:59 +08:00
Merge branch 'for-next' of git://gitorious.org/usb/usb into usb-next
* 'for-next' of git://gitorious.org/usb/usb: usb: musb: gadget: prevent a NULL pointer dereference usb: musb: add names for IRQs in structure resource usb: musb: remove board_data parameter from musb_platform_init()
This commit is contained in:
commit
367576b813
@ -64,10 +64,12 @@ static struct resource usb_resources[] = {
|
||||
{
|
||||
.start = IRQ_USBINT,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "mc"
|
||||
},
|
||||
{
|
||||
/* placeholder for the dedicated CPPI IRQ */
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "dma"
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -40,10 +40,12 @@ static struct resource musb_resources[] = {
|
||||
[1] = { /* general IRQ */
|
||||
.start = INT_243X_HS_USB_MC,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "mc",
|
||||
},
|
||||
[2] = { /* DMA IRQ */
|
||||
.start = INT_243X_HS_USB_DMA,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
.name = "dma",
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -82,11 +82,13 @@ static struct resource musb_resources[] = {
|
||||
.start = IRQ_USB_INT0,
|
||||
.end = IRQ_USB_INT0,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "mc"
|
||||
},
|
||||
[2] = { /* DMA IRQ */
|
||||
.start = IRQ_USB_DMA,
|
||||
.end = IRQ_USB_DMA,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "dma"
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -46,11 +46,13 @@ static struct resource musb_resources[] = {
|
||||
.start = IRQ_USB_INT0,
|
||||
.end = IRQ_USB_INT0,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "mc"
|
||||
},
|
||||
[2] = { /* DMA IRQ */
|
||||
.start = IRQ_USB_DMA,
|
||||
.end = IRQ_USB_DMA,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "dma"
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -86,11 +86,13 @@ static struct resource musb_resources[] = {
|
||||
.start = IRQ_USB_INT0,
|
||||
.end = IRQ_USB_INT0,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "mc"
|
||||
},
|
||||
[2] = { /* DMA IRQ */
|
||||
.start = IRQ_USB_DMA,
|
||||
.end = IRQ_USB_DMA,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "dma"
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -482,11 +482,13 @@ static struct resource musb_resources[] = {
|
||||
.start = IRQ_USB_INT0,
|
||||
.end = IRQ_USB_INT0,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "mc"
|
||||
},
|
||||
[2] = { /* DMA IRQ */
|
||||
.start = IRQ_USB_DMA,
|
||||
.end = IRQ_USB_DMA,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "dma"
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -587,11 +587,13 @@ static struct resource musb_resources[] = {
|
||||
.start = IRQ_USB_INT0,
|
||||
.end = IRQ_USB_INT0,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "mc"
|
||||
},
|
||||
[2] = { /* DMA IRQ */
|
||||
.start = IRQ_USB_DMA,
|
||||
.end = IRQ_USB_DMA,
|
||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||
.name = "dma"
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -323,7 +323,7 @@ int musb_platform_set_mode(struct musb *musb, u8 musb_mode)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
int __init musb_platform_init(struct musb *musb, void *board_data)
|
||||
int __init musb_platform_init(struct musb *musb)
|
||||
{
|
||||
|
||||
/*
|
||||
|
@ -1308,7 +1308,7 @@ dma_controller_create(struct musb *musb, void __iomem *mregs)
|
||||
struct cppi *controller;
|
||||
struct device *dev = musb->controller;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
int irq = platform_get_irq(pdev, 1);
|
||||
int irq = platform_get_irq_byname(pdev, "dma");
|
||||
|
||||
controller = kzalloc(sizeof *controller, GFP_KERNEL);
|
||||
if (!controller)
|
||||
|
@ -376,7 +376,7 @@ int musb_platform_set_mode(struct musb *musb, u8 mode)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
int __init musb_platform_init(struct musb *musb, void *board_data)
|
||||
int __init musb_platform_init(struct musb *musb)
|
||||
{
|
||||
void __iomem *tibase = musb->ctrl_base;
|
||||
u32 revision;
|
||||
|
@ -2025,7 +2025,7 @@ bad_config:
|
||||
* isp1504, non-OTG, etc) mostly hooking up through ULPI.
|
||||
*/
|
||||
musb->isr = generic_interrupt;
|
||||
status = musb_platform_init(musb, plat->board_data);
|
||||
status = musb_platform_init(musb);
|
||||
if (status < 0)
|
||||
goto fail2;
|
||||
|
||||
@ -2206,7 +2206,7 @@ static u64 *orig_dma_mask;
|
||||
static int __init musb_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
int irq = platform_get_irq(pdev, 0);
|
||||
int irq = platform_get_irq_byname(pdev, "mc");
|
||||
int status;
|
||||
struct resource *iomem;
|
||||
void __iomem *base;
|
||||
|
@ -614,7 +614,7 @@ extern int musb_platform_get_vbus_status(struct musb *musb);
|
||||
#define musb_platform_get_vbus_status(x) 0
|
||||
#endif
|
||||
|
||||
extern int __init musb_platform_init(struct musb *musb, void *board_data);
|
||||
extern int __init musb_platform_init(struct musb *musb);
|
||||
extern int musb_platform_exit(struct musb *musb);
|
||||
|
||||
#endif /* __MUSB_CORE_H__ */
|
||||
|
@ -1072,13 +1072,16 @@ struct usb_request *musb_alloc_request(struct usb_ep *ep, gfp_t gfp_flags)
|
||||
struct musb_request *request = NULL;
|
||||
|
||||
request = kzalloc(sizeof *request, gfp_flags);
|
||||
if (request) {
|
||||
INIT_LIST_HEAD(&request->request.list);
|
||||
request->request.dma = DMA_ADDR_INVALID;
|
||||
request->epnum = musb_ep->current_epnum;
|
||||
request->ep = musb_ep;
|
||||
if (!request) {
|
||||
DBG(4, "not enough memory\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&request->request.list);
|
||||
request->request.dma = DMA_ADDR_INVALID;
|
||||
request->epnum = musb_ep->current_epnum;
|
||||
request->ep = musb_ep;
|
||||
|
||||
return &request->request;
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ dma_controller_create(struct musb *musb, void __iomem *base)
|
||||
struct musb_dma_controller *controller;
|
||||
struct device *dev = musb->controller;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
int irq = platform_get_irq(pdev, 1);
|
||||
int irq = platform_get_irq_byname(pdev, "dma");
|
||||
|
||||
if (irq == 0) {
|
||||
dev_err(dev, "No DMA interrupt line!\n");
|
||||
|
@ -187,10 +187,12 @@ int musb_platform_set_mode(struct musb *musb, u8 musb_mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __init musb_platform_init(struct musb *musb, void *board_data)
|
||||
int __init musb_platform_init(struct musb *musb)
|
||||
{
|
||||
u32 l;
|
||||
struct omap_musb_board_data *data = board_data;
|
||||
struct device *dev = musb->controller;
|
||||
struct musb_hdrc_platform_data *plat = dev->platform_data;
|
||||
struct omap_musb_board_data *data = plat->board_data;
|
||||
|
||||
/* We require some kind of external transceiver, hooked
|
||||
* up through ULPI. TWL4030-family PMICs include one,
|
||||
|
@ -1091,7 +1091,7 @@ err:
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
int __init musb_platform_init(struct musb *musb, void *board_data)
|
||||
int __init musb_platform_init(struct musb *musb)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct resource *mem;
|
||||
|
Loading…
Reference in New Issue
Block a user