-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
832 additions
and
567 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
/******************************************************************************* | ||
* BAREFOOT NETWORKS CONFIDENTIAL & PROPRIETARY | ||
* | ||
* Copyright (c) 2018-2018 Barefoot Networks, Inc. | ||
* | ||
* NOTICE: All information contained herein is, and remains the property of | ||
* Barefoot Networks, Inc. and its suppliers, if any. The intellectual and | ||
* technical concepts contained herein are proprietary to Barefoot Networks, | ||
* Inc. | ||
* and its suppliers and may be covered by U.S. and Foreign Patents, patents in | ||
* process, and are protected by trade secret or copyright law. | ||
* Dissemination of this information or reproduction of this material is | ||
* strictly forbidden unless prior written permission is obtained from | ||
* Barefoot Networks, Inc. | ||
* | ||
* No warranty, explicit or implicit is provided, unless granted under a | ||
* written agreement with Barefoot Networks, Inc. | ||
* | ||
* $Id: $ | ||
* | ||
******************************************************************************/ | ||
Barefoot Networks Switch ASIC Linux driver | ||
Copyright(c) 2015 - 2019 Barefoot Networks, Inc. | ||
This program is free software; you can redistribute it and/or modify it | ||
under the terms and conditions of the GNU General Public License, | ||
version 2, as published by the Free Software Foundation. | ||
This program is distributed in the hope 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 "COPYING". | ||
Contact Information: | ||
[email protected] | ||
Barefoot Networks, 4750 Patrick Henry Drive, Santa Clara CA 95054 | ||
*******************************************************************************/ | ||
#ifndef _BF_IOCTL_H_ | ||
#define _BF_IOCTL_H_ | ||
|
||
|
@@ -35,15 +38,35 @@ typedef uint64_t phys_addr_t; | |
#endif /* __KERNEL__ */ | ||
|
||
#define BF_IOC_MAGIC 'b' | ||
#define BF_TBUS_MSIX_INDICES_MAX 3 | ||
|
||
typedef struct bf_dma_bus_map_s | ||
typedef struct bf_dma_bus_map_s | ||
{ | ||
phys_addr_t phy_addr; | ||
void *dma_addr; | ||
size_t size; | ||
} bf_dma_bus_map_t; | ||
|
||
typedef struct bf_tbus_msix_indices_s | ||
{ | ||
int cnt; | ||
int indices[BF_TBUS_MSIX_INDICES_MAX]; | ||
} bf_tbus_msix_indices_t; | ||
|
||
enum bf_intr_mode { | ||
BF_INTR_MODE_NONE = 0, | ||
BF_INTR_MODE_LEGACY, | ||
BF_INTR_MODE_MSI, | ||
BF_INTR_MODE_MSIX, | ||
}; | ||
|
||
typedef struct bf_intr_mode_s { | ||
enum bf_intr_mode intr_mode; | ||
} bf_intr_mode_t; | ||
|
||
#define BF_IOCMAPDMAADDR _IOWR(BF_IOC_MAGIC, 0, bf_dma_bus_map_t) | ||
#define BF_IOCUNMAPDMAADDR _IOW(BF_IOC_MAGIC, 0, bf_dma_bus_map_t) | ||
#define BF_IOCUNMAPDMAADDR _IOW(BF_IOC_MAGIC, 1, bf_dma_bus_map_t) | ||
#define BF_TBUS_MSIX_INDEX _IOW(BF_IOC_MAGIC, 2, bf_tbus_msix_indices_t) | ||
#define BF_GET_INTR_MODE _IOR(BF_IOC_MAGIC, 3, bf_intr_mode_t) | ||
|
||
#endif /* _BF_IOCTL_H_ */ |
Oops, something went wrong.