All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>
Cc: Chris Paterson <chris.paterson2@renesas.com>,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Subject: [PATCH 5.10.y-cip 14/19] usb: host: xhci-plat: Remove useless DMA-32 fallback configuration
Date: Thu,  1 Jun 2023 16:04:05 +0100	[thread overview]
Message-ID: <20230601150410.124773-15-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20230601150410.124773-1-biju.das.jz@bp.renesas.com>

From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

commit 8729a2a2b1d6f112d5b286ec7b255d229a0f6eec upstream.

As stated in [1], dma_set_mask() with a 64-bit mask never fails if
dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.

Simplify code and remove some dead code accordingly.

[1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/178f859197bebb385609a7c9458fb972ed312e5d.1642233968.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/usb/host/xhci-plat.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index a224e7e2f7d5..456656b37488 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -238,20 +238,13 @@ static int xhci_plat_probe(struct platform_device *pdev)
 	if (!sysdev)
 		sysdev = &pdev->dev;
 
-	/* Try to set 64-bit DMA first */
 	if (WARN_ON(!sysdev->dma_mask))
 		/* Platform did not initialize dma_mask */
-		ret = dma_coerce_mask_and_coherent(sysdev,
-						   DMA_BIT_MASK(64));
+		ret = dma_coerce_mask_and_coherent(sysdev, DMA_BIT_MASK(64));
 	else
 		ret = dma_set_mask_and_coherent(sysdev, DMA_BIT_MASK(64));
-
-	/* If seting 64-bit DMA mask fails, fall back to 32-bit DMA mask */
-	if (ret) {
-		ret = dma_set_mask_and_coherent(sysdev, DMA_BIT_MASK(32));
-		if (ret)
-			return ret;
-	}
+	if (ret)
+		return ret;
 
 	pm_runtime_set_active(&pdev->dev);
 	pm_runtime_enable(&pdev->dev);
-- 
2.25.1



  parent reply	other threads:[~2023-06-01 15:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 15:03 [PATCH 5.10.y-cip 00/19] Add RZ/V2M USB3.1 support Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 01/19] clk: renesas: r9a09g011: Add USB clock and reset entries Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 02/19] usb: typec: hd3ss3220: Add polling support Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 03/19] dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 04/19] dt-bindings: usb: renesas, usb3-peri: Document RZ/V2M r9a09g011 support Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 05/19] dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 06/19] usb: gadget: udc: renesas_usb3: Add support for RZ/V2M Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 07/19] dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings Biju Das
2023-06-01 15:03 ` [PATCH 5.10.y-cip 08/19] dt-bindings: usb: Add RZ/V2M USB3DRD binding Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 09/19] usb: gadget: Add support for RZ/V2M USB3DRD driver Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 10/19] usb: gadget: udc: renesas_usb3: Add role switch support for RZ/V2M Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 11/19] usb: host: xhci-plat: Improve clock handling in probe() Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 12/19] usb: host: xhci-plat: Add reset support Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 13/19] xhci: host: Add Renesas RZ/V2M SoC support Biju Das
2023-06-01 15:04 ` Biju Das [this message]
2023-06-01 15:04 ` [PATCH 5.10.y-cip 15/19] xhci: split out rcar/rz support from xhci-plat.c Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 16/19] arm64: dts: renesas: r9a09g011: Add USB3 DRD, device and host nodes Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 17/19] arm64: dts: renesas: rzv2mevk2: Enable USB3 DRD, Peripheral and Host Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 18/19] arm64: dts: renesas: rzv2mevk2: Enable USB3 role switch Biju Das
2023-06-01 15:04 ` [PATCH 5.10.y-cip 19/19] arm64: defconfig: Enable RZ/V2M xHCI and USB3.1 DRD controller support Biju Das
2023-06-03  9:29 ` [PATCH 5.10.y-cip 00/19] Add RZ/V2M USB3.1 support Pavel Machek
2023-06-05  1:37 ` nobuhiro1.iwamatsu
2023-06-05  8:57   ` Pavel Machek

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=20230601150410.124773-15-biju.das.jz@bp.renesas.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=chris.paterson2@renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    /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.