From patchwork Tue Jun 19 21:36:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 139262 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3858lji; Tue, 19 Jun 2018 14:36:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLlaT0UpEfJkE009osLHvlzqyONrpRpgfJ2XbzhbrELu8cdqUXNkU5TegoNbsQF61VEsxC/ X-Received: by 2002:a17:902:bc4c:: with SMTP id t12-v6mr20577434plz.177.1529444189140; Tue, 19 Jun 2018 14:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529444189; cv=none; d=google.com; s=arc-20160816; b=TdWLnF9+DnFVKHLvNrZjrk9hM/t5Gt96SNZUQE576R+cNR3e9iKrSV0yxUMgW5a/z+ e2I9Fw/yCimCZ1Bx5NTErEm7LKSlYX5t2IWEDbLiAuSgjUvj8petWxfxMYgj/X4QWoFS bAJ6/LY9M54NIrCr0R7uDRbaOP8YFabhX4OTxc5pNdWAYFiLUljFwRY+vfeigE/0BCbS LFNfrsgcyWdG6x8AOFNjS954jX0hVM1ThF3iFWXFdGFKw305zF/l5UUhDXaZp3j0hYSZ FS9tvTE7CauDND75XeZgRJqIiCZ/OecKmaDTjJy9HveIHEoI3+o6aoqaryw21IdeAUkF Q7KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UjGDXF+8qLWxuODlZhvjSlO5xHUxXCW+YQ55dOr6t0g=; b=0PIik+aHLIa/jQTNUqGRwC0ku5WEDBebctGv5t1MqipO4eZ+oop0AueOB1Hvl7S1ct cvzAr9lExkAlBpqPAUYk8WNmpZYj8HpyLonO7ZjU2rfZoOYDf1Cq3tevgUG3f/7Z/EqO JU1hFqcKx0CvSi9CUKTdwn9tWlfakQ75ovgmR9GZ0CTrhi49Htf/6MQ5yZ8EAJ4BLkV9 lkWZdMEZGBEeNwaLnD1US8VwOZG7AntD5J+NA31UBtF6Eke4V/fIgvHFgGQrz3d8bxGR p0V3E7CmqJP5Qmbqer87zRlDQPLFZ0N2jEKpoXUNp4uKB2F0UV4HH5SguhJqNda0QHjh XEHw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o184-v6si582883pga.92.2018.06.19.14.36.28; Tue, 19 Jun 2018 14:36:29 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967283AbeFSVg0 (ORCPT + 30 others); Tue, 19 Jun 2018 17:36:26 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:42264 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935985AbeFSVgW (ORCPT ); Tue, 19 Jun 2018 17:36:22 -0400 Received: by mail-yb0-f196.google.com with SMTP id m199-v6so46265ybm.9 for ; Tue, 19 Jun 2018 14:36:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UjGDXF+8qLWxuODlZhvjSlO5xHUxXCW+YQ55dOr6t0g=; b=LawXjzqX4/zybbWxyjoWd7IKJ4FyulvFJ901/+44fA3qUDuWFkhwPEuJSnfAEQwH3y MZNUmS38wBfKxnFXQK58memB4VeAx0WUsviNqkIqX5qAPNT5OSV8C5n7uTkJy9F1fcwh uSRiZbjSz6wr13fbJr221ImzrRYLp5A+M4DUc0f7OxnnARAWa31jxx1DvivXJS7i33a7 vd8C6hyyiDnRawRUzeef2do8o5jwbRvHGiTcDIVgGsrZgXpWrws8lYe/SGJAXOO0X9HU Lld+puNyhKJwvUyePBzbrX8CVXrdARYkXqMn8aQrc3OSKP9+v7cjLslHd/PX6B921Zsf skcg== X-Gm-Message-State: APt69E3dUFBAjw8K3uHIIynXb3oOBF/yRBXDa5mrHAemBr6HaGaoL1D/ yEMUeAjTvYOoSH+PQEJjlZlhbg4= X-Received: by 2002:a25:ad83:: with SMTP id z3-v6mr4490927ybi.246.1529444182187; Tue, 19 Jun 2018 14:36:22 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id i205-v6sm309535ywc.103.2018.06.19.14.36.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 14:36:21 -0700 (PDT) From: Rob Herring To: Michal Simek Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/2] microblaze: remove unecessary of_platform_bus_probe call Date: Tue, 19 Jun 2018 15:36:19 -0600 Message-Id: <20180619213620.14146-1-robh@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The call to of_platform_bus_probe has no effect because the DT core already probes default buses like "simple-bus" before this call. Michal Simek said 'xlnx,compound' hasn't been used in a long time, so that match entry isn't needed. Cc: Michal Simek Signed-off-by: Rob Herring --- arch/microblaze/kernel/platform.c | 7 ------- 1 file changed, 7 deletions(-) -- 2.17.1 diff --git a/arch/microblaze/kernel/platform.c b/arch/microblaze/kernel/platform.c index 2540d60610d9..b9a414552d9b 100644 --- a/arch/microblaze/kernel/platform.c +++ b/arch/microblaze/kernel/platform.c @@ -14,15 +14,8 @@ #include #include -static struct of_device_id xilinx_of_bus_ids[] __initdata = { - { .compatible = "simple-bus", }, - { .compatible = "xlnx,compound", }, - {} -}; - static int __init microblaze_device_probe(void) { - of_platform_bus_probe(NULL, xilinx_of_bus_ids, NULL); of_platform_reset_gpio_probe(); return 0; } From patchwork Tue Jun 19 21:36:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 139263 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4117lji; Tue, 19 Jun 2018 14:36:45 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL64hvZa5+aUk2oO26MLSFSfaNjT5eAMgBl64CWLkcgHDUNTMC2fWCnUuq1YxePsKN5lucq X-Received: by 2002:a65:5c42:: with SMTP id v2-v6mr16542925pgr.224.1529444205018; Tue, 19 Jun 2018 14:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529444205; cv=none; d=google.com; s=arc-20160816; b=a0fg6UU1d63VZPSl08i1D/Y1B00rOoOT0+hr/LSPykWXe7HOBgwN/L7C9NZFikRn5V kmwNSrZ0SgyvQP3gA2My76XTP7X2V6coMMwocvZ9biVnUQtVn+pbmxa/0h/f0NCtmFjI 5uL/6xjeEYvGsBEKRLdJ6Nc2oK7UctjJecs+XPYXGggNaLpwzTyoh+tK/y0dlFyHVH/T NXqza/Vmlv2bbYe6RiX/VwN0Vm/MVitVOIx89MfVs5aDf73+3HcKabCVDUSvsmAEpsoH /Odc5FQ1dEe3L3boFNdm8AjTlyepnuIIe7fkpIdOt9sXkkDYiOYMEMptU8aFwVQVPp9c GAAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=aPMtP57+31psf6v11jTqOaoOthX7tz/4iXgNxK0eo4o=; b=wXJaHX/P92D16PLyP5VMLkaqlrqYhfT6kBF8X7fFNcNNJ70KXJsLdArSRd8DX+DESQ p5ehJofcjYnHQz1Lt+flwxLN9ehJ/q/C/zUvLHdA2BTg3SPBZGn9336aOM2Fbg7yaKY7 hsqWuQJtPwuwmagpz1LFq8E50HjdHMbi15/nLmWPKRhzZ+EYty/jHK29DuA4uENavf6v EXgXbW+rzAqcXnBvc0Lb7Y5rmoUKBv/gBWOmAI3h9+ImbM3xnsk6vxDI4G9tyia5uwey 3MStti+EbHb0CL4O9wTh5joRAMfV8zkrmSGZNpxqbsHwDRvZCWOVJ4n6PsmiI0qL8tSR fiJA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e67-v6si663664pfa.217.2018.06.19.14.36.44; Tue, 19 Jun 2018 14:36: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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967291AbeFSVgn (ORCPT + 30 others); Tue, 19 Jun 2018 17:36:43 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:43291 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967205AbeFSVgY (ORCPT ); Tue, 19 Jun 2018 17:36:24 -0400 Received: by mail-yw0-f193.google.com with SMTP id r19-v6so432510ywc.10 for ; Tue, 19 Jun 2018 14:36:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aPMtP57+31psf6v11jTqOaoOthX7tz/4iXgNxK0eo4o=; b=GumEjh4LqlyEVtZxp7YkiqC/E5bgk7A9rlIe/bvi2mP2jmLvMHDl4i68Ov3ZXT8ZS2 ztWRXwBO+3Mknx1E7Ja++t281qfAuE+nVYUfq2kJT81G1qdaS+u0K9E97V8e6ozU5i9R cxGBc1so90hfn0xu7LzhLib3B6bgCjIxvbf69LmWulHrqjN7cryllDLRCZqYjUwxLXDE NRuJpWSm+rlEF82lQe5zXnCYx/JH+F/TQtGuX7EsIV1vjmAEaCAGH3StvMN2exNm6CSI pMe4In1yIAHqy/1wCRKxBEGwiKS8Le2A1RFiYh2b0Yk0b9zofvZrvf6+0xhQjNXtGTsW XpHw== X-Gm-Message-State: APt69E1WZwtA6OVATK9FZvR4+yLzq/ne85+h9mGiWpuAPUVt1b5DMU8g jZZOTv6YmWfVmjbbcIJFmnBPPqo= X-Received: by 2002:a81:65d6:: with SMTP id z205-v6mr9217594ywb.155.1529444183670; Tue, 19 Jun 2018 14:36:23 -0700 (PDT) Received: from localhost.localdomain (24-223-123-72.static.usa-companies.net. [24.223.123.72]) by smtp.googlemail.com with ESMTPSA id i205-v6sm309535ywc.103.2018.06.19.14.36.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jun 2018 14:36:22 -0700 (PDT) From: Rob Herring To: Michal Simek Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/2] microblaze: consolidate GPIO reset handling Date: Tue, 19 Jun 2018 15:36:20 -0600 Message-Id: <20180619213620.14146-2-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619213620.14146-1-robh@kernel.org> References: <20180619213620.14146-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that platform.c only has the GPIO reset handling left, move the initcall to reset.c and remove platform.c. Cc: Michal Simek Signed-off-by: Rob Herring --- arch/microblaze/include/asm/setup.h | 2 -- arch/microblaze/kernel/Makefile | 2 +- arch/microblaze/kernel/platform.c | 22 ---------------------- arch/microblaze/kernel/reset.c | 11 ++++++----- 4 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 arch/microblaze/kernel/platform.c -- 2.17.1 diff --git a/arch/microblaze/include/asm/setup.h b/arch/microblaze/include/asm/setup.h index d5384f6f36f7..86d2663d3fd0 100644 --- a/arch/microblaze/include/asm/setup.h +++ b/arch/microblaze/include/asm/setup.h @@ -26,8 +26,6 @@ void microblaze_setup_heartbeat(void); extern void mmu_reset(void); # endif /* CONFIG_MMU */ -extern void of_platform_reset_gpio_probe(void); - void time_init(void); void init_IRQ(void); void machine_early_init(const char *cmdline, unsigned int ram, diff --git a/arch/microblaze/kernel/Makefile b/arch/microblaze/kernel/Makefile index 7e99cf6984a1..6c4c54826aae 100644 --- a/arch/microblaze/kernel/Makefile +++ b/arch/microblaze/kernel/Makefile @@ -17,7 +17,7 @@ extra-y := head.o vmlinux.lds obj-y += dma.o exceptions.o \ hw_exception_handler.o irq.o \ - platform.o process.o prom.o ptrace.o \ + process.o prom.o ptrace.o \ reset.o setup.o signal.o sys_microblaze.o timer.o traps.o unwind.o obj-y += cpu/ diff --git a/arch/microblaze/kernel/platform.c b/arch/microblaze/kernel/platform.c deleted file mode 100644 index b9a414552d9b..000000000000 --- a/arch/microblaze/kernel/platform.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2008 Michal Simek - * - * based on virtex.c file - * - * Copyright 2007 Secret Lab Technologies Ltd. - * - * This file is licensed under the terms of the GNU General Public License - * version 2. This program is licensed "as is" without any warranty of any - * kind, whether express or implied. - */ - -#include -#include -#include - -static int __init microblaze_device_probe(void) -{ - of_platform_reset_gpio_probe(); - return 0; -} -device_initcall(microblaze_device_probe); diff --git a/arch/microblaze/kernel/reset.c b/arch/microblaze/kernel/reset.c index bab4c8330ef4..fcbe1daf6316 100644 --- a/arch/microblaze/kernel/reset.c +++ b/arch/microblaze/kernel/reset.c @@ -18,7 +18,7 @@ static int handle; /* reset pin handle */ static unsigned int reset_val; -void of_platform_reset_gpio_probe(void) +static int of_platform_reset_gpio_probe(void) { int ret; handle = of_get_named_gpio(of_find_node_by_path("/"), @@ -27,13 +27,13 @@ void of_platform_reset_gpio_probe(void) if (!gpio_is_valid(handle)) { pr_info("Skipping unavailable RESET gpio %d (%s)\n", handle, "reset"); - return; + return -ENODEV; } ret = gpio_request(handle, "reset"); if (ret < 0) { pr_info("GPIO pin is already allocated\n"); - return; + return ret; } /* get current setup value */ @@ -51,11 +51,12 @@ void of_platform_reset_gpio_probe(void) pr_info("RESET: Registered gpio device: %d, current val: %d\n", handle, reset_val); - return; + return 0; err: gpio_free(handle); - return; + return ret; } +device_initcall(of_platform_reset_gpio_probe); static void gpio_system_reset(void)