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: 13527669 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD8805FEEA for ; Tue, 23 Jan 2024 15:34:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706024070; cv=none; b=adsvMYmdEZdXhh0qnIQ2FmlCuae9xwYa+VqCfeRaH2YvgU5TenTaT65aiQvHGi6xYJZVB7VKH3dkipcQub+XwRe5Q3THSSUmrSanExtjdhWEFVt3lbscJCn3oJEtjrNP/ICymZFjfxHECEZ3RTkc9+Y1EZ28vOzLgk4xMMNM670= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706024070; c=relaxed/simple; bh=gNyD7i++uD2R8coWU2KAe3MRsCKjSQZq+dn+mnbIQ9k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Zb8c1pxjZS9Mgf/3D9juipc3yCb96TkIPkdNSB5rO07EL/pQ9D+HkdG44P2/9AMW0XSAGsYd7JhxqxuxrPVaIIAeR0AoCGOGL5SyRHZhsh8Vn6Lr1MfZcti7LGmynQlYINg5WKLnQwH7trDWBejmLMceYdw6QutBXXlTR5s2zmU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=aJbX/nGZ; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="aJbX/nGZ" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40eac352733so25351475e9.0 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=vger.kernel.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=aJbX/nGZDECc65oOFslfQ1KnfvXsS9zh0efYToJqx/PDuzx5jaPujA7Fr3ED7vZByW oIXpH/t+G4ZTwynRofC8fSMu4OIfof1eT88+31V2juY3eZ+sj5y5C8qBapFLjJL4m8A2 4wZ/i06M004CCYNR453CMoRwbp0+dBzrfSaeuJ3ZELx5SsKJs6dAlR7zLpENm2SMgarX +H3gw4tKbYgKz+smjLOknaw4UTP88mZp3PizDL3tJ0qLzGI8UgI7Xa6jda6Sh+aIL2uf wNxfGe/89dpGHY8vmjurcUea7RD0CUC64UUFEvR2mES/MS8ESoJJsZo4bkvefz0261fe Vcbw== 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=fR4XlNyeIdQT6+DxJ6v/uG86NIE5KFI8Hh7Hj3WyFpvViW7BhkrjPABjSphebq6sQa MCYlSTl76U4UCG7U77Xmz++Rh18DZg5kzHtpzuDtwfifQOHVFEbRvxlP3DCgyiU8XMx0 7LxTyY6xnzW5nc3pEIQHWG6y88lYHHu0KlN5LmOyctGNNUJTHvGGEfD0Y3Mj3W0FbOja QXHYsxNaslRTUdR6wZAev3Vm8oM9HCRrn35bm3GFfvAqfbohaGr/psjui6aqJnzKJ4DD ZE3FrHlhxYnPYkgSoXYa6bWCn2+wvXfVo3EYt53qyK4JcZGGAZqR3bUOGF7UVFEPbOJC MQIQ== X-Gm-Message-State: AOJu0YyexZTD/TNVwWRmynRq8gGMNHv2w4POigxfAvK04mqEKs0ixNQf ZOhZDB5umzSvUFbTPGb6WYIA9BrKyRVPHn7qveuwLS6IZpPq6wpuSbXD8Ol8HMI= 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 Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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(-)