diff options
Diffstat (limited to 'target/linux/ath79')
5 files changed, 3 insertions, 148 deletions
diff --git a/target/linux/ath79/patches-5.10/0033-spi-ath79-drop-pdata-support.patch b/target/linux/ath79/patches-5.10/0033-spi-ath79-drop-pdata-support.patch index 8fd99bd333..162a82bda3 100644 --- a/target/linux/ath79/patches-5.10/0033-spi-ath79-drop-pdata-support.patch +++ b/target/linux/ath79/patches-5.10/0033-spi-ath79-drop-pdata-support.patch @@ -52,7 +52,7 @@ Signed-off-by: John Crispin <john@phrozen.org> unsigned long rate; int ret; -@@ -152,16 +150,10 @@ static int ath79_spi_probe(struct platfo +@@ -152,15 +150,9 @@ static int ath79_spi_probe(struct platfo master->dev.of_node = pdev->dev.of_node; platform_set_drvdata(pdev, sp); @@ -60,8 +60,7 @@ Signed-off-by: John Crispin <john@phrozen.org> - master->use_gpio_descriptors = true; master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); - master->setup = spi_bitbang_setup; - master->cleanup = spi_bitbang_cleanup; + master->flags = SPI_MASTER_GPIO_SS; - if (pdata) { - master->bus_num = pdata->bus_num; - master->num_chipselect = pdata->num_chipselect; diff --git a/target/linux/ath79/patches-5.10/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch b/target/linux/ath79/patches-5.10/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch deleted file mode 100644 index a57ac24f29..0000000000 --- a/target/linux/ath79/patches-5.10/0050-spi-ath79-remove-spi-master-setup-and-cleanup-assign.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b142b1beb199f62d47370c98a3dd8e13f792e9c0 Mon Sep 17 00:00:00 2001 -From: David Bauer <mail@david-bauer.net> -Date: Thu, 27 Feb 2020 23:03:20 +0100 -Subject: [PATCH] spi: ath79: remove spi-master setup and cleanup assignment - -This removes the assignment of setup and cleanup functions for the ath79 -target. Assigning the setup-method will lead to 'setup_transfer' not -being assigned in spi_bitbang_init. - -Also drop the redundant cleanup assignment, as this also happens in -spi_bitbang_init. - -Signed-off-by: David Bauer <mail@david-bauer.net> ---- - drivers/spi/spi-ath79.c | 2 -- - 1 file changed, 2 deletions(-) - ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -152,8 +152,6 @@ static int ath79_spi_probe(struct platfo - - master->use_gpio_descriptors = true; - master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); -- master->setup = spi_bitbang_setup; -- master->cleanup = spi_bitbang_cleanup; - - sp->bitbang.master = master; - sp->bitbang.chipselect = ath79_spi_chipselect; diff --git a/target/linux/ath79/patches-5.10/0054-spi-sync-up-initial-chipselect-state.patch b/target/linux/ath79/patches-5.10/0054-spi-sync-up-initial-chipselect-state.patch deleted file mode 100644 index 7329ae5827..0000000000 --- a/target/linux/ath79/patches-5.10/0054-spi-sync-up-initial-chipselect-state.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 4b7d7f85abac1e7ad9e8b745694e470f0729f527 Mon Sep 17 00:00:00 2001 -From: David Bauer <mail@david-bauer.net> -Date: Wed, 3 Mar 2021 17:11:34 +0100 -Subject: [PATCH] spi: sync up initial chipselect state - -When initially probing the SPI slave device, the call for disabling an -SPI device without the SPI_CS_HIGH flag is not applied, as the -condition for checking whether or not the state to be applied equals the -one currently set evaluates to true. - -This however might not necessarily be the case, as the chipselect might -be active. - -Add a force flag to spi_set_cs which allows to override this -early access condition. Set it to false everywhere except when called -from spi_setup to sync up the initial CS state. - -Fixes commit d40f0b6f2e21 ("spi: Avoid setting the chip select if we don't -need to") - -Signed-off-by: David Bauer <mail@david-bauer.net> ---- - drivers/spi/spi.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - ---- a/drivers/spi/spi.c -+++ b/drivers/spi/spi.c -@@ -787,7 +787,7 @@ int spi_register_board_info(struct spi_b - - /*-------------------------------------------------------------------------*/ - --static void spi_set_cs(struct spi_device *spi, bool enable) -+static void spi_set_cs(struct spi_device *spi, bool enable, bool force) - { - bool enable1 = enable; - -@@ -795,7 +795,7 @@ static void spi_set_cs(struct spi_device - * Avoid calling into the driver (or doing delays) if the chip select - * isn't actually changing from the last time this was called. - */ -- if ((spi->controller->last_cs_enable == enable) && -+ if (!force && (spi->controller->last_cs_enable == enable) && - (spi->controller->last_cs_mode_high == (spi->mode & SPI_CS_HIGH))) - return; - -@@ -1243,7 +1243,7 @@ static int spi_transfer_one_message(stru - struct spi_statistics *statm = &ctlr->statistics; - struct spi_statistics *stats = &msg->spi->statistics; - -- spi_set_cs(msg->spi, true); -+ spi_set_cs(msg->spi, true, false); - - SPI_STATISTICS_INCREMENT_FIELD(statm, messages); - SPI_STATISTICS_INCREMENT_FIELD(stats, messages); -@@ -1311,9 +1311,9 @@ fallback_pio: - &msg->transfers)) { - keep_cs = true; - } else { -- spi_set_cs(msg->spi, false); -+ spi_set_cs(msg->spi, false, false); - _spi_transfer_cs_change_delay(msg, xfer); -- spi_set_cs(msg->spi, true); -+ spi_set_cs(msg->spi, true, false); - } - } - -@@ -1322,7 +1322,7 @@ fallback_pio: - - out: - if (ret != 0 || !keep_cs) -- spi_set_cs(msg->spi, false); -+ spi_set_cs(msg->spi, false, false); - - if (msg->status == -EINPROGRESS) - msg->status = ret; -@@ -3400,11 +3400,11 @@ int spi_setup(struct spi_device *spi) - */ - status = 0; - -- spi_set_cs(spi, false); -+ spi_set_cs(spi, false, true); - pm_runtime_mark_last_busy(spi->controller->dev.parent); - pm_runtime_put_autosuspend(spi->controller->dev.parent); - } else { -- spi_set_cs(spi, false); -+ spi_set_cs(spi, false, true); - } - - mutex_unlock(&spi->controller->io_mutex); diff --git a/target/linux/ath79/patches-5.10/410-spi-ath79-Implement-the-spi_mem-interface.patch b/target/linux/ath79/patches-5.10/410-spi-ath79-Implement-the-spi_mem-interface.patch index 2a6b9857fb..51a71c6ef2 100644 --- a/target/linux/ath79/patches-5.10/410-spi-ath79-Implement-the-spi_mem-interface.patch +++ b/target/linux/ath79/patches-5.10/410-spi-ath79-Implement-the-spi_mem-interface.patch @@ -58,7 +58,7 @@ Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> static int ath79_spi_probe(struct platform_device *pdev) { struct spi_master *master; -@@ -163,6 +197,7 @@ static int ath79_spi_probe(struct platfo +@@ -164,6 +198,7 @@ static int ath79_spi_probe(struct platfo ret = PTR_ERR(sp->base); goto err_put_master; } diff --git a/target/linux/ath79/patches-5.10/411-spi-ath79-add-SPI_MASTER_GPIO_SS-flag.patch b/target/linux/ath79/patches-5.10/411-spi-ath79-add-SPI_MASTER_GPIO_SS-flag.patch deleted file mode 100644 index 0a81ecd6f7..0000000000 --- a/target/linux/ath79/patches-5.10/411-spi-ath79-add-SPI_MASTER_GPIO_SS-flag.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 55e2fff639d4297ffeb478113aef6d3e26c2c4c2 Mon Sep 17 00:00:00 2001 -From: David Bauer <mail@david-bauer.net> -Date: Wed, 17 Feb 2021 02:44:55 +0100 -Subject: [PATCH 1/2] spi: ath79: add SPI_MASTER_GPIO_SS flag - -Add the SPI_MASTER_GPIO_SS flag for the spi-ath79 driver. Otherwise, -the custom chipselect function is never called. This breaks hardware, -where the three dedicated chipselect lines are used instead of generic -GPIO pins. - -Fixes commit 4a07b8bcd503 ("spi: bitbang: Make chipselect callback optional") - -Signed-off-by: David Bauer <mail@david-bauer.net> ---- - drivers/spi/spi-ath79.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/spi/spi-ath79.c -+++ b/drivers/spi/spi-ath79.c -@@ -186,6 +186,7 @@ static int ath79_spi_probe(struct platfo - - master->use_gpio_descriptors = true; - master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); -+ master->flags = SPI_MASTER_GPIO_SS; - - sp->bitbang.master = master; - sp->bitbang.chipselect = ath79_spi_chipselect; |