Back to home page

OSCL-LXR

 
 

    


0001 /**********************************************************************
0002  * Author: Cavium, Inc.
0003  *
0004  * Contact: support@cavium.com
0005  *          Please include "LiquidIO" in the subject.
0006  *
0007  * Copyright (c) 2003-2016 Cavium, Inc.
0008  *
0009  * This file is free software; you can redistribute it and/or modify
0010  * it under the terms of the GNU General Public License, Version 2, as
0011  * published by the Free Software Foundation.
0012  *
0013  * This file is distributed in the hope that it will be useful, but
0014  * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
0015  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
0016  * NONINFRINGEMENT.  See the GNU General Public License for more details.
0017  ***********************************************************************/
0018 /*! \file  cn23xx_device.h
0019  * \brief Host Driver: Routines that perform CN23XX specific operations.
0020  */
0021 
0022 #ifndef __CN23XX_VF_DEVICE_H__
0023 #define __CN23XX_VF_DEVICE_H__
0024 
0025 #include "cn23xx_vf_regs.h"
0026 
0027 /* Register address and configuration for a CN23XX devices.
0028  * If device specific changes need to be made then add a struct to include
0029  * device specific fields as shown in the commented section
0030  */
0031 struct octeon_cn23xx_vf {
0032     struct octeon_config *conf;
0033 };
0034 
0035 #define BUSY_READING_REG_VF_LOOP_COUNT      10000
0036 
0037 #define CN23XX_MAILBOX_MSGPARAM_SIZE        6
0038 
0039 void cn23xx_vf_ask_pf_to_do_flr(struct octeon_device *oct);
0040 
0041 int cn23xx_octeon_pfvf_handshake(struct octeon_device *oct);
0042 
0043 int cn23xx_setup_octeon_vf_device(struct octeon_device *oct);
0044 
0045 u32 cn23xx_vf_get_oq_ticks(struct octeon_device *oct, u32 time_intr_in_us);
0046 
0047 void cn23xx_dump_vf_initialized_regs(struct octeon_device *oct);
0048 #endif