Received: by 10.192.165.148 with SMTP id m20csp228820imm; Thu, 26 Apr 2018 20:09:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoetCDMRDGgRlRoZhZ6W7S8LdUU14s3xB6aS84X78dLlS1W4IBRUVbdcXgQrZjGvATYcHSt X-Received: by 2002:a17:902:7c81:: with SMTP id y1-v6mr655535pll.186.1524798599724; Thu, 26 Apr 2018 20:09:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524798599; cv=none; d=google.com; s=arc-20160816; b=rVJZNlr6344x2tZ+xprdprVWTteWpFpsQ4Sbjdcg9O5uvNz9yurpgV/3uxlxwzoBER mTuZ/RtLjB55USjW1d4ZUO+DvSH9Dt/ia8HAiN9FxYbJwLPFY/EMwxKeeaRsQy31mgtQ py4FXAo7dsK0Hmk3TrkCZxtYovp/vaETSgJzZlzWp3zj4OaE55vJsZBucT1LpLe9rzzr dYrF9H1Tit8qcCaQNzNZGJR0lIn+fxug6QM4G+pv4Dt9d06oqAgRng5UqzGdBhHLM6Jh 4vnDCiTqeDsK6n1yMAKl88+1nT1UkOv+3b3LmhYq4ilqApsxyXPQkiVjLFhtAb6WEOb8 6gAw== 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=ytvHSxg0+ns0SvxR5QxP/XWcf+ZmMPnA7NpX1oaUeZk=; b=qeSp+X93NQFqpgHSuJvVKTuFZelKKNvTfDaCmME0/e6i02eBCZ1T346rGLJ7MUNhnM BgE1i+2hGcLnGNEI7yb6q5yDzYAD3UsI9whyIVtU1oQttfghcYDrRiLGYV5qN0laC6Kw uKdAOC8X7wLlAb1EKuPvVMlPMDEtVw1zlaMkSEdnnEwnFVMha2JBXcVkzewr3H3T3SjS T1nr1il8GkZHi7zWLdI+0JJQj2PPLAUb1+2irKCfnoqKxtlSaDGYekbgweAduZuosSJd ZK3OzZpho1Pcqs4KpsFabF+X6oXSZGVuiGLCp+XTB/vQF1IefkweBqh8qD2X/C7B85ET 1N7Q== 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 c8si361021pfj.138.2018.04.26.20.09.44; Thu, 26 Apr 2018 20:09:59 -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 S1757361AbeD0DIl (ORCPT + 99 others); Thu, 26 Apr 2018 23:08:41 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:47744 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757046AbeD0DIk (ORCPT ); Thu, 26 Apr 2018 23:08:40 -0400 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1fBtWf-0000EY-00; Fri, 27 Apr 2018 02:54:21 +0000 Date: Thu, 26 Apr 2018 22:54:21 -0400 From: Rich Felker To: David Lechner Cc: Bartosz Golaszewski , Sekhar Nori , Kevin Hilman , 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 , Marc Zyngier , Peter Rosin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH RFC PoC 0/2] platform: different approach to early platform drivers Message-ID: <20180427025421.GN3094@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: <6d1f9114-f1d1-961f-4f36-74adff059dc3@lechnology.com> 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 Thu, Apr 26, 2018 at 09:28:39PM -0500, David Lechner wrote: > On 04/26/2018 12:31 PM, Rich Felker wrote: > >On Thu, Apr 26, 2018 at 05:29:18PM +0200, Bartosz Golaszewski wrote: > >>From: Bartosz Golaszewski > >> > >>This is a follow to my series[1] the aim of which was to introduce device tree > >>support for early platform devices. > >> > >>It was received rather negatively. Aside from using device tree to pass > >>implementation specific details to the system, two important concerns were > >>raised: no probe deferral support and the fact that currently the early devices > >>never get converted to actual platform drivers. This series is a > >>proof-of-concept that's trying to address those issues. > >> > >>The only user of the current version of early platform drivers is the SuperH > >>architecture. If this series eventually gets merged, we could simply replace > >>the other solution. > > > >Looking at a quick output of: > > > > grep -r -A10 early_devices[[] arch/sh/kernel/ > > > >it looks like all of the existing early platform devices are serial > >ports, clocks, and clocksources. The switch to device tree should pick > >them all up from CLK_OF_DECLARE, TIMER_OF_DECLARE, and > >EARLYCON_DECLARE. Until that's complete, the existing code works > >as-is. I don't see what problem you're trying to solve. > > The problem for us is that clk maintainers don't want new drivers to use > CLK_OF_DECLARE and instead use platform devices. I have just written such > a new driver that is shared by 6 different SoCs. For some combinations of > SoCs and clocks, using a platform device is fine but on others we need to > register early, so the drivers now have to handle both cases, which is > kind of messy and fragile. If there is a generic way to register platform > devices early, then the code is simplified because we only have to handle > one method of registering the clocks instead of two. Can you get them to explain why? This sounds wrong. Rich