summaryrefslogtreecommitdiff
path: root/polux/include/platform.h
blob: 1893527275ef11f81ac82641de6ceb2109262e6c (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#ifndef PLATFORM_H
#define PLATFORM_H

#ifndef __spidboot__
#  include <linux/autoconf.h>
#endif

/*
 * TODO
 * ----
 * Replace ALL SP_XXX by their real linux CONFIG_XXX name !!!
 *
 */

#define PLCP_MAX_HOST (PLCP_MAX_HOST_UNICAST +		\
		       PLCP_MAX_HOST_MULTICAST +	\
		       PLCP_MAX_HOST_BROADCAST)

#ifdef CONFIG_SLAVE
#  define PLCP_MAX_HOST_BROADCAST  1
#  define PLCP_MAX_HOST_UNICAST    2
#  define PLCP_MAX_HOST_MULTICAST  0

#  define DMA_RX_POOL2_NB_BUFFER  12
#  define DMA_RX_POOL1_NB_BUFFER  16
#  define DMA_RX_POOL0_NB_BUFFER 128

#  define DMA_TX_POOL2_NB_BUFFER  12
#  define DMA_TX_POOL1_NB_BUFFER  16
#  define DMA_TX_POOL0_NB_BUFFER 128
#else
#  define PLCP_MAX_HOST_BROADCAST  1
#  define PLCP_MAX_HOST_UNICAST   64
#  define PLCP_MAX_HOST_MULTICAST  4

#  define DMA_RX_POOL2_NB_BUFFER  74
#  define DMA_RX_POOL1_NB_BUFFER  32
#  define DMA_RX_POOL0_NB_BUFFER 128

#  define DMA_TX_POOL2_NB_BUFFER  74
#  define DMA_TX_POOL1_NB_BUFFER  32
#  define DMA_TX_POOL0_NB_BUFFER 128
#endif

/* WARNING buffer must no cross a 64 KB boundary ! */
#define DMA_POOL2_BUFFER_SIZE 32768
#define DMA_POOL1_BUFFER_SIZE  4096
#define DMA_POOL0_BUFFER_SIZE   256

#define DMA_RX_POOL2_SIZE (DMA_RX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
#define DMA_RX_POOL1_SIZE (DMA_RX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
#define DMA_RX_POOL0_SIZE (DMA_RX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)

#define DMA_TX_POOL2_SIZE (DMA_TX_POOL2_NB_BUFFER * DMA_POOL2_BUFFER_SIZE)
#define DMA_TX_POOL1_SIZE (DMA_TX_POOL1_NB_BUFFER * DMA_POOL1_BUFFER_SIZE)
#define DMA_TX_POOL0_SIZE (DMA_TX_POOL0_NB_BUFFER * DMA_POOL0_BUFFER_SIZE)

#define DMA_RX_POOL_SIZE (DMA_RX_POOL2_SIZE + \
			  DMA_RX_POOL1_SIZE + \
			  DMA_RX_POOL0_SIZE)

#define DMA_TX_POOL_SIZE (DMA_TX_POOL2_SIZE + \
			  DMA_TX_POOL1_SIZE + \
			  DMA_TX_POOL0_SIZE)

#define PLC_DMA_ZONE_SIZE (DMA_RX_POOL_SIZE + DMA_TX_POOL_SIZE )

/************************
 *   Part not-common.
 ************************/

/* Include types only if we're not using assembler */
#if !defined(__asm__) && !defined(__ASSEMBLY__) && !defined(__KERNEL__)
#  include "sp_types.h"
#endif /* !defined(__asm__) && !defined(__ASSEMBLY__) */

#ifdef SP_SFK_WIN32
#  include "sfk-win32/excalibur.h"
#  include "sfk-win32/flip_defs.h"
#  include "plc/plc_ex.h"
#  include "plc/plc_v1.h"
#  include "plc/plc_v2.h"
#  include "platform_tina.h"
#endif /* SP_SFK_WIN32 */

#ifdef SP_FLIP
#  include "flip/excalibur.h"
#  include "flip/flip_defs.h"
#  include "flip/flip_common.h"
#  include "plc/plc_ex.h"
#  include "plc/plc_v1.h"
#  include "plc/plc_v2.h"
#  include "platform_tina.h"
#endif /* SP_FLIP */

#ifdef CONFIG_ARCH_SPC200E
#  ifndef SP_CRISTINA
/* DEPRECATED. Please use CONFIG_ARCH_SPC200E instead */
#    define SP_CRISTINA
#  endif

#  include "cristina/tina_g.h"
#  if defined(ANGELINA) || defined(PLAB)
#    include "cristina/angelina-board.h"
#  else
#    include "cristina/cristina-board.h"
#  endif

#  include "plc/plc_ex.h"
#  include "plc/plc_v1.h"
#  include "plc/plc_v2.h"
#  include "platform_tina.h"
#endif /* SP_CRISTINA */

#ifdef SP_CRISTINA_EMUL
#  include "cristina-emul/tina_g.h"
#  include "cristina-emul/cristina-emul-board.h"
#  include "platform_tina.h"
#endif /* SP_CRISTINA_EMUL */

#ifdef CONFIG_ARCH_SPC200C
#  ifndef SP_LISA
/* DEPRECATED. Please use CONFIG_ARCH_SPC200C instead */
#    define SP_LISA
#  endif

#  include "lisa/lisa.h"
#  ifdef CONFIG_MONA
#    include "lisa/mona-board.h"
#  endif

#  include "plc/plc_ex.h"
#  include "plc/plc_v1_lisa.h"
#  include "plc/plc_v2_lisa.h"
#  include "platform_lisa.h"
#endif /* SP_SPC2XXC */

#ifdef CONFIG_ARCH_MSE500
#  include "mse500/mse500.h"
#ifdef CONFIG_MACH_MSE500DINI_200
#  include "mse500/mse500dini_200-board.h"
#elif defined (CONFIG_MACH_MSE500_200)
#  include "mse500/msk500-ddr2-board.h"
#endif
#  include "plc/plc_ex.h"
#  include "plc/plc_v1_mse500.h"
#  include "plc/plc_v2_mse500.h"
#  include "platform_mse500.h"
#endif /* CONFIG_ARCH_MSE500 */

#endif /* PLATFORM_H */