From patchwork Tue Jul 26 18:01:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 72825 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1821956qga; Tue, 26 Jul 2016 11:01:39 -0700 (PDT) X-Received: by 10.66.8.37 with SMTP id o5mr42352009paa.100.1469556099306; Tue, 26 Jul 2016 11:01:39 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c83si1670075pfd.268.2016.07.26.11.01.38; Tue, 26 Jul 2016 11:01:39 -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 S1757569AbcGZSBg (ORCPT + 29 others); Tue, 26 Jul 2016 14:01:36 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:36241 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757213AbcGZSBe (ORCPT ); Tue, 26 Jul 2016 14:01:34 -0400 Received: by mail-io0-f196.google.com with SMTP id y34so2777678ioi.3 for ; Tue, 26 Jul 2016 11:01:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sZDtcgvGhbFcCaExWGJD5FWqxh1Mul8J/aYat0QZ0fo=; b=hwRtwbBiIO/hbN9OZFNNSxrrPxKyI/qXwbC9u/o1FsO9JkrbcRglYNJNttgiaEzrrV hQyodOAoXzFaKlLSQ8lzJjzQiIw/NWBajyS88E6ARuTn0rz0+mWRbKhTuEYdvWCGiymA nuShse3i1lI3h4N27V5Da+K+k7iqpRtdXW34DQQk8yHkM9FLqw8FM7P1K9hP6TW4PMt5 jCEYoaEM6rbLoGklQD91gjATTUDj0ekNH+C3MWzZtJ7xRRz0jwrA6MicYF8KzXUa8A/I e7NDLagfATjnsny/YLh8o8j7pZ3NPCGVT74B8pMM4xPhS0pHjl/5AiQolixSMuDEkHkM HQjA== X-Gm-Message-State: AEkoouuR1dTSwe3W6XVbP0mschsw8HZFtGL8jLYvz4LfMfiZZMwK8GIk2KGE58MugQXk1g== X-Received: by 10.157.17.157 with SMTP id v29mr13932165otf.95.1469556093399; Tue, 26 Jul 2016 11:01:33 -0700 (PDT) Received: from rob-hp-laptop.herring.priv (72-48-98-129.dyn.grandenetworks.net. [72.48.98.129]) by smtp.googlemail.com with ESMTPSA id 93sm712041otp.0.2016.07.26.11.01.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jul 2016 11:01:32 -0700 (PDT) From: Rob Herring To: Chris Zankel Cc: linux-kernel@vger.kernel.org, linux-xtensa@linux-xtensa.org, Kefeng Wang , Guenter Roeck , Max Filippov Subject: [PATCH] xtensa: Partially Revert "xtensa: Remove unnecessary of_platform_populate with default match table" Date: Tue, 26 Jul 2016 13:01:32 -0500 Message-Id: <20160726180132.12764-1-robh@kernel.org> X-Mailer: git-send-email 2.9.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This partially reverts commit 69d99e6c0d62 keeping only the main purpose of the original commit which is the removal of of_platform_populate() call. The moving of of_clk_init() caused changes in the initialization order breaking booting. Fixes: 69d99e6c0d621f ("xtensa: Remove unnecessary of_platform_populate with default match table") Cc: Kefeng Wang Cc: Guenter Roeck Cc: Max Filippov Signed-off-by: Rob Herring --- This is on top of Guenter's build fix. Please test and I'll apply. I tried briefly running under QEMU, but didn't have success. If anyone has up to date instructions that would be helpful as using these[1] didn't seem to work. Rob [1] http://wiki.linux-xtensa.org/index.php/Xtensa_on_QEMU arch/xtensa/kernel/setup.c | 9 +++++++++ arch/xtensa/kernel/time.c | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) -- 2.9.2 diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 6f68c60..143251e 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -251,6 +252,14 @@ void __init early_init_devtree(void *params) strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); } +static int __init xtensa_device_probe(void) +{ + of_clk_init(NULL); + return 0; +} + +device_initcall(xtensa_device_probe); + #endif /* CONFIG_OF */ /* diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 6ec73c9..b9ad9fe 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -149,7 +148,6 @@ void __init time_init(void) local_timer_setup(0); setup_irq(this_cpu_ptr(&ccount_timer)->evt.irq, &timer_irqaction); sched_clock_register(ccount_sched_clock_read, 32, ccount_freq); - of_clk_init(NULL); clocksource_probe(); }