Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Tony Lindgren | 120db2c | 2006-04-02 17:46:27 +0100 | [diff] [blame] | 2 | #ifndef _OMAP2_MCSPI_H |
| 3 | #define _OMAP2_MCSPI_H |
| 4 | |
Charulatha V | 617871d | 2011-02-17 09:53:09 -0800 | [diff] [blame] | 5 | #define OMAP2_MCSPI_REV 0 |
| 6 | #define OMAP3_MCSPI_REV 1 |
| 7 | #define OMAP4_MCSPI_REV 2 |
| 8 | |
Charulatha V | 1a5d819 | 2011-02-02 17:52:14 +0530 | [diff] [blame] | 9 | #define OMAP4_MCSPI_REG_OFFSET 0x100 |
| 10 | |
Daniel Mack | 2cd4517 | 2012-11-14 11:14:26 +0800 | [diff] [blame] | 11 | #define MCSPI_PINDIR_D0_IN_D1_OUT 0 |
| 12 | #define MCSPI_PINDIR_D0_OUT_D1_IN 1 |
Daniel Mack | 0384e90 | 2012-10-07 18:19:44 +0200 | [diff] [blame] | 13 | |
Tony Lindgren | 120db2c | 2006-04-02 17:46:27 +0100 | [diff] [blame] | 14 | struct omap2_mcspi_platform_config { |
Tony Lindgren | 120db2c | 2006-04-02 17:46:27 +0100 | [diff] [blame] | 15 | unsigned short num_cs; |
Charulatha V | 1a5d819 | 2011-02-02 17:52:14 +0530 | [diff] [blame] | 16 | unsigned int regs_offset; |
Daniel Mack | 0384e90 | 2012-10-07 18:19:44 +0200 | [diff] [blame] | 17 | unsigned int pin_dir:1; |
Tony Lindgren | 120db2c | 2006-04-02 17:46:27 +0100 | [diff] [blame] | 18 | }; |
| 19 | |
Charulatha V | 617871d | 2011-02-17 09:53:09 -0800 | [diff] [blame] | 20 | struct omap2_mcspi_dev_attr { |
| 21 | unsigned short num_chipselect; |
| 22 | }; |
| 23 | |
Tony Lindgren | 120db2c | 2006-04-02 17:46:27 +0100 | [diff] [blame] | 24 | struct omap2_mcspi_device_config { |
| 25 | unsigned turbo_mode:1; |
Matthias Brugger | 5cbc7ca | 2013-01-24 13:40:41 +0100 | [diff] [blame] | 26 | |
| 27 | /* toggle chip select after every word */ |
| 28 | unsigned cs_per_word:1; |
Tony Lindgren | 120db2c | 2006-04-02 17:46:27 +0100 | [diff] [blame] | 29 | }; |
| 30 | |
| 31 | #endif |