add fix from #1516

SVN-Revision: 6697
This commit is contained in:
Felix Fietkau 2007-03-25 16:25:15 +00:00
parent 0796f79152
commit 8496e946b9

View File

@ -162,7 +162,6 @@ static int ssb_extpci_read_config(struct ssb_pcicore *pc,
goto unmap; goto unmap;
} }
val = readl(mmio);
val >>= (8 * (off & 3)); val >>= (8 * (off & 3));
switch (len) { switch (len) {
@ -210,12 +209,10 @@ static int ssb_extpci_write_config(struct ssb_pcicore *pc,
switch (len) { switch (len) {
case 1: case 1:
val = readl(mmio);
val &= ~(0xFF << (8 * (off & 3))); val &= ~(0xFF << (8 * (off & 3)));
val |= *((const u8 *)buf) << (8 * (off & 3)); val |= *((const u8 *)buf) << (8 * (off & 3));
break; break;
case 2: case 2:
val = readl(mmio);
val &= ~(0xFFFF << (8 * (off & 3))); val &= ~(0xFFFF << (8 * (off & 3)));
val |= *((const u16 *)buf) << (8 * (off & 3)); val |= *((const u16 *)buf) << (8 * (off & 3));
break; break;
@ -223,7 +220,7 @@ static int ssb_extpci_write_config(struct ssb_pcicore *pc,
val = *((const u32 *)buf); val = *((const u32 *)buf);
break; break;
} }
writel(*((const u32 *)buf), mmio); writel(val, mmio);
err = 0; err = 0;
unmap: unmap: