All of lore.kernel.org
 help / color / mirror / Atom feed
From: "B. Niedermayr" <benedikt.niedermayr@siemens.com>
To: <linux-omap@vger.kernel.org>, <devicetree@vger.kernel.org>
Cc: <rogerq@kernel.org>, <tony@atomide.com>,
	<krzysztof.kozlowski@linaro.org>, <robh+dt@kernel.org>
Subject: [PATCH v4 1/3] memory: omap-gpmc: allow shared wait pins
Date: Thu, 15 Sep 2022 11:13:31 +0200	[thread overview]
Message-ID: <20220915091333.2425306-2-benedikt.niedermayr@siemens.com> (raw)
In-Reply-To: <20220915091333.2425306-1-benedikt.niedermayr@siemens.com>

From: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>

Newer kernels refuse to probe when using the same wait pin for
different chipselect regions.

But this may be a usecase when connecting for example FPGA or ASIC
modules to the gpmc, which only got one wait pin installed.

Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
---
 drivers/memory/omap-gpmc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index d9bf1c2ac319..e3674a15b934 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2221,9 +2221,13 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
 							 GPIO_ACTIVE_HIGH,
 							 GPIOD_IN);
 		if (IS_ERR(waitpin_desc)) {
-			dev_err(&pdev->dev, "invalid wait-pin: %d\n", wait_pin);
 			ret = PTR_ERR(waitpin_desc);
-			goto err;
+			if (ret == -EBUSY) {
+				dev_info(&pdev->dev, "shared wait-pin: %d\n", wait_pin);
+			} else {
+				dev_err(&pdev->dev, "invalid wait-pin: %d\n", wait_pin);
+				goto err;
+			}
 		}
 	}
 
-- 
2.34.1


  reply	other threads:[~2022-09-15  9:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  9:13 [PATCH v4 0/3] omap-gpmc wait pin additions B. Niedermayr
2022-09-15  9:13 ` B. Niedermayr [this message]
2022-09-16  8:50   ` [PATCH v4 1/3] memory: omap-gpmc: allow shared wait pins Roger Quadros
2022-09-15  9:13 ` [PATCH v4 2/3] memory: omap-gpmc: add support for wait pin polarity B. Niedermayr
2022-09-16  8:46   ` Roger Quadros
2022-09-16  8:55   ` Roger Quadros
2022-09-16  9:17     ` Niedermayr, BENEDIKT
2022-09-15  9:13 ` [PATCH v4 3/3] dt-bindings: memory-controllers: gpmc-child: add wait-pin polarity B. Niedermayr

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=20220915091333.2425306-2-benedikt.niedermayr@siemens.com \
    --to=benedikt.niedermayr@siemens.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=tony@atomide.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: link
Be 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.