blob: 11c561a5f3b93bd9544229d557ddb77de9e62910 [file] [log] [blame]
Alexandru Gagniuc88a30232013-06-04 23:37:56 -05001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2011-2012 Alexandru Gagniuc <mr.nuke.me@gmail.com>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Alexandru Gagniuc88a30232013-06-04 23:37:56 -050015 */
16
17#ifndef EARLY_VX900_H
18#define EARLY_VX900_H
19
20#include "raminit.h"
21#include "vx900.h"
22
23#include <arch/io.h>
24#include <cbmem.h>
25#include <stdint.h>
26#include <arch/io.h>
27
28/* North Module devices */
29#define HOST_CTR PCI_DEV(0, 0, 0)
30#define ERR_REP PCI_DEV(0, 0, 1)
31#define HOST_BUS PCI_DEV(0, 0, 2)
32#define MCU PCI_DEV(0, 0, 3)
33#define POWERMAN PCI_DEV(0, 0, 4)
34#define TRAF_CTR PCI_DEV(0, 0, 5)
35#define NSBIC PCI_DEV(0, 0, 7)
36
37#define GFX PCI_DEV(0, 1, 0)
38#define HDMI PCI_DEV(0, 1, 0)
39
40#define PEXx PCI_DEV(0, 3, x)
41#define PEX_CTR PCI_DEV(0, 3, 4)
42
43/* South Module devices */
44#define UARTx PCI_DEV(0, 0x0a, x)
45#define USB_MASS PCI_DEV(0, 0x0b, 0)
46#define SDIO PCI_DEV(0, 0x0c, 0)
47#define CARD_RD PCI_DEV(0, 0x0d, 0)
48#define SATA PCI_DEV(0, 0x0d, 0)
49#define USBx PCI_DEV(0, 0x10, x)
50#define USB_EHCI PCI_DEV(0, 0x10, 4)
51#define LPC PCI_DEV(0, 0x11, 0)
52#define PMU LPC
53#define SNMIC PCI_DEV(0, 0x11, 7)
54#define P2P PCI_DEV(0, 0x13, 0)
55#define HDAC PCI_DEV(0, 0x14, 0)
56
57/* These control the behavior of raminit */
58#define RAMINIT_USE_HW_RXCR_CALIB 0
59#define RAMINIT_USE_HW_MRS_SEQ 0
60
Alexandru Gagniuc88a30232013-06-04 23:37:56 -050061
62void enable_smbus(void);
63void dump_spd_data(spd_raw_data spd);
64void spd_read(u8 addr, spd_raw_data spd);
65
66void vx900_enable_pci_config_space(void);
67void vx900_disable_legacy_rom_shadow(void);
68
69void vx900_print_strapping_info(void);
70void vx900_disable_auto_reboot(void);
71
72void vx900_cpu_bus_interface_setup(void);
73
74void vx900_dram_set_gfx_resources(void);
75void vx900_disable_gfx(void);
76
77#endif /* EARLY_VX900_H */