Lines Matching defs:whc
26 void whc_write_wusbcmd(struct whc *whc, u32 mask, u32 val)
31 spin_lock_irqsave(&whc->lock, flags);
33 cmd = le_readl(whc->base + WUSBCMD);
35 le_writel(cmd, whc->base + WUSBCMD);
37 spin_unlock_irqrestore(&whc->lock, flags);
42 * @whc: the WHCI HC
48 int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len)
55 mutex_lock(&whc->mutex);
58 t = wait_event_timeout(whc->cmd_wq,
59 (le_readl(whc->base + WUSBGENCMDSTS) & WUSBGENCMDSTS_ACTIVE) == 0,
62 dev_err(&whc->umc->dev, "generic command timeout (%04x/%04x)\n",
63 le_readl(whc->base + WUSBGENCMDSTS),
64 le_readl(whc->base + WUSBGENCMDPARAMS));
70 memcpy(whc->gen_cmd_buf, addr, len);
71 dma_addr = whc->gen_cmd_buf_dma;
76 spin_lock_irqsave(&whc->lock, flags);
78 le_writel(params, whc->base + WUSBGENCMDPARAMS);
79 le_writeq(dma_addr, whc->base + WUSBGENADDR);
82 whc->base + WUSBGENCMDSTS);
84 spin_unlock_irqrestore(&whc->lock, flags);
86 mutex_unlock(&whc->mutex);
93 * @whc: the WHCI HC that broke.
98 void whc_hw_error(struct whc *whc, const char *reason)
100 struct wusbhc *wusbhc = &whc->wusbhc;
102 dev_err(&whc->umc->dev, "hardware error: %s\n", reason);