Received: by 10.192.165.148 with SMTP id m20csp468016imm; Fri, 27 Apr 2018 02:01:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrS5e3HwS/clYIXM2LHVDTDfBiKn+M0nyV5PJthemAT4KIVoK3uNDk4enBivg5yayAIWbC9 X-Received: by 2002:a17:902:bb84:: with SMTP id m4-v6mr1491244pls.339.1524819705505; Fri, 27 Apr 2018 02:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524819705; cv=none; d=google.com; s=arc-20160816; b=HI7jJr4enkVSErA9a09mRRPpP9ONsfSyI3s6zEX0iS+1Mly831jwShABVt1ACSzoQq QbgtjcVsmwp9RSLYM+/Igw0d6HoeRTUYs1wW20TSroDRugbl8WDpJSJVpf3RLCAoP3wB N4Kf9+sxAaNfJjrKfbE76fzVsGM4KcRTrFq+Re1Nq0gl5fphNPfumz1Gau5sUnGZsJGg UM+9DSCC7ynPT4+lNUX8TfSjMYVtFTm3Ktge4QjoVM+/BkT3oeixon5HUiPllA2kDqt7 3W2bcmxYrGumlQWGafQHo6ojKpqDg46YotZeuNHnX631j5YQXFBEyrnM6hGzew61Zwxv eAqw== 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=KPAqiKvUcSVJcpp51do0IzBxcrNb/hQmSf3QZYX0XZU=; b=bnFF4bjcCHEXJdTlIQRFD2sc0l05IQOVfWizl2Tlaw962S7TXxtk9tWbjwHWrI4efQ 9SVdwIy+K4QEtwysu3UMwW26jKUSzHCJV/suBwVPEWNKC+d8K/F/Vrfz7xEuTDkmn3jN ax9p1SvRpMptkc6Z/y+teo7Ks775a2eK6GSBJGlxgAWIbyxW1NfO7/VYQRnz5scUZBlj K3FzAZRb5iddR0DCw49FMS1wfEuqsrCK9Uh3fnL83KjN34xUoA5eAjsb8/SzxxqbGsM8 HgbZalphG/RMI/+mMbX8nPvldvqtqs41vET7nG2rJ233blhMsbzy0TPWjWr8O1oY9Y9e 4OHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=FqtQrl3Q; 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 t29-v6si853516pgo.539.2018.04.27.02.01.30; Fri, 27 Apr 2018 02:01:45 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=FqtQrl3Q; 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 S932476AbeD0I7U (ORCPT + 99 others); Fri, 27 Apr 2018 04:59:20 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:42654 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932370AbeD0I7Q (ORCPT ); Fri, 27 Apr 2018 04:59:16 -0400 Received: by mail-oi0-f67.google.com with SMTP id t27-v6so948725oij.9 for ; Fri, 27 Apr 2018 01:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KPAqiKvUcSVJcpp51do0IzBxcrNb/hQmSf3QZYX0XZU=; b=FqtQrl3Q2Cf91br9HnupXd0a9yPYPICNArs9JTCQFc++h41l2DHMd4cE9y1jWnEIU3 K0RQRMe40iEOIfElTyYld9rdtUyvZTxf5uuLzUgZN3NWEm9MBsHc09N03ws1xTzxAqLb V4FMQomYhUOFsPj8otB/zmfFC/PWfM1j3U1EchMM9hjY8gf1U04WTBMQ+Xdv2EPn8K1J Hgx4YBpsrAr1y38p7SN46JYkYsvZSDYAc15yRq05dZatHJN/l+hUEbOTPVyUiI6DKmLs CTeg0kkXgtC/IQde6gwonJz1pNOYVzf5O6NWlWEcP27O0f60roC1vlYFvXaCkclvPXXF +usA== 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=KPAqiKvUcSVJcpp51do0IzBxcrNb/hQmSf3QZYX0XZU=; b=ZwX/Fly/pysDqCh9wkJOOt+gGstMDrPuX5ug/C4YgTFRrZ5kOmwDTmn6+zQqtLqRuJ 8VgsoWwZ1ju10tq4HsNFdY4SzqdkZueA9NiuJyvj0pUktvIpChXMYDU94xfRJNnRB5nf G1zh+vwVxuj/L2LYXU/8v9323kv9EVcfVnX7aiY0LkrwDJWmPxshP6wb2YdsuyStYWaZ j6tpM63BerWnSvAqhuRjWVX02nedLBrx5r0LQjtfYRJcJyxfAIT5rOpknMz5sSJxWQOz j248x9ghxfp51cfs76zcBn6N2PNBzHWvjFtHZYNjnFy0lISCvr2a0Zu3+DLrO7r4OwBY Hovw== X-Gm-Message-State: ALQs6tAy8stPaRJYNlpluuNVPt9d1w8zx1OWG2dtYN62KG6m122X0qbH lVqnkmddV1q2WP4/RZI2znOck9Bpe+KLNkw5/U/dzg== X-Received: by 2002:aca:5d0b:: with SMTP id r11-v6mr786178oib.290.1524819555672; Fri, 27 Apr 2018 01:59:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.0.213 with HTTP; Fri, 27 Apr 2018 01:59:15 -0700 (PDT) In-Reply-To: References: <20180426152920.21569-1-brgl@bgdev.pl> <20180426173151.GJ3094@brightrain.aerifal.cx> <6d1f9114-f1d1-961f-4f36-74adff059dc3@lechnology.com> <6194511c-b649-8c02-7db0-3514bfb292f5@ti.com> From: Bartosz Golaszewski Date: Fri, 27 Apr 2018 10:59:15 +0200 Message-ID: Subject: Re: [PATCH RFC PoC 0/2] platform: different approach to early platform drivers To: Arnd Bergmann Cc: Sekhar Nori , David Lechner , Rich Felker , Bartosz Golaszewski , 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 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-27 10:55 GMT+02:00 Arnd Bergmann : > On Fri, Apr 27, 2018 at 10:29 AM, Sekhar Nori wrote: >> On Friday 27 April 2018 01:22 PM, Arnd Bergmann wrote: >>> On Fri, Apr 27, 2018 at 4:28 AM, David Lechner wrote: >>>> On 04/26/2018 12:31 PM, Rich Felker wrote: > >>> >>> I haven't seen the discussion about your clock drivers, but I know that >>> usually only a very small subset of the clocks on an SoC are needed >>> that 'early', and you should use a regular platform driver for the rest. >> >> Its true that the subset is small, but they are either PLL bypass clocks >> or clocks derived out of the main clock gate controller on the Soc >> (DaVinci PSC). So we need some non-platform-device based initialization >> support in the two main clock drivers used on mach-davinci anyway. >> >>> Can you elaborate on which devices need to access your clocks before >>> you are able to initialize the clk driver through the regular platform_driver >>> framework? Do any of these need complex interactions with the clk >>> subsystem, or do you just need to ensure they are turned on? >> >> Its just the timer IP. There is no complex interaction, just need to >> ensure that the clock is registered with the framework and also switched >> on when there is a gate clock. >> >> The latest attempt by David for this was posted last night here: >> >> https://lkml.org/lkml/2018/4/26/1093 > > Ok, so the workaround in that series is to set up the timer clk manually > in the SoC specific code (dm365_init_time etc) and register it to the > clk subsystem, right? > > That seems to be a much more appropriate workaround than adding > back early_platform devices. We can always try to do something better > later, but for now I'm happy with that as a workaround. > Just to clarify: this is not bringing back the hacky early platform devices from before. It's a new approach that actually uses the linux platform driver model (unlike the current mechanism which only uses the same data structures). Thanks, Bart