blob: 576262d601ba911c4f10dc98c28d11da4844291c [file] [log] [blame]
Vladimir Serbinenko55f3e2f2015-05-29 22:07:29 +02001#include <stdint.h>
2#include <string.h>
3#include <lib.h>
4#include <timestamp.h>
5#include <arch/byteorder.h>
6#include <arch/io.h>
7#include <device/pci_def.h>
8#include <device/pnp_def.h>
9#include <cpu/x86/lapic.h>
10#include <arch/acpi.h>
11#include <console/console.h>
12#include "northbridge/intel/sandybridge/sandybridge.h"
13#include "northbridge/intel/sandybridge/raminit_native.h"
14#include "southbridge/intel/bd82x6x/pch.h"
15#include "southbridge/intel/bd82x6x/gpio.h"
16#include <arch/cpu.h>
17#include <cpu/x86/msr.h>
Vladimir Serbinenkof06b08a2015-10-09 16:42:21 +020018#include <cbfs.h>
Vladimir Serbinenko55f3e2f2015-05-29 22:07:29 +020019
20void pch_enable_lpc(void)
21{
22 pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x3f0f);
23 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x84, 0x000c0681);
24 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x88, 0x000c1641);
25 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x8c, 0x001c0301);
26 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0x90, 0x00fc0701);
27 pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0070);
28 pci_write_config32(PCI_DEV(0, 0x1f, 0), 0xac, 0x80000000);
29}
30
31void rcba_config(void)
32{
33 /* Disable devices. */
34 RCBA32(0x3414) = 0x00000020;
35 RCBA32(0x3418) = 0x1ffc0ee3;
36
37}
38const struct southbridge_usb_port mainboard_usb_ports[] = {
39 { 1, 0, -1 },
40 { 1, 0, -1 },
41 { 1, 0, -1 },
42 { 1, 0, -1 },
43 { 1, 0, -1 },
44 { 1, 0, -1 },
45 { 1, 0, -1 },
46 { 1, 0, -1 },
47 { 1, 0, -1 },
48 { 1, 0, -1 },
49 { 1, 0, -1 },
50 { 1, 0, -1 },
51 { 1, 0, -1 },
52 { 1, 0, -1 },
53};
54
Vladimir Serbinenko55f3e2f2015-05-29 22:07:29 +020055void mainboard_get_spd(spd_raw_data *spd)
56{
Vladimir Serbinenkof06b08a2015-10-09 16:42:21 +020057 void *spd_file;
58 size_t spd_file_len = 0;
59 spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
60 &spd_file_len);
61 if (spd_file && spd_file_len >= 1024) {
62 int i;
63 for (i = 0; i < 4; i++)
64 memcpy(&spd[i], spd_file + 256 * i, 128);
65 }
Vladimir Serbinenko55f3e2f2015-05-29 22:07:29 +020066}