Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 264893
b: refs/heads/master
c: e25e0eb
h: refs/heads/master
i:
  264891: 746667f
v: v3
  • Loading branch information
Arvid Brodin authored and Greg Kroah-Hartman committed Aug 22, 2011
1 parent e03c049 commit f2d80a5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 28 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: 507a3ea7f20b0964e459f0ed5125717e8b46d159
refs/heads/master: e25e0eb209bf945db554512430ee128e6bb7b291
45 changes: 18 additions & 27 deletions trunk/drivers/usb/host/isp1760-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,43 +514,26 @@ static int isp1760_hc_setup(struct usb_hcd *hcd)
return priv_init(hcd);
}

static void isp1760_init_maps(struct usb_hcd *hcd)
static int isp1760_run(struct usb_hcd *hcd)
{
/*set last maps, for iso its only 1, else 32 tds bitmap*/
reg_write32(hcd->regs, HC_ATL_PTD_LASTPTD_REG, 0x80000000);
reg_write32(hcd->regs, HC_INT_PTD_LASTPTD_REG, 0x80000000);
reg_write32(hcd->regs, HC_ISO_PTD_LASTPTD_REG, 0x00000001);
int retval;
u32 temp;
u32 command;
u32 chipid;

reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, 0xffffffff);
reg_write32(hcd->regs, HC_INT_PTD_SKIPMAP_REG, 0xffffffff);
reg_write32(hcd->regs, HC_ISO_PTD_SKIPMAP_REG, 0xffffffff);
hcd->uses_new_polling = 1;

reg_write32(hcd->regs, HC_BUFFER_STATUS_REG,
ATL_BUF_FILL | INT_BUF_FILL);
}
hcd->state = HC_STATE_RUNNING;

static void isp1760_enable_interrupts(struct usb_hcd *hcd)
{
/* Set PTD interrupt AND & OR maps */
reg_write32(hcd->regs, HC_ATL_IRQ_MASK_AND_REG, 0);
reg_write32(hcd->regs, HC_ATL_IRQ_MASK_OR_REG, 0xffffffff);
reg_write32(hcd->regs, HC_INT_IRQ_MASK_AND_REG, 0);
reg_write32(hcd->regs, HC_INT_IRQ_MASK_OR_REG, 0xffffffff);
reg_write32(hcd->regs, HC_ISO_IRQ_MASK_AND_REG, 0);
reg_write32(hcd->regs, HC_ISO_IRQ_MASK_OR_REG, 0xffffffff);
/* step 23 passed */
}

static int isp1760_run(struct usb_hcd *hcd)
{
int retval;
u32 temp;
u32 command;
u32 chipid;

hcd->uses_new_polling = 1;

hcd->state = HC_STATE_RUNNING;
isp1760_enable_interrupts(hcd);
temp = reg_read32(hcd->regs, HC_HW_MODE_CTRL);
reg_write32(hcd->regs, HC_HW_MODE_CTRL, temp | HW_GLOBAL_INTR_EN);

Expand Down Expand Up @@ -581,8 +564,16 @@ static int isp1760_run(struct usb_hcd *hcd)
chipid & 0xffff, chipid >> 16);

/* PTD Register Init Part 2, Step 28 */
/* enable INTs */
isp1760_init_maps(hcd);

/* Setup registers controlling PTD checking */
reg_write32(hcd->regs, HC_ATL_PTD_LASTPTD_REG, 0x80000000);
reg_write32(hcd->regs, HC_INT_PTD_LASTPTD_REG, 0x80000000);
reg_write32(hcd->regs, HC_ISO_PTD_LASTPTD_REG, 0x00000001);
reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, 0xffffffff);
reg_write32(hcd->regs, HC_INT_PTD_SKIPMAP_REG, 0xffffffff);
reg_write32(hcd->regs, HC_ISO_PTD_SKIPMAP_REG, 0xffffffff);
reg_write32(hcd->regs, HC_BUFFER_STATUS_REG,
ATL_BUF_FILL | INT_BUF_FILL);

/* GRR this is run-once init(), being done every time the HC starts.
* So long as they're part of class devices, we can't do it init()
Expand Down

0 comments on commit f2d80a5

Please sign in to comment.