1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/pci_def.h>
4 #include <device/pci_ops.h>
7 /* Chipset Initialization Registers magic */
8 void ich7_setup_cir(void)
11 uint8_t revision
= pci_read_config8(PCI_DEV(0, 31, 0), PCI_REVISION_ID
);
12 uint16_t pci_id
= pci_read_config16(PCI_DEV(0, 31, 0), PCI_DEVICE_ID
);
14 RCBA32(0x0088) = 0x0011d000;
15 RCBA16(0x01fc) = 0x060f;
16 RCBA32(0x01f4) = 0x86000040;
17 /* Although bit 6 is set, it is not read back */
18 RCBA32(0x0214) = 0x10030549;
19 RCBA32(0x0218) = 0x00020504;
21 RCBA32_AND_OR(0x3430, ~(3 << 0), 1 << 0);
22 RCBA16(0x0200) = 0x2008;
24 RCBA16(0x3e08) |= (1 << 7);
25 RCBA16(0x3e48) |= (1 << 7);
26 RCBA32(0x3e0e) |= (1 << 7);
27 RCBA32(0x3e4e) |= (1 << 7);
29 /* Only on mobile variants of revision b0 or later */
35 reg32
= RCBA32(0x2034);
36 reg32
&= ~(0x0f << 16);
38 RCBA32(0x2034) = reg32
;
40 /* FERR# MUX Enable (FME) */