mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 19:12:33 +08:00
parent
0796f79152
commit
8496e946b9
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user