From patchwork Wed Nov 29 20:18:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 10083525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DC18D60234 for ; Wed, 29 Nov 2017 20:24:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF4B629BD0 for ; Wed, 29 Nov 2017 20:24:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C418529BEA; Wed, 29 Nov 2017 20:24:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 731F029BD0 for ; Wed, 29 Nov 2017 20:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OsmI7MV+2InnTtsUi+8IgTg3lpZ1Em0nsCWq1a3vfDc=; b=J2OAOUdX6W+/zqPKX0WtqXNDZv Bu/9hT8S9SdW4emyiaqD9MLm/D0snAHGw3ONZddsP/Bkx1arXW3NK+MCEKE1FMO/raGYe3llDZaTu dZHzK0c32yZL2L7sgPlnxWPvhJ8ndJR4ntulC0GUKANPi8A+6pIoiwb6aC0KkjLMOPiZFDfErK1Qj ZccndWmoECTVHIZvFVvdtOtX0LNCtXp7Mtrk1aA06yFKRin9PQg6Zn1GYsBFr5sCSYdbe7Z+4WrlX qAacqNmyuWIOwhBnAP58n/Z9+w3zqISs3+GKrKXMXrySZxnXVKzJvdAXxKCdmdlxX3ptGcS0XesF1 lb9/PzNQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eK8u9-0001bd-Oj; Wed, 29 Nov 2017 20:24:25 +0000 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eK8rv-0007he-6B for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2017 20:22:09 +0000 Received: by mail-qk0-x243.google.com with SMTP id u184so6099714qkd.6 for ; Wed, 29 Nov 2017 12:21:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I1oZi1DYELk+vpav4FvRZ9+vih7xD70q+Vu/LiP2/co=; b=Sn/88Tpm2TNuQ1Ccrdor7CYm0NqYj6T6ymubcNlJvfvWmfgOGADq90n8qmiGTCO6WK wkLsXVqMjPUe2DwklbudawZPZvMBKGyAV7/GfDsAHmL56hGJQKjVem+VN/9zkb+MrpKC /CZFhvMT33aqdy0Pren6ynAOpeReCGaxxUkbQktzjwB8xDOrNjkJEiRzzJVGyZO9sIiA APks7jsASp/6UU06vatiXxdbCjcwXfIwMUlSLRipO3sswJzSR4zG4vGXd0F4Bv8OQbI5 SkBZQMxmwHdfWisgnq1p1q1VoRbQv56immGb5TE+3dDUl0fIU5y2bYNWhU4Pr8EFMqrl Z8rg== 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=I1oZi1DYELk+vpav4FvRZ9+vih7xD70q+Vu/LiP2/co=; b=fmDI4sHA52LvCCKwMSQMUWoVURnesr55IEpEx5gG+bTPu03Es6O0iYukm7mYuqFalL V5rk0cBxA4oIy0991tvaYnrCtcvDAfdvnFpQEw/Cn1HbHFoAm5E4zl4Nic0ZSHaeEtU2 c38VCXZgArgwt1dgzTjihEsrr/GB5Qpgb1a9fYpLGGF/LKnLL3Ry7XwqexZ+QLxC/yHL PKPTcUlpWUUw/pnuxVneyHpiJ5c4GyGMUqvyv71dMfQWGP6g6PXtvl0/fPYUG8wL1H7v fUBxtMiSgwZTUeEeXoH6xpbMS+s8Z5ESykkVXbY/HsH/Jxuo1TJyqAcCwO6MCBK4FXyR DDXw== X-Gm-Message-State: AKGB3mKyfPgMfdgKQodpxRai5sp3ra5IP5b1C9IYj6+45Ho+TE7pNIML k/cB+wnsIpKZJ8xZJE+/+to= X-Google-Smtp-Source: AGs4zMYo6Ov/MOSFwgyJUUSLdkAWCt7Eux/exuDn9lyWT9t7RsKZjhfeSRXsYmUVphucm9cyBlJO1w== X-Received: by 10.55.77.138 with SMTP id a132mr157695qkb.172.1511986905941; Wed, 29 Nov 2017 12:21:45 -0800 (PST) Received: from fainelli-desktop.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id z128sm1736337qke.92.2017.11.29.12.21.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Nov 2017 12:21:44 -0800 (PST) From: Florian Fainelli To: bcm-kernel-feedback-list@broadcom.com Subject: [PATCH 9/9] soc: brcmstb: biuctrl: Move to early_initcall Date: Wed, 29 Nov 2017 12:18:49 -0800 Message-Id: <20171129201849.17522-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171129201849.17522-1-f.fainelli@gmail.com> References: <20171129201849.17522-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171129_122207_354242_E0C5D958 X-CRM114-Status: GOOD ( 13.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Florian Fainelli , open list , Rob Herring , Gregory Fong , Brian Norris , "moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE" MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Being called during early_initcall() is early enough that it occurs before SMP initialization, which is all we care about for the Bus Interface Unit configuration. This solves lack of BIU initialization on ARM64 platforms where we do not have an anchor where to put the BIU initialization (since there are no machine descriptors). Signed-off-by: Florian Fainelli --- arch/arm/mach-bcm/brcmstb.c | 2 -- drivers/soc/bcm/brcmstb/biuctrl.c | 6 ++++-- include/linux/soc/brcmstb/brcmstb.h | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-bcm/brcmstb.c b/arch/arm/mach-bcm/brcmstb.c index 07e3a86c6466..5f127d5f1045 100644 --- a/arch/arm/mach-bcm/brcmstb.c +++ b/arch/arm/mach-bcm/brcmstb.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include @@ -38,7 +37,6 @@ u32 brcmstb_uart_config[3] = { static void __init brcmstb_init_irq(void) { irqchip_init(); - brcmstb_biuctrl_init(); } static const char *const brcmstb_match[] __initconst = { diff --git a/drivers/soc/bcm/brcmstb/biuctrl.c b/drivers/soc/bcm/brcmstb/biuctrl.c index dd45bbfe64dd..2b23ae7b5e9b 100644 --- a/drivers/soc/bcm/brcmstb/biuctrl.c +++ b/drivers/soc/bcm/brcmstb/biuctrl.c @@ -240,7 +240,7 @@ static struct syscore_ops brcmstb_cpu_credit_syscore_ops = { #endif -void __init brcmstb_biuctrl_init(void) +static int __init brcmstb_biuctrl_init(void) { int ret; @@ -249,11 +249,13 @@ void __init brcmstb_biuctrl_init(void) ret = mcp_write_pairing_set(); if (ret) { pr_err("MCP: Unable to disable write pairing!\n"); - return; + return ret; } mcp_b53_set(); #ifdef CONFIG_PM_SLEEP register_syscore_ops(&brcmstb_cpu_credit_syscore_ops); #endif + return 0; } +early_initcall(brcmstb_biuctrl_init); diff --git a/include/linux/soc/brcmstb/brcmstb.h b/include/linux/soc/brcmstb/brcmstb.h index 12e548938bbb..8e884e0dda0a 100644 --- a/include/linux/soc/brcmstb/brcmstb.h +++ b/include/linux/soc/brcmstb/brcmstb.h @@ -13,12 +13,6 @@ static inline u32 BRCM_REV(u32 reg) } /* - * Bus Interface Unit control register setup, must happen early during boot, - * before SMP is brought up, called by machine entry point. - */ -void brcmstb_biuctrl_init(void); - -/* * Helper functions for getting family or product id from the * SoC driver. */