annotate src/cs/system/main/init.c @ 678:edaceb78719a

doc/Leonardo-target: Tango unused Calypso signals update
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 20 Jun 2020 05:08:39 +0000
parents 85cc48e18a43
children 140a0d24a64c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * INIT.C
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 *
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * This module allows to initialize the board:
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * - wait states,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * - unmask selected interrupts,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * - initialize clock,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 * - disable watchdog.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 * Dummy functions used by the EVA3 library are defined.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 /* Config Files */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #ifndef _WINDOWS
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 #include "l1sw.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 #include "rf.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 #include "chipset.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #include "board.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #include "swconfig.cfg"
602
92dbfa906f66 fc-target.cfg config header renamed to more sensible fc-target.h
Mychaela Falconia <falcon@freecalypso.org>
parents: 519
diff changeset
20 #include "fc-target.h"
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #include "rv.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "sys.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #include "debug.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #ifdef BLUETOOTH_INCLUDED
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 #include "btemobile.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #ifdef BLUETOOTH
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "bluetooth.cfg"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "rv/rv_defined_swe.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 /* Include Files */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #include <assert.h>
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #include <ctype.h>
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #include <stdarg.h>
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #include <stdlib.h>
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 #include <string.h>
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #include "nucleus.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #include "sys_types.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #include "l1_types.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #include "l1_confg.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #include "l1_const.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #if TESTMODE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #include "l1tm_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #endif // TESTMODE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #if (AUDIO_TASK == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #include "l1audio_const.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #include "l1audio_cust.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #include "l1audio_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #endif // AUDIO_TASK
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 #if (L1_GTT == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 #include "l1gtt_const.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #include "l1gtt_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #if (L1_MP3 == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #include "l1mp3_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 #if (L1_MIDI == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 #include "l1midi_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 #if (L1_AAC == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 #include "l1aac_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 #if (L1_DYN_DSP_DWNLD == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 #include "l1_dyn_dwl_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 #if (TRACE_TYPE == 4)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 #include "l1_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 #if ((OP_L1_STANDALONE == 1) && (CODE_VERSION != SIMULATION) && (PSP_STANDALONE == 0))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 #if (AUDIO_TASK == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 #include "l1audio_signa.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 #include "l1audio_msgty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 #endif // AUDIO_TASK
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 #if (L1_GTT == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 #include "l1gtt_signa.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 #include "l1gtt_msgty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 #include "l1_defty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 #include "cust_os.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 #include "l1_msgty.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 #include "nu_main.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 #include "l1_varex.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 #include "l1_proto.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 #include "hw_debug.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 #include "l1_trace.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 #endif /* ((OP_L1_STANDALONE == 1) && (CODE_VERSION != SIMULATION) && (PSP_STANDALONE==0)) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 #include "armio/armio.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 #include "timer/timer.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 #include "rvf/rvf_api.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 #include "rvm/rvm_api.h" /* A-M-E-N-D-E-D! */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 #include "sim/sim.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 #include "abb/abb.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 #include "inth/iq.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 #include "tpudrv.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 #include "memif/mem.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 #include "clkm/clkm.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 #include "inth/inth.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
267
f62b71017afd init.c: initial preen at the module level
Mychaela Falconia <falcon@freecalypso.org>
parents: 265
diff changeset
128 #if (OP_L1_STANDALONE == 1)
f62b71017afd init.c: initial preen at the module level
Mychaela Falconia <falcon@freecalypso.org>
parents: 265
diff changeset
129 #include "uart/serialswitch_core.h"
f62b71017afd init.c: initial preen at the module level
Mychaela Falconia <falcon@freecalypso.org>
parents: 265
diff changeset
130 #else
f62b71017afd init.c: initial preen at the module level
Mychaela Falconia <falcon@freecalypso.org>
parents: 265
diff changeset
131 #include "uart/serialswitch.h"
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 #endif
267
f62b71017afd init.c: initial preen at the module level
Mychaela Falconia <falcon@freecalypso.org>
parents: 265
diff changeset
133 #include "uart/traceswitch.h"
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #include "dma/dma.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 #include "rhea/rhea_arm.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 #include "ulpd/ulpd.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 #if (PSP_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 extern void ffs_main_init(void);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 extern void create_tasks(void);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 #if TI_NUC_MONITOR == 1
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 extern void ti_nuc_monitor_tdma_action( void );
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 #if WCP_PROF == 1
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 #if PRF_CALIBRATION == 1
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 extern NU_HISR prf_CalibrationHISR;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 void l1ctl_pgm_clk32(UWORD32 nb_hf, UWORD32 nb_32khz);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 extern void L1_trace_string(char *s);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #endif /* (OP_L1_STANDALONE) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 #if (OP_L1_STANDALONE == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 #if ((TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==7) || TESTMODE)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 #include "uart/uart.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 * Serial Configuration set up.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 extern char ser_cfg_info[NUMBER_OF_TR_UART];
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 #include "rvt_gen.h"
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 extern T_RVT_USER_ID trace_id;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 #endif /* (OP_L1_STANDALONE == 1) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 * Serial Configuration set up.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 ** One config is:
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 ** {XXX_BT_HCI, // Bluetooth HCI
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 ** XXX_FAX_DATA, // Fax/Data AT-Cmd
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 ** XXX_TRACE, // L1/Riviera Trace Mux
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 ** XXX_TRACE}, // Trace PS
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 **
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 ** with XXX being DUMMY, UART_IRDA or UART_MODEM
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 #if ((((TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==7) ||\
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 (TESTMODE)) && (OP_L1_STANDALONE == 1)) || (OP_L1_STANDALONE == 0))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 #if (OP_L1_STANDALONE == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 static T_AppliSerialInfo appli_ser_cfg_info =
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 T_AppliSerialInfo appli_ser_cfg_info =
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 #endif /* OP_L1_STANDALONE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 {
273
8fb920215a46 init.c & components/main-init: put RVTMUX on MODEM on C139 like before
Mychaela Falconia <falcon@freecalypso.org>
parents: 272
diff changeset
196 #ifdef CONFIG_RVTMUX_ON_MODEM
8fb920215a46 init.c & components/main-init: put RVTMUX on MODEM on C139 like before
Mychaela Falconia <falcon@freecalypso.org>
parents: 272
diff changeset
197 {DUMMY_BT_HCI,
8fb920215a46 init.c & components/main-init: put RVTMUX on MODEM on C139 like before
Mychaela Falconia <falcon@freecalypso.org>
parents: 272
diff changeset
198 DUMMY_FAX_DATA,
8fb920215a46 init.c & components/main-init: put RVTMUX on MODEM on C139 like before
Mychaela Falconia <falcon@freecalypso.org>
parents: 272
diff changeset
199 UART_MODEM_TRACE,
8fb920215a46 init.c & components/main-init: put RVTMUX on MODEM on C139 like before
Mychaela Falconia <falcon@freecalypso.org>
parents: 272
diff changeset
200 DUMMY_TRACE}, // 0x0248
8fb920215a46 init.c & components/main-init: put RVTMUX on MODEM on C139 like before
Mychaela Falconia <falcon@freecalypso.org>
parents: 272
diff changeset
201 #else // RVTMUX_ON_MODEM
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 UART_MODEM_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 UART_IRDA_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 DUMMY_TRACE}, // default config = 0x0168
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 #ifdef BTEMOBILE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 12, // 12 serial config allowed
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 #else // BTEMOBILE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 9, // 9 serial config allowed
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 {
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 // Configs with Condat Panel only
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 DUMMY_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 UART_IRDA_TRACE}, // 0x1048
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 DUMMY_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 UART_MODEM_TRACE}, // 0x2048
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 // Configs with L1/Riviera Trace only
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 UART_IRDA_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 DUMMY_TRACE}, // 0x0148
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 UART_MODEM_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 DUMMY_TRACE}, // 0x0248
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 // Configs with AT-Cmd only
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 UART_MODEM_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 DUMMY_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 DUMMY_TRACE}, // 0x0068
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 // Configs with Condat Panel and L1/Riviera Trace
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 UART_MODEM_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 UART_IRDA_TRACE}, // 0x1248
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 UART_IRDA_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 UART_MODEM_TRACE}, // 0x2148
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 // Configs with Condat Panel and AT-Cmd
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 UART_MODEM_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 DUMMY_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 UART_IRDA_TRACE}, // 0x1068
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 #ifdef BTEMOBILE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 // Configs with L1/Riviera Trace and Bluetooth HCI
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 {UART_IRDA_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 UART_MODEM_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 DUMMY_TRACE}, // 0x0249
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 {UART_MODEM_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 DUMMY_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 UART_IRDA_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 DUMMY_TRACE}, // 0x014A
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 // Configs with AT-Cmd and Bluetooth HCI
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 {UART_IRDA_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 UART_MODEM_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 DUMMY_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 DUMMY_TRACE}, // 0x0069
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 #endif // BTEMOBILE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 // Configs with L1/Riviera Trace and AT-Cmd
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 {DUMMY_BT_HCI,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 UART_MODEM_FAX_DATA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 UART_IRDA_TRACE,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 DUMMY_TRACE} // 0x0168
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 }
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 };
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 #endif /* (TRACE_TYPE ...) || (OP_L1_STANDALONE == 0) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 * Init_Target
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 *
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 * Performs low-level HW Initialization.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 void Init_Target(void)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 {
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 #if (BOARD == 5)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 #define WS_ROM (1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 #define WS_RAM (1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 #define WS_APIF (1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 #define WS_CS2 (7) /* LCD on EVA3. */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 #define WS_CS0 (7) /* DUART on EVA3. UART16750 and latch on A-Sample. */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 #define WS_CS1 (7) /* LCD on A-Sample. */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 IQ_InitWaitState (WS_ROM, WS_RAM, WS_APIF, WS_CS2, WS_CS0, WS_CS1);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 IQ_InitClock (2); /* Internal clock division factor. */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294 IQ_MaskAll (); /* Mask all interrupts. */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 IQ_SetupInterrupts (); /* IRQ priorities. */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 TM_DisableWatchdog ();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 * Reset all TSP and DBG fdefault values
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 AI_ResetTspIO ();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 AI_ResetDbgReg ();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 AI_ResetIoConfig ();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 * Warning! The external reset signal is connected to the Omega and the
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 * external device. If the layer 1 is used its initialization removes
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 * the external reset. If the application does not use the layer 1
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 * you must remove the external reset (bit 2 of the reset control
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 * register 0x505808).
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 AI_ResetTspIO();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 AI_ResetDbgReg();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 AI_ResetIoConfig();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 * Configure all IOs (see RD300 specification).
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 AI_ConfigBitAsInput (1);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 AI_EnableBit (1);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 AI_ConfigBitAsOutput (2);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 AI_EnableBit (2);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 AI_ConfigBitAsInput (11);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 AI_EnableBit (11);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 AI_ConfigBitAsOutput (13);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 AI_EnableBit (13);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 AI_Power (1); /* Maintain power supply. */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 #elif (BOARD == 6) || (BOARD == 7) || (BOARD == 8) || (BOARD == 9) || \
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 (BOARD == 40) || (BOARD == 41) || (BOARD == 42) || (BOARD == 43) || (BOARD == 45) || \
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 (BOARD == 35) || (BOARD == 46) || (BOARD == 70) || (BOARD == 71)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 #if (PSP_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 // RIF/SPI rising edge clock for ULYSSE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 #if ((ANLG_FAM == 1) || (ANLG_FAM == 2) || (ANLG_FAM == 3)|| (ANLG_FAM == 11))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 #if ((CHIPSET >= 3))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 #if (CHIPSET == 12)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 F_CONF_RIF_RX_RISING_EDGE;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348 F_CONF_SPI_RX_RISING_EDGE;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 #elif (CHIPSET == 15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 //do the DRP init here for Locosto
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 #if (L1_DRP == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 // drp_power_on(); This should be done after the script is downloaded.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 #if (BOARD==35)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 *((volatile SYS_UWORD16 *) ASIC_CONF) = 0x2000;
675
85cc48e18a43 init.c: enable LPG and PWL pin mux on Tango
Mychaela Falconia <falcon@freecalypso.org>
parents: 666
diff changeset
357 #elif defined(CONFIG_TARGET_PIRELLI) || \
85cc48e18a43 init.c: enable LPG and PWL pin mux on Tango
Mychaela Falconia <falcon@freecalypso.org>
parents: 666
diff changeset
358 defined(CONFIG_TARGET_DSAMPLE) || defined(CONFIG_TARGET_TANGO)
286
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
359 /*
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
360 * Pirelli's version of this Init_Target() function
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
361 * in their fw sets the ASIC_CONF register to 0x6050,
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
362 * which means PWL on the LT/PWL pin and LPG on the
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
363 * DSR_MODEM pin.
666
711b1c6c4e72 LPG and PWL config for D-Sample and GTM900 targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 649
diff changeset
364 *
711b1c6c4e72 LPG and PWL config for D-Sample and GTM900 targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 649
diff changeset
365 * Also as a bold FreeCalypso change, we now set the same
711b1c6c4e72 LPG and PWL config for D-Sample and GTM900 targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 649
diff changeset
366 * PWL and LPG pin configs on the D-Sample: the DS board
711b1c6c4e72 LPG and PWL config for D-Sample and GTM900 targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 649
diff changeset
367 * has LEDs for PWL and for LPG and they work as expected,
711b1c6c4e72 LPG and PWL config for D-Sample and GTM900 targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 649
diff changeset
368 * thus the board is clearly wired for this pin config.
675
85cc48e18a43 init.c: enable LPG and PWL pin mux on Tango
Mychaela Falconia <falcon@freecalypso.org>
parents: 666
diff changeset
369 *
85cc48e18a43 init.c: enable LPG and PWL pin mux on Tango
Mychaela Falconia <falcon@freecalypso.org>
parents: 666
diff changeset
370 * Finally, we set the same config on Tango targets:
85cc48e18a43 init.c: enable LPG and PWL pin mux on Tango
Mychaela Falconia <falcon@freecalypso.org>
parents: 666
diff changeset
371 * DSR_MODEM/LPG is configured as LPG in order to avoid
85cc48e18a43 init.c: enable LPG and PWL pin mux on Tango
Mychaela Falconia <falcon@freecalypso.org>
parents: 666
diff changeset
372 * the floating input, whereas LT/PWL works better as PWL.
286
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
373 */
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
374 *((volatile SYS_UWORD16 *) ASIC_CONF) = 0x6050;
609
238b67a785f2 init.c: DSR_MODEM/LPG is LPG on the GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 603
diff changeset
375 #elif defined(CONFIG_TARGET_GTAMODEM) || defined(CONFIG_TARGET_GTM900)
286
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
376 /*
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
377 * The DSR_MODEM/LPG Calypso signal is unconnected on
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
378 * Openmoko's modem, so let's mux it as LPG (output)
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
379 * so it doesn't float, like Foxconn seem to have done
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
380 * on the Pirelli.
609
238b67a785f2 init.c: DSR_MODEM/LPG is LPG on the GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 603
diff changeset
381 *
238b67a785f2 init.c: DSR_MODEM/LPG is LPG on the GTM900
Mychaela Falconia <falcon@freecalypso.org>
parents: 603
diff changeset
382 * On the GTM900 module this signal is explicitly defined as LPG.
286
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
383 */
840113655bbf GTA0x target: mux DSR_MODEM/LPG signal to LPG in init.c to avoid floating
Mychaela Falconia <falcon@freecalypso.org>
parents: 273
diff changeset
384 *((volatile SYS_UWORD16 *) ASIC_CONF) = 0x6040;
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 #else
666
711b1c6c4e72 LPG and PWL config for D-Sample and GTM900 targets
Mychaela Falconia <falcon@freecalypso.org>
parents: 649
diff changeset
386 /* TI's original firmware setting */
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 *((volatile SYS_UWORD16 *) ASIC_CONF) = 0x6000;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 #endif /* (BOARD == 35) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 #endif /* ANLG(ANALOG)) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 #if (OP_L1_STANDALONE == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 #if (BOARD == 40) || (BOARD == 41) || \
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395 (BOARD == 42) || (BOARD == 43) || (BOARD == 45)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 // enable 8 Ohm amplifier for audio on D-sample
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 AI_ConfigBitAsOutput (1);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 AI_SetBit(1);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399 #elif (BOARD == 70) || (BOARD == 71)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 //Locosto I-sample or UPP costo board.BOARD
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 // Initialize the ARMIO bits as per the I-sample spec
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 // FIXME
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 #endif /* (OP_L1_STANDALONE == 1) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 #endif /* PSP_STANDALONE ==0 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 // Watchdog
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 TM_DisableWatchdog(); /* Disable Watchdog */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 #if (CHIPSET == 12) || (CHIPSET == 15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 TM_SEC_DisableWatchdog();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 #if ((CHIPSET == 4) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 #if (CHIPSET == 12)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 #if 0 /* example of configuration for DMA debug */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 #if (BOARD == 6) /* debug on EVA 4 , GPO2 must not be changed */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 /* TPU_FRAME, NMIIT, IACKn */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 F_DBG_IRQ_CONFIG(C_DBG_IRQ_IRQ4|C_DBG_IRQ_NMIIT|C_DBG_IRQ_IACKN);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424 /* NDMA_REQ_VIEW1, NDMA_REQ_VIEW0, DMA_V(1), DMA_S(1), DMAREQ_P1(3:0)*/
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 F_DBG_DMA_P1_NDFLASH_CONFIG(C_DBG_DMA_P1_NDFLASH_NDMA_REQ_VIEW_1 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 C_DBG_DMA_P1_NDFLASH_NDMA_REQ_VIEW_0 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 C_DBG_DMA_P1_NDFLASH_DMA_REQ_P1_3 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 C_DBG_DMA_P1_NDFLASH_DMA_REQ_P1_2 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 C_DBG_DMA_P1_NDFLASH_DMA_REQ_P1_1 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430 C_DBG_DMA_P1_NDFLASH_DMA_REQ_P1_0 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 C_DBG_DMA_P1_NDFLASH_DMA_REQ_S_1 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 C_DBG_DMA_P1_NDFLASH_DMA_REQ_V1 );
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 /* DMA_REQ_S(2)*/
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 F_DBG_DMA_P2_CONFIG(C_DBG_DMA_P2_DMA_REQ_S2);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436 /* DMA_CLK_REQ, BRIDGE_CLK */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 F_DBG_CLK1_CONFIG(C_DBG_CLK1_DMA_CLK_REQ |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 C_DBG_CLK1_BRIDGE_CLK );
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440 /* XIO_nREADY */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 F_DBG_IMIF_CONFIG(C_DBG_IMIF_XIO_NREADY_MEM);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 /* DSP_nIRQ_VIEW1, DSP_nIRQ_VIEW0, BRIDGE_EN */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 F_DBG_KB_USIM_SHD_CONFIG(C_DBG_KB_USIM_SHD_DSP_NIRQ_VIEW_1 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 C_DBG_KB_USIM_SHD_DSP_NIRQ_VIEW_0 |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 C_DBG_KB_USIM_SHD_BRIDGE_EN );
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 /* RHEA_nREADY , RHEA_nSTROBE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 F_DBG_USIM_CONFIG(C_DBG_USIM_RHEA_NSTROBE |
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 C_DBG_USIM_RHEA_NREADY );
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 /* XIO_STROBE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453 F_DBG_MISC2_CONFIG(C_DBG_MISC2_X_IOSTRBN);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455 /* DMA_CLK_REQ */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 F_DBG_CLK2_CONFIG(C_DBG_CLK2_DMA_CLK_REQ2);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 /* DSP_IRQ_SEL0=DMA, DSP_IRQ_SEL1=DMA, DMA_REQ_SEL0=RIF_RX, DMA_REQ_SEL1=RIF_RX */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 F_DBG_VIEW_CONFIG(0,0,C_DBG_DSP_INT_DMA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 C_DBG_DSP_INT_DMA,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 C_DMA_CHANNEL_RIF_RX,
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 C_DMA_CHANNEL_RIF_RX);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 #endif /* (BOARD == 6) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 #endif /* DMA debug example */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 * Configure ASIC in order to output the DPLL and ARM clock
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 // (*( volatile UWORD16* )(0xFFFEF008)) = 0x8000; // DPLL
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471 // (*( volatile UWORD16* )(0xFFFEF00E)) = 0x0004; // ARM clock
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 // (*( volatile UWORD16* )(0xfffef004)) = 0x0600; // DSP clock + nIACK
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 #endif /* (CHIPSET == 12) || CHIPSET == 15*/
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 * Enable/Disable of clock switch off for INTH, TIMER, BRIDGE and DPLL modules
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 // IRQ, Timer and bridge may SLEEP
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 // In first step, same configuration as SAMSON
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 #if (CHIPSET == 12)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483 CLKM_INITCNTL(CLKM_IRQ_DIS | CLKM_TIMER_DIS | CLKM_BRIDGE_DIS | CLKM_DPLL_DIS);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 #elif (CHIPSET == 15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 CLKM_INITCNTL(CLKM_IRQ_DIS | CLKM_TIMER_DIS | CLKM_CPORT_EN | CLKM_BRIDGE_DIS | 0x8000 ); /* CLKM_DPLL_DIS is remove by Ranga*/
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 CLKM_INITCNTL(CLKM_IRQ_DIS | CLKM_TIMER_DIS);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 // Select VTCXO input frequency
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492 CLKM_UNUSED_VTCXO_26MHZ;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 // Rita RF uses 26MHz VCXO
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 #if (RF_FAM == 12)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 CLKM_USE_VTCXO_26MHZ;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 // Renesas RF uses 26MHz on F-sample but 13MHz on TEB
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 #if (RF_FAM == 43) && (BOARD == 46)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 CLKM_USE_VTCXO_26MHZ;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 // Control HOM/SAM automatic switching
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507 *((volatile unsigned short *) CLKM_CNTL_CLK) &= ~CLKM_EN_IDLE3_FLG;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509 /*
269
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
510 * The following part has been reconstructed from disassembly.
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
511 */
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
512 RHEA_INITRHEA(0,0,0xFF);
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
513 DPLL_INIT_BYPASS_MODE(DPLL_BYPASS_DIV_1);
407
f7f1f6f1a77d init.c module: a chance at being correct for the D-Sample target
Mychaela Falconia <falcon@freecalypso.org>
parents: 286
diff changeset
514 #if (CHIPSET == 8)
f7f1f6f1a77d init.c module: a chance at being correct for the D-Sample target
Mychaela Falconia <falcon@freecalypso.org>
parents: 286
diff changeset
515 DPLL_INIT_DPLL_CLOCK(DPLL_LOCK_DIV_1, 6);
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
516 #elif (CHIPSET == 10) || (CHIPSET == 11)
407
f7f1f6f1a77d init.c module: a chance at being correct for the D-Sample target
Mychaela Falconia <falcon@freecalypso.org>
parents: 286
diff changeset
517 DPLL_INIT_DPLL_CLOCK(DPLL_LOCK_DIV_1, 8);
f7f1f6f1a77d init.c module: a chance at being correct for the D-Sample target
Mychaela Falconia <falcon@freecalypso.org>
parents: 286
diff changeset
518 #else
f7f1f6f1a77d init.c module: a chance at being correct for the D-Sample target
Mychaela Falconia <falcon@freecalypso.org>
parents: 286
diff changeset
519 #error "We only have DPLL setup for CHIPSETs 8 and 10"
f7f1f6f1a77d init.c module: a chance at being correct for the D-Sample target
Mychaela Falconia <falcon@freecalypso.org>
parents: 286
diff changeset
520 #endif
269
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
521 CLKM_InitARMClock(0x00, 2, 0); /* no low freq, no ext clock, div by 1 */
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
522 /*
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
523 * FreeCalypso change: memory timings and widths are target-dependent;
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
524 * please refer to the MEMIF-wait-states document in the freecalypso-docs
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
525 * repository for the full explanation.
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
526 */
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
527 #ifdef CONFIG_TARGET_PIRELLI
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
528 /*
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
529 * Pirelli's version of this Init_Target() function
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
530 * in their fw does the following:
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
531 */
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
532 MEM_INIT_CS0(4, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
533 MEM_INIT_CS1(4, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
534 MEM_INIT_CS2(5, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
535 MEM_INIT_CS3(4, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
536 MEM_INIT_CS4(7, MEM_DVS_16, MEM_WRITE_EN, 0);
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
537 #elif defined(CONFIG_TARGET_C155)
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
538 /*
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
539 * C155/156 official fw MEMIF config is almost the same as Pirelli's,
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
540 * only nCS4 WS is different, but nCS4 is unused on this model...
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
541 */
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
542 MEM_INIT_CS0(4, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
543 MEM_INIT_CS1(4, MEM_DVS_16, MEM_WRITE_EN, 0);
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
544 MEM_INIT_CS2(5, MEM_DVS_16, MEM_WRITE_EN, 0);
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
545 MEM_INIT_CS3(4, MEM_DVS_16, MEM_WRITE_EN, 0);
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
546 MEM_INIT_CS4(6, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
547 #elif defined(CONFIG_TARGET_C11X) || defined(CONFIG_TARGET_C139) || \
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
548 defined(CONFIG_TARGET_GTAMODEM)
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
549 /*
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
550 * The original settings from Openmoko,
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
551 * only nCS0 and nCS1 are actually used,
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
552 * same as on Mot C1xx phones,
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
553 * the nCS2/3/4 settings are dummies from TI.
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
554 */
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
555 MEM_INIT_CS0(3, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
556 MEM_INIT_CS1(3, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
557 MEM_INIT_CS2(5, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
558 MEM_INIT_CS3(3, MEM_DVS_16, MEM_WRITE_EN, 0);
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
559 MEM_INIT_CS4(0, MEM_DVS_8, MEM_WRITE_EN, 0);
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
560 #elif defined(CONFIG_TARGET_J100)
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
561 /*
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
562 * Same as Mot C11x/12x/139/140 and Openmoko except for nCS2 WS:
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
563 * it appears that SE J100 has its ringtone melody generator chip
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
564 * hooked up there.
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
565 */
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
566 MEM_INIT_CS0(3, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
567 MEM_INIT_CS1(3, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
568 MEM_INIT_CS2(6, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
569 MEM_INIT_CS3(3, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
570 MEM_INIT_CS4(0, MEM_DVS_8, MEM_WRITE_EN, 0);
649
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
571 #elif defined(CONFIG_TARGET_LUNA)
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
572 /*
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
573 * nCS0 is flash, nCS1 is XRAM, the LCD is connected to nCS3.
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
574 * nCS2 and nCS4 are currently unused.
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
575 */
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
576 MEM_INIT_CS0(4, MEM_DVS_16, MEM_WRITE_EN, 0);
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
577 MEM_INIT_CS1(4, MEM_DVS_16, MEM_WRITE_EN, 0);
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
578 MEM_INIT_CS2(4, MEM_DVS_16, MEM_WRITE_EN, 0);
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
579 MEM_INIT_CS3(5, MEM_DVS_16, MEM_WRITE_EN, 1);
37396b85f3f7 init.c: MEMIF setup for Luna
Mychaela Falconia <falcon@freecalypso.org>
parents: 609
diff changeset
580 MEM_INIT_CS4(0, MEM_DVS_8, MEM_WRITE_EN, 0);
603
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
581 #elif (CHIPSET == 8)
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
582 /*
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
583 * Our only Calypso C05 target is Mother Mychaela's D-Sample board.
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
584 * WS=3 with the ARM7 core running at 39 MHz gives us 92 ns,
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
585 * so we should be good on this board.
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
586 */
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
587 MEM_INIT_CS0(3, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
588 MEM_INIT_CS1(3, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
589 MEM_INIT_CS2(3, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
590 MEM_INIT_CS3(3, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
591 MEM_INIT_CS4(0, MEM_DVS_8, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
592 #elif (CHIPSET == 10) || (CHIPSET == 11)
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
593 /*
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
594 * Default for Calypso C035 targets in the absence of a more specific
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
595 * selection above. We put the WS=4 memory-oriented setting on all
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
596 * chip selects so we automatically cover targets with a second flash
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
597 * chip select no matter if it's nCS2, nCS3 or nCS4, as well as even
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
598 * weirder targets with XRAM somewhere other than nCS1.
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
599 */
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
600 MEM_INIT_CS0(4, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
601 MEM_INIT_CS1(4, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
602 MEM_INIT_CS2(4, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
603 MEM_INIT_CS3(4, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
604 MEM_INIT_CS4(4, MEM_DVS_16, MEM_WRITE_EN, 0);
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
605 #else
b13731665274 init.c MEMIF configuration revamped as described
Mychaela Falconia <falcon@freecalypso.org>
parents: 602
diff changeset
606 #error "Unknown MEMIF configuration"
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
607 #endif
269
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
608 MEM_INIT_CS6(0, MEM_DVS_32, MEM_WRITE_EN, 0);
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
609 MEM_INIT_CS7(0, MEM_DVS_32, MEM_WRITE_DIS, 0);
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
610 RHEA_INITAPI(0,1);
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
611 RHEA_INITARM(0,0);
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
612 DPLL_SET_PLL_ENABLE;
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
613
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
614 /*
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 * Disable and Clear all pending interrupts
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 #if (CHIPSET == 12) || (CHIPSET == 15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 F_INTH_DISABLE_ALL_IT; // MASK all it
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 F_INTH2_VALID_NEXT(C_INTH_IRQ); // reset current IT in INTH2 IRQ
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620 F_INTH_VALID_NEXT(C_INTH_IRQ); // reset current IT in INTH IRQ
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 F_INTH_VALID_NEXT(C_INTH_FIQ); // reset current IT in INTH FIQ
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 F_INTH_RESET_ALL_IT; // reset all IRQ/FIQ source
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 INTH_DISABLEALLIT;
269
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
625 #if 0 /* not present in our reference binary object */
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
626 INTH_RESETALLIT;
a498108254c9 init.c: Init_Target() reconstructed, perfect match to original object
Mychaela Falconia <falcon@freecalypso.org>
parents: 268
diff changeset
627 #endif
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 INTH_CLEAR; /* reset IRQ/FIQ source */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 // INTH
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633 #if (CHIPSET == 12) || (CHIPSET == 15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634 #if (GSM_IDLE_RAM != 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 f_inth_setup((T_INTH_CONFIG *)a_inth_config_idle_ram); // setup configuration IT handlers
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 f_inth_setup((T_INTH_CONFIG *)a_inth_config); // setup configuration IT handlers
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 IQ_SetupInterrupts();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 #if (CHIPSET == 12) || (CHIPSET == 15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 f_dma_global_parameter_set((T_DMA_TYPE_GLOBAL_PARAMETER *)&d_dma_global_parameter);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 f_dma_channel_allocation_set(C_DMA_CHANNEL_0, C_DMA_CHANNEL_DSP);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 #if (OP_L1_STANDALONE == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651 f_dma_global_parameter_set((T_DMA_TYPE_GLOBAL_PARAMETER *)&d_dma_global_parameter);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652 f_dma_channel_allocation_set(C_DMA_CHANNEL_0, C_DMA_CHANNEL_DSP);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 // DMA
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 // channel0 = Arm, channel1 = Lead, channel2 = forced to Arm, channel3=forced to Arm, dma_burst = 0001, priority = same
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660 DMA_ALLOCDMA(1,0,1,1); // Channel 1 used by DSP with RIF RX
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664 /* CHIPSET = 4 or 7 or 8 or 10 or 11 or 12 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 // RHEA Bridge
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670 // ACCES_FAC_0 = 0, ACCES_FAC_1 = 0 ,TIMEOUT = 0x7F
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671 RHEA_INITRHEA(0,0,0x7F);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673 #if (CHIPSET == 6)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 // WS_H = 1 , WS_L = 15
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675 RHEA_INITAPI(1,15); // should be 0x01E1 for 65 Mhz
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
677 // WS_H = 0 , WS_L = 7
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 RHEA_INITAPI(0,7); // should be 0x0101 for 65 Mhz
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
679 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681 // Write_en_0 = 0 , Write_en_1 = 0
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682 RHEA_INITARM(0,0);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 // INTH
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 INTH_DISABLEALLIT; // MASK all it
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
687 INTH_CLEAR; // reset IRQ/FIQ source
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 IQ_SetupInterrupts();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690 // DMA
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 // channel0 = Arm, channel1 = Lead, dma_burst = 0001, priority = same
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 DMA_ALLOCDMA(1,0,1,1); // should be 0x25 (channel 1 = lead)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695 #if (CHIPSET == 6)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 // Memory WS configuration for ULYSS/G1 (26 Mhz) board
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697 //-----------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698 MEM_INIT_CS2(2,MEM_DVS_16,MEM_WRITE_EN,0);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
701 // CLKM
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
703 CLKM_InitARMClock(0x00, 2); /* no low freq, no ext clock, div by 1 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705 #if (CHIPSET == 6)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
706 CLKM_INITCNTL(CLKM_IRQ_DIS | CLKM_BRIDGE_DIS | CLKM_TIMER_DIS | CLKM_VTCXO_26);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
707 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708 CLKM_INITCNTL(CLKM_IRQ_DIS | CLKM_BRIDGE_DIS | CLKM_TIMER_DIS);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
709 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 #endif /* CHIPSET = 4 or 7 or 8 or 10 or 11 or 12 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 // Freeze ULPD timer ....
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 *((volatile SYS_UWORD16 *) ULDP_GSM_TIMER_INIT_REG ) = 0;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716 *((volatile SYS_UWORD16 *) ULDP_GSM_TIMER_CTRL_REG ) = TPU_FREEZE;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718 // reset INC_SIXTEEN and INC_FRAC
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 #if (OP_L1_STANDALONE == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 l1ctl_pgm_clk32(DEFAULT_HFMHZ_VALUE,DEFAULT_32KHZ_VALUE);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 ULDP_INCSIXTEEN_UPDATE(132); //32768.29038 =>132, 32500 => 133
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724 // 26000 --> 166
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725 ULDP_INCFRAC_UPDATE(15840); //32768.29038 =>15840, 32500 => 21845
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
726 // 26000 --> 43691
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727 #endif /* OP_L1_STANDALONE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
728
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
729 // program ULPD WAKE-UP ....
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730 //=================================================
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731 #if (CHIPSET == 2)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
732 *((volatile SYS_UWORD16 *)ULDP_SETUP_FRAME_REG) = SETUP_FRAME; // 2 frame
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733 *((volatile SYS_UWORD16 *)ULDP_SETUP_VTCXO_REG) = SETUP_VTCXO; // 31 periods
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734 *((volatile SYS_UWORD16 *)ULDP_SETUP_SLICER_REG) = SETUP_SLICER; // 31 periods
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735 *((volatile SYS_UWORD16 *)ULDP_SETUP_CLK13_REG) = SETUP_CLK13; // 31 periods
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
736 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
737 *((volatile SYS_UWORD16 *)ULDP_SETUP_FRAME_REG) = SETUP_FRAME; // 3 frames
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
738 *((volatile SYS_UWORD16 *)ULDP_SETUP_VTCXO_REG) = SETUP_VTCXO; // 0 periods
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
739 *((volatile SYS_UWORD16 *)ULDP_SETUP_SLICER_REG) = SETUP_SLICER; // 31 periods
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
740 *((volatile SYS_UWORD16 *)ULDP_SETUP_CLK13_REG) = SETUP_CLK13; // 31 periods
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741 *((volatile SYS_UWORD16 *)ULPD_SETUP_RF_REG) = SETUP_RF; // 31 periods
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
743
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
744 // Set Gauging versus HF (PLL)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
745 //=================================================
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746 ULDP_GAUGING_SET_HF; // Enable gauging versus HF
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747 ULDP_GAUGING_HF_PLL; // Gauging versus PLL
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
749 // current supply for quartz oscillation
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750 //=================================================
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
751 #if (OP_L1_STANDALONE == 1)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
752 #if ((CHIPSET != 9) && (CHIPSET != 12) && (CHIPSET !=15)) // programming model changed for Ulysse C035, stay with default value
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
753 *(volatile SYS_UWORD16 *)QUARTZ_REG = 0x27;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756 #if ((BOARD == 6) || (BOARD == 8) || (BOARD == 9) || (BOARD == 35) || (BOARD == 40) || (BOARD == 41))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 *((volatile SYS_UWORD16 *)QUARTZ_REG) = 0x27;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758 #elif (BOARD == 7)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
759 *((volatile SYS_UWORD16 *)QUARTZ_REG) = 0x24;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
761 #endif /* OP_L1_STANDALONE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
762
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
763 // stop Gauging if any (debug purpose ...)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764 //--------------------------------------------------
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765 if ( *((volatile SYS_UWORD16 *) ULDP_GAUGING_CTRL_REG) & ULDP_GAUGING_EN)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766 {
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 volatile UWORD32 j;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768 ULDP_GAUGING_STOP; /* Stop the gauging */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
769 /* wait for gauging it*/
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770 // one 32khz period = 401 periods of 13Mhz
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
771 for (j=1; j<50; j++);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
772 while (! (* (volatile SYS_UWORD16 *) ULDP_GAUGING_STATUS_REG) & ULDP_IT_GAUGING);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
773 }
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
775 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776 AI_ClockEnable ();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778 #if (BOARD == 7)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
779 // IOs configuration of the B-Sample in order to optimize the power consumption
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
780 AI_InitIOConfig();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782 // Set LPG instead of DSR_MODEM
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
783 *((volatile SYS_UWORD16 *) ASIC_CONF) |= 0x40;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784 // Reset the PERM_ON bit of LCR_REG
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
785 *((volatile SYS_UWORD16 *) MEM_LPG) &= ~(0x80);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
786 #elif ((BOARD == 8) || (BOARD == 9))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
787 // IOs configuration of the C-Sample in order to optimize the power consumption
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
788 AI_InitIOConfig();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
789
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
790 // set the debug latch to 0x00.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
791 *((volatile SYS_UWORD8 *) 0x2800000) = 0x00;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
792 #elif ((BOARD == 35) || (BOARD == 46))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
793 AI_InitIOConfig();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
794 // CSMI INTERFACE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
795 // Initialize CSMI clients for GSM control
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
796 // and Fax/Data services
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 CSMI_Init();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798 GC_Initialize(); // GSM control initialization
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
799 CU_Initialize(); // Trace initialization
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
800 CF_Initialize(); // Fax/Data pre-initialization
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
801 #elif ((BOARD == 40) || (BOARD == 41))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
802 // IOs configuration of the D-Sample in order to optimize the power consumption
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
803 AI_InitIOConfig();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
804
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 #ifdef BTEMOBILE
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 // Reset BT chip by toggling the Island's nRESET_OUT signal
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
807 *((volatile SYS_UWORD16 *) 0xFFFFFD04) |= 0x04;
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808 *((volatile SYS_UWORD16 *) 0xFFFFFD04) &= ~(0x4);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
811 // set the debug latch to 0x0000.
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
812 /*
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
813 * FreeCalypso change: this write is only correct when running
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
814 * on an actual D-Sample board, but not on any of the real-world
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
815 * Calypso target devices.
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
816 */
407
f7f1f6f1a77d init.c module: a chance at being correct for the D-Sample target
Mychaela Falconia <falcon@freecalypso.org>
parents: 286
diff changeset
817 #ifdef CONFIG_TARGET_DSAMPLE
271
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
818 *((volatile SYS_UWORD16 *) 0x2700000) = 0x0000;
e18367b5427e init.c: applied our necessary FreeCalypso changes to reconstructed Init_Target()
Mychaela Falconia <falcon@freecalypso.org>
parents: 270
diff changeset
819 #endif
265
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 #endif // BOARD
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 // Enable HW Timers 1 & 2
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823 TM_EnableTimer (1);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 TM_EnableTimer (2);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
825
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826 #endif /* (OP_L1_STANDALONE == 0) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828 #endif /* #if (BOARD == 5) */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829 }
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
831 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
832 * Init_Drivers
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
833 *
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
834 * Performs Drivers Initialization.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
836 void Set_Switch_ON_Cause(void);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
837 void Init_Drivers(void)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
838 {
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
839
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
840 #if (CHIPSET==15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
841 bspI2c_init();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
842 bspTwl3029_init();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
845 Set_Switch_ON_Cause();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
847
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
848
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
849 /* Turn on DRP We will make VRMCC to device group Modem
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
850 * And Switch it on.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
851 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
852 bspTwl3029_Power_setDevGrp(NULL,BSP_TWL3029_POWER_VRMMC,BSP_TWL3029_POWER_DEV_GRP_MODEM);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
853 wait_ARM_cycles(convert_nanosec_to_cycles(100000*2));
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
854 bspTwl3029_Power_enable(NULL,BSP_TWL3029_POWER_VRMMC,BSP_TWL3029_POWER_STATE_ACTIVE);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
855 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
856
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
857 #if (CHIPSET!=15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
858 #if ABB_SEMAPHORE_PROTECTION
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
859 // Create the ABB semaphore
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
860 ABB_Sem_Create();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
861 #endif // SEMAPHORE_PROTECTION
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
862 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
863
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
864 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 * Initialize FFS invoking restore procedure by MPU-S
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868 #if ((BOARD == 35) || (BOARD == 46))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
869 GC_FfsRestore();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
871
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
873 * FFS main initialization.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
874 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
875
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
876 ffs_main_init();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
880 * Initialize Riviera manager and create tasks thanks to it.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
882 #if (CHIPSET!=15) || (REMU==0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
883 rvf_init();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
884 rvm_init(); /* A-M-E-M-D-E-D! */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885 create_tasks();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
886 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
887 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
888 * SIM Main Initialization.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
889 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890 #if (CHIPSET!=15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891 SIM_Initialize ();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893 bspUicc_bootInit();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
895 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
896 }
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899 * Init_Serial_Flows
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
900 *
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901 * Performs Serialswitch + related serial data flows initialization.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
902 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
903 void Init_Serial_Flows (void)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
904 {
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
905 #if (OP_L1_STANDALONE == 0)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
906
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
907 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
908 * Initialize Serial Switch module.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
909 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
910 #if ((BOARD==35) || (BOARD == 46))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
911 SER_InitSerialConfig (GC_GetSerialConfig());
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
912 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
913 SER_InitSerialConfig (&appli_ser_cfg_info);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
914 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
915 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
916 * Then Initialize the Serial Data Flows and the associated UARTs:
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
917 * - G2-3 Trace if GSM/GPRS Protocol Stack
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
918 * - AT-Cmd/Fax & Data Flow
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
919 *
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
920 * Layer1/Riviera Trace Flow and Bluetooth HCI Flow are initialized
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
921 * by the appropriate SW Entities.
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
922 *
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
923 * G2-3 Trace => No more Used
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
924 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
925 SER_tr_Init(SER_PROTOCOL_STACK, TR_BAUD_38400, NULL);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927 /*
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
928 * Fax & Data / AT-Command Interpreter Serial Data Flow Initialization
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
929 */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
930
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
931 #if ((BOARD != 35) && (BOARD != 46))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
932 (void) SER_fd_Initialize ();
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
933 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
934 #else /* OP_L1_STANDALONE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
935
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
936 #if (TESTMODE || (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==6) || (TRACE_TYPE==7))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
937 #if ((BOARD == 35) || (BOARD == 46))
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
938 ser_cfg_info[UA_UART_0] = '0';
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
939 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
940 ser_cfg_info[UA_UART_0] = 'G';
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
941 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
942 #if (CHIPSET !=15)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
943 ser_cfg_info[UA_UART_1] = 'R'; // Riviear Demux on UART MODEM
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
944 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
945 ser_cfg_info[UA_UART_0] = 'R'; // Riviear Demux on UART MODEM
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
946 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
947
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
948 /* init Uart Modem */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949 SER_InitSerialConfig (&appli_ser_cfg_info);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
950
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951 #if TESTMODE || (TRACE_TYPE == 1) || (TRACE_TYPE == 7)
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
952 SER_tr_Init (SER_LAYER_1, TR_BAUD_115200, rvt_activate_RX_HISR);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
953
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
954 rvt_register_id("OTHER",&trace_id,(RVT_CALLBACK_FUNC)NULL);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
955 #else
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
956 SER_tr_Init (SER_LAYER_1, TR_BAUD_38400, NULL);
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
957 #endif
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
958
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
959 L1_trace_string(" \n\r");
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
960
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
961 #endif /* TRACE_TYPE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
962
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
963 #endif /* OP_L1_STANDALONE */
0aa748b6413a src/cs/system/Main/init.c: initial import from LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
964 }
270
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
965
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
966 /*
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
967 * Init_Unmask_IT
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
968 *
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
969 * Unmask all used interrupts.
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
970 */
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
971 void Init_Unmask_IT (void)
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
972 {
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
973 IQ_Unmask(IQ_FRAME);
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
974 IQ_Unmask(IQ_UART_IRDA_IT);
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
975 IQ_Unmask(IQ_UART_IT);
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
976 IQ_Unmask(IQ_ARMIO);
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
977 #if (L1_DYN_DSP_DWNLD == 1)
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
978 IQ_Unmask(IQ_API);
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
979 #endif
d5a34ea92f2a init.c: Init_Unmask_IT() reconstructed the trivial way
Mychaela Falconia <falcon@freecalypso.org>
parents: 269
diff changeset
980 }