From patchwork Thu Mar 20 09:10:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 14023570 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05BFB1A238C; Thu, 20 Mar 2025 09:12:13 +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=1742461935; cv=none; b=nohwcKtD5eguopLr/wf8Hq//QgsFGUa86Y3JS6sXKQjwWnVVi3eMwp3yZjfNvOxsRPuG/YlgXeC/E0tSnlyVtwHG/SaQVFEwL51ALZl93yukp/bBs44zuScRiHqPSm3+UCC+XRl1lCYiHtNQW6Ln/oo07uJo8+P9ulg/ljGUgSY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742461935; c=relaxed/simple; bh=vColSZ5WT5gEfrUrsFBb6QQq65WX6Nent8DQr7358gc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ol8xSmIC1zw+wh7/jsqGOraY/i1Z0/xZyecHUY82nVbxfrgO8iPNAi69jG3yVyhRXHb3LLOG9zLv7IQemoC1hMl8lZK8stFyP7FgJVAYdXn3aUK5carlyoV1wghSbhdabuXoAUVLp/Hz084z+Dod+Lis3HeGPAjdUbj/HV+ldUg= 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-CSE-ConnectionGUID: MvxBWiW0TR62Bn5l3fQnvw== X-CSE-MsgGUID: HMP//zZ5SUu8on+zqgWhHQ== Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 20 Mar 2025 18:12:13 +0900 Received: from localhost.localdomain (unknown [10.226.93.24]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id E30EB4005B59; Thu, 20 Mar 2025 18:12:10 +0900 (JST) From: Biju Das To: Marc Kleine-Budde , Vincent Mailhol Cc: Biju Das , Wolfram Sang , Geert Uytterhoeven , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , linux-can@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH v6 17/18] can: rcar_canfd: Enhance multi_channel_irqs handling Date: Thu, 20 Mar 2025 09:10:48 +0000 Message-ID: <20250320091101.33637-18-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250320091101.33637-1-biju.das.jz@bp.renesas.com> References: <20250320091101.33637-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Currently multi_channel_irqs has only 2 channels. But RZ/G3E has six channels. Enhance multi_channel_irqs handling to support more than two channels. Reviewed-by: Geert Uytterhoeven Signed-off-by: Biju Das --- v5->v6: * No change. v4->v5: * Collected tag. v3->v4: * No change. v2->v3: * No change. v1->v2: * No change. --- drivers/net/can/rcar/rcar_canfd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c index 7ad27087a176..91f5649078c6 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -1851,16 +1851,19 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch, if (info->multi_channel_irqs) { char *irq_name; + char name[10]; int err_irq; int tx_irq; - err_irq = platform_get_irq_byname(pdev, ch == 0 ? "ch0_err" : "ch1_err"); + scnprintf(name, 10, "ch%u_err", ch); + err_irq = platform_get_irq_byname(pdev, name); if (err_irq < 0) { err = err_irq; goto fail; } - tx_irq = platform_get_irq_byname(pdev, ch == 0 ? "ch0_trx" : "ch1_trx"); + scnprintf(name, 10, "ch%u_trx", ch); + tx_irq = platform_get_irq_byname(pdev, name); if (tx_irq < 0) { err = tx_irq; goto fail;