From patchwork Thu Feb 20 13:04:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13983909 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 27D6C1F6694; Thu, 20 Feb 2025 13:05:01 +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=1740056702; cv=none; b=sT2qSY8Fy+uxD8hwC5e5a8B8tOIwii+8ziRiOqlm2LU5Z21Ui8OZnuf6TwZprQppVlSo8ez3qkQhQR7mJC14c/kD9EyILNxbq6tdX/rzCE68f4FHUhO11ypayGn9eE0BHrd5nhj2gE5hL+c0u8bv+hQg/VNu/G4p4XHzghEOvL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740056702; c=relaxed/simple; bh=sRipYo2nz4oHqSK8yvPcMHxObFNNWIl1sR3X4mia0L4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ScJ8kdlU0Vmb9t3RfEesDsvZxKm5nrMgiN1xsO+XP4fwTjVwCvyuNctFpJ/8wfzp06DmEaMyirxLSsQAfJbez0+CAekin+LQX2ZePEyBp4EJsIUsMdGBJUV2Y1xb8Q/Qf8aPS3ht0XKzatIWKzl7w+89W/wprsRJhXtiqUVCsXk= 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-CSE-ConnectionGUID: R/LmcRYAR12828T9RCTYYw== X-CSE-MsgGUID: We60qvn+S3Ksxq+F+NkVJg== Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 20 Feb 2025 22:05:00 +0900 Received: from localhost.localdomain (unknown [10.226.92.83]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 7D7D842B36D8; Thu, 20 Feb 2025 22:04:57 +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 v2 6/7] can: rcar_canfd: Enhance multi_channel_irqs handling Date: Thu, 20 Feb 2025 13:04:22 +0000 Message-ID: <20250220130427.217342-7-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250220130427.217342-1-biju.das.jz@bp.renesas.com> References: <20250220130427.217342-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. Signed-off-by: Biju Das --- 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 f353a9d560e8..bf2561168e98 100644 --- a/drivers/net/can/rcar/rcar_canfd.c +++ b/drivers/net/can/rcar/rcar_canfd.c @@ -1748,16 +1748,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;