Received: by 10.192.165.148 with SMTP id m20csp203769imm; Thu, 26 Apr 2018 19:30:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoBcv1RRjifKMbwMQxDp8bZhwFZyCMxVsPoRzkxhzcXS3VNxN3iYfxcTe/oh05wv/NhMXCW X-Received: by 2002:a63:6f0c:: with SMTP id k12-v6mr489071pgc.380.1524796211646; Thu, 26 Apr 2018 19:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524796211; cv=none; d=google.com; s=arc-20160816; b=EE+s/HmOXjDiszY8XK949DzI4sinfzzM7XgiI4RJh6OJglD4ANV3LQjlj64OGKHzeV CNMP3K7UsgXAzwRSDqEp9T68O4oUbqDwqUCdS0w0O0QduYAZLJxReg9eke62nDqKDVFU LJvsVctMETsx1MeBlXGR2LiXdEWfUldqMA9CXI9E92Zh24LTq1RduPdcJeESmj+GMvaL u5GkEe1kY66vefq5Hn4Wo6w52BFJ0FoPFt9gRweq86Ru8Q+/WPyIsT+7+R4CilKs4z+8 dekOcmL0gJjlsEh+Diuo95ut67V/FF/slV5FxSxtwvBApZua/xsSGxQrrtfJ+L9fJpSi wiew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=gDo728c5wjv1rTaoWHcE3f+nxb9pl4Knt+E1/P4lkFA=; b=0Joe4wh9K8UL749rASwepWDVDZNwsJcLJnTi8E+VPjrEvM5fP1kWED1hHQWT+YsR/4 FSGNYvsKKiTwyOI/L4evADM3s0uvqiW0EUrEQ9H50CluAhrxh7SYT5yZ32omGiEZSmAL OSoVWusxxzpJ2UlDeWLxyJ9h6LxX7IEEMsE7xsFkxeFQabWWx2QhB9YYjNKjC0XVrDX1 HNt0/mmh0Stjmkj/RuA+u2pCBA6l2Ytwi4LHrJn5NpnLzqEHuq05rI9myGCpcYbGOMAE yKGfkTUp4l6enzW7NNmAoWPycS2yRaMbEAXgKIJcbIKg+EoxzgfGjJoLEU1mVjudkUcM S30A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=h2ibzdtH; 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 f1-v6si253706pgq.462.2018.04.26.19.29.56; Thu, 26 Apr 2018 19:30: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; dkim=fail header.i=@lechnology.com header.s=default header.b=h2ibzdtH; 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 S1757225AbeD0C2t (ORCPT + 99 others); Thu, 26 Apr 2018 22:28:49 -0400 Received: from vern.gendns.com ([206.190.152.46]:51941 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753312AbeD0C2r (ORCPT ); Thu, 26 Apr 2018 22:28:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gDo728c5wjv1rTaoWHcE3f+nxb9pl4Knt+E1/P4lkFA=; b=h2ibzdtH9t35j7TAedqCCG+/HJ +JCeJrhKuSOskFNjrEG9djnciuLuZc9wYwShMcx7aTdlEMQH1kFZwJZeJq3z/9d+bGHAse9yxP8vm i5Zt9gi+mMQUlXDzd7rPz1Vx6Gzng3XAyvcOHjR6CEh1RFOQY2w9CvefpzqJEz3MS/qanz1ZQ7dkK SgEH6XJbaI58RcaHCdv7ImBzsdzd7lrn39yM6VnK+Yg2AkBSpTH/OJgkIXxNF/u9C7mMdTUi/xQZe BJpITt/cuqZ/45WVqElXkiGdX5XBooUiFBXuycyfBkTVpjWyg1jvnrtn8yEoatP4il5693fYzfZyJ PyyT+eGg==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:42552 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1fBt7q-000zHd-83; Thu, 26 Apr 2018 22:28:42 -0400 Subject: Re: [PATCH RFC PoC 0/2] platform: different approach to early platform drivers To: Rich Felker , Bartosz Golaszewski Cc: 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 References: <20180426152920.21569-1-brgl@bgdev.pl> <20180426173151.GJ3094@brightrain.aerifal.cx> From: David Lechner Message-ID: <6d1f9114-f1d1-961f-4f36-74adff059dc3@lechnology.com> Date: Thu, 26 Apr 2018 21:28:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180426173151.GJ3094@brightrain.aerifal.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > FYI I'm (sometimes-somewhat-absent) arch/sh co-maintainer. > > Rich >