Commit 04d2e6bd authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace pThis with musb

Search and replace pThis with musb
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 98a008d9
......@@ -1134,7 +1134,7 @@ static int cppi_rx_scan(struct cppi *cppi, unsigned ch)
return completed;
}
void cppi_completion(struct musb *pThis, u32 rx, u32 tx)
void cppi_completion(struct musb *musb, u32 rx, u32 tx)
{
void *__iomem regBase;
int i, chanNum, numCompleted;
......@@ -1143,9 +1143,9 @@ void cppi_completion(struct musb *pThis, u32 rx, u32 tx)
struct cppi_descriptor *bdPtr;
struct musb_hw_ep *pEnd = NULL;
cppi = container_of(pThis->pDmaController, struct cppi, Controller);
cppi = container_of(musb->pDmaController, struct cppi, Controller);
regBase = pThis->ctrl_base;
regBase = musb->ctrl_base;
chanNum = 0;
/* process TX channels */
......@@ -1253,13 +1253,13 @@ void cppi_completion(struct musb *pThis, u32 rx, u32 tx)
}
if (bReqComplete)
musb_dma_completion(
pThis, chanNum + 1, 1);
musb, chanNum + 1, 1);
} else {
/* Bigger transfer than we could fit in
* that first batch of descriptors...
*/
cppi_next_tx_segment(pThis, txChannel);
cppi_next_tx_segment(musb, txChannel);
}
} else
txChannel->activeQueueHead = bdPtr;
......@@ -1283,7 +1283,7 @@ void cppi_completion(struct musb *pThis, u32 rx, u32 tx)
if (rxChannel->actualLen != rxChannel->transferSize
&& rxChannel->actualLen
== rxChannel->currOffset) {
cppi_next_rx_segment(pThis, rxChannel, 1);
cppi_next_rx_segment(musb, rxChannel, 1);
continue;
}
......@@ -1295,7 +1295,7 @@ void cppi_completion(struct musb *pThis, u32 rx, u32 tx)
rxChannel->Channel.dwActualLength =
rxChannel->actualLen;
core_rxirq_disable(regBase, chanNum + 1);
musb_dma_completion(pThis, chanNum + 1, 0);
musb_dma_completion(musb, chanNum + 1, 0);
}
}
......
......@@ -828,7 +828,7 @@ musb_g_ep0_queue(struct usb_ep *e, struct usb_request *r, gfp_t gfp_flags)
return -EINVAL;
ep = to_musb_ep(e);
musb = ep->pThis;
musb = ep->musb;
regs = musb->control_ep->regs;
req = to_musb_request(r);
......@@ -879,7 +879,7 @@ musb_g_ep0_queue(struct usb_ep *e, struct usb_request *r, gfp_t gfp_flags)
musb_writew(regs, MGC_O_HDRC_CSR0,
musb->ackpend | MGC_M_CSR0_P_DATAEND);
musb->ackpend = 0;
musb_g_ep0_giveback(ep->pThis, r);
musb_g_ep0_giveback(ep->musb, r);
}
/* else for sequence #2 (OUT), caller provides a buffer
......@@ -916,7 +916,7 @@ static int musb_g_ep0_halt(struct usb_ep *e, int value)
return -EINVAL;
ep = to_musb_ep(e);
musb = ep->pThis;
musb = ep->musb;
base = musb->pRegs;
regs = musb->control_ep->regs;
......
......@@ -159,12 +159,12 @@ __acquires(ep->musb->Lock)
static void nuke(struct musb_ep *ep, const int status)
{
struct musb_request *req = NULL;
void __iomem *epio = ep->pThis->aLocalEnd[ep->bEndNumber].regs;
void __iomem *epio = ep->musb->aLocalEnd[ep->bEndNumber].regs;
ep->busy = 1;
if (is_dma_capable() && ep->dma) {
struct dma_controller *c = ep->pThis->pDmaController;
struct dma_controller *c = ep->musb->pDmaController;
int value;
if (ep->is_in) {
musb_writew(epio, MGC_O_HDRC_TXCSR,
......@@ -867,7 +867,7 @@ static int musb_gadget_enable(struct usb_ep *ep,
pEnd = to_musb_ep(ep);
hw_ep = pEnd->hw_ep;
regs = hw_ep->regs;
musb = pEnd->pThis;
musb = pEnd->musb;
pBase = musb->pRegs;
bEnd = pEnd->bEndNumber;
......@@ -1005,7 +1005,7 @@ static int musb_gadget_disable(struct usb_ep *ep)
int status = 0;
pEnd = to_musb_ep(ep);
musb = pEnd->pThis;
musb = pEnd->musb;
bEnd = pEnd->bEndNumber;
epio = musb->aLocalEnd[bEnd].regs;
......@@ -1108,7 +1108,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
return -ENODATA;
pEnd = to_musb_ep(ep);
musb = pEnd->pThis;
musb = pEnd->musb;
pRequest = to_musb_request(req);
pRequest->musb = musb;
......@@ -1176,7 +1176,7 @@ static int musb_gadget_dequeue(struct usb_ep *ep, struct usb_request *pRequest)
struct usb_request *r;
unsigned long flags;
int status = 0;
struct musb *musb = pEnd->pThis;
struct musb *musb = pEnd->musb;
if (!ep || !pRequest || to_musb_request(pRequest)->ep != pEnd)
return -EINVAL;
......@@ -1230,7 +1230,7 @@ int musb_gadget_set_halt(struct usb_ep *ep, int value)
{
struct musb_ep *pEnd = to_musb_ep(ep);
u8 bEnd = pEnd->bEndNumber;
struct musb *musb = pEnd->pThis;
struct musb *musb = pEnd->musb;
void __iomem *epio = musb->aLocalEnd[bEnd].regs;
void __iomem *pBase;
unsigned long flags;
......@@ -1310,7 +1310,7 @@ static int musb_gadget_fifo_status(struct usb_ep *ep)
int retval = -EINVAL;
if (musb_ep->desc && !musb_ep->is_in) {
struct musb *musb = musb_ep->pThis;
struct musb *musb = musb_ep->musb;
int bEnd = musb_ep->bEndNumber;
void __iomem *mbase = musb->pRegs;
unsigned long flags;
......@@ -1329,7 +1329,7 @@ static int musb_gadget_fifo_status(struct usb_ep *ep)
static void musb_gadget_fifo_flush(struct usb_ep *ep)
{
struct musb_ep *musb_ep = to_musb_ep(ep);
struct musb *musb = musb_ep->pThis;
struct musb *musb = musb_ep->musb;
u8 nEnd = musb_ep->bEndNumber;
void __iomem *epio = musb->aLocalEnd[nEnd].regs;
void __iomem *mbase;
......@@ -1562,7 +1562,7 @@ init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 bEnd, int is_in)
memset(ep, 0, sizeof *ep);
ep->bEndNumber = bEnd;
ep->pThis = musb;
ep->musb = musb;
ep->hw_ep = hw_ep;
ep->is_in = is_in;
......
......@@ -61,7 +61,7 @@ struct musb_ep {
struct usb_ep end_point;
char name[12];
struct musb_hw_ep *hw_ep;
struct musb *pThis;
struct musb *musb;
u8 bEndNumber;
/* ... when enabled/disabled ... */
......@@ -92,8 +92,8 @@ static inline struct usb_request *next_request(struct musb_ep *ep)
return container_of(queue->next, struct usb_request, list);
}
extern void musb_g_tx(struct musb *pThis, u8 bEnd);
extern void musb_g_rx(struct musb *pThis, u8 bEnd);
extern void musb_g_tx(struct musb *musb, u8 bEnd);
extern void musb_g_rx(struct musb *musb, u8 bEnd);
extern const struct usb_ep_ops musb_g_ep0_ops;
......
This diff is collapsed.
This diff is collapsed.
......@@ -496,8 +496,8 @@ static inline struct musb *gadget_to_musb(struct usb_gadget *g)
extern const char musb_driver_name[];
extern void musb_start(struct musb *pThis);
extern void musb_stop(struct musb *pThis);
extern void musb_start(struct musb *musb);
extern void musb_stop(struct musb *musb);
extern void musb_write_fifo(struct musb_hw_ep *ep,
u16 wCount, const u8 * pSource);
......
......@@ -104,12 +104,12 @@ static int dma_controller_stop(struct dma_controller *c)
{
struct musb_dma_controller *pController =
container_of(c, struct musb_dma_controller, Controller);
struct musb *pThis = (struct musb *) pController->pDmaPrivate;
struct musb *musb = (struct musb *) pController->pDmaPrivate;
struct dma_channel *pChannel;
u8 bBit;
if (pController->bmUsedChannels != 0) {
dev_err(pThis->controller,
dev_err(musb->controller,
"Stopping DMA controller while channel active\n");
for (bBit = 0; bBit < MGC_HSDMA_CHANNELS; bBit++) {
......@@ -387,10 +387,10 @@ void dma_controller_destroy(struct dma_controller *c)
}
struct dma_controller *__init
dma_controller_create(struct musb *pThis, void __iomem *pCoreBase)
dma_controller_create(struct musb *musb, void __iomem *pCoreBase)
{
struct musb_dma_controller *pController;
struct device *dev = pThis->controller;
struct device *dev = musb->controller;
struct platform_device *pdev = to_platform_device(dev);
int irq = platform_get_irq(pdev, 1);
......@@ -404,7 +404,7 @@ dma_controller_create(struct musb *pThis, void __iomem *pCoreBase)
return NULL;
pController->bChannelCount = MGC_HSDMA_CHANNELS;
pController->pDmaPrivate = pThis;
pController->pDmaPrivate = musb;
pController->pCoreBase = pCoreBase;
pController->Controller.pPrivateData = pController;
......@@ -416,7 +416,7 @@ dma_controller_create(struct musb *pThis, void __iomem *pCoreBase)
pController->Controller.channel_abort = dma_channel_abort;
if (request_irq(irq, dma_controller_irq, IRQF_DISABLED,
pThis->controller->bus_id, &pController->Controller)) {
musb->controller->bus_id, &pController->Controller)) {
dev_err(dev, "request_irq %d failed!\n", irq);
dma_controller_destroy(&pController->Controller);
return NULL;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment