Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202509
b: refs/heads/master
c: 9dd3ade
h: refs/heads/master
i:
  202507: 0c61774
v: v3
  • Loading branch information
Alan Cox authored and Matthew Garrett committed Aug 3, 2010
1 parent faa6b82 commit c36f6f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 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: a5b74e69e1238eb46a6fcf2b9dc9d0e4efbb4e46
refs/heads/master: 9dd3adeb00b14d4b3d106360e2e33272deab35f3
17 changes: 5 additions & 12 deletions trunk/drivers/platform/x86/intel_scu_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ struct intel_scu_ipc_dev {

static struct intel_scu_ipc_dev ipcdev; /* Only one for now */

#define PLATFORM_LANGWELL 1
#define PLATFORM_PENWELL 2
static int platform; /* Platform type */

/*
Expand Down Expand Up @@ -169,7 +167,7 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)
return -ENODEV;
}

if (platform == PLATFORM_LANGWELL) {
if (platform != MRST_CPU_CHIP_PENWELL) {
/* Entry is 4 bytes for read/write, 5 bytes for read modify */
for (nc = 0; nc < count; nc++, offset += 3) {
cbuf[offset] = addr[nc];
Expand Down Expand Up @@ -217,7 +215,7 @@ static int pwr_reg_rdwr(u16 *addr, u8 *data, u32 count, u32 op, u32 id)
if (id == IPC_CMD_PCNTRL_R) { /* Read rbuf */
/* Workaround: values are read as 0 without memcpy_fromio */
memcpy_fromio(cbuf, ipcdev.ipc_base + 0x90, 16);
if (platform == PLATFORM_LANGWELL) {
if (platform != MRST_CPU_CHIP_PENWELL) {
for (nc = 0, offset = 2; nc < count; nc++, offset += 3)
data[nc] = ipc_data_readb(offset);
} else {
Expand Down Expand Up @@ -741,14 +739,9 @@ static struct pci_driver ipc_driver = {

static int __init intel_scu_ipc_init(void)
{
if (boot_cpu_data.x86 == 6 &&
boot_cpu_data.x86_model == 0x27 &&
boot_cpu_data.x86_mask == 1)
platform = PLATFORM_PENWELL;
else if (boot_cpu_data.x86 == 6 &&
boot_cpu_data.x86_model == 0x26)
platform = PLATFORM_LANGWELL;

platform = mrst_identify_cpu();
if (platform == 0)
return -ENODEV;
return pci_register_driver(&ipc_driver);
}

Expand Down

0 comments on commit c36f6f8

Please sign in to comment.