#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/fsi.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/iopoll.h>
#include <linux/gpio/consumer.h>
#include "fsi-master.h"
struct fsi_master_aspeed { … };
#define to_fsi_master_aspeed(m) …
static const u32 ctrl_base = …;
static const u32 fsi_base = …;
#define OPB_FSI_VER …
#define OPB_TRIGGER …
#define OPB_CTRL_BASE …
#define OPB_FSI_BASE …
#define OPB_CLK_SYNC …
#define OPB_IRQ_CLEAR …
#define OPB_IRQ_MASK …
#define OPB_IRQ_STATUS …
#define OPB0_SELECT …
#define OPB0_RW …
#define OPB0_XFER_SIZE …
#define OPB0_FSI_ADDR …
#define OPB0_FSI_DATA_W …
#define OPB0_STATUS …
#define OPB0_FSI_DATA_R …
#define OPB0_WRITE_ORDER1 …
#define OPB0_WRITE_ORDER2 …
#define OPB1_WRITE_ORDER1 …
#define OPB1_WRITE_ORDER2 …
#define OPB0_READ_ORDER1 …
#define OPB1_READ_ORDER2 …
#define OPB_RETRY_COUNTER …
#define STATUS_HALFWORD_ACK …
#define STATUS_FULLWORD_ACK …
#define STATUS_ERR_ACK …
#define STATUS_RETRY …
#define STATUS_TIMEOUT …
#define OPB1_XFER_ACK_EN …
#define OPB0_XFER_ACK_EN …
#define CMD_READ …
#define CMD_WRITE …
#define XFER_FULLWORD …
#define XFER_HALFWORD …
#define XFER_BYTE …
#define CREATE_TRACE_POINTS
#include <trace/events/fsi_master_aspeed.h>
#define FSI_LINK_ENABLE_SETUP_TIME …
#define FSI_DIVISOR_DEFAULT …
#define FSI_DIVISOR_CABLED …
static u16 aspeed_fsi_divisor = …;
module_param_named(bus_div,aspeed_fsi_divisor, ushort, 0);
#define OPB_POLL_TIMEOUT …
static int __opb_write(struct fsi_master_aspeed *aspeed, u32 addr,
u32 val, u32 transfer_size)
{ … }
static int opb_writeb(struct fsi_master_aspeed *aspeed, u32 addr, u8 val)
{ … }
static int opb_writew(struct fsi_master_aspeed *aspeed, u32 addr, __be16 val)
{ … }
static int opb_writel(struct fsi_master_aspeed *aspeed, u32 addr, __be32 val)
{ … }
static int __opb_read(struct fsi_master_aspeed *aspeed, uint32_t addr,
u32 transfer_size, void *out)
{ … }
static int opb_readl(struct fsi_master_aspeed *aspeed, uint32_t addr, __be32 *out)
{ … }
static int opb_readw(struct fsi_master_aspeed *aspeed, uint32_t addr, __be16 *out)
{ … }
static int opb_readb(struct fsi_master_aspeed *aspeed, uint32_t addr, u8 *out)
{ … }
static int check_errors(struct fsi_master_aspeed *aspeed, int err)
{ … }
static int aspeed_master_read(struct fsi_master *master, int link,
uint8_t id, uint32_t addr, void *val, size_t size)
{ … }
static int aspeed_master_write(struct fsi_master *master, int link,
uint8_t id, uint32_t addr, const void *val, size_t size)
{ … }
static int aspeed_master_link_enable(struct fsi_master *master, int link,
bool enable)
{ … }
static int aspeed_master_term(struct fsi_master *master, int link, uint8_t id)
{ … }
static int aspeed_master_break(struct fsi_master *master, int link)
{ … }
static void aspeed_master_release(struct device *dev)
{ … }
static inline u32 fsi_mmode_crs0(u32 x)
{ … }
static inline u32 fsi_mmode_crs1(u32 x)
{ … }
static int aspeed_master_init(struct fsi_master_aspeed *aspeed)
{ … }
static ssize_t cfam_reset_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR(cfam_reset, 0200, NULL, cfam_reset_store);
static int setup_cfam_reset(struct fsi_master_aspeed *aspeed)
{ … }
static int tacoma_cabled_fsi_fixup(struct device *dev)
{ … }
static int fsi_master_aspeed_probe(struct platform_device *pdev)
{ … }
static void fsi_master_aspeed_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id fsi_master_aspeed_match[] = …;
MODULE_DEVICE_TABLE(of, fsi_master_aspeed_match);
static struct platform_driver fsi_master_aspeed_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;