Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #1488: start.patch

File start.patch, 1.5 KB (added by Allan Hessenflow, on 01/05/10 at 04:36:46)

patch for c/src/lib/libbsp/bfin/bf537Stamp/start/start.S to disable DMA channels

Line 
1Index: c/src/lib/libbsp/bfin/bf537Stamp/start/start.S
2===================================================================
3RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/bfin/bf537Stamp/start/start.S,v
4retrieving revision 1.4
5diff -c -3 -p -r1.4 start.S
6*** c/src/lib/libbsp/bfin/bf537Stamp/start/start.S      30 Nov 2009 03:38:33 -0000      1.4
7--- c/src/lib/libbsp/bfin/bf537Stamp/start/start.S      5 Jan 2010 05:23:12 -0000
8***************
9*** 5,10 ****
10--- 5,11 ----
11  #include <libcpu/bf537.h>
12  #include <libcpu/sicRegs.h>
13  #include <libcpu/cecRegs.h>
14+ #include <libcpu/dmaRegs.h>
15  #include <libcpu/coreTimerRegs.h>
16 
17  #ifndef LO
18*************** __start:
19*** 53,58 ****
20--- 54,70 ----
21        r0 = 0xffff (z);
22        [p0] = r0;
23 
24+       /* disable all dma channels */
25+       p0.h = HI(DMA0_BASE_ADDRESS + DMA_CONFIG_OFFSET);
26+       p0.l = LO(DMA0_BASE_ADDRESS + DMA_CONFIG_OFFSET);
27+       p1 = DMA_PITCH;
28+       p2 = DMA_CHANNELS;
29+       r0 = ~DMA_CONFIG_DMAEN;
30+       lsetup(loop1,loop2) lc0 = p2;
31+ loop1:        r1 = w[p0];
32+       r1 = r0 & r1;
33+ loop2:  w[p0 ++ p1] = r1.l;
34+
35        /* this is so we can stay in supervisor mode and still be able to
36           accept interrupts later. */
37        p0.h = start;
38*************** start:
39*** 94,102 ****
40        r0 = 0;
41 
42        /* Set _bss_start until _end to zero */
43!       lsetup(loop1,loop2) lc0 = p1;
44! loop1:        b[p0] = r0;
45! loop2:        p0 +=1;
46 
47        l0 = 0;
48        l1 = 0;
49--- 106,114 ----
50        r0 = 0;
51 
52        /* Set _bss_start until _end to zero */
53!       lsetup(loop3,loop4) lc0 = p1;
54! loop3:        b[p0] = r0;
55! loop4:        p0 +=1;
56 
57        l0 = 0;
58        l1 = 0;