00001 /* $Id: */ 00002 /****************************************************************************** 00003 * 00004 * (c) Copyright 2009 - 2010 Xilinx, Inc. All rights reserved. 00005 * 00006 * This file contains confidential and proprietary information 00007 * of Xilinx, Inc. and is protected under U.S. and 00008 * international copyright and other intellectual property 00009 * laws. 00010 * 00011 * DISCLAIMER 00012 * This disclaimer is not a license and does not grant any 00013 * rights to the materials distributed herewith. Except as 00014 * otherwise provided in a valid license issued to you by 00015 * Xilinx, and to the maximum extent permitted by applicable 00016 * law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND 00017 * WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES 00018 * AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING 00019 * BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- 00020 * INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and 00021 * (2) Xilinx shall not be liable (whether in contract or tort, 00022 * including negligence, or under any other theory of 00023 * liability) for any loss or damage of any kind or nature 00024 * related to, arising under or in connection with these 00025 * materials, including for any direct, or any indirect, 00026 * special, incidental, or consequential loss or damage 00027 * (including loss of data, profits, goodwill, or any type of 00028 * loss or damage suffered as a result of any action brought 00029 * by a third party) even if such damage or loss was 00030 * reasonably foreseeable or Xilinx had been advised of the 00031 * possibility of the same. 00032 * 00033 * CRITICAL APPLICATIONS 00034 * Xilinx products are not designed or intended to be fail- 00035 * safe, or for use in any application requiring fail-safe 00036 * performance, such as life-support or safety devices or 00037 * systems, Class III medical devices, nuclear facilities, 00038 * applications related to the deployment of airbags, or any 00039 * other applications that could lead to death, personal 00040 * injury, or severe property or environmental damage 00041 * (individually and collectively, "Critical 00042 * Applications"). Customer assumes the sole risk and 00043 * liability of any use of Xilinx products in Critical 00044 * Applications, subject only to applicable laws and 00045 * regulations governing limitations on product liability. 00046 * 00047 * THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS 00048 * PART OF THIS FILE AT ALL TIMES. 00049 * 00050 ******************************************************************************/ 00051 /*****************************************************************************/ 00052 /** 00053 * 00054 * @file xosd_sinit.c 00055 * 00056 * This file contains the static initialization method for Xilinx MVI Video 00057 * On-Screen-Display (OSD) device driver. 00058 * 00059 * <pre> 00060 * MODIFICATION HISTORY: 00061 * 00062 * Ver Who Date Changes 00063 * ----- ---- -------- ------------------------------------------------------- 00064 * 1.00a xd 08/18/08 First release 00065 * </pre> 00066 * 00067 ******************************************************************************/ 00068 00069 /***************************** Include Files *********************************/ 00070 00071 #include "xosd.h" 00072 #include "xparameters.h" 00073 00074 /************************** Constant Definitions *****************************/ 00075 00076 00077 /**************************** Type Definitions *******************************/ 00078 00079 00080 /***************** Macros (Inline Functions) Definitions *********************/ 00081 00082 00083 /************************** Function Prototypes ******************************/ 00084 00085 /*****************************************************************************/ 00086 /** 00087 * XOSD_LookupConfig returns a reference to an XOSD_Config structure 00088 * based on the unique device id, <i>DeviceId</i>. The return value will refer 00089 * to an entry in the device configuration table defined in the xosd_g.c 00090 * file. 00091 * 00092 * @param DeviceId is the unique device ID of the device for the lookup 00093 * operation. 00094 * 00095 * @return XOSD_LookupConfig returns a reference to a config record in the 00096 * configuration table (in xosd_g.c) corresponding to <i>DeviceId</i>, 00097 * or NULL if no match is found. 00098 * 00099 ******************************************************************************/ 00100 XOSD_Config *XOSD_LookupConfig(u16 DeviceId) 00101 { 00102 extern XOSD_Config XOSD_ConfigTable[]; 00103 XOSD_Config *CfgPtr = NULL; 00104 int i; 00105 00106 for (i = 0; i < XPAR_XOSD_NUM_INSTANCES; i++) { 00107 if (XOSD_ConfigTable[i].DeviceId == DeviceId) { 00108 CfgPtr = &XOSD_ConfigTable[i]; 00109 break; 00110 } 00111 } 00112 00113 return (CfgPtr); 00114 }