From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 5665D36B90C for ; Fri, 11 Sep 2026 23:54:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789170847; cv=none; b=PfscXvSikg/MA3JJlYaQzkURXjSL3u2m+1TQjHihTJ3CYngGodf2iGGni+GNY1Lczgp7E0eP4SCyUGLwOMJc3gnhhQWce/xtiDi8oWJjdgn6xwg4+JKTPdkqcq9oCZUI4Ebh4MlAGuHv7LhEK2iJza2sfLetnn9MOIdrY1U4Ffw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789170847; c=relaxed/simple; bh=AhGRne8scMnXdCsxDSbn1g1zYM4uSCys9RuLljGwmns=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=APevUw2VUcG26sQy7pT/Jv5ooWuNRNhKN5LYhLAdBVMa1qMkch002OnaZEdG/kl7PBTMOz9zs6GDx2g4tsI8sG+Pz2O0dh4uvY/wdGqBipQBCD1C1qfQ4gf6TVyYaQ6T/o9S6UOFSSWIrSi0Zv9k5wpXYJlbcjM4SghMFWjQrKo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fZ5b8Uk9; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=thmv0Lpj; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fZ5b8Uk9"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="thmv0Lpj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789170840; 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=P01ICaDhB6Y/9B7lpP0PK4Bgc8sZGn3B2i3qpboQMSM=; b=fZ5b8Uk9pwtbuaCxOXiQ2Qe/AkY20wCy26fv6vWrGvIKQVPKb9PwQVyoCPRnXMdoWCr9eF /iUmXM5p46n7U8j+GLv6mpghniOpaMHY5kNoDLNHmGGI0UcA6Kiw9ZPhAcmYD2krIjYBRF O5LD7HSLwrYsLwi0abd1DRxJSTknnVU= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-686-UfWJre2pM5e3pobg77CCwA-1; Fri, 11 Sep 2026 19:53:59 -0400 X-MC-Unique: UfWJre2pM5e3pobg77CCwA-1 X-Mimecast-MFC-AGG-ID: UfWJre2pM5e3pobg77CCwA_1789170839 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-9394ad7f64aso225411385a.3 for ; Fri, 11 Sep 2026 16:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1789170839; x=1789775639; darn=vger.kernel.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=P01ICaDhB6Y/9B7lpP0PK4Bgc8sZGn3B2i3qpboQMSM=; b=thmv0LpjZ4EPz3NKWTkjlsEUzf7NLGDs7qbH5MCgrgE4Eri+01i31VuVH/iFmtKSrO FvMEDcnpyQB6co7pVDGOaHxUWXwqmpv+LHaym9kr9hNRvNkGrSBg2PTpMmkZMpYXHRCj QaO5qsPTnhs3DddmBGTxJaIXOvWzPfbbf+eP3/QzcETIjfcBAzLnI78ZS257T6ITQUvO SN1epTsv3A1Yi/lHCvit+1D6Us2uUnS/SeqEvb33ojDL/f2wjL1hzladhnSLC97aUAEN hvP9WAvqNwsm9GZxToIsVWsL+Ks478TcYTfl4w10Kq9mAwaZHI2OcO4kt2LoF6cEOxv8 2BHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1789170839; x=1789775639; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:content-type:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=P01ICaDhB6Y/9B7lpP0PK4Bgc8sZGn3B2i3qpboQMSM=; b=XxlvHpVxNLL9I8egKKoSipltMYj6JLtSlc1fi1FzWbFOOA9zMTguTbxZad9HzhIrMQ /d0vEJvqJbLk1UeiSu1QjDvW8r0ZQ3+ml7tf/eS3GhDOUHsDOEROrQemQSNQtKj16wIS wCBTwzFl3WNg6i8M8H10SY0FihgkvyCFRbItPTEuH0VA5tVCMU0w9o1eyRV1Uiybig5u yCdBmZZ6Aonc9kRTLBTnPGyVYBcKFP0FHbqCxIZT0bfbITifD10Mv8cDy90tP6BwAJLp XjCAFyJ8UYHn/lJ7gKLnbMolEDiygWAJzldPyHZ+CfcmY7oIim5est9kIpb7dLfGtytT u5IQ== X-Forwarded-Encrypted: i=1; AKwUvBzaqV+cUBVXzhcVMtzUjv+m0i+7uoA7b2MM7MiRbq11/TklMgRzKBv5YE9hGzj3MxiMH6B9qG0mbR1Q@vger.kernel.org X-Gm-Message-State: AFuF++kjguRRQ1LNDuDqcOS1zIoJq4N0Z2HGDa6HaBLLJAzBnvn2Jskc qEHC1eHmhOrBg08UgcTMM8oaM5e2x8qMsVWlHU0P47FTYaxtqAKSQM1x/VveHWNm/mJKB6fEQ1B q2FuO63//E2tp1yP7nyQva4KloYeN97ozk9HSZKTNUVqB8Sxr3l/xexQf7eVQwbA= X-Gm-Gg: AYBFou3fmiIDbGZVUoEpkRG5l0hiM1D0OtTcl6HZxV3E35FMO5rGqo2i+l2jRovhDS4 hIf49ILPAFNBnsv5CnIL0Slq3G7LT8Sk950CRz5epKw48wksrtTEHJKmt7AZFyx9B4AgY4g7XIy 1mkVeCWM2aK+8DCYxlaipgJ4TOGa0O6d8xjqBcgiY2CJ4Apk+pi2Z429JIuMiEB1mhYLbUvhZvU 9dr78sqC8Lq4nCT2xjk4UBC9hM5AWYPt/Tq2e8y4O7dGg5i/rpzA2oUYw1pTPYO+RKZ0jMa1TpU 3M50r4tQ+RG6D86J0ntSMk0vaGy7v0ds3oPzGYRpJMsp92Kf2H8d4MvNAnRe0DN6lqyIafhS+FA f7VK75dy9iiUt6Z/s/VyaN6gP1E/fu0gXUIw= X-Received: by 2002:a05:620a:6188:b0:939:5c62:fddd with SMTP id af79cd13be357-939ea134eb5mr1100339885a.19.1789170838699; Fri, 11 Sep 2026 16:53:58 -0700 (PDT) X-Received: by 2002:a05:620a:6188:b0:939:5c62:fddd with SMTP id af79cd13be357-939ea134eb5mr1100336485a.19.1789170838210; Fri, 11 Sep 2026 16:53:58 -0700 (PDT) Received: from redhat.com (c-73-183-53-213.hsd1.pa.comcast.net. [73.183.53.213]) by smtp.gmail.com with ESMTPSA id af79cd13be357-939e80e0c74sm368993485a.41.2026.09.11.16.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2026 16:53:56 -0700 (PDT) Date: Fri, 11 Sep 2026 19:53:55 -0400 From: Brian Masney To: =?iso-8859-1?Q?Beno=EEt?= Monin Cc: Vladimir Kondratiev , Gregory CLEMENT , =?iso-8859-1?Q?Th=E9o?= Lebrun , Stephen Boyd , Brian Masney , Jerome Brunet , Thomas Petazzoni , Tawfik Bayouk , linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: eyeq: Use devm_platform_ioremap_resource() Message-ID: References: <20260911-clk-eyeq-res-v1-1-39b04542db38@bootlin.com> Precedence: bulk X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260911-clk-eyeq-res-v1-1-39b04542db38@bootlin.com> User-Agent: Mutt/2.4.0 (2026-06-19) Hi Benoît, On Fri, Sep 11, 2026 at 01:48:47PM +0200, Benoît Monin wrote: > 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. > > 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. > > Suggested-by: Vladimir Kondratiev > Signed-off-by: Benoît Monin > --- > drivers/clk/clk-eyeq.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c > index cf37feccc734..bb680283b6f2 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; > > + base = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(base)) > + return PTR_ERR(base); > + > data = device_get_match_data(dev); > if (!data) > - return 0; /* No clocks nor auxdevs, we are done. */ > - > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (!res) > - return -ENODEV; > - > - base = ioremap(res->start, resource_size(res)); > - if (!base) > - return -ENOMEM; > + return 0; /* Early only clocks, stop here but keep resource reserved */ > > /* Init optional auxiliary devices. */ > eqc_auxdev_create_optional(dev, base, data->reset_auxdev_name); Can you make this one patch. > @@ -1175,6 +1170,7 @@ static const struct of_device_id eqc_match_table[] = { > { .compatible = "mobileye,eyeq5-olb", .data = &eqc_eyeq5_match_data }, > { .compatible = "mobileye,eyeq6l-olb", .data = &eqc_eyeq6l_match_data }, > { .compatible = "mobileye,eyeq6lplus-olb", .data = &eqc_eyeq6lplus_match_data }, > + { .compatible = "mobileye,eyeq6h-central-olb" /* no data, early only */ }, > { .compatible = "mobileye,eyeq6h-west-olb", .data = &eqc_eyeq6h_west_match_data }, > { .compatible = "mobileye,eyeq6h-east-olb", .data = &eqc_eyeq6h_east_match_data }, > { .compatible = "mobileye,eyeq6h-south-olb", .data = &eqc_eyeq6h_south_match_data }, > And this a second patch? Otherwise this looks good to me. Brian