/* * netip_subsystem_defs.h * * GPL LICENSE SUMMARY * * Copyright(c) 2015-2016 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * The full GNU General Public License is included in this distribution * in the file called LICENSE.GPL. * * Contact Information: * Intel Corporation * 2200 Mission College Blvd. * Santa Clara, CA 97052 * */ #ifndef LINUX_NETIP_SUBSYSTEM_DEFS_H #define LINUX_NETIP_SUBSYSTEM_DEFS_H #include #include #include #include #include #include "netip_subsystem_pm.h" //#define NETSS_DRV_DBG 1 #ifdef NETSS_DRV_DBG #define NETSS_DBG_PRINT(fmt, args...) printk(fmt, ##args) #else #define NETSS_DBG_PRINT(fmt, args...) ; #endif #define NUM_ARM11_INTR_PER_REG 32 #define NUM_ARM11_INTR_REGS (NETSS_INTERUPT_ARM11_MAX / NUM_ARM11_INTR_PER_REG) struct net_subsystem_drv_data { uint32_t irq_num; /* The irq number used for Net SubSystem driver */ uint32_t pending_interrupts; uint32_t pending_arm11_interrupts[NUM_ARM11_INTR_REGS]; /* For NETSS_INTERUPT_ARM11_MAX (96) Bundle Interrupts */ uint32_t ier_reg; /**NetIP bridge interrupt enable register */ uint32_t imr_reg; /**NetIP bridge interrupt mask register */ bool netss_driver_initialized; void __iomem *bridge_reg_base; /* Mapped io bridge register base address mmio region2 of Net-IP */ netss_dev_info_t subdev_mmios[NETSS_DEV_MAX]; netss_interrupt_info_t irqs[NETSS_INTERUPT_MAX]; netss_interrupt_info_t arm11_irqs[NETSS_INTERUPT_ARM11_MAX]; netss_power_state_callback_info_t power_state_change_cbinfo[NETSS_DEV_MAX]; struct pci_dev *dev; spinlock_t irq_lock; struct mutex netss_lock; struct task_struct * handshake_thread; /* Thread that exchange messages with netip during boot */ acpi_handle acpi_h; netss_msg_info_t netip_msg; uint32_t bios_enabled_xgmiis; }__attribute__((aligned(4))); typedef struct net_ip_mmios { unsigned long region1_base; unsigned long region1_size; unsigned long region2_base; unsigned long region2_size; }net_ip_mmios_t; #endif