Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248756
b: refs/heads/master
c: 5ea68d5
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Apr 30, 2011
1 parent 640f6a2 commit 55e777d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6e267da8f10b1a6551b6c4dee3779f6f56e2644d
refs/heads/master: 5ea68d541df200d10a373c06f945f98225c2486b
34 changes: 19 additions & 15 deletions trunk/drivers/usb/renesas_usbhs/mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,17 @@ static void usbhs_status_get_each_irq(struct usbhs_priv *priv,
state->intsts0 = usbhs_read(priv, INTSTS0);
state->intsts1 = usbhs_read(priv, INTSTS1);

state->brdysts = usbhs_read(priv, BRDYSTS);
state->nrdysts = usbhs_read(priv, NRDYSTS);
state->bempsts = usbhs_read(priv, BEMPSTS);

state->dvstctr = usbhs_read(priv, DVSTCTR);

/* mask */
state->bempsts &= mod->irq_bempsts;
state->brdysts &= mod->irq_brdysts;
if (mod) {
state->brdysts = usbhs_read(priv, BRDYSTS);
state->nrdysts = usbhs_read(priv, NRDYSTS);
state->bempsts = usbhs_read(priv, BEMPSTS);

state->bempsts &= mod->irq_bempsts;
state->brdysts &= mod->irq_brdysts;
}
}

/*
Expand Down Expand Up @@ -259,17 +261,19 @@ void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod)
* but "mod->irq_dev_state" will be called.
*/

if (mod->irq_ctrl_stage)
intenb0 |= CTRE;
if (mod) {
if (mod->irq_ctrl_stage)
intenb0 |= CTRE;

if (mod->irq_empty && mod->irq_bempsts) {
usbhs_write(priv, BEMPENB, mod->irq_bempsts);
intenb0 |= BEMPE;
}
if (mod->irq_empty && mod->irq_bempsts) {
usbhs_write(priv, BEMPENB, mod->irq_bempsts);
intenb0 |= BEMPE;
}

if (mod->irq_ready && mod->irq_brdysts) {
usbhs_write(priv, BRDYENB, mod->irq_brdysts);
intenb0 |= BRDYE;
if (mod->irq_ready && mod->irq_brdysts) {
usbhs_write(priv, BRDYENB, mod->irq_brdysts);
intenb0 |= BRDYE;
}
}

usbhs_write(priv, INTENB0, intenb0);
Expand Down

0 comments on commit 55e777d

Please sign in to comment.