Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3681008ybl; Sun, 25 Aug 2019 21:54:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEozOJPnm/akgLn/7VECHx0JyFTaSdrlKwuBv6AoAL5I/rCmazh59S8zPrCzKQSAqjgoFA X-Received: by 2002:aa7:8e44:: with SMTP id d4mr1687021pfr.220.1566795289926; Sun, 25 Aug 2019 21:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566795289; cv=none; d=google.com; s=arc-20160816; b=jygGO/Z4IojgB7VtMDnGWjpZ5tzcdlzQngBKQBLl9jEMdSUuyo2100CMBCrbQ0wiGg Kx1I9h/PXuXZyoqQ8EZUyYONJI21qScnpzQCfV6BX3xi2aaCZkR7PIV0Cwf0HhlLK7G2 IMM7tw0dYAiZhFSKmSfOUSEift6OzBpzzylip+SyfJOapkxk9Gb3w6yAazGygXx4nnpw pZvQ48AgoTS0zrme7f7deEnHy/nshko69EjkGQNY/yxmjJiluv1HWAtKurS8/L7/6WD6 CSq6ZD3zs1m8XaOnCH5fGo9ChgrwuhPi3kwhzo6m4dm6TFKz3kzmx/Nv9630RgwcKw1l Fo/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=awQCctHBv4fO+Dy71MQPHodE6WJLY59Q+H1lPFGndos=; b=o3HC9AUgxbPqIBPoQXfJOj4KofebYKKCeR6GFhbn/bIxq1WQOsLZ+85hQ72aiwxaQH 6yyxTXWDaNJSpb52UW478dkOT6Ya7pM+p2aY6oEDTHCUGIh5k08bD9zbSwqls3M9kFYB wdsr43nEN0/93QMoVeW6gmA3AMRdq4hFWFnRSQdbaJsa+InWdhQ/M6Y/55fQW2SGXnvS ifAfPTXlhtdhnoSqU04+nE4Q5xsWSddBSgNnUumBeS+v0sThheHkwzfRdVXp0ADrmh1m zMiOwi7YmsdLS13curOswvqkf4Wdwbj439guxJPjZpKpKSFicB3UXvMCy6s9ccMLQnk9 /C5g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j62si7700287pgd.170.2019.08.25.21.54.34; Sun, 25 Aug 2019 21:54:49 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725446AbfHZEBJ (ORCPT + 99 others); Mon, 26 Aug 2019 00:01:09 -0400 Received: from mga11.intel.com ([192.55.52.93]:15516 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbfHZEBI (ORCPT ); Mon, 26 Aug 2019 00:01:08 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Aug 2019 21:01:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,431,1559545200"; d="scan'208";a="379508788" Received: from linux.intel.com ([10.54.29.200]) by fmsmga005.fm.intel.com with ESMTP; 25 Aug 2019 21:01:07 -0700 Received: from [10.226.39.5] (leichuan-mobl.gar.corp.intel.com [10.226.39.5]) by linux.intel.com (Postfix) with ESMTP id C8AAE580444; Sun, 25 Aug 2019 21:01:05 -0700 (PDT) Subject: Re: [PATCH v2 2/2] reset: Reset controller driver for Intel LGM SoC To: Martin Blumenstingl , eswara.kota@linux.intel.com Cc: cheol.yong.kim@intel.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, p.zabel@pengutronix.de, qi-ming.wu@intel.com, robh@kernel.org, hauke@hauke-m.de References: <90cc600d6f7ded68f5a618b626bd9cffa5edf5c3.1566531960.git.eswara.kota@linux.intel.com> <20190824211158.5900-1-martin.blumenstingl@googlemail.com> From: "Chuan Hua, Lei" Message-ID: <3813e658-1600-d878-61a4-29b4fe51b281@linux.intel.com> Date: Mon, 26 Aug 2019 12:01:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: <20190824211158.5900-1-martin.blumenstingl@googlemail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, Thanks for your comment. On 8/25/2019 5:11 AM, Martin Blumenstingl wrote: > Hi Dilip, > >> Add driver for the reset controller present on Intel >> Lightening Mountain (LGM) SoC for performing reset >> management of the devices present on the SoC. Driver also >> registers a reset handler to peform the entire device reset. > [...] >> +static const struct of_device_id intel_reset_match[] = { >> + { .compatible = "intel,rcu-lgm" }, >> + {} >> +}; > how is this IP block differnet from the one used in many Lantiq SoCs? > there is already an upstream driver for the RCU IP block on the Lantiq > SoCs: drivers/reset/reset-lantiq.c > > some background: > Lantiq was started as a spinoff from Infineon in 2009. Intel then > acquired Lantiq in 2015. source: [0] > Intel is re-using some of the IP blocks from the MIPS Lantiq SoCs > (Intel even has some own MIPS SoCs as part of the Lantiq acquisition, > typically used for PON/GPON/ADSL/VDSL capable network devices). > Thus I think it is likely that the new "Lightening Mountain" SoCs use > an updated version of the Lantiq RCU IP. I would not say there is a fundamental difference since reset is a really simple stuff from all reset drivers.  However, it did have some difference from existing reset-lantiq.c since SoC becomes more and more complex. 1. reset-lantiq.c use index instead of register offset + bit position. index reset is good for a small system (< 64). However, it will become very difficult to use if you have  > 100 reset. So we use register offset + bit position 2. reset-lantiq.c does not support device restart which is part of the reset in old lantiq SoC. It moved this part into arch/mips/lantiq directory. 3. reset-lantiqc reset callback doesn't implement what hardware implemented function. In old SoCs, some bits in the same register can be hardware reset clear. It just call assert + assert. For these SoCs, we should only call assert, hardware will auto deassert. 4. Code not optimized and intel internal review not assessed. Based on the above findings, I would suggest reset-lantiq.c to move to reset-intel-syscon.c What is your opinion? Chuanhua > > > Martin > > > [0] https://wikidevi.com/wiki/Lantiq