From patchwork Wed Jan 29 10:56:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Th=C3=A9o_Lebrun?= X-Patchwork-Id: 13953616 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87E00192D63; Wed, 29 Jan 2025 10:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738148184; cv=none; b=bfQ+X2/fhblCgZVfNzrobSKy9MmJk6vMKKeUDwn8NJm8/e0p4Z7HTb9m6BuTTDGwcpseNyOCnvt2CQ/ZesD2iuqejIKz0Y/KGg51c/3UWuZGj6+Eb9s731BiaxJlN9hoyZeRGxDRC8Got+VvBWBlT92Gr7fCR5VUNJaj1k5KExE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738148184; c=relaxed/simple; bh=s8khawUl//s7nitdOojlYPrff3QD3m7G+TulAv0eWjA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OpTu9FYUTdpI3pfdE/5Dlv4Z50CbOPIX7TRVIx1pKiNOTqIZuUZd7cqTBxbQfpOf/2JTriP7jamjgSZev1dOor1OcynHluMWcNjnoc422IZzAx9mcr4VyMWSNtZ6QocfqR+gmELGSPWbY0M8eYCLCyZ3JsTJ+wJPDkyAJAnHNgg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=BzJLEzAh; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="BzJLEzAh" Received: by mail.gandi.net (Postfix) with ESMTPSA id F089EFF807; Wed, 29 Jan 2025 10:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1738148175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lGFmjlkg7TkERZPvhXDKEKXVV3yb3Ab9WFgTB5BJEeY=; b=BzJLEzAh6DLo7uO+UCIDB+rgJhrMgdvWk5ZGSCjvRTEYfangmKc3yYCW7I7MY1YyBPkUSa DP8lW/C7FsI5dPox9VyLq0gyO42W4r3z1Syp+HtJ/ZftvLqileajVU6w5/iWjx190AhlDh DGFAPPT6wmhulrv0ps8j/Cl4GyfHAa0tFqchYY1iRJiWHVxbSxvk8tG3sG+4D53GVLkJoW e/7sOIfzitp3de6P5KMaoZsoXeMCzBMlEjyktTm+YJgODzUT0qMh6hj16lJ7TsSswk13LD ZznPO4PbhkKxCTAN+1Vy+AiGMWdI91p7uot0ibPCqDRIvU86lXW1ysCKEb3eQw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= To: theo.lebrun@bootlin.com, mathias.nyman@linux.intel.com Cc: rogerq@kernel.org, peter.chen@kernel.org, pawell@cadence.com, gregkh@linuxfoundation.org, mathias.nyman@intel.com, gregory.clement@bootlin.com, thomas.petazzoni@bootlin.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/9] usb: host: xhci-plat: mvebu: use ->quirks instead of ->init_quirk() func Date: Wed, 29 Jan 2025 11:56:05 +0100 Message-ID: <20250129105613.403923-1-theo.lebrun@bootlin.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: theo.lebrun@bootlin.com Compatible "marvell,armada3700-xhci" match data uses the struct xhci_plat_priv::init_quirk() function pointer to add XHCI_RESET_ON_RESUME as quirk on XHCI. Instead, use the struct xhci_plat_priv::quirks field. Signed-off-by: Théo Lebrun --- drivers/usb/host/xhci-mvebu.c | 10 ---------- drivers/usb/host/xhci-mvebu.h | 6 ------ drivers/usb/host/xhci-plat.c | 2 +- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c index 87f1597a0e5a..257e4d79971f 100644 --- a/drivers/usb/host/xhci-mvebu.c +++ b/drivers/usb/host/xhci-mvebu.c @@ -73,13 +73,3 @@ int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd) return 0; } - -int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd) -{ - struct xhci_hcd *xhci = hcd_to_xhci(hcd); - - /* Without reset on resume, the HC won't work at all */ - xhci->quirks |= XHCI_RESET_ON_RESUME; - - return 0; -} diff --git a/drivers/usb/host/xhci-mvebu.h b/drivers/usb/host/xhci-mvebu.h index 3be021793cc8..9d26e22c4842 100644 --- a/drivers/usb/host/xhci-mvebu.h +++ b/drivers/usb/host/xhci-mvebu.h @@ -12,16 +12,10 @@ struct usb_hcd; #if IS_ENABLED(CONFIG_USB_XHCI_MVEBU) int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd); -int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd); #else static inline int xhci_mvebu_mbus_init_quirk(struct usb_hcd *hcd) { return 0; } - -static inline int xhci_mvebu_a3700_init_quirk(struct usb_hcd *hcd) -{ - return 0; -} #endif #endif /* __LINUX_XHCI_MVEBU_H */ diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index ecaa75718e59..49cc24e3ce23 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -106,7 +106,7 @@ static const struct xhci_plat_priv xhci_plat_marvell_armada = { }; static const struct xhci_plat_priv xhci_plat_marvell_armada3700 = { - .init_quirk = xhci_mvebu_a3700_init_quirk, + .quirks = XHCI_RESET_ON_RESUME, }; static const struct xhci_plat_priv xhci_plat_brcm = {