From patchwork Mon Mar 18 17:33:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13595675 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 692C65646C; Mon, 18 Mar 2024 17:33:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783214; cv=none; b=LdkgvcS7MtZiTt11k2id1yWLrRypIDRfvlCkMVm+mTc1cP726AfLY7a2aRv8nvMKRg1e1z5NMLJ1bWddayG5SdIVhHD5RRPwqL/T50Uftt7mOcWuvjsgY6w5cKnRdnganiv0J5Yl30gYrTcUTjpf4aMJShN+p6yR7JV1teIaPXg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783214; c=relaxed/simple; bh=Cx/9N4sl8IiBbRN+qkAbZRKJpgXPaVShNdYE9UaK3RY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C6E3DU8rgkOE0ZABQtKcBG2myFShfmq6ilyn51U1vqkGyfaf91jeWrhc7kb6C3rXqI69b7jZo42c+sfCtUrdHlelivDlgQBVioya9jwxYrZg7VBhKDuOUsNUfPa8vWcI7E7l9jF01yLXRMz8zcxs/ubfQQuGx3rXz8pu36V2M6w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.07,134,1708354800"; d="scan'208";a="198216084" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 19 Mar 2024 02:33:31 +0900 Received: from localhost.localdomain (unknown [10.226.93.20]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id E707340359E5; Tue, 19 Mar 2024 02:33:26 +0900 (JST) From: Biju Das To: Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Biju Das , Greg Kroah-Hartman , Geert Uytterhoeven , Magnus Damm , Yoshihiro Shimoda , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das , Krzysztof Kozlowski Subject: [PATCH v4 1/6] dt-bindings: usb: renesas,usbhs: Document RZ/G2L family compatible Date: Mon, 18 Mar 2024 17:33:14 +0000 Message-Id: <20240318173319.201799-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> References: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The USBHS IP found on RZ/G2L SoCs only has 10 pipe buffers compared to 16 pipe buffers on RZ/A2M. Document renesas,rzg2l-usbhs family compatible to handle this difference for RZ/G2L family SoCs. Signed-off-by: Biju Das Acked-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven --- v3->v4: * No change. v2->v3: * Added Rb tag from Geert. v1->v2: * Added Ack from Krzysztof Kozlowski. --- Documentation/devicetree/bindings/usb/renesas,usbhs.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml b/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml index 40ada78f2328..c63db3ebd07b 100644 --- a/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml +++ b/Documentation/devicetree/bindings/usb/renesas,usbhs.yaml @@ -19,10 +19,14 @@ properties: - items: - enum: - renesas,usbhs-r7s9210 # RZ/A2 + - const: renesas,rza2-usbhs + + - items: + - enum: - renesas,usbhs-r9a07g043 # RZ/G2UL and RZ/Five - renesas,usbhs-r9a07g044 # RZ/G2{L,LC} - renesas,usbhs-r9a07g054 # RZ/V2L - - const: renesas,rza2-usbhs + - const: renesas,rzg2l-usbhs - items: - enum: From patchwork Mon Mar 18 17:33:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13595676 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 599885577F; Mon, 18 Mar 2024 17:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783224; cv=none; b=t4MoiU7XGLWb4KUbKUV8r7HokTrPe8zwZCxF5QCRKtFYaPIWBsYRnRO091pBg4EtKHKGG/MdqGxtYLd87TtM7lywBXJzNcxWwEYTAFrs2lheScpBlgBtWXyYghyN4ZvYJ+gdMpuySQJfFnHxAjy+S1drzcdbSAGLkbDHJORzfIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783224; c=relaxed/simple; bh=7wGuM9mUE2EIlFGIi5UGZhFZydUFDO6Zf0/5w2OPGUg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VdF9mHXHvsfwi1qnhLShkPv3tur4r/BZN/JSRaDRfTn/AAE6UD0hKU1DIQJT6S2MZGa+0mK5Y5omnCRHaoGZxlXEa4MZSfgvMKo203+VWd7Lym2jei7nJgB06XR20CTVKhQGhmrhKjDMACtiCBiSJFBWDgECxwb1l9nbDl7S5Gc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.07,134,1708354800"; d="scan'208";a="202167599" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 19 Mar 2024 02:33:35 +0900 Received: from localhost.localdomain (unknown [10.226.93.20]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 89C0140359EB; Tue, 19 Mar 2024 02:33:31 +0900 (JST) From: Biju Das To: Greg Kroah-Hartman Cc: Biju Das , Geert Uytterhoeven , Magnus Damm , Rob Herring , Yoshihiro Shimoda , Krzysztof Kozlowski , =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= , linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das Subject: [PATCH v4 2/6] usb: renesas_usbhs: Simplify obtaining device data Date: Mon, 18 Mar 2024 17:33:15 +0000 Message-Id: <20240318173319.201799-3-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> References: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Simplify probe() by removing redundant dev->of_node check. While at it, replace dev_err->dev_err_probe for error path. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven --- v3->v4: * No change. v2->v3: * Added Rb tag from Geert. v2: * New patch. --- drivers/usb/renesas_usbhs/common.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index dd1c17542439..0c62e4c6c88d 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -595,16 +595,11 @@ static int usbhs_probe(struct platform_device *pdev) u32 tmp; int irq; - /* check device node */ - if (dev_of_node(dev)) - info = of_device_get_match_data(dev); - else - info = renesas_usbhs_get_info(pdev); - - /* check platform information */ + info = of_device_get_match_data(dev); if (!info) { - dev_err(dev, "no platform information\n"); - return -EINVAL; + info = renesas_usbhs_get_info(pdev); + if (!info) + return dev_err_probe(dev, -EINVAL, "no platform info\n"); } /* platform data */ From patchwork Mon Mar 18 17:33:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13595678 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05A4256762; Mon, 18 Mar 2024 17:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783227; cv=none; b=EuJ2LZT3ljqBvUrvD14iwU9J6K6aUFk6ouy3QocDrxfvanPzIdb+LBX2iDkQvAEQY+wRktjjltHen1zI+m0/ySfFCde+NkKzs86tekS79XE5VVi6PzlmRWlyyxQqnnek/KvXKH3WA0FZ6DrXNbnlgqaj8lFvieV9e53h/7+ayg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783227; c=relaxed/simple; bh=OXOn71n3yNv4uolBV+j27KmiLuHzNf0WT3VlwzHxVyY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ko+WMQiPD+5/cdIruc0jYxh+Sln7H3JgGJmvCvutfWy/nHp0KebSVLP9/3Ekd++vLE35zRsQeCJMmAjgpjYSvxVS3arfN8/hIEwQWM9EXDwxHW0jgSW/6tEnLGYGAgEqY1kSN2M/o6Zr4xzdkCwVgOqfsYD6fQI6Qe/hrROJO94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.07,134,1708354800"; d="scan'208";a="202167607" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 19 Mar 2024 02:33:39 +0900 Received: from localhost.localdomain (unknown [10.226.93.20]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id A63AA40359EB; Tue, 19 Mar 2024 02:33:35 +0900 (JST) From: Biju Das To: Greg Kroah-Hartman Cc: Biju Das , Geert Uytterhoeven , Magnus Damm , Rob Herring , Yoshihiro Shimoda , Krzysztof Kozlowski , =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= , linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das Subject: [PATCH v4 3/6] usb: renesas_usbhs: Improve usbhsc_default_pipe[] for isochronous transfers Date: Mon, 18 Mar 2024 17:33:16 +0000 Message-Id: <20240318173319.201799-4-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> References: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 As per the hardware manual, double buffer setting results in fewer interrupts for high-speed data transfers. Improve usbhsc_default_pipe[] for isochronous transfers by updating the table from single->double buffering and update the pipe number accordingly. Suggested-by: Geert Uytterhoeven Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven --- v3->v4: * Added Rbtag from Geert. v3: * New patch --- drivers/usb/renesas_usbhs/common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 0c62e4c6c88d..177fa3144a47 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -366,11 +366,11 @@ static void usbhsc_clk_disable_unprepare(struct usbhs_priv *priv) /* commonly used on old SH-Mobile SoCs */ static struct renesas_usbhs_driver_pipe_config usbhsc_default_pipe[] = { RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_CONTROL, 64, 0x00, false), - RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x08, false), - RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x18, false), - RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x28, true), - RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x38, true), + RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x08, true), + RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x28, true), RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x48, true), + RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x58, true), + RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_BULK, 512, 0x68, true), RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_INT, 64, 0x04, false), RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_INT, 64, 0x05, false), RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_INT, 64, 0x06, false), From patchwork Mon Mar 18 17:33:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13595677 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADE115674B; Mon, 18 Mar 2024 17:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783226; cv=none; b=Sn908eVtD8uMYIyBwDMtSH0A8uAC/Yjx3/BiT1vUN0k3Ct8jpO8BnGrZGqNVkmSvP/1T1mQZ439rw5pP3gYibgABpDxVkmNe4J8ubZDhlsbL0F8HkVYi3Z6nEY+lCMbc1QhxX769FdjKfpqUo6K8apJdMRRiFptBalN6yiMD4bg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783226; c=relaxed/simple; bh=KuBv1s1rUd1QcRd8mXN7qBPmnnsEWIV03gtKsVQjV3A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o9pnFPh1JGnLbCSTUF6R4o9gBCh/0JdU0OavWrNAJU1LwoItdGz5Ld1yFoRb+rwWeyUQTlBXamBBzZo3RR93Xqi+XawiPk5/xoJgr3djuWIbcH5hsC0VjoCzanjG2750WE61l/ttnaW7Lbt1FYo5Y4P7AzonGfqF1AmYAex+FP8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.07,134,1708354800"; d="scan'208";a="198216100" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 19 Mar 2024 02:33:43 +0900 Received: from localhost.localdomain (unknown [10.226.93.20]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id B5F4240359E9; Tue, 19 Mar 2024 02:33:39 +0900 (JST) From: Biju Das To: Greg Kroah-Hartman Cc: Biju Das , Geert Uytterhoeven , Magnus Damm , Huy Nguyen , Rob Herring , Yoshihiro Shimoda , Krzysztof Kozlowski , =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= , linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das Subject: [PATCH v4 4/6] usb: renesas_usbhs: Update usbhs pipe configuration for RZ/G2L family Date: Mon, 18 Mar 2024 17:33:17 +0000 Message-Id: <20240318173319.201799-5-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> References: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The RZ/G2L family SoCs has 10 pipe buffers compared to 16 pipe buffers on RZ/A2M. Update the pipe configuration for RZ/G2L family SoCs and use family SoC specific compatible to handle this difference. The pipe configuration of RZ/G2L is same as usbhsc_rzg2l_default_pipe[], so select the default pipe configuration for RZ/G2L SoCs by setting .has_new_pipe_configs to zero. Add SoC specific compatible to OF table to avoid ABI breakage with old DTB. To optimize memory usage the SoC specific compatible will be removed later. Based on the patch in BSP by Huy Nguyen Signed-off-by: Biju Das --- v3->v4: * Credit Huy Nguyen's work in the commit message and dropped his name from Signed-off-by tag. * Selection of usbhsc_rzg2l_default_pipe[] by setting the variable has_new_pipe_configs to zero. * Updated commit description. * Dropped the check 'priv->dparam.pipe_configs' as it is same as checking !has_new_pipe_configs. v2->v3: * Updated commit description * Dropped usbhsc_rzg2l_pipe[] and reusing the default_pipe[]. v1->v2: * Dropped using of_device_is_compatible() in probe. * Added usbhs_rzg2l_plat_info and replaced the device data for RZ/G2L from usbhs_rza2_plat_info->usbhs_rzg2l_plat_info. * Moved usbhsc_rzg2l_pipe table near to the user. * Updated commit description. --- drivers/usb/renesas_usbhs/common.c | 20 ++++++++++++++++++-- drivers/usb/renesas_usbhs/rza.h | 1 + drivers/usb/renesas_usbhs/rza2.c | 13 +++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index 177fa3144a47..df94375f6c23 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -363,7 +363,7 @@ static void usbhsc_clk_disable_unprepare(struct usbhs_priv *priv) * platform default param */ -/* commonly used on old SH-Mobile SoCs */ +/* commonly used on old SH-Mobile and RZ/G2L family SoCs */ static struct renesas_usbhs_driver_pipe_config usbhsc_default_pipe[] = { RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_CONTROL, 64, 0x00, false), RENESAS_USBHS_PIPE(USB_ENDPOINT_XFER_ISOC, 1024, 0x08, true), @@ -565,6 +565,18 @@ static const struct of_device_id usbhs_of_match[] = { .compatible = "renesas,usbhs-r8a77995", .data = &usbhs_rcar_gen3_with_pll_plat_info, }, + { + .compatible = "renesas,usbhs-r9a07g043", + .data = &usbhs_rzg2l_plat_info, + }, + { + .compatible = "renesas,usbhs-r9a07g044", + .data = &usbhs_rzg2l_plat_info, + }, + { + .compatible = "renesas,usbhs-r9a07g054", + .data = &usbhs_rzg2l_plat_info, + }, { .compatible = "renesas,rcar-gen2-usbhs", .data = &usbhs_rcar_gen2_plat_info, @@ -581,6 +593,10 @@ static const struct of_device_id usbhs_of_match[] = { .compatible = "renesas,rza2-usbhs", .data = &usbhs_rza2_plat_info, }, + { + .compatible = "renesas,rzg2l-usbhs", + .data = &usbhs_rzg2l_plat_info, + }, { }, }; MODULE_DEVICE_TABLE(of, usbhs_of_match); @@ -642,7 +658,7 @@ static int usbhs_probe(struct platform_device *pdev) if (usbhs_get_dparam(priv, has_new_pipe_configs)) { priv->dparam.pipe_configs = usbhsc_new_pipe; priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_new_pipe); - } else if (!priv->dparam.pipe_configs) { + } else { priv->dparam.pipe_configs = usbhsc_default_pipe; priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_default_pipe); } diff --git a/drivers/usb/renesas_usbhs/rza.h b/drivers/usb/renesas_usbhs/rza.h index a29b75fef057..8b879aa34a20 100644 --- a/drivers/usb/renesas_usbhs/rza.h +++ b/drivers/usb/renesas_usbhs/rza.h @@ -3,3 +3,4 @@ extern const struct renesas_usbhs_platform_info usbhs_rza1_plat_info; extern const struct renesas_usbhs_platform_info usbhs_rza2_plat_info; +extern const struct renesas_usbhs_platform_info usbhs_rzg2l_plat_info; diff --git a/drivers/usb/renesas_usbhs/rza2.c b/drivers/usb/renesas_usbhs/rza2.c index f079817250bb..b83699eab373 100644 --- a/drivers/usb/renesas_usbhs/rza2.c +++ b/drivers/usb/renesas_usbhs/rza2.c @@ -71,3 +71,16 @@ const struct renesas_usbhs_platform_info usbhs_rza2_plat_info = { .has_new_pipe_configs = 1, }, }; + +const struct renesas_usbhs_platform_info usbhs_rzg2l_plat_info = { + .platform_callback = { + .hardware_init = usbhs_rza2_hardware_init, + .hardware_exit = usbhs_rza2_hardware_exit, + .power_ctrl = usbhs_rza2_power_ctrl, + .get_id = usbhs_get_id_as_gadget, + }, + .driver_param = { + .has_cnen = 1, + .cfifo_byte_addr = 1, + }, +}; From patchwork Mon Mar 18 17:33:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13595679 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D35B56470; Mon, 18 Mar 2024 17:33:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783230; cv=none; b=UOyPk3PNwsphDdfXqyrKL9fawimz684HHeyPcfyqTU7tr2ka8dGhVV8XYaeFR4RfzXfXGvNxk77YxgaP8Ng7Amg1/QF46I4obCRavcaW3bOmWeZsijt6jDwTwa3VUfS9HXIMIjnoEkdnfRT2sVwTi1RN715FQKa1uP6Z61zsbiU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710783230; c=relaxed/simple; bh=GfJDDBIkHGCJcvR5+gC5D60z78PI35H4CBxN2kgXd4E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oGCDdE2vG71H4bUfYbD9nXQj6ku7yck5AwS2Ha0ujA6yNSsXf8sIUxs3Nfeo5p4DTyNK+648jukk2fLdTY+/lEo7YnkMK3Yv2nKKsJl+hDv/ikJNgFvzzrnPswsNNo7uoLWZXcZG7gd0bbAwPa1uH/t2myDiTFNDeOKzMgfWkJw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.07,134,1708354800"; d="scan'208";a="202167619" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 19 Mar 2024 02:33:48 +0900 Received: from localhost.localdomain (unknown [10.226.93.20]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2934740359E9; Tue, 19 Mar 2024 02:33:43 +0900 (JST) From: Biju Das To: Greg Kroah-Hartman Cc: Biju Das , Geert Uytterhoeven , Magnus Damm , Huy Nguyen , Rob Herring , Yoshihiro Shimoda , Krzysztof Kozlowski , =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= , linux-usb@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das Subject: [PATCH v4 5/6] usb: renesas_usbhs: Remove trailing comma in the terminator entry for OF table Date: Mon, 18 Mar 2024 17:33:18 +0000 Message-Id: <20240318173319.201799-6-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> References: <20240318173319.201799-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove the trailing comma in the terminator entry for the OF table making code robust against (theoretical) misrebases or other similar things where the new entry goes _after_ the termination without the compiler noticing. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven --- v3->v4: * No change. v2->v3: * No change. v1->v2: * Added Rb tag from Geert. --- drivers/usb/renesas_usbhs/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index df94375f6c23..7ec1ab90fef3 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -597,7 +597,7 @@ static const struct of_device_id usbhs_of_match[] = { .compatible = "renesas,rzg2l-usbhs", .data = &usbhs_rzg2l_plat_info, }, - { }, + { } }; MODULE_DEVICE_TABLE(of, usbhs_of_match);