linux/drivers/pci/controller/pcie-mt7621.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * BRIEF MODULE DESCRIPTION
 *     PCI init for Ralink RT2880 solution
 *
 * Copyright 2007 Ralink Inc. ([email protected])
 *
 * May 2007 Bruce Chang
 * Initial Release
 *
 * May 2009 Bruce Chang
 * support RT2880/RT3883 PCIe
 *
 * May 2011 Bruce Chang
 * support RT6855/MT7620 PCIe
 */

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_pci.h>
#include <linux/of_platform.h>
#include <linux/pci.h>
#include <linux/phy/phy.h>
#include <linux/platform_device.h>
#include <linux/reset.h>
#include <linux/sys_soc.h>

#include "../pci.h"

/* MediaTek-specific configuration registers */
#define PCIE_FTS_NUM
#define PCIE_FTS_NUM_MASK
#define PCIE_FTS_NUM_L0(x)

/* Host-PCI bridge registers */
#define RALINK_PCI_PCICFG_ADDR
#define RALINK_PCI_PCIMSK_ADDR
#define RALINK_PCI_CONFIG_ADDR
#define RALINK_PCI_CONFIG_DATA
#define RALINK_PCI_MEMBASE
#define RALINK_PCI_IOBASE

/* PCIe RC control registers */
#define RALINK_PCI_ID
#define RALINK_PCI_CLASS
#define RALINK_PCI_SUBID
#define RALINK_PCI_STATUS

/* Some definition values */
#define PCIE_REVISION_ID
#define PCIE_CLASS_CODE
#define PCIE_BAR_MAP_MAX
#define PCIE_BAR_ENABLE
#define PCIE_PORT_INT_EN(x)
#define PCIE_PORT_LINKUP
#define PCIE_PORT_CNT

#define INIT_PORTS_DELAY_MS
#define PERST_DELAY_MS

/**
 * struct mt7621_pcie_port - PCIe port information
 * @base: I/O mapped register base
 * @list: port list
 * @pcie: pointer to PCIe host info
 * @clk: pointer to the port clock gate
 * @phy: pointer to PHY control block
 * @pcie_rst: pointer to port reset control
 * @gpio_rst: gpio reset
 * @slot: port slot
 * @enabled: indicates if port is enabled
 */
struct mt7621_pcie_port {};

/**
 * struct mt7621_pcie - PCIe host information
 * @base: IO Mapped Register Base
 * @dev: Pointer to PCIe device
 * @ports: pointer to PCIe port information
 * @resets_inverted: depends on chip revision
 * reset lines are inverted.
 */
struct mt7621_pcie {};

static inline u32 pcie_read(struct mt7621_pcie *pcie, u32 reg)
{}

static inline void pcie_write(struct mt7621_pcie *pcie, u32 val, u32 reg)
{}

static inline u32 pcie_port_read(struct mt7621_pcie_port *port, u32 reg)
{}

static inline void pcie_port_write(struct mt7621_pcie_port *port,
				   u32 val, u32 reg)
{}

static void __iomem *mt7621_pcie_map_bus(struct pci_bus *bus,
					 unsigned int devfn, int where)
{}

static struct pci_ops mt7621_pcie_ops =;

static u32 read_config(struct mt7621_pcie *pcie, unsigned int dev, u32 reg)
{}

static void write_config(struct mt7621_pcie *pcie, unsigned int dev,
			 u32 reg, u32 val)
{}

static inline void mt7621_rst_gpio_pcie_assert(struct mt7621_pcie_port *port)
{}

static inline void mt7621_rst_gpio_pcie_deassert(struct mt7621_pcie_port *port)
{}

static inline bool mt7621_pcie_port_is_linkup(struct mt7621_pcie_port *port)
{}

static inline void mt7621_control_assert(struct mt7621_pcie_port *port)
{}

static inline void mt7621_control_deassert(struct mt7621_pcie_port *port)
{}

static int mt7621_pcie_parse_port(struct mt7621_pcie *pcie,
				  struct device_node *node,
				  int slot)
{}

static int mt7621_pcie_parse_dt(struct mt7621_pcie *pcie)
{}

static int mt7621_pcie_init_port(struct mt7621_pcie_port *port)
{}

static void mt7621_pcie_reset_assert(struct mt7621_pcie *pcie)
{}

static void mt7621_pcie_reset_rc_deassert(struct mt7621_pcie *pcie)
{}

static void mt7621_pcie_reset_ep_deassert(struct mt7621_pcie *pcie)
{}

static int mt7621_pcie_init_ports(struct mt7621_pcie *pcie)
{}

static void mt7621_pcie_enable_port(struct mt7621_pcie_port *port)
{}

static int mt7621_pcie_enable_ports(struct pci_host_bridge *host)
{}

static int mt7621_pcie_register_host(struct pci_host_bridge *host)
{}

static const struct soc_device_attribute mt7621_pcie_quirks_match[] =;

static int mt7621_pcie_probe(struct platform_device *pdev)
{}

static void mt7621_pcie_remove(struct platform_device *pdev)
{}

static const struct of_device_id mt7621_pcie_ids[] =;
MODULE_DEVICE_TABLE(of, mt7621_pcie_ids);

static struct platform_driver mt7621_pcie_driver =;
builtin_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();