From 4bd6adb725c71be6e94d25b722e82171c6b33c4b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 23 Jan 2016 15:09:38 -0600 Subject: [PATCH] Add dummy hwfeatures method to all SPI interfaces --- arch/arm/src/calypso/calypso_spi.c | 3 +++ arch/arm/src/efm32/efm32_spi.c | 3 +++ arch/arm/src/imx/imx_spi.c | 3 +++ arch/arm/src/kl/kl_spi.c | 5 ++++- arch/arm/src/lpc11xx/lpc11_spi.c | 3 +++ arch/arm/src/lpc11xx/lpc11_ssp.c | 3 +++ arch/arm/src/lpc17xx/lpc17_spi.c | 3 +++ arch/arm/src/lpc17xx/lpc17_ssp.c | 3 +++ arch/arm/src/lpc2378/lpc23xx_spi.c | 3 +++ arch/arm/src/lpc31xx/lpc31_spi.c | 5 ++++- arch/arm/src/lpc43xx/lpc43_spi.c | 3 +++ arch/arm/src/lpc43xx/lpc43_ssp.c | 3 +++ arch/arm/src/sam34/sam_spi.c | 3 +++ arch/arm/src/sama5/sam_spi.c | 3 +++ arch/arm/src/samdl/sam_spi.c | 3 +++ arch/arm/src/samv7/sam_spi.c | 3 +++ arch/arm/src/stm32/stm32_spi.c | 7 +++++-- arch/arm/src/tiva/tiva_ssi.c | 3 +++ arch/avr/src/avr/up_spi.c | 3 +++ arch/mips/src/pic32mx/pic32mx-spi.c | 3 +++ arch/mips/src/pic32mz/pic32mz-spi.c | 3 +++ arch/sim/src/up_spiflash.c | 3 +++ arch/z16/src/z16f/z16f_espi.c | 3 +++ arch/z80/src/ez80/ez80_spi.c | 11 +++++++---- 24 files changed, 80 insertions(+), 8 deletions(-) diff --git a/arch/arm/src/calypso/calypso_spi.c b/arch/arm/src/calypso/calypso_spi.c index b33b08b133..e58feeebfe 100644 --- a/arch/arm/src/calypso/calypso_spi.c +++ b/arch/arm/src/calypso/calypso_spi.c @@ -124,6 +124,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, +#endif .status = 0, #ifdef CONFIG_SPI_CMDDATA .cmddata = , diff --git a/arch/arm/src/efm32/efm32_spi.c b/arch/arm/src/efm32/efm32_spi.c index 888ea06248..2f867cfde2 100644 --- a/arch/arm/src/efm32/efm32_spi.c +++ b/arch/arm/src/efm32/efm32_spi.c @@ -243,6 +243,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, +#endif .status = spi_status, #ifdef CONFIG_SPI_CMDDATA .cmddata = spi_cmddata, diff --git a/arch/arm/src/imx/imx_spi.c b/arch/arm/src/imx/imx_spi.c index a43df8c784..162c09759c 100644 --- a/arch/arm/src/imx/imx_spi.c +++ b/arch/arm/src/imx/imx_spi.c @@ -196,6 +196,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = imx_spistatus, /* Provided externally by board logic */ #ifdef CONFIG_SPI_CMDDATA .cmddata = imx_spicmddata, diff --git a/arch/arm/src/kl/kl_spi.c b/arch/arm/src/kl/kl_spi.c index d7ac25c528..4813e08f7d 100644 --- a/arch/arm/src/kl/kl_spi.c +++ b/arch/arm/src/kl/kl_spi.c @@ -141,6 +141,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = kl_spi0status, #ifdef CONFIG_SPI_CMDDATA .cmddata = kl_spi0cmddata, @@ -152,7 +155,7 @@ static const struct spi_ops_s g_spi0ops = .sndblock = spi_sndblock, .recvblock = spi_recvblock, #endif - .registercallback = 0, + .registercallback = 0, /* Not supported */ }; static struct kl_spidev_s g_spi0dev = diff --git a/arch/arm/src/lpc11xx/lpc11_spi.c b/arch/arm/src/lpc11xx/lpc11_spi.c index 734923bac9..7e9e079c61 100644 --- a/arch/arm/src/lpc11xx/lpc11_spi.c +++ b/arch/arm/src/lpc11xx/lpc11_spi.c @@ -157,6 +157,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = lpc11_spistatus, #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc11_spicmddata, diff --git a/arch/arm/src/lpc11xx/lpc11_ssp.c b/arch/arm/src/lpc11xx/lpc11_ssp.c index 764a50d139..5c815e5107 100644 --- a/arch/arm/src/lpc11xx/lpc11_ssp.c +++ b/arch/arm/src/lpc11xx/lpc11_ssp.c @@ -193,6 +193,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = ssp_setfrequency, .setmode = ssp_setmode, .setbits = ssp_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = lpc11_ssp0status, /* Provided externally */ #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc11_ssp0cmddata, /* Provided externally */ diff --git a/arch/arm/src/lpc17xx/lpc17_spi.c b/arch/arm/src/lpc17xx/lpc17_spi.c index dfc35251d6..cbb4ae5168 100644 --- a/arch/arm/src/lpc17xx/lpc17_spi.c +++ b/arch/arm/src/lpc17xx/lpc17_spi.c @@ -153,6 +153,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = lpc17_spistatus, #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc17_spicmddata, diff --git a/arch/arm/src/lpc17xx/lpc17_ssp.c b/arch/arm/src/lpc17xx/lpc17_ssp.c index 6036678423..9e8165fa12 100644 --- a/arch/arm/src/lpc17xx/lpc17_ssp.c +++ b/arch/arm/src/lpc17xx/lpc17_ssp.c @@ -191,6 +191,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = ssp_setfrequency, .setmode = ssp_setmode, .setbits = ssp_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = lpc17_ssp0status, /* Provided externally */ #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc17_ssp0cmddata, /* Provided externally */ diff --git a/arch/arm/src/lpc2378/lpc23xx_spi.c b/arch/arm/src/lpc2378/lpc23xx_spi.c index afc6f5860d..583aa44c2b 100644 --- a/arch/arm/src/lpc2378/lpc23xx_spi.c +++ b/arch/arm/src/lpc2378/lpc23xx_spi.c @@ -155,6 +155,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = lpc23xx_spistatus, #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc23xx_spicmddata, diff --git a/arch/arm/src/lpc31xx/lpc31_spi.c b/arch/arm/src/lpc31xx/lpc31_spi.c index 3556b3597c..725fbce1bc 100644 --- a/arch/arm/src/lpc31xx/lpc31_spi.c +++ b/arch/arm/src/lpc31xx/lpc31_spi.c @@ -142,6 +142,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = spi_status, #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc31_spicmddata, @@ -153,7 +156,7 @@ static const struct spi_ops_s g_spiops = .sndblock = spi_sndblock, .recvblock = spi_recvblock, #endif - .registercallback = 0, + .registercallback = 0, /* Not supported */ }; static struct lpc31_spidev_s g_spidev = diff --git a/arch/arm/src/lpc43xx/lpc43_spi.c b/arch/arm/src/lpc43xx/lpc43_spi.c index 05859e39c0..db49a900e0 100644 --- a/arch/arm/src/lpc43xx/lpc43_spi.c +++ b/arch/arm/src/lpc43xx/lpc43_spi.c @@ -143,6 +143,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = lpc43_spistatus, #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc43_spicmddata, diff --git a/arch/arm/src/lpc43xx/lpc43_ssp.c b/arch/arm/src/lpc43xx/lpc43_ssp.c index 2e37d96261..6513275c93 100644 --- a/arch/arm/src/lpc43xx/lpc43_ssp.c +++ b/arch/arm/src/lpc43xx/lpc43_ssp.c @@ -161,6 +161,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = ssp_setfrequency, .setmode = ssp_setmode, .setbits = ssp_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = lpc43_ssp0status, /* Provided externally */ #ifdef CONFIG_SPI_CMDDATA .cmddata = lpc43_ssp0cmddata, /* Provided externally */ diff --git a/arch/arm/src/sam34/sam_spi.c b/arch/arm/src/sam34/sam_spi.c index 706178c925..02e6b59ca5 100644 --- a/arch/arm/src/sam34/sam_spi.c +++ b/arch/arm/src/sam34/sam_spi.c @@ -334,6 +334,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = sam_spi0status, #ifdef CONFIG_SPI_CMDDATA .cmddata = sam_spi0cmddata, diff --git a/arch/arm/src/sama5/sam_spi.c b/arch/arm/src/sama5/sam_spi.c index 812120d04c..9c970b2d8a 100644 --- a/arch/arm/src/sama5/sam_spi.c +++ b/arch/arm/src/sama5/sam_spi.c @@ -326,6 +326,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = sam_spi0status, #ifdef CONFIG_SPI_CMDDATA .cmddata = sam_spi0cmddata, diff --git a/arch/arm/src/samdl/sam_spi.c b/arch/arm/src/samdl/sam_spi.c index cce36cf9e8..70fe0c06f0 100644 --- a/arch/arm/src/samdl/sam_spi.c +++ b/arch/arm/src/samdl/sam_spi.c @@ -246,6 +246,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = sam_spi0status, #ifdef CONFIG_SPI_CMDDATA .cmddata = sam_spi0cmddata, diff --git a/arch/arm/src/samv7/sam_spi.c b/arch/arm/src/samv7/sam_spi.c index a97ced37dd..cb17fbd1e2 100644 --- a/arch/arm/src/samv7/sam_spi.c +++ b/arch/arm/src/samv7/sam_spi.c @@ -321,6 +321,9 @@ static const struct spi_ops_s g_spi0ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = sam_spi0status, #ifdef CONFIG_SPI_CMDDATA .cmddata = sam_spi0cmddata, diff --git a/arch/arm/src/stm32/stm32_spi.c b/arch/arm/src/stm32/stm32_spi.c index b7279ebab9..7ada7d1935 100644 --- a/arch/arm/src/stm32/stm32_spi.c +++ b/arch/arm/src/stm32/stm32_spi.c @@ -274,6 +274,9 @@ static const struct spi_ops_s g_sp1iops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = stm32_spi1status, #ifdef CONFIG_SPI_CMDDATA .cmddata = stm32_spi1cmddata, @@ -286,9 +289,9 @@ static const struct spi_ops_s g_sp1iops = .recvblock = spi_recvblock, #endif #ifdef CONFIG_SPI_CALLBACK - .registercallback = stm32_spi1register, /* provided externally */ + .registercallback = stm32_spi1register, /* Provided externally */ #else - .registercallback = 0, /* not implemented */ + .registercallback = 0, /* Not implemented */ #endif }; diff --git a/arch/arm/src/tiva/tiva_ssi.c b/arch/arm/src/tiva/tiva_ssi.c index aba7bcf80c..d8b79654bb 100644 --- a/arch/arm/src/tiva/tiva_ssi.c +++ b/arch/arm/src/tiva/tiva_ssi.c @@ -318,6 +318,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = ssi_setfrequency, .setmode = ssi_setmode, .setbits = ssi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = tiva_spistatus, /* Provided externally by board logic */ #ifdef CONFIG_SPI_CMDDATA .cmddata = tiva_spicmddata, diff --git a/arch/avr/src/avr/up_spi.c b/arch/avr/src/avr/up_spi.c index edf4487d11..590544508f 100644 --- a/arch/avr/src/avr/up_spi.c +++ b/arch/avr/src/avr/up_spi.c @@ -127,6 +127,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = avr_spistatus, #ifdef CONFIG_SPI_CMDDATA .cmddata = avr_spicmddata, diff --git a/arch/mips/src/pic32mx/pic32mx-spi.c b/arch/mips/src/pic32mx/pic32mx-spi.c index 49be87a16a..937fad6865 100644 --- a/arch/mips/src/pic32mx/pic32mx-spi.c +++ b/arch/mips/src/pic32mx/pic32mx-spi.c @@ -147,6 +147,9 @@ static const struct spi_ops_s g_spi1ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = pic32mx_spi1status, #ifdef CONFIG_SPI_CMDDATA .cmddata = pic32mx_spi1cmddata, diff --git a/arch/mips/src/pic32mz/pic32mz-spi.c b/arch/mips/src/pic32mz/pic32mz-spi.c index 075a47c30d..f28cfb4468 100644 --- a/arch/mips/src/pic32mz/pic32mz-spi.c +++ b/arch/mips/src/pic32mz/pic32mz-spi.c @@ -184,6 +184,9 @@ static const struct spi_ops_s g_spi1ops = .setfrequency = spi_setfrequency, .setmode = spi_setmode, .setbits = spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = pic32mz_spi1status, #ifdef CONFIG_SPI_CMDDATA .cmddata = pic32mz_spi1cmddata, diff --git a/arch/sim/src/up_spiflash.c b/arch/sim/src/up_spiflash.c index 4e378b5457..81bd7c0785 100644 --- a/arch/sim/src/up_spiflash.c +++ b/arch/sim/src/up_spiflash.c @@ -242,6 +242,9 @@ static const struct spi_ops_s g_spiops = .setfrequency = spiflash_setfrequency, .setmode = spiflash_setmode, .setbits = spiflash_setbits, +#ifdef CONFIG_SPI_HWFEATURES + .hwfeatures = 0, /* Not supported */ +#endif .status = spiflash_status, #ifdef CONFIG_SPI_CMDDATA .cmddata = spiflash_cmddata, diff --git a/arch/z16/src/z16f/z16f_espi.c b/arch/z16/src/z16f/z16f_espi.c index 3ba9118c6f..0efaf3ed55 100644 --- a/arch/z16/src/z16f/z16f_espi.c +++ b/arch/z16/src/z16f/z16f_espi.c @@ -169,6 +169,9 @@ static const struct spi_ops_s g_epsiops = spi_setfrequency, spi_setmode, spi_setbits, +#ifdef CONFIG_SPI_HWFEATURES + NULL, /* hwfeatures: Not supported */ +#endif z16f_espi_status, #ifdef CONFIG_SPI_CMDDATA z16f_espi_cmddata, diff --git a/arch/z80/src/ez80/ez80_spi.c b/arch/z80/src/ez80/ez80_spi.c index e2c15e5bb2..5b922163ba 100644 --- a/arch/z80/src/ez80/ez80_spi.c +++ b/arch/z80/src/ez80/ez80_spi.c @@ -89,18 +89,21 @@ static const struct spi_ops_s g_spiops = #ifndef CONFIG_SPI_OWNBUS spi_lock, #endif - ez80_spiselect, /* Provided externally by board logic */ + ez80_spiselect, /* select: Provided externally by board logic */ spi_setfrequency, spi_setmode, - NULL, /* Variable number of bits not implemented */ - ez80_spistatus, /* Provided externally by board logic */ + NULL, /* setbits: Variable number of bits not implemented */ +#ifdef CONFIG_SPI_HWFEATURES + NULL, /* hwfeatures: Not supported */ +#endif + ez80_spistatus, /* status: Provided externally by board logic */ #ifdef CONFIG_SPI_CMDDATA ez80_spicmddata, #endif spi_send, spi_sndblock, spi_recvblock, - 0 /* registercallback not yet implemented */ + 0 /* registercallback: Not yet implemented */ }; /* This supports is only a single SPI bus/port. If you port this to an