From: Tudor Ambarus <tudor.ambarus@linaro.org> To: broonie@kernel.org, andi.shyti@kernel.org, arnd@arndb.de Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, semen.protsenko@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus <tudor.ambarus@linaro.org> Subject: [PATCH v2 00/28] spi: s3c64xx: winter cleanup and gs101 support Date: Thu, 25 Jan 2024 14:49:38 +0000 [thread overview] Message-ID: <20240125145007.748295-1-tudor.ambarus@linaro.org> (raw) Hi, Special attention is needed for: ``asm-generic/io.h: add iowrite{8,16}_32 accessors`` as it's not under SPI's umbrella. If the accessors are fine, I expect they'll be queued either to the SPI tree or to the ASM header files tree, but by providing an immutable tag, so that the other tree can merge them too. The spi dt-bindings patches can be queued through the SPI tree, but they'll need an immutable tag too. They'll be needed in the samsung tree as I'll follow with patches for the samsung device trees to use the "samsung,spi-fifosize" property. The patch set cleans a bit the driver and adds support for gs101 SPI. For the cleaning part, I removed the unfortunate dependency between the SPI of_alias and the fifo_lvl_mask array from the driver. The SPI of_alias was used as an index into the fifo_lvl_mask to determine the FIFO depth of the SPI node. Changing the alias ID into the device tree would make the driver choose a wrong FIFO size configuration, if not accessing past the fifo_lvl_mask array boundaries. Not specifying an SPI alias would make the driver fail to probe, which is wrong too. Apart of the SPI patches, I added support for iowrite{8,16}_32 accessors in asm-generic/io.h. This will allow devices that require 32 bits register accesses to write data in chunks of 8 or 16 bits (a typical use case is SPI, where clients can request transfers in words of 8 bits for example). GS101 only allows 32bit register accesses otherwise it raisses a Serror Interrupt and hangs the system, thus the accessors are needed here. The first 3 patches are fixes and they are intentionally put at the beginning of the series so that they can be easily queued to the stable kernels. The SPI patches were tested with the spi-loopback-test on the gs101 controller. Thanks! ta Changes in v2: - move fixes at the beginning of the series so that they can be queued easily to the stable kernels. - break the dependency between the SPI of_alias, the fifo_lvl_mask and the FIFO depth. Provide alternatives to either infer the FIFO size from the compatible, where the SoC uses the same FIFO size for all the instances of the IP, or by using the "samsung,spi-fifosize" dt property, where the SoC uses different FIFO sizes for the instances of the IP. - split patches or other cosmetic changes, collect R-b tags. Tudor Ambarus (28): spi: s3c64xx: explicitly include <linux/io.h> spi: s3c64xx: explicitly include <linux/bits.h> spi: s3c64xx: avoid possible negative array index spi: dt-bindings: samsung: add google,gs101-spi compatible spi: dt-bindings: samsung: add samsung,spi-fifosize property spi: s3c64xx: sort headers alphabetically spi: s3c64xx: remove unneeded (void *) casts in of_match_table spi: s3c64xx: remove else after return spi: s3c64xx: use bitfield access macros spi: s3c64xx: use full mask for {RX, TX}_FIFO_LVL spi: s3c64xx: move common code outside if else spi: s3c64xx: check return code of dmaengine_slave_config() spi: s3c64xx: propagate the dma_submit_error() error code spi: s3c64xx: rename prepare_dma() to s3c64xx_prepare_dma() spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() spi: s3c64xx: simplify s3c64xx_wait_for_pio() spi: s3c64xx: drop blank line between declarations spi: s3c64xx: fix typo, s/configuartion/configuration spi: s3c64xx: downgrade dev_warn to dev_dbg for optional dt props spi: s3c64xx: add support for inferring fifosize from the compatible spi: s3c64xx: infer fifosize from the compatible spi: s3c64xx: drop dependency on of_alias where possible spi: s3c64xx: retrieve the FIFO size from the device tree spi: s3c64xx: mark fifo_lvl_mask as deprecated asm-generic/io.h: add iowrite{8,16}_32 accessors spi: s3c64xx: add iowrite{8,16}_32_rep accessors spi: s3c64xx: add support for google,gs101-spi MAINTAINERS: add Tudor Ambarus as R for the samsung SPI driver .../devicetree/bindings/spi/samsung,spi.yaml | 6 + MAINTAINERS | 1 + drivers/spi/spi-s3c64xx.c | 530 ++++++++++-------- include/asm-generic/io.h | 50 ++ include/asm-generic/iomap.h | 2 + 5 files changed, 345 insertions(+), 244 deletions(-) -- 2.43.0.429.g432eaa2c6b-goog
WARNING: multiple messages have this Message-ID (diff)
From: Tudor Ambarus <tudor.ambarus@linaro.org> To: broonie@kernel.org, andi.shyti@kernel.org, arnd@arndb.de Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, semen.protsenko@linaro.org, kernel-team@android.com, willmcvicker@google.com, Tudor Ambarus <tudor.ambarus@linaro.org> Subject: [PATCH v2 00/28] spi: s3c64xx: winter cleanup and gs101 support Date: Thu, 25 Jan 2024 14:49:38 +0000 [thread overview] Message-ID: <20240125145007.748295-1-tudor.ambarus@linaro.org> (raw) Hi, Special attention is needed for: ``asm-generic/io.h: add iowrite{8,16}_32 accessors`` as it's not under SPI's umbrella. If the accessors are fine, I expect they'll be queued either to the SPI tree or to the ASM header files tree, but by providing an immutable tag, so that the other tree can merge them too. The spi dt-bindings patches can be queued through the SPI tree, but they'll need an immutable tag too. They'll be needed in the samsung tree as I'll follow with patches for the samsung device trees to use the "samsung,spi-fifosize" property. The patch set cleans a bit the driver and adds support for gs101 SPI. For the cleaning part, I removed the unfortunate dependency between the SPI of_alias and the fifo_lvl_mask array from the driver. The SPI of_alias was used as an index into the fifo_lvl_mask to determine the FIFO depth of the SPI node. Changing the alias ID into the device tree would make the driver choose a wrong FIFO size configuration, if not accessing past the fifo_lvl_mask array boundaries. Not specifying an SPI alias would make the driver fail to probe, which is wrong too. Apart of the SPI patches, I added support for iowrite{8,16}_32 accessors in asm-generic/io.h. This will allow devices that require 32 bits register accesses to write data in chunks of 8 or 16 bits (a typical use case is SPI, where clients can request transfers in words of 8 bits for example). GS101 only allows 32bit register accesses otherwise it raisses a Serror Interrupt and hangs the system, thus the accessors are needed here. The first 3 patches are fixes and they are intentionally put at the beginning of the series so that they can be easily queued to the stable kernels. The SPI patches were tested with the spi-loopback-test on the gs101 controller. Thanks! ta Changes in v2: - move fixes at the beginning of the series so that they can be queued easily to the stable kernels. - break the dependency between the SPI of_alias, the fifo_lvl_mask and the FIFO depth. Provide alternatives to either infer the FIFO size from the compatible, where the SoC uses the same FIFO size for all the instances of the IP, or by using the "samsung,spi-fifosize" dt property, where the SoC uses different FIFO sizes for the instances of the IP. - split patches or other cosmetic changes, collect R-b tags. Tudor Ambarus (28): spi: s3c64xx: explicitly include <linux/io.h> spi: s3c64xx: explicitly include <linux/bits.h> spi: s3c64xx: avoid possible negative array index spi: dt-bindings: samsung: add google,gs101-spi compatible spi: dt-bindings: samsung: add samsung,spi-fifosize property spi: s3c64xx: sort headers alphabetically spi: s3c64xx: remove unneeded (void *) casts in of_match_table spi: s3c64xx: remove else after return spi: s3c64xx: use bitfield access macros spi: s3c64xx: use full mask for {RX, TX}_FIFO_LVL spi: s3c64xx: move common code outside if else spi: s3c64xx: check return code of dmaengine_slave_config() spi: s3c64xx: propagate the dma_submit_error() error code spi: s3c64xx: rename prepare_dma() to s3c64xx_prepare_dma() spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() spi: s3c64xx: simplify s3c64xx_wait_for_pio() spi: s3c64xx: drop blank line between declarations spi: s3c64xx: fix typo, s/configuartion/configuration spi: s3c64xx: downgrade dev_warn to dev_dbg for optional dt props spi: s3c64xx: add support for inferring fifosize from the compatible spi: s3c64xx: infer fifosize from the compatible spi: s3c64xx: drop dependency on of_alias where possible spi: s3c64xx: retrieve the FIFO size from the device tree spi: s3c64xx: mark fifo_lvl_mask as deprecated asm-generic/io.h: add iowrite{8,16}_32 accessors spi: s3c64xx: add iowrite{8,16}_32_rep accessors spi: s3c64xx: add support for google,gs101-spi MAINTAINERS: add Tudor Ambarus as R for the samsung SPI driver .../devicetree/bindings/spi/samsung,spi.yaml | 6 + MAINTAINERS | 1 + drivers/spi/spi-s3c64xx.c | 530 ++++++++++-------- include/asm-generic/io.h | 50 ++ include/asm-generic/iomap.h | 2 + 5 files changed, 345 insertions(+), 244 deletions(-) -- 2.43.0.429.g432eaa2c6b-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2024-01-25 14:50 UTC|newest] Thread overview: 154+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-25 14:49 Tudor Ambarus [this message] 2024-01-25 14:49 ` [PATCH v2 00/28] spi: s3c64xx: winter cleanup and gs101 support Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 01/28] spi: s3c64xx: explicitly include <linux/io.h> Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 18:58 ` Sam Protsenko 2024-01-25 18:58 ` Sam Protsenko 2024-01-26 14:40 ` Tudor Ambarus 2024-01-26 14:40 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 02/28] spi: s3c64xx: explicitly include <linux/bits.h> Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 03/28] spi: s3c64xx: avoid possible negative array index Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 18:50 ` Sam Protsenko 2024-01-25 18:50 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 04/28] spi: dt-bindings: samsung: add google,gs101-spi compatible Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 05/28] spi: dt-bindings: samsung: add samsung,spi-fifosize property Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 16:16 ` Mark Brown 2024-01-25 16:16 ` Mark Brown 2024-01-25 16:38 ` Tudor Ambarus 2024-01-25 16:38 ` Tudor Ambarus 2024-01-25 17:26 ` Mark Brown 2024-01-25 17:26 ` Mark Brown 2024-01-25 17:30 ` Tudor Ambarus 2024-01-25 17:30 ` Tudor Ambarus 2024-01-25 17:45 ` Mark Brown 2024-01-25 17:45 ` Mark Brown 2024-01-25 19:01 ` Tudor Ambarus 2024-01-25 19:01 ` Tudor Ambarus 2024-01-30 22:25 ` Rob Herring 2024-01-30 22:25 ` Rob Herring 2024-02-05 9:42 ` Tudor Ambarus 2024-02-05 9:42 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 06/28] spi: s3c64xx: sort headers alphabetically Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 07/28] spi: s3c64xx: remove unneeded (void *) casts in of_match_table Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 19:04 ` Sam Protsenko 2024-01-25 19:04 ` Sam Protsenko 2024-01-26 8:24 ` Tudor Ambarus 2024-01-26 8:24 ` Tudor Ambarus 2024-01-26 19:40 ` Sam Protsenko 2024-01-26 19:40 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 08/28] spi: s3c64xx: remove else after return Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 09/28] spi: s3c64xx: use bitfield access macros Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 19:50 ` Sam Protsenko 2024-01-25 19:50 ` Sam Protsenko 2024-01-26 8:49 ` Tudor Ambarus 2024-01-26 8:49 ` Tudor Ambarus 2024-01-26 19:55 ` Sam Protsenko 2024-01-26 19:55 ` Sam Protsenko 2024-01-26 16:01 ` Tudor Ambarus 2024-01-26 16:01 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 10/28] spi: s3c64xx: use full mask for {RX, TX}_FIFO_LVL Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:03 ` Sam Protsenko 2024-01-25 20:03 ` Sam Protsenko 2024-01-25 21:48 ` Mark Brown 2024-01-25 21:48 ` Mark Brown 2024-01-26 8:51 ` Tudor Ambarus 2024-01-26 8:51 ` Tudor Ambarus 2024-01-26 8:12 ` Tudor Ambarus 2024-01-26 8:12 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 11/28] spi: s3c64xx: move common code outside if else Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:09 ` Sam Protsenko 2024-01-25 20:09 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 12/28] spi: s3c64xx: check return code of dmaengine_slave_config() Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:19 ` Sam Protsenko 2024-01-25 20:19 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 13/28] spi: s3c64xx: propagate the dma_submit_error() error code Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:23 ` Sam Protsenko 2024-01-25 20:23 ` Sam Protsenko 2024-01-26 7:42 ` Tudor Ambarus 2024-01-26 7:42 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 14/28] spi: s3c64xx: rename prepare_dma() to s3c64xx_prepare_dma() Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:24 ` Sam Protsenko 2024-01-25 20:24 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 15/28] spi: s3c64xx: return ETIMEDOUT for wait_for_completion_timeout() Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:30 ` Sam Protsenko 2024-01-25 20:30 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 16/28] spi: s3c64xx: simplify s3c64xx_wait_for_pio() Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:43 ` Sam Protsenko 2024-01-25 20:43 ` Sam Protsenko 2024-01-26 7:56 ` Tudor Ambarus 2024-01-26 7:56 ` Tudor Ambarus 2024-01-26 19:31 ` Sam Protsenko 2024-01-26 19:31 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 17/28] spi: s3c64xx: drop blank line between declarations Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:38 ` Sam Protsenko 2024-01-25 20:38 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 18/28] spi: s3c64xx: fix typo, s/configuartion/configuration Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:39 ` Sam Protsenko 2024-01-25 20:39 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 19/28] spi: s3c64xx: downgrade dev_warn to dev_dbg for optional dt props Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 20:40 ` Sam Protsenko 2024-01-25 20:40 ` Sam Protsenko 2024-01-25 14:49 ` [PATCH v2 20/28] spi: s3c64xx: add support for inferring fifosize from the compatible Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 14:49 ` [PATCH v2 21/28] spi: s3c64xx: infer " Tudor Ambarus 2024-01-25 14:49 ` Tudor Ambarus 2024-01-25 17:18 ` Mark Brown 2024-01-25 17:18 ` Mark Brown 2024-01-25 18:44 ` Tudor Ambarus 2024-01-25 18:44 ` Tudor Ambarus 2024-01-25 22:28 ` Sam Protsenko 2024-01-25 22:28 ` Sam Protsenko 2024-01-26 7:27 ` Tudor Ambarus 2024-01-26 7:27 ` Tudor Ambarus 2024-01-25 14:50 ` [PATCH v2 22/28] spi: s3c64xx: drop dependency on of_alias where possible Tudor Ambarus 2024-01-25 14:50 ` Tudor Ambarus 2024-01-25 14:50 ` [PATCH v2 23/28] spi: s3c64xx: retrieve the FIFO size from the device tree Tudor Ambarus 2024-01-25 14:50 ` Tudor Ambarus 2024-01-25 17:33 ` Mark Brown 2024-01-25 17:33 ` Mark Brown 2024-01-26 19:23 ` Sam Protsenko 2024-01-26 19:23 ` Sam Protsenko 2024-01-26 20:16 ` Arnd Bergmann 2024-01-26 20:16 ` Arnd Bergmann 2024-01-26 20:20 ` Sam Protsenko 2024-01-26 20:20 ` Sam Protsenko 2024-02-05 9:54 ` Tudor Ambarus 2024-02-05 9:54 ` Tudor Ambarus 2024-01-26 21:19 ` Mark Brown 2024-01-26 21:19 ` Mark Brown 2024-01-25 14:50 ` [PATCH v2 24/28] spi: s3c64xx: mark fifo_lvl_mask as deprecated Tudor Ambarus 2024-01-25 14:50 ` Tudor Ambarus 2024-01-25 14:50 ` [PATCH v2 25/28] asm-generic/io.h: add iowrite{8,16}_32 accessors Tudor Ambarus 2024-01-25 14:50 ` Tudor Ambarus 2024-01-25 17:41 ` Mark Brown 2024-01-25 17:41 ` Mark Brown 2024-01-25 21:23 ` Arnd Bergmann 2024-01-25 21:23 ` Arnd Bergmann 2024-01-26 7:21 ` Tudor Ambarus 2024-01-26 7:21 ` Tudor Ambarus 2024-01-25 14:50 ` [PATCH v2 26/28] spi: s3c64xx: add iowrite{8,16}_32_rep accessors Tudor Ambarus 2024-01-25 14:50 ` Tudor Ambarus 2024-01-25 14:50 ` [PATCH v2 27/28] spi: s3c64xx: add support for google,gs101-spi Tudor Ambarus 2024-01-25 14:50 ` Tudor Ambarus 2024-01-25 20:45 ` Sam Protsenko 2024-01-25 20:45 ` Sam Protsenko 2024-01-25 14:50 ` [PATCH v2 28/28] MAINTAINERS: add Tudor Ambarus as R for the samsung SPI driver Tudor Ambarus 2024-01-25 14:50 ` Tudor Ambarus
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240125145007.748295-1-tudor.ambarus@linaro.org \ --to=tudor.ambarus@linaro.org \ --cc=alim.akhtar@samsung.com \ --cc=andi.shyti@kernel.org \ --cc=andre.draszik@linaro.org \ --cc=arnd@arndb.de \ --cc=broonie@kernel.org \ --cc=conor+dt@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=kernel-team@android.com \ --cc=krzysztof.kozlowski+dt@linaro.org \ --cc=linux-arch@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=peter.griffin@linaro.org \ --cc=robh+dt@kernel.org \ --cc=semen.protsenko@linaro.org \ --cc=willmcvicker@google.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.