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