7ef9ce163be859e3708b10c6ed1b2cf85fb8f243
[coreboot.git] / src / mainboard / dell / s1850 / s1850_fixups.c
1 #include <arch/romcc_io.h>
2
3 static void mch_reset(void)
4 {
5         return;
6 }
7
8
9
10 static void mainboard_set_e7520_pll(unsigned bits)
11 {
12         return;
13 }
14
15
16 static void mainboard_set_e7520_leds(void)
17 {
18         return;
19 }
20
21 static void mainboard_set_ich5(void)
22 {
23         /* coma is 0x3f8 , comb is 0x2f8*/
24         pci_write_config8(PCI_DEV(0, 0x1f, 0), 0xe0, 0x10);
25         /* enable decoding of various devices */
26         pci_write_config16(PCI_DEV(0, 0x1f, 0), 0xe6, 0x140f);
27         /* 1M flash */
28         pci_write_config8(PCI_DEV(0, 0x1f, 0), 0xe3, 0xc0);
29         pci_write_config8(PCI_DEV(0, 0x1f, 0), 0xf0, 0x0);
30         /* disable certain devices -- see data sheet -- this is from
31          * dell settings via lspci
32          * Note that they leave SMBUS disabled -- 8f6f.
33          * we leave it enabled and visible in config space -- 8f66
34          */
35         pci_write_config16(PCI_DEV(0, 0x1f, 0), 0xf2, 0x8f66);
36         /* GPIOs -- needed, possibly, for SPD */
37         pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x58, 0x881);
38         pci_write_config8(PCI_DEV(0, 0x1f, 0), 0x5c, 0x10);
39
40         /* now the fun begins ... enable the GPIOs as done on factory */
41         /* factory config from IO ports
42          * It has a few more things enabled than default!
43          */
44         outl(0x1ae0f183, 0x880);
45         outl(0x1b00ffff, 0x884);
46         outl(0x131f0000, 0x88c);
47         outl(0x00000000, 0x894);
48         outl(0x00040000, 0x898);
49         outl(0x00000000, 0x8a4);
50         outl(0x00000000, 0x8a8);
51         outl(0x000031c0, 0x8ac);
52         outl(0x00000007, 0x8b0);
53         outl(0x00000304, 0x8b4);
54         outl(0x00030303, 0x8b8);
55
56 }
57
58
59
60