linux/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2014-2015 Hisilicon Limited.
 */

#include "hns_dsaf_mac.h"
#include "hns_dsaf_misc.h"
#include "hns_dsaf_ppe.h"
#include "hns_dsaf_reg.h"

enum _dsm_op_index {};

enum _dsm_rst_type {};

static const guid_t hns_dsaf_acpi_dsm_guid =;

static void dsaf_write_sub(struct dsaf_device *dsaf_dev, u32 reg, u32 val)
{}

static u32 dsaf_read_sub(struct dsaf_device *dsaf_dev, u32 reg)
{}

static void hns_dsaf_acpi_ledctrl_by_port(struct hns_mac_cb *mac_cb, u8 op_type,
					  u32 link, u32 port, u32 act)
{}

static void hns_dsaf_acpi_locate_ledctrl_by_port(struct hns_mac_cb *mac_cb,
						 u8 op_type, u32 locate,
						 u32 port)
{}

static void hns_cpld_set_led(struct hns_mac_cb *mac_cb, int link_status,
			     u16 speed, int data)
{}

static void hns_cpld_set_led_acpi(struct hns_mac_cb *mac_cb, int link_status,
				  u16 speed, int data)
{}

static void cpld_led_reset(struct hns_mac_cb *mac_cb)
{}

static void cpld_led_reset_acpi(struct hns_mac_cb *mac_cb)
{}

static int cpld_set_led_id(struct hns_mac_cb *mac_cb,
			   enum hnae_led_state status)
{}

static int cpld_set_led_id_acpi(struct hns_mac_cb *mac_cb,
				enum hnae_led_state status)
{}

#define RESET_REQ_OR_DREQ

static void hns_dsaf_acpi_srst_by_port(struct dsaf_device *dsaf_dev, u8 op_type,
				       u32 port_type, u32 port, u32 val)
{}

static void hns_dsaf_rst(struct dsaf_device *dsaf_dev, bool dereset)
{}

static void hns_dsaf_rst_acpi(struct dsaf_device *dsaf_dev, bool dereset)
{}

static void hns_dsaf_xge_srst_by_port(struct dsaf_device *dsaf_dev, u32 port,
				      bool dereset)
{}

static void hns_dsaf_xge_srst_by_port_acpi(struct dsaf_device *dsaf_dev,
					   u32 port, bool dereset)
{}

/**
 * hns_dsaf_srst_chns - reset dsaf channels
 * @dsaf_dev: dsaf device struct pointer
 * @msk: xbar channels mask value:
 * @dereset: false - request reset , true - drop reset
 *
 * bit0-5 for xge0-5
 * bit6-11 for ppe0-5
 * bit12-17 for roce0-5
 * bit18-19 for com/dfx
 */
static void
hns_dsaf_srst_chns(struct dsaf_device *dsaf_dev, u32 msk, bool dereset)
{}

/**
 * hns_dsaf_srst_chns_acpi - reset dsaf channels
 * @dsaf_dev: dsaf device struct pointer
 * @msk: xbar channels mask value:
 * @dereset: false - request reset , true - drop reset
 *
 * bit0-5 for xge0-5
 * bit6-11 for ppe0-5
 * bit12-17 for roce0-5
 * bit18-19 for com/dfx
 */
static void
hns_dsaf_srst_chns_acpi(struct dsaf_device *dsaf_dev, u32 msk, bool dereset)
{}

static void hns_dsaf_roce_srst(struct dsaf_device *dsaf_dev, bool dereset)
{}

static void hns_dsaf_roce_srst_acpi(struct dsaf_device *dsaf_dev, bool dereset)
{}

static void hns_dsaf_ge_srst_by_port(struct dsaf_device *dsaf_dev, u32 port,
				     bool dereset)
{}

static void hns_dsaf_ge_srst_by_port_acpi(struct dsaf_device *dsaf_dev,
					  u32 port, bool dereset)
{}

static void hns_ppe_srst_by_port(struct dsaf_device *dsaf_dev, u32 port,
				 bool dereset)
{}

static void
hns_ppe_srst_by_port_acpi(struct dsaf_device *dsaf_dev, u32 port, bool dereset)
{}

static void hns_ppe_com_srst(struct dsaf_device *dsaf_dev, bool dereset)
{}

/**
 * hns_mac_get_phy_if - get phy ifterface form serdes mode
 * @mac_cb: mac control block
 * retuen phy interface
 */
static phy_interface_t hns_mac_get_phy_if(struct hns_mac_cb *mac_cb)
{}

static phy_interface_t hns_mac_get_phy_if_acpi(struct hns_mac_cb *mac_cb)
{}

static int hns_mac_get_sfp_prsnt(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
{}

static int hns_mac_get_sfp_prsnt_acpi(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
{}

/**
 * hns_mac_config_sds_loopback - set loop back for serdes
 * @mac_cb: mac control block
 * @en: enable or disable
 * return 0 == success
 */
static int hns_mac_config_sds_loopback(struct hns_mac_cb *mac_cb, bool en)
{}

static int
hns_mac_config_sds_loopback_acpi(struct hns_mac_cb *mac_cb, bool en)
{}

struct dsaf_misc_op *hns_misc_op_get(struct dsaf_device *dsaf_dev)
{}

struct
platform_device *hns_dsaf_find_platform_device(struct fwnode_handle *fwnode)
{}