Received: by 10.192.165.148 with SMTP id m20csp857864imm; Fri, 27 Apr 2018 08:37:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqqJDOiUI+aJxVSAdyHt7vSKPmiqaeCdu3ndq3R6ISEzVEcHFxkMv7nZJdHmpHqa0OxWu9R X-Received: by 2002:a17:902:b203:: with SMTP id t3-v6mr2766441plr.171.1524843431806; Fri, 27 Apr 2018 08:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524843431; cv=none; d=google.com; s=arc-20160816; b=FCeQ3WI/J3DO+CUXqOFVHccHbq3AtsNy9nLs/SgxR7DK7cXLDlSw5/Yy+ET+5gntax AyDZTLaEFKTHmeDhOM1rY3DNJtzGIzICpU0Ad3MCdDOmHtAAhn9zOiRk2PSTeNCA8Eij 0nEZVIc1LwdIdLtEL350tq/0hay5hr9ds2MBMQEI2dPoXSqSX/YU1aJCsYppnGGVRkLB 4m1Z6ooHSzSzUS8DnSoXQzKSeSrnjxX0YKB4bkdzZa5T/P7+08BYk6cb0zATYA/BzsNC +jRFKdDD0BovULS3hNmsk0urFVUcB7+eJyOVGrNfVMP0xLgCkwVvo6ms3kYN7rf3/+wg XPuA== 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=5qEURTPVu41S5deKkzfxaMSKm2G+ksMUQlb7NvWu2o4=; b=JeXJsDjGfQ/LBCWaMYalFQ6rUTjc97RCLhAVkSDqJO0LWqOG/9kcShg+0dhzPBZTS3 B3Ap0hHkpvUsmsuSfoIX3MKBoaaXeNkBdIj/LaTzCjcPDgmQA4ndI7cOK8lI/hdutiZC /5KfulZjYyYJNsfwn5F5/W+FaaItqZMNeJ2Z0E/5HnjvUHoNYmDCjWz2NGcU48OwOINb C6H8mveIdUYaNesRs6pUz4D7JrkTBAvYet7vQrqMf6XWjdrTdiNK033L0xNPrD2GGHno IfxK4I8QqeI5CQwGRsHqP161N0lSOXt+I8TnYMBOeIUGwF5vIhtCf1s/FDkMvcPRd+A7 mBeA== 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 h187-v6si1390489pgc.100.2018.04.27.08.36.57; Fri, 27 Apr 2018 08:37:11 -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 S933015AbeD0Pfm (ORCPT + 99 others); Fri, 27 Apr 2018 11:35:42 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:48262 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932897AbeD0Pfj (ORCPT ); Fri, 27 Apr 2018 11:35:39 -0400 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1fC5CO-00023S-00; Fri, 27 Apr 2018 15:22:12 +0000 Date: Fri, 27 Apr 2018 11:22:12 -0400 From: Rich Felker To: Arnd Bergmann Cc: Bartosz Golaszewski , Bartosz Golaszewski , David Lechner , Sekhar Nori , Kevin Hilman , Michael Turquette , Stephen Boyd , 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 , Marc Zyngier , Peter Rosin , Linux ARM , Linux Kernel Mailing List , DTML Subject: Re: [PATCH RFC PoC 0/2] platform: different approach to early platform drivers Message-ID: <20180427152212.GO3094@brightrain.aerifal.cx> References: <20180426152920.21569-1-brgl@bgdev.pl> <20180426173151.GJ3094@brightrain.aerifal.cx> <6d1f9114-f1d1-961f-4f36-74adff059dc3@lechnology.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, Apr 27, 2018 at 02:40:34PM +0200, Arnd Bergmann wrote: > On Fri, Apr 27, 2018 at 1:53 PM, Bartosz Golaszewski wrote: > > 2018-04-27 12:18 GMT+02:00 Arnd Bergmann : > >> On Fri, Apr 27, 2018 at 10:57 AM, Bartosz Golaszewski > >> wrote: > >>> 2018-04-27 9:52 GMT+02:00 Arnd Bergmann : > >>>> On Fri, Apr 27, 2018 at 4:28 AM, David Lechner wrote: > >>> My patch tries to address exactly the use cases we're facing - for > >>> example by providing means to probe devices twice (early and late) and > >>> to check the state we're at in order for users to be able to just do > >>> the critical initialization early on and then continue with regular > >>> stuff later. > >> > >> Maybe the problem is reusing the name and some of the code from > >> an existing functionality that we've been trying to get rid of. > >> > > > > I'm not reusing the name - in fact I set the prefix to earlydev_ > > exactly in order to not confuse anyone. I'm also not reusing any code > > in the second series. > > Ok. > > >> If what you want to do is completely different from the existing > >> early_platform implementation, how about starting by moving that > >> out of drivers/base/platform.c into something under arch/sh/ > >> and renaming it to something with an sh_ prefix. > >> > > > > Yes, this is a good idea, but what about the sh-specific drivers that > > rely on it? Is including headers from arch/ in driver code still an > > accepted practice? > > I think it's fine here, since we're just move it out of the way and > there are only very few drivers using it: > > drivers/clocksource/sh_cmt.c:early_platform_init("earlytimer", > &sh_cmt_device_driver); > drivers/clocksource/sh_mtu2.c:early_platform_init("earlytimer", > &sh_mtu2_device_driver); > drivers/clocksource/sh_tmu.c:early_platform_init("earlytimer", > &sh_tmu_device_driver); > drivers/clocksource/timer-ti-dm.c:early_platform_init("earlytimer", > &omap_dm_timer_driver); > drivers/tty/serial/sh-sci.c:early_platform_init_buffer("earlyprintk", > &sci_driver, > > For timer-ti-dm, it seems like a leftover from old times that can > be removed. The other four are shared between arch/sh and > arch/arm/mach-shmobile and already have some #ifdef > to handle those two cases. FWIW if arch/sh is the only remaining user of the earlyprintk part, please don't go to any trouble to preserve it. I want to move to earlycon exclusively. Not sure if that is possible before moving the boards that are using it to device tree; if so and it's easy, please consider sending a patch or a sketch of what it should look like so I can do it. Rich