linux/drivers/net/can/c_can/c_can_platform.c

/*
 * Platform CAN bus driver for Bosch C_CAN controller
 *
 * Copyright (C) 2010 ST Microelectronics
 * Bhupesh Sharma <[email protected]>
 *
 * Borrowed heavily from the C_CAN driver originally written by:
 * Copyright (C) 2007
 * - Sascha Hauer, Marc Kleine-Budde, Pengutronix <[email protected]>
 * - Simon Kallweit, intefo AG <[email protected]>
 *
 * Bosch C_CAN controller is compliant to CAN protocol version 2.0 part A and B.
 * Bosch C_CAN user manual can be obtained from:
 * http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/c_can/
 * users_manual_c_can.pdf
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2. This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

#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);

/* 16-bit c_can registers can be arranged differently in the memory
 * architecture of different implementations. For example: 16-bit
 * registers can be aligned to a 16-bit boundary or 32-bit boundary etc.
 * Handle the same by providing a common read/write interface.
 */
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();