From patchwork Tue Feb 6 08:52:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13546955 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 CA282C4829A for ; Tue, 6 Feb 2024 10:00:57 +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:References:In-Reply-To: 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: List-Owner; bh=yLnzzPG3Wf/NYclpfRlSJ8AL/LQEN3WURhx/GSfDU8w=; b=PoThja9JGs2c6D g70LUG8/JuuKIUb9VJrXycR/faI3e8kD1UPIpnh6FDOHKECMbO7ExRF2GWuNoUicm0NZCzhfEu6z4 q8RVUhbvmy7Ot+ldqNo8r/aMAz4ZDvHuKceH49Dg1mOFmemLod7pZMG0x/mtLUV/cLOR2JnHEBLcf fpQhnC4HuLAC3EwVbHoUXXizdnjyrbUZQM25LWE4FH3A7EYrvb+3qeytsJ24YBdynjWQyTLSLueY4 +LaArZHzqGtJFxWjDUhmpRRRAnQi/qe5qvjds2/yFLs3aVMVnZeseYfCm5qXijOliqAg5Re97j9q1 o9xDnhp1NlGasb9NoFow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXIFt-00000006rm1-2n1q; Tue, 06 Feb 2024 10:00:41 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCA-00000006XON-3b86 for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2024 08:52:49 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40fe32fcbdaso2201405e9.3 for ; Tue, 06 Feb 2024 00:52:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707209565; x=1707814365; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UkCVQgxzGrBwaduk8EU6FbXs7WHVlMsXSEp7cPhdCDY=; b=g7EH1LwG7CMXW306EYaUr8wUdpj+c3JZ0X31j63oS9whPKcLeDDLr+/jo7iOCjDXhJ la5AogX2DlcfQExKAfejskzFlxolia379wJGbalwPUHZJg6ULM9E4Y2dZL11WqerlVzX JUQUB0/vh61IYoBy6aPqIjS4tIQgMRI4NO+L3EV4RyHaDt87NoWvTv0RyCV2GUL3mxPW B9ty+F2cs9+XBF5t2qRiHJNIJJo3Z5xkjSwABc4gYbhJ0NfDa1z0kpY6roWtyD58Ps98 OG1WGzsYmHDgk93v7VwThTrWtHowqsGOSasCx0Im1O5fSfGzRYqccCeb4HZWBaAWzxzN d+Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707209565; x=1707814365; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UkCVQgxzGrBwaduk8EU6FbXs7WHVlMsXSEp7cPhdCDY=; b=MOt0l9IVhajhGC4ILpdgN/dGFxmqf01awIlq7jHN9sxbUevTYETfPPyAV81/mAyx8Q m9ktpnsrrNCnxdRTEKQcNs95T9LuPiBDrFaR2pjQL6Dfuo7w2PL3sj4vrc6a/M5tui3w 8tjI7fh4rB3NNbrH9b5wUkOmbQZTt0/h18GD1PHug3Y0I4QNCMA/4Zu0caBWKK0UuAEo STF8ny2dJltlmZSqxapokTLIEJNjQ3cWfV9644hSKtUwLQKcuVB7kzlPEgLNpaYRFBAo 6HCJnBQprTY9aHslo9ugky85C6WBAoOJh9Gsp7awbbIfo+TYIDhhpc3ThQ21TVcBBy7G NdTQ== X-Gm-Message-State: AOJu0Yx5OttcYqmKXvUorhgmdBZy+hvPMDysZwzjdyEba3k5rLyj4Txv dufEIozhKUpU1bdEUCPt/teDSLnqRb/E7BnYxuGp7bPCk32cvJ4Vm/brWa1oCUM= X-Google-Smtp-Source: AGHT+IEfbZ0TfE6ir6WxqVPHW4Z6wzJ6yydiTFjH0G/ELjvqFfmPNdduKf5sCMaMUzLONfMUUitvpg== X-Received: by 2002:a05:600c:4f51:b0:40e:4806:f436 with SMTP id m17-20020a05600c4f5100b0040e4806f436mr862601wmq.3.1707209565085; Tue, 06 Feb 2024 00:52:45 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVSVEfTQt0pSeBP677iT0RXq8Uvi7iy+AYsrqUOr9WRw2rreuee6l2i4d44/fyttNVWHm9NPm5FMybR0L9l1lqhU5bK8qYgfNfZUMmedtg5BqxNTOn0g+sDkiql6xOcsZgfbAvDGbRnm3vYM/ABbRgdtSpFPeNdkgCneee39d/OE0X2FzeVKCg+waYAIAX9QA8+cej9H4H+ZdSPGgyQO1DMC3KvB+GKzYvjfFzb1SO1Z4/+lNNJJsq+6D2owJ6zPd0SyE3vAX4q7WtWadQC9KECVoiEcBypDG5qP0HtayIJk1+1TqDcxweH7GA1xvsypjDpdos36atNUBcqQIWar550/DcGj0pMF7ewxm0HbWR7tZaloD3unnPXXexPWuUdyTn9EK3QQd1ZaVhfxC97hAuLGvON/OdURaZxnFIc/VBUlX5CJ6GSnA2ajQZOcoJxRLV45Y3h+lTOfsMEb87TRPg9qvohiFhxpHc4b9XfJtdgRP2FD02e/P73GVWmMz+1qufGxdcLYXoYqv0yNe5yreh9Xt3Ym1s/ckaZXvahIvj2M1YP5ZbqGvY8rtmSiOJ2Ys8ctqNeW4GwfDco9/CYtX1v2A== Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id z10-20020a05600c078a00b0040fe078fb03sm1221591wmo.32.2024.02.06.00.52.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 00:52:44 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, robh+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Tudor Ambarus Subject: [PATCH 1/4] spi: s3c64xx: explicitly include Date: Tue, 6 Feb 2024 08:52:35 +0000 Message-ID: <20240206085238.1208256-2-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog In-Reply-To: <20240206085238.1208256-1-tudor.ambarus@linaro.org> References: <20240206085238.1208256-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240206_005246_929962_80DBCFEA X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. 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 The driver uses u32 and relies on an implicit inclusion of . It is good practice to directly include all headers used, it avoids implicit dependencies and spurious breakage if someone rearranges headers and causes the implicit include to vanish. Include the missing header. Fixes: 230d42d422e7 ("spi: Add s3c64xx SPI Controller driver") Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 72c35dbe53b2..c15ca6a910dc 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -17,6 +17,7 @@ #include #include #include +#include #define MAX_SPI_PORTS 12 #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) From patchwork Tue Feb 6 08:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13547039 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 A4AA7C4829E for ; Tue, 6 Feb 2024 11:15: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:References:In-Reply-To: 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: List-Owner; bh=W360xFhGlqBhEfQrHyKNNXFJJuniflP0BtSstScGvuA=; b=uCCp6kvgfIQPx4 Y+gN4Ip/tDwdRzKxA9T8j075rPJY6qCVI4nSCWsUTeAuhwId9Bz5A/dRb+Dz5j0DEZ+7mSIjrPP16 p3scNkLFigwyJC16zSBNIrh1z8rEeUJ6ILQWkXEinOtkcf0ITtN/aV3/OuXI08AoqT5IC5LWfePi6 3DVUeXabQKzplyBF1mYAy5ySzaqU+uVbJzY8LaLVHm2a4X3akIJRNyvSBmM7Ujh5SqRsWFf3GQgQe aq/KdWvaCA3AJKv7J3iJtFdVvJ7Pn5EYrrQFobEgL6NaS0ENJ6T5b/X0xJ17h+SLcU+EFHDuh+RTh GB73bhSpwRjXLXLQk8AA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXJQV-00000007G4b-43lS; Tue, 06 Feb 2024 11:15:43 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCG-00000006XQl-47ZA for linux-arm-kernel@bombadil.infradead.org; Tue, 06 Feb 2024 08:52:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=d0QF+4HlffGHefJgdKDHp8fWrwCAllLNXyqxziFTkTw=; b=AE2B/jkqphCiK9MSkk3znlW6uY W/7sGg2TpwioyNfEPpgrW+ARAuchwZRYdpNtTett+KHJQgSRTO1KsskGScwPzPj1h+BU6P8HgCvWL P0YCJ8gzzWBryznOYEscIOz+EceHzyz3H7A5yo5JT3z1jCOKzIXu6FGLOv9c2cCtx07WrZZadvzCL SH/PhWrnsACSJd6OpsjX+5PANs4n/Y4WGsbGT7/uThz5pAYPGoxsz6X3Y2V24zyF52qgNRgl0MV8Q hx0Cxk0MaY9+y/UKDWXVYRq7PNqQICuCOWqsuSuw7Vz81QScBr/PKc3T/p18jJPp88rKXC7NJpHAO PpuNotVQ==; Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCD-0000000COCm-1RLB for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2024 08:52:51 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40fe2744e5cso1692105e9.1 for ; Tue, 06 Feb 2024 00:52:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707209567; x=1707814367; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d0QF+4HlffGHefJgdKDHp8fWrwCAllLNXyqxziFTkTw=; b=PzAsRkpJinNzYqVcrQvUIQaJ28pjVT8EMr6KXx6MtVJH9WxDsVre11Ulzgvw5ChxZF 4HF48YbNJRnXpLI6daZSMIZl7pVjd9UYROknzInjMwJWMnn+8lwOPo6nw48r1L249hbX OcKE6NJxGf8EYN5+sNo8IPkaVNYDpBliANr+lsZhtjD1g6ZD5HfibMsKPhOzIJWUjl4h X1vfSvuOgXWYY+WP3bxL71XoPWNozY9gVhDAOZSSu/03s977a8N0XZ68PrU6jGEGcll9 zeC3Zo5PMfX/9PzFdTruij2kNCNKilnZFafo7AWHvNrbSiOUyxUMR7j87D063k7NnQPn 3nrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707209567; x=1707814367; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d0QF+4HlffGHefJgdKDHp8fWrwCAllLNXyqxziFTkTw=; b=flw4dHv4hr14rDzKhfAY4TeasNj7UE4N36CGhHgekYjMiooukKknlIOFJw0ohNpcmn cH2mNCXaTUToSGh81O7/HtV2r821vhbyXcVUHr/+Wk1zgUIpS4qMU1UCYME3Cg2LQeXL eboNV3+y4tULY+GPO1C2rx3oHG3jr7y+Q1dEwoiav2y3uWWyT6vY7f5jQPFghhQTkNU8 4Jfp6zHFzPe86FuUscti4A3nKFBm+CPliVbmH/65IDdnHgFGFeDFNJGsh1J9qZdsiFn4 LS/OvAEU9UxmyIVeFgCQolzYqyEDug0PrKAxqAhE1JrRaPKj520T252QEZ9lhizuJP0Z 2rFA== X-Gm-Message-State: AOJu0Yw4CO9JcCIKfblQG5fTZ4+A5SdAb1LkinN8Fmi7C9rF/Y8Pkt9t NBE4Z5CFivOZb4inVi3eomt+WFLq0Qw8rAjOmDDCUQ7+t60HPaBTjHmWA8+2Pqs= X-Google-Smtp-Source: AGHT+IHC6aAcZXDMP8gtfL6xV0f2h4mOHWkxbV6phqY/eiIZshjnTyf0+T79bpivuePsboqjK7az0g== X-Received: by 2002:a05:600c:3552:b0:40f:b69e:aa1e with SMTP id i18-20020a05600c355200b0040fb69eaa1emr6080174wmq.13.1707209566865; Tue, 06 Feb 2024 00:52:46 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCX34c5jWCHAgfG586e2HK612qLg2gCXlE4wjCIoYzWl3tcQpCivQug2snTitLJTQHbNt5mqHrqdY2LX9UlZpyKlmx7yk7+WUWrIHaaMyKd1OZ1WIsbuaexKggfZj3/m7VNeWa2LtqbxvwPCTaKCS16sVVf0lgTrSuq9j3gNkniYUVS80Af4jhFO393vVC2SX/dCVqJw/Fzi1DcQuRmv3s4Ux5J6NkakJf8jpnXcSyYFlFpnuyGkpJI4Hdk0aXwjsilBnRrByZKi42Lx7l+dkM57l3RSopzSEkh0uEMr8tiWP94RnmrDBMvN1i2mrETQzIcKhuD2G2Ku2H9VUybzQE+uyNwiutMihV4d4qsTtbpbtZbtX9JUhvzATyc+oL6OWcM4yc7Rgc1s8Btx4hVijcGR7lD9omjj5Egj59rkcixqd5u/ZiZQbpzi+BZ4xGRU1NBcv+VPOXN6E+aHgR7iqRUzWRd0FmmdIY058AKrqi3xm/LGphYKL9bdV4sQQE0OKWKp4byiTlRCxurauI12xA9rPsbQQNRTkzo7XKFh4TpOd6z+AJ1LEFTmUZaEg+xb65hxNOYpLrPVYdlQ2w+uORRBqg== Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id z10-20020a05600c078a00b0040fe078fb03sm1221591wmo.32.2024.02.06.00.52.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 00:52:45 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, robh+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Tudor Ambarus Subject: [PATCH 2/4] spi: dt-bindings: samsung: add google,gs101-spi compatible Date: Tue, 6 Feb 2024 08:52:36 +0000 Message-ID: <20240206085238.1208256-3-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog In-Reply-To: <20240206085238.1208256-1-tudor.ambarus@linaro.org> References: <20240206085238.1208256-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240206_085249_745855_4A6098AE X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. 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 Add "google,gs101-spi" dedicated compatible for representing SPI of Google GS101 SoC. Reviewed-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Acked-by: Andi Shyti Signed-off-by: Tudor Ambarus --- Documentation/devicetree/bindings/spi/samsung,spi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/samsung,spi.yaml b/Documentation/devicetree/bindings/spi/samsung,spi.yaml index f71099852653..2f0a0835ecfb 100644 --- a/Documentation/devicetree/bindings/spi/samsung,spi.yaml +++ b/Documentation/devicetree/bindings/spi/samsung,spi.yaml @@ -17,6 +17,7 @@ properties: compatible: oneOf: - enum: + - google,gs101-spi - samsung,s3c2443-spi # for S3C2443, S3C2416 and S3C2450 - samsung,s3c6410-spi - samsung,s5pv210-spi # for S5PV210 and S5PC110 From patchwork Tue Feb 6 08:52:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13546865 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 945A5C48286 for ; Tue, 6 Feb 2024 08:53:10 +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:References:In-Reply-To: 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: List-Owner; bh=CiYzFU7UIYF6H56HAov40d6hlCFSGRWWk1KXbfKm0lM=; b=XpaCuchV0rJBWD 6qEc0nLK1ksyCsZIZ7d1sa2Lmfsv2nOiGEsrbnAZtEnyTU/J9M6jkgDAXr1pVEwCGw7gvBY8sGZeO +HGITeCdYWbzefkcbb/F21QF3Cox+lF7dB7GXAL+ocFr9gD9nLQuntkB8BtXAOfkSbQrsfoh5nsjL OcCxv+4+GHMp1a77KptMV+Fe0PmikqJmMEb3nyM3aqKq6a7yTB5PgwiKD+JC3xD/a725DGx/AyL8K BxPNIk44KfhcA+ffcqSoZb9sfE8rf9iYHZOk7DbTObkGLSb0+ffJYeursLJJM65VEZLlStKiRbNtK waIg488PmebT7GR/y4CQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCM-00000006XSk-20vo; Tue, 06 Feb 2024 08:52:58 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCI-00000006XRN-2b2w for linux-arm-kernel@bombadil.infradead.org; Tue, 06 Feb 2024 08:52:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=pplEDheF5LYrTZCBre+JeM++nHr5MatV98+DyJwfv+Y=; b=In5Kek2DhACnfTP4ZfH2UeMsez 8MmraC0Wfn3+1a2Rkvjrpqf2AxBaJ6B5P+yARULMNlFDorZV9hptJLq4ewKQ88lg5T3njwbXBmPAW 8anMrn91K1kFfgBut5XCTkCcin1C6D3CKSZSyknZzHaHMTYHEXAJtcatK+2tsKduOToRE62hKp4rG iLYiC7x8hBCvvikbjgAAQFVibc9DjKULWqOlbJbLcTQk3PF59S0y5K8tmOI/RMA+Zb2ZJsBq1Empl R3ejZQkk9GJULBkiMbtLqQU79HundZWjE2Jc8ikCW+r3Bd5XPrhI08HVXiV42SKVnFS7tozaQ7Uw2 FpsZ0Meg==; Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCE-0000000COCz-2mpL for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2024 08:52:52 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-33b29b5ea86so2051688f8f.1 for ; Tue, 06 Feb 2024 00:52:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707209569; x=1707814369; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pplEDheF5LYrTZCBre+JeM++nHr5MatV98+DyJwfv+Y=; b=cXT3AzMGBRutadw1ACbIQAXKOEcsHOcbxkie7VCpvLmpHILVPTy+5cCbV2YzUQJf7K 6nhrqgK4A+NuEwqPXEZ8UoJwuJHbZg26Y+mWexswIYhjVphWpjVAUQpMgwB3d8kho+1g PHbUk0O245/JDyCLcJTg7cUtv2cfKDvKupCt7qo0rnDeFsArLO7gCTGr6DhfyuN2CAB+ tf7n2cc0JS5gOLe1Q9ttN771PK7M1mu1Me9z4VY3JBFANz4SUsStX1flEzrQcKgwBw3L rCwMVV4856spMyLjYC5Nrf6WuXWruOWG89t/IjVVydsNziQHNGMDh9Y1IMnznH/YBrXG Dmbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707209569; x=1707814369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pplEDheF5LYrTZCBre+JeM++nHr5MatV98+DyJwfv+Y=; b=pgv2UPF9u71ONJAxC0LvfhIy4yc5g5nhy8yoYU38hAdMqcVljh4bjI/TmOh3qvZieu lO4cB1yi8FQFX4CdUmValm+QDxJwwbBZB6MGxDk3bFmdDGL+lEh2ZPwGkujyfxJcDNAA +wBOA/gUsju2CUtO6r9ZlqOCkdc8+BVdqRodwefVOl1dmqeBw0ibwQLc8OG26meEm5Hw NaaEHrUN5XkZRfWMu0Vlf0mnLmNU19WJe5WyXkT0KP2DsEKqn/5s4zod/7vtNTudJOgV sr0ca5cvr8LY8A1Gqtdm7iAIbJ/v04634U4veyE/O9QnU+tJBaTTUo6xqbgjyYbmApJg zGTA== X-Gm-Message-State: AOJu0YxUaXRKly+vB/7f1tBIz6VwcijawwBgRuO0BDQYduhlG8XG3FTi KXozEiOlgpCOX+O5RoWUTVola0jUeV2NiUUFLMwibcXgL7yqoRnmZBvPNqigUYI= X-Google-Smtp-Source: AGHT+IFtpM7RtrErOcc4nsWZ8tHQygBsiwmCq/p182xd0tFgmQxVJRAFvpfZWnODY+HCwC3s3/vNzA== X-Received: by 2002:a5d:44c9:0:b0:33b:2d58:c070 with SMTP id z9-20020a5d44c9000000b0033b2d58c070mr751663wrr.20.1707209568960; Tue, 06 Feb 2024 00:52:48 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV7cNb4TASYY90l9fH/FJ+y6UWMCAOwhFd4AbWO5Bf6cKW4UVx/GGbpxR5BVhv8wIkTDoM1ypQByhk+cfQQuIMwaKKeW1c6rx22gq+Z/n+D1g5V5tkVKqLWX9uAUT/Ug6nn4yLMgjhSdot+kxcZuWrnp7lgech706d8HpLEJRlAhRWAiWsj7aZTAScWliYoF78mCmdsTdxbaCz2Ub3+bbs3su1HqTCWL8XaOg6uAzIAE5G9esHau3XK6RBMwCX8VkRyqC+hzZjU/7nA8N782er/6pE7R6b4Wz1o71178U/jmcZCSQKg2EKpoR8PjuHmGiXmuBRXJxoFmX6IQ/kCv37Rq9hjXfLXGBQB3+qW3zmONY1nQNv/ryg00YhlKaHCJ5MucWFaP6/4g9ZVPzIyFw/FmRiu8ncswVCK5gvosjgrmx8YOCutFJTQtvK1SrCNPGR89eYX6SMs8re0Pt5fkwUjeRdP7qnT+lbhxAZhlk5Eusmtd5CwnB3IayUVRTT+91/2YEt0jHodPpQmJrlEJcuNMGKZ6T6AfEkvs4Xgibj+WuKWe7yuDFDUOX0+fJiRatznv/ysEbxoBocUxUbHV9EkzQ== Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id z10-20020a05600c078a00b0040fe078fb03sm1221591wmo.32.2024.02.06.00.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 00:52:47 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, robh+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Tudor Ambarus Subject: [PATCH 3/4] spi: s3c64xx: add s3c64xx_iowrite{8,16}_32_rep accessors Date: Tue, 6 Feb 2024 08:52:37 +0000 Message-ID: <20240206085238.1208256-4-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog In-Reply-To: <20240206085238.1208256-1-tudor.ambarus@linaro.org> References: <20240206085238.1208256-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240206_085251_032620_9C0DF178 X-CRM114-Status: GOOD ( 14.92 ) 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 Allow SoCs that require 32 bits register accesses to write data in chunks of 8 or 16 bits. One SoC that requires 32 bit register accesses is the google gs101. The operation is rare, thus open code it in the driver rather than making it generic (through asm-generic/io.h) Signed-off-by: Tudor Ambarus --- drivers/spi/spi-s3c64xx.c | 70 +++++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index c15ca6a910dc..cb45ad615f3d 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -142,6 +142,7 @@ struct s3c64xx_spi_dma_data { * prescaler unit. * @clk_ioclk: True if clock is present on this device * @has_loopback: True if loopback mode can be supported + * @use_32bit_io: True if the SoC allows just 32-bit register accesses. * * The Samsung s3c64xx SPI controller are used on various Samsung SoC's but * differ in some aspects such as the size of the fifo and spi bus clock @@ -158,6 +159,7 @@ struct s3c64xx_spi_port_config { bool clk_from_cmu; bool clk_ioclk; bool has_loopback; + bool use_32bit_io; }; /** @@ -412,6 +414,59 @@ static bool s3c64xx_spi_can_dma(struct spi_controller *host, return false; } +static void s3c64xx_iowrite8_32_rep(volatile void __iomem *addr, + const void *buffer, unsigned int count) +{ + if (count) { + const u8 *buf = buffer; + + do { + __raw_writel(*buf++, addr); + } while (--count); + } +} + +static void s3c64xx_iowrite16_32_rep(volatile void __iomem *addr, + const void *buffer, unsigned int count) +{ + if (count) { + const u16 *buf = buffer; + + do { + __raw_writel(*buf++, addr); + } while (--count); + } +} + +static void s3c64xx_iowrite_rep(const struct s3c64xx_spi_driver_data *sdd, + struct spi_transfer *xfer) +{ + void __iomem *regs = sdd->regs; + + switch (sdd->cur_bpw) { + case 32: + iowrite32_rep(regs + S3C64XX_SPI_TX_DATA, + xfer->tx_buf, xfer->len / 4); + break; + case 16: + if (sdd->port_conf->use_32bit_io) + s3c64xx_iowrite16_32_rep(regs + S3C64XX_SPI_TX_DATA, + xfer->tx_buf, xfer->len / 2); + else + iowrite16_rep(regs + S3C64XX_SPI_TX_DATA, + xfer->tx_buf, xfer->len / 2); + break; + default: + if (sdd->port_conf->use_32bit_io) + s3c64xx_iowrite8_32_rep(regs + S3C64XX_SPI_TX_DATA, + xfer->tx_buf, xfer->len); + else + iowrite8_rep(regs + S3C64XX_SPI_TX_DATA, + xfer->tx_buf, xfer->len); + break; + } +} + static int s3c64xx_enable_datapath(struct s3c64xx_spi_driver_data *sdd, struct spi_transfer *xfer, int dma_mode) { @@ -445,20 +500,7 @@ static int s3c64xx_enable_datapath(struct s3c64xx_spi_driver_data *sdd, modecfg |= S3C64XX_SPI_MODE_TXDMA_ON; ret = s3c64xx_prepare_dma(&sdd->tx_dma, &xfer->tx_sg); } else { - switch (sdd->cur_bpw) { - case 32: - iowrite32_rep(regs + S3C64XX_SPI_TX_DATA, - xfer->tx_buf, xfer->len / 4); - break; - case 16: - iowrite16_rep(regs + S3C64XX_SPI_TX_DATA, - xfer->tx_buf, xfer->len / 2); - break; - default: - iowrite8_rep(regs + S3C64XX_SPI_TX_DATA, - xfer->tx_buf, xfer->len); - break; - } + s3c64xx_iowrite_rep(sdd, xfer); } } From patchwork Tue Feb 6 08:52:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13547040 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 6635AC4829D for ; Tue, 6 Feb 2024 11:15: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:References:In-Reply-To: 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: List-Owner; bh=ND7Jr+c0/YJjlkleOTWyTtwKtyoxvigdVH7X/643DVA=; b=eWNY4zVjKOM9Zq dnNiw6i7UdP+KWPgDjsb3Ftx6kDBKpz68t99ZYr4xcT3B4MEw2XAPKpWGlPwvuPvxHYLIkQc2CHM4 uTdjTneiwY1QA1o/Jadcg/it8weANr5W++ZbNKbaJ+y0hpwg9x5SNUMaeJOvdWSd3X4lbf2C+VLbY WQwSRqGC1Dj0zrpuiuoJuVnnXmj5qWe+FSSc5i9FdVMKeJZIQn5ht9PEj817TT/WMYp57ZN0Ly9Ua sgIkuUh00ZBGs0uXTOr7JpvWXk74eVWLdR1CELDfFAgwCzg5E6f0MUAWZh9Xn32Elb6h0jElFoWlf m+BMGUKopAJbkuwCoDIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXJQW-00000007G4l-2NLh; Tue, 06 Feb 2024 11:15:44 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCK-00000006XSA-2bBR for linux-arm-kernel@bombadil.infradead.org; Tue, 06 Feb 2024 08:52:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Vgk20b1Z6sAxu7dsDANnrkj2LKv2bPazc+HqZKqdJoY=; b=VrdVJb03ccdEhiXihQ6s8JSu/Z v5sGOM1jVw5RR2JMAe51RVGfWqLRUGHdxMoHMf87bvRfFUsu7ankhD008R/oQKpPo05KSskpoRbKO PMcCoFaLDsyqh5fnG1oORvN9Xqo2yLolHNG+tPbtjSFRFeBiDck4BpMtyXdCL2UCiztnNmDArKpOM J/XNclKAxpvlbOOW0Mkf0/E/qhUeKfwoaFoAvxEBHA94RWlO4Q4qfeHkKU000MIPqGzYrw9rnXv+G IFFLiSi9rC5JB1/nWgkyOIZVmrjJZkJrCqPEk+DCXPtP7u67A1/OA1rH/f8VU9oqNoXQ3C7XfRBMg UDRdBo5g==; Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rXHCG-0000000CODH-2Zo3 for linux-arm-kernel@lists.infradead.org; Tue, 06 Feb 2024 08:52:55 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3394bec856fso162345f8f.0 for ; Tue, 06 Feb 2024 00:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707209571; x=1707814371; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vgk20b1Z6sAxu7dsDANnrkj2LKv2bPazc+HqZKqdJoY=; b=CLuhoKQek18Pwv0olahccgy3aonyBmL4oDdqMX2G500uIa5DYebz0fDXtYnm6kkTSG AGW6vyHhvoj8Hyj4F1wsiOMAHMndkoDwKvWvLBwq5HoEB/kN63jwkOiGZi8+iQYt1ZQg AnTnC1YXVSe0eEPRKu0MrE8x9yqXo/VoiCD/DzwuIo/2M8A+nm+gExszvzYyft87fVeD Lse00zYCvVVMcKWlby3orCMS2UYS5QcNL95QFH0IsYK72xvfaprdgXcteX/gYQlTIvov g+Nd/53N+KWO2lr+gdaPulKwiMyB10aP50W/ZPa3+qZ4dgxbnSG+65C2On4czge6AfJE AGIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707209571; x=1707814371; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vgk20b1Z6sAxu7dsDANnrkj2LKv2bPazc+HqZKqdJoY=; b=PpGKQHHqFozM0x/mCBSP8jNIgWBAMD+8Hft4jFyA1edOzdvhJAHcVQrkmeCrkc71wq lDT+ibo91FB3jdP3pvplbDVKtFX/lXQCyJNYJTEA4PeVCgamAZtcIZLW7qnyD8o4Qlzt 1dEVV4pPXa0qAdF5sQT7B0relfSjxzPTYp9SI71yXOOOzjCAqCGZP44Oxgb/NwrhOpXT yK1X/WG88eZX9v0+13OoxYH1jGuaLfxPbCrG7DZq30mt6R7kn+a6vwungoycBPtN2JqR 8XGNHebyZPgeyr7dyU89hpfSQc7xUIUJI2Kuzoqnj/zf2DX/EJqKZzDAJLMRNoGTeAx0 FH0Q== X-Gm-Message-State: AOJu0Yzk4R7/j9Fze/nkTYOgCP31lnqlnvp/edXxwk0AoPfwfqrRGr5m 7yAyopO627AEl1xDGgKEvzCtUwNpm/FLREmrE5gRUQejC3XU6XXxPM5ZU24EI2Y= X-Google-Smtp-Source: AGHT+IFxujVssWEiqmgO6bi09eUeCSXUTDLiXgomG617SNK7Y2jrytsLzsqe8YugL4+0WqsUaUGoRg== X-Received: by 2002:a5d:444a:0:b0:33b:3aa7:3b80 with SMTP id x10-20020a5d444a000000b0033b3aa73b80mr735235wrr.15.1707209570962; Tue, 06 Feb 2024 00:52:50 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWiauRuBcFvG8IhewBVIQJKg4NAHxVG6ayQFJPqsd+Sz1L+Z6KUJ/ke/7A2Jp1CzjZetiLMuh7F6Qxt/B2+5Ah9FFrn8saFp1ldnZtCFkCvnwgNhwWQbZ3fI14qQeAGnBjVt5FfYpBPyk8XUo8MyUDwqWKFqTSRk6qFuurmI8ezF9D+HevlhKyOtk+DnCUDkQzyBqj/nun6RK9jn8SZEUmvdNzwCZpb28PCo0W5wgki3ekC6td0taN99bUDT0dLmRjpobe/6GKuvaZK9RNqCV3a2j/yEuSDsLHGdaIo0GyQbn+FB7rNp5YkMdnNpOtoaiEUjCO4Mh8P6THC7YqYSSEgwXLDpEwUzfK3rxEz0KKJ5e8MHAmhWUwDomSo8qpLwSSau85/ZEBUzCmrm6dH3nEZ4LqGZzQkPhD9yzsG+d5fwlyd+4Lzj5MHonbDDel6ZRWeg12ZebHQRm+5svNxpUH+wlJvUoKUJPpqG7ymqNlxOwhZgkasUdym3Smsjt6O51Psw8Ewm/ILlj94zWT/pYIflr//PN+2HsFTkFX+0qcap8D2bSOxCuztnISU41DDs4cGsWC8M/qBAoykebwoEnDlsw== Received: from ta2.c.googlers.com.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id z10-20020a05600c078a00b0040fe078fb03sm1221591wmo.32.2024.02.06.00.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 00:52:49 -0800 (PST) From: Tudor Ambarus To: broonie@kernel.org, andi.shyti@kernel.org, semen.protsenko@linaro.org Cc: krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, kernel-team@android.com, willmcvicker@google.com, robh+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, Tudor Ambarus Subject: [PATCH 4/4] spi: s3c64xx: add support for google,gs101-spi Date: Tue, 6 Feb 2024 08:52:38 +0000 Message-ID: <20240206085238.1208256-5-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog In-Reply-To: <20240206085238.1208256-1-tudor.ambarus@linaro.org> References: <20240206085238.1208256-1-tudor.ambarus@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240206_085253_766257_6B40FB6B X-CRM114-Status: GOOD ( 12.63 ) 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 Add support for GS101 SPI. GS101 integrates 16 SPI nodes, all with 64 bytes FIFOs. GS101 allows just 32 bit register accesses, otherwise a Serror Interrupt is raised. Do the write reg accesses in 32 bits. Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko --- drivers/spi/spi-s3c64xx.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index cb45ad615f3d..9ad0d513fb30 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -19,7 +19,7 @@ #include #include -#define MAX_SPI_PORTS 12 +#define MAX_SPI_PORTS 16 #define S3C64XX_SPI_QUIRK_CS_AUTO (1 << 1) #define AUTOSUSPEND_TIMEOUT 2000 @@ -1538,6 +1538,19 @@ static const struct s3c64xx_spi_port_config fsd_spi_port_config = { .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, }; +static const struct s3c64xx_spi_port_config gs101_spi_port_config = { + .fifo_lvl_mask = { 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, + 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f}, + .rx_lvl_offset = 15, + .tx_st_done = 25, + .clk_div = 4, + .high_speed = true, + .clk_from_cmu = true, + .has_loopback = true, + .use_32bit_io = true, + .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, +}; + static const struct platform_device_id s3c64xx_spi_driver_ids[] = { { .name = "s3c2443-spi", @@ -1550,6 +1563,9 @@ static const struct platform_device_id s3c64xx_spi_driver_ids[] = { }; static const struct of_device_id s3c64xx_spi_dt_match[] = { + { .compatible = "google,gs101-spi", + .data = &gs101_spi_port_config, + }, { .compatible = "samsung,s3c2443-spi", .data = &s3c2443_spi_port_config, },