| 1 |
|
| 2 |
|
| 3 |
#include <arch/io.h> |
| 4 |
#include <bootstate.h> |
| 5 |
#include <cf9_reset.h> |
| 6 |
#include <device/pci_def.h> |
| 7 |
#include <device/pci_ids.h> |
| 8 |
#include <device/pci_ops.h> |
| 9 |
#include <gpio.h> |
| 10 |
#include <hwilib.h> |
| 11 |
#include <intelblocks/lpc_lib.h> |
| 12 |
#include <intelblocks/pcr.h> |
| 13 |
#include <soc/pcr_ids.h> |
| 14 |
#include <baseboard/variants.h> |
| 15 |
#include <types.h> |
| 16 |
|
| 17 |
void variant_mainboard_final(void) |
| 18 |
{ |
| 19 |
struct device *dev = NULL; |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
pcr_write16(PID_ITSS, 0x314c, 0x2103); |
| 24 |
|
| 25 |
|
| 26 |
lpc_enable_pci_clk_cntl(); |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
pcr_or32(PID_LPC, PCR_LPC_PRC, (PCR_LPC_CCE_EN | PCR_LPC_PCE_EN)); |
| 35 |
|
| 36 |
|
| 37 |
dev = dev_find_device(PCI_VID_SIEMENS, 0x403e, 0); |
| 38 |
if (dev) { |
| 39 |
if (CONFIG(PCI_ALLOW_BUS_MASTER_ANY_DEVICE)) |
| 40 |
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER); |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
struct device *parent = dev->upstream->dev; |
| 45 |
if (parent && parent->device == PCI_DID_TI_XIO2001) |
| 46 |
pci_write_config8(parent, 0xd8, 0x1d); |
| 47 |
} |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
dev = dev_find_device(PCI_VID_SIEMENS, 0x403f, 0); |
| 52 |
if (dev) { |
| 53 |
struct device *parent = dev->upstream->dev; |
| 54 |
if (parent && parent->device == PCI_DID_TI_XIO2001) |
| 55 |
pci_write_config8(parent, 0xd8, 0x3c); |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
outb(FULL_RST, RST_CNT); |
| 62 |
} |
| 63 |
|
| 64 |
static void finalize_boot(void *unused) |
| 65 |
{ |
| 66 |
|
| 67 |
gpio_output(CNV_RGI_DT, 1); |
| 68 |
} |
| 69 |
|
| 70 |
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_BOOT, BS_ON_ENTRY, finalize_boot, NULL); |