#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/list.h>
#include <linux/io.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/property.h>
#include <linux/clk.h>
#include <linux/of.h>
#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
#include <linux/can/dev.h>
#include "c_can.h"
#define DCAN_RAM_INIT_BIT …
static DEFINE_SPINLOCK(raminit_lock);
static u16 c_can_plat_read_reg_aligned_to_16bit(const struct c_can_priv *priv,
enum reg index)
{ … }
static void c_can_plat_write_reg_aligned_to_16bit(const struct c_can_priv *priv,
enum reg index, u16 val)
{ … }
static u16 c_can_plat_read_reg_aligned_to_32bit(const struct c_can_priv *priv,
enum reg index)
{ … }
static void c_can_plat_write_reg_aligned_to_32bit(const struct c_can_priv *priv,
enum reg index, u16 val)
{ … }
static void c_can_hw_raminit_wait_syscon(const struct c_can_priv *priv,
u32 mask, u32 val)
{ … }
static void c_can_hw_raminit_syscon(const struct c_can_priv *priv, bool enable)
{ … }
static u32 c_can_plat_read_reg32(const struct c_can_priv *priv, enum reg index)
{ … }
static void c_can_plat_write_reg32(const struct c_can_priv *priv,
enum reg index, u32 val)
{ … }
static u32 d_can_plat_read_reg32(const struct c_can_priv *priv, enum reg index)
{ … }
static void d_can_plat_write_reg32(const struct c_can_priv *priv,
enum reg index, u32 val)
{ … }
static void c_can_hw_raminit_wait(const struct c_can_priv *priv, u32 mask)
{ … }
static void c_can_hw_raminit(const struct c_can_priv *priv, bool enable)
{ … }
static const struct c_can_driver_data c_can_drvdata = …;
static const struct c_can_driver_data d_can_drvdata = …;
static const struct raminit_bits dra7_raminit_bits[] = …;
static const struct c_can_driver_data dra7_dcan_drvdata = …;
static const struct raminit_bits am3352_raminit_bits[] = …;
static const struct c_can_driver_data am3352_dcan_drvdata = …;
static const struct platform_device_id c_can_id_table[] = …;
MODULE_DEVICE_TABLE(platform, c_can_id_table);
static const struct of_device_id c_can_of_table[] = …;
MODULE_DEVICE_TABLE(of, c_can_of_table);
static int c_can_plat_probe(struct platform_device *pdev)
{ … }
static void c_can_plat_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int c_can_suspend(struct platform_device *pdev, pm_message_t state)
{ … }
static int c_can_resume(struct platform_device *pdev)
{ … }
#else
#define c_can_suspend …
#define c_can_resume …
#endif
static struct platform_driver c_can_plat_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;