]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/arm/mx51/karo/v1_0/include/hal_platform_setup.h
5cbba081109080b8ad335b658c5402e9d9001758
[karo-tx-redboot.git] / packages / hal / arm / mx51 / karo / v1_0 / include / hal_platform_setup.h
1 #ifndef CYGONCE_HAL_PLATFORM_SETUP_H
2 #define CYGONCE_HAL_PLATFORM_SETUP_H
3
4 //=============================================================================
5 //
6 //      hal_platform_setup.h
7 //
8 //      Platform specific support for HAL (assembly code)
9 //
10 //=============================================================================
11 //####ECOSGPLCOPYRIGHTBEGIN####
12 // -------------------------------------------
13 // This file is part of eCos, the Embedded Configurable Operating System.
14 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15 //
16 // eCos is free software; you can redistribute it and/or modify it under
17 // the terms of the GNU General Public License as published by the Free
18 // Software Foundation; either version 2 or (at your option) any later version.
19 //
20 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23 // for more details.
24 //
25 // You should have received a copy of the GNU General Public License along
26 // with eCos; if not, write to the Free Software Foundation, Inc.,
27 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 //
29 // As a special exception, if other files instantiate templates or use macros
30 // or inline functions from this file, or you compile this file and link it
31 // with other works to produce a work based on this file, this file does not
32 // by itself cause the resulting work to be covered by the GNU General Public
33 // License. However the source code for this file must still be made available
34 // in accordance with section (3) of the GNU General Public License.
35 //
36 // This exception does not invalidate any other reasons why a work based on
37 // this file might be covered by the GNU General Public License.
38 //
39 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40 // at http://sources.redhat.com/ecos/ecos-license/
41 // -------------------------------------------
42 //####ECOSGPLCOPYRIGHTEND####
43 //===========================================================================
44
45 #define REMOVE_THIS_CRAP
46 //#define BORKED
47 #define USE_DCD
48 //#define USE_LED
49 //#define MX51_3STACK
50
51 #include <pkgconf/system.h>                     // System-wide configuration info
52 #include CYGBLD_HAL_VARIANT_H                   // Variant specific configuration
53 #include CYGBLD_HAL_PLATFORM_H                  // Platform specific configuration
54 #include <cyg/hal/hal_soc.h>                    // Variant specific hardware definitions
55 #include <cyg/hal/hal_mmu.h>                    // MMU definitions
56 #include <cyg/hal/karo_tx51.h>                  // Platform specific hardware definitions
57 #include CYGHWR_MEMORY_LAYOUT_H
58
59 #if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
60 #define PLATFORM_SETUP1 _platform_setup1
61 #define CYGHWR_HAL_ARM_HAS_MMU
62
63 #ifdef CYG_HAL_STARTUP_ROMRAM
64 #define CYGSEM_HAL_ROM_RESET_USES_JUMP
65 #endif
66
67 #define TX51_NAND_PAGE_SIZE             2048
68 #define TX51_NAND_BLKS_PER_PAGE         64
69
70 #ifndef MX51_3STACK
71 #define DEBUG_LED_BIT                   10
72 #define LED_GPIO_BASE                   GPIO4_BASE_ADDR
73 #define LED_MUX_OFFSET                  0x1d0
74 #define LED_MUX_MODE                    0x13
75 #else
76 #define DEBUG_LED_BIT                   0
77 #define LED_GPIO_BASE                   GPIO1_BASE_ADDR
78 #define LED_MUX_OFFSET                  0x3ac
79 #define LED_MUX_MODE                    0x11
80 #endif
81
82 #define LED_ON  LED_CTRL #1
83 #define LED_OFF LED_CTRL #0
84
85 #ifndef CYGOPT_HAL_ARM_TX51_DEBUG
86         .macro  LED_CTRL,val
87         .endm
88         .macro  LED_BLINK,val
89         .endm
90         .macro  DELAY,ms
91         .endm
92 #else
93 #define CYGHWR_LED_MACRO        LED_BLINK #\x
94         .macro  DELAY,ms
95         ldr     r10, =\ms
96 111:
97         subs    r10, r10, #1
98         bmi     113f
99         ldr     r9, =(3600 / 10)
100 112:
101         subs    r9, r9, #1
102         bne     112b
103         b       111b
104         .ltorg
105 113:
106         .endm
107
108         .macro  LED_CTRL,val
109         // switch user LED (GPIO4_10) on STK5
110         ldr     r10, =LED_GPIO_BASE
111         // GPIO_DR
112         mov     r9, \val
113         cmp     r9, #0
114         movne   r9, #(1 << DEBUG_LED_BIT)       @ LED ON
115         moveq   r9, #0                          @ LED OFF
116         str     r9, [r10, #GPIO_DR]
117         .endm
118
119         .macro  LED_BLINK,val
120         mov     r8, \val
121 211:
122         subs    r8, r8, #1
123         bmi     212f
124         LED_CTRL #1
125         DELAY   200
126         LED_CTRL #0
127         DELAY   300
128         b       211b
129 212:
130         DELAY   1000
131         .endm
132 #endif
133
134         .macro  LED_INIT
135         // initialize GPIO4_10 (PAD CSI2_D13) for LED on STK5
136         ldr     r10, =LED_GPIO_BASE
137         // GPIO_GDIR
138         ldr     r9, [r10, #GPIO_GDIR]
139         orr     r9, r9, #(1 << DEBUG_LED_BIT)
140         str     r9, [r10, #GPIO_GDIR]
141         // iomux
142         ldr     r10, =IOMUXC_BASE_ADDR
143         mov     r9, #LED_MUX_MODE
144         str     r9, [r10, #LED_MUX_OFFSET]
145         // GPIO_DR
146         mov     r9, #(1 << DEBUG_LED_BIT)       @ LED ON
147         str     r9, [r10, #GPIO_DR]
148         .endm
149
150 #define DCDGEN(type, addr, data)  .long type, addr, data
151
152 #define PLATFORM_PREAMBLE flash_header
153
154 // This macro represents the initial startup code for the platform
155         .macro  _platform_setup1
156 #ifndef BORKED
157 KARO_TX51_SETUP_START:
158         mrs     r0, CPSR
159         mov     r0, #0x1f
160         orr     r0, r0, #128
161         orr     r0, r0, #64
162         msr     CPSR_xc, r0
163
164         ldr     r1, =ROM_BASE_ADDR
165         ldr     r11, [r1, #ROM_SI_REV_OFFSET]
166
167         setup_sdram
168
169         ldr     r0, =GPC_BASE_ADDR
170         cmp     r11, #0x10        // r11 contains the silicon rev
171         ldrls   r1, =0x1FC00000
172         ldrhi   r1, =0x1A800000
173         str     r1, [r0, #4]
174
175         // Explicitly disable L2 cache
176         mrc     15, 0, r0, c1, c0, 1
177         bic     r0, r0, #0x2
178         mcr     15, 0, r0, c1, c0, 1
179
180         // reconfigure L2 cache aux control reg
181         mov     r0, #0xC0               // tag RAM
182         add     r0, r0, #0x4            // data RAM
183         orr     r0, r0, #(1 << 24)      // disable write allocate delay
184         orr     r0, r0, #(1 << 23)      // disable write allocate combine
185         orr     r0, r0, #(1 << 22)      // disable write allocate
186
187         @ cc is still set from "cmp r11, #0x10" above
188         orrls   r0, r0, #(1 << 25)      @ disable write combine for TO 2 and lower revs
189
190         mcr     15, 1, r0, c9, c0, 2
191
192 init_aips_start:
193         init_aips
194         LED_INIT
195 init_m4if_start:
196         init_m4if
197
198 #ifdef CYG_HAL_STARTUP_ROMRAM     /* enable running from RAM */
199         LED_BLINK #1
200 #endif /* CYG_HAL_STARTUP_ROMRAM */
201 init_clock_start:
202         init_clock
203
204 Normal_Boot_Continue:
205 /*
206  * Note:
207  *      IOMUX/PBC setup is done in C function plf_hardware_init() for simplicity
208  */
209 STACK_Setup:
210         @ Set up a stack [for calling C code]
211         ldr     r1, =__startup_stack
212         ldr     r2, =RAM_BANK0_BASE
213         orr     sp, r1, r2
214
215         @ Create MMU tables
216         bl      hal_mmu_init
217         LED_BLINK #2
218
219         /* Workaround for arm erratum #709718 */
220         @ Setup PRRR so device is always mapped to non-shared
221         mrc     MMU_CP, 0, r1, c10, c2, 0 // Read Primary Region Remap Register
222         bic     r1, #(3 << 16)
223         mcr     MMU_CP, 0, r1, c10, c2, 0 // Write Primary Region Remap Register
224
225         @ Enable MMU
226         ldr     r2, =10f
227         mrc     MMU_CP, 0, r1, MMU_Control, c0
228         orr     r1, r1, #7                      @ enable MMU bit
229         orr     r1, r1, #0x800                  @ enable z bit
230         orr     r1, r1, #(1 << 28)              @ Enable TEX remap, workaround for L1 cache issue
231         mcr     MMU_CP, 0, r1, MMU_Control, c0
232
233         /* Workaround for arm errata #621766 */
234         mrc     MMU_CP, 0, r1, MMU_Control, c0, 1
235         orr     r1, r1, #(1 << 5)               @ enable L1NEON bit
236         mcr     MMU_CP, 0, r1, MMU_Control, c0, 1
237
238         mov     pc, r2                          @ Change address spaces
239         .align  5
240 10:
241         LED_BLINK #3
242 #endif // BORKED
243         .endm   @ _platform_setup1
244
245         /* AIPS setup - Only setup MPROTx registers. The PACR default values are good.*/
246         .macro  init_aips
247         /*
248         * Set all MPROTx to be non-bufferable, trusted for R/W,
249         * not forced to user-mode.
250         */
251         ldr     r0, =AIPS1_CTRL_BASE_ADDR
252         ldr     r1, AIPS1_PARAM
253         str     r1, [r0, #0x00]
254         str     r1, [r0, #0x04]
255         ldr     r0, =AIPS2_CTRL_BASE_ADDR
256         str     r1, [r0, #0x00]
257         str     r1, [r0, #0x04]
258         .endm   /* init_aips */
259
260         .macro  WDOG_RESET
261         ldr     r0, =WDOG_BASE_ADDR
262         mov     r1, #0
263 1:
264         strh    r1, [r0]
265         b       1b
266         .endm
267
268         .macro  init_clock
269         ldr     r0, =CCM_BASE_ADDR
270         ldr     r1, [r0, #CLKCTL_CCR]
271         tst     r1, #(1 << 12)
272         bne     osc_ok
273
274         orr     r1, r1, #(1 << 12)
275         str     r1, [r0, #CLKCTL_CCR]
276
277         ldr     r1, [r0, #CLKCTL_CCSR]
278         bic     r1, #(1 << 9)   /* switch lp_apm to OSC */
279         str     r1, [r0, #CLKCTL_CCSR]
280 osc_ok:
281         /* Gate off clocks to the peripherals first */
282         ldr     r1, =0x3FFFFFFF
283         str     r1, [r0, #CLKCTL_CCGR0]
284         ldr     r1, =0x0
285         str     r1, [r0, #CLKCTL_CCGR1]
286         str     r1, [r0, #CLKCTL_CCGR2]
287         str     r1, [r0, #CLKCTL_CCGR3]
288
289         ldr     r1, =0x00030000
290         str     r1, [r0, #CLKCTL_CCGR4]
291         ldr     r1, =0x00FFF030
292         str     r1, [r0, #CLKCTL_CCGR5]
293         ldr     r1, =0x00000300
294         str     r1, [r0, #CLKCTL_CCGR6]
295
296         /* Disable IPU and HSC dividers */
297         mov     r1, #0x60000
298         str     r1, [r0, #CLKCTL_CCDR]
299
300         /* Make sure to switch the DDR away from PLL 1 */
301         ldr     r1, CCM_CBCDR_VAL1
302         str     r1, [r0, #CLKCTL_CBCDR]
303         /* make sure divider effective */
304 1:
305         ldr     r1, [r0, #CLKCTL_CDHIPR]
306         cmp     r1, #0x0
307         bne     1b
308
309         /* Switch ARM to step clock */
310         ldr     r1, [r0, #CLKCTL_CCSR]
311         mov     r1, #0x4
312         str     r1, [r0, #CLKCTL_CCSR]
313
314         setup_pll PLL1, 800
315         setup_pll PLL3, 665
316
317         /* Switch peripheral to PLL 3 */
318         ldr     r1, CCM_CBCMR_VAL1
319         str     r1, [r0, #CLKCTL_CBCMR]
320
321         ldr     r1, CCM_CBCDR_VAL2
322         str     r1, [r0, #CLKCTL_CBCDR]
323
324         setup_pll PLL2, 665
325
326         /* Switch peripheral to PLL 2 */
327         ldr     r1, CCM_CBCDR_VAL1
328         str     r1, [r0, #CLKCTL_CBCDR]
329         ldr     r1, CCM_CBCMR_VAL2
330         str     r1, [r0, #CLKCTL_CBCMR]
331
332         setup_pll PLL3, 216
333
334         /* Set the platform clock dividers */
335         ldr     r2, =PLATFORM_BASE_ADDR
336         ldr     r1, PLATFORM_CLOCK_DIV
337         str     r1, [r2, #PLATFORM_ICGC]
338
339         /* Run TO 3.0 at Full speed, for other TO's wait till we increase VDDGP */
340         cmp     r11, #0x10
341         movls   r1, #1
342         movhi   r1, #0
343         str     r1, [r0, #CLKCTL_CACRR]
344
345         /* Switch ARM back to PLL 1. */
346         mov     r1, #0
347         str     r1, [r0, #CLKCTL_CCSR]
348
349         /* setup the rest */
350         /* Use lp_apm (24MHz) source for perclk */
351         ldr     r1, CCM_CBCMR_VAL2
352         str     r1, [r0, #CLKCTL_CBCMR]
353         @ ddr clock from PLL 1, all perclk dividers are 1 since using 24MHz
354         ldr     r1, CCM_CBCDR_VAL3
355
356         str     r1, [r0, #CLKCTL_CBCDR]
357
358         /* Restore the default values in the Gate registers */
359         ldr     r1, =0xFFFFFFFF
360         str     r1, [r0, #CLKCTL_CCGR0]
361         str     r1, [r0, #CLKCTL_CCGR1]
362         str     r1, [r0, #CLKCTL_CCGR2]
363         str     r1, [r0, #CLKCTL_CCGR3]
364         str     r1, [r0, #CLKCTL_CCGR4]
365         str     r1, [r0, #CLKCTL_CCGR5]
366         str     r1, [r0, #CLKCTL_CCGR6]
367
368         /* Use PLL 2 for UART's, get 66.5MHz from it */
369         ldr     r1, CCM_VAL_0xA5A2A020
370         str     r1, [r0, #CLKCTL_CSCMR1]
371         ldr     r1, CCM_VAL_0x00C30321
372         str     r1, [r0, #CLKCTL_CSCDR1]
373
374         /* make sure divider effective */
375 1:
376         ldr     r1, [r0, #CLKCTL_CDHIPR]
377         cmp     r1, #0x0
378         bne     1b
379
380         mov     r1, #0x00000
381         str     r1, [r0, #CLKCTL_CCDR]
382
383         @ for cko - for ARM div by 8
384         mov     r1, #0x000A0000
385         orr     r1, r1, #0x00000F0
386         str     r1, [r0, #CLKCTL_CCOSR]
387
388         ldr     r1, [r0, #CLKCTL_CCR]
389         bic     r1, #(1 << 8)           /* switch off FPM */
390         str     r1, [r0, #CLKCTL_CCR]
391 end_clk_init:
392         .endm   @ init_clock
393
394         .macro  setup_pll pll_nr, mhz
395         ldr     r2, BASE_ADDR_\pll_nr
396         ldr     r1, PLL_VAL_0x1232
397         str     r1, [r2, #PLL_DP_CTL]           @ Set DPLL ON (set UPEN bit); BRMO=1
398         mov     r1, #0x2
399         str     r1, [r2, #PLL_DP_CONFIG]        @ Enable auto-restart AREN bit
400
401         ldr     r1, W_DP_OP_\mhz
402         str     r1, [r2, #PLL_DP_OP]
403         str     r1, [r2, #PLL_DP_HFS_OP]
404
405         ldr     r1, W_DP_MFD_\mhz
406         str     r1, [r2, #PLL_DP_MFD]
407         str     r1, [r2, #PLL_DP_HFS_MFD]
408
409         ldr     r1, W_DP_MFN_\mhz
410         str     r1, [r2, #PLL_DP_MFN]
411         str     r1, [r2, #PLL_DP_HFS_MFN]
412
413         mov     r1, #0x3
414         str     r1, [r2, #PLL_DP_CONFIG]        @ Assert LDREQ
415
416         @ Now restart PLL
417         ldr     r1, PLL_VAL_0x1232
418         str     r1, [r2, #PLL_DP_CTL]
419 101:
420         ldr     r1, [r2, #PLL_DP_CTL]
421         ands    r1, r1, #0x1
422         beq     101b
423         .endm
424
425         /* M3IF setup */
426         .macro  init_m4if
427         ldr     r1, =M4IF_BASE_ADDR
428         ldr     r0, M4IF_M4IF4_VAL
429         str     r0, [r1, #M4IF_MIF4]
430
431         /* Configure M4IF registers, VPU and IPU given higher priority (=0x4) */
432         ldr     r0, M4IF_FBPM0_VAL
433         str     r0, [r1, #M4IF_FBPM0]
434         .endm   /* init_m4if */
435
436         .macro  setup_sdram
437         cmp     r11, #0x10    // r11 contains the silicon rev
438         bls     skip_setup
439 #if 0
440         /* Decrease the DRAM SDCLK to HIGH Drive strength */
441         ldr     r0, =IOMUXC_BASE_ADDR
442         ldr     r1, =0x000000e5
443         str     r1, [r0, #0x4b8]
444         /* Change the delay line configuration */
445         ldr     r0, =ESDCTL_BASE_ADDR
446         ldr     r1, =0x00f49400
447         str     r1, [r0, #ESDCTL_ESDCDLY1]
448         ldr     r1, =0x00f49a00
449         str     r1, [r0, #ESDCTL_ESDCDLY2]
450         ldr     r1, =0x00f49100
451         str     r1, [r0, #ESDCTL_ESDCDLY3]
452         ldr     r1, =0x00f48900
453         str     r1, [r0, #ESDCTL_ESDCDLY4]
454         ldr     r1, =0x00f49400
455         str     r1, [r0, #ESDCTL_ESDCDLY5]
456 #endif
457 skip_setup:
458         .endm
459 #else // defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMRAM)
460 #define PLATFORM_SETUP1
461 #endif
462
463 #define PLATFORM_VECTORS         _platform_vectors
464         .macro  _platform_vectors
465         .globl  _KARO_MAGIC
466 _KARO_MAGIC:
467         .ascii  "KARO_CE6"
468         .globl  _KARO_STRUCT_SIZE
469 _KARO_STRUCT_SIZE:
470         .word   0       // reserve space structure length
471
472         .globl  _KARO_CECFG_START
473 _KARO_CECFG_START:
474         .rept   1024/4
475         .word   0       // reserve space for CE configuration
476         .endr
477
478         .globl  _KARO_CECFG_END
479 _KARO_CECFG_END:
480         .endm
481
482         .align  5
483         .ascii  "KARO TX51 " __DATE__ " " __TIME__
484         .align
485
486 /* SDRAM timing setup */
487 #define RALAT           1
488 #define LHD             0
489
490 #define RA_BITS         2       /* row addr bits - 11 */
491 #define CA_BITS         2       /* 0-2: col addr bits - 8 3: rsrvd */
492 #define DSIZ            2       /* 0: D[31..16] 1: D[15..D0] 2: D[31..0] 3: rsrvd */
493 #define SREFR           3       /* 0: disabled 1-5: 2^n rows/clock *: rsrvd */
494 #define SRT             0       /* 0: disabled *: 1: self refr. ... */
495 #define PWDT            0       /* 0: disabled 1: precharge pwdn
496                                    2: pwdn after 64 clocks 3: pwdn after 128 clocks */
497 #define ESDCTL0_VAL     (0x80000000 | (SREFR << 28) | (RA_BITS << 24) | (CA_BITS << 20) | \
498                          (DSIZ << 16) | (SRT << 14) | (PWDT << 12))
499
500 #define tRFC            17      /* clks - 1 (0..15) */ // 17
501 #define tXSR            19      /* clks - 1 (0..15) */ // 19
502 #define tXP             0       /* clks - 1 (0..7)  */ // N/A
503 #define tWTR            0       /* clks - 1 (0..1)  */ // N/A
504 #define tRP             1       /* clks - 2 (0..3)  */ // 1
505 #define tMRD            1       /* clks - 1 (0..3)  */ // 1
506 #define tWR             0       /* clks - 2 (0..1)  */ // 0
507 #define tRAS            5       /* clks - 1 (0..15) */ // 5
508 #define tRRD            1       /* clks - 1 (0..3)  */ // 1
509 #define tRCD            2       /* clks - 1 (0..7) */ // 2
510 #define tRC             8       /* 0: 20 *: clks - 1 (0..15) */ // 8
511
512 #define ESDCFG0_VAL     ((((tRFC) - 10) << 28) | ((tXSR) << 24) | ((tXP) << 21) | \
513                         ((tWTR) << 20) | ((tRP) << 18) | ((tMRD) << 16) | \
514                         ((tRAS) << 12) | ((tRRD) << 10) | ((tWR) << 7) | \
515                         ((tRCD) << 4) | ((tRC) << 0))
516
517 #define ESDMISC_RALAT(n)        (((n) & 0x3) << 7)
518 #define ESDMISC_DDR2_EN(n)      (((n) & 0x1) << 4)
519 #define ESDMISC_DDR_EN(n)       (((n) & 0x1) << 3)
520 #define ESDMISC_AP(n)           (((n) & 0xf) << 16)
521 #define ESDMISC_VAL             (ESDMISC_AP(10) | ESDMISC_RALAT(RALAT) | \
522                                 (LHD << 5) | ESDMISC_DDR2_EN(0) | ESDMISC_DDR_EN(0))
523
524         .macro  flash_header
525         b       reset_vector
526         .org    0x400
527 app_start_addr:
528         .long reset_vector
529 app_code_barker:
530         .long   0xB1
531 app_code_csf:
532         .long   0 // 0x97f40000 - 0x1000
533 dcd_ptr_ptr:
534         .long   dcd_ptr
535 super_root_key:
536         .long   0 // hab_super_root_key
537 dcd_ptr:
538         .long   dcd_data
539 app_dest_ptr:
540 #ifndef RAM_BANK1_SIZE
541         .long   RAM_BANK0_BASE + RAM_BANK0_SIZE - REDBOOT_OFFSET
542 #else
543         .long   RAM_BANK1_BASE + RAM_BANK1_SIZE - REDBOOT_OFFSET
544 #endif
545 dcd_data:
546         .long   0xB17219E9   // Fixed. can't change.
547 dcd_len:
548         .long   dcd_end - dcd_start
549 dcd_start:
550         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDCTL0, 0x80000000)
551         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, 0x04008008)
552         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, 0x00008010)
553         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, 0x00008010)
554         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, 0x00338018)
555         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDCTL0, ESDCTL0_VAL)
556         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDCFG0, ESDCFG0_VAL)
557         DCDGEN(4, ESDCTL_BASE_ADDR + 0x34, 0x00020000 | ((RALAT & 0x3) << 29))
558         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDMISC, ESDMISC_VAL)
559         DCDGEN(4, ESDCTL_BASE_ADDR + ESDCTL_ESDSCR, 0x00000000)
560 dcd_end:
561 image_len:
562         .long   REDBOOT_IMAGE_SIZE
563         .endm
564
565 SRC_BASE_ADDR_W:        .long   SRC_BASE_ADDR
566 WDOG_BASE_ADDR_W:       .long   WDOG_BASE_ADDR
567 AIPS1_PARAM:            .word   0x77777777
568 M4IF_M4IF4_VAL:         .word   0x00000203
569 M4IF_FIDBP_VAL:         .word   0x00000a01
570 M4IF_FBPM0_VAL:         .word   0x00000404
571 MXC_REDBOOT_ROM_START:  .long   SDRAM_BASE_ADDR + SDRAM_SIZE - REDBOOT_OFFSET
572 CCM_CBCDR_VAL1:         .word   0x19239145
573 CCM_CBCDR_VAL2:         .word   0x13239145
574 CCM_CBCDR_VAL3:         .word   0x61E35100
575 CCM_CBCMR_VAL1:         .word   0x000010C0
576 CCM_CBCMR_VAL2:         .word   0x000020C0
577 BASE_ADDR_PLL1:         .long   PLL1_BASE_ADDR
578 BASE_ADDR_PLL2:         .long   PLL2_BASE_ADDR
579 BASE_ADDR_PLL3:         .long   PLL3_BASE_ADDR
580 //PLL_VAL_0x222:                .word   0x222
581 //PLL_VAL_0x232:                .word   0x232
582 PLL_VAL_0x1232:         .word   0x1232
583 W_DP_OP_800:            .word   DP_OP_800
584 W_DP_MFD_800:           .word   DP_MFD_800
585 W_DP_MFN_800:           .word   DP_MFN_800
586 W_DP_OP_700:            .word   DP_OP_700
587 W_DP_MFD_700:           .word   DP_MFD_700
588 W_DP_MFN_700:           .word   DP_MFN_700
589 W_DP_OP_400:            .word   DP_OP_400
590 W_DP_MFD_400:           .word   DP_MFD_400
591 W_DP_MFN_400:           .word   DP_MFN_400
592 W_DP_OP_532:            .word   DP_OP_532
593 W_DP_MFD_532:           .word   DP_MFD_532
594 W_DP_MFN_532:           .word   DP_MFN_532
595 W_DP_OP_665:            .word   DP_OP_665
596 W_DP_MFD_665:           .word   DP_MFD_665
597 W_DP_MFN_665:           .word   DP_MFN_665
598 W_DP_OP_216:            .word   DP_OP_216
599 W_DP_MFD_216:           .word   DP_MFD_216
600 W_DP_MFN_216:           .word   DP_MFN_216
601 PLATFORM_CLOCK_DIV:     .word   0x00000124
602
603 #ifdef REMOVE_THIS_CRAP
604 CCM_VAL_0xA5A2A020:     .word   0xA5A2A020
605 CCM_VAL_0x00C30321:     .word   0x00C30321
606 #endif
607
608 /*----------------------------------------------------------------------*/
609 /* end of hal_platform_setup.h                                          */
610 #endif /* CYGONCE_HAL_PLATFORM_SETUP_H */