From patchwork Tue Aug 23 02:06:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 661682 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sJDTZ4VYkz9sR9 for ; Tue, 23 Aug 2016 12:12:02 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=EQtyhNzW; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sJDTZ3LWBzDrct for ; Tue, 23 Aug 2016 12:12:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=EQtyhNzW; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yb0-x241.google.com (mail-yb0-x241.google.com [IPv6:2607:f8b0:4002:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sJDN96tC3zDrcC for ; Tue, 23 Aug 2016 12:07:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=EQtyhNzW; dkim-atps=neutral Received: by mail-yb0-x241.google.com with SMTP id b96so1091977ybi.2 for ; Mon, 22 Aug 2016 19:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hUmHZP57S0LrFYazmdq7Wz/svWlDxEMcTprrNj/cGrM=; b=EQtyhNzWVFTVpcfv1hm/WpkGnR82cBvVgjr51JDPYC9b712tzGyYGAtbLCiQeAiSBx /eFQz7jlCYaLpk45pnkh++K7JMYpIIh5L6m6xQj9PDb0GGrPwcTJO4tdLhVooxBFD4J9 atHJhhRgExlvBwk1PQTalYXxioU827fTlLl6ZoiSM6MtP1Im/LES6/YCNmdCYBfDVFsP okjdEpD7/FaWhJe6l4gQAmQ71Je7pwVg7hBS4MhDLemrdXuPdH8WfQvHCzDopIg5hEw/ 6rTH5trnL06/3ZGg1jMe67YEJRVVBaHNkBY9K7xvf3k0DxXsGLYQKufxcNMSX6ikn2NN h+ZQ== 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:in-reply-to :references; bh=hUmHZP57S0LrFYazmdq7Wz/svWlDxEMcTprrNj/cGrM=; b=IH2mSWnHuOYB1qyf4iGmpQXW10r0jWvkZT7ajhqkMvVHN1eVFS8/8Lc1NYI0P0ta1G uBTZnBGCXHfxT+gsBuvmxo5vnd0s1/EgxT23pc9ZInBVZPg3wi8IgEMJ80KJZk2hs4or rbEa9G4Tya7lAwZsrAlLfIUN+mUEkaRMGNmdHhOZ4NTSDslpqVKeMKAVUIoNaLBDsdvU PYr7Cv6NqjRZmX/x8Mxf5mv3Ure4BWFZ6S8bIxtbOe/8fKYFl59s+UbNM4qPzwXg+YLd 1QK0vD34VKQtweAN2o/yPhb3VSbTOpJNK/H9c1HLn8//lN5fo0g794oWwtrZs7pkxBqF ++7A== X-Gm-Message-State: AEkoouvMvxSdPhW+Quf+xr1d8Xp1kSuTZ9MJOnWZ8loYc/52l15qVq5mvIBsHrpmUnT+Jw== X-Received: by 10.37.192.17 with SMTP id c17mr6095659ybf.84.1471918039692; Mon, 22 Aug 2016 19:07:19 -0700 (PDT) Received: from pek-khao-d1.wrs.com (unknown-178-22.windriver.com. [147.11.178.22]) by smtp.gmail.com with ESMTPSA id u187sm533582ywu.27.2016.08.22.19.07.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Aug 2016 19:07:18 -0700 (PDT) From: Kevin Hao To: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org Subject: [PATCH 2/5] powerpc: introduce arch_enable_default_of_probe() Date: Tue, 23 Aug 2016 10:06:56 +0800 Message-Id: <1471918019-19472-3-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1471918019-19472-1-git-send-email-haokexin@gmail.com> References: <1471918019-19472-1-git-send-email-haokexin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" We can use this function to enable the default of probe for one board. Signed-off-by: Kevin Hao --- arch/powerpc/include/asm/setup.h | 1 + arch/powerpc/kernel/of_platform.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h index 654d64c9f3ac..213719882fe4 100644 --- a/arch/powerpc/include/asm/setup.h +++ b/arch/powerpc/include/asm/setup.h @@ -24,6 +24,7 @@ extern void reloc_got2(unsigned long); void check_for_initrd(void); void initmem_init(void); void setup_panic(void); +extern void arch_enable_default_of_probe(void); #define ARCH_PANIC_TIMEOUT 180 #ifdef CONFIG_PPC_PSERIES diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index ace7fe132b6f..77402a14e928 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c @@ -123,7 +123,14 @@ device_initcall(of_pci_phb_init); #endif /* CONFIG_PPC_OF_PLATFORM_PCI */ +static bool default_of_probe_enabled; + bool __init arch_want_default_of_probe(void) { - return false; + return default_of_probe_enabled; +} + +void __init arch_enable_default_of_probe(void) +{ + default_of_probe_enabled = true; }