Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201044
b: refs/heads/master
c: 2decd5a
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 19, 2010
1 parent 264e035 commit 87f4239
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: 878c495644be28cc881e7ee792f00fd879a1ebf9
refs/heads/master: 2decd5a7cea2c1dae6418fe778857d43680a91aa
12 changes: 8 additions & 4 deletions trunk/drivers/platform/x86/intel_scu_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ int intel_scu_ipc_simple_command(int cmd, int sub)
mutex_unlock(&ipclock);
return -ENODEV;
}
ipc_command(cmd << 12 | sub);
ipc_command(sub << 12 | cmd);
err = busy_loop();
mutex_unlock(&ipclock);
return err;
Expand All @@ -501,9 +501,9 @@ EXPORT_SYMBOL(intel_scu_ipc_simple_command);
* @cmd: command
* @sub: sub type
* @in: input data
* @inlen: input length
* @inlen: input length in dwords
* @out: output data
* @outlein: output length
* @outlein: output length in dwords
*
* Issue a command to the SCU which involves data transfers. Do the
* data copies under the lock but leave it for the caller to interpret
Expand All @@ -524,7 +524,7 @@ int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
for (i = 0; i < inlen; i++)
ipc_data_writel(*in++, 4 * i);

ipc_command((cmd << 12) | sub | (inlen << 18));
ipc_command((sub << 12) | cmd | (inlen << 18));
err = busy_loop();

for (i = 0; i < outlen; i++)
Expand Down Expand Up @@ -556,6 +556,10 @@ int intel_scu_ipc_i2c_cntrl(u32 addr, u32 *data)
u32 cmd = 0;

mutex_lock(&ipclock);
if (ipcdev.pdev == NULL) {
mutex_unlock(&ipclock);
return -ENODEV;
}
cmd = (addr >> 24) & 0xFF;
if (cmd == IPC_I2C_READ) {
writel(addr, ipcdev.i2c_base + IPC_I2C_CNTRL_ADDR);
Expand Down

0 comments on commit 87f4239

Please sign in to comment.