Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
43 lines
1.4 KiB
C
43 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Definitions for Freescale Coldfire QSPI module
|
|
*
|
|
* Copyright 2010 Steven King <sfking@fdwdc.com>
|
|
*/
|
|
|
|
#ifndef mcfqspi_h
|
|
#define mcfqspi_h
|
|
|
|
/**
|
|
* struct mcfqspi_cs_control - chip select control for the coldfire qspi driver
|
|
* @setup: setup the control; allocate gpio's, etc. May be NULL.
|
|
* @teardown: finish with the control; free gpio's, etc. May be NULL.
|
|
* @select: output the signals to select the device. Can not be NULL.
|
|
* @deselect: output the signals to deselect the device. Can not be NULL.
|
|
*
|
|
* The QSPI module has 4 hardware chip selects. We don't use them. Instead
|
|
* platforms are required to supply a mcfqspi_cs_control as a part of the
|
|
* platform data for each QSPI master controller. Only the select and
|
|
* deselect functions are required.
|
|
*/
|
|
struct mcfqspi_cs_control {
|
|
int (*setup)(struct mcfqspi_cs_control *);
|
|
void (*teardown)(struct mcfqspi_cs_control *);
|
|
void (*select)(struct mcfqspi_cs_control *, u8, bool);
|
|
void (*deselect)(struct mcfqspi_cs_control *, u8, bool);
|
|
};
|
|
|
|
/**
|
|
* struct mcfqspi_platform_data - platform data for the coldfire qspi driver
|
|
* @bus_num: board specific identifier for this qspi driver.
|
|
* @num_chipselects: number of chip selects supported by this qspi driver.
|
|
* @cs_control: platform dependent chip select control.
|
|
*/
|
|
struct mcfqspi_platform_data {
|
|
s16 bus_num;
|
|
u16 num_chipselect;
|
|
struct mcfqspi_cs_control *cs_control;
|
|
};
|
|
|
|
#endif /* mcfqspi_h */
|