📄 syscon.h
字号:
/************************************************************************
*
* syscon.h
*
* Private SYSCON definitions.
*
*
* ######################################################################
*
* Copyright (c) 1999-2000 MIPS Technologies, Inc. All rights reserved.
*
* Unpublished rights reserved under the Copyright Laws of the United States of
* America.
*
* This document contains information that is proprietary to MIPS Technologies,
* Inc. ("MIPS Technologies"). Any copying, modifying or use of this information
* (in whole or in part) which is not expressly permitted in writing by MIPS
* Technologies or a contractually-authorized third party is strictly
* prohibited. At a minimum, this information is protected under unfair
* competition laws and the expression of the information contained herein is
* protected under federal copyright laws. Violations thereof may result in
* criminal penalties and fines.
* MIPS Technologies or any contractually-authorized third party reserves the
* right to change the information contained in this document to improve
* function, design or otherwise. MIPS Technologies does not assume any
* liability arising out of the application or use of this information. Any
* license under patent rights or any other intellectual property rights owned
* by MIPS Technologies or third parties shall be conveyed by MIPS Technologies
* or any contractually-authorized third party in a separate license agreement
* between the parties.
* The information contained in this document constitutes one or more of the
* following: commercial computer software, commercial computer software
* documentation or other commercial items. If the user of this information, or
* any related documentation of any kind, including related technical data or
* manuals, is an agency, department, or other entity of the United States
* government ("Government"), the use, duplication, reproduction, release,
* modification, disclosure, or transfer of this information, or any related
* documentation of any kind, is restricted in accordance with Federal
* Acquisition Regulation 12.212 for civilian agencies and Defense Federal
* Acquisition Regulation Supplement 227.7202 for military agencies. The use of
* this information by the Government is further restricted in accordance with
* the terms of the license agreement(s) and/or applicable contract terms and
* conditions covering this information from MIPS Technologies or any
* contractually-authorized third party.
*
************************************************************************/
#ifndef SYSCON_H
#define SYSCON_H
/************************************************************************
* Include files
************************************************************************/
#include <sysdefs.h>
#include <sys_api.h>
/************************************************************************
* Definitions
************************************************************************/
/* SYSCON read/write function */
typedef UINT32 (*t_syscon_func)(void *param, void *data);
/* SYSCON object */
typedef struct
{
t_syscon_func read; /* Read function */
void *read_data; /* Read data */
t_syscon_func write; /* Write function */
void *write_data; /* Write data */
}
t_syscon_obj;
/************************************************************************
* Public variables
************************************************************************/
/************************************************************************
* Public functions
************************************************************************/
/************************************************************************
*
* syscon_get_eeprom_data
* Description :
* -------------
*
* Read data store in EEPROM.
* Data is stored in the format defined in file eeprom_nm24c09_layout.h
*
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_get_eeprom_data(
t_mac_addr **mac_addr, /* Set to mac addr (NULL if invalid) */
t_sn_bcd **sn ); /* Set to S/N (NULL if invalid) */
/************************************************************************
*
* syscon_generic_tty_init
* Description :
* -------------
*
* Initialize generic TTY parts of SYSCON module.
*
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_generic_tty_init( void );
/************************************************************************
*
* syscon_arch_tty_init
* Description :
* -------------
*
* Initialize platform specific part of SYSCON TTY objects.
*
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_arch_tty_init( void );
/************************************************************************
*
* syscon_arch_board_init
* Description :
* -------------
*
* Initialize platform specific part of SYSCON (except TTY related parts)
*
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_arch_board_init(
t_syscon_obj *objects );
/************************************************************************
*
* syscon_arch_core_init
* Description :
* -------------
*
* Initialize core card specific part of SYSCON
*
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_arch_core_init(
t_syscon_obj *objects ); /* Array of SYSCON objects */
/************************************************************************
*
* syscon_arch_cpu_init
* Description :
* -------------
*
* Initialize cpu specific part of SYSCON
*
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_arch_cpu_init(
t_syscon_obj *objects );
/************************************************************************
*
* syscon_register_id_board
* Description :
* -------------
*
* Function used to register platform specific SYSCON object functions.
*
* A read and/or write function may be registered for each platform.
* A NULL function pointer indicates that the operation (read or
* write) is not allowed for the particular platform.
*
* read_data and write_data pointers are passed to the read and write
* function.
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_register_id_board(
t_syscon_ids id, /* OBJECT ID from syscon_api.h */
/* Atlas */
t_syscon_func read_atlas, /* Atlas read function */
void *read_data_atlas, /* Registered data */
t_syscon_func write_atlas, /* Atlas write function */
void *write_data_atlas, /* Registered data */
/* SEAD */
t_syscon_func read_sead, /* SEAD read function */
void *read_data_sead, /* Registered data */
t_syscon_func write_sead, /* SEAD write function */
void *write_data_sead, /* Registered data */
/* Malta */
t_syscon_func read_malta, /* Malta read function */
void *read_data_malta, /* Registered data */
t_syscon_func write_malta, /* Malta write function */
void *write_data_malta, /* Registered data */
/* Pb1000 */
t_syscon_func read_pb1000, /* Pb1000 read function */
void *read_data_pb1000, /* Registered data */
t_syscon_func write_pb1000, /* Pb1000 write function */
void *write_data_pb1000 ); /* Registered data */
/************************************************************************
*
* syscon_register_id_core
* Description :
* -------------
*
* Function used to register core card specific SYSCON object functions.
*
* A read and/or write function may be registered for each core card.
* A NULL function pointer indicates that the operation (read or
* write) is not allowed for the particular platform.
*
* read_data and write_data pointers are passed to the read and write
* function.
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_register_id_core(
t_syscon_ids id, /* OBJECT ID from syscon_api.h */
/* CoreLV */
t_syscon_func read_core_lv, /* CoreLV read function */
void *read_data_core_lv, /* Registered data */
t_syscon_func write_core_lv, /* CoreLV write function */
void *write_data_core_lv, /* Registered data */
/* Board with QED RM5261 */
t_syscon_func read_rm5261, /* Board with QED RM5261 read function */
void *read_data_rm5261, /* Registered data */
t_syscon_func write_rm5261, /* Board with QED RM5261 write function */
void *write_data_rm5261, /* Registered data */
/* SEAD board (i.e. "NULL" core board) */
t_syscon_func read_sead, /* SEAD read function */
void *read_data_sead, /* Registered data */
t_syscon_func write_sead, /* SEAD write function */
void *write_data_sead , /* Registered data */
/* Pb1000 board (i.e. "NULL" core board) */
t_syscon_func read_pb1000, /* Pb1000 read function */
void *read_data_pb1000, /* Registered data */
t_syscon_func write_pb1000, /* Pb1000 write function */
void *write_data_pb1000 ); /* Registered data */
/************************************************************************
*
* syscon_register_id_cpu
* Description :
* -------------
*
* Function used to register CPU specific SYSCON object functions.
*
* A read and/or write function may be registered for each cpu.
* A NULL function pointer indicates that the operation (read or
* write) is not allowed for the particular cpu.
*
* read_data and write_data pointers are passed to the read and write
* function.
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_register_id_cpu(
t_syscon_ids id, /* OBJECT ID from syscon_api.h */
t_syscon_func read_4Kc, /* 4Kc read function */
void *read_data_4Kc, /* Registered data */
t_syscon_func write_4Kc, /* 4Kc write function */
void *write_data_4Kc, /* Registered data */
t_syscon_func read_4Km, /* 4Km read function */
void *read_data_4Km, /* Registered data */
t_syscon_func write_4Km, /* 4Km write function */
void *write_data_4Km, /* Registered data */
t_syscon_func read_5Kc, /* 5Kc read function */
void *read_data_5Kc, /* Registered data */
t_syscon_func write_5Kc, /* 5Kc write function */
void *write_data_5Kc, /* Registered data */
t_syscon_func read_qed_rm5261, /* QED RM5261 read function */
void *read_data_qed_rm5261, /* Registered data */
t_syscon_func write_qed_rm5261, /* QED RM5261 write function*/
void *write_data_qed_rm5261,/* Registered data */
t_syscon_func read_Au1000, /* Au1000 read function */
void *read_data_Au1000, /* Registered data */
t_syscon_func write_Au1000, /* Au1000 write function */
void *write_data_Au1000); /* Registered data */
/************************************************************************
*
* syscon_register_generic
* Description :
* -------------
*
* Function used to register generic SYSCON object functions.
*
* A read and/or write function may be registered.
* A NULL function pointer indicates that the operation (read or
* write) is not allowed.
*
* read_data and write_data pointers are passed to the read and write
* function.
*
* Return values :
* ---------------
*
* None
*
************************************************************************/
void
syscon_register_generic(
t_syscon_ids id, /* OBJECT ID from syscon_api.h */
t_syscon_func read_generic, /* Generic read function */
void *read_data, /* Registered data */
t_syscon_func write_generic, /* Generic write function */
void *write_data ); /* Registered data */
/* Functions of the format required for registered SYSCON functions. */
UINT32
syscon_true_read(
void *param, /* bool : Set to TRUE */
void *data );
UINT32
syscon_false_read(
void *param, /* bool : Set to FALSE */
void *data );
UINT32
syscon_endian_big_read(
void *param, /* UINT32 : Set to TURE if big endian */
void *data );
UINT32
syscon_uint8_read(
void *param, /* UINT8 : Set to *(UINT8 *)data */
void *data );
UINT32
syscon_uint32_read(
void *param, /* UINT32 : Set to *(UINT32 *)data */
void *data );
UINT32
syscon_bool_read(
void *param, /* bool : Set to *(bool *)data */
void *data );
UINT32
syscon_bool_write(
void *param, /* *(bool *)data set to *(bool *)param */
void *data );
#endif /* #ifndef SYSCON_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -