| 1 |
|
| 2 |
|
| 3 |
#include <bootblock_common.h> |
| 4 |
#include <device/pnp_def.h> |
| 5 |
#include <device/pnp_ops.h> |
| 6 |
#include <device/pci_ops.h> |
| 7 |
#include <device/pci_def.h> |
| 8 |
#include <northbridge/intel/sandybridge/raminit.h> |
| 9 |
#include <northbridge/intel/sandybridge/sandybridge.h> |
| 10 |
#include <southbridge/intel/bd82x6x/pch.h> |
| 11 |
#include <southbridge/intel/common/gpio.h> |
| 12 |
#include <superio/winbond/common/winbond.h> |
| 13 |
|
| 14 |
void mainboard_pch_lpc_setup(void) |
| 15 |
{ |
| 16 |
|
| 17 |
pci_write_config16(PCH_LPC_DEV, LPC_IO_DEC, 0x0070); |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
pci_write_config16(PCH_LPC_DEV, LPC_EN, |
| 25 |
KBC_LPC_EN | MC_LPC_EN | |
| 26 |
CNF1_LPC_EN | GAMEH_LPC_EN | |
| 27 |
COMA_LPC_EN | COMB_LPC_EN); |
| 28 |
} |
| 29 |
|
| 30 |
void bootblock_mainboard_early_init(void) |
| 31 |
{ |
| 32 |
int lvds_3v = 0; |
| 33 |
int dis_bl_inv = 1; |
| 34 |
const pnp_devfn_t dev = PNP_DEV(0x2e, 0x9); |
| 35 |
pnp_enter_conf_state(dev); |
| 36 |
pnp_write_config(dev, 0x29, 0x02); |
| 37 |
pnp_write_config(dev, PNP_IDX_EN, 0x03); |
| 38 |
pnp_write_config(dev, 0x2a, 0x01); |
| 39 |
|
| 40 |
pnp_write_config(dev, 0x2c, 0xc3); |
| 41 |
|
| 42 |
pnp_write_config(dev, 0x2d, 0x00); |
| 43 |
|
| 44 |
pnp_set_logical_device(dev); |
| 45 |
|
| 46 |
pnp_write_config(dev, 0xe3, 0xdd); |
| 47 |
pnp_write_config(dev, 0xe4, (dis_bl_inv << 5) | (lvds_3v << 1)); |
| 48 |
|
| 49 |
pnp_write_config(dev, PNP_IDX_MSC3, 0x40); |
| 50 |
pnp_exit_conf_state(dev); |
| 51 |
} |
| 52 |
|
| 53 |
void mainboard_fill_pei_data(struct pei_data *pei_data) |
| 54 |
{ |
| 55 |
} |
| 56 |
|
| 57 |
void mainboard_early_init(int s3resume) |
| 58 |
{ |
| 59 |
|
| 60 |
pci_write_config32(PCI_DEV(0, 0, 0), DEVEN, |
| 61 |
pci_read_config32(PCI_DEV(0, 0, 0), DEVEN) | |
| 62 |
DEVEN_PEG10); |
| 63 |
} |