From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11BD2606A322 for ; Thu, 3 Dec 2026 14:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.u-boot-project.org header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default header.b=Q48rYo/c; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=iuiEImu1 Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C6DA086578; Thu, 3 Dec 2026 14:51:11 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id voR5ojB8T15x; Thu, 3 Dec 2026 14:51:10 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 3B62286584 Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796309470; b=qdkD7zhgYwkeTXpk0opvBGmfRfSQxu39+LXZ8yGd30TZZ/lhJ7rVumht/AP2EBMrYASf mMcgGzhLZjgG8puH9E46eU0/QVZpvLiqQNxIsgdJ+xHNtifDySVe5PiRSvd6P++ECyEtn HfWdWs2ALyZj5bhqyiIrd1F2nAjw3DFSZQdQxl/vHX1iKOfbR9TvnW2tuodtYJ/7cHuGM Ah2BtOCgYKUBWd61s357uraRjL5X/YjqXC0Knx3ESlIOgsFYfsUNyrUwevBBaOB+HPkY+ QDOLu+DQaQpBwQUvJjhjkFdligLAT0kVdarnizpoJCJDW0GqoQEhXajwonvaJhcCYNw== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796309470; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding:X-BeenThere:X-Mailman-Version: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Errors-To; bh=xELRi2Q4fMoOAMEjCnvEi+U+uk2rfGpQsPw9QO9Fuig=; b=fWiW+X6zPfXrlf9C++a5INicp0M8U+TBbO3Wx1fSP6Lwg3iiBj33RlNaJPA3nE7TAbnv oXg+8PCYw5CCa65CFp3YF+K3Rtli64w0d5Wwn4Wk39QLaertxIuCqPQZGIOEd+1UQPHJJ xdSbmEyxtXBL1mRlQ0vSdvFiRBEhAIdzxVAoq9mqyOFtd1eUVI6OnZRD8PFEXMn5Zrxpv +JxsTRzA/sRt3vUYQuFB1y3p8QBVOldj73FdzAFcXPGjsEzDoHe5boDTYO2OAsStWP47s 0y/4OKSrfJcw47IFVGe1BwZA41jfhvufRcK2cxE5Vp3ijVyoB6qMA3ftXSt7XuqIr4g== ARC-Authentication-Results: i=1; smtp1.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1796309470; bh=xELRi2Q4fMoOAMEjCnvEi+U+uk2rfGpQsPw9QO9Fuig=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Q48rYo/crCeueypCwq+pWFkvQH8lGpTqoQdc5ZkWaOr2bvTmUicZy7xHRd8DbpYI3 Dwponahwc/o5ku58Lmk6iU8frHj0cBgyJsQBgldJEuGXEm1pX1i+Zt9UB11GDL8LRQ rsmLYtA/h1/ZrxWzNiA2gSre1xZRo8yAueZc0QtA+dWa/oHk7/KgA/Bk4FbYbHH1+n euii9hgNOq/22NxF3M7GoSG7NMk0G3jEksQOD4wBjfCOuzRuWLJ+xoI6ZqU4WYMD/u XqA+bVYK6VSy9FYYBSWIV0efStQFZtzlX6h/ym4msbNFneGpxiBZvjn9tPJ1pswwtk 7wd9hyuywmWdg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 3B62286584; Thu, 3 Dec 2026 14:51:10 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 9C8E040D for ; Thu, 3 Dec 2026 14:51:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8E81140B4F for ; Thu, 3 Dec 2026 14:51:09 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id D9-arqlvOQFR for ; Thu, 3 Dec 2026 14:51:09 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org DBB6040B25 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:20::c2d" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::c2d; helo=mail-oo1-xc2d.google.com; envelope-from=macroalpha82@gmail.com; receiver= Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=iuiEImu1 Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by smtp4.osuosl.org (Postfix) with ESMTPS id DBB6040B25 for ; Thu, 3 Dec 2026 14:51:08 +0000 (UTC) Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-716c0217635so1196827eaf.0 for ; Thu, 03 Dec 2026 06:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796309467; x=1796914267; darn=lists.u-boot-project.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=xELRi2Q4fMoOAMEjCnvEi+U+uk2rfGpQsPw9QO9Fuig=; b=iuiEImu1TU3Z3SlnOStcXv4Dk3oCKpxbEv9gNFU90XOI/QH2+/CqO33FzQXqDhGM+q n6Vy37mNji/47FImMWhp31Gfb1L1WYHOtXzW4eSd70Srenpmfsnu7o4wtu48tU+Uk/Pe x9TV7YAq+sJUTcI5O0t46ccFT0IYVS7ZDO4Ztcprups8QMebVwxSSDf7VzhggLssCd9Y Dt1m9zrWLy5BChYNYo5qeMRHjKd9Ky0N6HeXhKNJJ4wsN+DIi5rJVsAcRqCbrbsLZ0/o +2Nc4eC8PMl3kTj2xcYlpZ0NWKSlzARCM5vw8bD0CsMXV8iArydHqQX/+Cqn0YCl1UTq EBEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796309467; x=1796914267; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=xELRi2Q4fMoOAMEjCnvEi+U+uk2rfGpQsPw9QO9Fuig=; b=n35HdEyB3zT7AI/c7FTVGElvByEI0oJHohwbYyfl0lHRRwMe9m7u/YRysB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064:8b06 with SMTP id 006d021491bc7-71bdf788cc6mr1840641eaf.69.1796309467280; Thu, 03 Dec 2026 06:51:07 -0800 (PST) Received: from neuromancer ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-71b380b6f82sm28667470eaf.10.2026.12.03.06.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 06:51:06 -0800 (PST) From: Chris Morgan To: u-boot@lists.u-boot-project.org Cc: kever.yang@rock-chips.com, trini@konsulko.com, u-boot@0leil.net, jonas@kwiboo.se, Chris Morgan Subject: [PATCH] board: anbernic: rgxx3: Correct setting board_type Date: Thu, 3 Dec 2026 08:51:03 -0600 Message-ID: <20261203145103.509845-1-macroalpha82@gmail.com> X-Mailer: git-send-email 2.53.0 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Chris Morgan The array of rg3xx_model_details starts at 1, but the iterator in set_gd_value started at 0. While wrong, this did not start causing an issue until upstream Arm Trusted Firmware started setting the DDR firewall correctly, causing the board to boot-loop at this step. Additionally, add a few guards in the set_gd_value() function to return an error if we don't have an fdt_blob or if we can't get the model id. Fixes: 7344fa41a2e3 ("board: rockchip: Convert Anbernic RGxx3 to OF_UPSTREAM") Signed-off-by: Chris Morgan --- board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c index d402374e90e..370854e7dd6 100644 --- a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c +++ b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c @@ -501,9 +501,14 @@ int set_gd_value(void) { const char *model; + if (!gd->fdt_blob) + return -ENODEV; + model = fdt_getprop(gd->fdt_blob, 0, "model", NULL); + if (!model) + return -ENODEV; - for (int i = 0; i < ARRAY_SIZE(rg3xx_model_details); i++) { + for (int i = 1; i < ARRAY_SIZE(rg3xx_model_details); i++) { if (strcmp(rg3xx_model_details[i].board_name, model) == 0) { gd->board_type = i; if (!rg3xx_model_details[i].uart_con) -- 2.53.0