1/******************************************************************************* 2Copyright (C) 2015 Annapurna Labs Ltd. 3 4This file may be licensed under the terms of the Annapurna Labs Commercial 5License Agreement. 6 7Alternatively, this file can be distributed under the terms of the GNU General 8Public License V2 as published by the Free Software Foundation and can be 9found at http://www.gnu.org/licenses/gpl-2.0.html 10 11Alternatively, redistribution and use in source and binary forms, with or 12without modification, are permitted provided that the following conditions are 13met: 14 15 * Redistributions of source code must retain the above copyright notice, 16this list of conditions and the following disclaimer. 17 18 * Redistributions in binary form must reproduce the above copyright 19notice, this list of conditions and the following disclaimer in 20the documentation and/or other materials provided with the 21distribution. 22 23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 24ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 25WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 27ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 30ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 34*******************************************************************************/ 35 36#include "al_serdes.h" 37#include "al_hal_serdes_hssp.h" 38#include "al_hal_serdes_25g.h" 39 40static int(*handle_init[AL_SRDS_NUM_GROUPS])(void __iomem *, struct al_serdes_grp_obj *) = { 41 al_serdes_hssp_handle_init, 42 al_serdes_hssp_handle_init, 43 al_serdes_hssp_handle_init, 44 al_serdes_hssp_handle_init, 45#if CHECK_ALPINE_V2 46 al_serdes_25g_handle_init, 47#endif 48}; 49 50int al_serdes_handle_grp_init( 51 void __iomem *serdes_regs_base, 52 enum al_serdes_group grp, 53 struct al_serdes_grp_obj *obj) 54{ 55 handle_init[grp](serdes_regs_base, obj); 56 57 return 0; 58} 59 60