Lines Matching +full:spi +full:- +full:mode
7 * Copyright (c) 2003-2008 Cavium Networks
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 * This file contains defines for the SPI interface
35 #include <asm/octeon/cvmx-gmxx-defs.h>
37 /* CSR typedefs have been moved to cvmx-csr-*.h */
49 int (*reset_cb) (int interface, cvmx_spi_mode_t mode);
52 int (*calendar_setup_cb) (int interface, cvmx_spi_mode_t mode,
56 int (*clock_detect_cb) (int interface, cvmx_spi_mode_t mode,
60 int (*training_cb) (int interface, cvmx_spi_mode_t mode, int timeout);
63 int (*calendar_sync_cb) (int interface, cvmx_spi_mode_t mode,
67 int (*interface_up_cb) (int interface, cvmx_spi_mode_t mode);
72 * Return true if the supplied interface is configured for SPI
75 * Returns True if interface is SPI
84 * Initialize and start the SPI interface.
87 * use as a SPI interface.
88 * @mode: The operating mode for the SPI interface. The interface
93 * @num_ports: Number of SPI ports to configure
97 extern int cvmx_spi_start_interface(int interface, cvmx_spi_mode_t mode,
101 * This routine restarts the SPI interface after it has lost synchronization
105 * use as a SPI interface.
106 * @mode: The operating mode for the SPI interface. The interface
113 extern int cvmx_spi_restart_interface(int interface, cvmx_spi_mode_t mode,
117 * Return non-zero if the SPI interface has a SPI4000 attached
119 * @interface: SPI interface the SPI4000 is connected to
131 * @interface: SPI interface the SPI4000 is connected to
142 * @port: Port to poll (0-9)
174 * use as a SPI interface.
175 * @mode: The operating mode for the SPI interface. The interface
180 * Returns Zero on success, non-zero error code on failure (will cause
181 * SPI initialization to abort)
183 extern int cvmx_spi_reset_cb(int interface, cvmx_spi_mode_t mode);
190 * use as a SPI interface.
191 * @mode: The operating mode for the SPI interface. The interface
195 * @num_ports: Number of ports to configure on SPI
197 * Returns Zero on success, non-zero error code on failure (will cause
198 * SPI initialization to abort)
200 extern int cvmx_spi_calendar_setup_cb(int interface, cvmx_spi_mode_t mode,
207 * use as a SPI interface.
208 * @mode: The operating mode for the SPI interface. The interface
214 * Returns Zero on success, non-zero error code on failure (will cause
215 * SPI initialization to abort)
217 extern int cvmx_spi_clock_detect_cb(int interface, cvmx_spi_mode_t mode,
224 * use as a SPI interface.
225 * @mode: The operating mode for the SPI interface. The interface
231 * Returns Zero on success, non-zero error code on failure (will cause
232 * SPI initialization to abort)
234 extern int cvmx_spi_training_cb(int interface, cvmx_spi_mode_t mode,
241 * use as a SPI interface.
242 * @mode: The operating mode for the SPI interface. The interface
248 * Returns Zero on success, non-zero error code on failure (will cause
249 * SPI initialization to abort)
251 extern int cvmx_spi_calendar_sync_cb(int interface, cvmx_spi_mode_t mode,
258 * use as a SPI interface.
259 * @mode: The operating mode for the SPI interface. The interface
264 * Returns Zero on success, non-zero error code on failure (will cause
265 * SPI initialization to abort)
267 extern int cvmx_spi_interface_up_cb(int interface, cvmx_spi_mode_t mode);