Commit 90366cd6 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mark Brown

spi: Get rid of old SPI_MASTER_MUST_TX & SPI_MASTER_MUST_RX

Convert the users from SPI_MASTER_MUST_TX and/or SPI_MASTER_MUST_RX
to SPI_CONTROLLER_MUST_TX and/or SPI_CONTROLLER_MUST_RX respectively
and kill the not used anymore definitions.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230710154932.68377-13-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c397f09e
...@@ -527,7 +527,7 @@ static int at91_usart_spi_probe(struct platform_device *pdev) ...@@ -527,7 +527,7 @@ static int at91_usart_spi_probe(struct platform_device *pdev)
controller->dev.of_node = pdev->dev.parent->of_node; controller->dev.of_node = pdev->dev.parent->of_node;
controller->bits_per_word_mask = SPI_BPW_MASK(8); controller->bits_per_word_mask = SPI_BPW_MASK(8);
controller->setup = at91_usart_spi_setup; controller->setup = at91_usart_spi_setup;
controller->flags = SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX; controller->flags = SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX;
controller->transfer_one = at91_usart_spi_transfer_one; controller->transfer_one = at91_usart_spi_transfer_one;
controller->prepare_message = at91_usart_spi_prepare_message; controller->prepare_message = at91_usart_spi_prepare_message;
controller->unprepare_message = at91_usart_spi_unprepare_message; controller->unprepare_message = at91_usart_spi_unprepare_message;
......
...@@ -1475,7 +1475,7 @@ static int atmel_spi_probe(struct platform_device *pdev) ...@@ -1475,7 +1475,7 @@ static int atmel_spi_probe(struct platform_device *pdev)
host->bus_num = pdev->id; host->bus_num = pdev->id;
host->num_chipselect = 4; host->num_chipselect = 4;
host->setup = atmel_spi_setup; host->setup = atmel_spi_setup;
host->flags = (SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX | host->flags = (SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX |
SPI_MASTER_GPIO_SS); SPI_MASTER_GPIO_SS);
host->transfer_one = atmel_spi_one_transfer; host->transfer_one = atmel_spi_one_transfer;
host->set_cs = atmel_spi_set_cs; host->set_cs = atmel_spi_set_cs;
......
...@@ -939,7 +939,7 @@ static int davinci_spi_probe(struct platform_device *pdev) ...@@ -939,7 +939,7 @@ static int davinci_spi_probe(struct platform_device *pdev)
master->bus_num = pdev->id; master->bus_num = pdev->id;
master->num_chipselect = pdata->num_chipselect; master->num_chipselect = pdata->num_chipselect;
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16); master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16);
master->flags = SPI_MASTER_MUST_RX | SPI_MASTER_GPIO_SS; master->flags = SPI_CONTROLLER_MUST_RX | SPI_MASTER_GPIO_SS;
master->setup = davinci_spi_setup; master->setup = davinci_spi_setup;
master->cleanup = davinci_spi_cleanup; master->cleanup = davinci_spi_cleanup;
master->can_dma = davinci_spi_can_dma; master->can_dma = davinci_spi_can_dma;
......
...@@ -856,7 +856,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev) ...@@ -856,7 +856,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
controller->prepare_transfer_hardware = lpspi_prepare_xfer_hardware; controller->prepare_transfer_hardware = lpspi_prepare_xfer_hardware;
controller->unprepare_transfer_hardware = lpspi_unprepare_xfer_hardware; controller->unprepare_transfer_hardware = lpspi_unprepare_xfer_hardware;
controller->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; controller->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
controller->flags = SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX; controller->flags = SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX;
controller->dev.of_node = pdev->dev.of_node; controller->dev.of_node = pdev->dev.of_node;
controller->bus_num = pdev->id; controller->bus_num = pdev->id;
controller->num_chipselect = fsl_lpspi->num_cs; controller->num_chipselect = fsl_lpspi->num_cs;
......
...@@ -864,7 +864,7 @@ static int meson_spicc_probe(struct platform_device *pdev) ...@@ -864,7 +864,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
SPI_BPW_MASK(24) | SPI_BPW_MASK(24) |
SPI_BPW_MASK(16) | SPI_BPW_MASK(16) |
SPI_BPW_MASK(8); SPI_BPW_MASK(8);
master->flags = (SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX); master->flags = (SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX);
master->min_speed_hz = spicc->data->min_speed_hz; master->min_speed_hz = spicc->data->min_speed_hz;
master->max_speed_hz = spicc->data->max_speed_hz; master->max_speed_hz = spicc->data->max_speed_hz;
master->setup = meson_spicc_setup; master->setup = meson_spicc_setup;
......
...@@ -1142,7 +1142,7 @@ static int mtk_spi_probe(struct platform_device *pdev) ...@@ -1142,7 +1142,7 @@ static int mtk_spi_probe(struct platform_device *pdev)
master->mode_bits |= SPI_CS_HIGH; master->mode_bits |= SPI_CS_HIGH;
if (mdata->dev_comp->must_tx) if (mdata->dev_comp->must_tx)
master->flags = SPI_MASTER_MUST_TX; master->flags = SPI_CONTROLLER_MUST_TX;
if (mdata->dev_comp->ipm_design) if (mdata->dev_comp->ipm_design)
master->mode_bits |= SPI_LOOP | SPI_RX_DUAL | SPI_TX_DUAL | master->mode_bits |= SPI_LOOP | SPI_RX_DUAL | SPI_TX_DUAL |
SPI_RX_QUAD | SPI_TX_QUAD; SPI_RX_QUAD | SPI_TX_QUAD;
......
...@@ -365,7 +365,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id * ...@@ -365,7 +365,7 @@ static int pci1xxxx_spi_probe(struct pci_dev *pdev, const struct pci_device_id *
spi_host->bits_per_word_mask = SPI_BPW_MASK(8); spi_host->bits_per_word_mask = SPI_BPW_MASK(8);
spi_host->max_speed_hz = PCI1XXXX_SPI_MAX_CLOCK_HZ; spi_host->max_speed_hz = PCI1XXXX_SPI_MAX_CLOCK_HZ;
spi_host->min_speed_hz = PCI1XXXX_SPI_MIN_CLOCK_HZ; spi_host->min_speed_hz = PCI1XXXX_SPI_MIN_CLOCK_HZ;
spi_host->flags = SPI_MASTER_MUST_TX; spi_host->flags = SPI_CONTROLLER_MUST_TX;
spi_master_set_devdata(spi_host, spi_sub_ptr); spi_master_set_devdata(spi_host, spi_sub_ptr);
ret = devm_spi_register_master(dev, spi_host); ret = devm_spi_register_master(dev, spi_host);
if (ret) if (ret)
......
...@@ -773,7 +773,7 @@ static int pic32_spi_probe(struct platform_device *pdev) ...@@ -773,7 +773,7 @@ static int pic32_spi_probe(struct platform_device *pdev)
master->max_speed_hz = clk_get_rate(pic32s->clk); master->max_speed_hz = clk_get_rate(pic32s->clk);
master->setup = pic32_spi_setup; master->setup = pic32_spi_setup;
master->cleanup = pic32_spi_cleanup; master->cleanup = pic32_spi_cleanup;
master->flags = SPI_MASTER_MUST_TX | SPI_MASTER_MUST_RX; master->flags = SPI_CONTROLLER_MUST_TX | SPI_CONTROLLER_MUST_RX;
master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(16) | master->bits_per_word_mask = SPI_BPW_MASK(8) | SPI_BPW_MASK(16) |
SPI_BPW_MASK(32); SPI_BPW_MASK(32);
master->transfer_one = pic32_spi_one_transfer; master->transfer_one = pic32_spi_one_transfer;
......
...@@ -156,7 +156,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev) ...@@ -156,7 +156,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
master->num_chipselect = 3; master->num_chipselect = 3;
master->mode_bits = SPI_TX_DUAL; master->mode_bits = SPI_TX_DUAL;
master->bits_per_word_mask = SPI_BPW_MASK(8); master->bits_per_word_mask = SPI_BPW_MASK(8);
master->flags = SPI_MASTER_MUST_TX; master->flags = SPI_CONTROLLER_MUST_TX;
master->transfer_one = rb4xx_transfer_one; master->transfer_one = rb4xx_transfer_one;
master->set_cs = rb4xx_set_cs; master->set_cs = rb4xx_set_cs;
......
...@@ -414,7 +414,7 @@ static int mtk_spi_slave_probe(struct platform_device *pdev) ...@@ -414,7 +414,7 @@ static int mtk_spi_slave_probe(struct platform_device *pdev)
mdata->dev_comp = of_id->data; mdata->dev_comp = of_id->data;
if (mdata->dev_comp->must_rx) if (mdata->dev_comp->must_rx)
ctlr->flags = SPI_MASTER_MUST_RX; ctlr->flags = SPI_CONTROLLER_MUST_RX;
platform_set_drvdata(pdev, ctlr); platform_set_drvdata(pdev, ctlr);
......
...@@ -1750,7 +1750,7 @@ static const struct stm32_spi_cfg stm32f4_spi_cfg = { ...@@ -1750,7 +1750,7 @@ static const struct stm32_spi_cfg stm32f4_spi_cfg = {
.baud_rate_div_min = STM32F4_SPI_BR_DIV_MIN, .baud_rate_div_min = STM32F4_SPI_BR_DIV_MIN,
.baud_rate_div_max = STM32F4_SPI_BR_DIV_MAX, .baud_rate_div_max = STM32F4_SPI_BR_DIV_MAX,
.has_fifo = false, .has_fifo = false,
.flags = SPI_MASTER_MUST_TX, .flags = SPI_CONTROLLER_MUST_TX,
}; };
static const struct stm32_spi_cfg stm32h7_spi_cfg = { static const struct stm32_spi_cfg stm32h7_spi_cfg = {
......
...@@ -1623,8 +1623,6 @@ spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer) ...@@ -1623,8 +1623,6 @@ spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer)
#define spi_master spi_controller #define spi_master spi_controller
#define SPI_MASTER_HALF_DUPLEX SPI_CONTROLLER_HALF_DUPLEX #define SPI_MASTER_HALF_DUPLEX SPI_CONTROLLER_HALF_DUPLEX
#define SPI_MASTER_MUST_RX SPI_CONTROLLER_MUST_RX
#define SPI_MASTER_MUST_TX SPI_CONTROLLER_MUST_TX
#define spi_master_get_devdata(_ctlr) spi_controller_get_devdata(_ctlr) #define spi_master_get_devdata(_ctlr) spi_controller_get_devdata(_ctlr)
#define spi_master_set_devdata(_ctlr, _data) \ #define spi_master_set_devdata(_ctlr, _data) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment