#include <linux/fs.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
#include <linux/miscdevice.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/aspeed-p2a-ctrl.h>
#define DEVICE_NAME …
#define SCU2C …
#define SCU180 …
#define SCU180_ENP2A …
#define P2A_REGION_COUNT …
struct region { … };
struct aspeed_p2a_model_data { … };
struct aspeed_p2a_ctrl { … };
struct aspeed_p2a_user { … };
static void aspeed_p2a_enable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
{ … }
static void aspeed_p2a_disable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
{ … }
static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
static bool aspeed_p2a_region_acquire(struct aspeed_p2a_user *priv,
struct aspeed_p2a_ctrl *ctrl,
struct aspeed_p2a_ctrl_mapping *map)
{ … }
static long aspeed_p2a_ioctl(struct file *file, unsigned int cmd,
unsigned long data)
{ … }
static int aspeed_p2a_open(struct inode *inode, struct file *file)
{ … }
static int aspeed_p2a_release(struct inode *inode, struct file *file)
{ … }
static const struct file_operations aspeed_p2a_ctrl_fops = …;
static void aspeed_p2a_disable_all(struct aspeed_p2a_ctrl *p2a_ctrl)
{ … }
static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
{ … }
static void aspeed_p2a_ctrl_remove(struct platform_device *pdev)
{ … }
#define SCU2C_DRAM …
#define SCU2C_SPI …
#define SCU2C_SOC …
#define SCU2C_FLASH …
static const struct aspeed_p2a_model_data ast2400_model_data = …;
static const struct aspeed_p2a_model_data ast2500_model_data = …;
static const struct of_device_id aspeed_p2a_ctrl_match[] = …;
static struct platform_driver aspeed_p2a_ctrl_driver = …;
module_platform_driver(…) …;
MODULE_DEVICE_TABLE(of, aspeed_p2a_ctrl_match);
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;