summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mpc55xxevb/startup/start-config-ebi-cs-cal.c
blob: 4fa3632756fb45668b644b9eca9e61a962561d44 (plain) (blame)
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
/**
 * @file
 *
 * @ingroup mpc55xx
 *
 * @brief EBI calibration chip-select configuration.
 */

/*
 * Copyright (c) 2008-2011 embedded brains GmbH.  All rights reserved.
 *
 *  embedded brains GmbH
 *  Obere Lagerstr. 30
 *  82178 Puchheim
 *  Germany
 *  <rtems@embedded-brains.de>
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rtems.com/license/LICENSE.
 */

#include <bsp/mpc55xx-config.h>
#include <bsp/start.h>
#include <bsp.h>

#ifdef MPC55XX_HAS_EBI

BSP_START_TEXT_SECTION const struct EBI_CAL_CS_tag
  mpc55xx_start_config_ebi_cal_cs [] = {
#if defined(MPC55XX_BOARD_MPC5674FEVB)
  /* External SRAM */
  {
    .BR = {
      .B = {
        .BA = 0x20000000 >> 15,
        .PS = 0,
        .AD_MUX = 1,
        .BL = 1,
        .WEBS = 0,
        .TBDIP = 1,
        .SETA = 0,
        .BI = 0,
        .V = 1
      }
    },
    .OR = {
      .B = {
        .AM = 0xfff80000 >> 15,
        .SCY = 0,
        .BSCY = 0
      }
    }
  },
  /* External Ethernet controller */
  {
    .BR = {
      .B = {
        .BA = 0x3fff8000 >> 15,
        .PS = 0,
        .AD_MUX = 1,
        .BL = 0,
        .WEBS = 0,
        .TBDIP = 0,
        .SETA = 0,
        .BI = 1,
        .V = 1
      }
    },
    .OR = {
      .B = {
        .AM = 0xfff80000 >> 15,
        .SCY = 1,
        .BSCY = 0
      }
    }
  }
#elif defined(MPC55XX_BOARD_MPC5674F_ECU508)
  /* D_CS0 for external SRAM */
  {
    .BR = {
      .B = {
        .BA = 0x20000000 >> 15,
        .PS = 0,
        .AD_MUX = 1,
        .BL = 1,
        .WEBS = 0,
        .TBDIP = 1,
        .SETA = 0,
        .BI = 0,
        .V = 1
      }
    },
    .OR = {
      .B = {
        .AM = 0xffe00000 >> 15,
        .SCY = 0,
        .BSCY = 0
      }
    }
  },

  /* D_CS1 for Ethernet Controller */
  {
    .BR = {
      .B = {
        .BA = 0x3fff8000 >> 15,
        .PS = 0,
        .AD_MUX = 1,
        .BL = 0,
        .WEBS = 0,
        .TBDIP = 0,
        .SETA = 0,
        .BI = 1,
        .V = 1
      }
    },
    .OR = {
      .B = {
        .AM = 0xffff8000 >> 15,
        .SCY = 1,
        .BSCY = 0
      }
    }
  },

  /* D_CS2 unused */
  {
    .BR = {
      .B = {
        .BA = 0x20000000 >> 15,
        .PS = 0,
        .AD_MUX = 1,
        .BL = 0,
        .WEBS = 0,
        .TBDIP = 0,
        .SETA = 0,
        .BI = 1,
        .V = 0
      }
    },
    .OR = {
      .B = {
        .AM = 0xfff80000 >> 15,
        .SCY = 0,
        .BSCY = 0
      }
    }
  },

  /* D_CS3 for MRAM, ARCNET */
  {
    .BR = {
      .B = {
        .BA = 0x3ff80000 >> 15,
        .PS = 1,
        .AD_MUX = 1,
        .BL = 0,
        .WEBS = 1,
        .TBDIP = 0,
        .SETA = 0,
        .BI = 1,
        .V = 1
    }
  },
    .OR = {
      .B = {
        .AM = 0xfff80000 >> 15,
        .SCY = 1,
        .BSCY = 0
      }
    }
  }
#endif
};

BSP_START_TEXT_SECTION const size_t mpc55xx_start_config_ebi_cal_cs_count [] = {
  sizeof(mpc55xx_start_config_ebi_cal_cs) / sizeof(mpc55xx_start_config_ebi_cal_cs [0])
};

#endif /* MPC55XX_HAS_EBI */