ux500.c (2f7711642559851c187d09795a3eb51c2bde36ec) | ux500.c (baef653a500476ccb2d08cf4bb648c56c0170e21) |
---|---|
1/* 2 * Copyright (C) 2010 ST-Ericsson AB 3 * Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> 4 * 5 * Based on omap2430.c 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 22 unchanged lines hidden (view full) --- 31 32struct ux500_glue { 33 struct device *dev; 34 struct platform_device *musb; 35 struct clk *clk; 36}; 37#define glue_to_musb(g) platform_get_drvdata(g->musb) 38 | 1/* 2 * Copyright (C) 2010 ST-Ericsson AB 3 * Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> 4 * 5 * Based on omap2430.c 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 22 unchanged lines hidden (view full) --- 31 32struct ux500_glue { 33 struct device *dev; 34 struct platform_device *musb; 35 struct clk *clk; 36}; 37#define glue_to_musb(g) platform_get_drvdata(g->musb) 38 |
39static irqreturn_t ux500_musb_interrupt(int irq, void *__hci) 40{ 41 unsigned long flags; 42 irqreturn_t retval = IRQ_NONE; 43 struct musb *musb = __hci; 44 45 spin_lock_irqsave(&musb->lock, flags); 46 47 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); 48 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX); 49 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX); 50 51 if (musb->int_usb || musb->int_tx || musb->int_rx) 52 retval = musb_interrupt(musb); 53 54 spin_unlock_irqrestore(&musb->lock, flags); 55 56 return retval; 57} 58 |
|
39static int ux500_musb_init(struct musb *musb) 40{ 41 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); 42 if (IS_ERR_OR_NULL(musb->xceiv)) { 43 pr_err("HS USB OTG: no transceiver configured\n"); 44 return -ENODEV; 45 } 46 | 59static int ux500_musb_init(struct musb *musb) 60{ 61 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); 62 if (IS_ERR_OR_NULL(musb->xceiv)) { 63 pr_err("HS USB OTG: no transceiver configured\n"); 64 return -ENODEV; 65 } 66 |
67 musb->isr = ux500_musb_interrupt; 68 |
|
47 return 0; 48} 49 50static int ux500_musb_exit(struct musb *musb) 51{ 52 usb_put_phy(musb->xceiv); 53 54 return 0; --- 153 unchanged lines hidden --- | 69 return 0; 70} 71 72static int ux500_musb_exit(struct musb *musb) 73{ 74 usb_put_phy(musb->xceiv); 75 76 return 0; --- 153 unchanged lines hidden --- |