Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3546247ybf; Tue, 3 Mar 2020 07:54:58 -0800 (PST) X-Google-Smtp-Source: ADFU+vuAlq5vZwpReRrzX+Rtftl0Dq+uzzkeRbQn9T66pcsw7KOvvTE5iEJNKytOz/o5VEiuu4cZ X-Received: by 2002:aca:4e58:: with SMTP id c85mr2916179oib.115.1583250898041; Tue, 03 Mar 2020 07:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583250898; cv=none; d=google.com; s=arc-20160816; b=BKK77vrCOBarSRXx1tRSsBK9O8xRaoDjXYrL2cx/I48qRRnk6NFKXUTj76kqyOuTNF r4nrmgZjrj7kAVpCqwDjsTOUMkPvNhPLw0pKPvCLxE6tevhEbPCcG2cGr5HCtdnbRrqQ akqVrT8yVCk9ujm1PiU1Sma1wsTvf2REWsTrzMB59ubJPo+ecYPInYD4DPhr75zot+mO RZ04Ik161s+fqJbzPuEi2Xm1PXQIk2zSRnxvqGOgpgbSqaWqNj9dJEL2xxxsVLWnnm/X bORSe2GRvrplOYt75LnW5hQs+BOk8slwwIqvtE4pCJc87q8yVfGriwXs0mTd1hzz7yJa dWmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=We9hKUOb5/GmeQY53Xtn0VT7EhC2TrryfAgJsKh1aYc=; b=ggkZDieU97fn2CTPWT/BHWPrvI2cvh/abaVihscc+toDze1l5v+hFw92vo+Xn3MjP9 CdKq2/M40ytFWsTYdGMStFqPgJaL2GG/DMHeD6mHf3QbCYj2JPHSYry+I5gZcvcfaDa4 LgUeIuX+65AzR9IiGZoyfpFRZXRkwVxY0BX48h9cWuJSObPH0J9P+8yng6KoJ36IdNr7 yYUc2ynDp9HQL/rQ3XcgLlMjYptLByJfsj1ozuhNPadZ3E52jCaYiEk1ficuAQaZNNBn O0RO/IYjqFGdsJ1mmlKP47Z5njI2GKn6wY14OzDvsJL2wp2QDxQ6tKM0WgLkgEbgCW8n W7Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WKRGqnxH; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j18si7704148oii.42.2020.03.03.07.54.45; Tue, 03 Mar 2020 07:54:58 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WKRGqnxH; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729968AbgCCPfg (ORCPT + 99 others); Tue, 3 Mar 2020 10:35:36 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:43392 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729537AbgCCPfg (ORCPT ); Tue, 3 Mar 2020 10:35:36 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 023FZNri088793; Tue, 3 Mar 2020 09:35:23 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1583249723; bh=We9hKUOb5/GmeQY53Xtn0VT7EhC2TrryfAgJsKh1aYc=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=WKRGqnxHkAr8CnJvXox0Sb4qtkXxzfGnF+W16wliI8Sf6j0VfYxBXUIZ94TZ9wuSe 5P5+wlsPGYplDtANMyXJI1MKZusiefLeCG8FbLUxApE2RWBFjZalf4J8/2/OMuCuEV W/vk+K2MKv4uSkUF6KUxJhqr3k7ELgRAP0DyEU5c= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 023FZNKn047025 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Mar 2020 09:35:23 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 3 Mar 2020 09:35:22 -0600 Received: from localhost.localdomain (10.64.41.19) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 3 Mar 2020 09:35:22 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by localhost.localdomain (8.15.2/8.15.2) with ESMTP id 023FZIKM112679; Tue, 3 Mar 2020 09:35:19 -0600 Subject: Re: [PATCH 3/3] bus: ti-sysc: Implement display subsystem reset quirk To: Tony Lindgren CC: , "Andrew F . Davis" , Dave Gerlach , Faiz Abbas , Greg Kroah-Hartman , Keerthy , Nishanth Menon , Peter Ujfalusi , Roger Quadros , Suman Anna , Tero Kristo , , , Jyri Sarha , Laurent Pinchart , References: <20200224191230.30972-1-tony@atomide.com> <20200224191230.30972-4-tony@atomide.com> <7d4af3b5-5dd7-76b3-4d3f-4698bfde288c@ti.com> <20200303151349.GQ37466@atomide.com> From: Tomi Valkeinen Message-ID: <8cadd536-668a-4309-1878-7db2362717d2@ti.com> Date: Tue, 3 Mar 2020 17:35:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200303151349.GQ37466@atomide.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Tomi -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki