From patchwork Tue Jan 23 15:33:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13527624 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E227FC47258 for ; Tue, 23 Jan 2024 15:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9AlnuqyyZ97/4Zft0zh+LuRqkZzSEK/5EtbAB3Q+1wA=; b=knBOB2rRn/U3ZL A88PiaOJBhO1sk/OsoVamOAPkoVcIjp9PG3knrfqpotd/OS4wJ2E0c66eIwXLxsIywRtv8LZWHagY a2fqOcKPlhq1LeUUjodwFzcGBOFYdPNz1l3Y9ffYvAOx5Gml7DfHGesRJz71ntGM0HES0V6aatfay 7zfj6WgZBUSklK/6okdwzMhNybR8NKT0BfvqYzZjdj8U8n4gPPJDosaLIJMdae76gn4VHXC30ef2B /qP7Sl17XCFeZHU0ZApBGOGUX40PPwBFVWHStNoWYD2+E59HUUnV2gWePbLh5+ekUOAj1FaKgMbsU wHUBk64UD5FjZzN+15fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSInG-00H3Km-1K; Tue, 23 Jan 2024 15:34:30 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSInD-00H3KB-1d for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 15:34:28 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40e9d4ab5f3so48236955e9.2 for ; Tue, 23 Jan 2024 07:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706024066; x=1706628866; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ziVeE+WCI2TynApAMc3yW1L2n22pt52jWdrqUi+I10A=; b=xQBNhnvUa7H9D0J11VFM4X8hG1vPI78gw6VrjyOkOd0bkQyQqN0W7B5YtUMwSYuETs cLdVdPkOqbly3szTECIhs2/V/vhPS4SOXoIEBJLMMUL3J1IVRn24TU9FBtGpBqRRxq2G AwRwQgQjqQHcypFV4vCWQPujEKI4z4kI/gq4M3bBDFg3VD1LkuCsFvppjpCkragibRN1 tnDRccT1swadS9to8wjMPvlqF7S3HsaGRCsFN29PY8eGgtN4H2o0k7a0aMLzgFn2dfyg c4sYVdo+ArBkOfJoHMDmPh72Asg0oOVzYqw+IALA5iLIS8+HXw3SgDyYm5WdjvEfbc9j pjgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706024066; x=1706628866; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ziVeE+WCI2TynApAMc3yW1L2n22pt52jWdrqUi+I10A=; b=tJoBUIboGf5IBmVb1HLyXseL2p131Azw4MM4ZiFFeaPVgZ5/CNwT+D+oxbriGfNx8L GW6HE0XRxu0mZNVI0v3YqGd8XtQPE0Fu25az/hP79ZiS+DpKCJ3MZBfrHZN9DLoacWnZ Nxb1FeTAljdJaxu7i9u0W6YCqmsVv6JAaiF1JW0t4XyufDl5WzqDkuWFFEI9vdTMTaPd TKCpPSWWQ9A3o6jemFZDA6nAqyJICWzxkzcic160syHh8VccU2yVQNnHSgKH2s7YRYYy juaMV9mKxKuftvZJVkkn+boHb/aORbudLpdB3VIPZkdeeSGuDrXuRbL+2Rv+VCfTY9DF Fn6A== X-Gm-Message-State: AOJu0YymzmaqGSRKC8A5uur18HEiAl1AJjAqY5UwBVYgpl1wBzonC447 u3qfSOxCKk8O9cat/W1Dyw8aU+2zWp+PdIWc6gfcfm8TJVb+zchTdNh+ZLkajkE= X-Google-Smtp-Source: AGHT+IFHJyFWUBBJs2U3QAmGmiqakyommRSeQB3esKGCGNr9xKSS2oKCzm2qjt7cgP0Zzl31M0Ydlw== X-Received: by 2002:a05:600c:5706:b0:40d:60b9:700 with SMTP id jv6-20020a05600c570600b0040d60b90700mr252998wmb.126.1706024065863; Tue, 23 Jan 2024 07:34:25 -0800 (PST) Received: from ta2.c.googlers.com.com (88.140.78.34.bc.googleusercontent.com. [34.78.140.88]) by smtp.gmail.com with ESMTPSA id p21-20020a05600c359500b0040e3488f16dsm42457536wmq.12.2024.01.23.07.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 07:34:25 -0800 (PST) From: Tudor Ambarus 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 Subject: [PATCH 00/21] spi: s3c64xx: winter cleanup and gs101 support Date: Tue, 23 Jan 2024 15:33:59 +0000 Message-ID: <20240123153421.715951-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_073427_578194_669ABD98 X-CRM114-Status: GOOD ( 13.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, The patch set cleans a bit the driver and adds support for gs101 SPI. 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. 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 patches were tested with the spi-loopback-test on the gs101 controller. Thanks! ta Tudor Ambarus (21): spi: dt-bindings: samsung: add google,gs101-spi compatible spi: s3c64xx: sort headers alphabetically spi: s3c64xx: remove extra blank line spi: s3c64xx: remove unneeded (void *) casts in of_match_table spi: s3c64xx: explicitly include spi: s3c64xx: remove else after return spi: s3c64xx: use bitfield access macros spi: s3c64xx: move error check up to avoid rechecking 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: add missing blank line after declaration spi: s3c64xx: downgrade dev_warn to dev_dbg for optional dt props asm-generic/io.h: add iowrite{8,16}_32 accessors spi: s3c64xx: add support for google,gs101-spi spi: s3c64xx: make the SPI alias optional for newer SoCs MAINTAINERS: add Tudor Ambarus as R for the samsung SPI driver .../devicetree/bindings/spi/samsung,spi.yaml | 1 + MAINTAINERS | 1 + drivers/spi/spi-s3c64xx.c | 447 +++++++++--------- include/asm-generic/io.h | 50 ++ 4 files changed, 276 insertions(+), 223 deletions(-)