blob: 46e30232b7ef781557a524d85aaba5abbbd9d595 [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.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef EARLY_VX900_H
21#define EARLY_VX900_H
22
23#include "raminit.h"
24#include "vx900.h"
25
26#include <arch/io.h>
27#include <cbmem.h>
28#include <stdint.h>
29#include <arch/io.h>
30
31/* North Module devices */
32#define HOST_CTR PCI_DEV(0, 0, 0)
33#define ERR_REP PCI_DEV(0, 0, 1)
34#define HOST_BUS PCI_DEV(0, 0, 2)
35#define MCU PCI_DEV(0, 0, 3)
36#define POWERMAN PCI_DEV(0, 0, 4)
37#define TRAF_CTR PCI_DEV(0, 0, 5)
38#define NSBIC PCI_DEV(0, 0, 7)
39
40#define GFX PCI_DEV(0, 1, 0)
41#define HDMI PCI_DEV(0, 1, 0)
42
43#define PEXx PCI_DEV(0, 3, x)
44#define PEX_CTR PCI_DEV(0, 3, 4)
45
46/* South Module devices */
47#define UARTx PCI_DEV(0, 0x0a, x)
48#define USB_MASS PCI_DEV(0, 0x0b, 0)
49#define SDIO PCI_DEV(0, 0x0c, 0)
50#define CARD_RD PCI_DEV(0, 0x0d, 0)
51#define SATA PCI_DEV(0, 0x0d, 0)
52#define USBx PCI_DEV(0, 0x10, x)
53#define USB_EHCI PCI_DEV(0, 0x10, 4)
54#define LPC PCI_DEV(0, 0x11, 0)
55#define PMU LPC
56#define SNMIC PCI_DEV(0, 0x11, 7)
57#define P2P PCI_DEV(0, 0x13, 0)
58#define HDAC PCI_DEV(0, 0x14, 0)
59
60/* These control the behavior of raminit */
61#define RAMINIT_USE_HW_RXCR_CALIB 0
62#define RAMINIT_USE_HW_MRS_SEQ 0
63
Alexandru Gagniuc88a30232013-06-04 23:37:56 -050064
65void enable_smbus(void);
66void dump_spd_data(spd_raw_data spd);
67void spd_read(u8 addr, spd_raw_data spd);
68
69void vx900_enable_pci_config_space(void);
70void vx900_disable_legacy_rom_shadow(void);
71
72void vx900_print_strapping_info(void);
73void vx900_disable_auto_reboot(void);
74
75void vx900_cpu_bus_interface_setup(void);
76
77void vx900_dram_set_gfx_resources(void);
78void vx900_disable_gfx(void);
79
80#endif /* EARLY_VX900_H */