blob: 899512b90c20061fa4d37d155135377bd9401cad [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>
Alexandru Gagniuc88a30232013-06-04 23:37:56 -050024#include <stdint.h>
Alexandru Gagniuc88a30232013-06-04 23:37:56 -050025
26/* North Module devices */
27#define HOST_CTR PCI_DEV(0, 0, 0)
28#define ERR_REP PCI_DEV(0, 0, 1)
29#define HOST_BUS PCI_DEV(0, 0, 2)
30#define MCU PCI_DEV(0, 0, 3)
31#define POWERMAN PCI_DEV(0, 0, 4)
32#define TRAF_CTR PCI_DEV(0, 0, 5)
33#define NSBIC PCI_DEV(0, 0, 7)
34
35#define GFX PCI_DEV(0, 1, 0)
36#define HDMI PCI_DEV(0, 1, 0)
37
38#define PEXx PCI_DEV(0, 3, x)
39#define PEX_CTR PCI_DEV(0, 3, 4)
40
41/* South Module devices */
42#define UARTx PCI_DEV(0, 0x0a, x)
43#define USB_MASS PCI_DEV(0, 0x0b, 0)
44#define SDIO PCI_DEV(0, 0x0c, 0)
45#define CARD_RD PCI_DEV(0, 0x0d, 0)
46#define SATA PCI_DEV(0, 0x0d, 0)
47#define USBx PCI_DEV(0, 0x10, x)
48#define USB_EHCI PCI_DEV(0, 0x10, 4)
49#define LPC PCI_DEV(0, 0x11, 0)
50#define PMU LPC
51#define SNMIC PCI_DEV(0, 0x11, 7)
52#define P2P PCI_DEV(0, 0x13, 0)
53#define HDAC PCI_DEV(0, 0x14, 0)
54
55/* These control the behavior of raminit */
56#define RAMINIT_USE_HW_RXCR_CALIB 0
57#define RAMINIT_USE_HW_MRS_SEQ 0
58
Alexandru Gagniuc88a30232013-06-04 23:37:56 -050059
60void enable_smbus(void);
61void dump_spd_data(spd_raw_data spd);
62void spd_read(u8 addr, spd_raw_data spd);
63
64void vx900_enable_pci_config_space(void);
65void vx900_disable_legacy_rom_shadow(void);
66
67void vx900_print_strapping_info(void);
68void vx900_disable_auto_reboot(void);
69
70void vx900_cpu_bus_interface_setup(void);
71
72void vx900_dram_set_gfx_resources(void);
73void vx900_disable_gfx(void);
74
75#endif /* EARLY_VX900_H */