From patchwork Fri Mar 26 20:57:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=cgU90zG/; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7d0HBjz9sRf; Sat, 27 Mar 2021 07:58:19 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtX3-0001vb-8f; Fri, 26 Mar 2021 20:58:13 +0000 Received: from mail-wr1-f44.google.com ([209.85.221.44]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtX1-0001v8-Mm for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:11 +0000 Received: by mail-wr1-f44.google.com with SMTP id k8so6891108wrc.3 for ; Fri, 26 Mar 2021 13:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vdiU7Y4RNgXB3L/stGuWFCouSIbjBoxa5eef8I/LqUk=; b=cgU90zG/SHV7bN4KXQDMO5MdziAn1tKAxu0i5FmuALJgDOopwn+XCthXSJFjpFYizH e5usRLTzkmR/hTfTvYNpATbbVzZNQe7dY/8pn/w4iJSNsBxVuYgjBEWzdywkto2KEViP MrueGRxtRPDZQqDDeTSd0Sz2MLBOkuMPsqAoI= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vdiU7Y4RNgXB3L/stGuWFCouSIbjBoxa5eef8I/LqUk=; b=Vry7PRHyisELb4OnBuT4TjRS/KpkF4ROqtCHazo5jOszCWBbHYiQ/Cug2v3mcWHIiB prcjJMZD0nnCCmlYdaoVi4zFYcrvjzJP8Gj4pFjSHnSrjTIJ+v9Ws71knKJD6wlEp5oz DTTZB+iy8mi8S6b+Z8ElkGUJZeIz6XU56WG2glxPi2kWPyp0oz+OAotCEtXofxTSLblv AV3NoPZTerH9BbFYlpnzZdgmZjl+D0VxkOzLXOE3gWYz54hX3nM4H5daa/B5GRVMoVSE 0DSZ2mJ4lUfGbv+iLui1+5n7VwvsBjqwUX1kIqEaa/v+RhWdvUoOLI8LiY9xflBpYqXs /3mA== X-Gm-Message-State: AOAM531iXOqgPYqQUWZMJTCnlQ9dKJCnT9BvysZxHYbVwCVzrZVM0uWe AeEelL2wXpzyYpPA29JseLPEYfwHl+gzKA== X-Google-Smtp-Source: ABdhPJwc0lRFEC0SfInngYNBrDHBrlYPTCOk/kf2HFk1PWlekPDNjUW4vIlb2LotcUg9OAWdNCS20A== X-Received: by 2002:adf:c3c8:: with SMTP id d8mr16221729wrg.167.1616792290849; Fri, 26 Mar 2021 13:58:10 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id k13sm17042828wri.27.2021.03.26.13.58.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:10 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/8] Revert "dt-bindings: riscv: Update DT binding docs to support SiFive FU740 SoC" Date: Fri, 26 Mar 2021 20:57:56 +0000 Message-Id: <20210326205803.157027-2-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This reverts commit dc2249586f1b9558f745e65d61a4b0e383ca1714. Signed-off-by: Dimitri John Ledkov --- .../devicetree/bindings/gpio/sifive,gpio.yaml | 4 +--- Documentation/devicetree/bindings/i2c/i2c-ocores.txt | 10 +++++----- Documentation/devicetree/bindings/pwm/pwm-sifive.yaml | 9 +++------ Documentation/devicetree/bindings/riscv/cpus.yaml | 6 ------ 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml index b71d261ea504..a0efd8dc2538 100644 --- a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml @@ -13,9 +13,7 @@ maintainers: properties: compatible: items: - - enum: - - sifive,fu540-c000-gpio - - sifive,fu740-c000-gpio + - const: sifive,fu540-c000-gpio - const: sifive,gpio0 reg: diff --git a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt index efd0f8537128..a37c9455b244 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-ocores.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-ocores.txt @@ -3,14 +3,14 @@ Device tree configuration for i2c-ocores Required properties: - compatible : "opencores,i2c-ocores" "aeroflexgaisler,i2cmst" - "sifive,-i2c", "sifive,i2c0" + "sifive,fu540-c000-i2c", "sifive,i2c0" For Opencore based I2C IP block reimplemented in + FU540-C000 SoC. "sifive,fu740-c000-i2c", "sifive,i2c0" For Opencore based I2C IP block reimplemented in - SiFive SoC. Supported compatible strings are: - "sifive,fu540-c000-i2c" and "sifive,fu740-c000-i2c" - Please refer to sifive-blocks-ip-versioning.txt - for additional details. + FU740-C000 SoC. + Please refer to sifive-blocks-ip-versioning.txt for + additional details. - reg : bus address start and address range size of device - clocks : handle to the controller clock; see the note below. Mutually exclusive with opencores,ip-clock-frequency diff --git a/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml b/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml index 84e66913d042..5ac25275d8bf 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml +++ b/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml @@ -25,15 +25,12 @@ description: properties: compatible: items: - - enum: - - sifive,fu540-c000-pwm - - sifive,fu740-c000-pwm + - const: sifive,fu540-c000-pwm - const: sifive,pwm0 description: Should be "sifive,-pwm" and "sifive,pwm". Supported - compatible strings are "sifive,fu540-c000-pwm" and - "sifive,fu740-c000-pwm" for the SiFive PWM v0 as integrated onto the - SiFive FU540 and FU740 chip respectively, and "sifive,pwm0" for the + compatible strings are "sifive,fu540-c000-pwm" for the SiFive PWM v0 + as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the SiFive PWM v0 IP block with no chip integration tweaks. Please refer to sifive-blocks-ip-versioning.txt for details. diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index eb6843f69f7c..c6925e0b16e4 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -28,17 +28,11 @@ properties: - items: - enum: - sifive,rocket0 - - sifive,bullet0 - sifive,e5 - - sifive,e7 - sifive,e51 - - sifive,e71 - sifive,u54-mc - - sifive,u74-mc - sifive,u54 - - sifive,u74 - sifive,u5 - - sifive,u7 - const: riscv - const: riscv # Simulator only description: From patchwork Fri Mar 26 20:57:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=eWtIlwtF; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7g6xlzz9sWQ; Sat, 27 Mar 2021 07:58:23 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtX6-0001wY-Hw; Fri, 26 Mar 2021 20:58:16 +0000 Received: from mail-wr1-f41.google.com ([209.85.221.41]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtX2-0001vE-Mb for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:12 +0000 Received: by mail-wr1-f41.google.com with SMTP id z2so6879006wrl.5 for ; Fri, 26 Mar 2021 13:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mEgKisxEgiRxxp4JdYi0wjWYlh+mNTLmi0st2K57Wrs=; b=eWtIlwtFVbdXq7zJO37YGfzt9PHfZ2qN/cM6E1yiECrqyOSRbc+AIkfaUVLJSe/jZr rfYVRW5HEZCQ3d6Ks86ayy2hzeF09vsD419ciHs9fmDk+ghieM3XE4AioAgGv+y3oWV0 TG/QdDCvcbUImPhZo3WGOCHhsihDd3f9amjTI= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=mEgKisxEgiRxxp4JdYi0wjWYlh+mNTLmi0st2K57Wrs=; b=teXgujaDh0gMgVBsR9LTQS9fGXXFnfdWTANor6zXtyyMMFyySQfbV4L+FRh9BwCVWV 0QhAsbX6FNZVih2++XCaDzTAeGp4DgukHA2iBrUZLDvpVEQVfsYL6BDkJOalGyI+s+71 WMNzR1iiKCyUpEIYXArlHZ9yzzc79Cv0R9L0spCG+WdXIWb4FsyUa3Yr61RevyMyjzki IRv+0e6GBDLJxK5F+U338Ai3MQjTePRQvszZNzeaESKlTeS4xWFmzj6GsP39SlLwYM0w ewPlfF5GtZflqNsu563Z4MGHJE4FXFcSzHmeBLQ8jC89h/i3jrjqS2qR/LLvObraBLIm Dz+A== X-Gm-Message-State: AOAM532M7ceg4AgFz4eFZCA1LBRKZS9BU2wiruHG2pA3oR63KOd5/BDm /IAe7ji68+40sFel+hP2V5lFMbpzxNrvhA== X-Google-Smtp-Source: ABdhPJykzUVVVvt0Kisc6NrKIhCLP4soOwd42cfFekQOFhMRitr9b3czr2HTgtAC9VRKE3nsBV09HQ== X-Received: by 2002:adf:ed49:: with SMTP id u9mr16426864wro.337.1616792292111; Fri, 26 Mar 2021 13:58:12 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id v7sm13645391wme.47.2021.03.26.13.58.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:11 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/8] dt-bindings: riscv: Update DT binding docs to support SiFive FU740 SoC Date: Fri, 26 Mar 2021 20:57:57 +0000 Message-Id: <20210326205803.157027-3-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yash Shah Add new compatible strings in cpus.yaml to support the E71 and U74 CPU cores ("harts") that are present on FU740-C000 SoC. Signed-off-by: Yash Shah Reviewed-by: Rob Herring Reviewed-by: Bin Meng Signed-off-by: Dimitri John Ledkov --- Documentation/devicetree/bindings/riscv/cpus.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index c6925e0b16e4..eb6843f69f7c 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -28,11 +28,17 @@ properties: - items: - enum: - sifive,rocket0 + - sifive,bullet0 - sifive,e5 + - sifive,e7 - sifive,e51 + - sifive,e71 - sifive,u54-mc + - sifive,u74-mc - sifive,u54 + - sifive,u74 - sifive,u5 + - sifive,u7 - const: riscv - const: riscv # Simulator only description: From patchwork Fri Mar 26 20:57:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=Y2NKZYk+; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7k14qLz9rx6; Sat, 27 Mar 2021 07:58:26 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtXA-0001yY-Qe; Fri, 26 Mar 2021 20:58:20 +0000 Received: from mail-wm1-f48.google.com ([209.85.128.48]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtX3-0001vl-SM for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:13 +0000 Received: by mail-wm1-f48.google.com with SMTP id 12so3607585wmf.5 for ; Fri, 26 Mar 2021 13:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7R8SoYlkN9N2c65k10+py2c6RwCYl8B7v01/lG62630=; b=Y2NKZYk+DnACdme/CYIPexhJX8IuuEFcQqjgrhXnuJ91NdTfqFSTianfgckQhiThdH yBcQAHQwrkAJw+WtIubiQHTDCoNJGggJoBpxkWPnDsurenkk801+QXaFCJFTXzInxUCa TL4VVRZBjGmg4ysVczW5gzbJXK485E0eXgKyE= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7R8SoYlkN9N2c65k10+py2c6RwCYl8B7v01/lG62630=; b=ZUg/D548+hZV//4JdHg5IXgrRgRzgHdCYqPlHVIoQzxGRg0ROK6N2L4znwvjn4fHJ8 7TSa/IlzsjA3d9dNKd/aabuhsJvOjyu/dVwc5tCQquTTne8WnCSaBDXGr2zObH89n8pT TsSNnCqruJzr26B/1P4HJlnDtMHhcXfWSjCCk0AXHzRqstOkZGWhjKqK6oINnw4BYepr DrLU3F8ObYZ12dvvw0GWh8P18Y3DiE3iXU62v20RJut4eZSqHm72ARhgZvVHdgdRGf5C keMqRthPfKNbfHOmO45i7iWQ5T6mxDRtITIR7xy/tv7MBog/pcNjPeuf+pBKAHTVnll8 KG6g== X-Gm-Message-State: AOAM531+gDbA25IPaiThTa18cKVmNs+15HRBcWSMXyhH+6e7ujHQmRE9 BLaLa8LrqJTZT2y13QlDKxpkfJWLuJUjtw== X-Google-Smtp-Source: ABdhPJz9oESAsAjNi9SzXIThyotedq2+AM14p+ByDC6c4cUUrvz+P79JQgD4cCofHz8Ij13+ZwXPSQ== X-Received: by 2002:a05:600c:4f55:: with SMTP id m21mr14546211wmq.11.1616792293109; Fri, 26 Mar 2021 13:58:13 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id f2sm13780828wmp.20.2021.03.26.13.58.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:12 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/8] dt-bindings: pwm: Update DT binding docs to support SiFive FU740 SoC Date: Fri, 26 Mar 2021 20:57:58 +0000 Message-Id: <20210326205803.157027-4-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yash Shah Add new compatible strings to the DT binding documents to support SiFive FU740-C000. Signed-off-by: Yash Shah Signed-off-by: Dimitri John Ledkov --- Documentation/devicetree/bindings/pwm/pwm-sifive.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml b/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml index 5ac25275d8bf..84e66913d042 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml +++ b/Documentation/devicetree/bindings/pwm/pwm-sifive.yaml @@ -25,12 +25,15 @@ description: properties: compatible: items: - - const: sifive,fu540-c000-pwm + - enum: + - sifive,fu540-c000-pwm + - sifive,fu740-c000-pwm - const: sifive,pwm0 description: Should be "sifive,-pwm" and "sifive,pwm". Supported - compatible strings are "sifive,fu540-c000-pwm" for the SiFive PWM v0 - as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the + compatible strings are "sifive,fu540-c000-pwm" and + "sifive,fu740-c000-pwm" for the SiFive PWM v0 as integrated onto the + SiFive FU540 and FU740 chip respectively, and "sifive,pwm0" for the SiFive PWM v0 IP block with no chip integration tweaks. Please refer to sifive-blocks-ip-versioning.txt for details. From patchwork Fri Mar 26 20:57:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459048 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=cJJ8ia3+; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7f0M4gz9sVS; Sat, 27 Mar 2021 07:58:21 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtX7-0001ws-1O; Fri, 26 Mar 2021 20:58:17 +0000 Received: from mail-wr1-f45.google.com ([209.85.221.45]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtX4-0001vz-QL for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:14 +0000 Received: by mail-wr1-f45.google.com with SMTP id j9so5146468wrx.12 for ; Fri, 26 Mar 2021 13:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Jba2o2CKOQse/es92k6dQCBHLrAuKFE93nhcuL78IM=; b=cJJ8ia3+LTVkiuADuEkS+T9lv6OWMAs8abUMnoo9thfBfGlSZBLAMamf4cXhzvrcsy mQTVsPYUgVJOhBRrzaAv0z2axXBOB/jlQ0f6kO7usVrFoUzb0SjH1BBj+gO3i3o/Sdse j1OXyiBNRb+crBQEUtSm0NLILXfmvELEgA16E= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6Jba2o2CKOQse/es92k6dQCBHLrAuKFE93nhcuL78IM=; b=S5+T0fbhczQv4C28N9oy86RxSUp5quXjgT7ZU9HSqUn7zz2DPfrUUq8/K4nMtTTAD0 ZRK99xvfOacW5H7rxwAfnTvrhT3rKnXHabiLRBn6Z6aQaXNv0nKhPiO9ntFtov2JOeGY PZAa1lqrEzjLJENC3Xk/u3a6ZBeFULe2RskWrVy/wVXjDCbRUUx54AiQTvB5hM6yXgBA 0wAv2srMHXC/E78gFROg8OO6NvvRKj4TgxLXDMkV2BAURgaGECNaQY9y6F71ODhhLmbZ +E/WLFbgxVyyCdyLJbUi1kcfWHojtFewdPdHhnYqpH3BsMxr7hpr9+uWuHolAA5k5yyC LyHA== X-Gm-Message-State: AOAM530hvea75sKM2OnCjtBLDwPcZB23MBDw8lfbwPV9I9WcKY4jH+x+ TYHg3UOZp01yKnAH9k6dg+PQjz3ndZ5ikA== X-Google-Smtp-Source: ABdhPJwUEpt/PQ2fI2iP3H0ZscyoZ4e7S8Dt+l6GvvcNorYUy4pJKAkP/VIGqcM/blU95ZR0bOMrAg== X-Received: by 2002:a5d:4743:: with SMTP id o3mr16568838wrs.108.1616792294163; Fri, 26 Mar 2021 13:58:14 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id a13sm14541449wrp.31.2021.03.26.13.58.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:13 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 4/8] dt-bindings: gpio: Update DT binding docs to support SiFive FU740 SoC Date: Fri, 26 Mar 2021 20:57:59 +0000 Message-Id: <20210326205803.157027-5-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yash Shah Add new compatible strings to the DT binding documents to support SiFive FU740-C000. Signed-off-by: Yash Shah Reviewed-by: Rob Herring Signed-off-by: Dimitri John Ledkov --- Documentation/devicetree/bindings/gpio/sifive,gpio.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml index a0efd8dc2538..ab22056f8b44 100644 --- a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml @@ -13,7 +13,9 @@ maintainers: properties: compatible: items: - - const: sifive,fu540-c000-gpio + - enum: + - sifive,fu540-c000-gpio + - sifive,fu740-c000-gpio - const: sifive,gpio0 reg: From patchwork Fri Mar 26 20:58:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=CoFFFgML; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7g65Kkz9sVm; Sat, 27 Mar 2021 07:58:23 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtX8-0001xc-HS; Fri, 26 Mar 2021 20:58:18 +0000 Received: from mail-wr1-f52.google.com ([209.85.221.52]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtX5-0001wF-RG for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:15 +0000 Received: by mail-wr1-f52.google.com with SMTP id o16so6930247wrn.0 for ; Fri, 26 Mar 2021 13:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/K/2Kt6NYTf34LIOxbcJBqGyyuU9lpFLdG28zABcByM=; b=CoFFFgMLhpwbodua68PT4ofZk8vkK6xp6Gm537tb1fJqcGC6G9Cch3Ly9NX779ZZdk hTPAz4iMt9PUpzn0kStMBy5uvSXusWCnF3yvuZYqz3556xTdWLvXkZQVe7SDqofdWwxj G3eV1tFyvPwaKIrcVrWdqeNvawAA/sdeWidmk= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/K/2Kt6NYTf34LIOxbcJBqGyyuU9lpFLdG28zABcByM=; b=D8ygSxnwC0A1bDQ8pYN2CGkCmFQVPIg4yVTrNPxJxVJKmhek/dt6IpBdXVD79yHinh iOdve6hG4mfcXdORyikdalf7FT9vte81t8WtUkRK6EyjvD6dQAJYXBO2wMqi60KCQTu/ dFLe6JZeB5I3CtNRCQkXcjBAeeeUk6wiwfdmPQtbkjKqow9jV8ri+4SpvKpE057G7yfE bl/dpBKPTB8tiudrilcyJJvS0641ek86c7I+jnRPjkRnrrHcSnc+Dx01namXiYCEm6OK XbG5SBS6q5qs7l6/JQGDsDdohz3mgxbEGssUNR1feFdYThMAJGEmCqVgIHRkzj6CWAWS Pzag== X-Gm-Message-State: AOAM5327GrS2FZdVUBetsTWJ/1pnLCP1yHWYWLhe6g0KqxfbhgH3ftsF +SBz/moCZKTdnGM6/M1Rejc3pYp++NosiA== X-Google-Smtp-Source: ABdhPJxyVWtLqwJwiwpgD9s3jE38mmHPGurFfFqzkVvkcF8bmCziCzWvYtXgIoktveIASXwsamzrDA== X-Received: by 2002:a5d:5051:: with SMTP id h17mr16165843wrt.80.1616792295131; Fri, 26 Mar 2021 13:58:15 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id k11sm12953324wmj.1.2021.03.26.13.58.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:14 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/8] Revert "RISC-V: sifive_l2_cache: Update L2 cache driver to support SiFive FU740" Date: Fri, 26 Mar 2021 20:58:00 +0000 Message-Id: <20210326205803.157027-6-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This reverts commit 5063de1bbb516d06347285ad2a65cd8a23c6e75a. Signed-off-by: Dimitri John Ledkov --- drivers/soc/sifive/sifive_l2_cache.c | 49 ++++------------------------ 1 file changed, 6 insertions(+), 43 deletions(-) diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c index 4e5e8411fbdd..44d7e1951da3 100644 --- a/drivers/soc/sifive/sifive_l2_cache.c +++ b/drivers/soc/sifive/sifive_l2_cache.c @@ -17,10 +17,6 @@ #define SIFIVE_L2_DIRECCFIX_HIGH 0x104 #define SIFIVE_L2_DIRECCFIX_COUNT 0x108 -#define SIFIVE_L2_DIRECCFAIL_LOW 0x120 -#define SIFIVE_L2_DIRECCFAIL_HIGH 0x124 -#define SIFIVE_L2_DIRECCFAIL_COUNT 0x128 - #define SIFIVE_L2_DATECCFIX_LOW 0x140 #define SIFIVE_L2_DATECCFIX_HIGH 0x144 #define SIFIVE_L2_DATECCFIX_COUNT 0x148 @@ -33,7 +29,7 @@ #define SIFIVE_L2_WAYENABLE 0x08 #define SIFIVE_L2_ECCINJECTERR 0x40 -#define SIFIVE_L2_MAX_ECCINTR 4 +#define SIFIVE_L2_MAX_ECCINTR 3 static void __iomem *l2_base; static int g_irq[SIFIVE_L2_MAX_ECCINTR]; @@ -41,7 +37,6 @@ static struct riscv_cacheinfo_ops l2_cache_ops; enum { DIR_CORR = 0, - DIR_UNCORR, DATA_CORR, DATA_UNCORR, }; @@ -98,7 +93,6 @@ static void l2_config_read(void) static const struct of_device_id sifive_l2_ids[] = { { .compatible = "sifive,fu540-c000-ccache" }, - { .compatible = "sifive,fu740-c000-ccache" }, { /* end of table */ }, }; @@ -161,15 +155,6 @@ static irqreturn_t l2_int_handler(int irq, void *device) atomic_notifier_call_chain(&l2_err_chain, SIFIVE_L2_ERR_TYPE_CE, "DirECCFix"); } - if (irq == g_irq[DIR_UNCORR]) { - add_h = readl(l2_base + SIFIVE_L2_DIRECCFAIL_HIGH); - add_l = readl(l2_base + SIFIVE_L2_DIRECCFAIL_LOW); - /* Reading this register clears the DirFail interrupt sig */ - readl(l2_base + SIFIVE_L2_DIRECCFAIL_COUNT); - atomic_notifier_call_chain(&l2_err_chain, SIFIVE_L2_ERR_TYPE_UE, - "DirECCFail"); - panic("L2CACHE: DirFail @ 0x%08X.%08X\n", add_h, add_l); - } if (irq == g_irq[DATA_CORR]) { add_h = readl(l2_base + SIFIVE_L2_DATECCFIX_HIGH); add_l = readl(l2_base + SIFIVE_L2_DATECCFIX_LOW); @@ -194,9 +179,9 @@ static irqreturn_t l2_int_handler(int irq, void *device) static int __init sifive_l2_init(void) { - int i, k, rc, intr_num, offset = 0; struct device_node *np; struct resource res; + int i, rc; np = of_find_matching_node(NULL, sifive_l2_ids); if (!np) @@ -209,33 +194,11 @@ static int __init sifive_l2_init(void) if (!l2_base) return -ENOMEM; - intr_num = of_property_count_u32_elems(np, "interrupts"); - if (!intr_num) { - pr_err("L2CACHE: no interrupts property\n"); - return -ENODEV; - } - - /* - * Only FU540 have 3 interrupts. Rest all other variants have - * 4 interrupts (+dirfail). Therefore offset is required to skip - * 'dirfail' interrupt entry in case of FU540 - */ - if (of_device_is_compatible(np, "sifive,fu540-c000-ccache")) - offset = 1; - - g_irq[0] = irq_of_parse_and_map(np, 0); - rc = request_irq(g_irq[0], l2_int_handler, 0, "l2_ecc", NULL); - if (rc) { - pr_err("L2CACHE: Could not request IRQ %d\n", g_irq[0]); - return rc; - } - - for (i = 1; i < intr_num; i++) { - k = i + offset; - g_irq[k] = irq_of_parse_and_map(np, i); - rc = request_irq(g_irq[k], l2_int_handler, 0, "l2_ecc", NULL); + for (i = 0; i < SIFIVE_L2_MAX_ECCINTR; i++) { + g_irq[i] = irq_of_parse_and_map(np, i); + rc = request_irq(g_irq[i], l2_int_handler, 0, "l2_ecc", NULL); if (rc) { - pr_err("L2CACHE: Could not request IRQ %d\n", g_irq[k]); + pr_err("L2CACHE: Could not request IRQ %d\n", g_irq[i]); return rc; } } From patchwork Fri Mar 26 20:58:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=L8WCdCqT; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7t04Pkz9rx6; Sat, 27 Mar 2021 07:58:33 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtXI-00021z-Bb; Fri, 26 Mar 2021 20:58:28 +0000 Received: from mail-wr1-f47.google.com ([209.85.221.47]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtX7-0001wy-Ks for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:17 +0000 Received: by mail-wr1-f47.google.com with SMTP id j7so6903454wrd.1 for ; Fri, 26 Mar 2021 13:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7Cf3qGV2fv/GaFjU19n0FRzpIDHlkJekTE2IH2Io8/Y=; b=L8WCdCqT2FP8ECbRvA3tLwtXSlv1UZApAVVdVJEamVTyUHDXEnrh/CcmUBJLfcoLIT C4NAMrRgHVPXl+hls5Bpjwe33dn4z2KYxPPc0HDDhIE7BtU0nW/ZXHiT+uy897bZv/bq xoEzDkbSSnjTPdezCWs4lDX9yp4YQpQiAYVEs= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7Cf3qGV2fv/GaFjU19n0FRzpIDHlkJekTE2IH2Io8/Y=; b=DxKnzVYETkATDf3fOFjA5xQpZs6YkM1GYmIZQMSgeowEwjkDPRbZoRQND5+NNZdZMV /UYQ68lEQ0polOWHs6QwIsXbOX//WaIDiP5/7vAK4ptOGELSE603+O+BQbVhFDBg28NC x91EJxwCJkUbEPzSqsiTePwXmP8du++z3EgknNn7VIkg5nKMjf1KVUdjs6ryXDa8jbbb IOiVypdMDTFIsv4/zW90p/3PSoLgULlPvXw0HWLTkL/6lMfuyYeofEDQ765FabFJEW1M srWDlHRefWyZwIejxaX7wV/T7Sms04brVQm7V0m3E+dNDX7uizPV5StjRaa4ISuX2wfz 6Liw== X-Gm-Message-State: AOAM533PnxxOBzlVqfS/VnN+rBZvznuoVgR/D4i/d9Wi6dYL8V0hBMwd FBqlOQEUXr7kuiilfRatB//tY7m+hhIl7A== X-Google-Smtp-Source: ABdhPJyKptNvCz5vAX0yiZa/j7xT5hqp85Nf99cGPz+wuChrnW4NxViFkZWC6nF8AHpW/5lG0e5sLQ== X-Received: by 2002:adf:fe48:: with SMTP id m8mr16050271wrs.135.1616792296570; Fri, 26 Mar 2021 13:58:16 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id v18sm14822584wru.85.2021.03.26.13.58.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:16 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 6/8] Revert "RISC-V: Update l2 cache DT documentation to add support for SiFive FU740" Date: Fri, 26 Mar 2021 20:58:01 +0000 Message-Id: <20210326205803.157027-7-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This reverts commit e8a04dd6d642cf1d2f7c6de0589c69305fa32deb. Signed-off-by: Dimitri John Ledkov --- .../bindings/riscv/sifive-l2-cache.yaml | 35 ++----------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml index 749265c0aaba..efc0198eeb74 100644 --- a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml +++ b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml @@ -27,7 +27,6 @@ select: items: - enum: - sifive,fu540-c000-ccache - - sifive,fu740-c000-ccache required: - compatible @@ -35,9 +34,7 @@ select: properties: compatible: items: - - enum: - - sifive,fu540-c000-ccache - - sifive,fu740-c000-ccache + - const: sifive,fu540-c000-ccache - const: cache cache-block-size: @@ -56,15 +53,9 @@ properties: interrupts: description: | - Must contain 3 entries for FU540 (DirError, DataError and DataFail) or 4 - entries for other chips (DirError, DirFail, DataError, DataFail signals) + Must contain entries for DirError, DataError and DataFail signals. minItems: 3 - maxItems: 4 - items: - - description: DirError interrupt - - description: DirFail interrupt - - description: DataError interrupt - - description: DataFail interrupt + maxItems: 3 reg: maxItems: 1 @@ -76,26 +67,6 @@ properties: The reference to the reserved-memory for the L2 Loosely Integrated Memory region. The reserved memory node should be defined as per the bindings in reserved-memory.txt. -if: - properties: - compatible: - contains: - const: sifive,fu540-c000-ccache - -then: - properties: - interrupts: - description: | - Must contain entries for DirError, DataError and DataFail signals. - maxItems: 3 - -else: - properties: - interrupts: - description: | - Must contain entries for DirError, DirFail, DataError, DataFail signals. - minItems: 4 - additionalProperties: false required: From patchwork Fri Mar 26 20:58:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=XX+ie5Y/; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7x0H1qz9rx6; Sat, 27 Mar 2021 07:58:37 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtXM-00023r-5t; Fri, 26 Mar 2021 20:58:32 +0000 Received: from mail-wr1-f44.google.com ([209.85.221.44]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtX8-0001xX-VK for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:19 +0000 Received: by mail-wr1-f44.google.com with SMTP id v4so6840562wrp.13 for ; Fri, 26 Mar 2021 13:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6eRUIN6ron8kXehjkpe2YGFhm7HMq3hm7y+SD/h9s9M=; b=XX+ie5Y/Pa2tq+IiAF1BQ1yfH+QwYaODKXeYPNUNiWhYVTnuRdoWEZ9Q10Zktm20YT qCDlDaNRJ0Wiyz5tu6ucLd0wHyyXB9F2fnR6ZeD0cy0m5otSwSPWBUoU/ohrLeHhAmSM aRbwX3XIyOSwILCFm6m3tY5J1E6uP6/xa2fjo= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6eRUIN6ron8kXehjkpe2YGFhm7HMq3hm7y+SD/h9s9M=; b=QgeQ4uv9lasaa8mBwjl8jIlpMtrhmcE4JwUIzWRYwnXjaraGkGa0Ji9MElTfURPf2u PTwfen7AWfGoEG+KN5UncxCruJzahKi5Fo/pE2xcJlju/du6nwwm4pWgQqBmaRTaC48Z GOThYK7jkqqbYJ++R/hCz2s9dkL0DZPiv/nzVurif578UC30aJeRP0MlzIXZHKAgAFwY LEZiahqNvQfou2/BYcoii/wj2mqpApNVYDvZCypxsboedjqEtOwvqS0Ra6mmXP4eCXF3 km0XkphS82L7hWz20ObDk+oB5bghUsoM3kWgj+xPWT9mTgWanyTQ0M7f70O2MEtv6GyV 7CIQ== X-Gm-Message-State: AOAM531L6MSMMcQxLCPil0PA5QqAMJuR3YVeMCs1qeCfsh2qhNTpbR0q oBtO1j4kXMkHWrAspqd67PEWEUUQ5c+zmQ== X-Google-Smtp-Source: ABdhPJyr5NI3vozliZd18Vp/PvMCJ9vl3/S3tBlb7Q0XvHHd7XVfoFyX9HNyyoDfAnVNJU2XKE7GzQ== X-Received: by 2002:adf:fb0e:: with SMTP id c14mr16694560wrr.140.1616792297506; Fri, 26 Mar 2021 13:58:17 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id s83sm13151510wmf.26.2021.03.26.13.58.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:17 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 7/8] dt-bindings: riscv: Update l2 cache DT documentation to add support for SiFive FU740 Date: Fri, 26 Mar 2021 20:58:02 +0000 Message-Id: <20210326205803.157027-8-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yash Shah The L2 cache controller in SiFive FU740 has 4 ECC interrupt sources as compared to 3 in FU540. Update the DT documentation accordingly with "compatible" and "interrupt" property changes. Signed-off-by: Yash Shah Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Reviewed-by: Rob Herring Signed-off-by: Dimitri John Ledkov --- .../bindings/riscv/sifive-l2-cache.yaml | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml index efc0198eeb74..6a576dce1f31 100644 --- a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml +++ b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml @@ -27,6 +27,7 @@ select: items: - enum: - sifive,fu540-c000-ccache + - sifive,fu740-c000-ccache required: - compatible @@ -34,7 +35,9 @@ select: properties: compatible: items: - - const: sifive,fu540-c000-ccache + - enum: + - sifive,fu540-c000-ccache + - sifive,fu740-c000-ccache - const: cache cache-block-size: @@ -52,10 +55,13 @@ properties: cache-unified: true interrupts: - description: | - Must contain entries for DirError, DataError and DataFail signals. minItems: 3 - maxItems: 3 + maxItems: 4 + items: + - description: DirError interrupt + - description: DataError interrupt + - description: DataFail interrupt + - description: DirFail interrupt reg: maxItems: 1 @@ -67,6 +73,26 @@ properties: The reference to the reserved-memory for the L2 Loosely Integrated Memory region. The reserved memory node should be defined as per the bindings in reserved-memory.txt. +if: + properties: + compatible: + contains: + const: sifive,fu540-c000-ccache + +then: + properties: + interrupts: + description: | + Must contain entries for DirError, DataError and DataFail signals. + maxItems: 3 + +else: + properties: + interrupts: + description: | + Must contain entries for DirError, DataError, DataFail, DirFail signals. + minItems: 4 + additionalProperties: false required: From patchwork Fri Mar 26 20:58:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1459055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=surgut.co.uk header.i=@surgut.co.uk header.a=rsa-sha256 header.s=google header.b=GD92AYxk; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6Z7z22PWz9rx6; Sat, 27 Mar 2021 07:58:39 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lPtXO-00025A-RB; Fri, 26 Mar 2021 20:58:34 +0000 Received: from mail-wm1-f50.google.com ([209.85.128.50]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lPtXA-0001xz-7e for kernel-team@lists.ubuntu.com; Fri, 26 Mar 2021 20:58:20 +0000 Received: by mail-wm1-f50.google.com with SMTP id g25so3649980wmh.0 for ; Fri, 26 Mar 2021 13:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=surgut.co.uk; s=google; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zzvDYq4dbnciFB2h952xk6ZIUkUSmelxXpi6h9m/rto=; b=GD92AYxkk+n5jtcr8QIbZrHCNAUdztCbvGSMml5BuKKBUXST/88VcqnLtOoIa4Vv5Z GbQyk/iUGS9dAvuNJTDu50Cp8ZZylN47ZQjgA7tiSz5FlYWZAWqfyDd3TAXuPn/m2isT UnpPhZ/cZXJzo8hxSixN98ssNQMWYS7D+JO+M= 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:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zzvDYq4dbnciFB2h952xk6ZIUkUSmelxXpi6h9m/rto=; b=mA77qShk9EKZvLnHNNuYjQ5pOx6eLxDejenjyFyHqT0+Q+Cir2ofRTb7cnMyVUDo4y DY3DUY9sjHhMVw43Kw+RCdFCKEIZkVIDXjSgv1bxlEZnWWARXjY9ap+9mlC4xDalsv3R 839d3h4JZPPV2QPd0NhLQCO3FizsBSUk41ZTApQ6/MtvPVHmQ6no4U8jqq9NFPsKHPMX MV0wjiMTjZEIc7Ct9ofzwYp/YUXCMnZ0S5+8tCX5LDgdKmx7vdYhmTiT7PfJs/HGzDev 8aZlo+cF6Tlx/RQcJXDpptrJYmejq7rPAKhXU2aBrIGgkWWTLiVVBKTPK9tl2IwkQHyS OzKw== X-Gm-Message-State: AOAM533TOpzouhRWIsJIsL6KScx8pQN5NxmhzT+fJmQjcBrdat92u8N9 ypHBNQ224UvUMNoFyb4+nkcrCj8+oo2o9A== X-Google-Smtp-Source: ABdhPJwLeUZsZNJ5l1ppzJ6pOmCZcyKOWZlODhkaCZdhtMs8qsBLTz2pkl/hpz9YHNMuu0m6kSoDEw== X-Received: by 2002:a05:600c:4f4f:: with SMTP id m15mr14496684wmq.29.1616792298450; Fri, 26 Mar 2021 13:58:18 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:fc4a:4226:d75d:7eed]) by smtp.gmail.com with ESMTPSA id u2sm16888631wmm.5.2021.03.26.13.58.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 13:58:18 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 8/8] RISC-V: sifive_l2_cache: Update L2 cache driver to support SiFive FU740 Date: Fri, 26 Mar 2021 20:58:03 +0000 Message-Id: <20210326205803.157027-9-xnox@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210326205803.157027-1-xnox@ubuntu.com> References: <20210326205803.157027-1-xnox@ubuntu.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Yash Shah SiFive FU740 has 4 ECC interrupt sources as compared to 3 in FU540. Update the L2 cache controller driver to support this additional interrupt in case of FU740-C000 chip. Signed-off-by: Yash Shah BugLink: https://bugs.launchpad.net/bugs/1920916 Signed-off-by: Dimitri John Ledkov --- drivers/soc/sifive/sifive_l2_cache.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c index 44d7e1951da3..59640a1d0b28 100644 --- a/drivers/soc/sifive/sifive_l2_cache.c +++ b/drivers/soc/sifive/sifive_l2_cache.c @@ -17,6 +17,10 @@ #define SIFIVE_L2_DIRECCFIX_HIGH 0x104 #define SIFIVE_L2_DIRECCFIX_COUNT 0x108 +#define SIFIVE_L2_DIRECCFAIL_LOW 0x120 +#define SIFIVE_L2_DIRECCFAIL_HIGH 0x124 +#define SIFIVE_L2_DIRECCFAIL_COUNT 0x128 + #define SIFIVE_L2_DATECCFIX_LOW 0x140 #define SIFIVE_L2_DATECCFIX_HIGH 0x144 #define SIFIVE_L2_DATECCFIX_COUNT 0x148 @@ -29,7 +33,7 @@ #define SIFIVE_L2_WAYENABLE 0x08 #define SIFIVE_L2_ECCINJECTERR 0x40 -#define SIFIVE_L2_MAX_ECCINTR 3 +#define SIFIVE_L2_MAX_ECCINTR 4 static void __iomem *l2_base; static int g_irq[SIFIVE_L2_MAX_ECCINTR]; @@ -39,6 +43,7 @@ enum { DIR_CORR = 0, DATA_CORR, DATA_UNCORR, + DIR_UNCORR, }; #ifdef CONFIG_DEBUG_FS @@ -93,6 +98,7 @@ static void l2_config_read(void) static const struct of_device_id sifive_l2_ids[] = { { .compatible = "sifive,fu540-c000-ccache" }, + { .compatible = "sifive,fu740-c000-ccache" }, { /* end of table */ }, }; @@ -155,6 +161,15 @@ static irqreturn_t l2_int_handler(int irq, void *device) atomic_notifier_call_chain(&l2_err_chain, SIFIVE_L2_ERR_TYPE_CE, "DirECCFix"); } + if (irq == g_irq[DIR_UNCORR]) { + add_h = readl(l2_base + SIFIVE_L2_DIRECCFAIL_HIGH); + add_l = readl(l2_base + SIFIVE_L2_DIRECCFAIL_LOW); + /* Reading this register clears the DirFail interrupt sig */ + readl(l2_base + SIFIVE_L2_DIRECCFAIL_COUNT); + atomic_notifier_call_chain(&l2_err_chain, SIFIVE_L2_ERR_TYPE_UE, + "DirECCFail"); + panic("L2CACHE: DirFail @ 0x%08X.%08X\n", add_h, add_l); + } if (irq == g_irq[DATA_CORR]) { add_h = readl(l2_base + SIFIVE_L2_DATECCFIX_HIGH); add_l = readl(l2_base + SIFIVE_L2_DATECCFIX_LOW); @@ -181,7 +196,7 @@ static int __init sifive_l2_init(void) { struct device_node *np; struct resource res; - int i, rc; + int i, rc, intr_num; np = of_find_matching_node(NULL, sifive_l2_ids); if (!np) @@ -194,7 +209,13 @@ static int __init sifive_l2_init(void) if (!l2_base) return -ENOMEM; - for (i = 0; i < SIFIVE_L2_MAX_ECCINTR; i++) { + intr_num = of_property_count_u32_elems(np, "interrupts"); + if (!intr_num) { + pr_err("L2CACHE: no interrupts property\n"); + return -ENODEV; + } + + for (i = 0; i < intr_num; i++) { g_irq[i] = irq_of_parse_and_map(np, i); rc = request_irq(g_irq[i], l2_int_handler, 0, "l2_ecc", NULL); if (rc) {