import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-mt8127 / include / mach / mt_boot.h
1 /*
2 *
3 *
4 * Copyright (C) 2008,2009 MediaTek <www.mediatek.com>
5 * Authors: Infinity Chen <infinity.chen@mediatek.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22 #ifndef __MT_BOOT_H__
23 #define __MT_BOOT_H__
24 #include <mach/mt_boot_common.h>
25 #include <mach/mt_boot_reason.h>
26
27 /*META COM port type*/
28 typedef enum
29 {
30 META_UNKNOWN_COM = 0,
31 META_UART_COM,
32 META_USB_COM
33 } META_COM_TYPE;
34
35 #define BOOT_DEV_NAME "BOOT"
36 #define BOOT_SYSFS "boot"
37 #define BOOT_SYSFS_ATTR "boot_mode"
38 #define MD_SYSFS_ATTR "md"
39 #define INFO_SYSFS_ATTR "info"
40
41 typedef enum {
42 CHIP_SW_VER_01 = 0x0000,
43 CHIP_SW_VER_02 = 0x0001
44 } CHIP_SW_VER;
45
46 extern META_COM_TYPE g_meta_com_type;
47 extern unsigned int g_meta_com_id;
48
49 extern void set_meta_com(META_COM_TYPE type, unsigned int id);
50 extern META_COM_TYPE get_meta_com_type(void);
51 extern unsigned int get_meta_com_id(void);
52
53 extern unsigned int get_chip_code(void);
54 extern unsigned int get_chip_hw_subcode(void);
55 extern unsigned int get_chip_hw_ver_code(void);
56 extern unsigned int get_chip_sw_ver_code(void);
57 extern unsigned int mt_get_chip_id(void);
58 extern CHIP_SW_VER mt_get_chip_sw_ver(void);
59
60 #endif
61