devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2008-2009 coresystems GmbH |
| 5 | * Copyright (C) 2014 Vladimir Serbinenko |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; version 2 of |
| 10 | * the License. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | */ |
| 17 | |
| 18 | #include <northbridge/intel/sandybridge/sandybridge.h> |
Kyösti Mälkki | f1b58b7 | 2019-03-01 13:43:02 +0200 | [diff] [blame] | 19 | #include <device/pci_ops.h> |
devmaster64 | 3f888ef | 2019-01-09 11:42:32 +0530 | [diff] [blame] | 20 | #include <northbridge/intel/sandybridge/raminit_native.h> |
| 21 | #include <southbridge/intel/bd82x6x/pch.h> |
| 22 | #include <superio/nuvoton/common/nuvoton.h> |
| 23 | #include <superio/nuvoton/nct6779d/nct6779d.h> |
| 24 | |
| 25 | #define SIO_PORT 0x2e |
| 26 | #define SIO_DEV PNP_DEV(SIO_PORT, 0) |
| 27 | #define ACPI_DEV PNP_DEV(SIO_PORT, NCT6779D_ACPI) |
| 28 | |
| 29 | void pch_enable_lpc(void) |
| 30 | { |
| 31 | pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | KBC_LPC_EN); |
| 32 | } |
| 33 | |
| 34 | void mainboard_rcba_config(void) |
| 35 | { |
| 36 | } |
| 37 | |
| 38 | const struct southbridge_usb_port mainboard_usb_ports[] = { |
| 39 | { 1, 0, 0 }, |
| 40 | { 1, 0, 0 }, |
| 41 | { 1, 0, 1 }, |
| 42 | { 1, 0, 1 }, |
| 43 | { 1, 0, 2 }, |
| 44 | { 1, 0, 2 }, |
| 45 | { 1, 0, 3 }, |
| 46 | { 1, 0, 3 }, |
| 47 | { 1, 0, 4 }, |
| 48 | { 1, 0, 4 }, |
| 49 | { 1, 0, 6 }, |
| 50 | { 1, 0, 5 }, |
| 51 | { 1, 0, 5 }, |
| 52 | { 1, 0, 6 }, |
| 53 | }; |
| 54 | |
| 55 | void mainboard_early_init(int s3resume) |
| 56 | { |
| 57 | } |
| 58 | |
| 59 | void mainboard_config_superio(void) |
| 60 | { |
| 61 | nuvoton_pnp_enter_conf_state(SIO_DEV); |
| 62 | pnp_set_logical_device(ACPI_DEV); |
| 63 | pnp_write_config(ACPI_DEV, 0xe4, 0x10); |
| 64 | nuvoton_pnp_exit_conf_state(SIO_DEV); |
| 65 | } |
| 66 | |
| 67 | void mainboard_get_spd(spd_raw_data *spd, bool id_only) |
| 68 | { |
| 69 | read_spd(&spd[0], 0x50, id_only); |
| 70 | read_spd(&spd[2], 0x52, id_only); |
| 71 | } |