1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-28 05:16:16 +02:00

add fix from #1516

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6697 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2007-03-25 16:25:15 +00:00
parent 21ac274895
commit 742cf09a44

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: