#include <linux/bitfield.h>
#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include "chip.h"
#include "global1.h"
#include "global2.h"
int mv88e6xxx_g2_read(struct mv88e6xxx_chip *chip, int reg, u16 *val)
{ … }
int mv88e6xxx_g2_write(struct mv88e6xxx_chip *chip, int reg, u16 val)
{ … }
int mv88e6xxx_g2_wait_bit(struct mv88e6xxx_chip *chip, int reg, int
bit, int val)
{ … }
static int mv88e6xxx_g2_int_source(struct mv88e6xxx_chip *chip, u16 *src)
{ … }
static int mv88e6xxx_g2_int_mask(struct mv88e6xxx_chip *chip, u16 mask)
{ … }
static int mv88e6xxx_g2_mgmt_enable_2x(struct mv88e6xxx_chip *chip, u16 en2x)
{ … }
static int mv88e6xxx_g2_mgmt_enable_0x(struct mv88e6xxx_chip *chip, u16 en0x)
{ … }
static int mv88e6xxx_g2_switch_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip,
bool enable)
{ … }
int mv88e6185_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
{ … }
int mv88e6352_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
{ … }
int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip, int target,
int port)
{ … }
int mv88e6xxx_g2_trunk_mask_write(struct mv88e6xxx_chip *chip, int num,
bool hash, u16 mask)
{ … }
int mv88e6xxx_g2_trunk_mapping_write(struct mv88e6xxx_chip *chip, int id,
u16 map)
{ … }
int mv88e6xxx_g2_trunk_clear(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6xxx_g2_irl_wait(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6xxx_g2_irl_op(struct mv88e6xxx_chip *chip, u16 op, int port,
int res, int reg)
{ … }
int mv88e6352_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port)
{ … }
int mv88e6390_g2_irl_init_all(struct mv88e6xxx_chip *chip, int port)
{ … }
static int mv88e6xxx_g2_pvt_op_wait(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6xxx_g2_pvt_op(struct mv88e6xxx_chip *chip, int src_dev,
int src_port, u16 op)
{ … }
int mv88e6xxx_g2_pvt_read(struct mv88e6xxx_chip *chip, int src_dev,
int src_port, u16 *data)
{ … }
int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip, int src_dev,
int src_port, u16 data)
{ … }
static int mv88e6xxx_g2_switch_mac_write(struct mv88e6xxx_chip *chip,
unsigned int pointer, u8 data)
{ … }
int mv88e6xxx_g2_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr)
{ … }
int mv88e6xxx_g2_atu_stats_set(struct mv88e6xxx_chip *chip, u16 kind, u16 bin)
{ … }
int mv88e6xxx_g2_atu_stats_get(struct mv88e6xxx_chip *chip, u16 *stats)
{ … }
static int mv88e6xxx_g2_pot_write(struct mv88e6xxx_chip *chip, int pointer,
u8 data)
{ … }
int mv88e6xxx_g2_pot_clear(struct mv88e6xxx_chip *chip)
{ … }
int mv88e6xxx_g2_eeprom_wait(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6xxx_g2_eeprom_cmd(struct mv88e6xxx_chip *chip, u16 cmd)
{ … }
static int mv88e6xxx_g2_eeprom_read8(struct mv88e6xxx_chip *chip,
u16 addr, u8 *data)
{ … }
static int mv88e6xxx_g2_eeprom_write8(struct mv88e6xxx_chip *chip,
u16 addr, u8 data)
{ … }
static int mv88e6xxx_g2_eeprom_read16(struct mv88e6xxx_chip *chip,
u8 addr, u16 *data)
{ … }
static int mv88e6xxx_g2_eeprom_write16(struct mv88e6xxx_chip *chip,
u8 addr, u16 data)
{ … }
int mv88e6xxx_g2_get_eeprom8(struct mv88e6xxx_chip *chip,
struct ethtool_eeprom *eeprom, u8 *data)
{ … }
int mv88e6xxx_g2_set_eeprom8(struct mv88e6xxx_chip *chip,
struct ethtool_eeprom *eeprom, u8 *data)
{ … }
int mv88e6xxx_g2_get_eeprom16(struct mv88e6xxx_chip *chip,
struct ethtool_eeprom *eeprom, u8 *data)
{ … }
int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip,
struct ethtool_eeprom *eeprom, u8 *data)
{ … }
static int mv88e6xxx_g2_smi_phy_wait(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6xxx_g2_smi_phy_cmd(struct mv88e6xxx_chip *chip, u16 cmd)
{ … }
static int mv88e6xxx_g2_smi_phy_access(struct mv88e6xxx_chip *chip,
bool external, bool c45, u16 op, int dev,
int reg)
{ … }
static int mv88e6xxx_g2_smi_phy_access_c22(struct mv88e6xxx_chip *chip,
bool external, u16 op, int dev,
int reg)
{ … }
static int mv88e6xxx_g2_smi_phy_read_data_c22(struct mv88e6xxx_chip *chip,
bool external, int dev, int reg,
u16 *data)
{ … }
static int mv88e6xxx_g2_smi_phy_write_data_c22(struct mv88e6xxx_chip *chip,
bool external, int dev, int reg,
u16 data)
{ … }
static int mv88e6xxx_g2_smi_phy_access_c45(struct mv88e6xxx_chip *chip,
bool external, u16 op, int port,
int dev)
{ … }
static int mv88e6xxx_g2_smi_phy_write_addr_c45(struct mv88e6xxx_chip *chip,
bool external, int port, int dev,
int addr)
{ … }
static int mv88e6xxx_g2_smi_phy_read_data_c45(struct mv88e6xxx_chip *chip,
bool external, int port, int dev,
u16 *data)
{ … }
static int _mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip,
bool external, int port, int devad,
int reg, u16 *data)
{ … }
static int mv88e6xxx_g2_smi_phy_write_data_c45(struct mv88e6xxx_chip *chip,
bool external, int port, int dev,
u16 data)
{ … }
static int _mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip,
bool external, int port, int devad,
int reg, u16 data)
{ … }
int mv88e6xxx_g2_smi_phy_read_c22(struct mv88e6xxx_chip *chip,
struct mii_bus *bus,
int addr, int reg, u16 *val)
{ … }
int mv88e6xxx_g2_smi_phy_read_c45(struct mv88e6xxx_chip *chip,
struct mii_bus *bus, int addr, int devad,
int reg, u16 *val)
{ … }
int mv88e6xxx_g2_smi_phy_write_c22(struct mv88e6xxx_chip *chip,
struct mii_bus *bus, int addr, int reg,
u16 val)
{ … }
int mv88e6xxx_g2_smi_phy_write_c45(struct mv88e6xxx_chip *chip,
struct mii_bus *bus, int addr, int devad,
int reg, u16 val)
{ … }
static int mv88e6097_watchdog_action(struct mv88e6xxx_chip *chip, int irq)
{ … }
static void mv88e6097_watchdog_free(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6097_watchdog_setup(struct mv88e6xxx_chip *chip)
{ … }
const struct mv88e6xxx_irq_ops mv88e6097_watchdog_ops = …;
static void mv88e6250_watchdog_free(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6250_watchdog_setup(struct mv88e6xxx_chip *chip)
{ … }
const struct mv88e6xxx_irq_ops mv88e6250_watchdog_ops = …;
static int mv88e6390_watchdog_setup(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6390_watchdog_action(struct mv88e6xxx_chip *chip, int irq)
{ … }
static void mv88e6390_watchdog_free(struct mv88e6xxx_chip *chip)
{ … }
const struct mv88e6xxx_irq_ops mv88e6390_watchdog_ops = …;
static int mv88e6393x_watchdog_action(struct mv88e6xxx_chip *chip, int irq)
{ … }
const struct mv88e6xxx_irq_ops mv88e6393x_watchdog_ops = …;
static irqreturn_t mv88e6xxx_g2_watchdog_thread_fn(int irq, void *dev_id)
{ … }
static void mv88e6xxx_g2_watchdog_free(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6xxx_g2_watchdog_setup(struct mv88e6xxx_chip *chip)
{ … }
static int mv88e6xxx_g2_misc_5_bit_port(struct mv88e6xxx_chip *chip,
bool port_5_bit)
{ … }
int mv88e6xxx_g2_misc_4_bit_port(struct mv88e6xxx_chip *chip)
{ … }
static void mv88e6xxx_g2_irq_mask(struct irq_data *d)
{ … }
static void mv88e6xxx_g2_irq_unmask(struct irq_data *d)
{ … }
static irqreturn_t mv88e6xxx_g2_irq_thread_fn(int irq, void *dev_id)
{ … }
static void mv88e6xxx_g2_irq_bus_lock(struct irq_data *d)
{ … }
static void mv88e6xxx_g2_irq_bus_sync_unlock(struct irq_data *d)
{ … }
static const struct irq_chip mv88e6xxx_g2_irq_chip = …;
static int mv88e6xxx_g2_irq_domain_map(struct irq_domain *d,
unsigned int irq,
irq_hw_number_t hwirq)
{ … }
static const struct irq_domain_ops mv88e6xxx_g2_irq_domain_ops = …;
void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip)
{ … }
int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
{ … }
int mv88e6xxx_g2_irq_mdio_setup(struct mv88e6xxx_chip *chip,
struct mii_bus *bus)
{ … }
void mv88e6xxx_g2_irq_mdio_free(struct mv88e6xxx_chip *chip,
struct mii_bus *bus)
{ … }