FreeCalypso > hg > freecalypso-tools
comparison target-utils/dspdump/leadapi.h @ 540:27b5526ba1a8
dspdump target program written, compiles
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 28 Oct 2019 08:19:33 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
539:4f346c10f056 | 540:27b5526ba1a8 |
---|---|
1 /* | |
2 * Definitions for the DSP boot and patch download mechanism, | |
3 * taken from leadapi.h in TCS211. This version has been | |
4 * further modified for the DSP dump application. | |
5 */ | |
6 | |
7 #define APIF_ADDR 0xFFD00000L | |
8 | |
9 #define APIRAM_FIRST_WORD *((volatile u16 *) APIF_ADDR) | |
10 | |
11 #define DOWNLOAD_EXT_PAGE *((volatile u16 *) (APIF_ADDR + 0x0FF8)) | |
12 #define DOWNLOAD_SIZE *((volatile u16 *) (APIF_ADDR + 0x0FFA)) | |
13 #define DOWNLOAD_ADDR *((volatile u16 *) (APIF_ADDR + 0x0FFC)) | |
14 #define DOWNLOAD_STATUS *((volatile u16 *) (APIF_ADDR + 0x0FFE)) | |
15 | |
16 /* Maximum size of a block which can be copied into the API RAM */ | |
17 | |
18 #define MAX_BLOCK_SIZE 0x7F0 | |
19 | |
20 /* Possible values for the download status */ | |
21 | |
22 #define LEAD_READY 1 | |
23 #define BLOCK_READY 2 | |
24 #define PROGRAM_DONE 3 | |
25 #define PAGE_SELECTION 4 | |
26 | |
27 /* DSP reset control register definitions */ | |
28 | |
29 #define MEM_CLKM_ADDR 0xfffffd00 /* CLKM registers addr. */ | |
30 #define CLKM_CNTL_RST *((volatile u16 *) (MEM_CLKM_ADDR + 4)) | |
31 | |
32 #define CLKM_LEAD_RST 0x0002 | |
33 #define CLKM_EXT_RST 0x0004 | |
34 | |
35 /* extensions provided by OsmocomBB's DSP dump agent */ | |
36 | |
37 #define BL_MODE_PROG_WRITE 0 | |
38 #define BL_MODE_DATA_WRITE 1 | |
39 #define BL_MODE_PROG_READ 2 | |
40 #define BL_MODE_DATA_READ 3 | |
41 #define BL_MODE_PROM_READ 4 | |
42 #define BL_MODE_DROM_READ 5 |