#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/platform_data/b53.h>
#include <linux/of.h>
#include "b53_priv.h"
#include "b53_serdes.h"
#define B53_SRAB_CMDSTAT …
#define B53_SRAB_CMDSTAT_RST …
#define B53_SRAB_CMDSTAT_WRITE …
#define B53_SRAB_CMDSTAT_GORDYN …
#define B53_SRAB_CMDSTAT_PAGE …
#define B53_SRAB_CMDSTAT_REG …
#define B53_SRAB_WD_H …
#define B53_SRAB_WD_L …
#define B53_SRAB_RD_H …
#define B53_SRAB_RD_L …
#define B53_SRAB_CTRLS …
#define B53_SRAB_CTRLS_HOST_INTR …
#define B53_SRAB_CTRLS_RCAREQ …
#define B53_SRAB_CTRLS_RCAGNT …
#define B53_SRAB_CTRLS_SW_INIT_DONE …
#define B53_SRAB_INTR …
#define B53_SRAB_INTR_P(x) …
#define B53_SRAB_SWITCH_PHY …
#define B53_SRAB_1588_SYNC …
#define B53_SRAB_IMP1_SLEEP_TIMER …
#define B53_SRAB_P7_SLEEP_TIMER …
#define B53_SRAB_IMP0_SLEEP_TIMER …
#define B53_MUX_CONFIG_P5 …
#define MUX_CONFIG_SGMII …
#define MUX_CONFIG_MII_LITE …
#define MUX_CONFIG_RGMII …
#define MUX_CONFIG_GMII …
#define MUX_CONFIG_GPHY …
#define MUX_CONFIG_INTERNAL …
#define MUX_CONFIG_MASK …
#define B53_MUX_CONFIG_P4 …
struct b53_srab_port_priv { … };
struct b53_srab_priv { … };
static int b53_srab_request_grant(struct b53_device *dev)
{ … }
static void b53_srab_release_grant(struct b53_device *dev)
{ … }
static int b53_srab_op(struct b53_device *dev, u8 page, u8 reg, u32 op)
{ … }
static int b53_srab_read8(struct b53_device *dev, u8 page, u8 reg, u8 *val)
{ … }
static int b53_srab_read16(struct b53_device *dev, u8 page, u8 reg, u16 *val)
{ … }
static int b53_srab_read32(struct b53_device *dev, u8 page, u8 reg, u32 *val)
{ … }
static int b53_srab_read48(struct b53_device *dev, u8 page, u8 reg, u64 *val)
{ … }
static int b53_srab_read64(struct b53_device *dev, u8 page, u8 reg, u64 *val)
{ … }
static int b53_srab_write8(struct b53_device *dev, u8 page, u8 reg, u8 value)
{ … }
static int b53_srab_write16(struct b53_device *dev, u8 page, u8 reg,
u16 value)
{ … }
static int b53_srab_write32(struct b53_device *dev, u8 page, u8 reg,
u32 value)
{ … }
static int b53_srab_write48(struct b53_device *dev, u8 page, u8 reg,
u64 value)
{ … }
static int b53_srab_write64(struct b53_device *dev, u8 page, u8 reg,
u64 value)
{ … }
static irqreturn_t b53_srab_port_thread(int irq, void *dev_id)
{ … }
static irqreturn_t b53_srab_port_isr(int irq, void *dev_id)
{ … }
#if IS_ENABLED(CONFIG_B53_SERDES)
static u8 b53_srab_serdes_map_lane(struct b53_device *dev, int port)
{ … }
#endif
static int b53_srab_irq_enable(struct b53_device *dev, int port)
{ … }
static void b53_srab_irq_disable(struct b53_device *dev, int port)
{ … }
static void b53_srab_phylink_get_caps(struct b53_device *dev, int port,
struct phylink_config *config)
{ … }
static const struct b53_io_ops b53_srab_ops = …;
static const struct of_device_id b53_srab_of_match[] = …;
MODULE_DEVICE_TABLE(of, b53_srab_of_match);
static void b53_srab_intr_set(struct b53_srab_priv *priv, bool set)
{ … }
static void b53_srab_prepare_irq(struct platform_device *pdev)
{ … }
static void b53_srab_mux_init(struct platform_device *pdev)
{ … }
static int b53_srab_probe(struct platform_device *pdev)
{ … }
static void b53_srab_remove(struct platform_device *pdev)
{ … }
static void b53_srab_shutdown(struct platform_device *pdev)
{ … }
static struct platform_driver b53_srab_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;