pxa2xx_spi.h (1144B)
1/* SPDX-License-Identifier: GPL-2.0-or-later */ 2/* 3 * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs 4 */ 5#ifndef __LINUX_SPI_PXA2XX_SPI_H 6#define __LINUX_SPI_PXA2XX_SPI_H 7 8#include <linux/types.h> 9 10#include <linux/pxa2xx_ssp.h> 11 12struct dma_chan; 13 14/* 15 * The platform data for SSP controller devices 16 * (resides in device.platform_data). 17 */ 18struct pxa2xx_spi_controller { 19 u16 num_chipselect; 20 u8 enable_dma; 21 u8 dma_burst_size; 22 bool is_slave; 23 24 /* DMA engine specific config */ 25 bool (*dma_filter)(struct dma_chan *chan, void *param); 26 void *tx_param; 27 void *rx_param; 28 29 /* For non-PXA arches */ 30 struct ssp_device ssp; 31}; 32 33/* 34 * The controller specific data for SPI slave devices 35 * (resides in spi_board_info.controller_data), 36 * copied to spi_device.platform_data ... mostly for 37 * DMA tuning. 38 */ 39struct pxa2xx_spi_chip { 40 u8 tx_threshold; 41 u8 tx_hi_threshold; 42 u8 rx_threshold; 43 u8 dma_burst_size; 44 u32 timeout; 45}; 46 47#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP) 48 49#include <linux/clk.h> 50 51extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_controller *info); 52 53#endif 54 55#endif /* __LINUX_SPI_PXA2XX_SPI_H */