summaryrefslogtreecommitdiff
path: root/include/platform.h
blob: 5e442e1801a5418bd61899fe54a73e84378b9a82 (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
/*!
  \author Jean-Philippe Save (jean-philippe.save@spidcom.com)
  \author (c) SPiDCOM Technologies

  \version 1.1
  \date 2008/01/28
*/
/************************************************************/

#ifndef PLATFORM_H
#define PLATFORM_H

/************************
 *   Common part.
 ************************/

#ifdef CONFIG_VERSION_16M

#define PB_POOL_RING_SIZE		 		(1024)

#define DMA_RX_POOL2_NB_BUFFER			8
#define DMA_RX_POOL1_NB_BUFFER			16
#define DMA_RX_POOL0_NB_BUFFER			128

#define DMA_TX_POOL2_NB_BUFFER			8
#define DMA_TX_POOL1_NB_BUFFER			16
#define DMA_TX_POOL0_NB_BUFFER			128

#else

#define PB_POOL_RING_SIZE		 		(2048)

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

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

// 224 is the frame size before FEC
#define PB_DMA_POOL_SIZE  				(PB_POOL_RING_SIZE*224)

// 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 + PB_DMA_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 SP_CRISTINA
#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 SP_VERSATILE
#include "versatile/arm926_dev_chip.h"
#include "versatile/versatile-board.h"
#include "platform_tina.h"
#endif /* SP_VERSATILE */

//REMEMBER : SPC2XXC = LISA
#if defined(SP_SPC2XXC) || defined(SP_LISA)
#include "lisa/lisa.h"
#ifdef SP_FCM3
//#include "lisa/fcm3-board.h"
#include "lisa/arisa-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 */

#endif /* PLATFORM_H */