aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/can/platform
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/can/platform')
-rw-r--r--include/linux/can/platform/mcp251x.h36
-rw-r--r--include/linux/can/platform/ti_hecc.h44
2 files changed, 80 insertions, 0 deletions
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h
new file mode 100644
index 000000000000..1448177d86d5
--- /dev/null
+++ b/include/linux/can/platform/mcp251x.h
@@ -0,0 +1,36 @@
1#ifndef __CAN_PLATFORM_MCP251X_H__
2#define __CAN_PLATFORM_MCP251X_H__
3
4/*
5 *
6 * CAN bus driver for Microchip 251x CAN Controller with SPI Interface
7 *
8 */
9
10#include <linux/spi/spi.h>
11
12/**
13 * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data
14 * @oscillator_frequency: - oscillator frequency in Hz
15 * @model: - actual type of chip
16 * @board_specific_setup: - called before probing the chip (power,reset)
17 * @transceiver_enable: - called to power on/off the transceiver
18 * @power_enable: - called to power on/off the mcp *and* the
19 * transceiver
20 *
21 * Please note that you should define power_enable or transceiver_enable or
22 * none of them. Defining both of them is no use.
23 *
24 */
25
26struct mcp251x_platform_data {
27 unsigned long oscillator_frequency;
28 int model;
29#define CAN_MCP251X_MCP2510 0
30#define CAN_MCP251X_MCP2515 1
31 int (*board_specific_setup)(struct spi_device *spi);
32 int (*transceiver_enable)(int enable);
33 int (*power_enable) (int enable);
34};
35
36#endif /* __CAN_PLATFORM_MCP251X_H__ */
diff --git a/include/linux/can/platform/ti_hecc.h b/include/linux/can/platform/ti_hecc.h
new file mode 100644
index 000000000000..af17cb3f7a84
--- /dev/null
+++ b/include/linux/can/platform/ti_hecc.h
@@ -0,0 +1,44 @@
1#ifndef __CAN_PLATFORM_TI_HECC_H__
2#define __CAN_PLATFORM_TI_HECC_H__
3
4/*
5 * TI HECC (High End CAN Controller) driver platform header
6 *
7 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation version 2.
12 *
13 * This program is distributed as is WITHOUT ANY WARRANTY of any
14 * kind, whether express or implied; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 */
19
20/**
21 * struct hecc_platform_data - HECC Platform Data
22 *
23 * @scc_hecc_offset: mostly 0 - should really never change
24 * @scc_ram_offset: SCC RAM offset
25 * @hecc_ram_offset: HECC RAM offset
26 * @mbx_offset: Mailbox RAM offset
27 * @int_line: Interrupt line to use - 0 or 1
28 * @version: version for future use
29 * @transceiver_switch: platform specific callback fn for transceiver control
30 *
31 * Platform data structure to get all platform specific settings.
32 * this structure also accounts the fact that the IP may have different
33 * RAM and mailbox offsets for different SOC's
34 */
35struct ti_hecc_platform_data {
36 u32 scc_hecc_offset;
37 u32 scc_ram_offset;
38 u32 hecc_ram_offset;
39 u32 mbx_offset;
40 u32 int_line;
41 u32 version;
42 void (*transceiver_switch) (int);
43};
44#endif