sonic-buildimage/platform/pddf/i2c/modules/include/pddf_fpgapci_defs.h
FuzailBrcm 0704ff5e6c
[pddf]: Adding support for FPGAPCIe in PDDF (#13476)
Why I did it
Some of the platform vendors use FPGA in the HW design. This FPGA is connected to the CPU via PCIe interface. This FPGA also works as an I2C controller having other devices attached to the I2C channels emanating from it. Adding a common module, a driver and a platform specific algorithm module to be used for such FPGA in PDDF.

How I did it
Added 'pddf_fpgapci_module', 'pddf_fpgapci_driver' and a sample algorithm module for Xilinx device 7021. Kernel modules which takes the platform dependent data from PDDF JSON files and initialises the PCIe FPGA. The sample algorithm module can be used by the ODMs in case the communication algorithms are same for their device. Else, they need to come up with similar algo module.

How to verify it
Any platform having such an FPGA and brought up using PDDF would use these kernel modules. The detail representation of such a device in PDDF JSON file is covered in the HLD.
2023-02-06 13:48:31 -08:00

50 lines
1.2 KiB
C

/*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* Description:
* Platform FPGAPCI defines/structures header file
*/
#ifndef __PDDF_FPGAPCI_DEFS_H__
#define __PDDF_FPGAPCI_DEFS_H__
// FPGA
typedef struct
{
uint32_t vendor_id;
uint32_t device_id;
uint32_t virt_bus;
uint32_t virt_i2c_ch;
uint32_t data_base_offset;
uint32_t data_size;
uint32_t i2c_ch_base_offset;
uint32_t i2c_ch_size;
} FPGA_OPS_DATA;
/*****************************************
* kobj list
*****************************************/
struct kobject *fpgapci_kobj=NULL;
/*****************************************
* Static Data provided from user
* space JSON data file
*****************************************/
#define NAME_SIZE 32
#endif