From patchwork Tue Nov 10 15:20:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 11894631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5110C388F7 for ; Tue, 10 Nov 2020 15:21:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FB3B20797 for ; Tue, 10 Nov 2020 15:21:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rtCoYYuW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="e9x07HiS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FB3B20797 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=s1YoPlOzg01RQNqssuip76NFGMauhydZiPFvjh8If5s=; b=rtCoYYuW699yeEQdjjg+rtJE8+ Q548B7d8KAuVIajFgPudNiR8JdhuR1Ob57n2p2hoURsWL/SsNwyzdbuGhgJauZ671u5XTL6CByb+R Nt73brTvsijpBWui+uv1AcVVD37L+o/u16quf3Lovga5W6T1rcHzO1wNDCZSd6aWjplei4MJ93HYU 0boIE+ipWfntzrfZ3G9kgfT0NZQXFRq46O8jM9ggbpNvTaoxgiIMIB8fXCqgEGAD2ndRVcLlcpWee FNTE8lDNZ7eqAEQ9HGZiiK6F6IlEu3eGdT7I4eKJws8gn8y4WP0++6wTT0x8/yI1ugxEK2X8wEYNM tu/92XnA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcVS9-0003Bc-HP; Tue, 10 Nov 2020 15:21:01 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcVS5-00038m-KH for linux-arm-kernel@lists.infradead.org; Tue, 10 Nov 2020 15:20:58 +0000 Received: by mail-ed1-x543.google.com with SMTP id p93so13105473edd.7 for ; Tue, 10 Nov 2020 07:20:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SMNbGLi2Q4/xVsAortlccPXTjS9R1PWvo/pybl2OsXY=; b=e9x07HiS2tn6aNtybXD/R8/ilWG3oIDrDzv8eVGu9iJgWimMKhpRyjxu1KbktXFGJl 8XN4aXLRAj1mwsrHfiwUgNOr3nZVvomT2R5kYefqfGl5o0Mr9WJj26YSCpasuRCcvM4Y hp5avp96COv8xMdTf2+htoym/F1/W1Sc/azDo86Wt+QM+Ph/sStL1yAT49G/29f9Er3Y UmDlNNCTZT1l4F5S32AjDXyVnTXT74kSVefM9QmezIKdG2l/+Cy6H1kKGNx8sU4qmdv6 XVmaVsOv8C0ebNX3tEq/wZ93ZhYkP3BWVEkUaF7Ic2dU1NnPrSq5uJszykgfVWtnj+gY nT1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=SMNbGLi2Q4/xVsAortlccPXTjS9R1PWvo/pybl2OsXY=; b=liM4Ai6L7k+OBf30Zx6KZv48WEDTWe/Vo3arkb7zlIJnhJP2zMeMF//m+Ov2zJf4xM dT6y3mPAD+GI1LVCJ44kUS7pQWeiS7s9Z6hMNps83IGF8qDw/K3lHcfGod0KuAHtf28z B7KxrNFduR+y7P1CKj1gP4BeAkOO8u7omMJ3YdzPND+uA4RpxtYKhnav59r2+s7d/cXC zDT54+99V/XQkJHgdxv+0pbK5p6XVTTvatvLUtO10kQbNXjExg5PloBv2A14uOBwXtXP 3408dYOMEX8iEzhbIH+n/ctffa6Wuil8NeX5zaCdTz43k6for+NO8aRZK2KGf7b9X9AM /hRg== X-Gm-Message-State: AOAM531telmQ5hYzlDYLsPUdc74Xnsd6MlNWRBmhi1ZJkoHJwt6lZFAD oJSZ5Zc2cWD54YIrn+1l0fmjHA== X-Google-Smtp-Source: ABdhPJyh/LggTlRIYwsOreK6uI97W8fKKr4yjtDlCbqgtHI3WaqlzIw81U7JCVNmB9x+ikpLE93BPQ== X-Received: by 2002:a05:6402:144b:: with SMTP id d11mr21724069edx.195.1605021653284; Tue, 10 Nov 2020 07:20:53 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id s26sm6133267edy.1.2020.11.10.07.20.51 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Nov 2020 07:20:51 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, michal.simek@xilinx.com, git@xilinx.com Subject: [PATCH] arm64: zynqmp: Move gic node to axi bus Date: Tue, 10 Nov 2020 16:20:46 +0100 Message-Id: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201110_102057_701190_3E6A7AC3 X-CRM114-Status: GOOD ( 16.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Rajan Vaja , Paul Thomas , Krzysztof Kozlowski , Rob Herring , Manish Narani , Laurent Pinchart , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The reason for this change is that after change from amba to axi U-Boot started to show error like: Unable to update property /axi/ethernet@ff0e0000:mac-address, err=FDT_ERR_NOTFOUND Unable to update property /axi/ethernet@ff0e0000:local-mac-address, err=FDT_ERR_NOTFOUND The reason is implementation in fdt_nodename_eq_() which is taken from dtc to the kernel and to the U-Boot. Especially DTC commit d2a9da045897 ("libfdt: Make unit address optional for finding nodes") which is in DTC from 2007. The part of commit description is " This is contrary to traditional OF-like finddevice() behaviour, which allows the unit address to be omitted (which is useful when the device name is unambiguous without the address)." The kernel commit dfff9066e60e ("arm64: dts: zynqmp: Rename buses to be align with simple-bus yaml") changed amba-apu/amba to axi@0/axi but fdt_nodename_eq_() detects /axi/ as match for /axi@0/ because of commit above. That's why it easier to fix one DT inside the kernel by moving GIC node from own bus to generic axi bus as is done by others SoCs. This will avoid incorrect match because the unit address is omitted. Reported-by: Paul Thomas Signed-off-by: Michal Simek --- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 31 ++++++++++---------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index 771f60e0346d..515b15ed634a 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi @@ -182,25 +182,6 @@ fpga_full: fpga-full { ranges; }; - amba_apu: axi@0 { - compatible = "simple-bus"; - #address-cells = <2>; - #size-cells = <1>; - ranges = <0 0 0 0 0xffffffff>; - - gic: interrupt-controller@f9010000 { - compatible = "arm,gic-400"; - #interrupt-cells = <3>; - reg = <0x0 0xf9010000 0x10000>, - <0x0 0xf9020000 0x20000>, - <0x0 0xf9040000 0x20000>, - <0x0 0xf9060000 0x20000>; - interrupt-controller; - interrupt-parent = <&gic>; - interrupts = <1 9 0xf04>; - }; - }; - amba: axi { compatible = "simple-bus"; #address-cells = <2>; @@ -339,6 +320,18 @@ fpd_dma_chan8: dma@fd570000 { power-domains = <&zynqmp_firmware PD_GDMA>; }; + gic: interrupt-controller@f9010000 { + compatible = "arm,gic-400"; + #interrupt-cells = <3>; + reg = <0x0 0xf9010000 0x0 0x10000>, + <0x0 0xf9020000 0x0 0x20000>, + <0x0 0xf9040000 0x0 0x20000>, + <0x0 0xf9060000 0x0 0x20000>; + interrupt-controller; + interrupt-parent = <&gic>; + interrupts = <1 9 0xf04>; + }; + /* LPDDMA default allows only secured access. inorder to enable * These dma channels, Users should ensure that these dma * Channels are allowed for non secure access.