aboutsummaryrefslogtreecommitdiffstats
path: root/samsung-ipc/devices/xmm6260/xmm6260.h
blob: bc55a44b178a51fc8c6e5c94c15ff33ca2eb833f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * This file is part of libsamsung-ipc.
 *
 * Copyright (C) 2013-2014 Paul Kocialkowski <contact@paulk.fr>
 *
 * libsamsung-ipc is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * libsamsung-ipc is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __XMM6260_H__
#define __XMM6260_H__

#define XMM6260_AT                              "ATAT"
#define XMM6260_PSI_PADDING                                     0xFF
#define XMM6260_PSI_MAGIC                                       0x30
#define XMM6260_SEC_END_MAGIC                                   0x0000
#define XMM6260_HW_RESET_MAGIC                                  0x111001
#define XMM6260_DATA_SIZE                                       0x1000

#define XMM6260_COMMAND_SET_PORT_CONFIG                         0x86
#define XMM6260_COMMAND_SEC_START                               0x204
#define XMM6260_COMMAND_SEC_END                                 0x205
#define XMM6260_COMMAND_HW_RESET                                0x208
#define XMM6260_COMMAND_FLASH_SET_ADDRESS                       0x802
#define XMM6260_COMMAND_FLASH_WRITE_BLOCK                       0x804

#define XMM6260_FIRMWARE_ADDRESS                                0x60300000
#define XMM6260_NV_DATA_ADDRESS                                 0x60E80000
#define XMM6260_MPS_DATA_ADDRESS                                0x61080000

#define XMM6260_NV_DATA_PATH                    "/efs/nv_data.bin"
#define XMM6260_NV_DATA_MD5_PATH                "/efs/nv_data.bin.md5"
#define XMM6260_NV_DATA_BACKUP_PATH             "/efs/.nv_data.bak"
#define XMM6260_NV_DATA_BACKUP_MD5_PATH         "/efs/.nv_data.bak.md5"
#define XMM6260_NV_DATA_SECRET                  "Samsung_Android_RIL"
#define XMM6260_NV_DATA_SIZE                                    0x200000
#define XMM6260_NV_DATA_CHUNK_SIZE                              0x1000

unsigned char xmm6260_crc_calculate(const void *data, size_t size);

#endif

// vim:ts=4:sw=4:expandtab