linux/drivers/net/pcs/pcs-xpcs-plat.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Synopsys DesignWare XPCS platform device driver
 *
 * Copyright (C) 2024 Serge Semin
 */

#include <linux/atomic.h>
#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/mdio.h>
#include <linux/module.h>
#include <linux/pcs/pcs-xpcs.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/sizes.h>

#include "pcs-xpcs.h"

/* Page select register for the indirect MMIO CSRs access */
#define DW_VR_CSR_VIEWPORT

struct dw_xpcs_plat {};

static ptrdiff_t xpcs_mmio_addr_format(int dev, int reg)
{}

static u16 xpcs_mmio_addr_page(ptrdiff_t csr)
{}

static ptrdiff_t xpcs_mmio_addr_offset(ptrdiff_t csr)
{}

static int xpcs_mmio_read_reg_indirect(struct dw_xpcs_plat *pxpcs,
				       int dev, int reg)
{}

static int xpcs_mmio_write_reg_indirect(struct dw_xpcs_plat *pxpcs,
					int dev, int reg, u16 val)
{}

static int xpcs_mmio_read_reg_direct(struct dw_xpcs_plat *pxpcs,
				     int dev, int reg)
{}

static int xpcs_mmio_write_reg_direct(struct dw_xpcs_plat *pxpcs,
				      int dev, int reg, u16 val)
{}

static int xpcs_mmio_read_c22(struct mii_bus *bus, int addr, int reg)
{}

static int xpcs_mmio_write_c22(struct mii_bus *bus, int addr, int reg, u16 val)
{}

static int xpcs_mmio_read_c45(struct mii_bus *bus, int addr, int dev, int reg)
{}

static int xpcs_mmio_write_c45(struct mii_bus *bus, int addr, int dev,
			       int reg, u16 val)
{}

static struct dw_xpcs_plat *xpcs_plat_create_data(struct platform_device *pdev)
{}

static int xpcs_plat_init_res(struct dw_xpcs_plat *pxpcs)
{}

static int xpcs_plat_init_clk(struct dw_xpcs_plat *pxpcs)
{}

static int xpcs_plat_init_bus(struct dw_xpcs_plat *pxpcs)
{}

/* Note there is no need in the next function antagonist because the MDIO-bus
 * de-registration will effectively remove and destroy all the MDIO-devices
 * registered on the bus.
 */
static int xpcs_plat_init_dev(struct dw_xpcs_plat *pxpcs)
{}

static int xpcs_plat_probe(struct platform_device *pdev)
{}

static int __maybe_unused xpcs_plat_pm_runtime_suspend(struct device *dev)
{}

static int __maybe_unused xpcs_plat_pm_runtime_resume(struct device *dev)
{}

static const struct dev_pm_ops xpcs_plat_pm_ops =;

DW_XPCS_INFO_DECLARE(xpcs_generic, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_ID_NATIVE);
DW_XPCS_INFO_DECLARE(xpcs_pma_gen1_3g, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_GEN1_3G_ID);
DW_XPCS_INFO_DECLARE(xpcs_pma_gen2_3g, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_GEN2_3G_ID);
DW_XPCS_INFO_DECLARE(xpcs_pma_gen2_6g, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_GEN2_6G_ID);
DW_XPCS_INFO_DECLARE(xpcs_pma_gen4_3g, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_GEN4_3G_ID);
DW_XPCS_INFO_DECLARE(xpcs_pma_gen4_6g, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_GEN4_6G_ID);
DW_XPCS_INFO_DECLARE(xpcs_pma_gen5_10g, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_GEN5_10G_ID);
DW_XPCS_INFO_DECLARE(xpcs_pma_gen5_12g, DW_XPCS_ID_NATIVE, DW_XPCS_PMA_GEN5_12G_ID);

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

static struct platform_driver xpcs_plat_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();