1*1802d0beSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 291d60417SSteven King /* 391d60417SSteven King * Definitions for Freescale Coldfire QSPI module 491d60417SSteven King * 591d60417SSteven King * Copyright 2010 Steven King <sfking@fdwdc.com> 691d60417SSteven King */ 791d60417SSteven King 891d60417SSteven King #ifndef mcfqspi_h 991d60417SSteven King #define mcfqspi_h 1091d60417SSteven King 1191d60417SSteven King /** 1291d60417SSteven King * struct mcfqspi_cs_control - chip select control for the coldfire qspi driver 1391d60417SSteven King * @setup: setup the control; allocate gpio's, etc. May be NULL. 1491d60417SSteven King * @teardown: finish with the control; free gpio's, etc. May be NULL. 1591d60417SSteven King * @select: output the signals to select the device. Can not be NULL. 1691d60417SSteven King * @deselect: output the signals to deselect the device. Can not be NULL. 1791d60417SSteven King * 1891d60417SSteven King * The QSPI module has 4 hardware chip selects. We don't use them. Instead 1991d60417SSteven King * platforms are required to supply a mcfqspi_cs_control as a part of the 2091d60417SSteven King * platform data for each QSPI master controller. Only the select and 2191d60417SSteven King * deselect functions are required. 2291d60417SSteven King */ 2391d60417SSteven King struct mcfqspi_cs_control { 2491d60417SSteven King int (*setup)(struct mcfqspi_cs_control *); 2591d60417SSteven King void (*teardown)(struct mcfqspi_cs_control *); 2691d60417SSteven King void (*select)(struct mcfqspi_cs_control *, u8, bool); 2791d60417SSteven King void (*deselect)(struct mcfqspi_cs_control *, u8, bool); 2891d60417SSteven King }; 2991d60417SSteven King 3091d60417SSteven King /** 3191d60417SSteven King * struct mcfqspi_platform_data - platform data for the coldfire qspi driver 3291d60417SSteven King * @bus_num: board specific identifier for this qspi driver. 3391d60417SSteven King * @num_chipselects: number of chip selects supported by this qspi driver. 3491d60417SSteven King * @cs_control: platform dependent chip select control. 3591d60417SSteven King */ 3691d60417SSteven King struct mcfqspi_platform_data { 3791d60417SSteven King s16 bus_num; 3891d60417SSteven King u16 num_chipselect; 3991d60417SSteven King struct mcfqspi_cs_control *cs_control; 4091d60417SSteven King }; 4191d60417SSteven King 4291d60417SSteven King #endif /* mcfqspi_h */ 43