From nobody Fri Sep 25 05:30:47 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 C76584A0EE2; Wed, 16 Sep 2026 12:09:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789560568; cv=none; b=jQMsksFGphOtbSXi+n0LwQPx9s7sSh6XgiFEFThDwifq6SgekjbWdGAww6igreC7wL9IlUO0Jy8/SnPFlX1TiXUnR7UfVee1en+QiJfaNBVqjRE3CV8purBmr+ZKFgRNdC76AFjXAWrfiPxIS6z4Ak/pOs9ibr+2WwA/nzw/I0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789560568; c=relaxed/simple; bh=qDZDH+1AlPLECXu4wvgeFIpUeBMQ98J3KYKtgJqJMSQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VCCXl7wlSDO1eOW6prfIIWUVm5YNPvxsHd7dnS7q9mYgBIh/PAiIHwbbnUPpTMUcH5vz2E9tuYtFOwFp1UQB7OH5d4WQJUYZWFxfNYbSlAzl47at/U1R6Ld7/E4MXi7mY5pxYd3vmo4fZ1mhPFzh7lPQuNW1lWzphyE+tV7biZA= 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=ykPKu8yu; arc=none smtp.client-ip=185.246.85.4 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="ykPKu8yu" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id EE25D4E40702; Wed, 16 Sep 2026 12:09:14 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id BBBE060337; Wed, 16 Sep 2026 12:09:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id EFA5C11C7B01C; Wed, 16 Sep 2026 14:09:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1789560550; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=4VPSlb7J/nUbt2N+LVFTubDJY5YTbYvQwFuOvh7mUso=; b=ykPKu8yu0iZsknn1ocwAKbeuWm58CSSXMlFS7AfC46SCORTLJfTDW55YkUUwfjim0aWazm FqUeuGpPNcfUskq6zq9ltAdB7zq1AEnijAn7vva/pTCxo0oxDiXARmfrRl5L2Ah26s+edm 2dqvh6KU+tK6Ct8+fOZC23U2OMzET5sgYmPlMWaMeSuLnMQrFxEQyXrD8bIKHNPsdbc6zL B/fDarSkv+0QWUURtGx7jQSIR6OpeNodnMCizBk3PLQHFVfcBW63J41VlxTymWh7awgNM4 PYN4iAQbdduSkGHaPYs84pptMwSqRNn8cl24T4QZuty8lDqbhMYpr9Blgn1C2A== From: =?utf-8?q?Beno=C3=AEt_Monin?= Date: Wed, 16 Sep 2026 14:08:54 +0200 Subject: [PATCH v3 1/2] clk: eyeq: Use devm_platform_ioremap_resource() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260916-clk-eyeq-res-v3-1-93a3b831a5d0@bootlin.com> References: <20260916-clk-eyeq-res-v3-0-93a3b831a5d0@bootlin.com> In-Reply-To: <20260916-clk-eyeq-res-v3-0-93a3b831a5d0@bootlin.com> To: Vladimir Kondratiev , Gregory CLEMENT , =?utf-8?q?Th=C3=A9o_Lebrun?= , Stephen Boyd , Brian Masney , Jerome Brunet Cc: =?utf-8?q?Beno=C3=AEt_Monin?= , Thomas Petazzoni , Tawfik Bayouk , linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3 Convert eqc_probe() from the open-coded platform_get_resource() + ioremap() sequence to devm_platform_ioremap_resource(). Besides less code, this requests the memory region so the OLB registers are properly reserved in the iomem_resource tree. Move devm_platform_ioremap_resource() before checking for device match data, so OLBs bound without match data also get their memory region mapped and reserved. Unregister the clocks before devres unmaps the region if the clock provider registration fails. Suggested-by: Vladimir Kondratiev Signed-off-by: Beno=C3=AEt Monin --- drivers/clk/clk-eyeq.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c index cf37feccc734..3c00be00889a 100644 --- a/drivers/clk/clk-eyeq.c +++ b/drivers/clk/clk-eyeq.c @@ -513,21 +513,16 @@ static int eqc_probe(struct platform_device *pdev) const struct eqc_match_data *data; struct clk_hw_onecell_data *cells; unsigned int i, clk_count; - struct resource *res; void __iomem *base; int ret; =20 + base =3D devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + data =3D device_get_match_data(dev); if (!data) - return 0; /* No clocks nor auxdevs, we are done. */ - - res =3D platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - - base =3D ioremap(res->start, resource_size(res)); - if (!base) - return -ENOMEM; + return 0; /* No clocks nor auxdevs, stop here but keep resource reserved= */ =20 /* Init optional auxiliary devices. */ eqc_auxdev_create_optional(dev, base, data->reset_auxdev_name); @@ -559,7 +554,20 @@ static int eqc_probe(struct platform_device *pdev) dev_warn(dev, "failed probing clock %s: %d\n", clk->name, ret); } =20 - return of_clk_add_hw_provider(np, of_clk_hw_onecell_get, cells); + ret =3D of_clk_add_hw_provider(np, of_clk_hw_onecell_get, cells); + if (ret) { + for (i =3D 0; i < data->clk_count; i++) { + const struct eqc_clock *clk =3D &data->clks[i]; + struct clk_hw *hw =3D cells->hws[clk->index]; + + if (!IS_ERR_OR_NULL(hw) && clk->unregister) + clk->unregister(hw); + } + + kfree(cells); + } + + return ret; } =20 #define DIV(_index, _parent_idx, _name, _parent_name, \ --=20 2.55.0 From nobody Fri Sep 25 05:30:47 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 9DE97468C13 for ; Wed, 16 Sep 2026 12:09:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789560571; cv=none; b=E4YihW1y5k+LRqMCjwc6veZErrqehaoxYsrRvw+lTmMOW6k5Hgz2arrloQPAJUWkTB5p54ZTt1JDjUv26wIKi1RiL4u1rZzHtKbhYUvYPObCV30ptW55kSVYiUoDPL+ZPeLXoNwJB1fkdYlvIdSdpK3DYFXQVMYCfmx9+MxgqTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789560571; c=relaxed/simple; bh=oxAbotWaFB2N+jjEcpt6qO0uM9bVk5UKzEWYcyG4ePU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NC0QE+a+LR1Ln++yMSACMX0gw8wDU/cEY5SITU3ap5faGQXPI7nsuph77gp08G+zKiK9r8uCqDYm/k3P0vLoRYHlDK3ZrIosilr40KPwU/mER3ub3OirBwdBerPzl4992a2BY6/nlS+PsM8iNuc0xxk4mW0bRVRpqdsUi6xz5to= 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=rm/dVyy3; arc=none smtp.client-ip=185.171.202.116 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="rm/dVyy3" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id E838EC5CD57; Wed, 16 Sep 2026 12:10:03 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 044DE60337; Wed, 16 Sep 2026 12:09:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 431A911C7AFE8; Wed, 16 Sep 2026 14:09:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1789560555; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=fyLE9zoLiTs8qfHE4MYa6cDtfGbGDtLzIx/O+uanbMk=; b=rm/dVyy3PTLU1baPY74RWGsXoV9PcgfrmD1rzGkajQvXdSeIY2xvX/2NXeTvfVioShUPHs oVmXeIZfORLjpvqVBPmCuGJZgIgh+uGBWK53CD3pTwdLgQLB8BSgE4PQxyWQeFpT+76qTU fcqY2e3x4Bq3liBsHzKbuxLoUI6rM3GA3J7wK5uM86Rd3FCNtClHyqFKPfdJknEEjpt/Pl gKdhfiyRPXWZGkS9ENus5KS33ERyXeB/6vVIxg9qQ0CZLS3Q39NwVnzakSQFZ090y8vT5j cVMezkEZDSLt4xLnTeuy67y1SPvNSYMWfvcRIT4cHFU3LnM68dvjYynk3wri9Q== From: =?utf-8?q?Beno=C3=AEt_Monin?= Date: Wed, 16 Sep 2026 14:08:55 +0200 Subject: [PATCH v3 2/2] clk: eyeq: Add mobileye,eyeq6h-central-olb compatible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260916-clk-eyeq-res-v3-2-93a3b831a5d0@bootlin.com> References: <20260916-clk-eyeq-res-v3-0-93a3b831a5d0@bootlin.com> In-Reply-To: <20260916-clk-eyeq-res-v3-0-93a3b831a5d0@bootlin.com> To: Vladimir Kondratiev , Gregory CLEMENT , =?utf-8?q?Th=C3=A9o_Lebrun?= , Stephen Boyd , Brian Masney , Jerome Brunet Cc: =?utf-8?q?Beno=C3=AEt_Monin?= , Thomas Petazzoni , Tawfik Bayouk , linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Last-TLS-Session-Version: TLSv1.3 Add an entry for mobileye,eyeq6h-central-olb without match data: its clocks are all registered by the early init and it has no auxiliary devices, so probe() now reserves its region and stops there. Signed-off-by: Beno=C3=AEt Monin --- drivers/clk/clk-eyeq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c index 3c00be00889a..ae0faee31689 100644 --- a/drivers/clk/clk-eyeq.c +++ b/drivers/clk/clk-eyeq.c @@ -1183,6 +1183,7 @@ static const struct of_device_id eqc_match_table[] = =3D { { .compatible =3D "mobileye,eyeq5-olb", .data =3D &eqc_eyeq5_match_data }, { .compatible =3D "mobileye,eyeq6l-olb", .data =3D &eqc_eyeq6l_match_data= }, { .compatible =3D "mobileye,eyeq6lplus-olb", .data =3D &eqc_eyeq6lplus_ma= tch_data }, + { .compatible =3D "mobileye,eyeq6h-central-olb" /* no data, early only */= }, { .compatible =3D "mobileye,eyeq6h-west-olb", .data =3D &eqc_eyeq6h_west_= match_data }, { .compatible =3D "mobileye,eyeq6h-east-olb", .data =3D &eqc_eyeq6h_east_= match_data }, { .compatible =3D "mobileye,eyeq6h-south-olb", .data =3D &eqc_eyeq6h_sout= h_match_data }, --=20 2.55.0