linux/drivers/mcb/mcb-internal.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __MCB_INTERNAL
#define __MCB_INTERNAL

#include <linux/types.h>

#define PCI_VENDOR_ID_MEN
#define PCI_DEVICE_ID_MEN_CHAMELEON
#define CHAMELEONV2_MAGIC
#define CHAM_HEADER_SIZE

enum chameleon_descriptor_type {};

enum chameleon_bus_type {};

/**
 * struct chameleon_fpga_header
 *
 * @revision:	Revison of Chameleon table in FPGA
 * @model:	Chameleon table model ASCII char
 * @minor:	Revision minor
 * @bus_type:	Bus type (usually %CHAMELEON_BUS_WISHBONE)
 * @magic:	Chameleon header magic number (0xabce for version 2)
 * @reserved:	Reserved
 * @filename:	Filename of FPGA bitstream
 */
struct chameleon_fpga_header {} __packed;
#define HEADER_MAGIC_OFFSET

/**
 * struct chameleon_gdd - Chameleon General Device Descriptor
 *
 * @irq:	the position in the FPGA's IRQ controller vector
 * @rev:	the revision of the variant's implementation
 * @var:	the variant of the IP core
 * @dev:	the device  the IP core is
 * @dtype:	device descriptor type
 * @bar:	BAR offset that must be added to module offset
 * @inst:	the instance number of the device, 0 is first instance
 * @group:	the group the device belongs to (0 = no group)
 * @reserved:	reserved
 * @offset:	beginning of the address window of desired module
 * @size:	size of the module's address window
 */
struct chameleon_gdd {} __packed;

/* GDD Register 1 fields */
#define GDD_IRQ(x)
#define GDD_REV(x)
#define GDD_VAR(x)
#define GDD_DEV(x)
#define GDD_DTY(x)

/* GDD Register 2 fields */
#define GDD_BAR(x)
#define GDD_INS(x)
#define GDD_GRP(x)

/**
 * struct chameleon_bdd - Chameleon Bridge Device Descriptor
 *
 * @irq:	the position in the FPGA's IRQ controller vector
 * @rev:	the revision of the variant's implementation
 * @var:	the variant of the IP core
 * @dev:	the device  the IP core is
 * @dtype:	device descriptor type
 * @bar:	BAR offset that must be added to module offset
 * @inst:	the instance number of the device, 0 is first instance
 * @dbar:	destination bar from the bus _behind_ the bridge
 * @chamoff:	offset within the BAR of the source bus
 * @offset:
 * @size:
 */
struct chameleon_bdd {} __packed;

struct chameleon_bar {};

#define BAR_CNT(x)
#define CHAMELEON_BAR_MAX
#define BAR_DESC_SIZE(x)

int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
			  void __iomem *base);

#endif