Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3547608ybf; Tue, 3 Mar 2020 07:56:38 -0800 (PST) X-Google-Smtp-Source: ADFU+vuQ7SLKGh+Ec00PmIZEBwts8lagAx1xg8yXv8mMcKhQHzYHV6YoaY894yt4Gq4npD6iUtwA X-Received: by 2002:aca:230e:: with SMTP id e14mr2757320oie.169.1583250998413; Tue, 03 Mar 2020 07:56:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583250998; cv=none; d=google.com; s=arc-20160816; b=qm3HxUKtuJPHpixoCrDTYPdya7JH48jdB2puCCkau7MIOHliJgu2CorLRV2tDhrSjp FcUc6u9oJaSSIy1gNBFmwQcnd3igG8qitcilEm4uG/cHRDuG6N3XgNUHfOuYDgb1o0ZU lq2l3ATWihPcgJXHqdsfdQGfhQBDglanEYY0w01s1KqGCYytUzzsaQwZLihYnXsJL5hZ BHzFjuAYM+xmDYI8xnsBs6QmXYgCnHJYEuK5wQzxa+lzyzX7P13x/jesLYvABJn5y4DO gj3abGTbahhHkR6W4P4yGFtboDSuyjAp1fkNRacnZm0LjJiaYsLU5xvpmf8gb3Ip0T/0 8F4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zYidW4t+zetwJOQbzOU5opDOx6CuHJhklwflwjbKgI0=; b=cMLMCr9/J7ssdmHiGTzo/G9o1LMGenU2TiQYVxoXK6ROzmQAwvgMHSIOAoaIZoZvrx nikvWWUG/5e+ONafT1HIIEBPbUPdMmrBQUXEWXf6A19bRyE9+tAvYqpsRisxmCTda7V1 +2q6SD4dEgQMxXEh2Zdy23/sYQhbLtZ3eyYrCFBJ5ELPDtY+m3m5Pi2Cvdi/+aCvylpj ri52muMIY04lfy6J12s+IL9MBVueNg8vRl9yH0xpr+z/JOzaiwy7qEGacxfykEdsm4Y/ qFlJXIdy1rRFdvRA2JwEewqsxLPG58uajz8fM4ZePKzfVcX6UvpK1OQGbXYB6uUt1jiB HU+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x79si8481481oif.180.2020.03.03.07.56.26; Tue, 03 Mar 2020 07:56:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730140AbgCCPoZ (ORCPT + 99 others); Tue, 3 Mar 2020 10:44:25 -0500 Received: from muru.com ([72.249.23.125]:58578 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgCCPoY (ORCPT ); Tue, 3 Mar 2020 10:44:24 -0500 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id A551480EE; Tue, 3 Mar 2020 15:45:08 +0000 (UTC) Date: Tue, 3 Mar 2020 07:44:20 -0800 From: Tony Lindgren To: Tomi Valkeinen Cc: linux-omap@vger.kernel.org, "Andrew F . Davis" , Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Keerthy , Nishanth Menon , Peter Ujfalusi , Roger Quadros , Suman Anna , Tero Kristo , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jyri Sarha , Laurent Pinchart , dri-devel@lists.freedesktop.org Subject: Re: [PATCH 3/3] bus: ti-sysc: Implement display subsystem reset quirk Message-ID: <20200303154420.GS37466@atomide.com> References: <20200224191230.30972-1-tony@atomide.com> <20200224191230.30972-4-tony@atomide.com> <7d4af3b5-5dd7-76b3-4d3f-4698bfde288c@ti.com> <20200303151349.GQ37466@atomide.com> <8cadd536-668a-4309-1878-7db2362717d2@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cadd536-668a-4309-1878-7db2362717d2@ti.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Tomi Valkeinen [200303 15:36]: > On 03/03/2020 17:13, Tony Lindgren wrote: > > Hi, > > > > * Tomi Valkeinen [200303 06:03]: > > > On 24/02/2020 21:12, Tony Lindgren wrote: > > > > + /* Remap the whole module range to be able to reset dispc outputs */ > > > > + devm_iounmap(ddata->dev, ddata->module_va); > > > > + ddata->module_va = devm_ioremap(ddata->dev, > > > > + ddata->module_pa, > > > > + ddata->module_size); > > > > > > Why is this needed? The range is not mapped when sysc_pre_reset_quirk_dss() > > > is called? This will unmap and remap twice, as this function is called > > > twice. And then left mapped. > > > > That's because by default we only ioremap the module revision, sysconfig > > and sysstatus register are and provide the rest as a range for the child > > nodes. > > > > In the dss quirk case we need to tinker with registers also in the dispc > > range, and at the parent dss probe time dispc has not probed yet. > > > > We may be able to eventually move the reset quirk to dispc, but then > > it won't happen in the current setup until after dss top level driver > > has loaded. > > > > We leave the module range ioremapped as we still need to access > > sysconfig related registers for PM runtime. > > Ok, makes sense. I guess a minor improvement would be to unmap & remap once > in sysc_pre_reset_quirk_dss before calling sysc_quirk_dispc. Yeah well we'd have to sprawl the module specific quirk checks there too then. I thought about using the whole module range for modules with a large IO range, but so far DSS is the only one needing a quirk hadling covering also child modules like this. Regards, Tony