blob: e2a785cb7e18202765eac1b4fc02cbec2a53ca91 [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 Serbinenko609bd942016-01-31 14:00:54 +010055void mainboard_early_init(int s3resume) {
56}
57
Vladimir Serbinenkoffbb3c02016-02-10 01:36:25 +010058void mainboard_config_superio(void)
59{
60}
61
Vladimir Serbinenko55f3e2f2015-05-29 22:07:29 +020062void mainboard_get_spd(spd_raw_data *spd)
63{
Vladimir Serbinenkof06b08a2015-10-09 16:42:21 +020064 void *spd_file;
65 size_t spd_file_len = 0;
66 spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
67 &spd_file_len);
68 if (spd_file && spd_file_len >= 1024) {
69 int i;
70 for (i = 0; i < 4; i++)
71 memcpy(&spd[i], spd_file + 256 * i, 128);
72 }
Vladimir Serbinenko55f3e2f2015-05-29 22:07:29 +020073}