Kaushal Kumar | f3b1a19 | 2012-07-03 19:48:41 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2012, Code Aurora Forum. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | */ |
| 14 | |
| 15 | #ifndef __ARCH_ARM_MACH_MSM_SMEM_IFACE_H |
| 16 | #define __ARCH_ARM_MACH_MSM_SMEM_IFACE_H |
| 17 | |
| 18 | #include <mach/msm_smsm.h> |
Kaushal Kumar | f3b1a19 | 2012-07-03 19:48:41 +0530 | [diff] [blame] | 19 | |
| 20 | #define MAX_KEY_EVENTS 10 |
| 21 | #define MAX_SEC_KEY_PAYLOAD 32 |
| 22 | |
| 23 | struct boot_shared_ssd_status_info { |
| 24 | uint32_t update_status; /* To check if process is successful or not */ |
| 25 | uint32_t bl_error_code; /* To indicate error code in bootloader */ |
| 26 | }; |
| 27 | |
| 28 | struct boot_symmetric_key_info { |
| 29 | uint32_t key_len; /* Encrypted Symmetric Key Length */ |
| 30 | uint32_t iv_len; /* Initialization Vector Length */ |
| 31 | uint8_t key[MAX_SEC_KEY_PAYLOAD]; /* Encrypted Symmetric Key */ |
| 32 | uint8_t iv[MAX_SEC_KEY_PAYLOAD]; /* Initialization Vector */ |
| 33 | }; |
| 34 | |
Kaushal Kumar | 1f549fc | 2012-10-04 11:45:32 +0530 | [diff] [blame] | 35 | /* floor_fuse to re-use the fuse bit earlier used by ring_osc */ |
Kaushal Kumar | f3b1a19 | 2012-07-03 19:48:41 +0530 | [diff] [blame] | 36 | struct cpr_info_type { |
Kaushal Kumar | 1f549fc | 2012-10-04 11:45:32 +0530 | [diff] [blame] | 37 | uint8_t ring_osc; /* CPR FUSE [0]: TURBO RO SEL BIT */ |
| 38 | uint8_t turbo_quot; /* CPRFUSE[1:7] : TURBO QUOT*/ |
| 39 | uint8_t pvs_fuse; /* TURBO PVS FUSE */ |
| 40 | uint8_t floor_fuse; /* Vmin Selection. b1: FAB_ID(2), b0: CPR_fuse[0] */ |
Kaushal Kumar | ecfc918 | 2012-10-25 16:17:51 +0530 | [diff] [blame^] | 41 | bool disable_cpr; |
Kaushal Kumar | f3b1a19 | 2012-07-03 19:48:41 +0530 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | struct boot_info_for_apps { |
| 45 | uint32_t apps_image_start_addr; /* apps image start address */ |
| 46 | uint32_t boot_flags; /* bit mask of upto 32 flags */ |
| 47 | struct boot_shared_ssd_status_info ssd_status_info; /* SSD status */ |
| 48 | struct boot_symmetric_key_info key_info; |
| 49 | uint16_t boot_keys_pressed[MAX_KEY_EVENTS]; /* Log of key presses */ |
| 50 | uint32_t timetick; /* Modem tick timer value before apps out of reset */ |
| 51 | struct cpr_info_type cpr_info; |
Kaushal Kumar | ecfc918 | 2012-10-25 16:17:51 +0530 | [diff] [blame^] | 52 | uint8_t PAD[23]; |
Kaushal Kumar | f3b1a19 | 2012-07-03 19:48:41 +0530 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | void msm_smem_get_cpr_info(struct cpr_info_type *cpr_info); |
| 56 | |
| 57 | #endif /* __ARCH_ARM_MACH_MSM_SMEM_IFACE_H */ |