blob: a31505f1c9bded4c557fe1b052b6ccd7f4eec1da [file] [log] [blame]
/******************************************************************************
**
** (C) Copyright 2013 Marvell. All Rights Reserved.
**
** This software as well as the software described in it is furnished under
** license and may only be used or copied in accordance with the terms of the
** license. The information in this file is furnished for informational use
** only, is subject to change without notice, and should not be construed as
** a commitment by Intel Corporation. Intel Corporation assumes no
** responsibility or liability for any errors or inaccuracies that may appear
** in this document or any software that may be provided in association with
** this document.
** Except as permitted by such license, no part of this document may be
** reproduced, stored in a retrieval system, or transmitted in any form or by
** any means without the express written consent of Intel Corporation.
**
** FILENAME: obm2osl.h
**
** PURPOSE: all the parameters passed to uboot by OBM
**
**
******************************************************************************/
#ifndef __OBM2OSL_H__
#define __OBM2OSL_H__
#define OBM2OSL_VERSION 0x05
#define OBM2OSL_IDENTIFIER 0x434F4D4D // "COMM"
#define OBM2OSL_VERSION_V6 0x06 //support TEEC
#define OBM2OSL_VERSION_V7 0x07 //support DDRT
typedef struct
{
unsigned int valid_flag;
unsigned int validation_status;
unsigned int loading_status;
unsigned int tim_version; // 0 - v3.4; 1 - v3.5.
unsigned int tim_ddr_address; // the DDR address of DTIM
}DTIM_INFO;
typedef struct
{
unsigned int cfg_id;
unsigned int cfg_value;
}Config_Info;
typedef struct
{
unsigned int cfg_numbers; // numbers of cfg_info
Config_Info cfg_info[32];
}Customized_Info;
struct OBM_DDRT_INFO{
unsigned int test_done :1; //1: done,
unsigned int test_res :1; //1: fail, 0: pass
unsigned int uboot_start :10;
unsigned int uboot_size :5;
unsigned int tos_start :10;
unsigned int tos_size :5;
};
typedef union{
unsigned int value;
struct OBM_DDRT_INFO bits;
}DDRT_INFO, *pDDRT_INFO;
typedef struct
{
unsigned int signature; // a common identify for all platforms
unsigned int version; // for future compatibility considerations
unsigned int booting_mode; // 0-booting in funtion mode; 1-booting in product mode with usb; 2-booting in product mode with uart;
unsigned int ddr_mode; // 0-400MHZ; 1-533MHZ
DTIM_INFO primary;
DTIM_INFO recovery;
DTIM_INFO cp;
DTIM_INFO mrd;
unsigned short obm_path; // 0 - primary OBM, 1 - backup OBM
Customized_Info info;
unsigned char quiet; // 0 - don't print unless force, 1 - print
unsigned int tee_dram_size;
DDRT_INFO ddrt_info;
}OBM2OSL;
typedef enum
{
DTIM_INVALID = 0,
DTIM_VALID = 1
}DTIM_VALID_FLAG;
typedef enum
{
PRIMARY_OBM = 0,
BACKUP_OBM = 1
}OBM_PATH;
typedef enum
{
FUNCTION_MODE = 0,
PRODUCT_USB_MODE,
PRODUCT_UART_MODE,
RECOVERY_MODE,
MENU_MODE,
UNKNOWN_MODE
}BOOTING_MODE;
typedef enum
{
LOADING_FAIL = 0,
LOADING_PASS = 1,
NOT_LOADING = 2
}LOADING_STATUS;
typedef enum
{
VALIDATION_FAIL = 0,
VALIDATION_PASS = 1,
NOT_VALIDATION = 2
}VALIDATION_STATUS;
typedef enum
{
LPDDR2_400MHZ_MODE = 0,
LPDDR2_533MHZ_MODE = 1,
LPDDR2_416MHZ_MODE = 2,
LPDDR3_667MHZ_MODE = 3,
LPDDR3_800MHZ_MODE = 4
}DDR_MODE;
#endif