linux/drivers/net/dsa/mv88e6xxx/smi.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Marvell 88E6xxx System Management Interface (SMI) support
 *
 * Copyright (c) 2008 Marvell Semiconductor
 *
 * Copyright (c) 2019 Vivien Didelot <[email protected]>
 */

#ifndef _MV88E6XXX_SMI_H
#define _MV88E6XXX_SMI_H

#include "chip.h"

/* Offset 0x00: SMI Command Register */
#define MV88E6XXX_SMI_CMD
#define MV88E6XXX_SMI_CMD_BUSY
#define MV88E6XXX_SMI_CMD_MODE_MASK
#define MV88E6XXX_SMI_CMD_MODE_45
#define MV88E6XXX_SMI_CMD_MODE_22
#define MV88E6XXX_SMI_CMD_OP_MASK
#define MV88E6XXX_SMI_CMD_OP_22_WRITE
#define MV88E6XXX_SMI_CMD_OP_22_READ
#define MV88E6XXX_SMI_CMD_OP_45_WRITE_ADDR
#define MV88E6XXX_SMI_CMD_OP_45_WRITE_DATA
#define MV88E6XXX_SMI_CMD_OP_45_READ_DATA
#define MV88E6XXX_SMI_CMD_OP_45_READ_DATA_INC
#define MV88E6XXX_SMI_CMD_DEV_ADDR_MASK
#define MV88E6XXX_SMI_CMD_REG_ADDR_MASK

/* Offset 0x01: SMI Data Register */
#define MV88E6XXX_SMI_DATA

int mv88e6xxx_smi_init(struct mv88e6xxx_chip *chip,
		       struct mii_bus *bus, int sw_addr);

static inline int mv88e6xxx_smi_read(struct mv88e6xxx_chip *chip,
				     int dev, int reg, u16 *data)
{}

static inline int mv88e6xxx_smi_write(struct mv88e6xxx_chip *chip,
				      int dev, int reg, u16 data)
{}

#endif /* _MV88E6XXX_SMI_H */