• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**********************************************************************
2 * Author: Cavium, Inc.
3 *
4 * Contact: support@cavium.com
5 *          Please include "LiquidIO" in the subject.
6 *
7 * Copyright (c) 2003-2015 Cavium, Inc.
8 *
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT.  See the GNU General Public License for more
17 * details.
18 *
19 * This file may also be available under a different license from Cavium.
20 * Contact Cavium, Inc. for more information
21 **********************************************************************/
22 
23 /*! \file  cn23xx_device.h
24  * \brief Host Driver: Routines that perform CN23XX specific operations.
25 */
26 
27 #ifndef __CN23XX_PF_DEVICE_H__
28 #define __CN23XX_PF_DEVICE_H__
29 
30 #include "cn23xx_pf_regs.h"
31 
32 /* Register address and configuration for a CN23XX devices.
33  * If device specific changes need to be made then add a struct to include
34  * device specific fields as shown in the commented section
35  */
36 struct octeon_cn23xx_pf {
37 	/** PCI interrupt summary register */
38 	u8 __iomem *intr_sum_reg64;
39 
40 	/** PCI interrupt enable register */
41 	u8 __iomem *intr_enb_reg64;
42 
43 	/** The PCI interrupt mask used by interrupt handler */
44 	u64 intr_mask64;
45 
46 	struct octeon_config *conf;
47 };
48 
49 int setup_cn23xx_octeon_pf_device(struct octeon_device *oct);
50 
51 int validate_cn23xx_pf_config_info(struct octeon_device *oct,
52 				   struct octeon_config *conf23xx);
53 
54 u32 cn23xx_pf_get_oq_ticks(struct octeon_device *oct, u32 time_intr_in_us);
55 
56 void cn23xx_dump_pf_initialized_regs(struct octeon_device *oct);
57 
58 int cn23xx_fw_loaded(struct octeon_device *oct);
59 #endif
60