Received: by 10.192.165.148 with SMTP id m20csp470837imm; Wed, 25 Apr 2018 02:35:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx490ob8PulFLg32xFh/vuI+q25kxFSEfrS++SdUgHIllntzdgF2dop6j0JkaExMjjqiG1D3A X-Received: by 10.98.72.209 with SMTP id q78mr21865789pfi.70.1524648936835; Wed, 25 Apr 2018 02:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524648936; cv=none; d=google.com; s=arc-20160816; b=M9jzQO7QQCOrEdOlum9Pn5v+v8PjFtPnwEo2xxl4pO0Wpy6IVswuK4IYAOTSbF9VxB C2aNDW/bmI5dlhHxB1z0nPpDK+QkVIGhvszkrVbAJorwMXodSpljqkpxC+1x3gumzKx6 2rqHQSvhk+YhTBdKMAtrdRZZp+HYbvG7uLc0AVNMJkDZ0hzrr5FFm0Q2hvuP69SUlUWN iNx7ewY6jHUX3kBNf6iOFBCwFRqIgxHS+T393w67wuz0GCQDU4bt0TD/0tr4T7JmhUP5 wZ0f6Y3B2d+yK7pobQ0Kd//WFYqQt3Acy+efR3FlSnpRKxZJisBv9kzD8cn71B4pjSR9 UAvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Jle9oAkruTMX9FHJzTpZhZvz2zJME9FDQImUaQw6NNI=; b=vn7RrbBtVsZm8hJZ2IptVU20ILntTnoWnBkmBUqT576sNZh8f5/y0jhtOu0NQJtq3H EKOtbKNAd5hqlIaW20In2+GRV+Lb8IdZ4HZjjRMOHRz9zokxdIfsIK4kxXj+eCuBNUgi ZR8gW+YmStduDqokHsC+YE/Y4m74G7ihKlGaoDwFqhEOFMJyOUMCyN99sBcX07ijjF3A CJ075XTN6bXLEW0Oia0YVnzVWgegwtEg9iKdGtuTja6uU34FHl7SgRRbzvowxO61Fm9f jzXawRb7peTs2SjEGGqViv0z2wC4P1pHwd8HqUOxlbO+0t7MRGy4SYFN5di0VanUtrVt 3HLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=I6qORGPq; 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 w130si636684pfd.169.2018.04.25.02.35.22; Wed, 25 Apr 2018 02:35:36 -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; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=I6qORGPq; 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 S1752020AbeDYJdw (ORCPT + 99 others); Wed, 25 Apr 2018 05:33:52 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:38067 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbeDYJdn (ORCPT ); Wed, 25 Apr 2018 05:33:43 -0400 Received: by mail-it0-f66.google.com with SMTP id 19-v6so18578360itw.3 for ; Wed, 25 Apr 2018 02:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Jle9oAkruTMX9FHJzTpZhZvz2zJME9FDQImUaQw6NNI=; b=I6qORGPqUBNsqQpHQPAp+Vbx2P34pMowEAX0Qupc6k3dHUJOBkkr7T/1ROoZl/N+p7 53i/+tERBCiOYy5XzSKcTpGUZGXcX1XJuQ6i/AGJF+gTDto/Dh+fRQqS0jvfU958o8Vv Vp/lR2oiLbBrEdmvsLAjTPLXjicMc+bJu1Lfpv8hy+xTT3VBL032HGXIjgLe6DdSAB4V axFkk4BpxPWOO3VujZoLVRAo1Uw6D2XMSmrT5YOJyE5VCLVj8auGpcblLkEefBzMjR4Z 4CDcERk3v37bWCeMOVyv92GyUUKcU18B2nHkFAVrZ/9X6XpDfniy+Gt1RnR9cdfbLgaQ VVhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Jle9oAkruTMX9FHJzTpZhZvz2zJME9FDQImUaQw6NNI=; b=Shx4fKPbeEpPCgt5WTD98UVLCYkcGwyhjJMfwBRvA2Gju3HD7/Dgy/oxLiz7QJ3i+G 74yxfrMvKfCnrzvIJzS4E4im876SlRnhmhpOryUPxIn0v4Xbb/vbIuee/Xg6JSQFbUsG wfCx4PEgmUYb/EHdUFfNwoW3raf75gh/6s+H45sZX1u8pFS5mQQcPtq0DYaAyhlq4z91 3JsE5s5ZaYipr/MFax+uNlLE6LbbOJDFrd59Kcnjh1GP1z8FxfOCIIjYg2KIYUk6T3Rl 37L1Ue9OXF6243uoOb5CQsORcrTYSQOwoC/vbbquLc00Yl46Kg/watjVi4F8rnVs5uIc 7Teg== X-Gm-Message-State: ALQs6tBOgBUiwjRvEdAAad73rzhsyKVHMqbwp6neFuOGWOC9Vrx/BU6e BEaIaTYxdXeDFVL3V/gi9WfEJC80fRX30+XmEVlEpA== X-Received: by 2002:a24:d34c:: with SMTP id n73-v6mr20196494itg.104.1524648822931; Wed, 25 Apr 2018 02:33:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.1 with HTTP; Wed, 25 Apr 2018 02:33:42 -0700 (PDT) In-Reply-To: <20180424175752.GC3094@brightrain.aerifal.cx> References: <20180424173051.15099-1-brgl@bgdev.pl> <20180424175752.GC3094@brightrain.aerifal.cx> From: Bartosz Golaszewski Date: Wed, 25 Apr 2018 11:33:42 +0200 Message-ID: Subject: Re: [PATCH 00/11] platform: device tree support for early platform drivers To: Rich Felker 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 , Linux Kernel Mailing List , devicetree , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-24 19:57 GMT+02:00 Rich Felker : > 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). > Just ot make it clear: by deprecating I meant not accepting any new users, not blindly replacing the current ones. Thanks, Bart