Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235912
b: refs/heads/master
c: 677aaa4
h: refs/heads/master
v: v3
  • Loading branch information
Marek Belisko authored and Greg Kroah-Hartman committed Feb 9, 2011
1 parent d45818b commit 4bad4c3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 27 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: 8bfef502595acf6a8b6f8f77f0cf919f94021c08
refs/heads/master: 677aaa430669861f39bd43c02bdbc2e8f7f7ad2c
59 changes: 33 additions & 26 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,33 +430,40 @@ int fix_ft1000_write_dpram32(struct ft1000_device *ft1000dev, u16 indx, u8 *buff
//
// Returns: None
//-----------------------------------------------------------------------
static void card_reset_dsp (struct ft1000_device *ft1000dev, bool value)
static void card_reset_dsp(struct ft1000_device *ft1000dev, bool value)
{
u16 status = STATUS_SUCCESS;
u16 tempword;

status = ft1000_write_register (ft1000dev, HOST_INTF_BE, FT1000_REG_SUP_CTRL);
status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_SUP_CTRL);
if (value)
{
DEBUG("Reset DSP\n");
status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_RESET);
tempword |= DSP_RESET_BIT;
status = ft1000_write_register(ft1000dev, tempword, FT1000_REG_RESET);
}
else
{
DEBUG("Activate DSP\n");
status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_RESET);
tempword |= DSP_ENCRYPTED;
tempword &= ~DSP_UNENCRYPTED;
status = ft1000_write_register(ft1000dev, tempword, FT1000_REG_RESET);
status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_RESET);
tempword &= ~EFUSE_MEM_DISABLE;
tempword &= ~DSP_RESET_BIT;
status = ft1000_write_register(ft1000dev, tempword, FT1000_REG_RESET);
status = ft1000_read_register(ft1000dev, &tempword, FT1000_REG_RESET);
}
u16 status = STATUS_SUCCESS;
u16 tempword;

status = ft1000_write_register(ft1000dev, HOST_INTF_BE,
FT1000_REG_SUP_CTRL);
status = ft1000_read_register(ft1000dev, &tempword,
FT1000_REG_SUP_CTRL);

if (value) {
DEBUG("Reset DSP\n");
status = ft1000_read_register(ft1000dev, &tempword,
FT1000_REG_RESET);
tempword |= DSP_RESET_BIT;
status = ft1000_write_register(ft1000dev, tempword,
FT1000_REG_RESET);
} else {
DEBUG("Activate DSP\n");
status = ft1000_read_register(ft1000dev, &tempword,
FT1000_REG_RESET);
tempword |= DSP_ENCRYPTED;
tempword &= ~DSP_UNENCRYPTED;
status = ft1000_write_register(ft1000dev, tempword,
FT1000_REG_RESET);
status = ft1000_read_register(ft1000dev, &tempword,
FT1000_REG_RESET);
tempword &= ~EFUSE_MEM_DISABLE;
tempword &= ~DSP_RESET_BIT;
status = ft1000_write_register(ft1000dev, tempword,
FT1000_REG_RESET);
status = ft1000_read_register(ft1000dev, &tempword,
FT1000_REG_RESET);
}
}

//---------------------------------------------------------------------------
Expand Down

0 comments on commit 4bad4c3

Please sign in to comment.