1111fc64aSRaghu Vatsavayi /********************************************************************** 2111fc64aSRaghu Vatsavayi * Author: Cavium, Inc. 3111fc64aSRaghu Vatsavayi * 4111fc64aSRaghu Vatsavayi * Contact: support@cavium.com 5111fc64aSRaghu Vatsavayi * Please include "LiquidIO" in the subject. 6111fc64aSRaghu Vatsavayi * 7111fc64aSRaghu Vatsavayi * Copyright (c) 2003-2016 Cavium, Inc. 8111fc64aSRaghu Vatsavayi * 9111fc64aSRaghu Vatsavayi * This file is free software; you can redistribute it and/or modify 10111fc64aSRaghu Vatsavayi * it under the terms of the GNU General Public License, Version 2, as 11111fc64aSRaghu Vatsavayi * published by the Free Software Foundation. 12111fc64aSRaghu Vatsavayi * 13111fc64aSRaghu Vatsavayi * This file is distributed in the hope that it will be useful, but 14111fc64aSRaghu Vatsavayi * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 15111fc64aSRaghu Vatsavayi * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 16111fc64aSRaghu Vatsavayi * NONINFRINGEMENT. See the GNU General Public License for more details. 17111fc64aSRaghu Vatsavayi ***********************************************************************/ 18111fc64aSRaghu Vatsavayi /*! \file cn23xx_device.h 19111fc64aSRaghu Vatsavayi * \brief Host Driver: Routines that perform CN23XX specific operations. 20111fc64aSRaghu Vatsavayi */ 21111fc64aSRaghu Vatsavayi 22111fc64aSRaghu Vatsavayi #ifndef __CN23XX_VF_DEVICE_H__ 23111fc64aSRaghu Vatsavayi #define __CN23XX_VF_DEVICE_H__ 24111fc64aSRaghu Vatsavayi 25111fc64aSRaghu Vatsavayi #include "cn23xx_vf_regs.h" 26111fc64aSRaghu Vatsavayi 27111fc64aSRaghu Vatsavayi /* Register address and configuration for a CN23XX devices. 28111fc64aSRaghu Vatsavayi * If device specific changes need to be made then add a struct to include 29111fc64aSRaghu Vatsavayi * device specific fields as shown in the commented section 30111fc64aSRaghu Vatsavayi */ 31111fc64aSRaghu Vatsavayi struct octeon_cn23xx_vf { 32111fc64aSRaghu Vatsavayi struct octeon_config *conf; 33111fc64aSRaghu Vatsavayi }; 3469c69da3SRaghu Vatsavayi 35c865cdf1SRaghu Vatsavayi #define BUSY_READING_REG_VF_LOOP_COUNT 10000 36c865cdf1SRaghu Vatsavayi 37cf39faf5SRaghu Vatsavayi #define CN23XX_MAILBOX_MSGPARAM_SIZE 6 38cf39faf5SRaghu Vatsavayi 39cf39faf5SRaghu Vatsavayi void cn23xx_vf_ask_pf_to_do_flr(struct octeon_device *oct); 40cf39faf5SRaghu Vatsavayi 41cf39faf5SRaghu Vatsavayi int cn23xx_octeon_pfvf_handshake(struct octeon_device *oct); 42cf39faf5SRaghu Vatsavayi 4369c69da3SRaghu Vatsavayi int cn23xx_setup_octeon_vf_device(struct octeon_device *oct); 44da15c78bSRaghu Vatsavayi 45da15c78bSRaghu Vatsavayi void cn23xx_dump_vf_initialized_regs(struct octeon_device *oct); 46111fc64aSRaghu Vatsavayi #endif 47