linux/drivers/net/dsa/b53/b53_mdio.c

/*
 * B53 register access through MII registers
 *
 * Copyright (C) 2011-2013 Jonas Gorski <[email protected]>
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <linux/kernel.h>
#include <linux/phy.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/delay.h>
#include <linux/brcmphy.h>
#include <linux/rtnetlink.h>
#include <net/dsa.h>

#include "b53_priv.h"

/* MII registers */
#define REG_MII_PAGE
#define REG_MII_ADDR
#define REG_MII_DATA0
#define REG_MII_DATA1
#define REG_MII_DATA2
#define REG_MII_DATA3

#define REG_MII_PAGE_ENABLE
#define REG_MII_ADDR_WRITE
#define REG_MII_ADDR_READ

static int b53_mdio_op(struct b53_device *dev, u8 page, u8 reg, u16 op)
{}

static int b53_mdio_read8(struct b53_device *dev, u8 page, u8 reg, u8 *val)
{}

static int b53_mdio_read16(struct b53_device *dev, u8 page, u8 reg, u16 *val)
{}

static int b53_mdio_read32(struct b53_device *dev, u8 page, u8 reg, u32 *val)
{}

static int b53_mdio_read48(struct b53_device *dev, u8 page, u8 reg, u64 *val)
{}

static int b53_mdio_read64(struct b53_device *dev, u8 page, u8 reg, u64 *val)
{}

static int b53_mdio_write8(struct b53_device *dev, u8 page, u8 reg, u8 value)
{}

static int b53_mdio_write16(struct b53_device *dev, u8 page, u8 reg,
			    u16 value)
{}

static int b53_mdio_write32(struct b53_device *dev, u8 page, u8 reg,
			    u32 value)
{}

static int b53_mdio_write48(struct b53_device *dev, u8 page, u8 reg,
			    u64 value)
{}

static int b53_mdio_write64(struct b53_device *dev, u8 page, u8 reg,
			    u64 value)
{}

static int b53_mdio_phy_read16(struct b53_device *dev, int addr, int reg,
			       u16 *value)
{}

static int b53_mdio_phy_write16(struct b53_device *dev, int addr, int reg,
				u16 value)
{}

static const struct b53_io_ops b53_mdio_ops =;

#define B53_BRCM_OUI_1
#define B53_BRCM_OUI_2
#define B53_BRCM_OUI_3
#define B53_BRCM_OUI_4
#define B53_BRCM_OUI_5

static int b53_mdio_probe(struct mdio_device *mdiodev)
{}

static void b53_mdio_remove(struct mdio_device *mdiodev)
{}

static void b53_mdio_shutdown(struct mdio_device *mdiodev)
{}

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

static struct mdio_driver b53_mdio_driver =;
mdio_module_driver(b53_mdio_driver);

MODULE_DESCRIPTION();
MODULE_LICENSE();