Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202513
b: refs/heads/master
c: 215c330
h: refs/heads/master
i:
  202511: 5f9bd8e
v: v3
  • Loading branch information
Hong Liu authored and Matthew Garrett committed Aug 3, 2010
1 parent b7d2332 commit a8e44a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 6c8d0fdbe88e8bb1a07fa9a2830767cc180f7d1b
refs/heads/master: 215c330fe92be8d9f74bc292ea085dbe2ace6bf5
11 changes: 6 additions & 5 deletions trunk/drivers/platform/x86/intel_scu_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static inline int busy_loop(void) /* Wait till scu status is busy */
/* Read/Write power control(PMIC in Langwell, MSIC in PenWell) registers */
static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)
{
int i, nc, bytes;
int i, nc, bytes, d;
u32 offset = 0;
u32 err = 0;
u8 cbuf[IPC_WWBUF_SIZE] = { };
Expand All @@ -171,15 +171,16 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)

if (platform != MRST_CPU_CHIP_PENWELL) {
bytes = 0;
for(i=0; i<count; i++) {
d = 0;
for (i = 0; i < count; i++) {
cbuf[bytes++] = addr[i];
cbuf[bytes++] = addr[i] >> 8;
if (id != IPC_CMD_PCNTRL_R)
cbuf[bytes++] = data[i];
cbuf[bytes++] = data[d++];
if (id == IPC_CMD_PCNTRL_M)
cbuf[bytes++] = data[i + 1];
cbuf[bytes++] = data[d++];
}
for(i=0; i<bytes; i+=4)
for (i = 0; i < bytes; i += 4)
ipc_data_writel(wbuf[i/4], i);
ipc_command(bytes << 16 | id << 12 | 0 << 8 | op);
} else {
Expand Down

0 comments on commit a8e44a7

Please sign in to comment.