From patchwork Sat Mar 27 05:05:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1459106 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.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=Scl3Av5/; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=eJo20oPn; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6my71zqvz9sRf for ; Sat, 27 Mar 2021 16:05:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc: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=/Rjfrs+vWZnFTyIyWUnud/3xt5nx7e1TLOZzLK2zcf0=; b=Scl3Av5/C7VrKCEAMUbkb/Tapn oQ/UqXeGfdVsAxP1KxWA1FUdZ8sRicvPn9o8XOATWHLdBSUREuWdZA2loEZMD8++eOdie8oYHMOxH mWbNgr8IL0nztT8IKSxfcxaCNK7vquYkfAqZ3OVAH3dcIGQ0B57uCFV7c939pciww7d2INThHY4Zp hWsKFadkh4j/AoICJwtBD0uMBLvrqAjmDVA6gHbSBuo0yDib9DrLn85JylP8Ob4bsUDBJ2Y4s3BQE Q0JBWjR6Lea0e03BHRMzNeYlva3QFyY4mYiOzPVxiekHtv13+G86r9tug6eGkvQcYh8+ukslRY6HK WhnB69aw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQ18n-004jli-SO; Sat, 27 Mar 2021 05:05:41 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQ18i-004jjG-Lh for opensbi@lists.infradead.org; Sat, 27 Mar 2021 05:05:38 +0000 Received: by mail-pl1-x62d.google.com with SMTP id v23so1895713ple.9 for ; Fri, 26 Mar 2021 22:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jdNTDeK308Tb3M0qY4wuxyDi7CMqp8XyxjkTkFeWln8=; b=eJo20oPnn6owGgFTfSNM/JNCDlIlzp/Gy/GmM28uj/mjcKjZyfqMbdnH9sjoFJVSpV 46kiClJ88EAyKYAYDun+21L2L2P63zKOX4XiPj/n3AG0kNtWSZOaYsAxKTdwT7qAm5CC U8eJCZ6P+OQ0ror3R8M8hSEp3YK+p4OADIrUHKpdGYflym4xp4vjvGba79hktINL2bdN 2juwGtFuvnI6uMIHSdG0gPA2eeAWhtZkjlQnLuG2ZO83d9ZSYCOwmbZp7ErP54c4MGl0 YOH5eYN+IdkVc2XqEcAEyMdNxx9ZdOYQ13AxTcTl8NzaPc0u9lwr8iy+vl2yZwbBNOeK safA== 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:mime-version :content-transfer-encoding; bh=jdNTDeK308Tb3M0qY4wuxyDi7CMqp8XyxjkTkFeWln8=; b=WgXgz+hDskmTb30Ly5JG/WHQrtNRjJQjg0zHBLQ4ie1dwwqbGqHT2dGGN84tf0nzCh YB+PtxTMcUfOYs6HgcQ+Ktz6my0oWJ83GjvTXe6oU/BD3xaLI1TNjnDDz9/ZA25Kf2LZ ByJUMc4nfnge8KcVehIMS8yr+PKZhSUgx4az4FWk3PxH4QM5d7nWf0GhAxCCqJZoOvIk lbADMTnUvpKC8fk4EU5bdpBVpt7+dGwlRPHSCD0qE4ffNO3itU8x6hwHgQ6ENsGtwgSM KtG6B3BZEEujQIQVbG3Uk6MmI+emd4HmxWbD6BtUSPRQYrvuTgKYXUKbMdoSkQYrALCm dN8Q== X-Gm-Message-State: AOAM532f+QWlGbtMg7xG0RjGQuNA6MOykQnbi/MazyCT/VDC221nKtJT YhFISbhppamw0RZa5QHlOxyzAu2JYns= X-Google-Smtp-Source: ABdhPJwB63frqS7trhHT0Hrp3FgHcGLRrewIzyN+rTsEJBXRabIliImoiQ9FRKK/T/cncj8I5cEjPw== X-Received: by 2002:a17:902:f54e:b029:e6:3d74:eb3 with SMTP id h14-20020a170902f54eb02900e63d740eb3mr18628658plf.14.1616821534336; Fri, 26 Mar 2021 22:05:34 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id v18sm12337718pgo.0.2021.03.26.22.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 22:05:33 -0700 (PDT) From: Bin Meng To: opensbi@lists.infradead.org Cc: Bin Meng Subject: [PATCH 1/3] lib/utils: Support the official clint DT bindings Date: Sat, 27 Mar 2021 13:05:25 +0800 Message-Id: <20210327050527.15955-1-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210327_050536_843820_E1CCE2EC X-CRM114-Status: UNSURE ( 8.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Linux kernel commit a2770b57d083 ("dt-bindings: timer: Add CLINT bindings") adds the official DT bindings for CLINT, which uses "sifive, clint0" as the compatible string. "riscv,clint0" is now legacy a [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:62d listed in] [list.dnswl.org] X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Linux kernel commit a2770b57d083 ("dt-bindings: timer: Add CLINT bindings") adds the official DT bindings for CLINT, which uses "sifive,clint0" as the compatible string. "riscv,clint0" is now legacy and has to be kept for backward compatibility of legacy systems. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- lib/utils/ipi/fdt_ipi_clint.c | 1 + lib/utils/timer/fdt_timer_clint.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/utils/ipi/fdt_ipi_clint.c b/lib/utils/ipi/fdt_ipi_clint.c index e992440..e799fd7 100644 --- a/lib/utils/ipi/fdt_ipi_clint.c +++ b/lib/utils/ipi/fdt_ipi_clint.c @@ -36,6 +36,7 @@ static int ipi_clint_cold_init(void *fdt, int nodeoff, static const struct fdt_match ipi_clint_match[] = { { .compatible = "riscv,clint0" }, + { .compatible = "sifive,clint0" }, { }, }; diff --git a/lib/utils/timer/fdt_timer_clint.c b/lib/utils/timer/fdt_timer_clint.c index fe66708..6ba6c7b 100644 --- a/lib/utils/timer/fdt_timer_clint.c +++ b/lib/utils/timer/fdt_timer_clint.c @@ -38,6 +38,7 @@ static int timer_clint_cold_init(void *fdt, int nodeoff, static const struct fdt_match timer_clint_match[] = { { .compatible = "riscv,clint0" }, + { .compatible = "sifive,clint0" }, { }, }; From patchwork Sat Mar 27 05:05:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1459104 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.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=d28Wnpxt; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=UnrLsynw; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6my924CGz9sSC for ; Sat, 27 Mar 2021 16:05:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=J3GzzlZXduQyMjf819SmTA0JG1+2MFFS56u+Sw8Rpl4=; b=d28WnpxtHhythwmri1NdFmM9I 5KCTL5nDnaUdhgP7KezbgYOblWgHIpUAKCueniNaq+GpGw8VTKHKmTkPGjJVJck0dRojo97SVZj8f 4OMRKPMmV2azp3381aDqKEJIsTu8DXz2yDw3zYmKTurWhwK8JUU54hl6qJcAS+NR0WWNbMz8EUl0q v6wUPtwOdjsqBMhYj60okVhvfJ6vFp1CPzxxKXgtaY0Hn9gOPqBqsBxLqmZDQhOBY9NZJ8TF96rXn Wn4VbYpdKkcQnSQYjjdzt2Q/dEirwzXWTt0Zlu3HevrQ0kZIbU0IPz1WMenYCqYwP+89G97Xe/D+7 D4q3GZtWw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQ18o-004jlq-Mn; Sat, 27 Mar 2021 05:05:42 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQ18j-004jk3-Qu for opensbi@lists.infradead.org; Sat, 27 Mar 2021 05:05:39 +0000 Received: by mail-pg1-x52a.google.com with SMTP id v3so5969414pgq.2 for ; Fri, 26 Mar 2021 22:05:37 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=9X+hOuAjkIcU4nzjc0Bm/Wbhbg78w88Dn0a6IpDYQEI=; b=UnrLsynwQJtWL28PISQPmZvgTKzReynp8mFw+LEY4U5EP00TI/blXQ8GwgVS6PVeNp BaUj+KYNgzcfukLoCwmLbVOULTF8hhDkoZeDQmIma31VK/4Oe2RqN0iyT+qgFocvUfq7 STBq4BUprU63j1YPAQyVwukhGUdDun87iUPSWzZtsJKhw39q+A0bPqoS+xx5XrL0eoKV DJMI95N71dIqkJUskXo1Fk97eYz4oRvN4y7xRd5HooAQdBCK6ZcZyHt1ZTRXj5Kt0e7i E7Vu0uJP5IfZ/K0UfVNsgNvhyL1HjG2Uf1fWNNwtiAqvICjmWRPoBrJaPSN/s9jE4das G5uA== 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:mime-version:content-transfer-encoding; bh=9X+hOuAjkIcU4nzjc0Bm/Wbhbg78w88Dn0a6IpDYQEI=; b=HrdioaG1/nJY/MJobJjE9BHl0jvWItknl76eRZoK3EzA00aFIhI+ACRBmNzEzoZw+0 jGal5Q/RqezSjJbut4+NLx6AcKmvEew1Zod4fK7cM4b5pyV36YZPs6LEHUI6zYFguK4e kjhrwP5VM9kY0LV8EYe0mqvlCF83i0Ldg3l18g2x0MF6N6kyF5ng+O95sHTIRnMMf9We ut+el1aFOdhWD2kxq3scG3vcP6uHpsCsuON29RBcc4UdHmZOalTGiutlMRyocjapzdVc T4+fdjykLvEwvjX0MmsYEN0BXo9tEn/k7NXydDFiBCrGM0F/VNP7T5AOLB5FctzV9bOl GqOQ== X-Gm-Message-State: AOAM530CddjRY6OQo0oWxqPL+KKSzKgifcFup+01yY9XRz0FTSOcIXjq N/2dpUfxwcDSTfezUkpO7n719C1Ccdw= X-Google-Smtp-Source: ABdhPJwYbTuPpixaYUtUk2GgnjtTOxZ2JoElQtOKrcZC9dFIh+Xdwt5bLP1SHHATa3W2aLGGayDlsA== X-Received: by 2002:a65:498b:: with SMTP id r11mr15176947pgs.364.1616821536286; Fri, 26 Mar 2021 22:05:36 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id v18sm12337718pgo.0.2021.03.26.22.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 22:05:35 -0700 (PDT) From: Bin Meng To: opensbi@lists.infradead.org Cc: Bin Meng Subject: [PATCH 2/3] lib/utils: Drop the 'compat' parameter of fdt_plic_fixup() Date: Sat, 27 Mar 2021 13:05:26 +0800 Message-Id: <20210327050527.15955-2-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210327050527.15955-1-bmeng.cn@gmail.com> References: <20210327050527.15955-1-bmeng.cn@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210327_050538_013057_6C8DC217 X-CRM114-Status: GOOD ( 10.69 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: At present fdt_plic_fixup() accepts a 'compat' parameter for PLIC compatible string. In preparation to support the new DT bindings, drop this and use "riscv,plic0" directly in fdt_plic_fixup(). Signed-off-by: Bin Meng --- Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:52a listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org At present fdt_plic_fixup() accepts a 'compat' parameter for PLIC compatible string. In preparation to support the new DT bindings, drop this and use "riscv,plic0" directly in fdt_plic_fixup(). Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- include/sbi_utils/fdt/fdt_fixup.h | 3 +-- lib/utils/fdt/fdt_fixup.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/sbi_utils/fdt/fdt_fixup.h b/include/sbi_utils/fdt/fdt_fixup.h index 0697a18..c38e5d9 100644 --- a/include/sbi_utils/fdt/fdt_fixup.h +++ b/include/sbi_utils/fdt/fdt_fixup.h @@ -30,9 +30,8 @@ void fdt_cpu_fixup(void *fdt); * It is recommended that platform codes call this helper in their final_init() * * @param fdt: device tree blob - * @param compat: PLIC node compatible string */ -void fdt_plic_fixup(void *fdt, const char *compat); +void fdt_plic_fixup(void *fdt); /** * Fix up the reserved memory node in the device tree diff --git a/lib/utils/fdt/fdt_fixup.c b/lib/utils/fdt/fdt_fixup.c index eea450d..a306ff5 100644 --- a/lib/utils/fdt/fdt_fixup.c +++ b/lib/utils/fdt/fdt_fixup.c @@ -51,13 +51,13 @@ void fdt_cpu_fixup(void *fdt) } } -void fdt_plic_fixup(void *fdt, const char *compat) +void fdt_plic_fixup(void *fdt) { u32 *cells; int i, cells_count; int plic_off; - plic_off = fdt_node_offset_by_compatible(fdt, 0, compat); + plic_off = fdt_node_offset_by_compatible(fdt, 0, "riscv,plic0"); if (plic_off < 0) return; @@ -257,7 +257,7 @@ int fdt_reserved_memory_nomap_fixup(void *fdt) void fdt_fixups(void *fdt) { - fdt_plic_fixup(fdt, "riscv,plic0"); + fdt_plic_fixup(fdt); fdt_reserved_memory_fixup(fdt); } From patchwork Sat Mar 27 05:05:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1459105 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.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=gNq8ntlr; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=g7eOlSSp; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F6my84jJxz9sS8 for ; Sat, 27 Mar 2021 16:05:49 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=o0+J1SfG6vPncVi9j0eWHcbbDR3VIcv3BD16qE7/1zw=; b=gNq8ntlrFjojePJj7oZ6edfNH tmr1Sf4STBiLJp+hFXpVOvAplWCf82K9ZNQm7hIXxhWyWXnNPYTN0Vgka3nQZydE6Th4cb40GkO9a BzZj/WVPF9OXE2EMvOEuy+akPimw0Vgi4gYSB98iHJdLQoMkQ4hg4xiljPCOrSwP9c4Z6Zb/CFBu7 3nt4eNh+XzAKOdLLTPADH8v3cwGJyMAXSvnS6UxEPlPQ3qwza/zFR0a7zTdn5EbTrcaEaUooKitsT rljXRFT/Bm3inHhzee9QJW1ZW7oisbDGn4teG/DsyVotqR2BhEqNAt++vpAqWSv2Y9V7807lIOPVV W1eg7Vuhw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQ18q-004jmH-FC; Sat, 27 Mar 2021 05:05:44 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQ18l-004jkd-Vk for opensbi@lists.infradead.org; Sat, 27 Mar 2021 05:05:42 +0000 Received: by mail-pj1-x102d.google.com with SMTP id nh23-20020a17090b3657b02900c0d5e235a8so3452569pjb.0 for ; Fri, 26 Mar 2021 22:05:39 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=K3WpqWPuIOBaT1brGF8mPHFSclC0Ggzx1dn5caAOlOw=; b=g7eOlSSpZ/IsSMOU+iDDzlp6Tbfs1fBo0RJtM6WGZMVCGV/VcxbKZg8K+XuoVyrkst ZuGejy64NCtqALDI9r5h8gzaOUPUgjgLw48WGRko/V7PFQ5+G7dUv3gQMli+PJS2dCuY LsegDeIYVAI1V47iq9/cVdt3d67NC4rnR5QSqbmrxYM/AcW3QWgULJEOhoC43YScBAK3 Zqa/kei0IYVwr2BCX1a4/gsiTK0q6d63sU/g9RLxjOva/xvzeSwyo0kZA1UikHfs+rqb YO4ZNK1dQjFYTBdCshuNj6iktrjY/kHHVbY/6M88Ik3V+MwFSjYvqVIjATLOCrIsemqm v93A== 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:mime-version:content-transfer-encoding; bh=K3WpqWPuIOBaT1brGF8mPHFSclC0Ggzx1dn5caAOlOw=; b=B0CN6RuQRChmCYUHXznilZMDwOauqCeB3cmWMr537E+5t5lyF9QcgR1jjfL10Id4cz 0gBK3U4AGJJF+v6HyuvAE/LKYBHF38PjzuDtt2YxVU/tZzXWT5dHZo7iA0Po9EeGkDX7 ChcmLYmCp1fR+0EOpQQYswYjJMypLXSkBxwo7ekSZVnHqe7qlv9jhQ91sPjVUmTijy5J ttaEqXZp3yjo3t4i2Prh+dQ6gX2AvJrOVxgI57lSh1HDUrQTfUcCBPYpZQxD/BH+86Ne YPX1ixopJ+9O2uCPHpUIjU+QNpxPG/qpDDVpsWanIjxBPtT17jvA8UCyYjCVZKNExljd V8Gg== X-Gm-Message-State: AOAM5310H83W8yEbEp+N7M6j9DFdigH2WRbI4wX+vG2CxeycLXkaDcOv zLzzkb+f/UPcRtQ4VW1nkTZ16kvW3+k= X-Google-Smtp-Source: ABdhPJzDZ1TxuaYNXNzOmuhWZ0WB5OxGiaft2mxkqNarQDxMDwovEErdx2ImdKhXnxnZW4r2vp2xnQ== X-Received: by 2002:a17:902:c204:b029:e7:32fd:bc8f with SMTP id 4-20020a170902c204b02900e732fdbc8fmr5769969pll.43.1616821538540; Fri, 26 Mar 2021 22:05:38 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id v18sm12337718pgo.0.2021.03.26.22.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 22:05:38 -0700 (PDT) From: Bin Meng To: opensbi@lists.infradead.org Cc: Bin Meng Subject: [PATCH 3/3] lib/utils: Support fixing up the official DT bindings of PLIC Date: Sat, 27 Mar 2021 13:05:27 +0800 Message-Id: <20210327050527.15955-3-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210327050527.15955-1-bmeng.cn@gmail.com> References: <20210327050527.15955-1-bmeng.cn@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210327_050540_125283_7B649114 X-CRM114-Status: GOOD ( 10.70 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Current fdt_plic_fixup() only does necessary fix-up against the legacy "riscv, plic0" node. The upstream Linux kernel defines its official DT bindings which uses "sifive,plic-1.0.0" as the compatible s [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bmeng.cn[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:102d listed in] [list.dnswl.org] X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Current fdt_plic_fixup() only does necessary fix-up against the legacy "riscv,plic0" node. The upstream Linux kernel defines its official DT bindings which uses "sifive,plic-1.0.0" as the compatible string and we should check that first, and if not present fall back to legacy. Signed-off-by: Bin Meng Reviewed-by: Anup Patel --- lib/utils/fdt/fdt_fixup.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/utils/fdt/fdt_fixup.c b/lib/utils/fdt/fdt_fixup.c index a306ff5..1465500 100644 --- a/lib/utils/fdt/fdt_fixup.c +++ b/lib/utils/fdt/fdt_fixup.c @@ -57,9 +57,12 @@ void fdt_plic_fixup(void *fdt) int i, cells_count; int plic_off; - plic_off = fdt_node_offset_by_compatible(fdt, 0, "riscv,plic0"); - if (plic_off < 0) - return; + plic_off = fdt_node_offset_by_compatible(fdt, 0, "sifive,plic-1.0.0"); + if (plic_off < 0) { + plic_off = fdt_node_offset_by_compatible(fdt, 0, "riscv,plic0"); + if (plic_off < 0) + return; + } cells = (u32 *)fdt_getprop(fdt, plic_off, "interrupts-extended", &cells_count);