musb-new: omap2430: fix compiling in DM_USB_GADGET config
Add the separate IRQ handling function and change the registration. Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
This commit is contained in:

committed by
Tom Rini

parent
7a2d80efc3
commit
2e4865bc64
@@ -46,6 +46,15 @@ static inline void omap2430_low_level_init(struct musb *musb)
|
|||||||
musb_writel(musb->mregs, OTG_FORCESTDBY, l);
|
musb_writel(musb->mregs, OTG_FORCESTDBY, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_DM_USB_GADGET
|
||||||
|
int dm_usb_gadget_handle_interrupts(struct udevice *dev)
|
||||||
|
{
|
||||||
|
struct musb_host_data *host = dev_get_priv(dev);
|
||||||
|
|
||||||
|
host->host->isr(0, host->host);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int omap2430_musb_init(struct musb *musb)
|
static int omap2430_musb_init(struct musb *musb)
|
||||||
{
|
{
|
||||||
@@ -235,6 +244,16 @@ static int omap2430_musb_probe(struct udevice *dev)
|
|||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
return musb_lowlevel_init(host);
|
return musb_lowlevel_init(host);
|
||||||
|
} else if (CONFIG_IS_ENABLED(DM_USB_GADGET)) {
|
||||||
|
struct musb_host_data *host = dev_get_priv(dev);
|
||||||
|
|
||||||
|
host->host = musb_init_controller(&plat->plat,
|
||||||
|
(struct device *)otg_board_data,
|
||||||
|
plat->base);
|
||||||
|
if (!host->host)
|
||||||
|
return -EIO;
|
||||||
|
|
||||||
|
return usb_add_gadget_udc((struct device *)otg_board_data, &host->host->g);
|
||||||
}
|
}
|
||||||
|
|
||||||
musbp = musb_register(&plat->plat, (struct device *)otg_board_data,
|
musbp = musb_register(&plat->plat, (struct device *)otg_board_data,
|
||||||
|
Reference in New Issue
Block a user