Received: by 10.192.165.148 with SMTP id m20csp4961343imm; Tue, 24 Apr 2018 11:14:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+vj/GsdI6vBBhUwiIZp9hParY84Mb69gl7/RbosBTSuYMqy8XzzhGh81YXvDRjfKFA2jCr X-Received: by 10.101.87.138 with SMTP id b10mr21091723pgr.241.1524593648528; Tue, 24 Apr 2018 11:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524593648; cv=none; d=google.com; s=arc-20160816; b=TaWhKUUrBKrm9ixhbf1KqM+Iur9GT6KqNZ4dVF0X+XMlWY8pwbSavkE+sjwBgMuUaO WOLrS8TTH0WU1KLYCPBgPtp8dYtya4wPi98iB+SRcEX8gjrQmufVHWq8izgVeJWhVYbX 0/l0ASR94EFtpQkyeoIX6aBn0cxn2SvMFCG+FnQ555Gt8n7U0xvoGD0jXX88/mHBU50p PFdawcN4JxgE1+jDenF+L7GgKm2g6G+9OmBJlQL5kxEkYqwfm2Lbcfr5yb/Suww3/+dI KNBqbWxIaAEPXceoSC9G+VdqvdOvQR/9JCqTII9ti/CJhwz/KjzMjpkjl0uoGQgoq1TL BfSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=6rLbWN6hzK3s7LnO82jzIV3W1tAvVPZxrKW1SQ1FTAE=; b=KPOjb/camxvm0oKAteluOlpjTYtWgpBywh8POs3IToyChVXLIvrxuyLZqLKyCkhE0u +WjCwdP90Q0ziyOS+SkvhTt7d4E/9C2qBAfuVTvxHZyLpus2+h8DYErze3lsmovtMro+ ndjb9auenbyTGSyWOhPTV3RCmcacsxq7j63xfZanBeoX5QO1t/VF3UET4lcrRLz4OAcz +IlqlVdbqV3DBfJbDoxq6mLjvAwC8ZW6hv4wyHaDOSvtgrEoUwU4uzXMhO78kzXE0QPS m4mTmF3/TIixhSEnDnwfmGC1K9aFBoA9QIgPeiRQjuqIVhhE4/rQOWMnqz4MGZf96vzv z6VQ== 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 t11si11759247pgv.123.2018.04.24.11.13.53; Tue, 24 Apr 2018 11:14:08 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751785AbeDXSMm (ORCPT + 99 others); Tue, 24 Apr 2018 14:12:42 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:46314 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeDXSMk (ORCPT ); Tue, 24 Apr 2018 14:12:40 -0400 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1fB2CO-0007Ay-00; Tue, 24 Apr 2018 17:57:52 +0000 Date: Tue, 24 Apr 2018 13:57:52 -0400 From: Rich Felker To: Bartosz Golaszewski Cc: Sekhar Nori , Kevin Hilman , David Lechner , Michael Turquette , Stephen Boyd , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Yoshinori Sato , Frank Rowand , "Rafael J . Wysocki" , Jarkko Sakkinen , Dmitry Torokhov , Arend van Spriel , Heikki Krogerus , Michal Suchanek , Jan Kiszka , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 00/11] platform: device tree support for early platform drivers Message-ID: <20180424175752.GC3094@brightrain.aerifal.cx> References: <20180424173051.15099-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180424173051.15099-1-brgl@bgdev.pl> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 24, 2018 at 07:30:40PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Device tree based systems often use OF_DECLARE() macros for devices > that need to be initialized early in the boot process such as clocks, > timers etc. However platform devices are more desirable. > > This series aims at introducing support for early platform drivers for > OF-based systems. > > The idea is to have a special compatible fallback string: "earlydev" > that similarily to "syscon" would be added to device nodes that need > early probing. We then need to call of_early_platform_populate() early > in the boot process to actually probe the registered devices. This makes no sense to me. It's not the device tree that should contain the knowledge that these need to be registered/probed early in the boot. That need is a property of the operating system/device drivers, and so the *drivers* should be the ones that contain the knowledge. > I am aware that this new compatible does not strictly correspond with > the "hardware description only" rule of DT, but we already have many > functionalities that break this rule: syscon, gpio hogs etc. > > The first user of this new functionality will be the DaVinci platform > for which we want to probe the pll, psc and timer drivers early in the > boot sequence but keep them implemented as platform drivers. > > In the future, if this series gets accepted, this could become and > alternative to TIMER_OF_DECLARE, CLK_OF_DECLARE etc. and could lead > to deprecating of those macros in favor of early platform drivers. This seems completely unacceptable, in that it would render new kernels unable to boot on existing device trees (which may be hard-coded in rom on existing devices). Rich