summaryrefslogtreecommitdiff
path: root/src/southbridge/amd/cimx/sb700/Platform.h
blob: 7476cb96fa78693b147531fdd8ea42d792d60c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
 * This file is part of the coreboot project.
 *
 * Copyright (C) 2012 Advanced Micro Devices, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef _AMD_SB_CIMx_PLATFORM_H_
#define _AMD_SB_CIMx_PLATFORM_H_

#pragma pack(push,1)

#include <cpu/amd/common/cbtypes.h>
#include <console/console.h>
#include <commonlib/loglevel.h>
#ifdef NULL
#undef NULL
#endif
#define NULL            0

typedef struct _EXT_PCI_ADDR{
	UINT32                  Reg :16;
	UINT32                  Func:3;
	UINT32                  Dev :5;
	UINT32                  Bus :8;
}EXT_PCI_ADDR;


typedef union _PCI_ADDR{
	UINT32                  ADDR;
	EXT_PCI_ADDR            Addr;
}PCI_ADDR;


#ifdef CIM_DEBUG

#if   CIM_DEBUG & 2
void    TraceDebug( UINT32 Level, CHAR8 *Format, ...);
#define TRACE(Arguments) TraceDebug Arguments
#else
#define TRACE(Arguments)
#endif

#if   CIM_DEBUG & 1
void    TraceCode ( UINT32 Level, UINT32 Code);
#define TRACECODE(Arguments) TraceCode Arguments
#else
#define TRACECODE(Arguments)
#endif
#else
	#ifdef TRACE
		#undef TRACE
	#endif
	#if CONFIG_REDIRECT_SBCIMX_TRACE_TO_SERIAL
		#define TRACE(Arguments) printk Arguments
	#else
		#define TRACE(Arguments) do {} while (0)
	#endif
	#define TRACECODE(Arguments)
#endif

#define FIXUP_PTR(ptr)  ptr

#pragma pack(pop)

#include "OEM.h"
#include "Amd.h"
#include "ACPILIB.h"
#include "SBTYPE.h"
#include "sbAMDLIB.h"
#include "SBCMNLIB.h"
#include "SB700.h"
#include "SBDEF.h"

#define DMSG_SB_TRACE   0x02

#endif /* _AMD_SB_CIMx_PLATFORM_H_ */