From patchwork Thu Jan 10 10:18:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 10755535 X-Patchwork-Delegate: horms@verge.net.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 89D0F13BF for ; Thu, 10 Jan 2019 10:18:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A64429443 for ; Thu, 10 Jan 2019 10:18:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EF532944E; Thu, 10 Jan 2019 10:18:43 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDDD929443 for ; Thu, 10 Jan 2019 10:18:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727817AbfAJKSm (ORCPT ); Thu, 10 Jan 2019 05:18:42 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:36404 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727692AbfAJKSm (ORCPT ); Thu, 10 Jan 2019 05:18:42 -0500 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id 040D925B78D; Thu, 10 Jan 2019 21:18:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1547115520; bh=Y23i0v7gKUPP3fAPAdy4Tng7j4v3/+uaD6kGZuLZxDQ=; h=From:To:Cc:Subject:Date:From; b=PYgpncFWpxQjTLw7sbBV/eNGAAtZJvpXa56ZiGZ0zIYgnV4irQNNeHa/2A5GF8VgK xaHglwCz7ZNuVYf7lZooMbmwA2cyf1P1kIueKnTvUDHZ49e8fLD/z54MDywkWOA9ht xZk4dnK5gY3FW3RXO30i2aN7i9H8+3Fdj2H0AzcI= Received: by reginn.horms.nl (Postfix, from userid 7100) id 36B93940462; Thu, 10 Jan 2019 11:18:38 +0100 (CET) From: Simon Horman To: arm@kernel.org Cc: linux-renesas-soc@vger.kernel.org, Olof Johansson , Kevin Hilman , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Magnus Damm , Simon Horman Subject: [GIT PULL] Renesas ARM Based SoC Fixes for v5.0 Date: Thu, 10 Jan 2019 11:18:15 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Olof, Hi Kevin, Hi Arnd, Please consider these Renesas ARM based SoC fixes for v5.0. The following changes since commit bfeffd155283772bbe78c6a05dec7c0128ee500c: Linux 5.0-rc1 (2019-01-06 17:08:20 -0800) are available in the git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-fixes-for-v5.0 for you to fetch changes up to a64597227d0de5610407fcc95dc835745a53f5d0: soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B} (2019-01-07 14:51:51 +0100) ---------------------------------------------------------------- Renesas ARM Based SoC Fixes for v5.0 Renesas SoCs: * Fix build regressions caused by move of Kconfig symbols RZ/G2E (r8a774c0) SoC: * Correct initialization order of 3DG-{A,B} in SYSC driver ---------------------------------------------------------------- Arnd Bergmann (1): ARM: shmobile: fix build regressions Biju Das (1): soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B} drivers/soc/renesas/Kconfig | 2 +- drivers/soc/renesas/r8a774c0-sysc.c | 23 ++++------------------- 2 files changed, 5 insertions(+), 20 deletions(-) From patchwork Thu Jan 10 10:18:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 10755539 X-Patchwork-Delegate: horms@verge.net.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 740156C2 for ; Thu, 10 Jan 2019 10:18:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 629E829443 for ; Thu, 10 Jan 2019 10:18:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 572792944E; Thu, 10 Jan 2019 10:18:46 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AFFF29443 for ; Thu, 10 Jan 2019 10:18:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728136AbfAJKSp (ORCPT ); Thu, 10 Jan 2019 05:18:45 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:36415 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727692AbfAJKSo (ORCPT ); Thu, 10 Jan 2019 05:18:44 -0500 Received: from reginn.horms.nl (watermunt.horms.nl [80.127.179.77]) by kirsty.vergenet.net (Postfix) with ESMTPA id 05F9D25BED4; Thu, 10 Jan 2019 21:18:41 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1547115521; bh=YCDZjYmxk4Z3QPKyyrQSn8Ri32Gtj0IKGnbSmDb49qI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PBJu1RiUOSj8FSyBN5Iu9YwiJTo8mu7F0CzNUNu7QgpFZiW+BaQY38vzmq3sZgZHA BIOrrMJG4MvZyivLqh/AJj7BCkMFp9kJqDtsjoARc7t/nevRYm1MAYXRbhiJEXJpFX cmbBl49pRqzMll0vm6+KP8FMTCQGpCGg5VoE9PYw= Received: by reginn.horms.nl (Postfix, from userid 7100) id 428A59402F6; Thu, 10 Jan 2019 11:18:39 +0100 (CET) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Biju Das , Simon Horman Subject: [PATCH 2/2] soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B} Date: Thu, 10 Jan 2019 11:18:38 +0100 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Biju Das The workaround for the wrong hierarchy of the 3DG-{A,B} power domains on RZ/G2E ES1.0 corrected the parent domains. However, the 3DG-{A,B} power domains were still initialized and powered in the wrong order, causing 3DG operation to fail. Fix this by changing the order in the table at runtime, when running on an affected SoC. This work is based on the work done by Geert for R-Car E3. Fixes: f37d211c687588328 ("soc: renesas: rcar-sysc: Add r8a774c0 support") Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- drivers/soc/renesas/r8a774c0-sysc.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/drivers/soc/renesas/r8a774c0-sysc.c b/drivers/soc/renesas/r8a774c0-sysc.c index e1ac4c0f6640..11050e17ea81 100644 --- a/drivers/soc/renesas/r8a774c0-sysc.c +++ b/drivers/soc/renesas/r8a774c0-sysc.c @@ -28,19 +28,6 @@ static struct rcar_sysc_area r8a774c0_areas[] __initdata = { { "3dg-b", 0x100, 1, R8A774C0_PD_3DG_B, R8A774C0_PD_3DG_A }, }; -static void __init rcar_sysc_fix_parent(struct rcar_sysc_area *areas, - unsigned int num_areas, u8 id, - int new_parent) -{ - unsigned int i; - - for (i = 0; i < num_areas; i++) - if (areas[i].isr_bit == id) { - areas[i].parent = new_parent; - return; - } -} - /* Fixups for RZ/G2E ES1.0 revision */ static const struct soc_device_attribute r8a774c0[] __initconst = { { .soc_id = "r8a774c0", .revision = "ES1.0" }, @@ -50,12 +37,10 @@ static const struct soc_device_attribute r8a774c0[] __initconst = { static int __init r8a774c0_sysc_init(void) { if (soc_device_match(r8a774c0)) { - rcar_sysc_fix_parent(r8a774c0_areas, - ARRAY_SIZE(r8a774c0_areas), - R8A774C0_PD_3DG_A, R8A774C0_PD_3DG_B); - rcar_sysc_fix_parent(r8a774c0_areas, - ARRAY_SIZE(r8a774c0_areas), - R8A774C0_PD_3DG_B, R8A774C0_PD_ALWAYS_ON); + /* Fix incorrect 3DG hierarchy */ + swap(r8a774c0_areas[6], r8a774c0_areas[7]); + r8a774c0_areas[6].parent = R8A774C0_PD_ALWAYS_ON; + r8a774c0_areas[7].parent = R8A774C0_PD_3DG_B; } return 0;